This file contains hidden or 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 graphviz | |
| from IPython import display | |
| from PIL import Image | |
| syst_search = r"Systematic Hiking Location Search\lDatabase Review\l" | |
| dup_removal = "Duplicate Hiking Location Removal\nCleansing Redundant Spots" | |
| dedup = "Deduplication of Hiking Locations\nRemoving Duplicate Trails" | |
| s1 = "Stage 1: Location Screening\nInitial Trail Assessment\n" | |
| excluded = r"Excluded Hiking Locations\lFiltered Out Trails\l" | |
| included = "Included Hiking Locations\nSelected Trails" |
This file contains hidden or 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 svg | |
| from dataclasses import dataclass | |
| @dataclass | |
| class Diamond: | |
| top_node: tuple[int,int] = 0, 0 | |
| height: int = 50 | |
| width: int = 150 | |
| def polygon_points(self): |
This file contains hidden or 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
| # dogenpunk.zsh-theme | |
| MODE_INDICATOR="%{$fg_bold[red]%}❮%{$reset_color%}%{$fg[red]%}❮❮%{$reset_color%}" | |
| local return_status="%{$fg[red]%}%(?..⏎)%{$reset_color%}" | |
| PROMPT='%{$fg[blue]%}%m%{$reset_color%}%{$fg_bold[white]%} ∑☯ %{$reset_color%}%{$fg[cyan]%}%~:%{$reset_color%}$(git_time_since_commit)$(git_prompt_info) | |
| %{$fg[yellow]%}%!%{$reset_color%} $(prompt_char) ' | |
| ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[green]%}git%{$reset_color%}@%{$bg[white]%}%{$fg[black]%}" | |
| ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%})" |
This file contains hidden or 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
| //SERVERNAME.local/SHARENAME /mnt/SHARENAME cifs username=user,password=PASSWORD,iocharset=utf8,rw,uid=1000,gid=1000,nounix,file_mode=0777,dir_mode=0777 0 0 |
This file contains hidden or 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
| # Put this in your .bashrc or .zshrc | |
| # You can change the directory `virtualenvs` to whichever you prefer. | |
| activate() { | |
| source ~/.virtualenvs/"$1"/bin/activate | |
| } |
This file contains hidden or 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://circuitpython.org/board/raspberry_pi_pico/ | |
| # CircuitPython 7.3.3 packages: | |
| cp7 = "_bleio, adafruit_bus_device, adafruit_pixelbuf, aesio, alarm, analogio, atexit, audiobusio, audiocore, audiomixer, audiomp3, audiopwmio, binascii, bitbangio, bitmaptools, bitops, board, busio, countio, digitalio, displayio, errno, floppyio, fontio, framebufferio, getpass, gifio, imagecapture, json, keypad, math, microcontroller, msgpack, neopixel_write, nvm, onewireio, os, paralleldisplay, pulseio, pwmio, qrio, rainbowio, random, re, rgbmatrix, rotaryio, rtc, sdcardio, sharpdisplay, storage, struct, supervisor, synthio, terminalio, time, touchio, traceback, ulab, usb_cdc, usb_hid, usb_midi, vectorio, watchdog, zlib" | |
| # CircuitPython 8.0.0-beta.6 packages: | |
| cp8 = "_asyncio, _bleio, _pixelmap, adafruit_bus_device, adafruit_pixelbuf, aesio, alarm, analogbufio, analogio, array, atexit, audiobusio, audiocore, audiomixer, audiomp3, audiopwmio, binascii, bitbangio, bitmaptools, bitops, board, builtins, busio, collections, cou |
This file contains hidden or 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
| # aliases for commonly used commands | |
| alias ll="ls -al" | |
| alias gad="git add" | |
| alias gcm="git commit -m" | |
| alias gst="git status" | |
| alias gps="git push" | |
| alias gpss="git push --set-upstream origin" | |
| alias gol="git log" | |
| alias gfa="git fetch --all" | |
| alias gfp="git fetch --prune" |
This file contains hidden or 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 imshow_od_bbox(image_file, bbox_voc, object_class, labelmap_dict): | |
| import matplotlib.pyplot as plt | |
| from PIL import Image | |
| xmin,ymin,xmax,ymax = bbox_voc | |
| right = xmin + (xmax - xmin) | |
| bottom = ymin + (ymax - ymin) | |
| image = Image.open(image_file) | |
| detected_object = image.crop((xmin, ymin, right, bottom)) |
This file contains hidden or 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 sklearn.datasets import make_moons | |
| X,y = make_moons(n_samples=200, noise=0.15) | |
| with open('data.csv', 'w') as f: | |
| wr = csv.writer(f, delimiter=',') | |
| combined = np.column_stack((X,y)) | |
| wr.writerows(combined) |