<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>STEM GENE</title>
    <description></description>
    <link>https://stemgene.github.io/</link>
    <atom:link href="https://stemgene.github.io/feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Fri, 22 May 2020 04:59:19 +0000</pubDate>
    <lastBuildDate>Fri, 22 May 2020 04:59:19 +0000</lastBuildDate>
    <generator>Jekyll v3.8.5</generator>
    
      <item>
        <title>The Origins of Theater</title>
        <description>content {:toc}

&lt;strong&gt;In seeking to describe the origins&lt;/strong&gt; of theater, one must &lt;strong&gt;rely primarily on speculation (hypothesis)&lt;/strong&gt;, since there is little evidence on which to draw. The most widely accepted theory, championed by anthropologists in the late nineteenth and early twentieth centuries, envisions theater as emerging out of myth and ritual. The process perceived by these anthropologists may be summarized briefly. During the early stages of its development, a society &lt;strong&gt;becomes aware of&lt;/strong&gt; forces that appear to influence or control its food supply and &lt;strong&gt;well-being&lt;/strong&gt;. Having little understanding of &lt;strong&gt;natural causes&lt;/strong&gt;, it &lt;strong&gt;attributes&lt;/strong&gt; both disirable and undesirable &lt;strong&gt;occurrences to&lt;/strong&gt; supernatural or magical forces, and it searches for means to &lt;strong&gt;win the favor of&lt;/strong&gt; these forces. Perceiving an apparent connection between certain actions performed by the group and the result it desires, the group repeats, refined and formalizes those actions into fixed ceremonies, or rituals.

Stories (myths) may then grow up around a ritual. Frequently the myths include representatives of those supernatural forces that the rites celebrate or hope to influence. Performers may wear costumes and masks to represent the mythical characters or supernatural forces in the rituals or in accompanying celebrations. As a people becomes more sophisticated, its conception of supernatural forces and &lt;strong&gt;causal relationships&lt;/strong&gt; may change. As a result, it may abandon or modify some rites. But the myths that have grown up around the rites may continue as part of the group’s oral traditions divorced from these rites. When this occurs, &lt;strong&gt;the first step has been taken&lt;/strong&gt; toward theater as an autonomous activity, and thereafter entertainment and aesthetic values may gradually replace the former mystical and socially efficacious concerns.

Although origin in ritual has long been the most popular, it is &lt;strong&gt;by no means&lt;/strong&gt; the only theory about how the theater &lt;strong&gt;came into being&lt;/strong&gt;. Storytelling has been &lt;strong&gt;proposed as one alternative&lt;/strong&gt;. Under this theory, relating and listening to stories &lt;strong&gt;are seen as&lt;/strong&gt; fundamental human pleasures. Thus, the recalling of an event(a hunt, battle, or other feat) &lt;strong&gt;is elaborated through&lt;/strong&gt; the narrator’s pantomime and impersonation and eventually through each role being assumed by a different person.

A closely related theoty &lt;strong&gt;sees theater as&lt;/strong&gt; evolving out of dances that are primarily pantomimic, rhythmical or gymnastic, or from imitations of animal noises and sounds. Admiration for the performer’s skill, virtuosity, and grace are seen as motivation for elaborating the activities into fully realized theatrical performances.

&lt;strong&gt;In addition to&lt;/strong&gt; exploring the possible antecedents of theater, scholars have also theorized about the motives that led people to develop theater. Why did theater develop, and why was it valued after it ceased to fulfill the function of ritual? Most answers fall back on the theories about the human mind and basic human needs. One, &lt;strong&gt;set forth&lt;/strong&gt; by Aristotle in the fourth century B.C., sees humans as naturally imitative-as taking pleasure in imitating persons, things, and actions and in seeing such imitations. Another, advanced in the twentieth century, suggests that humans have for fantasy, through which they seek to reshape reality into more satisfying forms than those encountered in daily life. Thus, fantasy or fiction (of which daram is on form) permits people to objectify their anxieties and fears, confront them, and fulfill their hopes in fiction if not fact. The theater, then, is one tool whereby people define and understand their world or escape from unpleasant realities.

But neither the human imitative instinct nor a penchant for fantasy by itself leads to an autonomous theater. Therefore, additional explanations are needed. One necessary condition seems to be a somewhat detached view of human problems. For example, one sign of this condition is the appearance of the comic vision, since comedy requires sufficient detachment to view some deviations from social norms as ridiculous rather than serious theaters to the welfare of the entire group. Another condition that contributes to the development of autonomous theater is the emergence of the aesthetic sense. For example, some early societies ceased to consider certain rites essential to their well-being and abandoned them, nevertheless, they retained as parts of their oral tradition the myths that had grown up around the rites and admired them for their artistic qulities rather than for their religious usefulness.
</description>
        <pubDate>Thu, 10 May 2018 00:00:00 +0000</pubDate>
        <link>https://stemgene.github.io/2018/05/10/The-Origins-of-Theater/</link>
        <guid isPermaLink="true">https://stemgene.github.io/2018/05/10/The-Origins-of-Theater/</guid>
        
        
        <category>English</category>
        
      </item>
    
      <item>
        <title>The history of government support art</title>
        <description>content {:toc}

P: OK, last class we were talking about government support for the arts. Who can &lt;strong&gt;sum up&lt;/strong&gt; some of the main points?&lt;br /&gt;
S1: Well, I guess there wasn’t any really offical support for the arts until the 20th century. But the first attempt the United States made to, government support the arts, was Federal Art Project.&lt;br /&gt;
P: Right, so what can you say about the project?&lt;br /&gt;
S1: It was starting during the despression in the 1930s, to employee the out of work artists.&lt;br /&gt;
P: So was it successful?&lt;br /&gt;
S2: Yeah, it was successful. I mean, for one thing, the project established a lot of like community art centers, and galleries in places like &lt;strong&gt;rural areas&lt;/strong&gt; where people hadn’t really &lt;strong&gt;access to&lt;/strong&gt; the arts.&lt;br /&gt;
S1: Didn’t the government end up wasting a lot of money for art that wasn’t even very good? &lt;br /&gt;
P: Some people might say that. But was the &lt;strong&gt;primary objective&lt;/strong&gt; of Federal Art Project to provide jobs?&lt;br /&gt;
S1: That’s ture, I mean it did provide jobs for thousand of unemployed artists.&lt;br /&gt;
P: Right. But then when the United States became involved the WWII, umemployment was down, it seems that these programs weren’t really necessary any longer. &lt;br /&gt;
So, moving on. We don’t actually see any real government involvement in the art again until the early 1960s when President K and other politicians started to push for major funding to support and promoted the arts. It was felt by a number politicians that the government had the responsibility to support the arts &lt;strong&gt;as sort&lt;/strong&gt; of the soul or the spirit of the country. The idea was there be a &lt;strong&gt;federal subsidy&lt;/strong&gt; financial assistance to artist and artistic or culture institution. For just those reasons in 1965, the national endowment for the arts was created. So it was through the NEA, the national endowment for the arts, the arts would develop, would be promoted throughout the nation. And then &lt;strong&gt;individual states&lt;/strong&gt; throughout the country started to  estabilish their own state arts councils to &lt;strong&gt;help support&lt;/strong&gt; their arts. There was a kind of culture explosion. And &lt;strong&gt;by the mid 1970s, by 1974&lt;/strong&gt; I think, all 50 states have their own arts agencies, their own state arts councils that work with the federal government with corporations, artist, performers, &lt;strong&gt;you name it&lt;/strong&gt;.&lt;br /&gt;
S1: Did you just say corporations? How are they involved?&lt;br /&gt;
P: You see, corporations aren’t always &lt;strong&gt;altruistic&lt;/strong&gt;. They might not support the arts unless the government &lt;strong&gt;made it attactive for them to do so&lt;/strong&gt;, &lt;strong&gt;by offering&lt;/strong&gt; corporations tax incentives to support the arts, that is, &lt;strong&gt;by letting&lt;/strong&gt; corporation pay less in taxes if they were patrons of the arts. The K center in Washington DC, you may have been there, or Lincon Center in New York, both of these &lt;strong&gt;were built with substantial financial support&lt;/strong&gt; from corporations. And the K and L centers aren’t the only examples. Many of the culture establishments in the United States will have a plague somewhere acknowledging the support - money they received from whatever corporation. &lt;br /&gt;
S2: But aren’t there a lot of people who don’t think it’s the government’s role to support the arts?&lt;br /&gt;
P: &lt;strong&gt;As a matter of fact&lt;/strong&gt; a lot of politicians who didn’t believe in government support for the arts, they want to &lt;strong&gt;do away with&lt;/strong&gt; agency entirely, &lt;strong&gt;for that very reason&lt;/strong&gt;, to &lt;strong&gt;get rid of governmental&lt;/strong&gt; support. But they only succeed in &lt;strong&gt;taking away&lt;/strong&gt; about &lt;strong&gt;half the annual bedget&lt;/strong&gt;. And &lt;strong&gt;as far as&lt;/strong&gt; the public goes, they are as about many individuals who  disagree with the government supports as they are those who agree. In fact, with artists &lt;strong&gt;in paticular&lt;/strong&gt;, you have lots of artists who support and who have benefit from this agency. Although it seems that just as many artists &lt;strong&gt;oppose&lt;/strong&gt; government agency &lt;strong&gt;being involved in&lt;/strong&gt; the arts for many different reasons like they don’t want the government to control what they create. &lt;strong&gt;In other words&lt;/strong&gt;, &lt;strong&gt;the arguement both for and against&lt;/strong&gt; the government &lt;strong&gt;funding of&lt;/strong&gt; the arts are as many and as varied as individual styles that artists hold them.
</description>
        <pubDate>Thu, 19 Apr 2018 00:00:00 +0000</pubDate>
        <link>https://stemgene.github.io/2018/04/19/The-History-of-Government-support-art/</link>
        <guid isPermaLink="true">https://stemgene.github.io/2018/04/19/The-History-of-Government-support-art/</guid>
        
        <category>TOEFL</category>
        
        <category>TPO</category>
        
        <category>listening</category>
        
        
        <category>English</category>
        
      </item>
    
      <item>
        <title>Vegetations Timberline on Mountains</title>
        <description>content {:toc}

The &lt;strong&gt;transition&lt;/strong&gt; from forest to &lt;strong&gt;treeless tundra&lt;/strong&gt; on the mountain slope is often a dramastic one. Within a &lt;strong&gt;vertical distance&lt;/strong&gt; of just &lt;strong&gt;a few tens of meters&lt;/strong&gt;, trees disappear as a life-form and are replaced by short shrubs, herbs, and grasses. The rapid zone of transition is called the upper timberline or tree lines. In many semiarid areas there is also a lower timberline where forest passes into steppe or desert at its lower edge, usually &lt;strong&gt;because of a lack of moisture&lt;/strong&gt;.

The upper timberline, like the snowline, is highest in the tropics and lowest in the &lt;strong&gt;Polar Regions&lt;/strong&gt;. It ranges from sea level in the Polar Regions to 4500 meters in the dry subtropics and 3500-4500 meters in the moist tropics. Timberline trees are &lt;strong&gt;normally&lt;/strong&gt; evergreens, suggesting that these &lt;strong&gt;have some advantage over deciduous&lt;/strong&gt; (those are lose their leaves) in the &lt;strong&gt;extreme environments&lt;/strong&gt; of the upper timberline. These are some areas, however, where broadleaf deciduous trees form the timberline. Species of birch, for example, may &lt;strong&gt;occur&lt;/strong&gt; at the timberline in parts of the Himalayas.

At the upper timberline the trees begin to become twisted and deformed. This is particularly true for trees, which tend to attain greater height on ridges, whereas in the tropics the trees reach their greater heights in the valleys. This is because middle- and upper- latitude timberlines &lt;strong&gt;are strongly influenced&lt;/strong&gt; by the duration and depth of the &lt;strong&gt;snow cover&lt;/strong&gt;. As the snow is deeper and lasts longer in the valleys, trees tend to attain greater heights on the ridges, even though they &lt;strong&gt;are more exposed to&lt;/strong&gt; high-velocity winds and poor, thin soils there. In the tropics, the valleys &lt;strong&gt;appear to be more favorable&lt;/strong&gt; because they are less prone to dry out, they have less frost, and they have deeper soils.

There is still no universally agreed-on explanation for why there should be such a dramatic cessation of tree growth at the upper timberline. &lt;strong&gt;Various environmental factors&lt;/strong&gt; may play a role. Too much snow, for example, can smother trees, and avalanches and snow creep can damage and destory them. Late-lying snow reduces the effective growing season to the point where seedlings cannot establish themselves. Wind velocity also increases with altitude and &lt;strong&gt;may cause serious stress&lt;/strong&gt; for trees, as &lt;strong&gt;is made evident by&lt;/strong&gt; the deformed shapes at high altitudes. Some scientists have &lt;strong&gt;proposed&lt;/strong&gt; that the &lt;strong&gt;presence of increasing level&lt;/strong&gt; of ultraviolet light with elevation may play a role, while browsing and grazing animals like the ibex may be another &lt;strong&gt;contributing factor&lt;/strong&gt;. Probably the most important environment factor is temperature, for if the growing season is too short and temperatures are too low, trees shoots and buds cannot mature sufficiently to survive the &lt;strong&gt;winter months&lt;/strong&gt;.

Above the tree line there is a zone that is generally called alpine tundra. Immediately adjacent to the timberline, the tundra &lt;strong&gt;consists of&lt;/strong&gt; a fairly complete cover of low-lying shrubs, herbs, and grasses, while &lt;strong&gt;higher up&lt;/strong&gt; the number and &lt;strong&gt;diversity of species&lt;/strong&gt; decrease until there is much bare ground with occasional mosses and lichens and some prostrate cushion plants. Some plants can even survive in favorable microhabitats above the snow line. The highest plants in the world occur at around 6100 meters on Makalu in the Himalaya. At this great height, rocks, warmed by the sun, melt small snowdrifts.

The most &lt;strong&gt;striking characteristic of the plants&lt;/strong&gt; of the alpine zone is their low growth form. This enables them to avoid the worst rigors of high winds and permit them to &lt;strong&gt;make use of&lt;/strong&gt; the higher temperatures immediately adjacent to the ground surface. In an area where low temperatures &lt;strong&gt;are limiting to&lt;/strong&gt; life, the importance of additional heat near the surface is crucial. The low grouth form can also permit the plants to take advantage of the insulation &lt;strong&gt;provided by&lt;/strong&gt; a winter snow cover. In the equatorial mountains the low growth form is less prevalent.
</description>
        <pubDate>Tue, 17 Apr 2018 00:00:00 +0000</pubDate>
        <link>https://stemgene.github.io/2018/04/17/Vegetations-Timberline-On-Mountains/</link>
        <guid isPermaLink="true">https://stemgene.github.io/2018/04/17/Vegetations-Timberline-On-Mountains/</guid>
        
        <category>TOEFL</category>
        
        <category>TPO</category>
        
        <category>vegetation</category>
        
        <category>botany</category>
        
        
        <category>English</category>
        
      </item>
    
      <item>
        <title>TOEFL Listening Conversation</title>
        <description>content {:toc}

*** TPO 1# With a Librarian

S: I really hope you can help me.&lt;br /&gt;
L: That’s why I am here. What can I do for you?&lt;br /&gt;
S: &lt;strong&gt;I’m supposed to do&lt;/strong&gt; a literature review for my psycology course, but having a hard time finding articles. I don’t even know where to &lt;strong&gt;start looking&lt;/strong&gt;.&lt;br /&gt;
L: You said this is for your psycology course, right? So your focus is on…&lt;br /&gt;
S: &lt;strong&gt;Dream Interpretation&lt;/strong&gt;.&lt;br /&gt;
L: Well, you have a focus, so that’s already a good start. Have you check to see if your professor &lt;strong&gt;put any materials for you to look at on reserve&lt;/strong&gt;? &lt;br /&gt;
S: That’s one thing I did know to do. I just copied an article, but I still need three more on my topic from three different journals.&lt;br /&gt;
L: Let’s get you going on looking for those then. We have printed versions of 20 years old psycolgy journals in the Reference Section. These are the ones published within the last year. Then I think about it… there’s a journal named Sleep and Dream.&lt;br /&gt;
S: Oh, yeah, the article I just copied is from that journal, so I’ve got to look other sources.&lt;br /&gt;
L: OK, actually most of our material are avaliable electronically now. You can access psycology database or electronic journals and articles through the library’s computers, and if you want to search by title with the word “dream” for example, just type it in and all the articles with “dream” in the title will come up on the screen. &lt;br /&gt;
S: Too bad I can’t do this home.&lt;br /&gt;
L: But you can. All of the labrary’s database and electronic resouces can &lt;strong&gt;be accessed&lt;/strong&gt; through any computer connected to the university network.&lt;br /&gt;
S: Really? I can’t believe I didn’t know that. It still sounds like it’s going to take a while though, you know, going through all the information, all of the sources.&lt;br /&gt;
L: May be. But you already &lt;strong&gt;narrow your search down&lt;/strong&gt; to article on dream interpertation, so it should not be too bad. And you probably notice that there is an abstract or summary at the top of first page of the article you copied. When you &lt;strong&gt;go into&lt;/strong&gt; the databases or electronic sources, you have the options to display the abstract on the computer screen, skimming those to decide whether or not you want to read the whole article should cut down some time.&lt;br /&gt;
S: Right, abstacts! They’ll definately &lt;strong&gt;make the project more doable&lt;/strong&gt;. I guess I should try out electronic search while I’m still here then, you know, just in case. &lt;br /&gt;
L: That computer is for you over there. I’ll be here till five this afternoon.
S: Thanks, I feel a lot better about this assignment now.

*** TPO 1# Classroom observation and feedback

P: Hi, Mathew, I’m glad you can come in today. You’ve been observing Mr. Grable’s 3rd grade class for &lt;strong&gt;your approaches to&lt;/strong&gt; education paper, right?&lt;br /&gt;
S: Yes! I go over the Jonhson elementary school, you know, to watch Mr. Grable teach the children in class. &lt;strong&gt;It’s been amazing&lt;/strong&gt;, I mean, I’m just learning so much from watching him. I’m so glad the classroom observations are a requirement for the education program. I mean &lt;strong&gt;it’s like the best thing ever to propare you to be a good teacher&lt;/strong&gt;.&lt;br /&gt;
P: Well I’m glad to see you &lt;strong&gt;feel that way&lt;/strong&gt;, Mathew. You know that’s the goal. So I’ve been reading your observation notes, so I’m quite interested in what’s going on in particular what’s the astronomy unit he’s been teaching.&lt;br /&gt;
S: The astronomy unit?&lt;br /&gt;
P: It seems Mr. G has mastered &lt;strong&gt;interdisciplinary approach&lt;/strong&gt; to teaching, the way we’ve been talking about in class.&lt;br /&gt;
S: So like when he was teaching astronomy, he didn’t just teach them the names of planets, he &lt;strong&gt;use it as a way to&lt;/strong&gt; teach mythology.&lt;br /&gt;
P: Really? So how did he do that?&lt;br /&gt;
S: Well, some of the students could already name the planets, but they didn’t know that the names had any meaning, the stories  behind them. Introducing Greek and Roman mythology as a way of explaining. Like, you know how like Jupiter is the biggest planet, right? And how the Jupiter was named king of the Gods in Roman mythology, right? So since Jupiter, the planet, is the largest planet of our solar system, it’s like the king of the planets, like Jupiter was the king of all the gods.&lt;br /&gt;
P: That’s a great example.&lt;br /&gt;
S: Each student chose a planet, and then did research on it to write a report and make a representation. They went to the library to do the research, and then make presentations about the planet they chose.&lt;br /&gt;
P: So, in one science unit, in which the focus was astronomy, the students also learn about literature of Greek and Roman mathology used researche skills in the library, wrote a report and practicsed their oral presentation skills.&lt;br /&gt;
S: Exactly, he used this one topic to teach 3rd graders all that stuff how to use books in the library to write a reports and even how to speak in public. Plus they had a great time doing it.&lt;br /&gt;
P: You know Mathew, this is just what we’ve been talking about in our class. I’m sure everyone could learn something from your experience. I’d love for you to talk about this astronomy unit in class of Wednesday.&lt;br /&gt;
S: I don’t think I’ll have any time to write my paper &lt;strong&gt;by then&lt;/strong&gt;.&lt;br /&gt;
P: You won’t need to write anything new &lt;strong&gt;just yet&lt;/strong&gt;. For Wednesday, use your class observation notes and explain things we’ve discussed today.&lt;br /&gt;
S: OK, that’s sounds alright.
</description>
        <pubDate>Tue, 17 Apr 2018 00:00:00 +0000</pubDate>
        <link>https://stemgene.github.io/2018/04/17/TOEFL-Listening-Conversation/</link>
        <guid isPermaLink="true">https://stemgene.github.io/2018/04/17/TOEFL-Listening-Conversation/</guid>
        
        <category>TOEFL</category>
        
        <category>listening</category>
        
        <category>conversation</category>
        
        <category>TPO</category>
        
        
        <category>English</category>
        
      </item>
    
      <item>
        <title>Genetically modify crops and Vitamin A</title>
        <description>content {:toc}

Scientists work to Genetically modify crops for various reasons. Sometimes the goal may be to develop a crop that &lt;strong&gt;is resistant to&lt;/strong&gt; disease or pesticides. Another goal is to develop vegetables that have a longer &lt;strong&gt;shelf life&lt;/strong&gt;. Or, the purpose may be to develop a more nutritious form of a food plant. &lt;strong&gt;An explample of the latter&lt;/strong&gt; is golden rice. It was developed by scientists in Europe. They took ordinary rice and &lt;strong&gt;inserted genes&lt;/strong&gt; from the yellow flower called daffodil, as well as from a bacterium. This gave the rice the golden color &lt;strong&gt;from which it gets its name&lt;/strong&gt;. &lt;strong&gt;More to the point&lt;/strong&gt;, however, it added Vitamin A, a nutrient that rice does not normally have.
</description>
        <pubDate>Mon, 16 Apr 2018 00:00:00 +0000</pubDate>
        <link>https://stemgene.github.io/2018/04/16/Genetically-modify-crops-and-Vitamin-A/</link>
        <guid isPermaLink="true">https://stemgene.github.io/2018/04/16/Genetically-modify-crops-and-Vitamin-A/</guid>
        
        <category>genetically-modify</category>
        
        <category>Vitamin-A</category>
        
        
        <category>English</category>
        
      </item>
    
      <item>
        <title>How machines Learn</title>
        <description>content {:toc}

On the internet, the algorithms are all around you. You are watching this video because an algorithm brought to you to click which you did, and the algorithm took note. When you open a tweetbook, the algorithm decides what you see. When you search though your photos, the algorithm dose the finding, maybe even makes a little movie for you. When you buy something, the algorithm sets the price and the algorithm is at your bank watching transactions for fraud. The stock market is full of algorithms tradeing with algorithms.

&lt;strong&gt;Given this&lt;/strong&gt;, you might want to know how these little algorithmic bots shaping your world work, especially when they don’t.

In the olden days, humans build algorithmic bots by giving them instructions the humans could explain.”If this, then that.” But many problems are just too big and hard for a human to write simple instructions for. There’s a gazilion transactions a second, which ones are fraudulent? There’s octillion videos on NetMeTube. Which eight should be user see as recommandations? Which shouldn’t be allowed on the site at all? For this airline seat, what’s the maxmium price this user will pay right now? Algorithmic bots give answers to these questions. Not perfect answers, but much better than humans could do. But how these bots work exactly, more and more, no one knows, not even the human who built them, or “built them”.

As we will see… Now companines that use these bots don’t want to talk about how they work, because the bots are valuable employees, very valuable. And how their brains are built is fiercely guarded trade secret. Right now the cutting edge is most likely very (I hope you like linear algebra) but what the current hotness is on any paricular site, and how the bots work, is a bit “I dunno” and always will be. So let’s talk about one of the quaint but understandable ways bots can be built, without understanding how their brains work.

Say you want a bot that can recognize what is in a picture, is it a bee, or is it a three? It’s easy for humans (even little humans), but it’s impossible to just tell a bot in bot language how to do it, because really we just know that’s a bee and that’s a three. We can say in words &lt;strong&gt;what makes them different&lt;/strong&gt;, but bots don’t understand words. And it’s the wiring in our brains that makes it happen anyway. While the individual neuron may be understood, and clusters of neurons’ general purpose vaguely grasped the whole is beyond. Nonetheless, it works.

So to get a bot that can do this sorting，you don’t built it yourself. You build a bot that builds bots, and a bot that teaches bots. These bots’ brains are simpler, something a smart programmer can make. The builder bot builds bots, though it’s not very good at it. At first it connects wires and mudules in the bot brains almost at random. This leads to some very special student bots sent to teacher bot to teach. Of course, teacher bot can’t tell a bee from a three either.

If the human could build teacher bot to do that, well, then, problem solved. Instead the human gives teacher bot a bunch of “bee” photos and “three” photos, and an answer key to which is what teacher bot can’t teach, but teacher bot can TEST. The adorable student bots stick out their tongues, very hard, but they are bad at what they do, very bad. But it’s not their fault, really, they were built that way. Grades in hand, the student bots take a march of shame back to builder bot, those that did best are put to one side, the others recycled. Builder bot still isn’t good at build bots, but now it takes those left and makes copies of changes in new combinations. Back to school they go. Teacher bot teaches and test again, and builder bot builds again, and again.

Now a builder that builds at random, and a teacher that doesn’t teach, just test, and students who can’t learn, they just are what they are, in theory shouldn’t work, but in practice, it does. &lt;strong&gt;Partly because&lt;/strong&gt; in every iteration, builder bots’ slaughterhouse keeps the best and discards the rest, and partly because teacher bot isn’t overseeing an old-timely, one-room schoolhouse with a dozen students but an infinite warehouse with thousands of students. The test isn’t ten questions, but a million questions. And how many times does the test-build-test loop repeat? As many as necessary. At first students that survive are just lucky, but by combining enough lucky bots, and keeping only what works, and randomly messing around with new copies of that. Eventually a student bot emerges that isn’t lucky, that can perhaps barely tell bees from threes. As this bot is copied and changed, slowly the average test score rises, and thus the grade needed to survive the next round gets higher and higher. Keep this up and eventually from the infinite warehouse. A student bot will emerge, who can tell a bee from a three in a photo it’s never seen before pretty well. But how the student bot does this, neither the teacher bot nor the builder bot, nor the human overseer, can understand, nor the student bot itself.

After keeping so many useful random changes, the wiring in its head is incredibly comlicated, and while an individual line of code may be understood, and clusters of code’s general purpose vaguely grasped the whole is beyond. But this is furstrating, especially as the student bot is very good at exactly only the kinds of questions it’s been taught to. It’s great with photos, but useless with videos or baffied if the photos are upside down, or things that are obviously not bees, it’s confident are. Since teacher bot can’t teach. All human overseer can do is give it more questions, to make the test even longer, to include the kinds of questions the best bots get wrong. This is improtant to understand. It’s a reason why companies are obsessed with collecting data. More data equals longer tests and better bots. So when you get the “Are you human?” test on a website, you are not only proving that you are human, but you are helping to build the test to make bots that can read or count, or tell lakes from mountains, or horses from humans. Seeing lots of questions about driving lately? What could that be building a test for? Now figuring out what’s in a photo, or on a sign, or filtering videos requires human to make correct enough tests.

But there is another kind of test that makes itself, test on the humans. For example, say entirely hypothetical NetMeTube wanted users to keep watching as long as possible? Well, how long a user stays on the site is easy to measure. So, teacher bot gives each student bot a bunch of NetMeTube users to oversee, the student bots watch their user watches, looks at their files, and do their best to pick the videos that keep the user on the site. The longer the average, the higher their test score. Build, test, repeat. A million cycles later, there’s a student bot who’s pretty good at keeping the users wathchiing, at least compared to what a human could build. But when people ask:” How does the NetMeTube algorithm select videos?” Once again, there isn’t a great answer other than pointing to the bot and the user data it had access to.

And &lt;strong&gt;most vitally&lt;/strong&gt;, how the human overseers direct teacher bot to score the test. That’s what the bot is trying to be good at to survive. But what the bot is thinking, or how it thinks it, is not really knowable. All that’s knowledge is this student bot gets to be the algorithm, because it’s point one percent better than the previous bot at the test the humans designed.

So everywhere on the internet, behind the scenes, there are tests to increase user interaction or set prices just right to maximize revenue, or pick the posts from all your friends you’ll like the most, or articles people will share the most, or whatever. If it’s testable, it’s teachable, well, teachable.

A student bot will graduate from the warehouse to be the algorithm of its domain, at least, for a little while. We’re used to the idea that the tools we use, even if we don’t understand them, but with our machines that learn we are increasingly in a position where we use tools, or are used by tools, that no one, not even their creators, understand. We can only hope to guide them with the tests we make, and we need to get comfortable with that, as our algorithmic bot buddies are all around, and not going anywhere.

OK. The bots are watching. 
https://www.youtube.com/watch?v=R9OHn5ZF4Uo
</description>
        <pubDate>Sun, 25 Feb 2018 00:00:00 +0000</pubDate>
        <link>https://stemgene.github.io/2018/02/25/How-Machines-Learn/</link>
        <guid isPermaLink="true">https://stemgene.github.io/2018/02/25/How-Machines-Learn/</guid>
        
        <category>machine-learning</category>
        
        <category>english</category>
        
        <category>algorithm</category>
        
        
        <category>English-Language</category>
        
      </item>
    
      <item>
        <title>The Biosphere and Nutrient Cycles</title>
        <description>content {:toc}

The biosphere is the life-supporting area of Earth’s surface, extending a few miles into the atmosphere to deep under the ocean. The biosphere is a global ecosystem &lt;strong&gt;composed of&lt;/strong&gt; living creatures and nonliving matter. Living creatures harness energy and food from nonliving matter.

Matter cycles through the biosphere, helped along by solar energy. As different elements come together, they combine to form building blocks of life and fuel for living creatures.

&lt;h3 id=&quot;what-are-nutrient-cycles&quot;&gt;What are Nutrient Cycles?&lt;/h3&gt;

All cells are &lt;strong&gt;made up primarily of&lt;/strong&gt; six elements: hydrogen, oxygen, carbon, nitrogen, phosphorus, and sulfur. These elements occur in similar fractions in all living things. While the &lt;strong&gt;first four&lt;/strong&gt; are the most significant, &lt;strong&gt;additional&lt;/strong&gt; elements are also important. Calcium creates structures such as shell, skeletons and cell walls, while chlorophll allows plants to convert solar energy into chemical energy.

Certain elements are found in higher concentrations in living creatures than in the surrounding enviroment because animals and plants capture these elements to combine them in various ways. Elements move from being part of living matter to non-living materials as they cycle through the biosphere. The biosphere is composed of three parts: the atmosphere, &lt;strong&gt;made up of&lt;/strong&gt; gases; the lithosphere, made up of soil and the curst; and the hyfrosphere, including lakes, rivers and oceans.

Some elements are bound up in rocks, unavailable to living creatures. Weathering and erosion eventually release these elements. For most major materials, however, living organisms not only use them, they also help move these elements through the biosphere.

Matter moves through the biosphere differently than energy. Energy cannot be reused, but elements can be recycled. For example, carbon released into atmosphere could stay there for five years before being taken up by an animal, or it could be uesd immediately by a nearby plant for photosynthesis.

&lt;h3 id=&quot;carbon-cycle&quot;&gt;Carbon Cycle&lt;/h3&gt;

&lt;img src=&quot;https://upload.wikimedia.org/wikipedia/commons/thumb/d/d5/Carbon_cycle.jpg/460px-Carbon_cycle.jpg&quot; alt=&quot;Carbon Cycle&quot; /&gt;

The carbon cycle moves carbon throughout the biosphere. The carbon in living matter comes from carbon dioxide(CO2) in the air or dissolved in water. Plants use carbon dioxide during photosynthesis, whild animals release carbon dioxide when they breathe out. Bacteria and fungi release carbon dioxide when they consume dead animals and plants.

Carbon sometimes stays in dead animals and plants inside the Earth’s crust. This carbon becomes fossil fuels, such as oil, coal or gas. Humans now use fossil fuels in industry and agriculture, releasing vast amount of CO2.

&lt;h3 id=&quot;nitrogen-cycle&quot;&gt;Nitrogen Cycle&lt;/h3&gt;

&lt;img src=&quot;https://media1.britannica.com/eb-media/37/6537-004-FC183C31.gif&quot; alt=&quot;Nitrogen Cycle&quot; /&gt;

Like carbon, nitrogen also moves through the biosphere, but unlike carbon, most nitrogen occurs in the atmosphere as a gas (N2). However, plants cannot use this form of nitrogen. Nitrogen is pulled from the atmosphere by bacteria, who change it into a form plants can use.

Certain bacteria live near the roots of plants and fungi. The plants offer a shelter for bacteria, and the bacteria draw nitrogen into the soil, making it possible for plants to absorb nitrogen. When bacteria live with fungi, they form a new species called lichen.

After absorbing nitrogen, plants change it into combinations they can use, such as amino acids and proteins. Animals obtain nitrogen by eating plants or other animals. When animals die, microbes take apart dead animals and put nitrogen back into the soil.

Some nitrogen is returned back to the atmosphere by bacteria. Nitrogen is also lost from an ecosystem through erosion, runoff, and leaching from the soil into lakes and streams.

&lt;h3 id=&quot;the-phophorus-cycle&quot;&gt;The Phophorus Cycle&lt;/h3&gt;

Other major elements, such as phosphorus, iron and calcium, enter the soil through the weathering benrock. Phosphorus most often limits plants growth.

&lt;img src=&quot;https://media1.britannica.com/eb-media/77/126077-004-80798D78.jpg&quot; alt=&quot;Phosphorus Cycle&quot; /&gt;

Phosphorus moves from land to rivers to the sea before settling at the bottom of the ocean. Phosphorus cycles between the ocean surface and the ocean floor: near the surface, plankton takes up phosphorus and then passes through the food chain. Eventually, phosphorus returns to the ocean floor when living creatures die and fall to the bottom. The ocean floor contains the largest reservoir of phosphorus in the biosphere.

On land, phosphorus moves between living creatures and soil in the form of phosphate. Bacteria in the soil breaks down living matter, releasing phosphate, which is absorbed by plants and releasd again when they die. Soils differ in the amount of phosphorus they contain. In soils without much phosphorus, almost all of it is found in living creatures. In some tropical forests, living creatures contain so much phosphorus that clearing the forests gets rid of this elements. Without phosphorus, plants and crops cannot grow.

Adding phosphorus to soils has affected many natural spaces. Runoff from farms or sweage adds phosphorus to rivers and lakes. The extra phosphorus make plants grow explosively, sometimes creating a mat of plants that extends over the surface of the water. More plants decrease the oxygen available, suffocating fish and other animals.

&lt;h3 id=&quot;why-are-nutrient-cycles-important&quot;&gt;Why Are Nutrient Cycles Important?&lt;/h3&gt;

Understanding how the biosphere works is very important. When human population levels were low and technology simple, the effect on the biosphere was relatively small. Increasing human population levels and harvesting of Earth’s natural resources has transformed this situation, especially in &lt;strong&gt;recent decades&lt;/strong&gt;. Human activities are causing major changes in the biosphere. These changes are removing species that have not even been described but which might have been of central importance to natural areas.

&lt;em&gt;This article was originally published by Encyclopaedia Britannica and Newsela.&lt;/em&gt;
</description>
        <pubDate>Mon, 19 Feb 2018 00:00:00 +0000</pubDate>
        <link>https://stemgene.github.io/2018/02/19/The-Biosphere-and-Nutrient-Cycles/</link>
        <guid isPermaLink="true">https://stemgene.github.io/2018/02/19/The-Biosphere-and-Nutrient-Cycles/</guid>
        
        
        <category>English</category>
        
      </item>
    
      <item>
        <title>I Love Foreign Language</title>
        <description>&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;汉语&lt;/th&gt;
      &lt;th&gt;English&lt;/th&gt;
      &lt;th&gt;Portuguese&lt;/th&gt;
      &lt;th&gt;Arabic&lt;/th&gt;
      &lt;th&gt;Hindi&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;早上好&lt;/td&gt;
      &lt;td&gt;Good morning&lt;/td&gt;
      &lt;td&gt;bom Dia&lt;/td&gt;
      &lt;td&gt; &lt;/td&gt;
      &lt;td&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;你好&lt;/td&gt;
      &lt;td&gt;Hello&lt;/td&gt;
      &lt;td&gt; &lt;/td&gt;
      &lt;td&gt;,sala’malaico&lt;/td&gt;
      &lt;td&gt;Namasdai&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;再见&lt;/td&gt;
      &lt;td&gt;Good Bye&lt;/td&gt;
      &lt;td&gt;tchau&lt;/td&gt;
      &lt;td&gt;,Huda’hafize(Bye,God bless you)&lt;/td&gt;
      &lt;td&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;1&lt;/td&gt;
      &lt;td&gt;One&lt;/td&gt;
      &lt;td&gt; &lt;/td&gt;
      &lt;td&gt;Wahid&lt;/td&gt;
      &lt;td&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;2&lt;/td&gt;
      &lt;td&gt;Two&lt;/td&gt;
      &lt;td&gt; &lt;/td&gt;
      &lt;td&gt;athnan&lt;/td&gt;
      &lt;td&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;3&lt;/td&gt;
      &lt;td&gt;Three&lt;/td&gt;
      &lt;td&gt; &lt;/td&gt;
      &lt;td&gt;thlatha&lt;/td&gt;
      &lt;td&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;4&lt;/td&gt;
      &lt;td&gt;Four&lt;/td&gt;
      &lt;td&gt; &lt;/td&gt;
      &lt;td&gt;arbaa&lt;/td&gt;
      &lt;td&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;5&lt;/td&gt;
      &lt;td&gt;Five&lt;/td&gt;
      &lt;td&gt; &lt;/td&gt;
      &lt;td&gt;hamsdo&lt;/td&gt;
      &lt;td&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;6&lt;/td&gt;
      &lt;td&gt;Six&lt;/td&gt;
      &lt;td&gt; &lt;/td&gt;
      &lt;td&gt;sta&lt;/td&gt;
      &lt;td&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;7&lt;/td&gt;
      &lt;td&gt;Seven&lt;/td&gt;
      &lt;td&gt; &lt;/td&gt;
      &lt;td&gt;saba&lt;/td&gt;
      &lt;td&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;8&lt;/td&gt;
      &lt;td&gt;Eight&lt;/td&gt;
      &lt;td&gt; &lt;/td&gt;
      &lt;td&gt;thamia&lt;/td&gt;
      &lt;td&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;9&lt;/td&gt;
      &lt;td&gt;Nine&lt;/td&gt;
      &lt;td&gt; &lt;/td&gt;
      &lt;td&gt;tsah&lt;/td&gt;
      &lt;td&gt; &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;10&lt;/td&gt;
      &lt;td&gt;Ten&lt;/td&gt;
      &lt;td&gt; &lt;/td&gt;
      &lt;td&gt;asra&lt;/td&gt;
      &lt;td&gt; &lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
</description>
        <pubDate>Wed, 14 Feb 2018 00:00:00 +0000</pubDate>
        <link>https://stemgene.github.io/2018/02/14/I-Love-Foreign-Language/</link>
        <guid isPermaLink="true">https://stemgene.github.io/2018/02/14/I-Love-Foreign-Language/</guid>
        
        <category>English-Language</category>
        
        
        <category>English-Language</category>
        
      </item>
    
      <item>
        <title>Last Day On Earth增设中国春节主题版本</title>
        <description>最近玩了一阵Last Day On Earth，是一款末日生存类的游戏。

游戏创作者是俄罗斯人，但为了吸引国内玩家，不仅增设了中文版，更特意先后更新了两个中国元素的版本，第一个是在世界地图内放置了木兰村，为木兰解决完几个问题后可以获得关公刀！当然由于耐久性的原因我是舍不得用了。

今天更新了一个中国春节为主题的版本，一位中国大爷要求玩家帮忙置办年货。需要的物品有原木、纸灯笼和蒸鱼。原木当然随处可得，带15个过来把5处篝火点燃，就可以驱赶可爱的年兽。另两个物品纸灯笼和蒸鱼在野外箱子里可以捡到。如果能碰到鞭炮区域的事件点，可以捡起入口处的几盏火把，把僵尸引到鞭炮处，再用火把引燃鞭炮，就可以让鞭炮炸死周围的僵尸。

收集完6盏灯笼和6盘蒸鱼，回去找老大爷交任务，会获得带着两个翎子的武士头盔，不过游戏美工并没有把我们的英雄头盔设计的高大威猛，戴上之后的感觉像是多了两条辫子……
</description>
        <pubDate>Sun, 11 Feb 2018 00:00:00 +0000</pubDate>
        <link>https://stemgene.github.io/2018/02/11/Last-Day-On-Earth/</link>
        <guid isPermaLink="true">https://stemgene.github.io/2018/02/11/Last-Day-On-Earth/</guid>
        
        <category>Last-Day-On-Earth</category>
        
        <category>春节</category>
        
        <category>蒸鱼</category>
        
        <category>灯笼</category>
        
        <category>鞭炮</category>
        
        <category>中文</category>
        
        <category>木兰</category>
        
        <category>关公刀</category>
        
        
        <category>游戏</category>
        
      </item>
    
      <item>
        <title>用Pelican在GitHub Pages上创建博客</title>
        <description>&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#一准备工作&quot; id=&quot;markdown-toc-一准备工作&quot;&gt;一、准备工作&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#二安装pelican&quot; id=&quot;markdown-toc-二安装pelican&quot;&gt;二、安装Pelican&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#三安装插件&quot; id=&quot;markdown-toc-三安装插件&quot;&gt;三、安装插件&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#四撰写博客&quot; id=&quot;markdown-toc-四撰写博客&quot;&gt;四、撰写博客&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#五生成html&quot; id=&quot;markdown-toc-五生成html&quot;&gt;五、生成HTML&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#六创建github-pages&quot; id=&quot;markdown-toc-六创建github-pages&quot;&gt;六、创建GitHub Pages&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#七提交你的文件&quot; id=&quot;markdown-toc-七提交你的文件&quot;&gt;七、提交你的文件&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#八部署到github&quot; id=&quot;markdown-toc-八部署到github&quot;&gt;八、部署到GitHub&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

用了这个blog几天之后，发现Jekyll很难用Jupyter Notebook的文件来生成post，而且也想增加标签和目录等插件。于是想创建一个以Pelican为基础的GitHub网站，以便导入ipynb格式的文档。花了一天的时间研读了&lt;a href=&quot;http://blog.csdn.net/kzelc2tgrp/article/details/57078397&quot;&gt;这篇介绍&lt;/a&gt;，写的很详细，虽然在操作过程中有一些出入，但通过一点点排查，最后全部跑通了。但并没有生成网页，姑且不管最后的情况，先把过程记录下来，尤其是自己排查解决问题的过程，尤其重要，供以后参考。

Pelican是用Python写的一个静态网站生成器，它能够将Jupyter notebook文件转换成HTML博客文章。Pelican也十分容易部署到GitHub Pages, 其他人可以在那里阅读我们的文章。

&lt;h2 id=&quot;一准备工作&quot;&gt;一、准备工作&lt;/h2&gt;

创建一个文件夹 – 我们将把博客内容和风格文件放到这个文件夹中。在本篇教程里，我们取名为jupyter-blog。除特殊说明，以下操作都是在&lt;jupyter-blog&gt;文件夹内进行。&lt;/jupyter-blog&gt;

&lt;ol&gt;
  &lt;li&gt;
    创建一个叫做.gitignore的文件，并添加入这个文件的内容。最终我们将会把文件提交到Git, .gitignore将会排除指定类型的文件。&lt;strong&gt;（不知道什么用）&lt;/strong&gt;
  &lt;/li&gt;
  &lt;li&gt;
    在jupyter-blog中创建一个叫做requirements.txt的文件并写入以下内容：
  &lt;/li&gt;
&lt;/ol&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Markdown==2.6.6
pelican==3.6.3
jupyter&amp;gt;=1.0
ipython&amp;gt;=4.0
nbconvert&amp;gt;=4.0
beautifulsoup4
ghp-import==0.4.1
matplotlib==1.5.1
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
在jupyter-blog下执行

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;pip install -r requirements.txt
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

安装requirements.txt中的所有包。&lt;strong&gt;也可以逐个安装&lt;/strong&gt;

&lt;h2 id=&quot;二安装pelican&quot;&gt;二、安装Pelican&lt;/h2&gt;

执行pelican-quickstart将会开始一个交互式的博客安装过程。你将会看到有一系列的问题来使得博客安装妥当。

对于大多数问题，直接点击Enter接受默认值即可，需要自定义的地方有the title of the website（网站标题）, the author of the website（作者）,n for the URL prefix（URL前缀选择n）, and the timezone（时间区）。下面是一个示例（以下内容以后都可在pelicanconf.py中再次修改）：

&lt;pre&gt;&lt;code class=&quot;language-linux&quot;&gt;# xuliucheng @ xlcdemac in ~/pelican-blog [14:39:44] 
$ pelican-quickstart
Welcome to pelican-quickstart v3.6.3.

This script will help you create a new Pelican-based website.

Please answer the following questions so this script can generate the files
needed by Pelican.


&amp;gt; Where do you want to create your new web site? [.] 
&amp;gt; What will be the title of this web site? LiuchengXu's Blog
&amp;gt; Who will be the author of this web site? LiuchengXu
&amp;gt; What will be the default language of this web site? [en] 
&amp;gt; Do you want to specify a URL prefix? e.g., http://example.com   (Y/n) n
&amp;gt; Do you want to enable article pagination? (Y/n) 
&amp;gt; How many articles per page do you want? [10] 
&amp;gt; What is your time zone? [Europe/Paris] 
&amp;gt; Do you want to generate a Fabfile/Makefile to automate generation and publishing? (Y/n) 
&amp;gt; Do you want an auto-reload &amp;amp; simpleHTTP script to assist with theme and site development? (Y/n) 
&amp;gt; Do you want to upload your website using FTP? (y/N) 
&amp;gt; Do you want to upload your website using SSH? (y/N) 
&amp;gt; Do you want to upload your website using Dropbox? (y/N) 
&amp;gt; Do you want to upload your website using S3? (y/N) 
&amp;gt; Do you want to upload your website using Rackspace Cloud Files? (y/N) 
&amp;gt; Do you want to upload your website using GitHub Pages? (y/N) y
&amp;gt; Is this your personal page (username.github.io)? (y/N) y
Done. Your new project is available at /Users/xuliucheng/pelican-blog

# xuliucheng @ xlcdemac in ~/pelican-blog [14:43:04] 
$ ls
Makefile  content  develop_server.sh  fabfile.py  output  pelicanconf.py  publishconf.py  requirements.txt
&lt;/code&gt;&lt;/pre&gt;

运行完pelican-quickstart后，你会发现在jupyter-blog目录下多了两个文件夹：content 和 output， 还有几个文件。比如pelicanconf.py和publishconf.py，下面是应当出现的几个文件：

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;jupyter-blog
├── Makefile
├── content
├── develop_server.sh
├── fabfile.py
├── output
├── pelicanconf.py
├── publishconf.py
└── requirements.txt

2 directories, 6 files
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;三安装插件&quot;&gt;三、安装插件&lt;/h2&gt;

Pelican默认情况下并不支持使用jupyter写博客 – 我们需要安装&lt;a href=&quot;https://github.com/danielfrg/pelican-ipynb&quot;&gt;插件&lt;/a&gt;来进行支持。我们将把插件以&lt;a href=&quot;https://git-scm.com/docs/git-submodule&quot;&gt;git submodule&lt;/a&gt;的方式进行安装以便于管理。

&lt;ol&gt;
  &lt;li&gt;
    执行git init将当前文件夹初始化为一个git仓库。
  &lt;/li&gt;
  &lt;li&gt;
    创建plugins文件夹。在创建的时候，可以‘新建文件夹’，也可以在terminal里输入

    makdir 文件夹名
  &lt;/li&gt;
  &lt;li&gt;
    执行git submodule add git://github.com/danielfrg/pelican-ipynb.git plugins/ipynb来添加插件。
  &lt;/li&gt;
&lt;/ol&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;# xuliucheng @ xlcdemac in ~/pelican-blog [14:45:19] 
$ git init
Initialized empty Git repository in /Users/xuliucheng/pelican-blog/.git/

# xuliucheng @ xlcdemac in ~/pelican-blog on git:master x [14:52:21] 
$ mkdir plugins

# xuliucheng @ xlcdemac in ~/pelican-blog on git:master x [14:52:37] 
$ cd plugins 

# xuliucheng @ xlcdemac in ~/pelican-blog/plugins on git:master x [14:52:48] 
$ git submodule add git://github.com/danielfrg/pelican-ipynb.git plugins/ipynb
Cloning into '/Users/xuliucheng/pelican-blog/plugins/plugins/ipynb'...
remote: Counting objects: 387, done.
remote: Total 387 (delta 0), reused 0 (delta 0), pack-reused 387
Receiving objects: 100% (387/387), 299.26 KiB | 93.00 KiB/s, done.
Resolving deltas: 100% (190/190), done.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

现在你应该有一个.gitmodules文件和一个plugins文件夹:

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;jupyter-blog
├── Makefile
├── content
├── develop_server.sh
├── fabfile.py
├── output
├── pelicanconf.py
├── plugins
├── publishconf.py
└── requirements.txt

3 directories, 6 files
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

为了启动插件，我们需要修改pelicanconf.py并将以下内容添加到尾部：

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;MARKUP = ('md', 'ipynb')

PLUGIN_PATHS = [ './plugins' ]  # 如果像原文直接PLUGIN_PATH = `./plugins`而不使用列表会报warning
PLUGINS = ['ipynb.markup']
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

这几行代码是告诉pelican在生成HTML时激活插件。

&lt;h2 id=&quot;四撰写博客&quot;&gt;四、撰写博客&lt;/h2&gt;

插件安装完毕后，我们可以来创建第一篇文章：

&lt;ol&gt;
  &lt;li&gt;
    新建一个jupyter notebook并写入一些内容。
  &lt;/li&gt;
  &lt;li&gt;
    将notebook文件复制到content文件夹。
  &lt;/li&gt;
  &lt;li&gt;
    创建一个跟notebook同名的一个文件，不过扩展名为`.ipynb-meta’。将下面的内容添加到ipynb-meta文件中，请注意修改部分条目以适应你自己的博客。
  &lt;/li&gt;
&lt;/ol&gt;

&lt;pre&gt;&lt;code class=&quot;language-Python&quot;&gt;Title: First Post      
Slug: first-post   #服务器上这篇文章的访问路径。如果slug是first-post, 你的服务器是jupyter-blog.com， 那么你可以通过http://jupyter-blog.com/first-post来进行访问。
Date: 2016-06-08 20:00  
Category: posts  #文章所属目录，可以为空。
Tags: python firsts  #以逗号分割的标签列表，可以为空。
Author: Vik Paruchuri
Summary: My first post, read it to find out.
&lt;/code&gt;&lt;/pre&gt;

&lt;h2 id=&quot;五生成html&quot;&gt;五、生成HTML&lt;/h2&gt;

为了生成博文的HTML，我们需要运行pelican将notebook转换成HTML，然后运行本地服务器就能够看到效果了：

&lt;ol&gt;
  &lt;li&gt;
    运行pelican content生成HTML
  &lt;/li&gt;
  &lt;li&gt;
    切换到output文件夹
  &lt;/li&gt;
  &lt;li&gt;
    运行python -m pelican.server
  &lt;/li&gt;
  &lt;li&gt;
    打开浏览器访问localhost:8000进行预览
  &lt;/li&gt;
&lt;/ol&gt;

你应该能够看到所生成的博客效果。

&lt;h2 id=&quot;六创建github-pages&quot;&gt;六、创建GitHub Pages&lt;/h2&gt;

&lt;ol&gt;
  &lt;li&gt;
    创建一个GitHub仓库，名称为username.github.io, username是你的GitHub名称。&lt;a href=&quot;https://help.github.com/articles/create-a-repo/&quot;&gt;这里&lt;/a&gt;可以查看更多细节。
  &lt;/li&gt;
  &lt;li&gt;
    运行git remote add origin git@github.com:username/username.github.io.git来为你的本地GitHub仓库添加一个远程仓库（remote）。注意将username替换为你的GitHub用户名。
  &lt;/li&gt;
&lt;/ol&gt;

在此时，操作中引入许多git的命令，因为对git的理解不透彻，且不能显性化的看到状态，所以变得越来越难，一旦与结果不一样，需要仔细排除问题。上面介绍的是blog的SSH地址，后续在git push时需要申请一个ssh的key。另外最好使用GitHub中Repository给出的地址。

GitHub Page将会显示推送到仓库username.github.io的所有HTML文件，并可通过username.github.io进行访问。（&lt;strong&gt;此时反映的页面仍是404&lt;/strong&gt;）

&lt;ol&gt;
  &lt;li&gt;修改pelican以便于它能够指向正确的地址：&lt;/li&gt;
&lt;/ol&gt;

修改pelicanconf.py和publishconf.py中的SITEURL, 将它设置为https://username.github.io， username是你的GitHub用户名。

&lt;ol&gt;
  &lt;li&gt;运行pelican content -s publishconf.py。当你想要在本地进行预览时，运行pelican content. 在部署之前，运行pelican content -s publishconf.py，这会使用正确的部署设置文件。&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;七提交你的文件&quot;&gt;七、提交你的文件&lt;/h2&gt;

如果你想要GitHub pages这个仓库保存实际的notebook和一些其他文件，你可以使用git分支。本节会用到许多git命令，可以参考&lt;a href=&quot;http://www.ruanyifeng.com/blog/2015/12/git-cheat-sheet.html&quot;&gt;常用Git命令清单&lt;/a&gt;、&lt;a href=&quot;https://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000&quot;&gt;廖雪峰官网&lt;/a&gt;、&lt;a href=&quot;http://www.ruanyifeng.com/blog/2014/06/git_remote.html&quot;&gt;Git远程操作详解&lt;/a&gt;、&lt;a href=&quot;https://git-scm.com/book/zh/v1/Git-%E5%B7%A5%E5%85%B7-%E5%AD%90%E6%A8%A1%E5%9D%97&quot;&gt;Git工具-子模块&lt;/a&gt;和&lt;a href=&quot;https://www.cnblogs.com/mengdd/p/3447464.html&quot;&gt;在GitHub上管理项目&lt;/a&gt;

&lt;ol&gt;
  &lt;li&gt;运行git checkout dev切换到一个叫做dev的分支。我们不能使用master分支来保存notebook, 因为这个分支为GitHub pages所用。&lt;/li&gt;
&lt;/ol&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;# 列出所有本地分支
$ git branch
# 新建一个分支，并切换到该分支
$ git checkout -b dev
# 切换到指定分支
$ git checkout dev
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ol&gt;
  &lt;li&gt;像往常一样提交并推送到GitHub（使用git add, git commit, git push）。&lt;/li&gt;
&lt;/ol&gt;

首先来熟悉一下git的结构与基本操作
&lt;img src=&quot;https://camo.githubusercontent.com/6d599db858665e9813a8103f356678c8c5e4e3e4/687474703a2f2f6934332e74696e797069632e636f6d2f32726d773769782e706e67&quot; alt=&quot;git pull and push&quot; /&gt;
&lt;img src=&quot;http://www.ruanyifeng.com/blogimg/asset/2014/bg2014061202.jpg&quot; alt=&quot;git pull and push2&quot; /&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;# 添加当前目录的所有文件到暂存区
$ git add .
# 提交工作区自上次commit之后的变化，直接到仓库区
$ git commit -a
# 上传本地指定分支到远程仓库
$ git push [remote] [branch]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
接下来问题来了，git不允许dev推送repository，返回错误信息：
&lt;blockquote&gt;
  fatal: Could not read from remote repository.Please make sure you have the caccess rights and the repository exists.
&lt;/blockquote&gt;

原来正是上述在初始化remote时，采用的是SSH地址，现在需要SSH的KEY。&lt;a href=&quot;http://blog.csdn.net/u014343528/article/details/48787221&quot;&gt;解决方案&lt;/a&gt;

之后就可以正常操作了。在完成操作后，可以查看日志等

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;git log
git log --graph --pretty=oneline --abbrev-commit
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;八部署到github&quot;&gt;八、部署到GitHub&lt;/h2&gt;

我们需要将博客内容推送到GitHub pages的master分支来使之正常工作。现在，HTML内容已经在output文件夹中，不过我们需要它是仓库的根目录，而不是一个子目录。

&lt;ol&gt;
  &lt;li&gt;
    我们可以用ghp-import：运行ghp-import output -b master将output中的所有内容导入到master分支。
  &lt;/li&gt;
  &lt;li&gt;
    运行git push origin master将内容推送到GitHub。这一步中，出现了好多问题，主要还是出在了对于master和dev等工作流状态分不清。首先说我
    &lt;blockquote&gt;
      The current branch master has no upstream branch.
    &lt;/blockquote&gt;
  &lt;/li&gt;
&lt;/ol&gt;

应该是master这个branch没有和remote端进行关联，于是使用系统提示的：&lt;br /&gt;
    git branch –set-upstream-to=origin/&lt;branch&gt; master&lt;/branch&gt;

再一次push，又有了新的错误：
&lt;blockquote&gt;
  Updates were rejected because the tip of your current branch is behind its remote counterpart.
&lt;/blockquote&gt;

查了半天资料，应该是因为master和dev分别改动，不知道以哪个为准了（有个名词叫fast-forward），所以无法Push。尝试了merge，pull等操作之后，实在克服不了，于是就强制性的push了一下：&lt;br /&gt;
    git push -u origin master -f

于是终于成功了，在GitHub上查看无论是master还是dev都是相同的内容，只不过由于force之后，建站最初master下的readme文件被删除了。

因为GitHub Pages只认username/username.github.io作为主页，其他的可以在主页下生成project页面。

</description>
        <pubDate>Fri, 02 Feb 2018 00:00:00 +0000</pubDate>
        <link>https://stemgene.github.io/2018/02/02/Make-a-website-using-pelican/</link>
        <guid isPermaLink="true">https://stemgene.github.io/2018/02/02/Make-a-website-using-pelican/</guid>
        
        <category>GitHub-Pages</category>
        
        <category>Pelican</category>
        
        <category>Blog</category>
        
        <category>Git</category>
        
        <category>同步</category>
        
        
        <category>GitHub</category>
        
      </item>
    
  </channel>
</rss>
