Is there a recommended way to create/implement honeypot links?
I wrote a relatively simple app for an organization a while ago, and I've noticed that in the logs we're getting a lot of recursive requests from the same IP quite often from some paged which contain links to specific information - likely some sort of scraper or web crawler. As the organization is using a pretty basic shared hosting solution I figure it'd probably be prudent to block these IPs to free up resources, even though it doesn't appear to be causing problems at the moment.
For now I'm basically just thinking of having a hidden honeypot link that when followed will block the client's IP for 24 hours - nothing overly sophisticated. The libraries I've found using google all seem to be pretty outdated, so although this is probably simple to implement I thought I'd ask if there was any libraries/resources/best-practices for this that are worth knowing about before half-assing a solution myself.
/r/flask
https://redd.it/8evzyl
I wrote a relatively simple app for an organization a while ago, and I've noticed that in the logs we're getting a lot of recursive requests from the same IP quite often from some paged which contain links to specific information - likely some sort of scraper or web crawler. As the organization is using a pretty basic shared hosting solution I figure it'd probably be prudent to block these IPs to free up resources, even though it doesn't appear to be causing problems at the moment.
For now I'm basically just thinking of having a hidden honeypot link that when followed will block the client's IP for 24 hours - nothing overly sophisticated. The libraries I've found using google all seem to be pretty outdated, so although this is probably simple to implement I thought I'd ask if there was any libraries/resources/best-practices for this that are worth knowing about before half-assing a solution myself.
/r/flask
https://redd.it/8evzyl
reddit
Is there a recommended way to create/implement honeypot... • r/flask
I wrote a relatively simple app for an organization a while ago, and I've noticed that in the logs we're getting a lot of recursive requests from...
Jupyter/IPython: how to get results in traditional mathematical notation?
https://stackoverflow.com/questions/50030020/jupyter-ipython-how-to-get-results-in-traditional-mathematical-notation
/r/IPython
https://redd.it/8exlos
https://stackoverflow.com/questions/50030020/jupyter-ipython-how-to-get-results-in-traditional-mathematical-notation
/r/IPython
https://redd.it/8exlos
Stackoverflow
Jupyter/IPython: how to get results in traditional mathematical notation?
I have been using WxMaxima for my symbolic calculations for a while now. The good thing about WxMaxima is that you can get formatted outputs right in the program and then export them to LaTeX forma...
[D] Anyone having trouble reading a particular paper ? Post it here and we'll help figure out any parts you are stuck on | Anyone having trouble finding papers on a particular concept ? Post it here and we'll help you find papers on that topic [ROUND 2]
Update: working on these now. As mentioned, I won't be able to take anymore paper help questions since the 24 hour period since this has been posted is up, however, I'll still continue for paper find questions since those don't take as much time. Actually, I'll also make an exception to any NLP papers since that's my area of focus.
This is a Round 2 of the paper help and paper find threads I posted in the previous weeks
https://www.reddit.com/r/MachineLearning/comments/8b4vi0/d_anyone_having_trouble_reading_a_particular/
https://www.reddit.com/r/MachineLearning/comments/8bwuyg/d_anyone_having_trouble_finding_papers_on_a/
I made a read-only subreddit to cataloge the main threads from these posts for easy look up
https://www.reddit.com/r/MLPapersQandA/
I decided to combine the two types of threads since they're pretty similar in concept.
I'll only be answering questions that were submitted within 24 hours of this being posted (9:30 am PST). Other people will be answering questions too like last time, but since posts are only on the front page for about a day, if you don't post a question within 24 hours you'll probably have to wait until Round 3 of this, which will happen in 2-3 weeks. To follow tentative dates, you can check this subreddit I use to catalog the topics discussed in my paperHelp/paperFind/paperWrite posts.
I'll only be answering questions that follow the format below. The purpose of this format is to minimize the time it takes to answer a question, maximizing the number of questions that'll be answered. The idea is that if someone who knows the answer reads your post, they should at least know what your asking for without having to open the paper. There are likely experts who pass by this thread, who may be too limited on time to open a paper link, but would be willing to spend a minute or two to answer a question.
-----
FORMAT FOR HELP ON A PARTICULAR PAPER
Title:
Link to Paper:
Summary in your own words of what this paper is about, and what exactly are you stuck on:
Additional info to speed up understanding/ finding answers. For example, if there's an equation whose components are explained through out the paper, make a mini glossary of said equation:
What attempts have you made so far to figure out the question:
Your best guess to what's the answer:
(optional) any additional info or resources to help answer your question (will increase chance of getting your question answered):
----
FORMAT FOR FINDING PAPERS ON A PARTICULAR TOPIC
Description of the concept you want to find papers on:
Any papers you found so far about your concept or close to your concept:
All the search queries you have tried so far in trying to find papers for that concept:
(optional) any additional info or resources to help find papers (will increase chance of getting your question answered):
----
Feel free to piggyback on any threads to ask your own questions, just follow the corresponding formats above.
/r/MachineLearning
https://redd.it/8elmd8
Update: working on these now. As mentioned, I won't be able to take anymore paper help questions since the 24 hour period since this has been posted is up, however, I'll still continue for paper find questions since those don't take as much time. Actually, I'll also make an exception to any NLP papers since that's my area of focus.
This is a Round 2 of the paper help and paper find threads I posted in the previous weeks
https://www.reddit.com/r/MachineLearning/comments/8b4vi0/d_anyone_having_trouble_reading_a_particular/
https://www.reddit.com/r/MachineLearning/comments/8bwuyg/d_anyone_having_trouble_finding_papers_on_a/
I made a read-only subreddit to cataloge the main threads from these posts for easy look up
https://www.reddit.com/r/MLPapersQandA/
I decided to combine the two types of threads since they're pretty similar in concept.
I'll only be answering questions that were submitted within 24 hours of this being posted (9:30 am PST). Other people will be answering questions too like last time, but since posts are only on the front page for about a day, if you don't post a question within 24 hours you'll probably have to wait until Round 3 of this, which will happen in 2-3 weeks. To follow tentative dates, you can check this subreddit I use to catalog the topics discussed in my paperHelp/paperFind/paperWrite posts.
I'll only be answering questions that follow the format below. The purpose of this format is to minimize the time it takes to answer a question, maximizing the number of questions that'll be answered. The idea is that if someone who knows the answer reads your post, they should at least know what your asking for without having to open the paper. There are likely experts who pass by this thread, who may be too limited on time to open a paper link, but would be willing to spend a minute or two to answer a question.
-----
FORMAT FOR HELP ON A PARTICULAR PAPER
Title:
Link to Paper:
Summary in your own words of what this paper is about, and what exactly are you stuck on:
Additional info to speed up understanding/ finding answers. For example, if there's an equation whose components are explained through out the paper, make a mini glossary of said equation:
What attempts have you made so far to figure out the question:
Your best guess to what's the answer:
(optional) any additional info or resources to help answer your question (will increase chance of getting your question answered):
----
FORMAT FOR FINDING PAPERS ON A PARTICULAR TOPIC
Description of the concept you want to find papers on:
Any papers you found so far about your concept or close to your concept:
All the search queries you have tried so far in trying to find papers for that concept:
(optional) any additional info or resources to help find papers (will increase chance of getting your question answered):
----
Feel free to piggyback on any threads to ask your own questions, just follow the corresponding formats above.
/r/MachineLearning
https://redd.it/8elmd8
reddit
r/MachineLearning - [D] Anyone having trouble reading a particular paper? Post it here and we'll help figure out any parts you…
522 votes and 136 so far on reddit
Python 3's pathlib Module: Taming the File System
https://realpython.com/python-pathlib/
/r/Python
https://redd.it/8ewna3
https://realpython.com/python-pathlib/
/r/Python
https://redd.it/8ewna3
Realpython
Python's pathlib Module: Taming the File System – Real Python
Python's pathlib module enables you to handle file and folder paths in a modern way. This built-in module provides intuitive semantics that work the same way on different operating systems. In this tutorial, you'll get to know pathlib and explore common tasks…
PyPy2.7 and PyPy3.5 v6.0 dual release
https://morepypy.blogspot.com/2018/04/pypy27-and-pypy35-v60-dual-release.html
/r/Python
https://redd.it/8ez52g
https://morepypy.blogspot.com/2018/04/pypy27-and-pypy35-v60-dual-release.html
/r/Python
https://redd.it/8ez52g
morepypy.blogspot.co.uk
PyPy2.7 and PyPy3.5 v6.0 dual release
The PyPy team is proud to release both PyPy2.7 v6.0 (an interpreter supporting Python 2.7 syntax), and a PyPy3.5 v6.0 (an interpreter suppo...
Best way to design website (just visual stuff)?
Once I've created my website (models, tests, etc), what's the best way to actually design it, in terms of HTML+CSS? Last summer (when I made a django website), I downloaded pre-made HTML pages and edited them to be used as templates in my django site, but I have the feeling that downloaded some HTML files and editing them line-by-line isn't the best way to do things (as in, add static images, design sidebars, etc). I tried downloading a theme-type thing, but it hasn't been updated to Django 2.0, so it won't work.
Edit: essentially, I want to know if there's a way to design WYSIWYG HTML shit (sidebars, generic pages, home pages, etc), that I can download the HTML of so that I'm not hardcoding every bit of HTML
/r/django
https://redd.it/8ezpcr
Once I've created my website (models, tests, etc), what's the best way to actually design it, in terms of HTML+CSS? Last summer (when I made a django website), I downloaded pre-made HTML pages and edited them to be used as templates in my django site, but I have the feeling that downloaded some HTML files and editing them line-by-line isn't the best way to do things (as in, add static images, design sidebars, etc). I tried downloading a theme-type thing, but it hasn't been updated to Django 2.0, so it won't work.
Edit: essentially, I want to know if there's a way to design WYSIWYG HTML shit (sidebars, generic pages, home pages, etc), that I can download the HTML of so that I'm not hardcoding every bit of HTML
/r/django
https://redd.it/8ezpcr
reddit
Best way to design website (just visual stuff)? • r/django
Once I've created my website (models, tests, etc), what's the best way to actually design it, in terms of HTML+CSS? Last summer (when I made a...
PEP 572 -- Assignment Expressions
https://www.python.org/dev/peps/pep-0572/
/r/Python
https://redd.it/8ex72p
https://www.python.org/dev/peps/pep-0572/
/r/Python
https://redd.it/8ex72p
Python Enhancement Proposals (PEPs)
PEP 572 – Assignment Expressions | peps.python.org
This is a proposal for creating a way to assign to variables within an expression using the notation NAME := expr.
ELi5 Flask Restful
So I'm really new to fpython. I've used flask to manage afew simple flask webpages but I keep hearing about flaskRestful. What is it? why should I care? and how can I implement it in my projects? Any good tutorials that show the entire process say from building a simple html/css website to actual flaskrestful impllementation would be really welcome
/r/flask
https://redd.it/8ezkr3
So I'm really new to fpython. I've used flask to manage afew simple flask webpages but I keep hearing about flaskRestful. What is it? why should I care? and how can I implement it in my projects? Any good tutorials that show the entire process say from building a simple html/css website to actual flaskrestful impllementation would be really welcome
/r/flask
https://redd.it/8ezkr3
reddit
ELi5 Flask Restful • r/flask
So I'm really new to fpython. I've used flask to manage afew simple flask webpages but I keep hearing about flaskRestful. What is it? why should I...
Univarsal manga downloader (for offline reading)
Hello!
I have long thought whether to do this thread on reddit. In the end, I am writing this.
I would like to share my software with you.
If you like manga, it can be useful.
Sometimes it happens that there is no internet on phone or tablet.
This software helps to save all the manga chapters to disk, so you can transfer the files to your phone / tablet.
I will be very glad to the reviews and bugreports.
In the future, it is planned, possibly, gui and server version (web-interface).
Now works only cli.
The software now supports about 240 sites. Full list here: https://yuru-yuri.github.io/manga-dl/#resources-list
**Link on sources: https://github.com/yuru-yuri/manga-dl**
**Supported OS: Linux/Mac/Windows.**
Requires:
* python >= 3.5
(more here [requirements.txt](https://github.com/yuru-yuri/manga-dl/blob/master/requirements.txt) )
Current development status: Beta
Thank you for your attention!
Sorry for my english.
/r/Python
https://redd.it/8f1fid
Hello!
I have long thought whether to do this thread on reddit. In the end, I am writing this.
I would like to share my software with you.
If you like manga, it can be useful.
Sometimes it happens that there is no internet on phone or tablet.
This software helps to save all the manga chapters to disk, so you can transfer the files to your phone / tablet.
I will be very glad to the reviews and bugreports.
In the future, it is planned, possibly, gui and server version (web-interface).
Now works only cli.
The software now supports about 240 sites. Full list here: https://yuru-yuri.github.io/manga-dl/#resources-list
**Link on sources: https://github.com/yuru-yuri/manga-dl**
**Supported OS: Linux/Mac/Windows.**
Requires:
* python >= 3.5
(more here [requirements.txt](https://github.com/yuru-yuri/manga-dl/blob/master/requirements.txt) )
Current development status: Beta
Thank you for your attention!
Sorry for my english.
/r/Python
https://redd.it/8f1fid
How can I search code into jupyter files directory?
Hello everyone.I want to search python code into jupyter files directory.
For example, I want to search folllowing code:
"csvrows=csv.reader(csvfile,delimiter=',')"
Into the following directory:
|-r/
|-notebooks/
|-notebook1.ipynb
|-notebook2.ipynb
|-...
How can I do that?
I tried jupyter-tree-filter but it doesn't look for jupyter notebooks which are in subdirectories.
/r/IPython
https://redd.it/8ewo5f
Hello everyone.I want to search python code into jupyter files directory.
For example, I want to search folllowing code:
"csvrows=csv.reader(csvfile,delimiter=',')"
Into the following directory:
|-r/
|-notebooks/
|-notebook1.ipynb
|-notebook2.ipynb
|-...
How can I do that?
I tried jupyter-tree-filter but it doesn't look for jupyter notebooks which are in subdirectories.
/r/IPython
https://redd.it/8ewo5f
reddit
r/IPython - How can I search code into jupyter files directory?
1 votes and 2 so far on reddit
[AF] How to sort posts more efficiently?
Hi, so I've been working on a reddit clone, for practice, and was wondering how to sort through posts more efficiently. Here is the code I have now to display posts on the main page:
def index():
posts = Post.query.all()
for post in posts:
post.set_hotness()
posts = Post.query.order_by(Post.hotness).all()
return render_template('index.html', title='Dopenet: You can do anything', posts=posts )
The set_hotness() function mentioned here is in the Posts table, which can be found [here](https://github.com/ModoUnreal/dopenet/blob/master/app/models.py).
I know my method of sorting through posts is highly inefficient and not scalable.
What am I doing wrong and how can I fix it?
/r/flask
https://redd.it/8exlzm
Hi, so I've been working on a reddit clone, for practice, and was wondering how to sort through posts more efficiently. Here is the code I have now to display posts on the main page:
def index():
posts = Post.query.all()
for post in posts:
post.set_hotness()
posts = Post.query.order_by(Post.hotness).all()
return render_template('index.html', title='Dopenet: You can do anything', posts=posts )
The set_hotness() function mentioned here is in the Posts table, which can be found [here](https://github.com/ModoUnreal/dopenet/blob/master/app/models.py).
I know my method of sorting through posts is highly inefficient and not scalable.
What am I doing wrong and how can I fix it?
/r/flask
https://redd.it/8exlzm
GitHub
ModoUnreal/dopenet
dopenet - The ideal template to make websites in 2018!!!! (I'm kidding of course)
[AF] Can't run hello world app with Flask, UnicodeDecodeError
I'm trying to run simple hello world flask app but sockets throws an error on Windows 10, Python 3.6.4
File "D:\Python\Python36-32\lib\socket.py", line 673, in getfqdn:
hostname, aliases, ipaddrs = gethostbyaddr(name)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xab in position 80: invalid start byte
I know I could hack some code in the source of socket.py but I don't want to do that yet. My hostname is "Pitku" so I don't know what text/character is causing the error. Have already tried changing Code Pages but none have worked.
Is there any way to backtrace/fix this error?
/r/flask
https://redd.it/8eeb94
I'm trying to run simple hello world flask app but sockets throws an error on Windows 10, Python 3.6.4
File "D:\Python\Python36-32\lib\socket.py", line 673, in getfqdn:
hostname, aliases, ipaddrs = gethostbyaddr(name)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xab in position 80: invalid start byte
I know I could hack some code in the source of socket.py but I don't want to do that yet. My hostname is "Pitku" so I don't know what text/character is causing the error. Have already tried changing Code Pages but none have worked.
Is there any way to backtrace/fix this error?
/r/flask
https://redd.it/8eeb94
reddit
r/flask - [AF] Can't run hello world app with Flask, UnicodeDecodeError
1 votes and 2 so far on reddit
Python Top 10 Open Source of the Month (v.Apr 2018)
https://medium.com/@Mybridge/python-top-10-open-source-of-the-month-v-apr-2018-9e91343756a
/r/Python
https://redd.it/8f1rbl
https://medium.com/@Mybridge/python-top-10-open-source-of-the-month-v-apr-2018-9e91343756a
/r/Python
https://redd.it/8f1rbl
Medium
Python Top 10 Open Source of the Month (v.Apr 2018)
For the past month, we ranked nearly 250 Python Open Source Projects to pick the Top 10.
Learning Python before proceeding to Django?
How much Python should I need to learn before I proceed to learning Django?
/r/djangolearning
https://redd.it/8eyuo9
How much Python should I need to learn before I proceed to learning Django?
/r/djangolearning
https://redd.it/8eyuo9
reddit
r/djangolearning - Learning Python before proceeding to Django?
8 votes and 7 so far on reddit
Arbitrary poetic verse in Python. I don't know why I wrote this.
https://github.com/Astrokiwi/arbitrary_python_verse
/r/Python
https://redd.it/8f346h
https://github.com/Astrokiwi/arbitrary_python_verse
/r/Python
https://redd.it/8f346h
GitHub
Astrokiwi/arbitrary_python_verse
Contribute to arbitrary_python_verse development by creating an account on GitHub.
Flask 1.0 released
https://www.palletsprojects.com/blog/flask-1-0-released/
/r/Python
https://redd.it/8f61xl
https://www.palletsprojects.com/blog/flask-1-0-released/
/r/Python
https://redd.it/8f61xl
package of the day: tqdm
hello and welcome to package of the day, the show where i type a few lines about a package i quite like and would be of use to programmers in a wide variety of contexts
today's package is called "tqdm"
A fast, extensible progress bar for Python and CLI
have you ever written a for loop that iterates over many variables and takes a long time to run?
to track its progress did you just add a print statement inside the loop indicating how far or which variable you're on, producing hundreds if not thousands of lines of text you only look at sparingly?
now you can do better. just import tqdm: `from tqdm import tqdm`
and wrap the structure you're for-ing in the tqdm() function like so: `for i in tqdm(range(10000)):`
now when you run your code, a dynamic progress bar like this one will automatically be generated when you start your loop:
`76%|████████████████████████████ | 7568/10000 [00:33<00:10, 229.00it/s]`
not only will it show you your progress; it'll provide you some simple metrics about how long the loop is taking and will take
try tqdm today!
/r/Python
https://redd.it/8f5wo3
hello and welcome to package of the day, the show where i type a few lines about a package i quite like and would be of use to programmers in a wide variety of contexts
today's package is called "tqdm"
A fast, extensible progress bar for Python and CLI
have you ever written a for loop that iterates over many variables and takes a long time to run?
to track its progress did you just add a print statement inside the loop indicating how far or which variable you're on, producing hundreds if not thousands of lines of text you only look at sparingly?
now you can do better. just import tqdm: `from tqdm import tqdm`
and wrap the structure you're for-ing in the tqdm() function like so: `for i in tqdm(range(10000)):`
now when you run your code, a dynamic progress bar like this one will automatically be generated when you start your loop:
`76%|████████████████████████████ | 7568/10000 [00:33<00:10, 229.00it/s]`
not only will it show you your progress; it'll provide you some simple metrics about how long the loop is taking and will take
try tqdm today!
/r/Python
https://redd.it/8f5wo3
reddit
package of the day: tqdm • r/Python
hello and welcome to package of the day, the show where i type a few lines about a package i quite like and would be of use to programmers in a...
Is there any jupyter extension to search into jupyter directory by file contents?
I have tons .ipynb files.I want to search and filter by jupyter file contents. Hello everyone.I have tons .ipynb files.I want to search and filter by jupyter file contents. I do some search on google and find jupyter-tree-filter which adds a search box on your jupyter directory and filter files by filename, not by file contents.Is there any jupyter extension to search jupyter file contents?
/r/JupyterNotebooks
https://redd.it/8f5okb
I have tons .ipynb files.I want to search and filter by jupyter file contents. Hello everyone.I have tons .ipynb files.I want to search and filter by jupyter file contents. I do some search on google and find jupyter-tree-filter which adds a search box on your jupyter directory and filter files by filename, not by file contents.Is there any jupyter extension to search jupyter file contents?
/r/JupyterNotebooks
https://redd.it/8f5okb
reddit
Is there any jupyter extension to search into... • r/JupyterNotebooks
I have tons .ipynb files.I want to search and filter by jupyter file contents. Hello everyone.I have tons .ipynb files.I want to search and filter...
[N] Google Brain is expanding to Tokyo
https://twitter.com/hardmaru/status/989619084357652481
/r/MachineLearning
https://redd.it/8f6hqn
https://twitter.com/hardmaru/status/989619084357652481
/r/MachineLearning
https://redd.it/8f6hqn
Twitter
hardmaru
Excited about expanding the Google Brain team in Tokyo. If you are excited to work on fresh and interesting AI research, please consider applying! https://t.co/SCI9AyppSN
Checking your snail mail with Python/Docker and Slack!
http://opsandautomation.com/2018/04/26/checking-your-snail-mail-with-python-docker-and-slack-part-1/
/r/Python
https://redd.it/8f7pw3
http://opsandautomation.com/2018/04/26/checking-your-snail-mail-with-python-docker-and-slack-part-1/
/r/Python
https://redd.it/8f7pw3
Flask 1.0 Released 🎉
https://www.palletsprojects.com/blog/flask-1-0-released/
/r/flask
https://redd.it/8f5yn9
https://www.palletsprojects.com/blog/flask-1-0-released/
/r/flask
https://redd.it/8f5yn9