Skip to content

Instantly share code, notes, and snippets.

mkocabas /
Created Apr 9, 2018
Download COCO dataset. Run under 'datasets' directory.
mkdir coco
cd coco
mkdir images
cd images
mengwong / numberHeaders
Last active Aug 10, 2022
number headers in Google Docs
View numberHeaders
// PROBLEM: in Google Documents, sometimes you want numbered headings, but the UI makes you a new list each time.
// INSIGHT: it's possible, but you have to script it.
// SOLUTION: this script adds OL+LI to Hs, all using the same listID
// DOWNLOAD: get the latest version of this gist from
// INSTALL: Go to Tools / Editor. Paste this in. Hit save. You can run it by pressing the "play" button, or from the Add-Ons menu.
// REQUIRED: Define all your headings as actual headings and not just big bold Normal. Come on, people, learn to use paragraph styles already.
// OPTIONAL: Manually make the first H1 in the document a numbered list. We'll use that as a reference heading for all the others.
// OPTIONAL: Manually set the list style to "Decimal Outline" (the style that has 1.1.2 type numbering) ... I like this best.
stewartduffy / gist:481f21ea4906e611d934
Last active Aug 10, 2022
Regex to remove file extension from JS string.
View gist:481f21ea4906e611d934
var filenameFull = "tm_icons.png";
//Regex to remove
var filenameText = filenameFull.replace(/\.[^/.]+$/, "");
nikdoof / Memex -> Logseq
Last active Aug 10, 2022
A copy template for Memex that'll paste nicely into Markdown mode LogSeq
View Memex -> Logseq
[{{{title}}}]({{{url}}}) #Article
### **Summary**
#### {{{NoteText}}}
### **Highlights**
#### {{{NoteHighlight}}}
View series 24 horas.m3u
#EXTINF:-1 tvg-logo="" group-title="Séries 24 Horas",Lost Dublado
#EXTINF:-1 tvg-logo="" group-title="Séries 24 Horas",Prison Break Dublado
#EXTINF:-1 tvg-logo="" group-title="Séries 24 Horas",Friends Legendado
#EXTINF:-1 tvg-logo="" group-title="Séries 24 Horas",Glee Dublado
davidgilbertson / Icon.jsx
Last active Aug 10, 2022
Production version
View Icon.jsx
import React from 'react';
const {PropTypes} = React;
const Icon = props => {
const styles = {
svg: {
display: 'inline-block',
verticalAlign: 'middle',
path: {
devlights /
Last active Aug 10, 2022
# vim:fileencoding=utf-8
import codecs
import sys
import types
if __name__ == '__main__':
# ターミナルに出力する場合
# 以下のサンプルは、ターミナルに出力する場合は
# うまくいくが、リダイレクトさせてファイルに出力すると
jboner / latency.txt
Last active Aug 10, 2022
Latency Numbers Every Programmer Should Know
View latency.txt
Latency Comparison Numbers (~2012)
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
aaronpolhamus / map_clsloc.txt
Created May 12, 2016
Image net classes + labels
View map_clsloc.txt
n02119789 1 kit_fox
n02100735 2 English_setter
n02110185 3 Siberian_husky
n02096294 4 Australian_terrier
n02102040 5 English_springer
n02066245 6 grey_whale
n02509815 7 lesser_panda
n02124075 8 Egyptian_cat
n02417914 9 ibex
n02123394 10 Persian_cat
View Flex.lua
A special key for property tables.
When applied to a UIListLayout, enables flexible sizing on the laid out UI
When applied to a GuiObject in a [Flex]-ed UIListLayout, opts the object
into flexible sizing - the object's size will be overwritten along the
direction of layout to fill up spare space.