code_chunk's profile picture. Edible code chunks in Python(primarily) 🐍

code_chunk

@code_chunk

Edible code chunks in Python(primarily) 🐍

Angepinnt

Hey everyone! This is a new page for checking out different Python code snippets, or as called code chunks.


"Remember that there is no code faster than no code."


How to delete a non-empty folder? - Using `os.rmdir` on a non-empty folder gives error. - We can delete the contents of the folder and then delete the folder itself. Here is a `recursive_delete` function for the same.

code_chunk's tweet image. How to delete a non-empty folder?
- Using `os.rmdir` on a non-empty folder gives error.
- We can delete the contents of the folder and then delete the folder itself.
Here is a `recursive_delete` function for the same.

This is a goldmine for python related talks. If anyone is interested to watch Python Conference videos, this is the best site to search for it! @PyvideoOrg thank you! pyvideo.org


command + A = whole field single-click + drag = characters double-click + drag = whole words triple-click + drag = whole paragraph or line from Brandon Rhodes talk "Activation Energy" youtube.com/watch?v=pybtvF…

code_chunk's tweet card. Activation Energy, by Brandon Rhodes

youtube.com

YouTube

Activation Energy, by Brandon Rhodes


To understand the basics of Python, go through this course dabeaz-course.github.io/practical-pyth… by David Beazley. Simple and beautiful.


Solution for a problem on codeforces, codeforces.com/problemset/pro…. In Python, we have simple and beautiful functions `split` and `join` to work with the strings. What are some equivalent functions in C++ ? #python #cpp #codingproblem #code

code_chunk's tweet image. Solution for a problem on codeforces, codeforces.com/problemset/pro….

In Python, we have simple and beautiful functions `split` and `join` to work with the strings. What are some equivalent functions in C++ ?

#python #cpp #codingproblem #code

Implementing the `wc` command present in *nix[ only for counting lines, characters and words ] awk vs. Python code. #awk #Python #programminglanguages

code_chunk's tweet image. Implementing the `wc` command present in *nix[ only for counting lines, characters and words ]
awk vs. Python code.

#awk #Python #programminglanguages

Did you know python has a groupby function? It provides an iterator to the group formed based on key provided. If no key is specified the identity function is used (i.e., the element itself) Go listen to the @adspthepodcast Episode 4!

code_chunk's tweet image. Did you know python has a groupby function?
It provides an iterator to the group formed based on key provided. If no key is specified the identity function is used (i.e., the element itself)
Go listen to the @adspthepodcast  Episode 4!

lexicographical compare in Python🐍

code_chunk's tweet image. lexicographical compare in Python🐍

Favourite Python talks by @nedbat 1. Facts and myths about Python names and values youtube.com/watch?v=_AEJHK… 2. Loop like a native youtube.com/watch?v=EnSu9h… 3. Pragmatic unicode, or How do I stop the pain? youtube.com/watch?v=sgHbC6… Check them out!

code_chunk's tweet card. Pragmatic Unicode, or, How do I stop the pain?

youtube.com

YouTube

Pragmatic Unicode, or, How do I stop the pain?


United States Trends

Loading...

Something went wrong.


Something went wrong.