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 asyncio | |
import aiohttp | |
import hunter | |
async def fetch(session, url): | |
async with session.get(url) as response: | |
return await response.text() |
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
def unary(symbol, priority): | |
# XXX: BRAIN DAMAGE HAZARD AHEAD | |
# Consider prioritize's argument: what's it for? | |
# Isn't it expected to be a number? | |
# How dare it work and work correctly? | |
# Turns out, Python mixed-type comparison semantics are exploited in an | |
# awkward way. Python specifies that when no other rules apply, e.g. no | |
# overridden comparison magic-methods on any side, it falls back to | |
# comparing both sides' type names. | |
# One could grep CPython sources for `default_3way_compare' function that |
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 <cmath> | |
#include <cstdint> | |
#include <random> | |
#include <iostream> | |
template<typename Float, int N> | |
class log_sum { | |
static_assert(N > 0, "N must be positive"); |
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 <iostream> | |
#include <vector> | |
#include <type_traits> | |
#include <boost/optional.hpp> | |
#include <boost/range/adaptor/transformed.hpp> | |
#include <boost/range/adaptor/filtered.hpp> | |
template<typename MapperT> | |
class filter_mapped_adaptor; |
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 | |
# -*- coding: utf-8 -*- | |
import argparse | |
import codecs | |
import getpass | |
import glob | |
import json | |
import logging | |
import lxml.etree |
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
struct tsc { | |
uint32_t cycles_low, cycles_high; | |
uint64_t cycles; | |
tsc() : cycles(0) {} | |
void begin() { | |
asm volatile ( | |
"CPUID\n\t"/*serialize*/ | |
"RDTSC\n\t"/*read the clock*/ |
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
\documentclass[10pt,a4paper]{moderncv} | |
\usepackage{hyperref} | |
% XeTeX | |
\usepackage[MnSymbol]{mathspec} | |
\usepackage{xecyr} | |
% Локализация | |
\usepackage{polyglossia} |
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 XMonad | |
import qualified XMonad.StackSet as W | |
import XMonad.Actions.CycleWS | |
import XMonad.Config.Gnome | |
import XMonad.Layout.IM | |
import XMonad.Layout.Fullscreen | |
import XMonad.Layout.NoBorders | |
import XMonad.Hooks.ManageHelpers | |
import XMonad.Hooks.SetWMName | |
import XMonad.Hooks.ICCCMFocus |
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 | |
# encoding: utf-8 | |
# | |
# Map/Reduce word counter | |
# (c) Mikhail Borisov | |
# Running prereqs: | |
# - files 'lemmas.utf8.xml', 'paradigms.utf8.xml' | |
# in current working directory | |
# - data files in corpus_utf8/ subdirectory |
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
\documentclass[12pt,fleqn,a4paper]{article} | |
\usepackage{mathtools} | |
\usepackage{amssymb} | |
\usepackage{amsthm} | |
\usepackage{float} | |
\usepackage{wrapfig} | |
\usepackage[font=small]{caption} | |
\usepackage{setspace} | |
\usepackage{hyperref} |
NewerOlder