This file contains hidden or 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
(doseq [url (seq (.getURLs (java.lang.ClassLoader/getSystemClassLoader)))] (println (.getFile url))) |
This file contains hidden or 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
(defn my-time | |
"This is a construction above core 'time' function to | |
return the time elapsed as a float, instead of a formated string. | |
Usage example: (my-time + 2 1)" | |
[f & args] | |
(Float/parseFloat (first (re-find #"(\d+\.\d+)" (with-out-str (time (apply f args))))))) |
This file contains hidden or 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(read.csv('file.csv'), type="o", col="blue") |
This file contains hidden or 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
sudo synclient TouchPadOff=1 #0 for enabling |
This file contains hidden or 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
""" | |
Testing inspect_shell from https://github.com/amoffat/Inspect-Shell | |
1. execute this script; | |
2. execute inspect_shell.py | |
3. call f() from inpect_shell.py | |
4. asserts that the outputs in the original program changes, =) | |
""" | |
import inspect_shell |
This file contains hidden or 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
# File: perf.pl | |
# Description: lognit performance tests | |
# this script outputs a csv file with metrics | |
# Usage: perl perf.pl | |
# Dependencies (binaries): jmap, pidstat | |
# Notes: Tested under perl 5.12.4 | |
use feature qw(say); | |
use IO::Handle; |
This file contains hidden or 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
#!/usr/bin/env python | |
""" | |
File: decorators.py | |
Description: decorators examples | |
Author: Ronald Kaiser <raios dot catodicos at gmail dot com> | |
""" | |
import time |
This file contains hidden or 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 requests | |
from lxml.html import fromstring | |
def get_urls(url): | |
return fromstring(requests.get(url).text).xpath('//a/@href') | |
print get_urls('http://www.google.com') |
This file contains hidden or 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
# extracts first 5 minutes | |
ffmpeg -i input.avi -vcodec copy -acodec copy -ss 00:00:00 -t 00:05:00 output1.avi |
This file contains hidden or 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
echo "$(cd `dirname $0` && pwd)" |