Skip to content

Instantly share code, notes, and snippets.

View ryantuck's full-sized avatar
🤙
chillin'

Ryan Tuck ryantuck

🤙
chillin'
View GitHub Profile
@ryantuck
ryantuck / gpg_test.py
Last active April 30, 2024 23:44
working example of using gnupg in python
# install:
# pip3 install python-gnupg
# note - gpg needs to be installed first:
# brew install gpg
# apt install gpg
# you may need to also:
# export GPG_TTY=$(tty)
@ryantuck
ryantuck / ansible-localhost.md
Last active April 3, 2024 15:21
super fast way to start testing ansible stuff locally without VMs

set up ansible to work on localhost

i've found this useful for debugging ansible modules and syntax without having to use VMs or test in dev environments.

install ansible

pip install ansible

make some relevant config files

@ryantuck
ryantuck / facebook_scraping.md
Last active April 12, 2023 17:45
Scraping Facebook data using its Graph API

python sdk

Install facebook SDK

pip3 install facebook-sdk

Pull data:

@ryantuck
ryantuck / superintelligence.md
Last active December 27, 2022 21:25
notes on superintelligence

superintelligence

"an intellect that is much smarter than the best human brains in practically every field, including scientific creativity, general wisdom and social skills."

  • artificial general intelligence, as opposed to specialized AI
  • either computer intelligence or human-augmented intelligence
  • kurzweil - not pessimistic, multiple AIs, cloud-augmented minds
  • silicon operates orders of magnitude faster (1M x) than neurons, parallelization
  • humans outperform animals in long-term planning and language use rather than biology - AI would probably do the same
  • AIs could edit and improve themselves so rapidly that we must expect a fast take-off once machines hit human-level intelligence
from pydantic import BaseModel
from typing import List
class InputItem(BaseModel):
song_id: str
audio_filename: str
class OutputItem(BaseModel):
song_id: str
audio_filenames: list # of strs
@ryantuck
ryantuck / delete-local-merged-git-branches.sh
Created October 26, 2021 19:59
Delete local git branches that have been merged. I think assumes you're on master.
git branch --merged | grep -v master | xargs -I % git branch -D %
chrome://settings/searchEngines?search=search
Search engine: Jira
keyword: jira
URL: https://MYCORP.atlassian.net/secure/QuickSearch.jspa?searchString=%s
class RecursiveNamespace(SimpleNamespace):
"""
Recursive instantiation of SimpleNamespace for supporting nested dicts.
Literally copied from the internet: https://dev.to/taqkarim/extending-simplenamespace-for-nested-dictionaries-58e8
"""
@staticmethod
def map_entry(entry):
if isinstance(entry, dict):
I would love to have the @tuck username and it looks very inactive!
@ryantuck
ryantuck / new_machine.md
Last active August 16, 2021 19:49
instructions on setting up a new osx machine