Did you know that you can give #Python's print an iterator and a separator?
So in this example you don't need the for loop
So in this example you don't need the for loop
#Python functions are first-class objects so you can access their attributes like this.
The #Python requests library lets you conveniently choose if you want to raise an exception or not.
Did you know #Python's random module has a function called "randrange" that lets you choose a random item from range(start, stop[, step]) ?
In #Python you can chain comparison operators ...
Instead of writing "1 < a and a < 10" you can write "1 < a < 10", a bit more concise.
Instead of writing "1 < a and a < 10" you can write "1 < a < 10", a bit more concise.
👴 #Python wisdom for the day: you can directly call methods on integers (remember, Python is fully object-oriented; no automatic boxing needed here 😉)
🐍Python Tip: To convert your strings to be URL friendly. For example, when constructing an API request/query strings, you can use urllib's quote method like so 👆🏻
#networkautomation #python #python3
#networkautomation #python #python3
Do you want to practice your #Python #ML skills? There is a small hackathon on genomic datasets on Nov 19, 3-8pm CET, remote participation possible:
https://sites.google.com/view/genomichackaton/schedule
More info about the datasets:
https://github.com/ML-Bioinfo-CEITEC/genomic_benchmarks
https://sites.google.com/view/genomichackaton/schedule
More info about the datasets:
https://github.com/ML-Bioinfo-CEITEC/genomic_benchmarks
Google
Schedule
Thank you for participating
1st place - DNA BERT transfer learning transformer
2nd place - CNN
3rd place - CNN + Bidirectional RNN
How to compete further
Starter code
1st place - DNA BERT transfer learning transformer
2nd place - CNN
3rd place - CNN + Bidirectional RNN
How to compete further
Starter code
🐍📰 Advanced Visual Studio Code for #Python Developers
In this tutorial, you'll learn how you can configure, extend, and optimize Visual Studio Code for a more effective and productive Python development environment
https://realpython.com/advanced-visual-studio-code-python/
In this tutorial, you'll learn how you can configure, extend, and optimize Visual Studio Code for a more effective and productive Python development environment
https://realpython.com/advanced-visual-studio-code-python/
Real Python
Advanced Visual Studio Code for Python Developers – Real Python
In this tutorial, you'll learn how you can configure, extend, and optimize Visual Studio Code for a more effective and productive Python development environment. By digging into this customizable code editor and IDE, you'll put yourself on track to be a VS…
Did you know that #Python's round() built-in accepts a negative number that lets you rounds up to the next 10, 100, 1000, ... ? 🐍🤯
Common #Python #interview question:
How to flatten a list of lists (several nested levels)?
Seems itertools.chain only goes one level deep, so let's use some recursion here.
How to flatten a list of lists (several nested levels)?
Seems itertools.chain only goes one level deep, so let's use some recursion here.
#Python default argument values are evaluated once so mutability can bite you, use "None" instead.
What is this if name == "__main__": at the end of a #Python script?
It's typically used to include code that ONLY should run if the module / script is called directly and NOT upon importing it.
Example:
It's typically used to include code that ONLY should run if the module / script is called directly and NOT upon importing it.
Example:
#Snippet
Useful constants in #python
Using #Python's calendar module + the enumerate built-in to make a mapping of month names -> numbers
Useful constants in #python
Using #Python's calendar module + the enumerate built-in to make a mapping of month names -> numbers
>>> import calendar
>>> MONTH_NAMES_TO_NUMBERS = {
... v: k for k, v in enumerate(calendar.month_abbr[1:], start=1)
... }
>>> MONTH_NAMES_TO_NUMBERS
{'Jan': 1, 'Feb': 2, 'Mar': 3, 'Apr': 4, 'May': 5, 'Jun': 6, 'Jul': 7, 'Aug': 8, 'Sep': 9, 'Oct': 10, 'Nov': 11, 'Dec': 12}Forwarded from Information for IT Students
How to send a tweet with #Python and TweePy in under 10 lines of code
🐍🔥
For more information, refer the Twitter thread given below👇🏻
🐍🔥
For more information, refer the Twitter thread given below👇🏻
#Python's print() built-in is more powerful than you might think