Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am ahiknsr on github.
  • I am ahiknsr (https://keybase.io/ahiknsr) on keybase.
  • I have a public key whose fingerprint is 7246 7EC0 D312 DE56 33A4 E305 DBB0 458B 8E36 08DF

To claim this, I am signing this object:

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDj+dgwlIl7AydBOAXlsbeTBjZa5PGOOR5hObBZcRMYtGytPztuPoSBt/kHNJVEzEBb1ihe5WXujq+8vKpKiKvkdRHatX89dbUY/Q8c8W9OntggYTae1EuhgGZqy3O3pqGVogR17vzZg/Sq6uiG/hAm7WsSP69QdcF5K/BW52oDBhZPVIo4I9VaVh7MW6q2qGU8nAHs2yZqNy9qAYN5+jcwlnP5WKuL8/toJIntWIJWCBcyM3Ex1Wjet2tKLl+FyPyJ+IkZVfJuzKlZdcsdDyO8waolMR0uwwztqSJDYHi7fazZ7wEj4Ny8uQrTmyRGSoxfDMW7zpqeSNY1olp/3NQl ahiknsr@Shadowfox
#usage bash iozneparse.sh filename
echo "Initial write"
cat $1 | grep "Initial write" | awk '{print $NF}'
echo "Rewrite"
cat $1 | grep "Rewrite" | awk '{print $NF}'
echo "read"
cat $1 | grep "Read" | grep -v "Reverse"| awk '{print $NF}'
echo "Re-read"
cat $1 | grep "Re-read" | awk '{print $NF}'
echo "Reverse Read"
"""
usage : python2 geekbenchparser.py http://browser.primatelabs.com/geekbench3/4534575
"""
import sys,urllib2
from bs4 import BeautifulSoup
url = sys.argv[1]
content = urllib2.urlopen(url).read()
set nocompatible
set hidden
nmap <space> zz
set encoding=utf-8
syntax enable
autocmd FileType c,cpp :set cindent
set tabstop=4
set shiftwidth=4
set softtabstop=4
set autoindent
echo 'Concurrency Level'
cat results.txt | grep 'Concurrency Level' | awk '{print $3}'
echo 'Complete requests'
cat results.txt | grep 'Complete requests' | awk '{print $3}'
echo 'Failed requests'
cat results.txt | grep 'Failed requests' | awk '{print $3}'
echo 'Requests per second'
cat results.txt | grep 'Requests per second' | awk '{print $4}'
echo 'Time per request'
cat results.txt | grep 'Time per request' | awk '{print $4}'| sed -n 1~2p
#define PROCESS 10
#define SLEEP 1
#define MAXNUMBER 50
#define TICKETS 100
#include<stdio.h>
#include<unistd.h>
#include<pthread.h>
#include<stdlib.h>
#include<sys/types.h>
import random
import collections
import itertools
MOD_VALUE = 2**16
minutiae_size = 7
def quantize_minituae(x,y,size):
#first convert to int
#!flask/bin/python
from flask import Flask, jsonify
from pysnmp.entity.rfc3413.oneliner import cmdgen
#replace read_only_user with the user you have created to access snmp data
snmp_readuser = 'read_only_user'
cmdGen = cmdgen.CommandGenerator()
def nextCmd_func(oid):
# Before editing this file, read this or else XD
# - The libraries are written in alphabetical order
# - The version number is important, it is required that you test
# the latest version and add it here
# - The casing of names is critical for dependency checks, eg. pyOpenSSL and not pyopenssl
beautifulsoup4==4.3.2
#lxml==3.4.0
Markdown==2.5.1
pexpect==3.3