Skip to content

Instantly share code, notes, and snippets.

View sharonwoo's full-sized avatar
🐢
tryharding

Sharon Woo sharonwoo

🐢
tryharding
View GitHub Profile
@reinvanoyen
reinvanoyen / terminal-prompt-git-branch-zsh.md
Last active April 30, 2024 21:16
Add Git Branch Name to Terminal Prompt (MacOS zsh)

Add Git Branch Name to Terminal Prompt (zsh)

Updated for MacOS with zsh

  • Catalina
  • Big Sur
  • Monterey
  • Ventura
  • Sonoma

screenshot

@brunofbrito
brunofbrito / apps_install.sh
Last active December 20, 2023 00:39
Install my macOS apps with homebrew, cask and mas-cli
#!/bin/zsh
echo Time to install all apps at once!
read -p "Press any key to continue... " -n1 -s
echo '\n'
echo Installing Homebrew...
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
echo Installing Oh My Zsh...
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
@morcefaster
morcefaster / pros_are_nice.md
Last active January 22, 2024 14:59
Did anyone say drama?

Preface

Hello everyone. With Ceb drama getting so much traction, I decided to do what any rational person would do in this situation - download all public matches of all professional dota 2 players and then scan the all-chat for any racism or naughty naughty words, so the j͇͕͙ͣu͒͆s̼̠͍̖̮̳ͮ̃t̫̙̯͎ͬ̇̊̄iͨć̼͓ͬͨ͑ͣe͉̜̫̱̠̘̋̒ͅ can be upheld once and for all.

There are several nuances that stood in my way.

  1. Many professionals' pubs are kept private.
  2. Most of the trashtalk happens in ally chat, which isn't saved.
  3. Some of the trashtalk happens over mic... which again, isn't saved.
  4. Some of the trashtalk happens on smurf accounts, which I did not include here.
@yelizariev
yelizariev / 000-aws-lambda-todo-bot.md
Last active November 10, 2021 12:48
TODO-list bot for Telegram. OBSOLETE: latest version is here https://itpp.dev/chat/todo-bot/index.html

Allows to create TODOs for a small group of users.

Tasks can have on of the following states:

  • TODO -- to be done
  • DONE -- done
  • CANCELED -- nothing was done and not going to be done
  • WAITING -- cannot be started and waits for something

Technical specification

@ivan-mitb
ivan-mitb / outlier.py
Last active October 5, 2018 10:06
annamalai detection using GMM
# load READY.DAT (56 cols)
from dataload import load_object
x_train, x_test, y_train, y_test = load_object('ready.dat')
x_train.max(axis=0)
del x_test, y_test # we don't need the test set for now
# under-sample the big classes to make the set manageable
from imblearn.under_sampling import RandomUnderSampler
rus = RandomUnderSampler(ratio={'normal':50000, 'dos':50000}, random_state=4129)
x_train, y_train = rus.fit_sample(x_train, y_train.attack_type)
@maxim5
maxim5 / pretrained_word2vec_lstm_gen.py
Last active July 2, 2023 10:40
Text generator based on LSTM model with pre-trained Word2Vec embeddings in Keras
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
__author__ = 'maxim'
import numpy as np
import gensim
import string
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# Original code from tinrtgu on Kaggle under WTFPL license
# Relicensed to BSD 3-clause (it does say do what you want...)
# Authors: Kyle Kastner
# License: BSD 3-clause
# Reference links:
# Adaptive learning: http://static.googleusercontent.com/media/research.google.com/en//pubs/archive/41159.pdf
# Criteo scalable response prediction: http://people.csail.mit.edu/romer/papers/TISTRespPredAds.pdf
# Vowpal Wabbit (hashing trick): https://github.com/JohnLangford/vowpal_wabbit/
# Hashing Trick: http://arxiv.org/pdf/0902.2206.pdf