Discover gists
View coco.sh
This file contains 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
mkdir coco | |
cd coco | |
mkdir images | |
cd images | |
wget http://images.cocodataset.org/zips/train2017.zip | |
wget http://images.cocodataset.org/zips/val2017.zip | |
wget http://images.cocodataset.org/zips/test2017.zip | |
wget http://images.cocodataset.org/zips/unlabeled2017.zip |
View numberHeaders
This file contains 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
// 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 https://gist.github.com/mengwong/f597d064366f555b5f4e | |
// 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. | |
// | |
// USAGE: | |
// 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. |
View gist:481f21ea4906e611d934
This file contains 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
var filenameFull = "tm_icons.png"; | |
//Regex to remove | |
var filenameText = filenameFull.replace(/\.[^/.]+$/, ""); |
View Memex -> Logseq
This file contains 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
[{{{title}}}]({{{url}}}) #Article | |
### **Summary** | |
{{#Notes}} | |
#### {{{NoteText}}} | |
{{/Notes}} | |
### **Highlights** | |
{{#Notes}} | |
#### {{{NoteHighlight}}} | |
{{/Notes}} |
View series 24 horas.m3u
This file contains 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
#EXTM3U | |
#EXTINF:-1 tvg-logo="http://s20.postimg.org/pp2b07oul/LOST.png" group-title="Séries 24 Horas",Lost Dublado | |
#EXTINF:-1 tvg-logo="http://s20.postimg.org/71u76azrh/PRISONBREAK.png" group-title="Séries 24 Horas",Prison Break Dublado | |
#EXTINF:-1 tvg-logo="http://s29.postimg.org/svglffi1z/Friends.png" group-title="Séries 24 Horas",Friends Legendado | |
#EXTINF:-1 tvg-logo="http://s20.postimg.org/u5unyw32j/GLEE.png" group-title="Séries 24 Horas",Glee Dublado |
View Icon.jsx
This file contains 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
import React from 'react'; | |
const {PropTypes} = React; | |
const Icon = props => { | |
const styles = { | |
svg: { | |
display: 'inline-block', | |
verticalAlign: 'middle', | |
}, | |
path: { |
View test.py
This file contains 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
# vim:fileencoding=utf-8 | |
import codecs | |
import sys | |
import types | |
if __name__ == '__main__': | |
# | |
# ターミナルに出力する場合 | |
# 以下のサンプルは、ターミナルに出力する場合は | |
# うまくいくが、リダイレクトさせてファイルに出力すると |
View latency.txt
This file contains 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
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 |
View map_clsloc.txt
This file contains 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
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
This file contains 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
--[[ | |
A special key for property tables. | |
When applied to a UIListLayout, enables flexible sizing on the laid out UI | |
objects. | |
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. | |
NewerOlder