Key Word(s): data scraping, beautifulsoup, pandas, matplotlib
CS109A Introduction to Data Science
Standard Section 1: Introduction to Web Scraping¶
Harvard University
Fall 2020
Instructors: Pavlos Protopapas, Kevin Rader, and Chris Tanner
Section Leaders: Marios Mattheakis, Hayden Joy
## RUN THIS CELL TO GET THE RIGHT FORMATTING
import requests
from IPython.core.display import HTML
styles = requests.get("https://raw.githubusercontent.com/Harvard-IACS/2018-CS109A/master/content/styles/cs109.css").text
HTML(styles)
Section Learning Objectives¶
When we're done today, you will approach messy real-world data with confidence that you can get it into a format that you can manipulate.
Specifically, our learning objectives are:
- Understand the tree-like structure of an HTML document and use that structure to extract desired information
Use Python data structures such as lists, dictionaries, and Pandas DataFrames to store and manipulate information
Practice using Python packages such as BeautifulSoup and Pandas, including how to navigate their documentation to find functionality.
Identify some other (semi-)structured formats commonly used for storing and transferring data, such as JSON and CSV
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
from bs4 import BeautifulSoup
import requests
import json
from IPython.display import HTML
# Setting up 'requests' to make HTTPS requests properly takes some extra steps... we'll skip them for now.
%matplotlib inline
requests.packages.urllib3.disable_warnings()
import warnings
warnings.filterwarnings("ignore")
Section Data Analysis Questions¶
Is science becoming more collaborative over time? How about literature? Are there a few "geniuses" or lots of hard workers? One way we might answer those questions is by looking at Nobel Prizes. We could ask questions like:
- 1) Has anyone won a prize more than once?
- 2) How has the total number of recipients changed over time?
- 3) How has the number of recipients per award changed over time?
To answer these questions, we'll need data: who received what award and when.
Before we dive into acquiring this data the way we've been teaching in class, let's pause to ask: what are 5 different approaches we could take to acquiring Nobel Prize data?
When possible: find a structured dataset (.csv, .json, .xls)¶
After a google search we stumble upon this dataset on github. It is also in the section folder named github-nobel-prize-winners.csv
.
We use pandas to read it:
df = pd.read_csv("../data/github-nobel-prize-winners.csv")
df.head() #pandas is a very useful package
Or you may want to read an xlsx file:
(Potential missing package; you might need to run the following command in your terminal first: !conda install xlrd
)
!conda install --yes xlrd
df = pd.read_excel("../data/github-nobel-prize-winners.xlsx")
df.tail()
introducing types¶
#type(df.winner)
#type(df)
Research Question 1: Did anyone recieve the Nobel Prize more than once?¶
How would you check if anyone recieved more than one nobel prize?
# initialize the list storing all the names
name_winners = []
for name in df.winner:
# Check if we already encountered this name:
if name in name_winners:
# if so, print the name
print(name)
else:
# otherwise append the name to the list
name_winners.append(name)
We don't want to print "No Prize was Awarded" all the time.
# Your code here
# list storing all the names
name_winners = []
for name in df.winner:
# Check if we already encountered this name:
if name in name_winners and name:
# if so, print the name
print(name)
else:
# otherwise append the name to the list
name_winners.append(name)
we can use .split() on a string to separate the words into individual strings and store them in a list.¶
UN_string = "Office of the United Nations"
print(UN_string.split())
#n_words = len(UN_string.split())
#print("Number of words: " + str(n_words));
Even better:
name_winners = []
for name in df.winner:
# Check if we already encountered this name:
if name in name_winners and len(name.split()) <= 2:
# if so, print the name
print(name)
else:
# otherwise append the name to the list
name_winners.append(name)
How can we make this into a oneligner?
List comprehension form: [f(x) for x in list]
winners = []
[print(name) if (name in winners and len(name.split()) <= 2)
else winners.append(name) for name in df.winner];
HTML('\
\
Marie Curie recieved the nobel prize in physics in 1903 and chemistry in 1911.
\
She is one of only four people to recieve two Nobel Prizes.\
\
')
Part 2: WEB SCRAPING¶
The first step in web scraping is to look for structure in the html. Lets look at a real website:¶
The official Nobel website has the data we want, but in 2018 and 2019 the physics prize was awarded to multiple groups so we will use an archived version of the web-page for an easier introduction to web scraping.
The Internet Archive periodically crawls most of the Internet and saves what it finds. (That's a lot of data!) So let's grab the data from the Archive's "Wayback Machine" (great name!). We've just given you the direct URL, but at the very end you'll see how we can get it out of a JSON response from the Wayback Machine API.
Let's take a look at the 2018 version of the Nobel website and to look at the underhood HTML: right-click and click on inspect
. Try to find structure in the tree-structured HTML.
Play around! (give floor to the students)
###################################################
The first step of web scraping is to write down the structure of the web page¶
Here some quick recap of HTML tags and what they do in the context of this notebook:¶
HTML tags are opened and closed as follows: \
some text \<\h3>.
Here are a list of few tags, their definitions and what information they contain in our problem today:
\ : paragraph tag : header 3 tag
tag is a header size 3 tag (header 1 is the largest tag). This tag will contain the title and year of the nobel prize, which we will parse out.
\ : header 6 tag
tag (smaller than header 3) will contain the prize recipients
\
\ "Content Division element ( \
Paying attention to tags with class attributes is key to the homework.
# here is what we will get after selecting using the class by year tag.
einstein = HTML('\
snapshot_url = 'http://web.archive.org/web/20180820111639/https://www.nobelprize.org/prizes/lists/all-nobel-prizes/'
snapshot = requests.get(snapshot_url)
snapshot
Response [200] is a success status code. Let's google: response 200 meaning
. All possible codes here.
type(snapshot)
Try to request "www.xoogle.be". What happens?
snapshot_url2 = 'http://web.archive.org/web/20180820111639/https://www.xoogle.be'
snapshot = requests.get(snapshot_url2)
snapshot
Always remember to “not to be evil” when scraping with requests! If downloading multiple pages (like you will be on HW1), always put a delay between requests (e.g, time.sleep(1)
, with the time
library) so you don’t unwittingly hammer someone’s webserver and/or get blocked.
snapshot = requests.get(snapshot_url)
raw_html = snapshot.text
print(raw_html[500:])
Regular Expressions¶
You can find specific patterns or strings in text by using Regular Expressions: This is a pattern matching mechanism used throughout Computer Science and programming (it's not just specific to Python). Some great resources that we recommend, if you are interested in them (could be very useful for a homework problem):
- https://docs.python.org/3.3/library/re.html
- https://regexone.com
- https://docs.python.org/3/howto/regex.html.
Specify a specific sequence with the help of regex special characters. Some examples:
\S
: Matches any character which is not a Unicode whitespace character\d
: Matches any Unicode decimal digit*
: Causes the resulting RE to match 0 or more repetitions of the preceding RE, as many repetitions as are possible.
Let's find all the occurances of 'Marie' in our raw_html:
import re
re.findall(r'Marie', raw_html)
Using \S
to match 'Marie' + ' ' + 'any character which is not a Unicode whitespace character':
re.findall(r'Marie \S',raw_html)
How would we find the lastnames that come after Marie?
ANSWER: the \w character represents any alpha-numeric character. \w* is greedy and gets a repeat of the characters until the next bit of whitespace.
# Your code here
last_names = re.findall(r'Marie \w*', raw_html)
display(last_names)
Now, we have all our data in the notebook. Unfortunately, it is the form of one really long string, which is hard to work with directly. This is where BeautifulSoup comes in.
This is an example of code that grabs the first title. Regex can quickly become complex, which motivates beautiful soup.¶
first_title = re.findall(r'.*<\/a><\/h3>'
, raw_html)[0]
print(first_title)
#you can do this via regex, but it gets complicated fast! This motivates Beautiful Soup.
Parse the HTML with BeautifulSoup¶
soup = BeautifulSoup(raw_html, 'html.parser')
Key BeautifulSoup functions we’ll be using in this section:
tag.prettify()
: Returns cleaned-up version of raw HTML, useful for printingtag.select(selector)
: Return a list of nodes matching a CSS selectortag.select_one(selector)
: Return the first node matching a CSS selectortag.text/soup.get_text()
: Returns visible text of a node (e.g.,"
" -> "Some text")Some text
tag.contents
: A list of the immediate children of this node
You can also use these functions to find nodes.
tag.find_all(tag_name, attrs=attributes_dict)
: Returns a list of matching nodestag.find(tag_name, attrs=attributes_dict)
: Returns first matching node
BeautifulSoup is a very powerful library -- much more info here: https://www.crummy.com/software/BeautifulSoup/bs4/doc/
Let's practice some BeautifulSoup commands...¶
Print a cleaned-up version of the raw HTML Which function should we use from above?
pretty_soup = soup.prettify()
print(pretty_soup[:500]) #what about negative indices?
Find the first “title” object
# Your code here
soup.select("h3 a")
Extract the text of first “title” object
#Your code here
Extracting award data¶
Let's use the structure of the HTML document to extract the data we want.
From inspecting the page in DevTools, we found that each award is in a div
with a by_year
class. Let's get all of them.
award_nodes = soup.select('.by_year') #
len(award_nodes)
Let's pull out an example.
award_node = award_nodes[200]
HTML(award_node.prettify())
Magic commands:
# show ls, tree, mkdir
Let's practice getting data out of a BS Node¶
The prize title¶
award_node.select_one('h3').text
How do we separate the year from the selected prize title?
# %load solutions/sol2.py
award_node.select_one('h3').text[:]
How do we drop the year from the title?
award_node.select_one('h3').text[:].strip()
Let's put them into functions:
# %load solutions/sol_functions.py
def get_award_title(award_node):
return award_node.select_one('h3').text[:-4].strip()
def get_award_year(award_node):
return int(award_node.select_one('h3').text[-4:])
Make a list of titles for all awards
#original code:
list_awards = []
for award_node in award_nodes:
list_awards.append(get_award_title(award_node))
list_awards
Let's use list comprehension:
# Your code here
[get_award_title(award_node) for award_node in award_nodes ]
The recipients¶
How do we handle there being more than one?
award_node.select('h6 a')
[node.text for node in award_node.select('h6 a')]
We'll leave them as a list for now, to return to this later.
This is how you would get the links: (Relevant for the homework)
[state_node.get("href") for state_node in award_node.select('h6 a')]
The prize "motivation"¶
How would you get the 'motivation'/reason of the prize from the following award_node
?
award_node = award_nodes[200]
award_node
# Your code here
print(award_node.select('p')[0].text);
Putting everything into functions:
def get_award_motivation(award_node):
award_node = award_node.select_one('p')
if not award_node: #0, [], None, and {} all default to False in a python conditional statement.
return None
return award_node.text
Break Out Room 1: Practice with CSS selectors, Functions and list comprehension¶
print(award_nodes[200])
Exercise 1.1: complete the following function by assigning the proper CSS-selector so that it returns a list of nobel prize award recipients.¶
Hint: you can specify multiple selectors separated by a space.
To load the first exercise by deleting the "#" and typing shift-enter to run the cell¶
clicking on "cell" -> "run all above" is also very helpful to run many cells of the notebook at once.
# %load exercises/exercise1.py
Exercise 1.2: Change the above function so it uses list comprehension.¶
To load the execise simply delete the '#' in the code below and run the cell.
# %load exercises/exercise2.py
Don't look at this cell until you've given the exercise a go! It loads the correct solution.
Exercise 1.2 solution (1.1 solution is contained herein as well)¶
# %load solutions/breakoutsol1.py
%run ./solutions/breakoutsol1.py
Let's create a Pandas dataframe¶
Now let's get all of the awards.
awards = []
for award_node in soup.select('.by_year'):
recipients = get_recipients(award_node)
#initialize the dictionary
award = {} #{key: value}
award['title'] = get_award_title(award_node)
award['year'] = get_award_year(award_node)
award['recipients'] = recipients
award['num_recipients'] = len(recipients)
award['motivation'] = get_award_motivation(award_node)
awards.append(award)
awards[0:2]
df_awards_raw = pd.DataFrame(awards)
#explain open brackets
df_awards_raw
Some quick EDA.¶
df_awards_raw.info()
df_awards_raw.year.min()
What is going on with the recipients column?
df_awards_raw.head()
df_awards_raw.num_recipients.value_counts()
Now lets take a look at num_recipients
df_awards_raw.num_recipients == 0
df_awards_raw[df_awards_raw.num_recipients == 0]
Ok: 2018 awards have no recipients because this is a 2018 archived version of nobel prize webpage. Some past years lack awards because none were actually awarded that year. Let's keep only meaningful data:
df_awards_past = df_awards_raw[df_awards_raw.year != 2018]
df_awards_past.info()
Hm, motivation
has a different number of items... why?
df_awards_past[df_awards_past.motivation.isnull()]
Looks like it's fine that those motivations were missing.
Sort the awards by year.
df_awards_past.sort_values('year').head()
How many awards of each type were given?¶
df_awards_past.title.value_counts()
But wait, that includes the years the awards weren't offered.
df_awards_actually_offered = df_awards_past[df_awards_past.num_recipients > 0]
df_awards_actually_offered.title.value_counts()
When was each award first given?¶
df_awards_actually_offered.groupby('title').year
df_awards_actually_offered.groupby('title').year.describe() # we will use this information later!
How many recipients per year?¶
Let's include the years with missing awards; if we were to analyze further, we'd have to decide whether to include them.
A good plot that clearly reveals patterns in the data is very important. Is this a good plot or not?
df_awards_past.plot.scatter(x='year', y='num_recipients') #explain scatterplot
It's hard to see a trend when there are multiple observations per year (why?).
Let's try looking at total num recipients by year.
Lets explore how important a good plot can be
df_awards_past.groupby('year').num_recipients.sum()
plt.figure(figsize=[16,6])
plt.plot(df_awards_past.groupby('year').num_recipients.mean(), 'b', linewidth='1')
plt.title('Total Nobel Awards per year')
plt.xlabel('Year')
plt.ylabel('Total recipients per prize')
plt.grid('on')
plt.show()
Check out the years 1940-43? Any comment?
Any trends the last 25 years?
set(df_awards_past.title)
plt.figure(figsize=[16,6])
i = 0
for award in set(df_awards_past.title):
i += 1
year = df_awards_past[df_awards_past['title']==award].year
recips = df_awards_past[df_awards_past['title']==award].num_recipients
index = year > 2020 - 25
years_filtered = year[index].values
recips_filtered = recips[index].values
plt.subplot(2,3,i)
plt.bar(years_filtered, recips_filtered, color='b', alpha = 0.7)
plt.title(award)
plt.xlabel('Year')
plt.ylabel('Number of Recipients')
plt.ylim(0, 3)
plt.tight_layout()
A cleaner way to iterate and keep tabs: the enumerate( ) function¶
'How has the number of recipients per award changed over time?'¶
# The enumerate function allows us to delete two lines of code
# The number of years shown is increased to 75 so we can see the trend.
plt.figure(figsize=[16,6])
for i, award in enumerate(set(df_awards_past.title), 1): ################### <--- enumerate
year = df_awards_past[ df_awards_past['title'] == award].year
recips = df_awards_past[ df_awards_past['title'] == award].num_recipients
index = year > 2019 - 75 ########################### <--- extend the range
years_filtered = year[index].values
recips_filtered = recips[index].values
#plot:
plt.subplot(2, 3, i) #arguments (nrows, ncols, index)
plt.bar(years_filtered, recips_filtered, color='b', alpha = 0.7)
plt.title(award)
plt.xlabel('Year')
plt.ylabel('Number of Recipients')
plt.ylim(0, 3)
plt.tight_layout()
Break Out Room II: Dictionaries, dataframes, and Pyplot¶
Exercise 2.1 (practice creating a dataframe): Build a dataframe of famous physicists from the following lists. ¶
Your dataframe should have the following columns: "name", "year_prize_awarded" and "famous_for".
famous_award_winners = ["Marie Curie", "Albert Einstein", "James Chadwick", "Werner Karl Heisenberg"]
nobel_prize_dates = [1923, 1937, 1940, 1934]
famous_for = ["spontaneous radioactivity", "general relativity", "strong nuclear force",
"uncertainty principle"]
#initialize dictionary
famous_physicists = {}
#TODO: build Pandas Dataframe
Exercise 2.2: Make a bar plot of the total number of Nobel prizes awarded per field. Make sure to use the 'group by' function to achieve this.¶
#create the figure:
plt.figure(figsize=[16,6])
#group by command:
#TODO
# %load solutions/exercise2.1sol
Exercise 2.2 Solutions¶
# %load solutions/exercise2.2sol_vanilla
# %load solutions/exercise2.2sol_improved
Food for thought: Is the prize in Economics more collaborative, or just more modern?
Extra: Did anyone recieve the Nobel Prize more than once (based upon scraped data)?¶
Here's where it bites us that our original DataFrame isn't "tidy". Let's make a tidy one.
A great scientific article describing tidy data by Hadley Wickam: https://vita.had.co.nz/papers/tidy-data.pdf
tidy_awards = []
for idx, row in df_awards_past.iterrows():
for recipient in row['recipients']:
tidy_awards.append(dict(
recipient = recipient,
year = row['year']))
tidy_awards_df = pd.DataFrame(tidy_awards)
tidy_awards_df
Now we can look at each recipient individually.
tidy_awards_df.recipient.value_counts()
End of Normal Section¶
Optional Further Readings¶
Harvard Professor Sean Eddy in the micro and chemical Biology department at Harvard teaches a great course called MCB-112: Biological Data Science. His course is difficult but a great complement to CS109a and is also taught in python.
Here are a couple resources that he referenced early in his course that helped solidify my understanding of data science.
50 Years of Data Science by Dave Donoho (2017)
Tidy data by Hadley Wickam (2014)
Extra Material: Other structured data formats (JSON and CSV)¶
CSV¶
CSV is a lowest-common-denominator format for tabular data.
df_awards_past.to_csv('../data/awards.csv', index=False)
with open('../data/awards.csv', 'r') as f:
print(f.read()[:1000])
It loses some info, though: the recipients list became a plain string, and the reader needs to guess whether each column is numeric or not.
pd.read_csv('../data/awards.csv').recipients.iloc[20]
JSON¶
JSON preserves structured data, but fewer data-science tools speak it.
df_awards_past.to_json('../data/awards.json', orient='records')
with open('../data/awards.json', 'r') as f:
print(f.read()[:1000])
Lists and other basic data types are preserved. (Custom data types aren't preserved, but you'll get an error when saving.)
pd.read_json('../data/awards.json').recipients.iloc[20]
Extra: Pickle: handy for storing data¶
For temporary data storage in a single version of Python, pickle
s will preserve your data even more faithfully, even many custom data types. But don't count on it for exchanging data or long-term storage. (In fact, don't try to load untrusted pickle
s -- they can run arbitrary code!)
df_awards_past.to_pickle('../data/awards.pkl')
with open('../data/awards.pkl', 'r', encoding='latin1') as f:
print(f.read()[:200])
Yup, lots of internal Python and Pandas stuff...
pd.read_pickle('../data/awards.pkl').recipients.iloc[20]
Extra: Formatted data output¶
Let's make a textual table of Physics laureates by year, earliest first:
for idx, row in df_awards_past.sort_values('year').iterrows():
if 'Physics' in row['title']:
print('{}: {}'.format(
row['year'],
', '.join(row['recipients'])))
Extra: Parsing JSON to get the Wayback Machine URL¶
We could go to http://archive.org, search for our URL, and get the URL for the archived version there. But since you'll often need to talk with APIs, let's take this opportunity to use the Wayback Machine's API. This will also give us a chance to practice working with JSON.
url = "https://www.nobelprize.org/prizes/lists/all-nobel-prizes/"
# All 3 of these do the same thing. The third is my (KCA's) favorite new feature of Python 3.6.
wayback_query_url = 'http://archive.org/wayback/available?url={}'.format(url)
wayback_query_url = 'http://archive.org/wayback/available?url={url}'.format(url=url)
wayback_query_url = f'http://archive.org/wayback/available?url={url}'
r = requests.get(wayback_query_url)
We got some kind of response... what is it?
r.text
Yay, JSON! It's usually pretty easy to work with JSON, once we parse it.
json.loads(r.text)
Loading responses as JSON is so common that requests
has a convenience method for it:
response_json = r.json()
response_json
What kind of object is this?
A little Python syntax review: How can we get the snapshot URL?
snapshot_url = response_json['archived_snapshots']['closest']['url']
snapshot_url


PROTONIC
It's like other things, only different.
Overview
Protonic is a (very) simple (framework agnostic) library for managing state through streams. It's inspired by other popular state-management patterns and libraries (notably Redux, Flux, and RxJS), but makes certain assumptions and trade-offs in support of reducing complexity and developing applications following a specific pattern. By itself, Protonic isn't much of a framework, but is designed to work with a simple one-way data flow pattern that we'll describe here. (This pattern isn't anything new, but for the sake of this document and this particular flavor of the pattern we'll call it the Protonic Pattern.)
Getting Started (Quickly)
To use Protonic in your app, install it with npm:
npm install protonic --save
import Immutable from 'immutable';
import { Stream } from 'protonic';
// To create a stream:
let initialState = Immutable.Map({ name: 'Jessika Pava' })
let myStream = new Stream(initialState);
// To subscribe to a stream:
let subscriber = myStream.subscribe(state => console.log(state.get('name')));
// immediately logs "Jessika Pava"
// To send state to a stream:
myStream.state = myStream.state.set('name', '"Snap" Wexley');
// logs '"Snap" Wexley'
// To unsubscribe from a stream:
subscriber.unsubscribe();
myStream.state = myStream.state.set('name', 'Karé Kun');
// nothing logs.
Manual
Example Components in Angular and React
Other Streams: Funnels and Views
Actions and Transformers
Transformers
Transformers are solely responsible for manipulating state for a stream. They are not pure reducers, however. Transformers don't take state as an input. Rather, they fetch the current state from the stream directly. They also do not return new state. Rather, they send the new state back to the stream. Regardless, transformers should still follow the same rules as pure reducers, specifically that they do not depend on state outside of the stream, and that they do not alter state outside of the stream.
// A typical transformer
function incrementPilotSortie(amount) {
let currentState = stream.state; // state is an Immutable data structure.
let sorties = currentState.get('sorties');
let newSorties = sorties + amount;
let newState = currentState.set('sorties', newSorties);
stream.next(newState);
}
This can be simplified to:
// A typical transformer
function incrementPilotSortie(amount) {
stream.state = stream.state.update('sorties', num => num + amount);
}
Actions
Most of the time, when a user triggers an action, we would expect state in multiple streams to be update. An example would be a section of the UI updating to show a progress bar or spinner when data is fetched from the server. Since transformers are prohibited from affecting state from outside their stream, actions are our way of combining transformers and necessary side-effects (ajax calls, for example).
function getPilots () {
uiTransformers.setSpinner(true);
$get('api/to/pilots')
.then(result => {
pilotTransformers.updatePilots(result);
uiTransformers.setSpinner(false);
},
error => {
uiTransformers.setSpinner(false);
uiTransformers.setError(error);
});
}
API
Streams
A stream is created by calling new Stream()
an optionally passing in an initial state. If you do
pass in an initial state, it must be an Immutable
data structure.
import { Stream } from 'protonic';
let myStream = new Stream(Immutable.Map({name: 'Testor'}));
You can get the current state of a stream at any time by access the .state
property.
let currentState = myStream.state;
// currentState is Immutable.Map of {name: 'Testor'}
You can subscribe to any changes to the stream's state with the .subscribe
method. .subscribe
takes a callback function (we'll call it an observer) that is called any time the stream's state changes. .subscribe
returns an object with an .unsubscribe
method. .unsubscribe
should be called whenever the observer is done listening to state changes.
let subscriber = myStream.subscribe(state => console.log(state));
// logs out state anytime state changes.
// later on
subscriber.unsubscribe();
You can send new state to the stream with the .next(newState)
method. This will send the state to any observers, provided that the new state is not falsey and is distinct from the stream's current state.
myStream.next(Immutable.Map({name: 'Snap'}))
// myStream.state is now Immutable.Map of {name: 'Snap'}
Protonic also allows you to set the state through the .state
setter property. It is functionally equivalent to calling .next(newState)
, but might be more declarative:
myStream.state = Immutable.Map({name: 'Snap'});
// myStream.state is now Immutable.Map of {name: 'Snap'}
Funnels
A funnel is created with new Funnel()
and takes a required argument which is a map of streams to combine into one state object. The key for each stream in the map will end up corresponding to the key for that stream's part of the state in the combined state object.
import { Funnel } from 'protonic';
import pilotStream from 'path/to/pilot-stream';
import shipStream from 'path/to/ship-stream';
let AppStream = new Funnel(Immutable.Map({
Pilots: pilotStream,
Ships: shipStream
}))
Just like with Streams, you can get the current state of the Funnel with the .state
property.
let currentState = AppStream.state;
// currentState is Immutable.Map of
// { Pilot: { name: 'Testor' },
// Ship: { type: 'X-Wing' } }
Also like Streams, you can subscribe to state changes with the .subscribe
method. Note that state will not be sent to observers until all of the source streams have emitted state to the funnel.
let subscriber = AppStream.subscribe(state => console.log(state));
// logs out state anytime state changes.
// later on
subscriber.unsubscribe();
Finally, when you are done with a Funnel, you can call .destroy
method to clean up the Funnel and unsubscribe from the source streams.
AppStream.destroy()
Views
A View is created with new View(soureStream, viewFunction)
, and requires a source stream which it will subscribe to and a view function to change the shape of the state before emitting to its own subscribers.
import { View } from 'protonic';
import AppStream from 'path/to/app-stream';
let myView = new View(AppStream, state => {
let pilotName = state.getIn(['Pilot', 'name']);
let shipType = state.getIn(['Ship', 'type']);
return Immutable.Map({
description: pilotName + ' flies an ' + shipType
});
})
As with Streams and Funnels, the current state of a View is accessible by its .state
property:
let currentState = myView.state;
// currentState is Immutable.Map of { description: 'Testor flies an X-Wing' }
Also like Streams and Funnels, you can subscribe to state changes from the view. Just like Streams, observers will only receive state if the new state calculated by the View is distinct from the last state calculated by the View.
let subscriber = myView.subscribe(state => console.log(state));
// logs out state anytime state changes.
// later on
subscriber.unsubscribe();
And, like Funnels, when you are done with a View, it can be cleaned up with the .destroy
method.
myView.destroy();
Logging and Debugging
TODO Talk about Logging/Debugging with Stacks.
Why Protonic
TODO Talk more about philosophy of Protonic
TODO Talk about gotchas (i.e. Actions cannot subscribe to streams)


for i : -4 .. 4
const arg := i / 4
put "Arc cosine of ", arg, " is ",
arccosd (arg), " degrees"
end for
the arccos function which finds the arc cosine of a value with the result given in radians. (2p radians are the same as 360 degrees.)
See also predefined unit Math.


Copyright 2011 Rafael Muñoz Salinas. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of Rafael Muñoz Salinas.
ArUco is a minimal C++ library for detection of Augmented Reality markers based on OpenCv exclusively.
It is an educational project to show student how to detect augmented reality markers and it is provided under BSD license.
INTRODUCTION
The library relies on the use of coded markers. Each marker has an unique code indicated by the black and white colors in it. The libary detect borders, and analyzes into the rectangular regions which of them are likely to be markers. Then, a decoding is performed and if the code is valid, it is considered that the rectangle is a marker.
The codification included into the marker is a slighly modified version of the Hamming Code. It has a total a 25 bits didived in 5 rows of 5 bits each. So, we have 5 words of 5 bits. Each word, contains only 2 bits of real information, the rest is for and error detection/correction (error correction is yet to be done). As a conclusion, a marker contains 10 bits of real information wich allows 1024 different markers.
BOARDS
Aruco allows the possibility to employ board. Boards are markers composed by an array of markers arranged in a known order. The advantages of using boards instead of simple markers are:
- More robusteness. The misdetection of several markers of the board is not a problem as long as a minimum set of them are detected.
- More precision. Since there are a larger number of corners, camera pose estimation becomes more precise.
APPLICATIONS
The library comes with five applications that will help you to learn how to use the library:
- aruco_create_marker: which creates marker and saves it in a jpg file you can print.
- aruco_simple : simple test aplication that detects the markers in a image
- aruco_test: this is the main application for detection. It reads images either from the camera of from a video and detect markers. Additionally, if you provide the intrinsics of the camera(obtained by OpenCv calibration) and the size of the marker in meters, the library calculates the marker intrinsics so that you can easily create your AR applications.
- aruco_test_gl: shows how to use the library AR applications using OpenGL for rendering
- aruco_create_board: application that helps you to create a board
- aruco_simple_board: simple test aplication that detects a board of markers in a image
- aruco_test_board: application that detects boards
- aruco_test_board_gl: application that detects boards and uses OpenGL to draw
LIBRARY DESCRIPTION:
The ArUco library contents are divided in two main directories. The src directory, which contains the library itself. And the utils directory which contains the applications.
The library main classes are:
- aruco::CameraParameters: represent the information of the camera that captures the images. Here you must set the calibration info.
- aruco::Marker: which represent a marker detected in the image
- aruco::MarkerDetector: that is in charge of deteting the markers in a image Detection is done by simple calling the member funcion ArMarkerDetector::detect(). Additionally, the classes contain members to create the required matrices for rendering using OpenGL. See aruco_test_gl for details
- aruco::BoardConfiguration: A board is an array of markers in a known order. BoardConfiguracion is the class that defines a board by indicating the id of its markers. In addition, it has informacion about the distance between the markers so that extrinsica camera computations can be done.
- aruco::Board: This class defines a board detected in a image. The board has the extrinsic camera parameters as public atributes. In addition, it has a method that allows obtain the matrix for getting its position in OpenGL (see aruco_test_board_gl for details).
- aruco::BoardDetector : This is the class in charge of detecting a board in a image. You must pass to it the set of markers detected by ArMarkerDetector and the BoardConfiguracion of the board you want to detect. This class will do the rest for you, even calculating the camera extrinsics.
COMPILING THE LIBRARY:
Linux
Go to the aruco library and do
>mkdir build
>cd build
>cmake ..
>make
>make install (optional)
NOTE ON OPENGL: The library supports eaily the integration with OpenGL. In order to compile with support for OpenGL, you just have installed in your system the develop packages for GL and glut (or freeglut).
WINDOWS
The library has been compiled using MinGW and codeblocks. Below I describe the best way to compile it that I know. If you know better, please let me know.
- step 1) codeblocks
- Download codeblocks. I recommend to download the version 10.5 with mingw included (codeblocks-10.05mingw-setup.exe)
- Install and set the PATH variable so that the codeblock/mingw/bin directory is included. In my case c:/codeblocks/mingw/bin. This will allow cmake to find the compiler.
- The codeblock program will not find the mingw path by deafult. So, run codeblocks and go to setting->Compuiler debugger and set the correct path to the MinGW dir.
- step 2) cmake
- Download and install the last version of cmake.
- step 3) OpenCv
- Download the source code and compile it using cmake and codeblocks. Note: install the library in C:\ if you want it to be easily detected by cmake afterwards
- step 4) aruco
- Download and decompress.
- Open cmake gui application and set the path to the main library directory and also set a path where the project is going to be built.
- Generate the codeblock project.
- Open the project with codeblock and compile then, install. The programs will be probably generated into the bin directory
OpenGL: by default, the mingw version installed has not the glut library. So, the opengl programs are not compiled. If you want to compile with OpenGL support, you must install glut, or prefereably freeglut. Thus,
- Download the library (http://www.martinpayne.me.uk/software/development/GLUT/freeglut-MinGW.zip) for mingw.
- Decompress in a directory X.
- Then, rerun cmake setting the variable GLU_PATH to that directory (>cmake .. -DGLUT_PATH="C:\X")
- Finally, recompile and test. Indeed, you should move the freeglut.dll to the directory with the binaries or to any other place in the PATH.
CONCLUSION: Move to Linux, things are simpler :P
Testing
For testing the applications, the library provides videos and the corresponding camera parameters of these videos. Into the directories you will find information on how to run the examples.
Notes
- REQUIREMENTS: OpenCv >= 2.1.0. and OpenGL for (aruco_test_gl and aruco_test_board_gl)
- CONTACT: Rafael Munoz-Salinas<EMAIL_ADDRESS>- This libary is free software and come with no guaratee!


Turtle Commands:
FORWARD pixels FD pixels moves turtle forward in its current heading by pixels distance returns the value of pixels BACK pixels BK pixels moves turtle backward in its current heading by pixels distance returns the value of pixels LEFT degrees LT degrees turns turtle counterclockwise by degrees angle returns the value of degrees RIGHT degrees RT degrees turns turtle clockwise by degrees angle returns the value of degrees SETHEADING degrees SETH degrees turns turtle to an absolute heading returns number of degrees moved TOWARDS x y turns turtle to face the point (x, y), where (0, 0) is the center of the screen returns the number of degrees turtle turned SETXY x y GOTO x y moves turtle to an absolute screen position, where (0, 0) is the center of the screen returns the distance turtle moved PENDOWN PD puts pen down such that when the turtle moves, it leaves a trail returns 1 PENUP PU puts pen up such that when the turtle moves, it does not leave a trail returns 0 SHOWTURTLE ST makes turtle visible returns 1 HIDETURTLE HT makes turtle invisible returns 0 HOME moves turtle to the center of the screen (0 0) returns the distance turtle moved CLEARSCREEN CS


This project was inspired by the bookdown package and is an updated version of my Senior Thesis template in the reedtemplates
package here. It was originally designed to only work with the Reed College LaTeX template, but has since been adapted to work with many different institutions by many different individuals. Check out the Customizing thesisdown to your institution section below for examples.
Currently, the PDF and gitbook versions are fully-functional. The word and epub versions are developmental, have no templates behind them, and are essentially calls to the appropriate functions in bookdown.
If you are new to working with bookdown
/rmarkdown
, please read over the documentation available in the gitbook
template at https://thesisdown.netlify.com/. This is also available below at https://ismayc.github.io/thesisdown_book.
The current output for the four versions is here:
Under the hood, the Reed College LaTeX template is used to ensure that documents conform precisely to submission standards. At the same time, composition and formatting can be done using lightweight markdown syntax, and R code and its output can be seamlessly included using rmarkdown.
In an ideal world, this package would support a variety of different LaTeX templates from a wide range of institutions and we’d love to get it there at some point. Until that time, realize that this was designed to only work with the Reed College LaTeX template but others have adapted it to work with their institutions. Here are some that have customized it to fit their needs. It is recommended you review how they changed the files by comparing their repositories to this one and then make tweaks to yours as needed. Feel free to file an issue on this repo if you have questions/troubles.
Have you created a thesisdown template for your institution and would like to have it included here? Make a PR similar to the commit done to include jayhawkdown
. I’ll review it and merge it in. Let’s keep the list going!
Special thanks to Ben Marwick for helping to add a lot more clarity to the directions below from the README of his spin-off huskydown
package.
Using thesisdown has some prerequisites which are described below. To compile PDF documents using R, you are going to need to have LaTeX installed. By far the easiest way to install LaTeX on any platform is with the tinytex R package:
install.packages(c('tinytex', 'rmarkdown'))
tinytex::install_tinytex()
# after restarting RStudio, confirm that you have LaTeX with
tinytex:::is_tinytex()
You may need to install a few extra LaTeX packages on your first attempt to knit as well. Here is one such example of how to do so:
tinytex::tlmgr_install("babel-portuges")
To use thesisdown from RStudio:
1) Ensure that you have already installed LaTeX and the fonts described above, and are using the latest version of RStudio. You can use thesisdown
without RStudio. For example, you can write the Rmd files in your favourite text editor (e.g. Atom, Notepad++). But RStudio is probably the easiest tool for writing both R code and text in your thesis. It also provides a nice way to build your thesis while editing. We’ll proceed assuming that you have decided to use the RStudio workflow.
2) Install the bookdown and thesisdown packages. Note that thesisdown is not available on CRAN at the moment and that’s why install.packages("thesisdown")
won’t work. Use remotes::install_github()
as shown below instead to install the package.
if (!require("remotes")) install.packages("remotes", repos = "https://cran.rstudio.org") remotes::install_github("rstudio/bookdown") remotes::install_github("ismayc/thesisdown")
Note that you may need to restart RStudio at this point for the following dialog to show up.
3) Use the New R Markdown dialog to select Thesis:
Note that this will currently only Knit if you name the directory index
as shown above. This guarantees that index.html
is generated correctly for the Gitbook version of the thesis.
4) After choosing which type of output you’d like in the YAML at the top of index.Rmd, Knit the index.Rmd
file to get the book in PDF or HTML formats.
You need to edit the individual chapter R Markdown files to write your thesis. It’s recommended that you version control your thesis using GitHub if possible. RStudio can also easily sync up with GitHub to make the process easier. While writing, you should git commit
your work frequently, after every major activity on your thesis. For example, every few paragraphs or section of text, and after major step of analysis development. You should git push
at the end of each work session before you leave your computer or change tasks. For a gentle, novice-friendly guide to getting starting with using Git with R and RStudio, see https://happygitwithr.com/.
To render your thesis into a PDF, open index.Rmd
in RStudio and then click the “knit” button. To change the output formats between PDF, gitbook and Word , look at the output:
field in index.Rmd
and comment-out the formats you don’t want.
The PDF file of your thesis will be deposited in the _book/
directory, by default.
The following components are ones you should edit to customize your thesis:
_bookdown.yml
This is the main configuration file for your thesis. You can change the name of your outputted file here for your thesis and other options about your thesis here.
index.Rmd
This file contains all the meta information that goes at the beginning of your document. You’ll need to edit the top portion of this file (the YAML) to put your name on the first page, the title of your thesis, etc. Note that you need to have at least one chapter start in the index.Rmd
file for the build to work. For the template, this is done with # Introduction
in the example from the template.
01-chap1.Rmd
, 02-chap2.Rmd
, etc.These are the Rmd files for each chapter in your dissertation. Write your thesis in these. If you’re writing in RStudio, you may find the wordcount addin useful for getting word counts and readability statistics in R Markdown documents.
bib/
Store your bibliography (as bibtex files) here. We recommend using the citr addin and Zotero to efficiently manage and insert citations.
csl/
Specific style files for bibliographies should be stored here. A good source for citation styles is https://github.com/citation-style-language/styles#readme.
figure/
and data/
Store your figures and data here and reference them in your R Markdown files. See the bookdown book for details on cross-referencing items using R Markdown.


Zimbabwe suspends South African livestock imports after foot and mouth outbreak
by Staff ReporterHARARE (Reuters) – Zimbabwe has suspended imports of livestock and meat from South Africa for the second time this year after an outbreak of foot and mouth in the north of the country, the agriculture ministry said on Friday.
In January, Zimbabwe joined Botswana and the Kingdom of eSwatini, formerly Swaziland, in suspending meat imports from South Africa while following the outbreak of the highly contagious foot and mouth disease.
The agriculture ministry said in a statement that it had been notified by South African veterinary services that the latest outbreak had been identified at a farm in Limpopo province, close to the border with Zimbabwe.
Importation of live cattle, goats, sheep and pigs and related products had been suspended as authorities seek to identify the virus strain and extent of the outbreak.
“The suspension of imports from South Africa is a precautionary measure designed to prevent the spread of the infection into Zimbabwe,” the ministry said.
Foot and mouth disease does not affect humans but poses a threat to cattle, goats and sheep.
Zimbabwe imports livestock from South Africa for breeding as well as meat products.


Hue disco - Want You Gone
Your browser does not support the
audio
element.
Random:
Base/mid/high:
Reds:
Greens:
Blues:


Neuroplasticity & Growth Mindset
Neuroplasticity
From my background in sport science the idea of neuroplasticity is shown through an individual getting stronger or learning a new skill. This occurs by the brain developing and refines motor patterns enabling them to be performed more efficiently. Intuitively this sounds like your hardwiring in a pattern - similarly to how you might burn an old PC monitor. Once it's embedded it's there. It only takes a look at physiotherapy to show that this isn't true. People can learn new movement patterns even though they have a lifetime of older ones.
The formal definition of neuroplasticity is the ability of neural networks in the brain to change through growth and reorganization. In the past this was something that was thought to be strongest in children. And that as one gets older the brain becomes less capable of change. Anecdotally most people can think of example of an older individual that seems to have no interest or capacity to learn a new technology. However, this has been found to not actually be the case. Humans throughout the entire course of their lives are able to learn new patterns, skills, and abilities.
This is good news for people who want to learn a new language or instrument in retirement and are over the age of 18. The trouble with previous scientific thought is it can stay in the collective societal memory long after ideas have been disproven. And to quote Henry Ford (who I'm sure stole the phrase from someone else)
Whether you think you can or you can't you're right.
To increase your neuroplasticity you'll want to take actions that faciliatate new neural connections. This is a jargon-filled way of saying the act of learning increases your neuroplasticity! There's particularly good news here. Earl Miller has shown that not only does success in learning improve your neuroplasticity but failure doesn't have a negative impact. Meaning that by taking actions to learn new things there's no risk of decreasing your ability to learn.
Some resources which can help improve your understanding of neuroplasticity are:
- Scott Berinato's article on neuroplasticity
- Wikipedia's page on Neuroplasticity
- Nathan Wallis interview on brain recovery
Growth Mindset
Carol Dweck has devoted a large amount of her career to the concept of 'Growth Mindset' and its counter 'Fixed Mindset'. These ideas are about your belief that you have the capacity to improve. A person doesn't just have a growth mindset or a fixed mindset either. It is also context and topic specific. But once a person is aware of this framework there isn't anything preventing them from adopting it to all contexts.
So what is growth mindset? It's the belief that your capacity to perform (or learn to perform) isn't 'fixed'. Or that with specific and consistent effort you can increase your skill in a particular domain. This is counter to a 'fixed' mindset where a person believes that they simply aren't good at something and to try and improve would not yeild any positive results. To have this mindset I personally feel is quite tragic as you can easily self-filter yourself out of a lot of opportunities that could be entirely obtainable. This is particularly relevant for a cohort of people taking on a tough learning jouney through EDA!
An area that Carol focused on in her research was in children. And the language others use around them can significantly influence children's views of themselves. The example often given is on celebrating a child doing well on a test. A response of 'oh you're so smart' while kind can actually re-enforce a fixed mindset. Which is the child may believe that they are just naturally talented in a subject. Having positive self-esteem can be good. However, this can create a challenging moment if they encounter situations where they find a task they had been led to believe they were gifted in difficult. Possibly even challenging their own self-worth.
Language to encourage a growth mindset would sound closer to "great job, you worked really hard and it paid off!". This phrase encourages the idea that it was hard work that led to the positive outcome. So when a child comes across something difficult in the future they know it's hard work rather than a natural gift that will help them see success. Carol's research indicates that children with this type of belief are more resiliant as they grow older.
Having already been familiar with Carol Dweck's work I wasn't surprised by anything in my research this time around. However, this is because I've tried to embed a growth mindset in myself for years. Being open to the possibility that I can do pretty much anything has been very important and allowed me to take risks that I would not do otherwise (like taking a year off work to learn programming!). As such having a growth mindset is already a part of my learning journey.
The best resource on growth mindset I've come across is Carol Dweck's book Mindset. Other useful resources are:
- Carol Dweck's HBR Article 'What having a Growth Mindset Actually Means'
- To Be a Great Leader, You Need the Right Mindset
- 5 Ways a Crisis Can Help You Cultivate a Growth Mindset
- Growth Mindset v Fixed Mindset Video
Using Neuroplasticity & Growth Mindset with my Learning Plan
Given my long term goal is to spend this year learning the knowlede that my neural pathways can change in response to learning is great news. It means that I'm not going to stop if I come across a topic that I'm unfamiliar with or am not naturally strong at (such as math). As I know that it's possible for me to improve in these areas.
This also applies to non-technical areas. I've started hosting dinners with friends and old co-workers to build up the skill of hosting. Something which I'm unfamiliar with as an activity. This again is good to know that failure (or not succeeding in the way I'd like to) isn't a permanent state. And the capacity to build new pathways, habits, and behaviours is present within myself and others.


Bebot is a first of its kind Cowboy Bebop discord bot
It features moderation, anime, gaming, user support, economy and many soon to come commands.
Bebot features amazing anime commands
Look up info about your favorite anime with b.anisearch
Look up an anime stream with b.anistream
Find an episode of Cowboy Bebop to watch
Bebot features gaming commands for two of your favorite games, COD MW and Fortnite
Use b.mw to get your COD MW stats
Use b.fortnite to get your Fortnite stats
Bebot has many other commands as well ranging from things like Economy commands to Search commands for searching through reddit and other sites
{{guild_count}}
servers
{{member_count}}
users


Traditionally, red teams have used socat/netcat to proxy beacons from the internet to their desktop. These are known as gateway/redirector servers. This plugin replicates this behavior by provisioning new gateway servers (micro Linux instances) in your own cloud environment. You can also choose to provision a new Linux or Windows server, which will include a running Pneuma agent pointed to any redirector, giving you a quick practice environment.
I want to deploy a
Enable any payload below to pre-install it on your deployed server. This allows you to customize the environment, either by creating a unique test lab or installing redirector tools, such as Switchboard for team management, or translators, which start listening posts for new network protocols.


This webpage is similar to "HOPE." It shows the same photographs
and uses the same fist as a button. The difference is the color
and more notably the background. The stars rotate and change in opacity
depending on where the mouse is hovered over the screen.
This is a page that was based around the theme of the cookie shop, Milkbar.
There's not much on this page because we were still learning
how to use CSS and more events like hovering and clicking on things.


Presented by Christabella Irwanto
“In the 300 years since Newton, mankind has come to realize that the laws of physics are always expressed in the language of differential equations.”
- Steven Strogatz
Slope field of derivative for each \((B, t)\)
\(\mathbf{h}_{t+1} = f(\mathbf{h}_t)\)


Research Interests
Protein folding, single molecule techniques, structural biology, molecular dynamics
Education
Duke University
Ph.D. in Computational Biology and Bioinformatics, July 2016
Dissertation Topic: Understanding multi-domain protein folding using single-molecule techniques
Advisors: Prof. Weitao Yang and Prof. Piotr Marszalek
University of Washington at Seattle
B.S. in Applied Computational Math Sciences, June 2010
B.S. in Physics, June 2010
Graduated with honors
Minor in Applied Math and Math
Publications
Li, Q.*, Scholl, Z. N.*, & Marszalek, P. E. (In preparation). Unraveling the unfolding pathways of yeast phosphoglycerate kinase. Biophysical Journal.
Scholl, Z. N., Yang, W. & Marszalek, P. E. (In preparation). Reconstructing the folding pathway of a large, multidomain protein, Luciferase. Biophysical Journal.
Scholl, Z. N., Li, Q., Yang, W. & Marszalek, P. E. (2016). Single-molecule force-spectroscopy reveals the calcium dependency of folding intermediates in the multidomain Protein S. Journal of Biological Chemistry.
Josephs, E.A., Scholl, Z. N., & Marszalek, P. E. (2016). AFM Force Spectroscopy. Introduction to Single Molecule Biophysics Book.
Scholl, Z. N.*, Josephs, Eric.*, & Marszalek, P. E. (2016). A Modular, Non-Degenerate Polyprotein Scaffold for Atomic Force Spectroscopy. Biomacromolecules.
Scholl, Z. N.*, Zhong, J.*, Hartemink, A. J. (2015). Chromatin interactions correlate with local transcriptional activity in Saccharomyces cerevisiae. bioRxiv.
Scholl, Z. N., Yang, W., & Marszalek, P. E. (2015). Direct Observation of Multimer Stabilization in the Mechanical Unfolding Pathway of a Protein Undergoing Oligomerization. ACS Nano.
Li, Q., Scholl, Z. N., & Marszalek, P. E. (2014). Capturing the Mechanical Unfolding Pathway of a Large Protein with Coiled-Coil Probes. Angewandte Chemie International Edition.
Scholl, Z. N., Yang, W., & Marszalek, P. E. (2014). Chaperones Rescue Luciferase Folding by Separating its Domains. Journal of Biological Chemistry, M114.582049.
Scholl, Z. N., & Marszalek, P. E. (2014). Unraveling the Mysteries of Chaperone Interactions of the Myosin Head. Biophysical journal, 107(3), 541-542. (Commentary)
Li, Q., Scholl, Z. N., & Marszalek, P. E. (2014). Nanomechanics of Single Biomacromolecules. In Handbook of Nanomaterials Properties (pp. 1077-1123). Springer Berlin Heidelberg.
Scholl, Z. N., & Marszalek, P. E. (2014). Improving single molecule force spectroscopy through automated real-time data collection and quantification of experimental conditions. Ultramicroscopy, 136, 7-14.
Scholl, Z. N., Li, Q., & Marszalek, P. E. (2014). Single molecule mechanical manipulation for studying biological properties of proteins, DNA, and sugars. Wiley Interdisciplinary Reviews: Nanomedicine and Nanobiotechnology, 6(3), 211-229.
Scholl, Z. N.*, Rabbi, M.*, Lee, D., Manson, L., Hanna, S., & Marszalek, P. E. (2013). Origin of Overstretching Transitions in Single-Stranded Nucleic Acids. Physical review letters, 111(18), 188302.
Loksztejn, A., Scholl, Z. N., & Marszalek, P. E. (2012). Atomic force microscopy captures folded ribosome bound nascent chains. Chem. Commun., 48(96), 11727-11729.
Magwene, P. M., Kayikci, O., Granek, J. A., Reininga, J. M., Scholl, Z. N., & Murray, D. (2011). Outcrossing, mitotic recombination, and life-history trade-offs shape genome evolution in Saccharomyces cerevisiae. Proceedings of the National Academy of Sciences, 108(5), 1987-1992.
Z.N. Scholl. Duke at the 2013 Biophysical Society Meeting. Duke Science Review. 2013.
Conference Presentations
Single-molecule force-spectroscopy freveals the calcium dependency of folding intermediates in the multidomain Protein S, Biophysical Society. (February 2016)
Direct measurement of the multimer stabilization in the mechanical unfolding pathway of Streptavidin, Biophysical Society. (February 2016)
Single-molecule force-spectroscopy freveals the calcium dependency of folding intermediates in the multidomain Protein S, Gordon Conference. (January 2016)
N-terminal domain of Luciferase controls misfolding avoidance, Biophysical Society. (February 2015)
N-terminal domain of Luciferase controls misfolding avoidance, Single Molecule Biophysics Meeting. (January 2015)
N-terminal domain of Luciferase controls misfolding avoidance, 28th Protein Society Meeting. (July 2014)
Direct measurement of the multimer stabilization in the mechanical unfolding pathway of Streptavidin, 28th Protein Society Meeting. (July 2014)
N-terminal domain of Luciferase prevents folding pathway from falling into kinetic trap, 58th Biophysical Society Meeting. (February 2014) *Awarded the Student Research Achievement Award for poster
Origin of Overstretching Transistions in Single-Stranded Nucleic Acids, 58th Biophysical Society Meeting. (February 2014)
N-terminal domain of Luciferase prevents folding pathway from falling into kinetic trap, Gordon Conference on Protein Folding Dynamics. (January 2014)
An AFM study on the ligand influenced mechanical unfolding pathway of Luciferase, 27th Symposium of The Protein Society. (July 2013)
Improving single molecular force spectroscopy through real-time data collection and quantification of experimental conditions, 57th Symposium of The Biophysical Society. (February 2013)
Atomic force microscopy captures ribosome bound nascent chains, 57th Symposium of The Biophysical Society. (February 2013)
Mapping transcription factories in Saccharomyces cerevisiae, Pacific Symposium on Biocomputing. (January 2012)
Teaching Experience
| Autumn | 2014 | Teaching Assistant, Thermodynamics for engineers |
| Fall | 2013 | Teaching Assistant, Thermodynamics for engineers |
| Spring | 2013 | Teaching Assistant, Special topics in single molecule techniques |
| Fall | 2012 | Teaching Assistant, Genomic tools and technology |
Honors and Awards
| 2016 | Education award for the Biophysical Society |
| 2016 | Travel award for the Gordon conference in Protein Folding |
| 2015–2016 | Katherine Stern Dissertation award |
| 2015 | Travel award for the Single Molecule Biophysics Meeting |
| 2014 | Biophysical Society Student Research Achievement Award |
| 2013 | Biophysical Society Art of Science Top 10 Images |
| 2013 | Travel award for 27th Symposium of The Protein Society |
| 2012 | Travel award for Pacific Symposium on Biocomputing |
| 2012–2015 | NSF GRFP award |
| 2011–2012 | NSF GRFP Honorable mention |
| 2010–2012 | Chancellor’s scholarship |
| 2010–2014 | James B. Duke Fellowship |
Society Membership
| 2012-present | Biophysical Society |
| 2013-present | Protein Society |
Professional Experience
Peer reviewer for Angewandte Chemie Int. Ed., Cell, Biophysical Journal, JACS, Langmuir
Developed NSF grants including R21 instrumentation and R01


Clarkson’s Algorithm¶
The basic algorithm for computing a greedy permutation is to insert the points one at a time, keeping track of the reverse nearest neighbors of each point. Adding a new point takes linear time and then updating the reverse nearest neighbors takes linear time. Thus, the entire construction takes quadratic time. There is a clear opportunity for improvement in this algorithm; adding a new point requires checking points that are far away to see if their nearest neighbor has changed. If the new point is far away, we’d like to skip this check.
The following approach attributed to Clarkson reduces these checks (See [Cla97], [Cla99], [Cla03]). The variation we present resembles more closely the presentation in Har-Peled and Mendel [HPM06]. It is incremental. After \(i\) points are added, the current radius is the distance from the last point added to its nearest predecessor. The main idea is to maintain a graph whose vertex set is the current set of inserted points. Each defines a cell. Two vertices are neighbors in this graph if their distance is less than three times the current radius. After each insertion, the only points that move (i.e., have new nearest neighbors) are those that are in cells adjacent to the cell of the new point. This eliminates many checks. Moreover, the neighbors of the new cell are also found among the neighbors of the cell of the new point. The implementation of this algorithm uses the neighborgraph data structure.
- Cla97
Kenneth L. Clarkson. Nearest neighbor queries in metric spaces. In STOC ‘97: Proceedings of the twenty-ninth annual ACM symposium on Theory of computing. 1997.
- Cla99
Kenneth L. Clarkson. Nearest neighbor queries in metric spaces. Discrete & Computational Geometry, 22(1):63–93, 1999.
- Cla03
Kenneth L. Clarkson. Nearest neighbor searching in metric spaces: experimental results for `sb(s)`. Preliminary version presented at ALENEX99, 2003.
- HPM06
Sariel Har-Peled and Manor Mendel. Fast construction of nets in low dimensional metrics, and their applications. SIAM Journal on Computing, 35(5):1148–1184, 2006.


Running Bash scripts on Windows
How to run Bash scripts from Windows’ command prompt and extend it with common Unix commands.
The following setup allows one to run Bash scripts from Windows’ command prompt. It also augments it with common Unix commands like cp
, rm
and mv
, which is useful if these are ingrained into muscle memory.
Note that this setup affects the command prompt (AKA cmd.exe
). Although Windows 10 includes a full-fledged Ubuntu Linux Bash Shell, that shell – like PowerShell – is separate from the command prompt. Therefore, the following instructions still apply to Windows 10, as well as to earlier Windows versions. (For a brief list of standalone Bash shells for Windows, see the discussion at the end.)
Bash scripts (with an extension of .sh
) are a Unix invention, and should not be confused with batch files (with an extension of .bat
), which are a Windows invention. However, we could say that our goal is to help Windows run Bash scripts as if they were batch files.
Git for Windows
Install Git for Windows. When asked whether to install additional Unix utilities, choose Use Git and optional Unix tools from the Windows Command Prompt:
(The lighter Use Git from the Windows Command Prompt option can also be chosen, but then one must install MSYS manually.)
We can now open a command prompt window and run a Bash script as follows:
sh script.sh
If the script accepts parameters, we just provide them at the end:
sh script.sh --param1 val1 --param2 val2
Git for Windows also extends the command prompt with common Unix commands like cp
, rm
and mv
:
cp script.sh script2.sh
rm script.sh
mv script2.sh script.sh
Git Bash, a standalone shell, is installed as well. It can be run as a separate program, or in the command prompt. To do the latter, just type bash
; to return to the standard command prompt, type exit
. A .bash_profile
file can be used to store settings between sessions. To edit this file, start Git Bash and type:
notepad ~/.bash_profile
(Feel free to substitute vi
for notepad
if familiar with the former.) Below is an example file that configures the history size:
HISTSIZE=10000
HISTFILESIZE=10000
Configuring Bash settings is not covered here – that is a topic in its own right. Note that Git Bash typically stores the .bash_profile
file at C:\Users\user\.bash_profile
.
PATHEXT
Update With further refinements, we can trim the initial “sh
” from the script invocation in the command prompt. First, associate .sh
files with sh.exe
. To do this, create a blank script.sh
file (with Notepad, for example) and right-click on it. Choose Open with from the context menu. Click More apps and navigate to C:\Program Files\Git\bin\sh.exe
. Enable Always use this app to open .sh files and click OK.
Next, update the value of the PATHEXT
environmental variable. To access the variable, go to Control Panel → System → Advanced → Environment Variables. The value is a list of file extensions separated by ;
, for example:
.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
Add ;.SH
to the end:
.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.SH
We can now run .sh
files directly from the command prompt, like so:
script.sh --param1 val1 --param2 val2
We can also run a .sh
file by clicking on it. However, note that the .sh
extension is required to identify the file as a Bash script. Windows does not parse the #!/bin/sh
shebang line; to execute an extensionless script, use sh
(e.g., sh script
).
GnuWin32
For even more Unix utilities, install GnuWin32. Ensure that its utilities are globally available by appending the location of GnuWin32’s executables (its bin/
directory) to the PATH
environment variable. The value is a list of file paths separated by ;
, for example:
%SystemRoot%\system32;%SystemRoot%;C:\Ruby22\bin
Thus, if GnuWin32’s executables are located in C:\GnuWin32\bin
, simply add ;C:\GnuWin32\bin
to the end:
%SystemRoot%\system32;%SystemRoot%;C:\Ruby22\bin;C:\GnuWin32\bin
On Windows 10, the variable may be displayed as an editable list of directories. Add the directory to the bottom of the list.
We now have a host of tools at our command. For example, make
builds a software project from a Makefile, while wget
downloads a file from the Internet. Peruse GnuWin32’s package list to get a sense of the possibilities.
MinGW
For additional developer tools, augment the above setup with a complete installation of MinGW. Append its directory to PATH
after the other directories.
We can now link (ld
) and compile C programs (gcc
) and C++ programs (g++
).
Alias open
Windows does not have the open
command, and none of the packages above provide it. To alias open
to Windows’ start
command, navigate to MSYS’ bin/
directory (C:\Program Files\Git\usr\bin
or C:\msys\1.0\bin
) and create an open.bat
file containing the following:
@echo off
start %*
For Git Bash, we need to add a Bash alias to .bash_profile
. Start Git Bash and type:
notepad ~/.bash_profile
Then add the following line:
alias open='start'
Alias find
Windows’ own find
utility shadows the Unix find
command. To create an alias for the latter, make a copy of find.exe
, find2.exe
, in the same folder (typically C:\Program Files\Git\usr\bin
). The Unix command can now be accessed as find2
.
Alternatively, switch to Git Bash for the duration of the command:
bash
find . -name "*.txt"
exit
Alternatives
MSYS
The above instructions assume that MSYS is installed along with Git for Windows. However, it is also possible to install MSYS manually. If this applies, then run the MSYS installer and append MSYS’ bin/
directory to PATH
after the other directories.
Standalone shells
Windows 10 includes its own Linux Bash Shell, based on Ubuntu. Note that this is a standalone shell, similar to PowerShell; Windows 10’s command prompt is unaffected and will still benefit from the instructions above. However, a standalone shell may provide built-in functionality that cannot be added to the command prompt (searchable history, for example).
Also note that if we install the Linux Bash Shell, then the bash
command switches to that shell, not to Git Bash. However, we can still use the git bash
command to change to Git Bash from the command prompt.
Another comprehensive standalone shell is provided by the Cygwin project, which can be used on older Windows versions. MSYS and MinGW also provide standalone shells. Git Bash, the shell provided by Git for Windows, is in fact an extension of these.


10. Floating point instructions¶
These instructions support the use of the ARM floating point coprocessor
(on platforms such as the Pyboard which are equipped with one). The FPU
has 32 registers known as s0-s31
each of which can hold a single
precision float. Data can be passed between the FPU registers and the
ARM core registers with the vmov
instruction.
Note that MicroPython doesn’t support passing floats to
assembler functions, nor can you put a float into r0
and expect a
reasonable result. There are two ways to overcome this. The first is to
use arrays, and the second is to pass and/or return integers and convert
to and from floats in code.
10.1. Document conventions¶
Notation: Sd, Sm, Sn
denote FPU registers, Rd, Rm, Rn
denote ARM core
registers. The latter can be any ARM core register although registers
R13-R15
are unlikely to be appropriate in this context.
10.2. Arithmetic¶
vadd(Sd, Sn, Sm)
Sd = Sn + Sm
vsub(Sd, Sn, Sm)
Sd = Sn - Sm
vneg(Sd, Sm)
Sd = -Sm
vmul(Sd, Sn, Sm)
Sd = Sn * Sm
vdiv(Sd, Sn, Sm)
Sd = Sn / Sm
vsqrt(Sd, Sm)
Sd = sqrt(Sm)
Registers may be identical: vmul(S0, S0, S0)
will execute S0 = S0*S0
10.3. Move between ARM core and FPU registers¶
vmov(Sd, Rm)
Sd = Rm
vmov(Rd, Sm)
Rd = Sm
The FPU has a register known as FPSCR, similar to the ARM core’s APSR, which stores condition codes plus other data. The following instructions provide access to this.
vmrs(APSR_nzcv, FPSCR)
Move the floating-point N, Z, C, and V flags to the APSR N, Z, C, and V flags.
This is done after an instruction such as an FPU comparison to enable the condition codes to be tested by the assembler code. The following is a more general form of the instruction.
vmrs(Rd, FPSCR)
Rd = FPSCR
10.4. Move between FPU register and memory¶
vldr(Sd, [Rn, offset])
Sd = [Rn + offset]
vstr(Sd, [Rn, offset])
[Rn + offset] = Sd
Where [Rn + offset]
denotes the memory address obtained by adding Rn to the offset. This
is specified in bytes. Since each float value occupies a 32 bit word, when accessing arrays of
floats the offset must always be a multiple of four bytes.
10.5. Data comparison¶
vcmp(Sd, Sm)
Compare the values in Sd and Sm and set the FPU N, Z,
C, and V flags. This would normally be followed by vmrs(APSR_nzcv, FPSCR)
to enable the results to be tested.
10.6. Convert between integer and float¶
vcvt_f32_s32(Sd, Sm)
Sd = float(Sm)
vcvt_s32_f32(Sd, Sm)
Sd = int(Sm)


Spring Data Jpa provides a higher level of abstraction than having to deal with the Jpa api directly. A great deal of boilerplate code can be avoided when using Spring Data Jpa. When you combine Spring Data Jpa with Play you can focus on solving the business problem at hand.
This project uses Java but can work equally as well with Scala.
This tutorial will take about 10 minutes to complete and assumes that you are already familiar with the basics of a Play application.
Our domain model is simple for the purposes of demonstrating Spring Data. Person describes a Jpa entity with a few properties, namely id, firstname and surname.
The members are declared public as Jpa entities tend to be simple structures. When behaviour is required then it tends to be related to the instance. Class level behaviour is relegated to a repository e.g. finding instances (discussed next).
Play will synthesise getters and setters for public properties so they do not have to be declared. You typically declare getters and setters when you require behaviour beyond getting or setting the property. Getters and setters are required by Jpa for entity classes, so this is a nice saving of code given Play.
Repositories represent the operations that are performed on an "aggregate root" object. The aggregate root ensures the consistency of changes being made within the aggregate e.g. if an Order is to be saved then any associated order details are saved along with it. Operations on a repository therefore tend to be atomic in nature and manage their own transactions.
We have created a simple PersonRepository
that extends Spring Jpa's CrudRepository; Crud representing common Create Retrieve Update and Delete operations.
We use @Named
to declare that the repository is available for dependency injection and
@Singleton
to declare that only one instance of it is generally required.
You can do a great deal with Spring Data Jpa and provide custom behaviour for the repository. The operations on a repository tend to relate strongly to how the logic layer (web controllers) atomically consumes and produces data.
Application represents a conventional
means of making a synchronous, blocking call to a database (JPA is synchronous and blocking). The repository
is injected into the controller via constructor injection via the use of @Inject
. We use
constructor injection in order to promote an immutable programming model. Immutable variables assist toward
providing an inherently thread-safe application.
Note that you have not had to provide any code to perform the repository's save
or
findOne
operations. Spring Data did that for you.
As with the repository being used, Application
is declared as being injectable
as a single instance via @Inject
and @Singleton
respectively.
Because Spring's dependency injection system is being used we declare Application as a class with instance
methods as opposed to static methods. This is so that we can have Play ask our Global
object
for instances of Application
that have been subjected to dependency injection. More on the
Global
object next.
Global sets up Spring's dependency injection system and configures Spring Data with Jpa concerns.
An AnnotationConfigApplicationContext
is established and started such that it scans the
controllers
and models
packages for @Named
classes to become
available for dependency injection. In addition a SpringDataJpaConfiguration
inner class is
instantiated and provides further configuration of Spring Data. In particular an
EntityManagerFactory
is made available that uses the a Jpa persistence unit named "default".
You can see this persistence unit declared in conf/META-INF/persistence.xml
.
The getControllerInstance
method is called on by Play whenever a controller is required.  Check out the routes file for the
declaration of controllers.Application.index
. We pass on the responsibility of locating a
controller instance to Spring so that it is subject to dependency injection.
ApplicationIT provides an
integration test for the
Application
controller. The purpose of the test is to exercise the
routing configuration and the logic within the controller's methods. Dependencies of the controller are
not intended to be tested here and so the PeopleRepository
is
mocked. Most importantly no database
is required to be established for this test to run, thereby resulting in a simpler and perhaps faster test.
The mocked PeopleRepository
is manually injected into the Application
controller,
and the controller is made available in a stub implementation of the GlobalSettings
class.
Because the test extends WithApplication
, it is focused on testing a Play application. We
construct a FakeApplication
with the instance of the GlobalSetting
stub as part of the
test setup. The indexSavesDataAndReturnsId
test then performs its specific setup and routes a
GET
request. Finally expectations are set on the response.
This tutorial has taken you through the requirements of a Play application in order to use Spring Data Jpa. While this project uses Java you can use Scala equally as well. Spring Data also provides support for NoSQL stores and so a similar setup to this project can be used for many types of repository.
Happy Play-ing with Spring Data.


Selenium Meetups
Find out what's happening in Selenium Meetup groups around the world and start meeting up with the ones near you.
{{ partial "header.html" . }}
The next flagship Selenium conference will be held in London, UK. The SeConf brings together Selenium developers & enthusiasts from around the world to share ideas, socialize, and work together on advancing the present and future success of the project.


I remember when my dad brought home our first computer and setting it up. This was in the early 90s before most homes had internet. Our desktop was only used for games and typing. A few years later we bought a Gateway which had dial up internet, and my world changed. From AOL instant messenger, Xanga, MySpace to downloading music, computers were something I used daily. I would only use them on a surface level, and not understand what is going on behind the scenes.This surface level intrest stuck around until my brother a computer analyst told me to check out some courses on Front-End Web Development
I started using online resources to teach myself HTML and CSS in the begiining of May 2017. Using resources such as Lynda.com, freecodecamp.com. After creating my first "Hello World, I was hooked! A few months of learning on my own, I continued to hear about coding programs. I decided to apply for General Assembly's Full Stack Web Deveoper Program.After completing the course, I am excited to begin my carerrer while growing as a developer.
Excited for the future of technology and even more excited to be apart of shaping that future.


cloud
favorite
computer
Hey there am Nelson ;)
i am a web developer from kenya , i enjoy building everything from small sites to interactive web apps, if you are in business seeking web presences or an employer looking to hire,you can get in touch with me.
Here
websites are done simple easy smart
i am inspired by nature
Here is a link to
about me
cloud
favorite
computer


Video credit: "Hearbeat" by conolan on Pixabay
<video width="640" height="360" src="../static/Heart%20-%208449.mp4"></video>


Please enter API endpoint
KuUI
alpha
Web app to manage your K8S ConfigMap and Secrets
Create
Update
Delete
Please select ConfigMap or Secret:
ConfigMap
Secret
Select Namespace
Select Name
Update ConfigMap
Please select the namespace and the name of the resource to delete.
Enter the name of the resource again, that you want to delete
Delete ConfigMap
From literal
From file
File name:
Create ConfigMap
*


CORONAVIRUS (COVID-19) UPDATES
April 22, 2020
Click Image to View the Public Health Rule Suspension Notice:
April 21, 2020
In an effort to provide timely and accurate information regarding the impact of COVID-19 on our operations, the numbers of positive DOC-related COVID-19 cases under quarantine will be posted here each Tuesday and Friday:
The groups referred to in the above chart are broken down as follows:
• Inmates/Residents (Inmates reside in State Prison Units. Residents reside in our Community Correction Centers and
Supervision Sanction Programs.);
• Facility Security Staff;
• Facility Non-Security Staff; and
• Non-Facility Staff (Includes Central Office Staff, Parole & Probation Officers, Teachers, etc.)
Each update will likely vary based on the number of positives under quarantine at that time.
April 21, 2020
ARKANSAS DEPARTMENT OF HEALTH GUIDANCE FOR CORRECTIONAL FACILITIES:
- COVID-19: Guidance for State Correctional Facilities and Local Detention Facilities (March 27, 2020)
- Reducing Spread of COVID-19 in Correctional Facilities (April 15, 2020)
April 17, 2020
Inmates reside in State Prison Units.
Residents reside in our Community Correction Centers and Supervision Sanction Programs.
April 16, 2020
FACE MASKS HELP SLOW THE SPREAD OF COVID-19
The Centers for Disease Control (CDC) recommends wearing cloth face coverings (masks) to help slow the spread of COVID-19. They offer a great online resource with helpful information on the wear and care of cloth face coverings, as well as how to make them (even if you can’t sew).
Check it out here: https://www.cdc.gov/coronavirus/2019-ncov/prevent-getting-sick/diy-cloth-face-coverings.html
April 15, 2020
INMATE VISITATION SUSPENSION EXTENDED TO JUNE 1, 2020
Our continuing efforts to slow the spread of COVID-19 within our facilities has called for the Arkansas Department of Corrections to extend the suspension of inmate visitation until June 1, 2020. The suspension includes all prisons and community correction centers, and it applies to regular and special visits.
LOWER RATES FOR PHONE CALLS, VIDEO VISITS, AND EMAILS REMAIN IN EFFECT
Because we want you to remain in touch with your loved one during this time, lower rates for phone calls, video visitation and emails will remain in effect until June 1 as well.
April 14, 2020
*Inmates (Includes Residents in our Community Correction Centers and Supervision Sanction Programs)
April 10, 2020
*Inmates (Includes Residents in our Community Correction Centers and Supervision Sanction Programs)
April 7, 2020
*Inmates (Includes Residents in our Community Correction Centers and Supervision Sanction Programs)
April 3, 2020
*Inmates (Includes Residents in our Community Correction Centers and Supervision Sanction Programs)
March 20, 2020
Click Image to Enlarge Information on COVID-19 Precautions for Entering All Correctional and Detention Facilities - Dated 3/20/2020:
March 18, 2020
Click Image to Enlarge Info from Arkansas Department of Corrections on Adjusted Phone and Video Visitation Rates - Dated 3/18/2020:
HERE ARE SOME HELPFUL WEB LINKS FOR OUR INMATE COMMUNICATION SERVICES:
- Division of Correction PHONE and VIDEO VISITATION: https://securustech.net
- Division of Community Correction PHONE: https://securustech.net
- Division of Community Correction VIDEO VISITATION: www.homewav.com
March 17, 2020
Click Image to Enlarge FAQs from Arkansas Department of Emergency Management on Preparing Your Home and Children - Dated 3/17/2020:
March 16, 2020
Click Image to Enlarge News Release from Arkansas Department of Corrections on Suspension of Inmate Visitation - Dated 3/16/2020:
March 15, 2020
Click Image to Enlarge Information on Health Care Resources - Dated 3/15/2020:
March 14, 2020
Click Image to Enlarge Media Alert from the Arkansas National Guard - Dated 3/14/2020:
March 13, 2020
Click Image to Check Out Details Regarding VIDEO VISITATION here:
March 11, 2020
Click Image for Message from Secretary Wendy Kelley Dated 3/11/2020:
Social Media


--- creation_epoch:<PHONE_NUMBER> lastmod_epoch:<PHONE_NUMBER> categories: Misc title: Debugging a computer literally --- I discovered a bug had crawed onto my motherboard. Fortunately it didn't do any damage.


the and for giant were during fecal was metabolites concentrations The with estrous anteaters reproductive females . ± . study cycle female that this {background pregnancy days are hormone Figure []. anteater from margin luteal {border-style implantation parturition px;} #ffffff;} captive determined not observed rise also reported used between extraction Fecal activity animals delayed immunoassay phase pregnancy. similar two This antibody assay been cycles estrogen estrogens examined other al. breeding but elevated first late multiparous period prior secondary steroid than concentration described feces have nulliparous previously Zoo after anteaters. birth enzyme glucocorticoid greater had metabolite pregnant samples their three using years Estrous Patzl Table [,]. age all both can data may ovarian sexual wild (days) . ± .a . ± .b For Reprod baseline characteristics days; endocrine has monitoring more occurred parturition. peak peaks provided px; result use which within {font-family (Emelia, Concentrations Praim, above days) each elevation endocrinology estrus file font-size gestation high hormones increase length methods only primary progesterone shorter tridactyla (A) (B) (Table (e.g., Data Lia, Nashville [], compared considered cycling did differences double; extracts highest male mean number parallel pregnancy, progestagen provide ranging remaining standard status (:) (Figure (mean, All Emelia Extraction GC, Lia SEM animal apparent based border-color border-width buffer changes collection conjugate date diapause diluted dilutions duration evidence exhibit exhibited fold further impending initial into lower males managers metabolites, method multiple ng/g; occur over performed phases populations progestagens range ranged report sampling selected solid; species steroids studies tested those through total under useful values year younger {font-style {font-weight < % (C) (Myrmecophaga Age Aquariumshttp://www.aza.org Ethanol Giant Memphis Method, Myrmecophaga Odelia Praim Pregnancy SB, These Zoos addition, analysis anticipated armadillo bold collected conditions consecutive correlated could courier; cross–reacts cycles, day days. determine domestic em; employed estrogen, female. females. following four gave greatest here immunoassays improve knowledge lack lengths little longer neonatal ng/g occurring our patterns pg/well. physiology population post–partum pregnancies profile profiles pt;} rabbit range, reproduction serum significantly six solvated success supernatant support tetradactyla thawed these they unclear when whether xenarthrans Pregnancy,


These are just plain constants. Some are boolean flags.
| Parameter | Query String Keys | Type | Default Value |
|---|---|---|---|
| Branching Depth | depth |
Integer [1, ∞) | 6 |
| Trunk height | th |
Float (0, ∞) | 0.3 |
| Wind | windx |
String | 0 |
windy |
String | 0 | |
| Color | color |
String | "black" |
bgcolor |
String | "none" | |
| Branch at tip | bat |
Boolean | false |
Tip: scroll this table left and right.
The inputs listed below are parameters to various random
distributions used. If they're inputs to a Normal
distribution they'll have m
and v
appended
to the name to indicate the mean and
variance inputs, respectively. Likewise for the
l
and h
suffixes used in the
Uniform distribution parameter names.
| Parameter | Distribution | Query String Keys | Usage |
|---|---|---|---|
| Branch Angles | Normal | arm , arv |
N(arm = 65, arv = 5) |
Tip: scroll this table left and right.


ActionScript 3 Sound Management Engine
Stable and properly factorised release. Includes new pitch shifting class (SeionPitch).


Galvanize Delivers
Order Delivery
Menu
Royal with Cheese
8.99
ADD TO ORDER
Arugula Pie
11.99
ADD TO ORDER
Smoked Swine
14.99
ADD TO ORDER
Ice Cream Biscuit
8.99
ADD TO ORDER
Order Summary
Item
Price
Royal with Cheese
0.00
Arugula Pie
0.00
Smoked Swine
0.00
Ice Cream Biscuit
0.00
Subtotal
0.00
Tax
0.00
Total
0.00
Information
account_circle
phone
business
Submit
send


@@include('includes/header.html')
@@include('includes/menu.html')
This is the index page in the first sub


|
BubbleProfiler
0.3.0
by Peter Athron, Csaba Balazs, Michael Bardsley, Andrew Fowlie, Dylan Harries & Graham White
|
Implements a multi dimensional scalar field potential, which may be expressed as almost any algerbraic fucntion. More...
#include <algebraic_potential.hpp>
Public Member Functions | |
| Algebraic_potential (const std::vector< std::string > &fields, const std::string &expr) | |
| Construct from list of fields and GiNaC potential string. More... | |
| virtual | ~Algebraic_potential ()=default |
| Algebraic_potential * | clone () const |
| Get a fresh copy of this potential. More... | |
| virtual double | operator() (const Eigen::VectorXd &coords) const override |
| Evaluate potential at point. More... | |
| virtual double | partial (const Eigen::VectorXd &coords, int i) const override |
| Partial derivative WRT coordinate i at a point. More... | |
| virtual double | partial (const Eigen::VectorXd &coords, int i, int j) const override |
| Partial derivative WRT coordinates i, j at a a point. More... | |
| virtual std::size_t | get_number_of_fields () const override |
| virtual void | translate_origin (const Eigen::VectorXd &) override |
| Shift the location of the origin by a specified vector. More... | |
| virtual void | apply_basis_change (const Eigen::MatrixXd &) override |
| Apply a change of basis matrix. More... | |
| virtual void | add_constant_term (double) override |
| Add a constant offset to the potential. More... | |
| Public Member Functions inherited from BubbleProfiler::Potential | |
| virtual | ~Potential ()=default |
Private Member Functions | |
| double | eval (const GiNaC::ex &, const Eigen::VectorXd &) const |
| void | build_derivatives () |
Private Attributes | |
| std::vector< std::string > | fields {} |
| GiNaC::ex | v {} |
| GiNaC expression to hold potential. More... | |
| std::vector< GiNaC::ex > | first_partials {} |
| First partials. More... | |
| std::vector< std::vector< GiNaC::ex > > | second_partials {} |
| Second partials. More... | |
| std::vector< GiNaC::symbol > | syms {} |
| GiNaC symbols matched to fields vec. More... | |
| logging::Basic_logger | logger {} |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const Algebraic_potential &p) |
Implements a multi dimensional scalar field potential, which may be expressed as almost any algerbraic fucntion.
Given a vector of field names, and a GiNaCs expression specifying a scalar function of these fields, this class provides a an implementation of Potential suitable for calculating bubble profiles.
For the profiler to work correctly, the potential should be a fourth degree polynomial.
Definition at line 36 of file algebraic_potential.hpp.
| BubbleProfiler::Algebraic_potential::Algebraic_potential | ( | const std::vector< std::string > & | fields, |
| const std::string & | expr | ||
| ) |
Construct from list of fields and GiNaC potential string.
| fields | vector of field names. These must match the fields in expr. |
| expr | specification of potential in GiNaCs syntax. |
Note that the potential is expected to be a quartic multivariate polynomial in the specified fields.
Definition at line 26 of file algebraic_potential.cpp.
References build_derivatives(), BubbleProfiler::logging::Basic_logger::log_message(), logger, sm_plus_singlet::parser, syms, BubbleProfiler::logging::Trace, and v.
Referenced by clone().
|
virtualdefault |
|
overridevirtual |
Add a constant offset to the potential.
| offset | constant term to add to potential |
Implements BubbleProfiler::Potential.
Definition at line 132 of file algebraic_potential.cpp.
References BubbleProfiler::logging::Basic_logger::log_message(), logger, BubbleProfiler::logging::Trace, and v.
Referenced by get_number_of_fields().
|
overridevirtual |
Apply a change of basis matrix.
| cob_matrix |
Implements BubbleProfiler::Potential.
Definition at line 96 of file algebraic_potential.cpp.
References build_derivatives(), BubbleProfiler::logging::Basic_logger::log_message(), logger, syms, BubbleProfiler::logging::Trace, and v.
Referenced by get_number_of_fields().
|
private |
Definition at line 49 of file algebraic_potential.cpp.
References first_partials, second_partials, syms, and v.
Referenced by Algebraic_potential(), apply_basis_change(), and translate_origin().
|
inlinevirtual |
Get a fresh copy of this potential.
Implements BubbleProfiler::Potential.
Definition at line 52 of file algebraic_potential.hpp.
References Algebraic_potential(), operator()(), and partial().
|
private |
Definition at line 143 of file algebraic_potential.cpp.
References syms.
Referenced by operator()(), and partial().
|
inlineoverridevirtual |
Implements BubbleProfiler::Potential.
Definition at line 59 of file algebraic_potential.hpp.
References add_constant_term(), apply_basis_change(), and translate_origin().
Referenced by BubbleProfiler::run_perturbative_profiler(), and BubbleProfiler::run_shooting_profiler().
|
overridevirtual |
Evaluate potential at point.
| coords | Coordinates at which to evaluate |
Implements BubbleProfiler::Potential.
Definition at line 166 of file algebraic_potential.cpp.
Referenced by clone().
|
overridevirtual |
Partial derivative WRT coordinate i at a point.
| coords | Coordinates at which to evaluate |
| i | Index of coordinate to be differentiated |
Implements BubbleProfiler::Potential.
Definition at line 172 of file algebraic_potential.cpp.
References eval(), and first_partials.
Referenced by clone().
|
overridevirtual |
Partial derivative WRT coordinates i, j at a a point.
| coords | Coordinates at which to evaluate |
| i | Index of first coordinate to be differentiated |
| j | Index of second coordinate to be differentiated |
Implements BubbleProfiler::Potential.
Definition at line 178 of file algebraic_potential.cpp.
References eval(), and second_partials.
|
overridevirtual |
Shift the location of the origin by a specified vector.
| translation | shift of origin |
Implements BubbleProfiler::Potential.
Definition at line 69 of file algebraic_potential.cpp.
References build_derivatives(), BubbleProfiler::logging::Basic_logger::log_message(), logger, syms, BubbleProfiler::logging::Trace, and v.
Referenced by get_number_of_fields().
|
friend |
Definition at line 67 of file algebraic_potential.hpp.
|
private |
Definition at line 74 of file algebraic_potential.hpp.
|
private |
First partials.
Definition at line 76 of file algebraic_potential.hpp.
Referenced by build_derivatives(), and partial().
|
private |
Definition at line 79 of file algebraic_potential.hpp.
Referenced by add_constant_term(), Algebraic_potential(), apply_basis_change(), and translate_origin().
|
private |
Second partials.
Definition at line 77 of file algebraic_potential.hpp.
Referenced by build_derivatives(), and partial().
|
private |
GiNaC symbols matched to fields vec.
Definition at line 78 of file algebraic_potential.hpp.
Referenced by Algebraic_potential(), apply_basis_change(), build_derivatives(), eval(), and translate_origin().
|
private |
GiNaC expression to hold potential.
Definition at line 75 of file algebraic_potential.hpp.
Referenced by add_constant_term(), Algebraic_potential(), apply_basis_change(), build_derivatives(), operator()(), and translate_origin().


Pierre Osselin
Home
About
Resume
Visualization of 2D Functions
Initial point:
Descent step:
Related Posts
Optimization Interactive Visualization
13 Apr 2020
Dirichlet Process for mixture modeling and Application
09 Sep 2019
Modeling and analysis of social network data from rank preferences
08 Sep 2019
Please enable JavaScript to view the
comments powered by Disqus.