I'm being followed by an army of spammy Python accounts on Twitter. What's going on?
Over the last few days a number of suspicious looking accounts have started to follow me on twitter. They all pretend to be some sort of generic Python related account. Yet they all have more or less the same bio and all tweets link to very suspicious websites.
I've blocked and reported all of them, but more and more are coming and I'm seeing legitimate Python accounts following some of them, probably without double checking.
Did anyone else notice this? Does anyone have an idea of what's going on? Should I report this to twitter and if yes how?
Here's a list of the accounts I've seen so far if someone want's to check them out. **Be careful with clicking any of the links in their tweets and bio!**
* [@learn_pythonx](https://www.twitter.com/learn_pythonx)
* [@python_codecs](https://www.twitter.com/python_codecs)
* [@PythonCodeademy](https://www.twitter.com/PythonCodeademy)
* [@The_PythonTutor](https://www.twitter.com/The_PythonTutor)
* [@Python_Codingz](https://www.twitter.com/Python_Codingz)
* [@Python_4coders](https://www.twitter.com/Python_4coders)
* [@Learn_Python_2z](https://www.twitter.com/Learn_Python_2z)
* [@python_0toHero](https://www.twitter.com/python_0toHero)
* [@ThePythonTutor_](https://www.twitter.com/ThePythonTutor_)
* [@python_4coder](https://www.twitter.com/python_4coder)
* [@Python\_Master_](https://www.twitter.com/Python_Master_)
* [@Python_programz](https://www.twitter.com/Python_programz)
* [@pythonbeginner_](https://www.twitter.com/pythonbeginner_)
* [@PythonsTraining](https://www.twitter.com/PythonsTraining)
* [@LearnsPython](https://www.twitter.com/LearnsPython)
* [@PythonDailyNews](https://www.twitter.com/PythonDailyNews)
* [@python_news_4u](https://www.twitter.com/python_news_4u)
* [@python\_academy_](https://www.twitter.com/python_academy_)
* [@pythonmaster_](https://www.twitter.com/pythonmaster_)
* [@PythonDev_AtoZ](https://www.twitter.com/PythonDev_AtoZ)
* [@LearnPython_toZ](https://www.twitter.com/LearnPython_toZ)
* [@Python_AtoZ](https://www.twitter.com/Python_AtoZ)
* [@Python4Tutorial](https://www.twitter.com/Python4Tutorial)
/r/Python
https://redd.it/7wl2hc
Over the last few days a number of suspicious looking accounts have started to follow me on twitter. They all pretend to be some sort of generic Python related account. Yet they all have more or less the same bio and all tweets link to very suspicious websites.
I've blocked and reported all of them, but more and more are coming and I'm seeing legitimate Python accounts following some of them, probably without double checking.
Did anyone else notice this? Does anyone have an idea of what's going on? Should I report this to twitter and if yes how?
Here's a list of the accounts I've seen so far if someone want's to check them out. **Be careful with clicking any of the links in their tweets and bio!**
* [@learn_pythonx](https://www.twitter.com/learn_pythonx)
* [@python_codecs](https://www.twitter.com/python_codecs)
* [@PythonCodeademy](https://www.twitter.com/PythonCodeademy)
* [@The_PythonTutor](https://www.twitter.com/The_PythonTutor)
* [@Python_Codingz](https://www.twitter.com/Python_Codingz)
* [@Python_4coders](https://www.twitter.com/Python_4coders)
* [@Learn_Python_2z](https://www.twitter.com/Learn_Python_2z)
* [@python_0toHero](https://www.twitter.com/python_0toHero)
* [@ThePythonTutor_](https://www.twitter.com/ThePythonTutor_)
* [@python_4coder](https://www.twitter.com/python_4coder)
* [@Python\_Master_](https://www.twitter.com/Python_Master_)
* [@Python_programz](https://www.twitter.com/Python_programz)
* [@pythonbeginner_](https://www.twitter.com/pythonbeginner_)
* [@PythonsTraining](https://www.twitter.com/PythonsTraining)
* [@LearnsPython](https://www.twitter.com/LearnsPython)
* [@PythonDailyNews](https://www.twitter.com/PythonDailyNews)
* [@python_news_4u](https://www.twitter.com/python_news_4u)
* [@python\_academy_](https://www.twitter.com/python_academy_)
* [@pythonmaster_](https://www.twitter.com/pythonmaster_)
* [@PythonDev_AtoZ](https://www.twitter.com/PythonDev_AtoZ)
* [@LearnPython_toZ](https://www.twitter.com/LearnPython_toZ)
* [@Python_AtoZ](https://www.twitter.com/Python_AtoZ)
* [@Python4Tutorial](https://www.twitter.com/Python4Tutorial)
/r/Python
https://redd.it/7wl2hc
Twitter
Learn Python (@learn_pythonx) | Twitter
The latest Tweets from Learn Python (@learn_pythonx). Here to share events, tutorials, courses, books... related to #python #django #flask #programming #code #webdev #development. England, United Kingdom
Jupyter Coding Console in ATH Precision (AI/ML Platform)
**Analyttica Datalab's AI/ML Platform ATH Precision provides a feature of** [**#Jupyter**](https://www.linkedin.com/feed/hashtag/?highlightedUpdateUrns=urn%3Ali%3Aactivity%3A6641233793892085760&keywords=%23Jupyter&originTrackingId=jMi4N7BF8PzzsWq4%2FCle2w%3D%3D) Coding Console
With the coding console, you get the power to [**#code**](https://www.linkedin.com/feed/hashtag/?highlightedUpdateUrns=urn%3Ali%3Aactivity%3A6641233793892085760&keywords=%23code&originTrackingId=jMi4N7BF8PzzsWq4%2FCle2w%3D%3D) and [**#create**](https://www.linkedin.com/feed/hashtag/?highlightedUpdateUrns=urn%3Ali%3Aactivity%3A6641233793892085760&keywords=%23create&originTrackingId=jMi4N7BF8PzzsWq4%2FCle2w%3D%3D) your own function.
Check out the platform here - [https://www.analyttica.com/precision/](https://www.analyttica.com/precision/)
https://preview.redd.it/t70jxjqep0m41.png?width=2208&format=png&auto=webp&s=a987b04f224ab666b742166da30af7db1143bc07
/r/JupyterNotebooks
https://redd.it/fguuyt
**Analyttica Datalab's AI/ML Platform ATH Precision provides a feature of** [**#Jupyter**](https://www.linkedin.com/feed/hashtag/?highlightedUpdateUrns=urn%3Ali%3Aactivity%3A6641233793892085760&keywords=%23Jupyter&originTrackingId=jMi4N7BF8PzzsWq4%2FCle2w%3D%3D) Coding Console
With the coding console, you get the power to [**#code**](https://www.linkedin.com/feed/hashtag/?highlightedUpdateUrns=urn%3Ali%3Aactivity%3A6641233793892085760&keywords=%23code&originTrackingId=jMi4N7BF8PzzsWq4%2FCle2w%3D%3D) and [**#create**](https://www.linkedin.com/feed/hashtag/?highlightedUpdateUrns=urn%3Ali%3Aactivity%3A6641233793892085760&keywords=%23create&originTrackingId=jMi4N7BF8PzzsWq4%2FCle2w%3D%3D) your own function.
Check out the platform here - [https://www.analyttica.com/precision/](https://www.analyttica.com/precision/)
https://preview.redd.it/t70jxjqep0m41.png?width=2208&format=png&auto=webp&s=a987b04f224ab666b742166da30af7db1143bc07
/r/JupyterNotebooks
https://redd.it/fguuyt
Linkedin
Sign Up | LinkedIn
500 million+ members | Manage your professional identity. Build and engage with your professional network. Access knowledge, insights and opportunities.
Deploy Machine Learning Model Using Django Framework
https://www.youtube.com/watch?v=zcALUNZNBUk
/r/djangolearning
https://redd.it/hi0prw
https://www.youtube.com/watch?v=zcALUNZNBUk
/r/djangolearning
https://redd.it/hi0prw
YouTube
Deploy Machine Learning Model Using Django Framework - Easy to follow Step-by-Step
Subscribe to the channel.
Deploy Machine Learning Model Using Django Framework - Code-Along
This video shows you How to Deploy your Machine learning model into a website using Python Framework Django.
Profiles :
LinkedIn: https://www.linkedin.com/in/saiprakash14/…
Deploy Machine Learning Model Using Django Framework - Code-Along
This video shows you How to Deploy your Machine learning model into a website using Python Framework Django.
Profiles :
LinkedIn: https://www.linkedin.com/in/saiprakash14/…
I made a Mastermind like game
Hi
This is my first code ever so please be kind. I just finished some online tutorial and wanted to test what I remembered from it. Thank you in advance for your time.
#game mastermind
#code breaking game
#X = not in phrase
#O = in phrase and in the right place
#A = in phrase but at the wrong place
import random
print('Mastermind !')
maxnumber=input('Input your maximum number between 4 and 9 (9 being the hardest) : ')
phrase = [random.randint(1,int(maxnumber))]
for x in range(3):
a = random.randint(1,int(maxnumber))
while a in phrase:
a = random.randint(1,int(maxnumber))
phrase.append(a)
playerphrase= 0000
counter = 0
maxcounter=input('How many turns do you want to give yourself (3 is not doable 4 is hard and it gets easier
/r/Python
https://redd.it/k1fmq5
Hi
This is my first code ever so please be kind. I just finished some online tutorial and wanted to test what I remembered from it. Thank you in advance for your time.
#game mastermind
#code breaking game
#X = not in phrase
#O = in phrase and in the right place
#A = in phrase but at the wrong place
import random
print('Mastermind !')
maxnumber=input('Input your maximum number between 4 and 9 (9 being the hardest) : ')
phrase = [random.randint(1,int(maxnumber))]
for x in range(3):
a = random.randint(1,int(maxnumber))
while a in phrase:
a = random.randint(1,int(maxnumber))
phrase.append(a)
playerphrase= 0000
counter = 0
maxcounter=input('How many turns do you want to give yourself (3 is not doable 4 is hard and it gets easier
/r/Python
https://redd.it/k1fmq5
reddit
I made a Mastermind like game
Hi This is my first code ever so please be kind. I just finished some online tutorial and wanted to test what I remembered from it. Thank you in...
Here is how i made a 2D game using Python Matplotlib
Im only few month into learning Python and i was wondering if i could make a game with it. I didnt know about any libraries created specifically for developing games at the time, so i asked an AI if i could somehow make a code that opens and plays GIF animations. AI came up with a function that opens GIFs as matplotlib plots. I added a condition that if 'space' button is pressed, the animation stops and the last frame number is saved into a variable, and then the value of the variable determines what happens next. This whole game is built around this simple algorithm.
showcase: https://youtu.be/ZAXlaOWMgfM
source code: https://drive.google.com/drive/folders/1bKV4\_AdCgnW40A8B1kFkFYryIuTE44A6?usp=share\_link
icon
​
QTE
/r/Python
https://redd.it/11szlvk
Im only few month into learning Python and i was wondering if i could make a game with it. I didnt know about any libraries created specifically for developing games at the time, so i asked an AI if i could somehow make a code that opens and plays GIF animations. AI came up with a function that opens GIFs as matplotlib plots. I added a condition that if 'space' button is pressed, the animation stops and the last frame number is saved into a variable, and then the value of the variable determines what happens next. This whole game is built around this simple algorithm.
showcase: https://youtu.be/ZAXlaOWMgfM
source code: https://drive.google.com/drive/folders/1bKV4\_AdCgnW40A8B1kFkFYryIuTE44A6?usp=share\_link
icon
​
QTE
/r/Python
https://redd.it/11szlvk
YouTube
Sus Duel 2D 1.1 showcase. A Matplotlib python game.
This is an updated version of my first python game i made using Matplotlib.
Changelog:
1) damage calculation mistakes are fixed
2) game window was increased in size and now has fixed position on the screen
3) y and x axes were removed, background color was…
Changelog:
1) damage calculation mistakes are fixed
2) game window was increased in size and now has fixed position on the screen
3) y and x axes were removed, background color was…
I have some questions about wtf-forms, when using flask wtf forms what exactly is {{ form.username }} equal to in the html? I assume it just gives the "input type=".
Here is an example of the form.
class RegistrationForm(FlaskForm):
username = StringField('username',validators=
[
DataRequired(message='Username is required'),
Length(min=2, max=25 , message='Must be between 2 and 25 characters'),
check_if_username_not_in_db
])
Also how would I implement the code without validation errors ?
​
For more details here is an example.
I am just using args as a placeholder normally I would just add the variables.
def some_func(*args)
#code
raise ValidationError('Please include a capital letter in the password field')
Would I just go
def some_func(*args)
#code
render_template(register.html, 'validationerror='Please include a capital letter in the password field')
and then just go in the register.html
{% if validationerror %}
{{ validationerror }}
/r/flask
https://redd.it/1bs01eu
Here is an example of the form.
class RegistrationForm(FlaskForm):
username = StringField('username',validators=
[
DataRequired(message='Username is required'),
Length(min=2, max=25 , message='Must be between 2 and 25 characters'),
check_if_username_not_in_db
])
Also how would I implement the code without validation errors ?
​
For more details here is an example.
I am just using args as a placeholder normally I would just add the variables.
def some_func(*args)
#code
raise ValidationError('Please include a capital letter in the password field')
Would I just go
def some_func(*args)
#code
render_template(register.html, 'validationerror='Please include a capital letter in the password field')
and then just go in the register.html
{% if validationerror %}
{{ validationerror }}
/r/flask
https://redd.it/1bs01eu
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
How do I add a new entry to my many to many related table in Django?
I have two models Course and Educators. Course has 3 fields course\_name, course\_educators and course\_past\_educators which link Educators to Courses by many to many. I want to write a function so that whenever a new entry is added to course\_educators that entry will be copied over to course\_past\_educators.
#models.py
#code for Educators model
class Educators(models.Model):
educator_name=models.CharField(max_length=20,default=None)
educator_img = models.ImageField(upload_to='educators_img',default=None)
#code for Courses model
class Course(models.Model):
course_name = models.CharField(max_length=100)
course_educators=models.ManyToManyField(Educators, related_name='current_educators', default=None, blank=True)
course_past_educators=models.ManyToManyField(Educators, related_name='past_educators', default=None, blank=True)
#views.py
#This is the function I wrote so that entries into course_past_educators are automatically added when course_educators is added with another entry.
u/receiver(m2m_changed, sender=Course.course_educators.through)
def create_past_educator_on_add(sender, instance, action, reverse, model, pk_set, **kwargs):
if action == 'post_add' and reverse is False:
/r/djangolearning
https://redd.it/1cq2j42
I have two models Course and Educators. Course has 3 fields course\_name, course\_educators and course\_past\_educators which link Educators to Courses by many to many. I want to write a function so that whenever a new entry is added to course\_educators that entry will be copied over to course\_past\_educators.
#models.py
#code for Educators model
class Educators(models.Model):
educator_name=models.CharField(max_length=20,default=None)
educator_img = models.ImageField(upload_to='educators_img',default=None)
#code for Courses model
class Course(models.Model):
course_name = models.CharField(max_length=100)
course_educators=models.ManyToManyField(Educators, related_name='current_educators', default=None, blank=True)
course_past_educators=models.ManyToManyField(Educators, related_name='past_educators', default=None, blank=True)
#views.py
#This is the function I wrote so that entries into course_past_educators are automatically added when course_educators is added with another entry.
u/receiver(m2m_changed, sender=Course.course_educators.through)
def create_past_educator_on_add(sender, instance, action, reverse, model, pk_set, **kwargs):
if action == 'post_add' and reverse is False:
/r/djangolearning
https://redd.it/1cq2j42
Reddit
From the djangolearning community on Reddit
Explore this post and more from the djangolearning community
Master the python logging module
As a consultant I often find interesting topics that could warrent some knowledge sharing or educational content.
To satisfy my own hunger to share knowledge and be creative I've started to create videos with the purpose of free education for junior to medior devs.
My first video is about how the python logging module works and hopes to demystify some interesting behavior.
Hope you like it!
https://youtu.be/A3FkYRN9qog?si=89rAYSbpJQm0SfzP
/r/Python
https://redd.it/1eyn4n7
As a consultant I often find interesting topics that could warrent some knowledge sharing or educational content.
To satisfy my own hunger to share knowledge and be creative I've started to create videos with the purpose of free education for junior to medior devs.
My first video is about how the python logging module works and hopes to demystify some interesting behavior.
Hope you like it!
https://youtu.be/A3FkYRN9qog?si=89rAYSbpJQm0SfzP
/r/Python
https://redd.it/1eyn4n7
YouTube
Master the python logging module
This video gives insight into the python logging module. Master handers, filters, formatters, log hierarchy and log configuration.
A write-up is available at https://www.timnology.io/articles/python-logging
#python #code #tutorial #education
A write-up is available at https://www.timnology.io/articles/python-logging
#python #code #tutorial #education
New fastest HTML parser
Hello there, I've created a python bindings to html c library reliq.
https://github.com/TUVIMEN/reliq-python
It comes in pypi packages that are compiled for windows, x86 aarch64 armv7 linux, and macos.
# What My Project Does
It provides a HTML parser with functions for traversing it.
Unfortunately it doesn't come with standardized selector language like css selectors or xpath (they might get added in the future). Instead it comes with it's own, which you can read about in the main lib (full documentation is in a man page).
Code example can be seen here.
# Target Audience
This project has been used for many professional projects e.g. forumscraper, 1337x-scraper, blu-ray-scraper, all of which are scrapers, and thats it's main use.
# Comparison
You can see benchmark with other python libraries here.
For anyone wondering where does the speed and memory efficiency come from - it creates parsed structure in reference to original html string provided. If html string changes, entire structure has to be reparsed to match it.
This comes with limitation unique only to this library - although possible, any functions changing html structures aren't implemented. This however is useful only for browsers ;)
/r/Python
https://redd.it/1lganqg
Hello there, I've created a python bindings to html c library reliq.
https://github.com/TUVIMEN/reliq-python
It comes in pypi packages that are compiled for windows, x86 aarch64 armv7 linux, and macos.
# What My Project Does
It provides a HTML parser with functions for traversing it.
Unfortunately it doesn't come with standardized selector language like css selectors or xpath (they might get added in the future). Instead it comes with it's own, which you can read about in the main lib (full documentation is in a man page).
Code example can be seen here.
# Target Audience
This project has been used for many professional projects e.g. forumscraper, 1337x-scraper, blu-ray-scraper, all of which are scrapers, and thats it's main use.
# Comparison
You can see benchmark with other python libraries here.
For anyone wondering where does the speed and memory efficiency come from - it creates parsed structure in reference to original html string provided. If html string changes, entire structure has to be reparsed to match it.
This comes with limitation unique only to this library - although possible, any functions changing html structures aren't implemented. This however is useful only for browsers ;)
/r/Python
https://redd.it/1lganqg
GitHub
GitHub - TUVIMEN/reliq: HTML parsing and searching tool
HTML parsing and searching tool. Contribute to TUVIMEN/reliq development by creating an account on GitHub.
iommi 7.15.1 released
The biggest new feature is the new debug tool "code finder" which makes it super easy to find the code you want to modify in complex pages with many templates. There's a tiny demo in the docs: https://docs.iommi.rocks/dev_tools.html#code-finder In your real project it would jump into the IDE at the file and line of the closest `{% if/for/trans %}` tag.
Other changes:
* Support GeneratedField
* Debug menu should preserves GET parameters for profile/SQL trace/code finder
* Main menu: http urls should also be counted as external
* Main menu: dynamic submenus
* Main menu: M.icon can be a callable
* Fix EditTable delete button for dynamically added rows
* Fixed re-rendering not added rows when validation errors occur in new rows
* Ability to pass arbitrary kwargs to `object.save` in edit/create forms cleanly
* EditTable new row handling now done via AJAX, making it much more powerful
* Many more minor bug fixes
* Many documentation improvements
https://github.com/iommirocks/iommi
/r/django
https://redd.it/1n6ik9l
The biggest new feature is the new debug tool "code finder" which makes it super easy to find the code you want to modify in complex pages with many templates. There's a tiny demo in the docs: https://docs.iommi.rocks/dev_tools.html#code-finder In your real project it would jump into the IDE at the file and line of the closest `{% if/for/trans %}` tag.
Other changes:
* Support GeneratedField
* Debug menu should preserves GET parameters for profile/SQL trace/code finder
* Main menu: http urls should also be counted as external
* Main menu: dynamic submenus
* Main menu: M.icon can be a callable
* Fix EditTable delete button for dynamically added rows
* Fixed re-rendering not added rows when validation errors occur in new rows
* Ability to pass arbitrary kwargs to `object.save` in edit/create forms cleanly
* EditTable new row handling now done via AJAX, making it much more powerful
* Many more minor bug fixes
* Many documentation improvements
https://github.com/iommirocks/iommi
/r/django
https://redd.it/1n6ik9l