Citizen Science wk 4 readings

Synthetic Biology: Applications, Benefits, and Risks

  • renewable energy: biofuels are derived from biomass from plants, animals, and organic waste
    • methods of harvesting energy: burning, chemical treatment, biodegradation
    • ethanol is the most common (corn or sugar cane); biodiesel is made from vegetable oils, animal fats, or recycled restaurant grease
      • ethanol includes inefficiencies and energy costs for production, concern about volume of plant sources and possible collateral impact on food prices
      • biodiesel involves significant energy costs
    • potential benefits of biofuels produced through synthetic biology: possible reduction in global depends on fossil fuel, cuts in emissions, minimization of economic and political volatility surrounding fossil fuel reserves
      • synthetic biology aims to improve the speed and efficiency of converting biomass into advanced biofuels that are cleaner and more energy-efficient
      • synthetic biology also offers new biomass sources, or feedstocks, that are more efficient, reliable, low-cost, and scalable
      • large global reserves of hydrocarbons might be leveraged
    • butanol: a bioalcohol made by synthetic biology that is more promising that ethanol
    • photosynthetic algae engineered to secrete bio-oil continuously
      • biodegradable and harmless if spilled
      • less polluting and more efficient
      • consumes carbon dioxide
    • hydrogen fuel
  • health applications
    • research and development on this is still early
    • medicines
      • metabolic engineering: an organism’s metabolic pathways are redesigned to produce novel products or augment the production of current products (ie drugs)
      • can engineer molecules and cells that express proteins or pathways responsible for human disease
      • arteminsinin: antimalarial drug produced from genetically engineered e.coli that produces a high volume precursor that can be chemically converted to semi-synthetic artemisinin
    • vaccines
      • synthetic biology tools (ie DNA sequencing and computer modeling) may streamline production time of the flu vaccine
    • advancing biology and personalized medicine
      • cloning genes can be done in minutes
      • expansion of the DNA alphabet
      • makes individually tailored approaches to disease prevention and health care possible
      • custom protein and biological circuit design may enable delivery of smart proteins or programmed cells that self-assemble at disease sites
    • risks
      • release of engineered organisms to the wild
      • infectious diseases may be transmitted to lab workers or their family
      • novel organisms used to treat illness may trigger unanticipated adverse effects in patients
  • agricultural applications
    • potential benefits:
      • high-yield and disease-resistant plant feedstocks that can be supplemented with efficient and environmentally-friendly microorganisms to minimize water use and replace chemical fertilizers
      • nutritional benefits (ie boosting protein levels)
      • environmental biosensors that detect nutrient quality of soil or environmental degradation
      • biosurfactants could minimize pollution damage
    • potential risks:
      • uncontrolled environmental escape and disruption of ecosystems
      • new or stronger pests that are difficult to control
      • increased pesticide resistance and growth of invasic species

GMO basics

GMOs are living plants or microorganisms (ie, bacteria) that had their genetic code changed in some way

  1. a gene is inserted into the DNA of the nucleus of a single cell
  2. the cell is treated with plant hormones to stimulate growth and development
  3. the cell starts to divide
  4. the resulting cells become an entire plant

Why we use GMOs:

  • agriculture is vulnerable to 3 things: insects, weeds, and weather; most GMOs address the first two
    • insects: GMOs repel only the particular type of insect that feed on them
      • reduced the need for pesticides
    • weeds: GMOs developed to be resistant to herbicides
  • secondary benefits:
    • lower costs
    • less soil erosion (tillage isn’t as necessary for weed control)
    • less pesticides
  • GMOs also used to produce medicines and vaccines
    • before GMOs, medicine was extracted from blood donors, animal parts, or cadavers; had the risk of transmitted diseases, inconsistent quality, and unreliable supply
    • GMO medicines are more consistent and aren’t likely to be contaminated

GMOs and human health

  • A lot of attention on whether GMOs are safe to eat; currently there is no data that indicates any harm
    • over the two decades that GMOs have been on the market, there have been no health issues
  • GMOs have undergone more detailed evaluation than any other group of plants we consume
  • GMOs differ from a conventional plant by the addition of just one or two genes that produce one or two new proteins
    • the origins and functions of these proteins are well understood

GMOs and insects

  • pesticides are chemicals that will prevent pests from damaging plants, either by killing the insect or forming a toxic barrier around the plant
  • pesticides can kill beneficial organisms; they’re costly to farmers; they can be dangerous to animals and workers
    • GMOs solve this problem by modifying the plant’s protein manufacturing system to create one that is toxic to specific insects (their stomachs rupture)
  • GM crops don’t harm honeybees or butterflies

neural aesthetic class notes


  • data points are combinations inside feature space
  • Embeddings give us relationships between data points (closer points are more similar)
  • magnitude and direction have meaning, allow many basic retrieval applications
  • feature vectors and latent spaces are examples of embeddings
  • two vectors between two pairs of points have meaning

features are patterns of activations

  • every layer becomes less abstract/ more specific: edges, parallel lines, shapes, categories
  • last layer of activations; distance or correlation between vectors

transfer learning with images

  • dimensionality reduction; tries to preserve geometries
  • linearly-independent components


  • man>woman; country>capital; singular>plural
  • words are units; sentences are infinite—sentences and paragraphs can be embedded in feature space
    • word vectors are learned implicitly
    • question-inversion vector

principle component analysis to reduce

t-SNE better for visualization and discovery of similar neighbors, but for smaller datasets;

A2Z W3 Class Notes

Some javascript functions take regex


replace() + regex + callback:


.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error))


CORS workaround: cors anywhere–W/cors-anywhere

GMOs: genetically-edited crops

Gene editing agriculture:

  • USDA regulations on GMOs apply only to those constructed using plant pathogens like bacteria, or their DNA; gene-edited plants are not regulated
  • Calyxt: startup that edits the genes of thousands of plants
    • scientists create designer plants that don’t have foreign DNA; adds or deletes snippets of genes—”accelerated breeding”
    • uses TALEN, co-developed by Calyxt founder, which was developed two years earlier than CRISPR, and as such has advanced further toward commercial crops
    • has designed 19 plants
      • edited soybeans to use in healthier oils (without trans fat)
        • will face competition with similar beans, ie a Monsanto GMO
      • including a wheat plant that grinds into a white flour with 3x more fiber
    • fast-to-market business model
  • obstacles:
    • easier to design and make DNA strands than to get them inside plants
    • uncertainty over which genes should be edited
      • Scientists know how oils are synthesized and why fruit turns brown, but genetic causes for other plant traits that are both well understood and easy to alter are unknown


  • 90% of the soybean crop in the US are GMOs, genetically enhanced to be immune to Roundup
  • stigma: 40% of US adults think GMOs are less healthy
    • warring messages from scientists, agriculture lobbies, and NGOs like Greenpeace
  • legal in the US, Brazil, Argentina, and India, but banned throughout much of the rest of the world
  • unclear whether gene-edited crops are considered GMOs
    • no way to tell a gene-edited plant from a natural one
    • Lack of scrutiny of whether the plants could harm insects, spread their genetic enhancements to wild populations, or create superweeds
    • New Zealand and USDA’s organic council decided they are GMOs; the Netherlands and Sweden decided they weren’t; China and EU have yet to decide

Neural Aesthetic W3 Class Notes

convolutional neural networks allow you to look for patterns anywhere in the image

Measuring cost

  • look at the shape of the loss function for all combinations of m and b
  • bottom of the “bowl” is the best fit
  • gradient descent
    • start at a random point
    • calculate its gradient (generalization of a slope in multiple dimensions; which direction is the slope going?)
    • go down the gradient until the loss stops decreasing
  • gradient descent for NN
    • backpropagation
    • calculate gradient using chain rule
    • relates the gradient to the individual activations, error is distributed to the weights
    • problem: local minima; no way of finding the global minimum (“batch gradient descent” is not used because of this)
      • how to deal:
        • calculate the gradient on subsets of the dataset: stochastic gradient descent, mini-batch gradient descent
        • momentum: able to roll out of a local minimum to the next
          • Nesterov momentum
        • adaptive methods: AdaGrad, AdaDelta, RMSprop, ADAM (when in doubt, use ADAM)
    • overfitting

Hello, Computer Week 1 / A2Z Week 2 Homework

For this week’s homework, I decided to rebuild a markov model with RiTa.js that I had previously created in python with markovify and NLTK. This time, it would respond (loosely) to a user’s input, and with a voice via the Web Speech API.

I had initially experimented with markov models in python because I had the idea to create a sort of self-care assistant as the final phase of my mood prediction project, and had dreams of it being this omnipotent and omnipresent keeper. While I have yet to figure out how to implement such a presence, I did have an idea of what I wanted it to sound like: a mixture of the exercises in Berkeley’s Greater Good in Action, NY Mag’s Madame Clairevoyant, and Oprah. I had assembled corpuses for each of these personalities manually.

It was incredibly easy to build this markov model with RiTa, and the results were surprisingly coherent—with markovify, it was necessary to POS-ify the text with NLTK in order to force some semblance of grammar into a model. However, there didn’t seem to be a native option to provide seed text, so in order to make the model responsive to a user’s input, I utilized RiTa’s KWIC model to gather all of the sentences from the source text that contain each stemmed word from the input, and loaded what the KWIC returned back into the markov model as an additional source with a high weight. The resulting generated text was consistent enough in making subtle reference to the user’s input.

The last step was to feed the markov’s response into the speech synthesizer, which was pretty straightforward, but the creepy, male, pixelated voice gives this experience the uncanny feeling which every divine being deserves.


Two gene drive approaches:

  • replacement: alters a specific trait
  • suppression: suppresses a gene

CRISPR breaks DNA at a targeted location; the DNA heals itself in two ways:

  • nonhomologous end joining: two ends that were broken get stitched together in a random way
    • eventually confuses CRISPR, which is designed to locate a specific stretch of DNA
  • homology-directed repair: DNA uses a genetic template to heal

CRISPR potential:

  • could stop the spread of disease
  • could correct genes for inherited diseases or disabilities
  • could treat or prevent disease or disability
  • unlimited possibilities

CRISPR concerns:

  • no way to undo a gene drive once it is released in a wild population
  • uncertainty over how it may affect an ecosystem
  • population would likely develop a resistance to the gene drive
  • if carrier populations are edited to withstand diseases, the parasites may mutate
  • can damage DNA that is far from the target location
  • potential cell death after DNA editing
  • p53 protein could activate from stress from CRISPR activity and thwart it
  • some people may have already developed a resistance to CRISPR, which is a bacterial protein, during common bacterial infections
  • use for “enhancements” that could exacerbate social inequities

a2z wk2 class notes

New way of loading data (jsons) to avoid callback hell:


async await for sequential execution, avoids promise hell

() => replacement for anonymous function

=> for one line of code

button.mousePressed(() => background(255,0,0));

loadJSON('data.json', data => console.log(data));

for…of loop:

for(let word of words) {
let span =
  span.mouseOver(() =>"background-color", "red"));



  • All words: \w
  • Match beginning of the line: ^
  • Match first word of a line: ^\w+