Skip to content

Instantly share code, notes, and snippets.

@dleshem
dleshem / WhatsAppAlarms.js
Created November 1, 2023 10:49
Tampermonkey userscript to send WhatsApp texts triggered by alarms in Israel
// ==UserScript==
// @name WhatsAppAlarms
// @namespace http://tampermonkey.net/
// @version 1.0
// @description WhatsApp texts triggered by alarms in Israel
// @author Danny Leshem
// @match https://web.whatsapp.com/
// @icon https://www.google.com/s2/favicons?sz=64&domain=whatsapp.com
// @grant GM_xmlhttpRequest
// @connect www.oref.org.il
@jacquesfize
jacquesfize / remove_token.py
Last active June 11, 2022 14:59
A function to delete tokens from a spacy Doc object without losing associated information (PartOfSpeech, Dependance, Lemma, ...)
def remove_tokens(doc, index_to_del, list_attr=[LOWER, POS, ENT_TYPE, IS_ALPHA, DEP, LEMMA, LOWER, IS_PUNCT, IS_DIGIT, IS_SPACE, IS_STOP]):
"""
Remove tokens from a Spacy *Doc* object without losing
associated information (PartOfSpeech, Dependance, Lemma, extensions, ...)
Parameters
----------
doc : spacy.tokens.doc.Doc
spacy representation of the text
index_to_del : list of integer
@bcomnes
bcomnes / .screenrc
Last active May 22, 2024 21:11
ssh agent forwarding in tmux and gnu screen
# Fix agent forwarding
# https://gist.github.com/martijnvermaat/8070533
# http://techblog.appnexus.com/2011/managing-ssh-sockets-in-gnu-screen/
# See .ssh/rc for socket linking
unsetenv SSH_AUTH_SOCK
setenv SSH_AUTH_SOCK $HOME/.ssh/ssh_auth_sock.$HOSTNAME