wss://tracker.btorrent.xyz wss://tracker.fastcast.nz wss://tracker.openwebtorrent.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
| def expon(mu): | |
| from random import random as u | |
| from math import log | |
| f=lambda x:-log(1-x)/mu | |
| return f(u()) |
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 random import random | |
| from math import exp, factorial | |
| def poisson(mu,n): | |
| if mu==0: return [0]*n | |
| d=[0] | |
| k=0 | |
| answ=[] | |
| while len(answ)<n: | |
| u=random() | |
| while d[-1]<u: |
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
| package servlet; | |
| import java.io.IOException; | |
| import javax.servlet.ServletException; | |
| import javax.servlet.ServletOutputStream; | |
| import javax.servlet.annotation.WebServlet; | |
| import javax.servlet.http.HttpServlet; | |
| import javax.servlet.http.HttpServletRequest; | |
| import javax.servlet.http.HttpServletResponse; |
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
| public class TestWaveFile { | |
| public static void main(String[] args) throws Exception { | |
| // создание одноканального wave-файла из массива целых чисел | |
| System.out.println("Создание моно-файла..."); | |
| int[] samples = new int[3000000]; | |
| for(int i=0; i < samples.length; i++){ | |
| samples[i] = (int)Math.round((Integer.MAX_VALUE/2)* | |
| // (Math.sin(2*Math.PI*440*i/44100))); | |
| (Math.sin(2*Math.PI*440*(i%10)/44100))); |
8:00; 9:15; 9:55; 11:00; 12:40; 13:40; 14:45; 15:00; 17:50; 19:00
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
| 19 52 90 t24 t40 t45 t90 |
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
| # coding: utf-8 | |
| import os | |
| from datetime import datetime | |
| from funcparserlib.parser import some, a, many, skip, forward_decl | |
| from funcparserlib.lexer import make_tokenizer, Token | |
| __classes = {} |
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
| # habraproxy.py — это простейший http-прокси-сервер, запускаемый локально (порт на ваше | |
| # усмотрение), который показывает содержимое страниц Хабра. С одним исключением: после | |
| # каждого слова из шести букв должен стоять значок «™». Примерно так: | |
| # | |
| # http://habrahabr.ru/company/yandex/blog/258673/ | |
| # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| # Сейчас на фоне уязвимости Logjam все в индустрии в очередной раз обсуждают проблемы и | |
| # особенности TLS. Я хочу воспользоваться этой возможностью, чтобы поговорить об одной из | |
| # них, а именно — о настройке ciphersiutes. | |
| # |
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
| def diff(uid1,uid2): | |
| result=[] | |
| result2=[] | |
| for i in uid1: | |
| result.append([i,filter(lambda x: x.start_date<i.start_date<x.date,uid2)[0]]) | |
| for i in result: | |
| if i[0].start_date>i[1].start_date: | |
| start_date=i[0] | |
| else: | |
| start_date=i[1] |
NewerOlder