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
Функции и переменные называются в стиле lowerCamelCase. | |
Классы называются в стиле UpperCamelCase. | |
Глобальные константы называются КАПСЛОКОМ_ЧЕРЕЗ_ПОДЧЁРКИВАНИЕ. | |
Функции-геттеры называются getSmth() | |
Функции-сеттеры называются setSmth() | |
Мы не используем венгерскую нотацию, т. е. имя переменной не содержит указания на её тип. | |
Заголовочные файлы имеют расширение .hpp, а не .h | |
В заголовочных файлах используем include-guard, а не pragma once, т.е. пишем так: | |
#ifndef SOMEFILE_HPP | |
#define SOMEFILE_HPP |
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
import arcade | |
import random | |
CELL_SIZE = 32 | |
class Objects: | |
MINE = 1 | |
FLAG = 2 |
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
query { | |
repositoryOwner(login: "GoldsteinE") { | |
repositories(first: 100) { | |
nodes { | |
nameWithOwner | |
ref(qualifiedName: "master") { | |
target { | |
__typename | |
... on Commit { | |
url |
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
import structs | |
from structs import MakefileError | |
import sys | |
import os | |
def main(script, args): | |
if len(args) != 1: | |
print('Usage:\n{} <filename>'.format(script), file=sys.stderr) | |
sys.exit(1) |
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
import re | |
class MakefileError(Exception): | |
pass | |
class MakefileHeaderError(MakefileError): | |
pass | |
class MakefileLinksError(MakefileError): | |
pass |
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
import os | |
import threading | |
import time | |
from storage import storage, temp_storage, one_time_storage | |
def run(level, script_name, args): | |
def run_f(level, script_name, args): | |
def say(text): |
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
variable=`cat <<-EOF | |
Some | |
text | |
EOF` | |
echo "My syntax highligting is broken. :(" |
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
import tokenize | |
from construct.lexer import CodeElem, LOC | |
from construct.constructs.basic import BasicConstruct, T | |
class ConstructImportConstruct(BasicConstruct): | |
def feed(self, elem: CodeElem) -> None: | |
if not isinstance(elem, LOC): | |
return None |
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
import fuck | |
fuck('Какой-то', 'текст') # Вывести какой-то текст, плюс название модуля и номер строки | |
fuck() # Вывести трейсбек | |
a = 1 | |
fuck.a # Вывести текст "a = 1", плюс название модуля и номер строки | |
b = fuck.a + 2 # В b будет лежать 3, на экран попадёт то же, что и в предыдущем примере | |
@fuck.ing | |
def function(a, b): # Все вызовы функции и их результаты будут логироваться | |
return a * b |
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
let perl_sub_signatures = 1 | |
set modeline | |
set incsearch | |
set encoding=utf-8 | |
set splitbelow | |
set backspace=indent,eol,start | |
set updatetime=100 | |
set wildmenu | |
filetype plugin indent on | |
let mapleader = ' ' |
OlderNewer