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
%!TEX TS-program = xelatex | |
\documentclass[12pt]{scrartcl} | |
% This ^^^ is a standard LaTeX document class declaration | |
% (the previous line is a pseudo-comment, declaring that we will | |
% use the special XeTeX machinery for its more extensive font list | |
% and its use of unicode.) | |
% If you made this line more akin to the one in the default | |
% latex.template file, say: | |
% \documentclass$if(fontsize)$[$fontsize$]$endif${scrartcl} |
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
// based on https://github.com/processing/processing/blob/a6e0e227a948e7e2dc042c04504d6f5b8cf0c1a6/core/src/processing/core/PApplet.java#L5093 | |
var scale = function(opts){ | |
var istart = opts.domain[0], | |
istop = opts.domain[1], | |
ostart = opts.range[0], | |
ostop = opts.range[1]; | |
return function scale(value) { | |
return ostart + (ostop - ostart) * ((value - istart) / (istop - istart)); |
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
# QGIS 2.2 won't show 4d geometry (maybe not 3dm or 3dz either but I didn't test). | |
# If you don't actually need 4d and it's just an artifact of the data when you loaded | |
# it, use this python snippet to convert it to 2d and get your data showing up in | |
# QGIS again. Use at your own risk. There is NO ERROR HANDLING HERE! | |
import psycopg2 | |
db = psycopg2.connect(host='localhost', port='5432', database='#####',user='#####') | |
cursor = db.cursor() |
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
#!/bin/bash | |
clear | |
echo "" | |
echo "-----------------------------------" | |
echo "" | |
echo "WHAT DO YOU WANT TO DO TODAY?" | |
echo "" | |
echo "1 - Start all the VMs" | |
echo "2 - Shutdown all the VMs" |
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
# local port forwarding | |
# the target host 192.168.0.100 is running a service on port 8888 | |
# and you want that service available on the localhost port 7777 | |
ssh -L 7777:localhost:8888 user@192.168.0.100 | |
# remote port forwarding | |
# you are running a service on localhost port 9999 | |
# and you want that service available on the target host 192.168.0.100 port 12340 |
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
plot_df <-df %>% group_by(feature) %>% | |
do( | |
plots = ggplot(data = .) + aes(x = xcol, y = ycol) + | |
geom_point() + ggtitle(.$feature) | |
) | |
# show plots | |
plot_df$plots |
sudo apt-get install libasound-dev portaudio19-dev libportaudio2 libportaudiocpp0
sudo apt-get install ffmpeg libav-tools
sudo pip install pyaudio
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 { line, curve, curveCatmullRom } from "d3-shape"; | |
import { scaleTime, scaleLinear } from "d3-scale"; | |
import { axisBottom, axisLeft } from 'd3-axis'; | |
import { timeParse, isoFormat } from "d3-time-format"; | |
import { select } from "d3-selection"; | |
import { extent, max, min } from "d3-array"; | |
export default { | |
line: line, | |
scaleTime: scaleTime, |
OlderNewer