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 ruby | |
def parse_line line | |
fields = line.split | |
return fields[1], fields[3] | |
end | |
def percentile(level, values) | |
return values.sort[values.length*level/100] | |
end |
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/perl | |
my $data ="DATA_IN_POST"; | |
my $req= "POST /updateShopStatus? HTTP/1.0\r\n". | |
"User-Agent: yandex-tank/1.1.1\r\n". | |
"Host: example.com\r\n". | |
"Content-Length:".length ($data)."\r\n". | |
"Connection: Close\r\n". | |
"\r\n". | |
$data."\r\n". | |
"\r\n"; |
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 ruby | |
# simple GET ammo generation, pass hostname as a first parameter and uris to STDIN | |
STDIN.each{|line| | |
request = <<-EOS | |
GET #{line.chomp} HTTP/1.0\r | |
Host: #{ARGV[0]}\r | |
Accept: */*\r | |
User-Agent: tank\r | |
Connection: close\r |
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
; This is a small sound example for the IBM PC | |
; It will play 12 notes of the octave starting at middle C. | |
;----------------------------------------------------------------------------- | |
; How to generate sound on the IBM PC : | |
; | |
; The 8255 (port 61H) bit 0 controls the 8253 timer | |
; bit 1 controls the speaker | |
; | |
; The output channel 2 from the 8253 timer will be ANDed with the | |
; speaker control bit in order to turn on/off the speaker. |
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
# Скрипт предназначен для сравнения квантилей двух стрельб | |
# В результате его выполнения получаем график, по горизонтальной | |
# оси -- квантили первой стрельбы, по вертикальной -- на сколько | |
# (в процентах) от них отличаются соответствующие квантили второй | |
# стрельбы | |
# Загружаем данные из PHOUT: | |
data1 <- read.delim("./test1.phout", header=F) | |
data2 <- read.delim("./test2.phout", header=F) |
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
from Tank.Plugins.bfg import Sample | |
import logging | |
import time | |
import json | |
from MyService.Service import Service | |
import MyService.Service.ttypes as tt | |
from thrift.transport import TTransport | |
from thrift.transport import TSocket | |
from thrift.protocol import TBinaryProtocol |
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
direvius@direvius-ub:~/learn/leveldb$ ls | |
build node_modules program.coffee program.js | |
direvius@direvius-ub:~/learn/leveldb$ rm -rf ./node_modules/ | |
direvius@direvius-ub:~/learn/leveldb$ npm install leveldown | |
npm http GET https://registry.npmjs.org/leveldown | |
npm http 304 https://registry.npmjs.org/leveldown | |
npm http GET https://registry.npmjs.org/bindings | |
npm http GET https://registry.npmjs.org/nan | |
npm http 304 https://registry.npmjs.org/bindings | |
npm http 304 https://registry.npmjs.org/nan |
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/python3 | |
# -*- coding: utf-8 -*- | |
from xmlrpc.client import Fault | |
from xmlrpc.client import ServerProxy | |
from xmlrpc.client import Transport | |
import urllib.request as urllib2 | |
import xml.etree.ElementTree as ET | |
class MyTransport(Transport): |
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 | |
import base64 | |
import pickle | |
import urllib | |
import sys | |
class Stpd(object): | |
''' |
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
{"channel": "webpush_A", "subscribe": true, "pushes": 5, "ttl": 75} |
OlderNewer