Skip to content

Instantly share code, notes, and snippets.

🛠
Yo ho ho

Pavel White pahaz

🛠
Yo ho ho
Block or report user

Report or block pahaz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View git_server.py
import os
__author__ = 'pahaz'
from dulwich.server import Backend, UploadPackHandler, ReceivePackHandler
from dulwich.repo import Repo
from dulwich import log_utils
from dulwich.server import (
TCPGitServer,
)
@pahaz
pahaz / dowloader.py
Created Nov 19, 2014
hack parsing task
View dowloader.py
import threading
import requests as r
import re
__author__ = 'pahaz'
def download(_from, _to, lock, f):
for i in range(_from, _to):
s = r.session()
@pahaz
pahaz / AsciiArtImage.cs
Last active Aug 29, 2015
Simple Ascii Art Image
View AsciiArtImage.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
class AsciiArtImage
{
static int[][] makeZebraImg(int width, int height)
{
@pahaz
pahaz / Redactor.cs
Last active Aug 29, 2015
Simple image redactor
View Redactor.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
class Redactor
{
static void Main(string[] args)
{
@pahaz
pahaz / hangmanpics.txt
Last active Aug 29, 2015
Виселица
View hangmanpics.txt
HANGMANPICS
+---+
| |
|
|
|
|
=========
@pahaz
pahaz / ClickerGame.cs
Last active Aug 29, 2015
Simple clicker game
View ClickerGame.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace ClickerGame
{
class Program
@pahaz
pahaz / HTTPServer.cs
Last active Aug 29, 2015
Simple HTTP Server
View HTTPServer.cs
using System;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Text;
class HTTPServer
{
public static void Main()
{
@pahaz
pahaz / license.cs
Last active Aug 29, 2015
Заготовка для лицензионного соглашения
View license.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
class Program
{
static void Main(string[] args)
{
string LICENSE_CONFIRM = "Согласны ли вы с условием лицензионного соглашения? (y/n)";
View dz1.cs
using System.IO;
using System;
class Program
{
static void Main()
{
int z;
// afawfawfawfawf
@pahaz
pahaz / transliterate.py
Created Feb 22, 2015
Python safe transliterate print (kill UnicodeEncodeError)
View transliterate.py
#!/usr/bin/env python3
# encoding=utf-8
from __future__ import print_function
from __future__ import unicode_literals
import string
ru_lang_translit_map = {
"Я": "Ja", "Ю": "Ju", 'Э': 'E', 'Ь': '\'', 'Ы': 'Y', 'Ъ': '\'', "Щ": "Sch",
"Ш": "Sh", "Ч": "Ch", "Ц": "Ts", 'Х': 'H', 'Ф': 'F', 'У': 'U', 'Т': 'T',
'С': 'S', 'Р': 'R', 'П': 'P', 'О': 'O', 'Н': 'N', 'М': 'M', 'Л': 'L',
You can’t perform that action at this time.