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
# 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 |
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 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 |
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
// ==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 |
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
# This code adds custom REST api handler at runtime to a running Streamlit app | |
# | |
from tornado.web import Application, RequestHandler | |
from tornado.routing import Rule, PathMatches | |
import gc | |
import streamlit as st | |
@st.cache_resource() |