Skip to content

Instantly share code, notes, and snippets.

View pschuprikov's full-sized avatar

Pavel Chuprikov pschuprikov

View GitHub Profile
import os
import ycm_core
import subprocess
def DirectoryOfThisScript():
return os.path.dirname( os.path.abspath( __file__ ) )
def ExtractSearchPaths(compiler):
def find_paths(compiler, c_arg):
child = subprocess.Popen([compiler, c_arg, '-E', '-v', '-'], stdin=subprocess.PIPE, stderr=subprocess.PIPE, stdout=subprocess.PIPE)
var n,i, lowest : integer;
var name : string;
var score : integer;
var bestnames : array [1..3] of string;
var bestscores : array [1..3] of integer;
procedure read_until_space(var s : string);
var c : char;
begin
s := '';

Урок 1

Этикет

фраза перевод
Hola! Привет!
Buenos dias! Добрый день!
@pschuprikov
pschuprikov / Makefile
Last active February 10, 2016 11:22
Pandoc makefile
sources=$(wildcard *.md)
docs=$(patsubst %.md, %.pdf, $(sources))
all: $(docs)
%.pdf: %.md
pandoc -s --latex-engine=xelatex -V mainfont="DejaVu Serif" -V mathfont="Neo Euler:Euler" -V geometry="margin=3cm" -o $@ $^
clean:
rm *.pdf
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-}
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.DynamicLogWTitle
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.SetWMName
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.EZConfig(additionalKeysP)
import System.IO
glb_dict = {}
glb_dict["x1"] = 0
glb_dict["y"] = 0
glb_dict["z"] = 0
def foo(x):
foo_dict = {}
foo_dict["x"] = x
foo_dict["r"] = 0
template<class T, class Lexer> class recursive_parser_t {
public:
typedef lexer_traits<Lexer> lexer_traits;
typedef std::function<parsing_t<typename lexer_traits::position_info_type, T>(Lexer&)> func_type;
typedef parsing_t<typename lexer_traits::position_info_type, T> result_type;
public:
recursive_parser_t() : func_(std::make_shared<func_type>()) {}
struct wrapper {
typedef recursive_parser_t::lexer_traits lexer_traits;
SHELL=/bin/sh
name=pp
CXX=clang++
CXXFLAGS=-ggdb -Wall -pedantic -Wextra -Weffc++ -Werror -O0 -std=c++1y -stdlib=libc++
#CXXFLAGS+=-fsanitize=integer,address-full,undefined
srcdir=src
prefix=.
SHELL=/bin/sh
name=pp
CXX=clang++
CXXFLAGS=-ggdb -Wall -pedantic -Wextra -Weffc++ -Werror -O0 -std=c++1y -stdlib=libc++
#CXXFLAGS+=-fsanitize=integer,address-full,undefined
srcdir=src
prefix=.