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
Alert.alert( | |
'Alert Title', | |
'My Alert Msg', | |
[ | |
{text: 'Ask me later', onPress: () => console.log('Ask me later pressed')}, | |
{text: 'Cancel', onPress: () => console.log('Cancel Pressed'), style: 'cancel'}, | |
{text: 'OK', onPress: () => console.log('OK Pressed')}, | |
]) |
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
# ionic-firebase-forum-template-spec | |
## Functional Spec | |
Since it is a prototype, it would be good enough to show | |
1. basic functions on threads | |
1.1 comment | |
1.2 edit previous post | |
1.3 upvote, downvote |
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
sudo rm -Rf /Applications/Docker.app | |
sudo rm -f /usr/local/bin/docker | |
sudo rm -f /usr/local/bin/docker-machine | |
sudo rm -f /usr/local/bin/docker-compose | |
sudo rm -f /usr/local/bin/docker-credential-desktop | |
sudo rm -f /usr/local/bin/docker-credential-ecr-login | |
sudo rm -f /usr/local/bin/docker-credential-osxkeychain | |
sudo rm -Rf ~/.docker | |
sudo rm -Rf ~/Library/Containers/com.docker.docker | |
sudo rm -Rf ~/Library/Application\ Support/Docker\ Desktop |
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
# So now you want to finetune that GPT-J-6B on a 3090/TITAN GPU ... okay | |
# More exploratory coding. It uses the Huggingface model port, deepspeed and reads all text/md files from a target directory | |
# It is a fragment of a larger system with remote editing, but that's another story | |
# This is the raw, training tester. Items to look out for: | |
# - uses DeepSpeed and has a DS config | |
# - to save space uses SGD instead of ADAM | |
# - uses gradient checkpointing | |
# - freezes 25% of the layers to fit | |
# Assumes you can already run https://gist.github.com/kinoc/2d636a68876cd3de7b6e9c9452b61089 |
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
# Near Simplest Language model API, with room to expand! | |
# runs GPT-J-6B on 3090 and TITAN and servers it using FastAPI | |
# change "seq" (which is the context size) to adjust footprint | |
# | |
# seq vram usage | |
# 512 14.7G | |
# 900 15.3G | |
# uses FastAPI, so install that | |
# https://fastapi.tiangolo.com/tutorial/ |
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
apt install wget | |
wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.tgz | |
tar xvzf ngrok-stable-linux-amd64.tgz -C /usr/local/bin |
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
forfiles /S /M *.ext1 /C "cmd /c rename @file @fname.ext2" |
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
// pages/api/webhooks/github.js | |
const { exec } = require("child_process"); | |
const crypto = require("crypto"); | |
// Handle GitHub Webhooks | |
export default function handler(req, res) { | |
try { | |
console.log("Incoming Request"); | |
if (req.method !== 'POST') { | |
res.send(404); |
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
kubeadm reset | |
## master only | |
etcdctl rm --recursive registry | |
rm -rf /var/lib/cni | |
rm -rf /run/flannel | |
rm -rf /etc/cni |
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 requests | |
en_content = requests.get('https://www.google.com/basepages/producttype/taxonomy-with-ids.en-US.txt') | |
def load_taxonomy_hierarchy(root, taxonomy_content, is_root): | |
lines = taxonomy_content.split('\n') | |
filtered_lines = lines[1:] | |
filtered_lines = list(filter(lambda line: len(line) > 0, filtered_lines)) | |
# extract the root taxonomy from content | |
root_taxonomy_set = set() | |
OlderNewer