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 functools import wraps | |
def debug(func): | |
print('debug(', func.__qualname__, ')') | |
name = func.__qualname__ | |
@wraps(func) | |
def wrapper(*args, **kwargs): | |
print('CALL:', name, args, kwargs) |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<title>Chat Example</title> | |
</head> | |
<body> | |
<script src="/socket.io/socket.io.js"></script> | |
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script> | |
<script> | |
var socket = io.connect(); |
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
class CheckDomainMiddleware(object): | |
""" | |
If MULTISITE_WRONG_DOMAIN_REDIRECT_URL defined all wrong domain requests | |
will be redirected to this url. Otherwise Http 404 will be returned. | |
How-to use: | |
# 1. add to MIDDLEWARE_CLASSES | |
# 2. File: settings.py | |
MULTISITE_WRONG_DOMAIN_REDIRECT_URL = "http://example.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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace Game | |
{ | |
class Program | |
{ |
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 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', |
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
using System.IO; | |
using System; | |
class Program | |
{ | |
static void Main() | |
{ | |
int z; | |
// afawfawfawfawf | |
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
using System; | |
using System.IO; | |
using System.Net; | |
using System.Net.Sockets; | |
using System.Text; | |
class HTTPServer | |
{ | |
public static void Main() | |
{ |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace ClickerGame | |
{ | |
class Program |
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
HANGMANPICS | |
+---+ | |
| | | |
| | |
| | |
| | |
| | |
========= |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
class Redactor | |
{ | |
static void Main(string[] args) | |
{ |