Skip to content

Instantly share code, notes, and snippets.

View vrthra's full-sized avatar

Rahul Gopinath vrthra

View GitHub Profile

Keybase proof

I hereby claim:

  • I am vrthra on github.
  • I am rahul (https://keybase.io/rahul) on keybase.
  • I have a public key whose fingerprint is 8D60 714A 6894 FE03 BE72 E58B 89D1 0364 4E60 7A66

To claim this, I am signing this object:

@vrthra
vrthra / tile.rc
Created May 8, 2012 04:11
tiling script for rio
#!/bin/rc
# Usage:
# First save the current windows
# ./tile.rc save >saved.s
# Next switch to tall
# ./tile.rc tall |tee tall.s |rc
# Can go back if you want
# cat saved.s |rc
# dont pee in the pool
> print(analyze.method(joined.method), row.names=F)
estimate p.value kind cor type
0.62965955 0.000000000000000000 Raw R^2 bugfix~total.mutants
0.74805063 0.000000000000000000 Raw R^2 bugfix~n.total.mutants
0.02480406 0.020029404234788828 Raw R^2 bugfix~loc
0.10720486 0.000000000000000000 Raw R^2 bugfix~cyclomatic_complexity
0.95676825 0.000000000000000000 Raw Tau bugfix~total.mutants
0.95419330 0.000000000000000000 Raw Tau bugfix~n.total.mutants
0.04741129 0.000000113102053056 Raw Tau bugfix~loc
0.15783857 0.000000000000000000 Raw Tau bugfix~cyclomatic_complexity
import csv
import sys
import scipy
import scipy.stats
okProjects = []
with open("data/subjects.csv") as csvfile:
pdata = csv.DictReader(csvfile)
for row in pdata:
@vrthra
vrthra / gdb.rb
Created October 15, 2017 13:06 — forked from martinlindhe/gdb.rb
For gdb to execute python3 script on OSX 10.10 or later
class UniversalBrewedPython < Requirement
satisfy { archs_for_command("python").universal? }
def message; <<-EOS.undent
A build of GDB using a brewed Python was requested, but Python is not
a universal build.
GDB requires Python to be built as a universal binary or it will fail
if attempting to debug a 32-bit binary on a 64-bit host.
EOS
@vrthra
vrthra / eval-dump.py
Created December 21, 2017 10:00
python3 eval no-safe
s = """
(lambda fc=(
lambda n: [
c for c in
().__class__.__bases__[0].__subclasses__()
if c.__name__ == n
][0]
):
fc("function")(
fc("code")(0,0,0,0,0,b'\x01',(),(),(),"","",0,b'',()),{}
@vrthra
vrthra / kills.csv
Last active December 25, 2017 17:43
index ntests
1 630
2 283
3 93
4 26
5 6
6 2
7 0
8 0
9 0
@vrthra
vrthra / Microjson-Output.txt
Last active March 23, 2018 22:27
Microjson trace output
0 --------
None
Arg: 'null'
1 --------
True
Arg: 'true'
2 --------
'kUvNG:B:e-^u3>Y}$V(4#IedU7OW2&v*wEDdwPwr$$U$]*x51&U.TU5uZ|7@&F!J'
Arg: '"kUv\\NG:B:e-^u3>Y}$V(4#IedU7OW2&v*wEDdwPwr$$U$]*x51&U.TU5uZ|7@&F!J"'
3 --------
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 2 columns, instead of 7. in line 1.
3 http://mynews.com/query?a=b,c=d#fragment
scheme:'http', netloc:'mynews.c', url:'om/query', params:'', query:'a=b,c=d', fragment:'fragment'
'h' != ':'
't' != ':'
't' != ':'
'p' != ':'
':' = ':'
'h' = 'h'
't' = 't'
't' = 't'