- I would recommend skipping installing Python on your machine for now. Instead, I would start with something like Google Colab. It's linked to your Google account and Google Drive and they have a generous free tier. This is an excellent environment for first learning Python in and similar to a Jupyter Lab/Notebook environment that you will likely use in the future at some point.
- After using Google Colab for some time, Python can be installed multiple ways. My recommendations:
- Windows
- Scoop or Chocolatey package manager (
scoop install python
) - Anaconda/Spyder provides a GUI similar to Matlab's GUI (great for data science, data exploration, or other STEM tasks)
- Scoop or Chocolatey package manager (
- Windows
- Using Ubuntu under Window's Subsystem for Linux (then see L
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 sh | |
dd status=progress if=/dev/zero of=/swapfile status=progress bs=1024 count=$[(1024**2)*4] && sync # 4G | |
chmod 0600 /swapfile | |
mkswap -L swap /swapfile | |
swapon /swapfile |
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
from typing import List | |
# max_len determines the maximum length in the second dimension of Python list | |
def max_len(items: List) -> int: | |
maxLen = 0 | |
for item in items: | |
if (itemLen := len(item)) > maxLen: | |
maxLen = itemLen | |
return maxLen |
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
man -P 'less -p ^HISTORY\ EXPANSION' bash | |
##### GLOBS ##### | |
!^ # first argument | |
!$ # last argument | |
!* # all arguments | |
!:2 # second argument | |
!:2-3 # second to third arguments | |
!:2-$ # second to last arguments |
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 sh | |
##### GO[LANG] ##### | |
godoc & # starts a webserver so run it in the bg | |
open http://127.0.0.1:6060 | |
fg %<job> | |
##### RUST ##### | |
rustup doc [--std] |
Following this guide: https://wiki.mobileread.com/wiki/Kindle4NTHacking#SSH.
Using Kindle 4.1 and macOS 10.14.
- Connect the Kindle. It should be recognized as a USB Mass Storage Device.
- Download the jailbreak archive
- Copy
data.tar.gz
,ENABLE_DIAGS
, anddiagnostic_logs
to the Kindle folder. - Restart the Kindle into Diagnostics Mode.
- Reboot the Kindle from the Diagnostics Mode. Reboot screen should show jailbroken screensaver.
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/ruby | |
# Create display override file to force Mac OS X to use RGB mode for Display | |
# see http://embdev.net/topic/284710 | |
require 'base64' | |
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay` | |
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten | |
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten |
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
import itertools | |
def downsample(x, n, phase=0, roll=False): | |
""" | |
Downsampling compatible with Matlab's implementation, plus an | |
additonal argument of roll to allow rolling the end of the iterable | |
into the beginning when phase is greater than 0. | |
Args: | |
x: iterable to be downsampled |
NewerOlder