Anyone can do a layman's guide to accessing a jupyter remotely from another computer?
do explain in simple terms!
/r/IPython
https://redd.it/7ezpe8
do explain in simple terms!
/r/IPython
https://redd.it/7ezpe8
reddit
Anyone can do a layman's guide to accessing a jupyter... • r/IPython
do explain in simple terms!
[Research] [Project] Leela Zero: a community open source project for machine learning in Go software. Call for help!
For all machine learning and AI enthusiasts, there is a great chance to take part to a project which is going to be a milestone in the history of Go software.
What can you do? You can offer your machine time and run a tiny self-playing software generating new games and data to be used for training Leela Zero and make it stronger and stronger.
We need your help! We need everyone's help in order to speed up the training process. Be part of a great open source and community driven project and let's all make history!
Please visit the links below to know more. Thank you.
https://github.com/gcp/leela-zero
http://zero.sjeng.org/
https://www.reddit.com/r/cbaduk/
General information about Go game: https://en.wikipedia.org/wiki/Go_(game)
General information about Go computing and software: https://en.wikipedia.org/wiki/Computer_Go
/r/MachineLearning
https://redd.it/7ezd1q
For all machine learning and AI enthusiasts, there is a great chance to take part to a project which is going to be a milestone in the history of Go software.
What can you do? You can offer your machine time and run a tiny self-playing software generating new games and data to be used for training Leela Zero and make it stronger and stronger.
We need your help! We need everyone's help in order to speed up the training process. Be part of a great open source and community driven project and let's all make history!
Please visit the links below to know more. Thank you.
https://github.com/gcp/leela-zero
http://zero.sjeng.org/
https://www.reddit.com/r/cbaduk/
General information about Go game: https://en.wikipedia.org/wiki/Go_(game)
General information about Go computing and software: https://en.wikipedia.org/wiki/Computer_Go
/r/MachineLearning
https://redd.it/7ezd1q
GitHub
GitHub - leela-zero/leela-zero: Go engine with no human-provided knowledge, modeled after the AlphaGo Zero paper.
Go engine with no human-provided knowledge, modeled after the AlphaGo Zero paper. - leela-zero/leela-zero
Overview of a Manhattan project's structure (Manhattan is a flask based web framework / CMS)
https://youtu.be/UOdbkQ2Gq5w
/r/flask
https://redd.it/7eytl3
https://youtu.be/UOdbkQ2Gq5w
/r/flask
https://redd.it/7eytl3
YouTube
A short overview of a Manhattan project's structure
Following on from my initial UI preview video (https://youtu.be/p8oAct-RW_0), in this video I try to give some insights into the underlying structure of the ...
Have any of you made money/have a passive income by automating a process with python?
/r/Python
https://redd.it/7f52lf
/r/Python
https://redd.it/7f52lf
reddit
Have any of you made money/have a passive income by... • r/Python
9 points and 4 comments so far on reddit
Does anyone have an example of a navbar with search?
I want to see how you did your routing.
/r/flask
https://redd.it/7ezjks
I want to see how you did your routing.
/r/flask
https://redd.it/7ezjks
reddit
Does anyone have an example of a navbar with search? • r/flask
I want to see how you did your routing.
A simple fire detector written with python
https://www.codemade.io/fire-detection-with-computer-vision/
/r/Python
https://redd.it/7f2bnj
https://www.codemade.io/fire-detection-with-computer-vision/
/r/Python
https://redd.it/7f2bnj
Converting HTML tags to custom code
For example i have following HTML code:
<p>Check our new website </p>
<p>at www.example.com and convert </p>
<p>more than this. </p>
<p> </p>
<p align='center'><b>Tester </b></p>
Now the old system is using some weird way of handling text to print and instead of HTML tags it uses word combination so the text should look like:
NLCheck our new website
NLat www.example.com and convert
NLmore than this.
NL
BCTester
So basically it uses combination of word for example NL(Normal Left), BC(Bold Center) so total of 6 combinations (NL,BL,NR,BR,NC,BC). What way would i take to convert this, is there any lib to parse the html tags and check their attributes or what way to choose?
/r/Python
https://redd.it/7f76ns
For example i have following HTML code:
<p>Check our new website </p>
<p>at www.example.com and convert </p>
<p>more than this. </p>
<p> </p>
<p align='center'><b>Tester </b></p>
Now the old system is using some weird way of handling text to print and instead of HTML tags it uses word combination so the text should look like:
NLCheck our new website
NLat www.example.com and convert
NLmore than this.
NL
BCTester
So basically it uses combination of word for example NL(Normal Left), BC(Bold Center) so total of 6 combinations (NL,BL,NR,BR,NC,BC). What way would i take to convert this, is there any lib to parse the html tags and check their attributes or what way to choose?
/r/Python
https://redd.it/7f76ns
reddit
Converting HTML tags to custom code • r/Python
For example i have following HTML code: Check our new website at www.example.com and convert more than this. ...
Asyncio Synchronization Primitives Tutorial - Locks and Queues
https://youtu.be/kMcwcJdIvHI
/r/Python
https://redd.it/7f71wf
https://youtu.be/kMcwcJdIvHI
/r/Python
https://redd.it/7f71wf
YouTube
Asyncio Synchronization Primitives Tutorial - Locks and Queues
👨💻 For the price of a ☕ every month, sign up and gain access to a growing list of premium courses on my site - https://tutorialedge.net/pricing/ 👩💻
● SUBSCRIBE to see more of my Videos & hit that LIKE button to support the channel!
Hi All, in this…
● SUBSCRIBE to see more of my Videos & hit that LIKE button to support the channel!
Hi All, in this…
Matplotlib+Python used to plot every single known object in the Solar System!
https://www.youtube.com/watch?v=3iJZwndWX1s
/r/Python
https://redd.it/7f7xgv
https://www.youtube.com/watch?v=3iJZwndWX1s
/r/Python
https://redd.it/7f7xgv
YouTube
THE KNOWN SOLAR SYSTEM
A 2d plot of every single object in the solar system except moons: major planets, dwarf planets, minor bodies and comets.
This has been created using data compiled from the minor planet center, JPL and Wolfram Alpha.
The data collection and position calculation…
This has been created using data compiled from the minor planet center, JPL and Wolfram Alpha.
The data collection and position calculation…
Best practices with captchas - Am I doing this right?
I got application with server-side sessions. When user comes, I will generate captcha image server-side and set the solution as one of session variables.
This way, when the user submits the captcha, I will simply compare the solution to the saved session variable.
This works fine in testing single-threadedly using sqlite in memory as database but when in production using several workers and postgresql for the sessions, the validation fails from time to time several times in a row.
I am suspecting some kind of caching between my app and database messes up with the logic.
Is this bad way to implement captchas? What would be better way?
/r/flask
https://redd.it/7b5cii
I got application with server-side sessions. When user comes, I will generate captcha image server-side and set the solution as one of session variables.
This way, when the user submits the captcha, I will simply compare the solution to the saved session variable.
This works fine in testing single-threadedly using sqlite in memory as database but when in production using several workers and postgresql for the sessions, the validation fails from time to time several times in a row.
I am suspecting some kind of caching between my app and database messes up with the logic.
Is this bad way to implement captchas? What would be better way?
/r/flask
https://redd.it/7b5cii
reddit
Best practices with captchas - Am I doing this right? • r/flask
I got application with server-side sessions. When user comes, I will generate captcha image server-side and set the solution as one of session...
6 Experts share amazing ways a beginner can learn Python programming.
https://coolpythoncodes.com/best-way-learn-python-programming/
/r/Python
https://redd.it/7f9bpb
https://coolpythoncodes.com/best-way-learn-python-programming/
/r/Python
https://redd.it/7f9bpb
Suggestions for a python IDE for a relatively new developer
I know that most of you will react with "Here we go again... another IDE post...", but bare with me here please.
I am relatively new to python and I was using PyCharm up until yesterday, when I switched from Windows 10 to Fedora 27. Right now I am hesitating, whether to install PyCharm again or not. Why?
1. Ate my memory.
2. I am using docker and I felt I did not use PyCharm to it's fullest potential, because I was running it from the terminal :/.
Prior to writing the post, I did read multiple other IDE posts ( there are a lot of them, so if I lose some karma points today, I will understand) and people mostly suggested Spyder and VIM (some were advising to stay as far away as possible from VIM tho).
Long story short, after reading numerous threads on this topic, I could not decide, as everyone suggested something different and not everyone was in my position with the docker and "amazing" developer skills.
I would be grateful if you could give your humble opinions on the different python IDEs and a small recommendation that can help me pick one :).
/r/Python
https://redd.it/7fa34z
I know that most of you will react with "Here we go again... another IDE post...", but bare with me here please.
I am relatively new to python and I was using PyCharm up until yesterday, when I switched from Windows 10 to Fedora 27. Right now I am hesitating, whether to install PyCharm again or not. Why?
1. Ate my memory.
2. I am using docker and I felt I did not use PyCharm to it's fullest potential, because I was running it from the terminal :/.
Prior to writing the post, I did read multiple other IDE posts ( there are a lot of them, so if I lose some karma points today, I will understand) and people mostly suggested Spyder and VIM (some were advising to stay as far away as possible from VIM tho).
Long story short, after reading numerous threads on this topic, I could not decide, as everyone suggested something different and not everyone was in my position with the docker and "amazing" developer skills.
I would be grateful if you could give your humble opinions on the different python IDEs and a small recommendation that can help me pick one :).
/r/Python
https://redd.it/7fa34z
reddit
Suggestions for a python IDE for a relatively new developer • r/Python
I know that most of you will react with "Here we go again... another IDE post...", but bare with me here please. I am relatively new to python...
JupyterCon 2017 – Jupyter Blog
https://blog.jupyter.org/enjoy-jupytercon-2017-on-youtube-670e5ee606a8
/r/IPython
https://redd.it/7f7spx
https://blog.jupyter.org/enjoy-jupytercon-2017-on-youtube-670e5ee606a8
/r/IPython
https://redd.it/7f7spx
Jupyter Blog
Enjoy JupyterCon 2017 on YouTube
About a year ago the Jupyter team started a partnership with O’Reilly Media and NumFOCUS to organize JupyterCon 2017, the first in a series…
[AF] Apache deployment questions
After a bit of struggling with mod_wsgi, I've successfully deployed my first flask app on EC2!
However, once I set up my apache virtual host configuration, I started getting a 404 on my domain in browser (flask routes work, though). I realize this is because of how I set up my virtual host config, but I'm trying to figure out what the best way to deliver the pages is (different apache configuration, serve everything through flask, or maybe something else).
I have an EC2 instance running apache and mod_wsgi to serve my flask app with the following vhost.confd:
<VirtualHost *:80>
ServerName domain.com
WSGIDaemonProcess flask_app user=username group=groupname threads=5
WSGIScriptAlias / /var/www/flask_app/deploy.wsgi
<directory /var/www/flask_app>
WSGIProcessGroup flask_app
WSGIApplicationGroup %{GLOBAL}
WSGIScriptReloading On
Order deny,allow
Allow from all
</directory>
</VirtualHost>
I think what I would like to do is just have apache serve up var/www/html when someone goes to domain.com, but have the flask traffic routed to something like domain.com/flask_traffic/name_of_route or flask.domain.com/name_of_route.
Is it possible to route traffic that way with a different apache configuration?
I've also considered just having my API traffic go to a different port, or serving all of my static content with Flask, but I'm not confident either of those are good solutions.
/r/flask
https://redd.it/7fbfs1
After a bit of struggling with mod_wsgi, I've successfully deployed my first flask app on EC2!
However, once I set up my apache virtual host configuration, I started getting a 404 on my domain in browser (flask routes work, though). I realize this is because of how I set up my virtual host config, but I'm trying to figure out what the best way to deliver the pages is (different apache configuration, serve everything through flask, or maybe something else).
I have an EC2 instance running apache and mod_wsgi to serve my flask app with the following vhost.confd:
<VirtualHost *:80>
ServerName domain.com
WSGIDaemonProcess flask_app user=username group=groupname threads=5
WSGIScriptAlias / /var/www/flask_app/deploy.wsgi
<directory /var/www/flask_app>
WSGIProcessGroup flask_app
WSGIApplicationGroup %{GLOBAL}
WSGIScriptReloading On
Order deny,allow
Allow from all
</directory>
</VirtualHost>
I think what I would like to do is just have apache serve up var/www/html when someone goes to domain.com, but have the flask traffic routed to something like domain.com/flask_traffic/name_of_route or flask.domain.com/name_of_route.
Is it possible to route traffic that way with a different apache configuration?
I've also considered just having my API traffic go to a different port, or serving all of my static content with Flask, but I'm not confident either of those are good solutions.
/r/flask
https://redd.it/7fbfs1
Sending a file via POST using Django using Javascript instead of HTML Form (X-post from /r/webdev)
I have a PDF file saved in a variable 'report.'
I am using Django and want to pass it to a function in my views.py file using POST --
@xframe_options_exempt
@csrf_exempt
def process_report(request):
if request.method == 'POST'
report_file = request.FILES['docfile']
....
return response
How can I send a ajax POST request with this file? The filetype is a PDF.
I was using an HTML form to do this before, but I wanted to style the form upload using javascript. I tried styling the button using javascript (changing colors and text depending on file type uploaded), but the file was no longer being able to be passed through the POST request. Now I just have the file saved in a javascript variable, and am trying to just pass it via POST without using form. I understand it's impossible to prepopulate a form with a file.
My old code:
<form id="boring" action="{% url "process_report" %}" method="post"
enctype="multipart/form-data">
{% csrf_token %}
{{ form.non_field_errors }}
{{ form.docfile.label_tag }} {{ form.docfile.help_text }
{{ form.docfile.errors }}
{{ form.docfile }}
</form>
What I have been trying to do with ajax
var formdata = new FormData(report);
$.ajax({
url: 'process_report',
type: 'POST',
processData: false,
contentType: false,
dataType : 'application/pdf',
data: {
'content': 'formdata',
'csrfmiddlewaretoken': '{{ csrf_token }}',
}
/r/djangolearning
https://redd.it/7fcdfi
I have a PDF file saved in a variable 'report.'
I am using Django and want to pass it to a function in my views.py file using POST --
@xframe_options_exempt
@csrf_exempt
def process_report(request):
if request.method == 'POST'
report_file = request.FILES['docfile']
....
return response
How can I send a ajax POST request with this file? The filetype is a PDF.
I was using an HTML form to do this before, but I wanted to style the form upload using javascript. I tried styling the button using javascript (changing colors and text depending on file type uploaded), but the file was no longer being able to be passed through the POST request. Now I just have the file saved in a javascript variable, and am trying to just pass it via POST without using form. I understand it's impossible to prepopulate a form with a file.
My old code:
<form id="boring" action="{% url "process_report" %}" method="post"
enctype="multipart/form-data">
{% csrf_token %}
{{ form.non_field_errors }}
{{ form.docfile.label_tag }} {{ form.docfile.help_text }
{{ form.docfile.errors }}
{{ form.docfile }}
</form>
What I have been trying to do with ajax
var formdata = new FormData(report);
$.ajax({
url: 'process_report',
type: 'POST',
processData: false,
contentType: false,
dataType : 'application/pdf',
data: {
'content': 'formdata',
'csrfmiddlewaretoken': '{{ csrf_token }}',
}
/r/djangolearning
https://redd.it/7fcdfi
reddit
Sending a file via POST using Django using... • r/djangolearning
I have a PDF file saved in a variable 'report.' I am using Django and want to pass it to a function in my views.py file using POST -- ...
Getting started with Python for R developers
http://n-s-f.github.io/2017/03/25/r-to-python.html
/r/Python
https://redd.it/7fc4q1
http://n-s-f.github.io/2017/03/25/r-to-python.html
/r/Python
https://redd.it/7fc4q1
n-s-f.github.io
Getting started with Python for R developers
If you work in R and are curious about using Python, but haven’t quite known howto get started, this blog post is for you. I’ve come across quite a few R use...
Python Top 10 Articles - Nov 2017
https://medium.com/@Mybridge/python-top-10-articles-for-the-past-month-v-nov-2017-f46fcaa36e4b
/r/Python
https://redd.it/7fdv49
https://medium.com/@Mybridge/python-top-10-articles-for-the-past-month-v-nov-2017-f46fcaa36e4b
/r/Python
https://redd.it/7fdv49
Medium
Python Top 10 Articles for the Past Month (v.Nov 2017)
For the past month, we ranked nearly 1,000 Python articles to pick the Top 10 stories that can help advance your career (1% chance).
[AF][Flask-SQLAlchemy] How do I execute this query?
Hello, everyone!
I have the following relationship ([shitty diagram](https://i.imgur.com/QXgidVX.png)) and would like to fetch row(s) from the `Payments` table. Now obviously, what gets returned is `(id, employer_id, employee_id, payment_date)`. What is the correct way to fetch `(id, employer_name, employee_name, payment_date)`?
What I currently have:
# views.py
@app.route("/dashboard")
@login_required
def dashboard():
payments = Payment.query.all()
# TODO: Find a 'cleaner' way to fetch the relevant info for payments.
for payment in payments:
payment.employee_name = Employee.query.filter_by(id=payment.employee_id).first().name
payment.employer_name = Employer.query.filter_by(id=payment.employer_id).first().name
return render_template("dashboard.html", payments=payments)
---
# dashboard.html
...
<tbody>
{% for payment in payments %}
<tr>
<td>{{ payment.id }}</td>
<td>{{ payment.employer_name }}</td>
<td>{{ payment.employee_name }}</td>
<td>{{ payment.payment_date }}</td>
</tr>
{% endfor %}
</tbody>
Admittedly, I don't have much knowledge about databases aside from the basic ORM commands. I don't even know the correct terms to search for! Anyway, I'd like to know:
1. What is the correct way of doing what I did with the above code?
2. What would it look like in plain SQL?
3. What topics should I be reading up on?
Thanks a lot, r/flask!
/r/flask
https://redd.it/7aqvcl
Hello, everyone!
I have the following relationship ([shitty diagram](https://i.imgur.com/QXgidVX.png)) and would like to fetch row(s) from the `Payments` table. Now obviously, what gets returned is `(id, employer_id, employee_id, payment_date)`. What is the correct way to fetch `(id, employer_name, employee_name, payment_date)`?
What I currently have:
# views.py
@app.route("/dashboard")
@login_required
def dashboard():
payments = Payment.query.all()
# TODO: Find a 'cleaner' way to fetch the relevant info for payments.
for payment in payments:
payment.employee_name = Employee.query.filter_by(id=payment.employee_id).first().name
payment.employer_name = Employer.query.filter_by(id=payment.employer_id).first().name
return render_template("dashboard.html", payments=payments)
---
# dashboard.html
...
<tbody>
{% for payment in payments %}
<tr>
<td>{{ payment.id }}</td>
<td>{{ payment.employer_name }}</td>
<td>{{ payment.employee_name }}</td>
<td>{{ payment.payment_date }}</td>
</tr>
{% endfor %}
</tbody>
Admittedly, I don't have much knowledge about databases aside from the basic ORM commands. I don't even know the correct terms to search for! Anyway, I'd like to know:
1. What is the correct way of doing what I did with the above code?
2. What would it look like in plain SQL?
3. What topics should I be reading up on?
Thanks a lot, r/flask!
/r/flask
https://redd.it/7aqvcl