Has anyone got a job without a degree CompSci degree ?
Basic question. Im learning python right now and its starting to make sense. Just wondering if you can land a job if you have a good portfolio of programs you have written ?
/r/Python
https://redd.it/5jn9gg
Basic question. Im learning python right now and its starting to make sense. Just wondering if you can land a job if you have a good portfolio of programs you have written ?
/r/Python
https://redd.it/5jn9gg
reddit
Has anyone got a job without a degree CompSci degree ? • /r/Python
Basic question. Im learning python right now and its starting to make sense. Just wondering if you can land a job if you have a good portfolio of...
Estimate distribution of d prime in signal detection
I want to use maximum likelihood to derive the estimate d prime for extreme result of signal detection.
* The noise centers at 0 and signal centers at d prime. Both noise and signal have the same variance, and we assume it as 1 for now.
* Criterion is always half of d prime.
The goal is to find the probability of 'no error' data: zero counts for Miss and FA.
As I simulate use d prime from 0 to 40 in step size of 0.5, I found a probability shape like [graph](https://github.com/adowaconan/simulation/blob/master/lab%202.ipynb) in **Q3A**.
How do I derive the maximum likelihood estimate of d prime based on a given data set?
Say give a data set that is 'no error':
hit = 100, miss = 0, false alarm = 0, correct rejection = 100.
For this data set, the # of signal and # of noise are the same as 100.
I used Bernoulli method to calculate the maximum likelihood for d prime and get infinity by hand, but I don't know how to do it in python and not sure if it is correct.
Any suggestions?
/r/pystats
https://redd.it/4bai6p
I want to use maximum likelihood to derive the estimate d prime for extreme result of signal detection.
* The noise centers at 0 and signal centers at d prime. Both noise and signal have the same variance, and we assume it as 1 for now.
* Criterion is always half of d prime.
The goal is to find the probability of 'no error' data: zero counts for Miss and FA.
As I simulate use d prime from 0 to 40 in step size of 0.5, I found a probability shape like [graph](https://github.com/adowaconan/simulation/blob/master/lab%202.ipynb) in **Q3A**.
How do I derive the maximum likelihood estimate of d prime based on a given data set?
Say give a data set that is 'no error':
hit = 100, miss = 0, false alarm = 0, correct rejection = 100.
For this data set, the # of signal and # of noise are the same as 100.
I used Bernoulli method to calculate the maximum likelihood for d prime and get infinity by hand, but I don't know how to do it in python and not sure if it is correct.
Any suggestions?
/r/pystats
https://redd.it/4bai6p
GitHub
adowaconan/simulation
Contribute to simulation development by creating an account on GitHub.
Security release: Jupyter Notebook 4.3.1
http://blog.jupyter.org/2016/12/21/jupyter-notebook-4-3-1/
/r/IPython
https://redd.it/5jmnwy
http://blog.jupyter.org/2016/12/21/jupyter-notebook-4-3-1/
/r/IPython
https://redd.it/5jmnwy
Project Jupyter
Security release: Jupyter Notebook 4.3.1
We have just released Jupyter Notebook 4.3.0 and 4.3.1 with some important security fixes. You can check out the changelog for more details on the many fixes and improvements. I'm going to focus on the security changes in this post. 4.3.0: Token authentication…
serving static files help error
So I have a flask app that takes a csv then display the graph of the csv my problem is that the graph it displays does not update when I change the csv to something else even though I have route defined and it is called
@app.route("/static/<figName>",methods=['post','get'])
def renderFigure(figName):
fileLocation = os.getcwd()+"\\static\\"
print("rendering image",figName)
return send_from_directory(fileLocation, figName)
heres the html
<img src="{{ url_for('static', filename=figName) }}"} alt="..." class="img-thumbnail">
It always displays the same graph the first one I dont know why even though in the actual directory the file is updated any help is greatly appreciated.
Sorry the error is that it my other route does not call this one so my question is how to call it
@app.route("/fileAnalysis",methods=['post','get'])
def fileAnalysis():
if request.method=="POST":
option = request.form['graphSelection']
f =request.files['fileUpload']
currentDir = os.getcwd()
if not f:
print("not file entered")
elif option!="Average likes for top commentators":
file_contents = f.stream.read().decode("latin-1")
print("before writing to the file")
newFile= open("statsFile.csv","w+",encoding='latin-1')
newFile.write(file_contents)
newFile.close()
print("wrote to file ")
print(type(file_contents))
if option=="Comments by hour of the day":
print("in top comments of hour of the day")
groupByHour.saveHourGraph("statsFile.csv")
return render_template("graph.html",figName=("commentsByHour.png"),title="Comments per hour of the day")
elif option=="Top Commentators":
topComments.makeTopCommentsGraph("statsFile.csv")
return render_template("graph.html",figName=("topCommentators.png"),title="top 100 commentators and the number of comments over a period of time")
elif option=="General Statistics":
dfComments = pd.read_csv("statsFile.csv", parse_dates=['comment_published'],encoding="latin-1")
print("hello world statistics")
return render_template("generalStats.html",dFrame=dfComments.describe(percentiles=[0.25,0.5,0.75,0.85,0.9,0.95,0.97,0.98,0.99]).to_html(classes="table table-striped"),title="General statistics on the file including mean ,standard deviation and percentiles of count of comment")
elif option=="Average likes for top commentators":
print("in average likes for top commentators need 2 files")
postsFile = request.files['fileUploadLikes']
if not f or not postsFile:
print("need to enter both files")
else:
file_contents = f.stream.read().decode("latin-1")
filePostsContents= postsFile.stream.read().decode("latin-1")
print("before writing to the file")
newFile= open("statsFile.csv","w+",encoding='latin-1')
newFile.write(file_contents)
newFile.close()
newFile= open("postsFile.csv","w+",encoding='utf-8')
newFile.write(filePostsContents)
newFile.close()
print("wrote to both files")
averageComments.getAverageLikes("statsFile.csv","postsFile.csv")
return render_template("graph.html",figName=("averageComments.png"),title="Average Comments for top 500 users")
print(option)
print("posted file ")
return render_template("fileAnalysis.html")
/r/flask
https://redd.it/5j8dwy
So I have a flask app that takes a csv then display the graph of the csv my problem is that the graph it displays does not update when I change the csv to something else even though I have route defined and it is called
@app.route("/static/<figName>",methods=['post','get'])
def renderFigure(figName):
fileLocation = os.getcwd()+"\\static\\"
print("rendering image",figName)
return send_from_directory(fileLocation, figName)
heres the html
<img src="{{ url_for('static', filename=figName) }}"} alt="..." class="img-thumbnail">
It always displays the same graph the first one I dont know why even though in the actual directory the file is updated any help is greatly appreciated.
Sorry the error is that it my other route does not call this one so my question is how to call it
@app.route("/fileAnalysis",methods=['post','get'])
def fileAnalysis():
if request.method=="POST":
option = request.form['graphSelection']
f =request.files['fileUpload']
currentDir = os.getcwd()
if not f:
print("not file entered")
elif option!="Average likes for top commentators":
file_contents = f.stream.read().decode("latin-1")
print("before writing to the file")
newFile= open("statsFile.csv","w+",encoding='latin-1')
newFile.write(file_contents)
newFile.close()
print("wrote to file ")
print(type(file_contents))
if option=="Comments by hour of the day":
print("in top comments of hour of the day")
groupByHour.saveHourGraph("statsFile.csv")
return render_template("graph.html",figName=("commentsByHour.png"),title="Comments per hour of the day")
elif option=="Top Commentators":
topComments.makeTopCommentsGraph("statsFile.csv")
return render_template("graph.html",figName=("topCommentators.png"),title="top 100 commentators and the number of comments over a period of time")
elif option=="General Statistics":
dfComments = pd.read_csv("statsFile.csv", parse_dates=['comment_published'],encoding="latin-1")
print("hello world statistics")
return render_template("generalStats.html",dFrame=dfComments.describe(percentiles=[0.25,0.5,0.75,0.85,0.9,0.95,0.97,0.98,0.99]).to_html(classes="table table-striped"),title="General statistics on the file including mean ,standard deviation and percentiles of count of comment")
elif option=="Average likes for top commentators":
print("in average likes for top commentators need 2 files")
postsFile = request.files['fileUploadLikes']
if not f or not postsFile:
print("need to enter both files")
else:
file_contents = f.stream.read().decode("latin-1")
filePostsContents= postsFile.stream.read().decode("latin-1")
print("before writing to the file")
newFile= open("statsFile.csv","w+",encoding='latin-1')
newFile.write(file_contents)
newFile.close()
newFile= open("postsFile.csv","w+",encoding='utf-8')
newFile.write(filePostsContents)
newFile.close()
print("wrote to both files")
averageComments.getAverageLikes("statsFile.csv","postsFile.csv")
return render_template("graph.html",figName=("averageComments.png"),title="Average Comments for top 500 users")
print(option)
print("posted file ")
return render_template("fileAnalysis.html")
/r/flask
https://redd.it/5j8dwy
reddit
serving static files help error • /r/flask
So I have a flask app that takes a csv then display the graph of the csv my problem is that the graph it displays does not update when I change...
What’s will be new in matplotlib — Matplotlib 2.0.0rc2 documentation
http://matplotlib.org/2.0.0rc2/users/whats_new.html
/r/IPython
https://redd.it/5jnw2y
http://matplotlib.org/2.0.0rc2/users/whats_new.html
/r/IPython
https://redd.it/5jnw2y
Missing data visualizations in Python?
Is there a tool for plotting missing data entries for a dataset in Python? I am thinking about something like [this](https://www.researchgate.net/profile/Bo_Tranberg/publication/277776292/figure/fig2/Figure-3-Matrix-plot-of-missing-data-cases-sorted-by-number-of-persons-with-the-name.png).
R seems to have [something](http://www.inside-r.org/packages/cran/mi/docs/missing.pattern.plot) like this, but I haven't tracked down a Python equivalent.
/r/pystats
https://redd.it/4azhee
Is there a tool for plotting missing data entries for a dataset in Python? I am thinking about something like [this](https://www.researchgate.net/profile/Bo_Tranberg/publication/277776292/figure/fig2/Figure-3-Matrix-plot-of-missing-data-cases-sorted-by-number-of-persons-with-the-name.png).
R seems to have [something](http://www.inside-r.org/packages/cran/mi/docs/missing.pattern.plot) like this, but I haven't tracked down a Python equivalent.
/r/pystats
https://redd.it/4azhee
Analyzing Golden State Warriors' passing network using GraphFrames in Spark
http://opiateforthemass.es/articles/analyzing-golden-state-warriors-passing-network-using-graphframes-in-spark/
/r/pystats
https://redd.it/4al1ps
http://opiateforthemass.es/articles/analyzing-golden-state-warriors-passing-network-using-graphframes-in-spark/
/r/pystats
https://redd.it/4al1ps
Opiate for the masses
Analyzing Golden State Warriors' passing network using GraphFrames in Spark
and interactive chart with networkD3
How to deal with migrations between branches
I just worked on a branch that made model changes, they switched to a different branch that didn't reflect those changes and now have issues with the database. What is the best way to tell the database to run with the current branch configuration/models in this case?
/r/django
https://redd.it/5jol7q
I just worked on a branch that made model changes, they switched to a different branch that didn't reflect those changes and now have issues with the database. What is the best way to tell the database to run with the current branch configuration/models in this case?
/r/django
https://redd.it/5jol7q
reddit
How to deal with migrations between branches • /r/django
I just worked on a branch that made model changes, they switched to a different branch that didn't reflect those changes and now have issues with...
Question about jupyter notebook size
Do let me know if this isn't the right place to ask this (or can suggest a better place) -- just recently got into using jupyter notebook, but it's rather large (wide?) on my screen. Is there a way to make it smaller in that dimension (short of just zooming out the whole page)?
/r/IPython
https://redd.it/4sf3yn
Do let me know if this isn't the right place to ask this (or can suggest a better place) -- just recently got into using jupyter notebook, but it's rather large (wide?) on my screen. Is there a way to make it smaller in that dimension (short of just zooming out the whole page)?
/r/IPython
https://redd.it/4sf3yn
reddit
Question about jupyter notebook size • /r/IPython
Do let me know if this isn't the right place to ask this (or can suggest a better place) -- just recently got into using jupyter notebook, but...
Storing sensitive settings in database vs environment variables
So, my lead developer just asked me to save sensitive settings such as keys into the database, his argument is that, because we have a lot of sensitive settings, the docker run command become too long. By just pointing the right database that has the settings we need, we good to go.
How his argument? is it reasonable? The settings app will be dump into JSON, and we pass that JSON file between developers securely for developing locally.
/r/django
https://redd.it/5jp26m
So, my lead developer just asked me to save sensitive settings such as keys into the database, his argument is that, because we have a lot of sensitive settings, the docker run command become too long. By just pointing the right database that has the settings we need, we good to go.
How his argument? is it reasonable? The settings app will be dump into JSON, and we pass that JSON file between developers securely for developing locally.
/r/django
https://redd.it/5jp26m
reddit
Storing sensitive settings in database vs environment... • /r/django
So, my lead developer just asked me to save sensitive settings such as keys into the database, his argument is that, because we have a lot of...
What are the standard things people do to ready a project for production?
Hi everyone,
I've rolled my first django project up to production on Heroku (http://newsletter.greenbartrading.com)! It is just a signup page for my mailchimp email list. As far as readying it for production though pretty much all I did was turn debug off and set up the static files settings. I feel like, security-wise, I should be doing a lot more. Is there a guide somewhere I can use to learn what settings I should be protecting, adjusting, and the like for production vs testing environments?
FWIW, I used this starter template https://github.com/heroku/heroku-django-template to make sure it worked with Heroku and just worked from there. It's a simple page, just one template, some jQuery for the modals, a single view, and a few other basics.
Any help would be very much appreciated since I want to a) protect this and b) eventually roll the rest of my website as well as some other apps I've written in python over to django!
Thanks :)
/r/django
https://redd.it/5jntxo
Hi everyone,
I've rolled my first django project up to production on Heroku (http://newsletter.greenbartrading.com)! It is just a signup page for my mailchimp email list. As far as readying it for production though pretty much all I did was turn debug off and set up the static files settings. I feel like, security-wise, I should be doing a lot more. Is there a guide somewhere I can use to learn what settings I should be protecting, adjusting, and the like for production vs testing environments?
FWIW, I used this starter template https://github.com/heroku/heroku-django-template to make sure it worked with Heroku and just worked from there. It's a simple page, just one template, some jQuery for the modals, a single view, and a few other basics.
Any help would be very much appreciated since I want to a) protect this and b) eventually roll the rest of my website as well as some other apps I've written in python over to django!
Thanks :)
/r/django
https://redd.it/5jntxo
Deep Dreams with Caffe - Dreamy Visuals
https://github.com/google/deepdream/blob/master/dream.ipynb
/r/JupyterNotebooks
https://redd.it/49laam
https://github.com/google/deepdream/blob/master/dream.ipynb
/r/JupyterNotebooks
https://redd.it/49laam
GitHub
deepdream/dream.ipynb at master · google/deepdream
Contribute to google/deepdream development by creating an account on GitHub.
Delta Plots Using Python
https://programminginpsychology.wordpress.com/2016/02/28/delta-plots-on-response-time-data-using-python/
/r/pystats
https://redd.it/497ljo
https://programminginpsychology.wordpress.com/2016/02/28/delta-plots-on-response-time-data-using-python/
/r/pystats
https://redd.it/497ljo
Programming in Psychology
Delta Plots on Response time data using Python
In this post we are going to learn how to do delta plots for response (reaction) time data. Response time data are often used in experimental psychology. It is the dependent variable in many experi…
graphene-django: how do I implement subscriptions?
Subscriptions look like a critical feature of graphql but graphene doesn't appear to support them. Is there a way to handle subscriptions manually perhaps using django channels?
/r/djangolearning
https://redd.it/5jdrvr
Subscriptions look like a critical feature of graphql but graphene doesn't appear to support them. Is there a way to handle subscriptions manually perhaps using django channels?
/r/djangolearning
https://redd.it/5jdrvr
reddit
graphene-django: how do I implement subscriptions? • /r/djangolearning
Subscriptions look like a critical feature of graphql but graphene doesn't appear to support them. Is there a way to handle subscriptions manually...
The Best Times to Post to reddit Revisited • Jupyter Notebook
http://ramiro.org/notebook/reddit-best-post-times/
/r/JupyterNotebooks
https://redd.it/493lw1
http://ramiro.org/notebook/reddit-best-post-times/
/r/JupyterNotebooks
https://redd.it/493lw1
ramiro.org
The Best Times to Post to reddit Revisited
In this notebook we revisit previous analyses of the best times to post to reddit by looking at several individual subreddits.
New version of Flask is out! (0.12) Mostly bug fixes. Changenotes are in the comments here.
https://github.com/pallets/flask/
/r/flask
https://redd.it/5jrtjd
https://github.com/pallets/flask/
/r/flask
https://redd.it/5jrtjd
GitHub
GitHub - pallets/flask: The Python micro framework for building web applications.
The Python micro framework for building web applications. - pallets/flask
A Python 3.5+ web server written to go fast
https://github.com/channelcat/sanic
/r/Python
https://redd.it/5jqrfa
https://github.com/channelcat/sanic
/r/Python
https://redd.it/5jqrfa
GitHub
GitHub - sanic-org/sanic: Next generation Python web server/framework | Build fast. Run fast.
Next generation Python web server/framework | Build fast. Run fast. - GitHub - sanic-org/sanic: Next generation Python web server/framework | Build fast. Run fast.
How does the directory work in Juypter notebook?
Say i have a csv file, how do i load it into juypter so that i can call it?
I'm not sure if the directory should be where the csv file is on my computer or on jupyter. i tried using both path but its always giving me this error
IOError: [Errno 2] No such file or directory: 'sample.csv'
any help is appreciated. thanks!
/r/IPython
https://redd.it/5js89o
Say i have a csv file, how do i load it into juypter so that i can call it?
I'm not sure if the directory should be where the csv file is on my computer or on jupyter. i tried using both path but its always giving me this error
IOError: [Errno 2] No such file or directory: 'sample.csv'
any help is appreciated. thanks!
/r/IPython
https://redd.it/5js89o
reddit
How does the directory work in Juypter notebook? • /r/IPython
Say i have a csv file, how do i load it into juypter so that i can call it? I'm not sure if the directory should be where the csv file is on my...
[N] Elon Musk on Twitter : Tesla Autopilot vision neural net now working well. Just need to get a lot of road time to validate in a wide range of environments.
https://twitter.com/elonmusk/status/811738008969842689
/r/MachineLearning
https://redd.it/5jrl79
https://twitter.com/elonmusk/status/811738008969842689
/r/MachineLearning
https://redd.it/5jrl79
Twitter
Elon Musk
Tesla Autopilot vision neural net now working well. Just need to get a lot of road time to validate in a wide range of environments.