diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
import pandas
+chicks = pandas.read_csv("chickwts.txt")
+import plotnine
+from plotnine import *
+p=(ggplot(data=chicks) +
+ aes(x="feed",y="weight") +
+ geom_point(color="blue") +
+ theme_classic())
+print p
+def null(p,obs):
+ B0=p[0]
+ sigma=p[1]
+
+ expected=B0
+ nll= -1*scipy.stats.norm(expected,sigma).logpdf(obs.weight).sum()
+ return nll
+def alter(p,obs):
+ B0=p[0]
+ B1=p[1]
+ sigma=p[2]
+
+ expected=B0+B1*obs.x # error?
+ nll= -1*scipy.stats.norm(expected,sigma).logpdf(obs.weight).sum()
+ return nll
+chicks = pandas.read_csv("chickwts.txt")
+
+#fixed subset
+subset1 = chicks.loc[chicks['feed'].isin(['sunflower','soybean'])]
+subset1['x'] = [0 if ele == "soybean" else 1 for ele in subset1["feed"]]
+import numpy
+import scipy
+from scipy import optimize
+from scipy import stats
+from scipy.stats import norm
+initialGuess=numpy.array([1,1])
+alterGuess=numpy.array([1,1,1])
+fitNull=scipy.optimize.minimize(null,initialGuess,method="Nelder-Mead",options={'disp':True},args=subset1)
+fitAlter=scipy.optimize.minimize(alter,alterGuess,method="Nelder-Mead",options={'disp':True},args=subset1)
+print(fitNull)
+print(fitAlter)
+#### The results
+D=2*(fitNull.fun-fitAlter.fun)
+print "result"
+print 1-scipy.stats.chi2.cdf(x=D,df=1)
+# sunflower seed sig increases weight
+
+Regular experesions are a powerful tool to select only the text string you want.
+Follow along on this exercise due the day after thanksgiving :( for three useful scenarios.
+ +import re
+times after noon but before midnight in military times (12:01 to 23:59)
+ +# the regular expression
+a = r'(([1][3-9]|[2][0-3]):[0-5][0-9])|(12:[0-5][1-9])'
+Our regular expression captures times by breaking down the military time into selectable portions. +We first select the hour digits with an expression "[1][3-9]|[2][0-3]". This experession captures hours 13-19 or hours 20-23. We then select the ":" and then minutes 00-59 with "[0-5][0-9]". Finally, because we did not want to select noon we have to create an additional or statement that says select everying from 12:01 to 12:59 we do this with: "12:[0-5][1-9]".
+Let's see this in action.
+ +# create an example list, notice there are times we don't want to select
+times = ["1:00","2:40","4:50","10:50","11:59","12:00","12:01", "13:50", "15:10", "17:20", "20:20", "22:22",
+ "23:00", "23:59", "24:00"]
+
+# example
+select_times = re.compile(a)
+time_result = filter(select_times.match, times)
+print str(time_result)
+# the regular expression
+b = r'[A-Z]\.\s[a-z]+'
+This regular expression captures only strings containing the abbreviated Genus (G.) with "[A-Z]." It then caputres strings containing a space followed by a lowercase species name of any length with this "\s[a-z]+".
+Let's check out the example below!
+ +# create an example list, notice there are things we don't want to select
+species = ["H. sapiens", "turkey", "t. rot", "thanksgiving", "holiday", "time off", "M. pecosella", "R. pomonella",
+ "Homo. sapiens", "T. Urkey", "T. urkey", "R. elaxing", "stuffing", "Pumpkin pie", "M. stellela"]
+
+# example
+select_species = re.compile(b)
+species_result = filter(select_species.match, species)
+print str(species_result)
+# the regular expression
+c = r'[0-9]{3}-[0-9]{2}-[0-9]{4}'
+Here in this last example, we see that regex is useful for matching the exact format of social security numbers. +"[0-9]{3}-[0-9]{2}-[0-9]{4}" matches 3 of any number, a dash, 2 of any number, a dash, and finally 4 of any number.
+This code is useful if you ever want to steal social security numbers from a large dataframe! Follow alog in the example below!
+ +# create an example list
+social = ["1234567", "1234345", "123-34353-346", "321-33-5543", "234-432-5453", "321-34-454", "232-31-5436", "Turkey", "232-2a-4323"]
+
+# example
+select_social = re.compile(c)
+social_result = filter(select_social.match, social)
+print str(social_result)
+