View commmittery.py
import os
from shellrun import run
from datetime import datetime
hist = sorted([name for name in os.listdir('.') if name.startswith('appvey') and name != 'appvey.py'])
print('\n'.join(hist))
for f in hist:
tstamp = datetime.fromtimestamp(os.path.getmtime(f))
run('copy {} appvey.py'.format(f))
View glretrace2gif
glretrace.exe -s - input.trace | ffmpeg -r 75 -f image2pipe -vcodec ppm -i pipe: -r 25 -qscale 3.1 -y output.ogg
# get palette
ffmpeg -y -i output.ogg -vf fps=10,scale=320:-1:flags=lanczos,palettegen palette.png
# write gif
ffmpeg -i output.ogg -i palette.png -filter_complex "fps=10,scale=320:-1:flags=lanczos[x];[x][1:v]paletteuse" output.gif
# links:
# - https://en.wikibooks.org/wiki/OpenGL_Programming/Video_Capture
# - https://superuser.com/questions/556029/how-do-i-convert-a-video-to-gif-using-ffmpeg-with-reasonable-quality/556031#556031
View argi.go
// go run argi.go
package main
import "os"
import "fmt"
func main() {
fmt.Println("prog:", os.Args[0])
if len(os.Args) > 1 {
fmt.Println("args:", os.Args[1:])
View OpenSourceInc.md
View pp.go
package pp
import (
"fmt"
"encoding/json"
)
// Pretty print structures. Uses "encoding/json" to
// convert nested structure to indented string.
func PP(v interface{}) {
View PythonFar.md
View gist:b9523fc8ef841a1074afb75e2d9bfdf6
# prepare pager
less = 'less'
if IS_WIN:
with open(ROOT + '\\git.bat') as r:
for line in r:
start = line.find('%~dp0')
if start != -1:
GIT_DIR = line[start+5:line.find('\cmd')]
less = ROOT + '\\' + GIT_DIR + '\\usr\\bin\\less'
View gist:2c741ee7dccbe86dbc5d8011641496d2
* [ ] See branch name on Rietveld
* [ ] Fetch branch from Rietveld
* [ ] git sync instead of (rebase-update)
* [ ]
>git rebase-update
Fetching origin
remote: Counting objects: 1110, done
remote: Finding sources: 100% (30/30)
View pk.py
"""
packaging for humans (tm)..
humans are easily overloaded with information, so
this should be the intuitive way to express and
solve what humans want.
001 get what package does
pk show <name>
View README.md

See getname.py and try to implement the same in C++ with and without using templates.

$ python getname.py 
Unknown
Specific

$ g++ -std=c++14 -O2 -Wall -pedantic main.cpp && ./a.out
Unknown
Specific