I hereby claim:
- I am andersonfreitas on github.
- I am andersonfreitas (https://keybase.io/andersonfreitas) on keybase.
- I have a public key ASAvqhkzCsBbvaamyFsr0WkiSggd-7ZO637bKLU70-Ht2go
To claim this, I am signing this object:
| data:text/html,<html onclick="javascript:requestFullscreen()"><head><title>Black full screen</title></head><div class="container"> <div class="child">Click to enter full screen</div> </div><style>html {background: black; color: darkgray} :fullscreen{color: black} .container { display: flex; justify-content: center; align-items: center; height: 100%; font-family: Google sans; }</style> |
| import numpy as np | |
| import time | |
| N = 6000 | |
| M = 10000 | |
| k_list = [64, 80, 96, 104, 112, 120, 128, 144, 160, 176, 192, 200, 208, 224, 240, 256, 384] | |
| def get_gflops(M, N, K): | |
| return M*N*(2.0*K-1.0) / 1000**3 |
I hereby claim:
To claim this, I am signing this object:
Bookmarklet para calcular automaticamente os impostos da NF-e
Abrir página com o bookmarklet (links com JS não funcionam no Gist)
| import ply.lex, argparse, io | |
| #Usage | |
| # python stripcomments.py input.tex > output.tex | |
| # python stripcomments.py input.tex -e encoding > output.tex | |
| def strip_comments(source): | |
| tokens = ( | |
| 'PERCENT', 'BEGINCOMMENT', 'ENDCOMMENT', 'BACKSLASH', | |
| 'CHAR', 'BEGINVERBATIM', 'ENDVERBATIM', 'NEWLINE', 'ESCPCT', |
| set(CMAKE_CXX_COMPILER icpc) | |
| SET(CMAKE_CXX_VERBOSE_FLAG "-v") | |
| SET(CMAKE_CXX_FLAGS_INIT "-std=c++0x") | |
| SET(CMAKE_CXX_FLAGS_DEBUG_INIT "-g") | |
| SET(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG") | |
| SET(CMAKE_CXX_FLAGS_RELEASE_INIT "-O3 -DNDEBUG -ipo") | |
| SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g") | |
| SET(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>") |
| # Check style: | |
| proof: | |
| echo "weasel words: " | |
| sh bin/weasel *.tex | |
| echo | |
| echo "passive voice: " | |
| sh bin/passive *.tex | |
| echo | |
| echo "duplicates: " | |
| perl bin/dups *.tex |
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns on recent CPU
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 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs 4X memory
| # Byte-compiled / optimized / DLL files | |
| __pycache__/ | |
| *.py[cod] | |
| # C extensions | |
| *.so | |
| # Distribution / packaging | |
| .Python | |
| env/ |