Skip to content

Instantly share code, notes, and snippets.

View tiberiuichim's full-sized avatar
🎯
Focusing

Tiberiu Ichim tiberiuichim

🎯
Focusing
View GitHub Profile
@jirkamarsik
jirkamarsik / preprocess.clj
Created December 17, 2012 22:42
Normalizing Stanford constituency trees as part of my "Applications of NLP" project.
(ns grook.preprocess
(:refer-clojure :exclude [==])
(:use clojure.core.logic
[clojure.pprint :only [pprint]])
(:require [clojure.walk :as walk]
[clojure.java.io :as io]))
;; Running this cleans any previously defined rules from the namespace.
(dorun (for [[sym var] (ns-interns *ns*)
:when (::rule (meta var))]
@amueller
amueller / Diagram1.dia
Last active August 18, 2022 05:03
Machine learning cheat sheet diagram svg and dia file
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tokestermw
tokestermw / visualizing_topic_models.py
Last active September 7, 2021 16:57
visualization topic models in four different ways
import json
import urlparse
from itertools import chain
flatten = chain.from_iterable
from nltk import word_tokenize
from gensim.corpora import Dictionary
from gensim.models.ldamodel import LdaModel
from gensim.models.tfidfmodel import TfidfModel
@timothyrenner
timothyrenner / tweet_utils.py
Last active July 29, 2021 22:32
Python Utilities for Tweets
from datetime import datetime
import string
from nltk.stem.lancaster import LancasterStemmer
from nltk.corpus import stopwords
#Gets the tweet time.
def get_time(tweet):
return datetime.strptime(tweet['created_at'], "%a %b %d %H:%M:%S +0000 %Y")
@bobbygrace
bobbygrace / trello-css-guide.md
Last active May 15, 2024 16:01
Trello CSS Guide

Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets


Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

@karpathy
karpathy / min-char-rnn.py
Last active July 22, 2024 04:44
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@paulirish
paulirish / what-forces-layout.md
Last active July 22, 2024 06:32
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@jfpuget
jfpuget / Julia_Python_perf.ipynb
Last active April 15, 2022 11:55
An exercise in Python optimization: make Python benchmarks as fast, if not faster, than Julia.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.