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
class InvalidNodeIndex(Exception): | |
"""InvalidNodeIndex class""" | |
def __init__(self, index, node=None): | |
self.index = index | |
self.node = node | |
def __str__(self): | |
return "Invalid node index: %i" % (self.index) |
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
class DictObject: | |
"""DictObject class""" | |
def __init__(self): | |
self._fields = {} | |
def add_field(self, name, value): | |
"""Add field to the DictObject fields list | |
:param name: field name | |
:type name: str |
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
Show hidden characters
{ | |
"cmd": ["python", "-u", "$file"], | |
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)", | |
"selector": "source.python", | |
"variants": [ | |
{ | |
"name": "Terminal", | |
"shell": true, | |
"shell_cmd": "start cmd /k $file" | |
} |
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
{ | |
"shell_cmd": "g++ \"$file\" -o \"$file_path/$file_base_name\"", | |
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$", | |
"working_dir": "$file_path", | |
"selector": "source.c, source.c++", | |
"variants": | |
[ | |
{ | |
"name": "Run", |
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
class Vector2D | |
{ | |
public double vX; | |
public double vY; | |
public static int count = 0; | |
public Vector2D() { | |
this.vX = this.vY = 1.0; | |
count++; |
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
#^Up:: | |
Send #^d | |
return | |
#^Down:: | |
Send #^{F4} | |
return |
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 re | |
from vk_api import VkApi | |
from vk_api.exceptions import VkApiError | |
from bs4 import BeautifulSoup | |
class MemzAuth: | |
OAUTH_URL = 'https://oauth.vk.com/authorize?client_id=7877542&redirect_uri=https://memz.fun/signin.php&display=page' |
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
prompt_yn() { | |
def=$2 | |
# Normalize default answer and prompt | |
case $def in | |
[yY]) def="y"; read -r -p "${1} [Y/n] " input;; | |
[nN]) def="n"; read -r -p "${1} [y/N] " input;; | |
esac | |
# Echo 1 if yes else 0 |
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
# Utils | |
prompt_yn() { | |
def=$2 | |
case $def in | |
[yY]) def="y"; read -r -p "${1} [Y/n] " input;; | |
[nN]) def="n"; read -r -p "${1} [y/N] " input;; | |
esac | |
case $input in |
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
FROM alpine:latest | |
ENV PYTHONBUFFERED=1 | |
RUN apk add --update --no-cache python3 && ln -sf python3 /usr/bin/python \ | |
&& python3 -m ensurepip |
OlderNewer