Skip to content

Instantly share code, notes, and snippets.

View artfuldev's full-sized avatar
☺️
Having fun

Sudarsan Balaji artfuldev

☺️
Having fun
View GitHub Profile
@artfuldev
artfuldev / resolve_coreference.py
Last active June 3, 2022 16:19 — forked from karthikavijayanexpts/corefResolve.py
Coreference resolution using coreferee and spacy
import spacy
import coreferee
def flatten(list_of_lists):
flat_list = [];
for item in list_of_lists:
if type(item) == list:
for sub_item in item:
flat_list.append(sub_item)
else:
@artfuldev
artfuldev / clojure-deftype-scaffolding.clj
Last active May 29, 2022 13:18 — forked from semperos/clojure-deftype-scaffolding.clj
Clojure Scaffolding for deftype (Christophe Grand) - Show which methods a class implements and for which interfaces
;; Big thanks to Christophe Grand - https://groups.google.com/d/msg/clojure/L1GiqSyQVVg/m-WJogaqU8sJ
(defn scaffold [iface]
(doseq [[iface methods] (->> iface .getMethods
(map #(vector (.getName (.getDeclaringClass %))
(symbol (.getName %))
(count (.getParameterTypes %))))
(group-by first))]
(println (str " " iface))
(doseq [[_ name argcount] methods]
(println
@artfuldev
artfuldev / gh_manual_merge_pr.txt
Last active January 24, 2022 18:44 — forked from notmandatory/gh_manual_merge_pr.txt
Manual merge PRs to preserve commit signatures
# from target repo clone directory
# make sure you're in sync with origin
git checkout master
git fetch --all
git pull origin master
# fetch PR to FETCH_HEAD
git fetch origin pull/<PR#>/head
# double check the changes
git diff master FETCH_HEAD
# merge to master and push to origin (github)