text stringlengths 59 1.12k |
|---|
and a list of what I taught, in case I teach more than one thing each term. It's going to do that, but notice it's a try. If in fact there is no term currently in the dictionary, started out |
empty, it's going to throw an error, sorry, not throw an error, it's going to raise an exception. Which is a key error, in which case notice what I'm going to do, I'm not going to treat it as an |
error. I'm simply going to say, in that case, just start off with an empty, with an initial list with just that subject in and put it in the dictionary. As I add more things in, I'll just keep adding |
things to this dictionary under that term. And if I want to find out what I'm doing, well I can use get teaching, which says given the term, find the thing in the dictionary under that term and return it. |
If I get an error, I'm going to raise it, which says there is nothing for that term, and in that case I guess I'm just going to return none. OK? And then the other two pieces we're going to |
have here, and we want to look at a little more carefully, I just wanted to show you that example, is a professor can lecture, and a professor can say something. Look at the say method, because this now add |
one more nuance to what we want to do here. And I think in interest of making this go, let me actually, since I'm not going to get my machine to do this right, let me create a couple of |
professors. If I look at what that is, it's an MIT person because I didn't have any separate string thing there, and we will create a more important professor. What rank do you want, John? Do you want to stay |
full? PROFESSOR 2: Undergraduate. PROFESSOR: Undergraduate, right, a lot more fun I agree. Sorry about that, and we can again just see what that looks like. And that of course, we'll print out, he's also an MIT person. But now |
here's what I want to do. I want to say something to my good colleague Professor Guttag. Actually I'm going to start a separate -- I'm going to say something to a smart undergraduate. So if I say, remember we |
have ug defined as an undergraduate, let me do something a little different here. Well let, me do it that way. It says, I don't understand why you say you were enjoying 6.00. Not a good thing to say, right, |
but if I say to my good colleague Professor Guttag. I have to spell say right, I know, I need help with this, what can I say? We flatter each other all the time. It's part of what makes us |
feel good about ourselves. Why is the sky blue? I enjoyed your paper, but why is the sky blue? OK, terrible examples, but what's going on here? One more piece that I want to add. Here's my say method for |
professor, and now I'm actually taking advantage of to whom I am saying something. Notice again, what does it do? There's the self argument, that's just pointing to the instance of me. I'm passing in another argument, going to call |
it to who, in one case it was ug, in one case it was Guttag. And then the thing I want to say, ah, look what it does, it says, check the type. And the type is going to take |
that instance, I had an instance, for example, of a professor down here, and it's going to pick up what type of object it is. So if the type of the person I'm speaking to is undergrad, let's pause for |
second. Remember I started away back saying we're building abstract data types. Well, here's a great example of how I'm using exactly that, right? I've got int, I've got float, I now have ug, it's a type. So it's says |
if the object to whom I'm speaking is an undergrad, then use the same method from person where I'm going to put this on the front. On the other hand, if the object to whom I'm speaking is a professor, |
then I'm going to tag this on the front and use the underlying say method. On the other hand, if I'm speaking to somebody else, I'm just going to go lecture. All right, and when a professor lectures, they just |
put it's obvious on the end of things, as you may have noticed. What's the point I want you to see here? I'm now using the instances to help me to find what the code should do. I'm looking at |
the type. If the type is this, do that. If the type is this, do something different, ok? And I can now sort of build those pieces up. OK, I said one more class. Notice what we're doing. I know |
they're silly examples, but, sorry, they are cleverly designed examples to highlight key points. What I'm trying to do is show you how we have methods inherit methods, how have message shadow methods, how we have methods override methods, how |
we can use instances as types to define what the method should do. Let me show you one last class, because I'm gonna have one more piece that we want to use. And the last class is, sort of, once |
you've got a set of professors, you can have an aggregate of them. And I don't know, if a group of geese are gaggle, I don't know what a set of professors are, John. Flamers? I, you know, we've got |
to figure out what the right collective noun here is. We're going to call them a faculty for lack of a better term, right? Now the reason I want to show you this example is, this class, notice, it only |
is going to inherit from object. It actually makes sense. This is going to be a collection of things, but it's not a subclass of a particular kind of person. And what I want the faculty to do, is to |
be able to gather together a set of faculty. So if I go down here, grab this for second, and pull it down so you can see it. It looks like I'm not going to be able to run this |
because my machine is broken, but basically I'm gonna define a set of professors, and then I'm gonna create a new class called faculty. There's the definition of it. It's got an init. You can kind of see what it |
does. It's going to set up an internal variable called names, which is initially an empty list, internal variable called ids, which is empty, an internal variable called members, which is empty, and another special variable called place, which we're |
going to come back to in a second, initially bound to none. OK, I've got a method called add which I'm going to use down here to add professors to the course 6 faculty. Here's what I want to add |
to do. First of all, notice I'm going to check the type. If this is not a professor, I'm gonna raise an error, a type error, it's the wrong type of object to pass in. The second thing I'm gonna |
do is say, if that's okay, then let me go off and get the id number. Now remember, that's right up here, so I'm asking the instance of the professor to go up and get the id number. And I |
want to make sure I only have one instance of each professor in my faculty, so if the id number is in the list of ids already, I'm going to raise an error, sorry, raise an exception as well, saying |
I've got a duplicate id. OK? And the reason that's going to come up is, notice what I do now. Inside of the instant self, I take the variable names and I add to it the family name of the |
person I just added. OK, notice the form. I'm using the method, there's the parens to get the family name of the person. I'm just adding it to the list. I've got the id number, I've added the ids, and |
I add the object itself into members. So as I do this, what am I doing? I'm creating a list, actually several lists: a list of ids, a list of the actual instances, and a list of the family names. |
And as a cost I want to add, that's why I can check and see, is this in here already or not? Now, the last reason I want to do this is, I want to be able to support things |
like that. This is now different, right, this instance is a collection. I want to be able to do things like, for all the things in that collection, do something, like print out the family names. And to do that, |
I need two special forms: iter and next. OK, now let me see if I can say this cleanly. Whenever I use a for, in structure, even if it was on just a normal list you built, what Python is |
doing is returning an, what is called an iterator. Which is something that we talked earlier. It's keeping track of where are you in the list, and how do I get to the next thing in the list? I'm going |
to do the same thing here, and I'm going to create it for this particular structure. So this little thing iter, when I call a for something in, one of these instances, it calls iter, and notice what it does. |
It initializes place to 0. That was that variable I had up there. That's basically saying I'm at the beginning of the list. It's a pointer to the beginning of the list, and it returns self. Just gives me back |
a pointer to the instance. That now allows me at each step in that loop to call next. And what does next do? Next says, check to see if that value is too long, if it's longer than, for example, |
the list of names, raise an exception called stop iteration, which the for loop will use to say OK, I'm done. I'm going to break out of the for loop. Otherwise, what am I going to do? I'll increment place |
by 1, that's going to move me to the next place in the list, and then in this case I'll just return the instance itself, right? Members is a list of instances, place I've incremented by 1, I take 1 |
off of it, I get to it. So iter and next work together. Iter creates this method, that's going to give you a pointer to the place in the structure, and then next literally walks along the structure giving you |
the next element and returning elements in turn so you can do something with it. Right, so now what that says is, I can have classes that just have local variables. I can have classes that get methods from other |
variables, and I can also have classes that are collections. And I've supported that by adding in this last piece. OK once you have all of that, in principle we could start doing some fun things. So let's see what |
happens if we try and make all of this go. And let me, since I'm not going to be able to run it, let me simply do it this way. If I have my undergraduate, ug. I can -- sorry, |
let's not do it that way -- I can have undergraduate say things like -- all right, what did I just do wrong here? Do I not have undergrad defined? I do. Oh, I didn't have Grimson, sorry, it's me, |
isn't it? Thank you. The undergraduate very politely asks why he didn't understand, you can have the professor respond. Again, it simply puts a different thing into there. On the other hand, if Professor Guttag asks me something about understanding, |
I say I really like this paper on, you do not understand, it's a deep paper on programming languages 5, I think, John, isn't it? What else can you do with this thing, right? You can have an undergraduate talk |
to an undergraduate, in which case they're still polite. Or you could have -- sorry, let me do that the other way -- you could also have an undergraduate simply talk to a normal person. All right, but the good |
news is you know eventually you get it done, and when you're really done you can have the undergraduate be really happy about this, and so she sings to herself. OK it's a little silly, but notice what we've just |
illustrated. And this is where I want to pull it together. With a simple set of classes, and the following abilities, an ability to inherit methods from subclasses, sorry from superclasses, that is having this hierarchy of things. I can |
create a fairly complex kind of interaction. I can take advantage of the types of the objects to help me decide what to do. And if you think about that, I know it sounds very straightforward, but you would do |
exactly that if you were writing earlier code to deal with some numerical problem. All right, if the thing is an integer, do this, if it's a float, do that, if it's a string, do something else. I'm now giving |
you exactly the same ability, but the types now can be things that you could create. And what I've also got is now the ability to inherit those methods as they go up the chain. So another way of saying |
it is, things that you want to come away from here, are, in terms of these classes. We now have this idea of encapsulation. I'm gathering together data that naturally belongs as a unit, and I'm gathering together with it |
methods that apply to that unit. Just like we would have done with float or int. Ideally, we data hide, we don't happen to do it here, which is too bad. Basically we've got the idea of encapsulation. The second |
thing we've got is this idea of inheritance. Inheritance both meaning I can inherit attributes or field values. I can inherit methods by moving up the chain. I can also the shadow or override methods, so that I can specialise. |
And I do all of that with this nice hierarchy of classes. So what hopefully you've seen, between these two lectures, and we're going to come back to it in some subsequent lectures, is that this is now a different |
way of just structuring a computational system. Now, you'll also get arguments, polite arguments from faculty members or other experts about which is a better way of doing it. So I'll give you my bias, Professor Guttag will give you |
his bias next time around. My view, object-oriented system are great when you're trying to model systems that consist of a large number of units that interact in very specific ways. So, modeling a system of people's a great idea. |
Modeling a system of molecules is probably a great idea. Modeling a system where it is natural to associate things together and where the number of interactions between them is very controlled. These systems work really well. And we'll see |
Complete the following test so you can be sure you understand the material. Your answers are private, and test results are not scored. When you create a new table in Datasheet view, you must define a primary key field. You can't use the Lookup Wizard to alter an existing value |
list. When you use a template to create a table, you must set data types for the fields in the new table. Which of the following is the correct syntax for a value list? 'Option 1','Option 2','Option 3' "Option 1";"Option 2";"Option 3" "Option 1":"Option 2":"Option 3" |
Municipal bonds, often called munis, are debt obligations of U.S. states, cities, counties, or other political subdivisions of states. The two primary types of municipal bonds are general obligation and revenue. • A general obligation bond is used for general |
expenditures and is backed by the issuer’s full faith and credit (taxing and borrowing power). • A revenue bond is used to finance a specific public service project and is backed by the cash flow from that project. Examples are |
bonds to finance bridges, turnpikes, tunnels, water and sewer systems, schools, power plants, prisons, transportation systems, hospitals, sports complexes, and airports. This guide is not intended to provide investment advice, and you should not rely on statements in this guide |
As I become more and more interested in American history and archeology, I found this latest news about the USS Monitor quite fascinating: The Monitor finally sank around 1 a.m. on December 31. Twelve sailors and four officers would lose their lives. Periodicals like Harper's Weekly and Frank Leslie's Illustrated Newspaper would later publish artists' renderings and poems about the tragedy, but for families |
of the victims there was little solace. The exact location of the Monitor's final resting place and the crewmen who perished would remain a mystery for more than a century . . . John Byrd, director of the laboratory, says that "sunken ships can be a very, very good environment for preserving remains" because of the protective coating of silt that forms over them. |
On Monday the American Library Association will announce the winner of its highest award for a picture book, named for the great English illustrator Randolph Caldecott (1846–1886). Why was Caldecott so important? Here’s an answer from Maurice Sendak, who won the Caldecott Medal for Where the Wild Things Are: “Caldecott’s work heralds the beginning of the modern picture book. He devised an ingenious juxtaposition |
Dish ran away with the spoon,’ accompanied by a drawing of the happy couple, there is the shock of turning the page and finding a picture of the dish broken into ten pieces – obviously dead – and the spoon being hustled away by her angry parents. There are no words that suggest such an end to the adventure; it is purely a Caldecottian |
1964 Caldecott Medal. Sendak is one of the few great picture-book artists who is also a great critic. Caldecott & Co. has only a dozen pages of pictures but doesn’t need more, because Sendak makes you see books without them. (c) 2008 Janice Harayda. All rights reserved. |
A main character’s name often gives you the first clue to what a novel is “about,” especially when it’s also the title of the book. A good example turns up in Olive Kitteridge, the collection of linked short stories that won the 2009 Pulitzer Prize for fiction. A just-picked olive is as bitter — and the color olive is as |
drab — as the title character of the book appears at first to be. The salt added during curing removes the bitterness just as love, the salt in this book, removes some of Olive’s. In Ireland a kitter is a left-handed person. And Olive is at least metaphorically left-handed: She’s out of sync with others in her coastal town in |
Talk:20.109(F12) Pre-Proposal: Engineering Viral Magnetic Nanoparticles for Magnetic Hyperthermic Cancer Therapy - This is a brainstorming page. You are very welcome to write any crazy / non-crazy / inventive / conventional / knowledgeable ideas or information you may have about our project. Some key words: Magnetic Nanoparticles (MNP), Viruses, Magnetic Hyperthermia, Bioengineering What is Magnetic Hyperthermia? How it works? Under an alternating magnetic field, |
MNP releases heat due to relaxation of magnetic moments (hysteresis). This can cause an increase in temperature to the range of 41C to 47C. Since tumor cells are more heat sensitive than normal cells, they will be killed by this thermal dissipation. Here is an interesting tidbit from a paper I was reading: "In addition to the expected tumor cell death, hyperthermia treatment has |
also induced unexpected biological responses, such as tumor-specific immune responses as a result of heat-shock protein expression. These results suggest that hyperthermia is able to kill not only local tumors exposed to heat treatment, but also tumors at distant sites, including metastatic cancer cells." (Kobayashi) - Clinical trials in prostate cancer - Shows promising results when coupled with irradiation on breast cancer (mouse) Current |
Limitations (This information will help us shape and define the problem.) (1) To achieve the necessary rise in temperature with minimal dose of MNP. - In other words, this means: - High specific loss power / specific absorption rate (SLP) of the MNP. - why is higher applied dosage bad? > leads to unnecessary heat dissipation (2) Lack of knowledge about the metabolism, clearance, |
and toxicity of MNP. Biomedical potentials of MNP - Could be used as early detection for the following using MRI: - Drug Delivery - Cellular labeling and tissue targeting - Purifying and separating cells and DNAs - Transfection by magnetic nanoparticles - Tissue repair - Magnetic resonance imaging (MRI) Types of Relevant Viruses 1. Tobacco Mosaic Virus (TMV) - 18nmx300nm, helical - Can withstand |
high temperatures up to 50C for 30mins (conventional hyperthermia involves heating up to 50C from an external source - Safe for human consumption - Mann group has active research on it - 2130 molecules of coat protein 2. M13 Bacteriophage - 6.6nmx880nm, helical (Length is too long - pose an issue in targeting cells) - Lots of research done by the Belcher group, including |
attaching MNPs to M13 for imaging purposes - We are familiar with the system 3. Cowpea chlorotic mottle virus (CCMV) - 26nm, icosahedral 4. Cowpea mosaic virus (CPMV) - 27nm, icosahedral 5. Brome mosaic virus (BMV) - 28nm, icosahedral 6. Turnip yellow mosaic virus (TYMV) - 30nm, icosahedral Current Work in Viral MNP Attachment Attachment of MNPs to M13 phage for in vivo imaging |
of prostate cancer What we propose to do See flowchart sketch. - Identifying / Screening for appropriate virus vehicles and tumor-specific anchoring sequencse - Developing / Engineering viral MNPs - in vivo testing for efficacy of engineered vMNPs in mouse tumor cells. We will start with using ferritin (Fe3O4) as the MNP. Stage 1: Virus Hunt - We need to investigate how the selected |
virus (likely one of the following: TMV, M13, CCMV, CPMV, BMV or TPMV) interacts with mammalian cells in vivo. Stage 2: Screening for MNP binding site on virus - We will start by using Fe3O4 as our MNP of interest. With this, a protein coat screen of the selected virus for a protein coat that can bind with our MNP is necessary. Stage 3: |
Screening for tumor-specific sequence binding site on virus - We need to do a protein coat or RNA screen of the virus for a region that can bind with a tumor-specific peptide sequence. If necessary, we might need to screen tumors for unique short sequences on their cell surfaces. Stage 4: Virus engineering - We can now engineer wild-type viruses using specific protein coats |
or RNA regions isolated in Stage 2 and 3 to produce the viral MNP of interest. Stage 5: in vivo testing - Perform an in vivo experiment by injecting the engineered viral MNPs into the circulatory system of mice that have developed tumors. By subjecting these mice to an alternating magnetic field under standard hyperthermia conditions and measuring the change in tumor size, we |
will be able to quantify the efficacy of using viral MNPs in magnetic hyperthermia. - Experimenting with double layer MNP to increase response - Target other cancerous cells - Experiment with other types of viruses Quantitative Goals (We can quantify with IC50 value) - Currently, with the aid of 10Gy radiation, the hyperthermia treatment successfully accumulated less than 0.3mg Fe/g tissue. Dosage: 0.2mg Fe |
tumors, we can calculate that only a total of 0.0495mg of Fe is accumulated in the tumors. This gives a % efficacy of 1%. - South Korean experiment: 75ug of MNPs were injected. - From Belcher lab's paper, what is the % efficacy of using M13? - "The actual rotations of the nanoparticles are disordered because the microviscosity of the local environment in cancer |
cells is not constant, and effective elasticity depends on the binding conditions between nanoparticles and membranes." - but this is actually present because when treatment is done with individual MNPs, one side of the MNP is always bound to the targeted cell, so direction is never constant! - Gupta AK, Naregalkar RR, Vaidya VD, and Gupta M. Recent advances on surface engineering of magnetic |
hyperthermia in cancer treatment. Nano LIFE 2010; 01: 17. - D. Ghosh, Y. Lee, S. Thomas, A. G. Kohli, D. S. Yun, A. M. Belcher, K. A. Kelly. M13-templated magnetic nanoparticles for targeted in vivo imaging of prostate cancer. Nat. Nanotechnol. 2012; 7 (10): 677–82. - Add more references as deem appropriate 11/29 from Professor Angela Belcher: - Look at Nature Nano Belcher lab |
Sleep apnea is a condition in which breathing is repeatedly interrupted during sleep. The time period for which the breathing stops or decreases is usually between 10 and 30 seconds. |
When these episodes occur repeatedly, sleep apnea can seriously disrupt the quality of sleep. There are three types of respiratory events: - Obstructive apnea—caused by a temporary, partial, or complete |
blockage of the airway - Central apnea—caused by a temporary failure to make an effort to breathe - Mixed apnea—combination of the first two types These factors increase your chance |
of developing sleep apnea. Tell your doctor if you have any of these risk factors: - Sex: male - Large neck circumference - Age: middle to older age - Family |
history of apnea Structural abnormalities of the nose, throat, or other part of the respiratory tract. Examples include: - Severely enlarged tonsils - Deviated nasal septum - Medicines: sedatives and |
sleeping aids - Alcohol consumption - Fatigue and sleepiness during waking hours - Loud snoring - Breathing that stops during the night (noticed by the partner) - Repeated waking at |
night - Unrefreshing sleep - Morning headaches - Poor concentration or problems with memory - Irritability or short temper People with chronic untreated sleep apnea may be at risk for: |
An overnight sleep study is used to help diagnose sleep apnea. Overnight Sleep Study (Polysomnography) This test helps detect the presence and severity of sleep apnea. During sleep, it measures |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.