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
from BeautifulSoup import BeautifulStoneSoup as bs | |
from quick_orm.core import Database | |
from sqlalchemy import Column,String,Text,Boolean | |
import bottlenose | |
import pprint | |
import logging | |
import re | |
import time | |
import xlrd |
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
from collections import dqueue | |
class P(DistProcess): | |
def setup(ps, token_val): | |
ts = 0 | |
process_set = ps | |
#requests: array of ts values, where requests[k] is ts of Pk's last request for token, | |
requests = { p : 0 for p in process_set} | |
requests[self] = 0 |
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
// Initializing variables | |
var message = "Tent + Sleeping bag le kar aana aur agar aapke paas " + | |
"anti leech hai woh jo powder etc woh be le kar aana"; | |
var contact = { name : "Dhiraj",phoneNumber : "+91123456789" } ; | |
var msg_time = new Date(2012,8,12,8,0,0,0); // Date(year, month, day, hours, minutes, seconds, milliseconds); | |
var msg_time_ms = msg_time.getTime(); | |
// End of variables initializing |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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/python | |
""" | |
This script uses cgroups to limit a docker container's read/write bandwidth | |
Usage: | |
limit_docker_io.py <container_id> --read=<read_bps> --write=<write_bps> | |
Options: | |
--read=<read_bps> Read bps 0 for unlimited [default: 0] |
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 requests | |
import sys | |
import json | |
import urllib | |
import graphitesend | |
from docopt import docopt | |
""" | |
Usage: | |
sfmetrics.py --sf_host=<sf_host> --sf_user=<sf_user> --sf_password=<sf_password> --graphite_host=<graphite_host> --interval=<interval> |
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
package main | |
import ( | |
"bytes" | |
"crypto/aes" | |
"crypto/cipher" | |
b64 "encoding/base64" | |
"errors" | |
"fmt" | |
"log" |
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
timing_indent = -1 | |
call_graph = list() | |
def timing(f): | |
def wrap(*args, **kwargs): | |
global timing_indent | |
global call_graph | |
timing_indent += 1 |
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 | |
LOCAL_IP=$(hostname -i) | |
REMOTE_IP=$1 | |
LOCAL_TUNNEL_IP=$2 | |
REMOTE_TUNNEL_IP=$3 | |
display_usage() { | |
echo -e "\nUsage: $0 [remote ip address] [local tunnel ip] [remote tunnel ip] \n" | |
} |
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
yum install wget openssl-devel python-six python-sphinx gcc make python-devel openssl-devel kernel-devel graphviz kernel-debug-devel autoconf automake rpm-build redhat-rpm-config libtool python-twisted-core python-zope-interface PyQt4 desktop-file-utils libcap-ng-devel groff checkpolicy selinux-policy-devel -y | |
useradd ovs | |
su - ovs | |
mkdir -p ~/rpmbuild/SOURCES | |
wget http://openvswitch.org/releases/openvswitch-2.9.2.tar.gz | |
cp openvswitch-2.9.2.tar.gz ~/rpmbuild/SOURCES/ | |
tar xfz openvswitch-2.9.2.tar.gz |
OlderNewer