Erik

1.2K posts

Erik banner
Erik

Erik

@erikyan

Writer, Python instructor. Learn Python @ https://t.co/chZZ9TnCVF

Amsterdam, The Netherlands Katılım Şubat 2009
335 Takip Edilen1.9K Takipçiler
Erik
Erik@erikyan·
@tweakers Haha en ze vervangen het kennelijk ook in tweets
Nederlands
0
0
3
111
Erik
Erik@erikyan·
@pe1chl @NOS Misschien had ie gewoon zijn ID bij zich?
Nederlands
0
0
2
107
Rob Janssen
Rob Janssen@pe1chl·
@NOS "het gaat om een man", meldt de politie. Hoe weet de politie dat nou? Als er een overleden persoon op straat ligt die het uiterlijk heeft van een man, dan kan het toch nog best zijn dat ie zich als vrouw identificeert en geen man genoemd wil worden??
Nederlands
6
0
9
799
NOS
NOS@NOS·
Man overleden bij schietpartij in Apeldoorn ift.tt/9ACPZWD
Nederlands
20
4
15
55.9K
Erik
Erik@erikyan·
Python has some pretty nifty string functions. Here are some examples!
Erik tweet media
English
1
2
15
1.4K
Erik
Erik@erikyan·
Want to swap two variables? Python makes it incredibly easy thanks to tuple unpacking! a = 5 b = 10 a, b = b, a
English
0
0
8
893
Erik retweetledi
python.land
python.land@python_land·
With Pyenv, you can start using Python 3.12 right away since they've added it to their list of supported versions as soon as it came out. Learn more about Pyenv here 👇 python.land/virtual-enviro…
English
0
1
1
741
Erik
Erik@erikyan·
💡 Do you know #Python’s any() and all() functions? These are powerful tools for evaluating iterables! any() returns True if at least one element of an iterable is true. all() returns True only if all elements of an iterable are true.
English
0
1
2
650
Erik
Erik@erikyan·
👀 Use Python’s built-in help() function! It's an interactive way to explore documentation and learn more about Python objects and modules in the Python REPL! 📚 Examples: help(str) import os help(os) help(os.path) etc.
English
0
1
1
523
Erik
Erik@erikyan·
🐍 #Python Tip: Want to remove the last letter from a word using slicing? Here's how: word = "Python" new_word = word[:-1] print(new_word) # Outputs 'Pytho' Learn more here: #Reversing_a_string_slicing" target="_blank" rel="nofollow noopener">python.land/introduction-t…
English
0
1
2
437
Erik
Erik@erikyan·
Another notable thing is using a per-interpreter GIL. The GIL ensures there is only one thread running at any time. Because only one thread can run at a time, using multiple processors with threads is impossible right now. Read more here: #whatsnew312-pep684" target="_blank" rel="nofollow noopener">docs.python.org/3.12/whatsnew/…
English
0
0
0
254
Erik
Erik@erikyan·
One notable change: you can use the same quotes inside a nested f-string: >>> f"Quotes inside a nested f-string: {"a string"}" 'Quotes inside a nested f-string now: a string' I'm not sure what to think of this yet...
English
1
0
0
272
Erik
Erik@erikyan·
Yesterday, Python 3.12 was released. Many people won't use it for a while since most lag behind a few versions for various reasons. Nevertheless, you can check out what's new in this post: docs.python.org/3.12/whatsnew/…
English
2
0
0
341
Erik
Erik@erikyan·
🔄 Python’s itertools module is a collection of fast, memory-efficient tools that are useful for working with iterators (e.g., loops). Explore more: #Python" target="_blank" rel="nofollow noopener">docs.python.org/3/library/iter… #Itertools #Coding #Developer
English
0
2
3
309
Erik retweetledi
python.land
python.land@python_land·
🤖 Python #Trivia: The name 'Python' was not derived from the snake but from the British comedy series 'Monty Python’s Flying Circus'! 📺 What's your favorite Python fun fact? 🧠 #PythonProgramming #DidYouKnow
English
0
1
2
238
Erik
Erik@erikyan·
What does the teams variable look like after this? #Python #quiz
Erik tweet media
English
1
0
0
475
Erik retweetledi
Bob Belderbos
Bob Belderbos@bbelderbos·
TIL about math.isclose() to compare floating-point numbers in #Python I already knew about pytest's approx() which is similar, but turns out the Standard Library has you covered once more: x = 0.1 + 0.2 print(x == 0.3) # False 😱 # need a small tolerance import math print(math.isclose(x, 0.3)) # True So math.isclose() checks whether two numbers are close enough to each other, within a given tolerance, avoiding the pitfalls of floating-point comparison. #tips #pythonprogramming
English
2
7
54
18K
Erik retweetledi
Tesla Optimus
Tesla Optimus@Tesla_Optimus·
Optimus can now sort objects autonomously 🤖 Its neural network is trained fully end-to-end: video in, controls out. Come join to help develop Optimus (& improve its yoga routine 🧘) → tesla.com/AI
English
2.9K
7.3K
33.5K
14.2M
Erik
Erik@erikyan·
@xcraftsdesign That's a really good one, thanks! Super handy to toggle quickly because you don't want to see all the hidden Mac files all the time.
English
0
0
1
90
Origami
Origami@renzuru__·
@erikyan #macOSTricks By default, macOS hides (pardon the redundancy) hidden files. This might be especially frustrating for developers working with files such as .git, .gitignore, etc. Pressing Command + Shift + Period (⌘ ⇧ .) you can toggle hidden files on and off.
Origami tweet media
English
1
0
1
256
Erik
Erik@erikyan·
After a few years of using Windows + Linux (dual boot), I returned to MacOS (Macbook Pro). Do you have any tips, tricks, or cool software I need to know about as a software developer?
English
3
0
2
387