Instantly share code, notes, and snippets.

🖥️
Aimlessly staring at the screen

🖥️
Aimlessly staring at the screen
Created December 12, 2021 06:44
ML Conda Environment for Apple M1 (arm64) macs with tensorflow 2.7.0 and python 3.8 including GPU support.
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
 name: tf channels: - apple - conda-forge dependencies: - absl-py=0.10.0=pyhd8ed1ab_1 - aiohttp=3.8.1=py38hea4295b_0 - aiosignal=1.2.0=pyhd8ed1ab_0 - anyio=3.4.0=py38h10201cd_0 - appnope=0.1.2=py38h10201cd_2
Last active October 4, 2019 02:43 — forked from willprice/README.md
Install OpenCV 4.1.1 for Raspberry Pi 3 or 4 (Raspbian Buster)

Install OpenCV 4.1.1 on Raspbian Buster

```\$ chmod +x *.sh
\$ ./install-deps.sh
\$ ./build-opencv.sh
\$ cd ~/opencv/opencv-4.1.1/build
\$ sudo make install```
Created September 19, 2018 02:58
A python script to calculate the sum of all prime numbers less than n
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 sum_primes(limit): primes = [] for n in range(2, limit+1): # try dividing n with all primes less than sqrt(n): for p in primes: if n % p == 0: break # if p divides n, stop the search if n < p*p: primes.append(n) # if p > sqrt(n), mark n as prime and stop search break else: primes.append(n) # fallback: we actually only get here for n == 2
Created July 27, 2018 06:45
Script to recursively brute-force and extract password protected zip files
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
 #!/usr/bin/env bash while [ -e *.zip ]; do files=*.zip; for file in \$files; do echo -n "Cracking \${file}… "; output="\$(fcrackzip -u -l 1-6 -c '1' *.zip | tr -d '\n')"; password="\${output/PASSWORD FOUND\!\!\!\!: pw == /}"; if [ -z "\${password}" ]; then echo "Failed to find password";
Last active July 27, 2018 06:43
Script to decrypt RSA encrypted message
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
 #! /usr/bin/env python3 # Script to break RSA import binascii # Variables c=62078086677416686867183857957350338314446280912673392448065026850212685326551183962056495964579782325302082054393933682265772802750887293602432512967994805549965020916953644635965916607925335639027579187435180607475963322465417758959002385451863122106487834784688029167720175128082066670945625067803812970871 p=7901324502264899236349230781143813838831920474669364339844939631481665770635584819958931021644265960578585153616742963330195946431321644921572803658406281 q=12802918451444044622583757703752066118180068668479378778928741088302355425977192996799623998720429594346778865275391307730988819243843851683079000293815051 dp=5540655028622021934429306287937775291955623308965208384582009857376053583575510784169616065113641391169613969813652523507421157045377898542386933198269451
Created December 25, 2017 17:46
SimpleExoPlayer Fullscreen Playback Control Layout
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