This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
git rm -r --cached node_modules | |
git commit -m 'Remove the now ignored directory node_modules' | |
git push origin master |
# This is a really old post, in the comments (and stackoverflow too) you'll find better solutions. | |
def find(key, dictionary): | |
for k, v in dictionary.iteritems(): | |
if k == key: | |
yield v | |
elif isinstance(v, dict): | |
for result in find(key, v): | |
yield result | |
elif isinstance(v, list): |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
The use of __main__.py
to create executables
myprojectfolder/
|_ __main__.py
|_ __init__.py
Being __main__.py
:
print("Hello")
# Dependencies to make "headless" chrome/selenium work: | |
sudo apt-get -y install xvfb gtk2-engines-pixbuf | |
sudo apt-get -y install xfonts-cyrillic xfonts-100dpi xfonts-75dpi xfonts-base xfonts-scalable | |
echo "Starting X virtual framebuffer (Xvfb) in background..." | |
Xvfb -ac :99 -screen 0 1280x1024x16 & | |
export DISPLAY=:99 |
Do you need a refresher on git? Go through Codecademy's git
course.
Using your terminal/command line, get inside the folder where your project files are kept:
cd /path/to/my/codebase
.
→ You cannot do this simply by opening the folder normally, you must do this with the command line/terminal.
→ Do you need a refresher on using your command line/terminal? I've compiled my favorite resources here.
Check if git is already initialized: git status
The following is what I needed to do to get Python going on my M1 Mac mini to the extent that I could run code from Chapter 2 of Introduction to Machine Learning with Python.
wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-arm64.sh
bash Miniforge3-MacOSX-arm64.sh
conda install scipy matplotlib ipython scikit-learn pandas pillow
conda install -c conda-forge jupyterlab
The protocol uses a pair of rings, one for the senders, one for the receivers, represented as a singular ring. With each transfer, a list of ElGamal ciphertexts is provided for all accounts within the joint ring. This ElGamal ciphertext is formed as r * G, (r * K) + (a * G)
, where r
is some randomness, K
is the key for the account the ciphertext is for, and a
is the amount.
Dero offers an 'encrypted message' with every transaction. Even if the user does not explicitly provide one, a message will exist (either with internally provided values or left empty). For the only defined type of message, the message is encoded as the index of the sender, a CBOR-encoded object, and zero-padding. The message is encrypted with the Chacha20 stream created by a key of H(H(r * K) || K)
where r
is some randomness and K
is the key for the account the ciphertext is for.