- Guide to PyPi
- Guide to writing a package (vboykis)
- Documentation in
.rst
format:pandoc --from=markdown --to=rst --output=README.rst README.md
- https://gehrcke.de/2014/02/distributing-a-python-command-line-application/
- http://kronosapiens.github.io/blog/2014/07/28/understanding-package-imports-in-python.html imports
- https://hynek.me/articles/sharing-your-labor-of-love-pypi-quick-and-dirty/#fnref:meta-peps
- rst check: http://rst.ninjs.org
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://twitter.com/thorstenball/status/1576619567488475137?s=20&t=KaBdUrc5-M1bnNTMU6tuQA | |
Working with Unix Processes | |
Working with TCP Sockets | |
Working with Ruby Threads | |
Zed Shaw's C book | |
Programming From The Ground Up | |
Destroy All Software | |
PeepCode Play by Play | |
Pragmatic Programmer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install Karabiner Elements. | |
Follow this | |
https://github.com/tekezo/Karabiner-Elements/issues/638 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH=/Users/vegard/.oh-my-zsh | |
# Set name of the theme to load. Optionally, if you set this to "random" | |
# it'll load a random theme each time that oh-my-zsh is loaded. | |
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes | |
ZSH_THEME="sobole" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def pairwise(iterable, n): | |
iterator = iter(iterable) | |
items = [None]*n | |
for i in range(n): | |
try: | |
items[i] = next(iterator) | |
except StopIteration: | |
return | |
yield tuple(items) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def pairwise(it): | |
iterator = iter(it) | |
try: | |
i = next(iterator) | |
except StopIteration: | |
return | |
yield | |
try: | |
j = next(iterator) | |
except StopIteration: |
tee
fromitertools
is cool! link
from itertools import tee
i, j = tee(data)
next(j)
for first, second in zip(i, j):
Given array a
, count occurrences and stack.
e.g. a = np.array([0, 0, 1, 1, 2, 1, 0, 2, 3, 0, 1])
then counts = np.dstack(np.unique(a, return_counts=True))
gives
array([[[0, 4],
[1, 4],
[2, 2],
current_date - interval '1 days'*extract(isodow from now())
sunday before this week
NewerOlder