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
#!/usr/bin/env python3 | |
# A simple command-line client for Yandex.Translate. | |
# You may pass translate direction as command line parameter e.g. "./dict-client.py fr-en" | |
# Default translate direction is from English to Russian. | |
#!/usr/bin/env python3 | |
import requests | |
import sys |
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
#!/usr/bin/env python | |
from Tkinter import * | |
master = Tk() | |
w = Canvas(master, width=150, height=930) | |
#for n in range(1,61): | |
n = 1 | |
for x in ( 3,6,12,24,48,7,14,28,56,15,30,60,5,10,20,40,21,42 ): | |
i = 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
math.randomseed(os.time()) | |
length = arg[1] or 8 | |
for i = 1, length do | |
io.stdout:write( string.char(math.random(33,126)) ) | |
end | |
print() | |
io.read() |
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
#!/usr/bin/env python3 | |
import requests | |
import sys | |
import datetime as dt | |
SECRET_KEY = "get it yourself @ yandex" | |
p = { "Одинцово" : "s9600721", | |
"Голицыно": "s9602265", |
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 mmap | |
import winsound as ws | |
import struct as st | |
from math import sin, cos, radians | |
from random import randint | |
# in RIFF format (and therefore in WAVE) ALL NUMBERS ARE LITTLE ENDIAN | |
FILE_SIZE = 44100*10+44 # bytes |
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
#!/usr/bin/env python | |
import sys | |
import zlib | |
def main(): | |
with open(sys.argv[1], 'rb') as f: | |
data = f.read() | |
print(hex(zlib.crc32(data))) |
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
#!/usr/bin/env python3 | |
import requests | |
import sys | |
import datetime as dt | |
SECRET_KEY = """ Ключ можно получить здесь: https://tech.yandex.ru/rasp/raspapi/ """ | |
p = {"Белорусский вокзал": "s2000006", | |
"Шереметьево": "s9600213" |
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
set nocompatible | |
autocmd FileType python set expandtab | |
syntax on | |
" set number | |
set tabstop=4 | |
set autoindent | |
set shiftwidth=4 | |
" set cursorline | |
set showmatch |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <errno.h> | |
#include <string.h> | |
#include <inttypes.h> | |
#include <linux/if_packet.h> | |
#include <linux/if_ether.h> | |
// #include <netpacket/packet.h> |
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 ( | |
"math" | |
"time" | |
"fmt" | |
) | |
type Point struct { | |
x float64 |
OlderNewer