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
{"lastUpload":"2020-11-04T20:01:03.058Z","extensionVersion":"v3.4.3"} |
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 Bitwise(object): | |
def __init__(self, value=None): | |
""" | |
Create one set to compare multiple lists | |
Usage: | |
# consts | |
SAO_PAULO = 'sp' | |
RIO_DE_JANEIRO = 'rj' |
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
// Place your key bindings in this file to overwrite the defaults | |
[ | |
{ | |
"key": "ctrl+alt+d", | |
"command": "editor.action.addSelectionToNextFindMatch", | |
"when": "editorFocus" | |
}, | |
{ | |
"key": "ctrl+d", | |
"command": "editor.action.deleteLines", |
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
package main | |
import ( | |
"bufio" | |
"fmt" | |
"log" | |
"os" | |
"time" | |
) |
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
# -*- coding: utf-8 -*-s | |
import PIL | |
from PIL import ImageFont | |
from PIL import Image | |
from PIL import ImageDraw | |
NEW_LINE_MARK = "\n" | |
def text2img(text, file_name="text_to_png.png", default_width=300, | |
bgcolor="#FFF", color="#000", padding=10): |
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
### KERNEL TUNING ### | |
# Increase size of file handles and inode cache | |
fs.file-max = 2097152 | |
# Do less swapping | |
vm.swappiness = 10 | |
vm.dirty_ratio = 60 | |
vm.dirty_background_ratio = 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
# -*- coding: utf-8 -*- | |
from passlib.apps import custom_app_context as pwd_context | |
from itsdangerous import (TimedJSONWebSignatureSerializer | |
as Serializer, BadSignature, SignatureExpired) | |
SECRET_KEY = 'top-secret' | |
class AuthUser(object): | |
def __init__(self, id=None, *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
# -*- coding: utf-8 -*- | |
from string import ascii_letters, punctuation | |
from marshmallow import fields | |
from decimal import Decimal | |
punctuation_without_subtract = punctuation.replace('-', '') | |
STRIP_LETTERS = punctuation_without_subtract + ascii_letters | |
def _strip_values(value): |
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
// Example POST method implementation: | |
// ajaxData(`http://example.com/answer`, {answer: 42}) | |
// .then(data => console.log(JSON.stringify(data))) // JSON-string from `response.json()` call | |
// .catch(error => console.error(error)); | |
function getCookie(name) { | |
let cookieValue = null; | |
if (document.cookie && document.cookie !== '') { | |
const cookies = document.cookie.split(';'); | |
for (let i = 0; i < cookies.length; i += 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
.PHONY: build | |
APP_VERSION := $$(version show) | |
DOCKER_IMAGE := 134194528133.dkr.ecr.us-west-1.amazonaws.com/ | |
# Make content for developer | |
help: | |
@echo "Create docker images for VPCs" | |
@echo "dev Build for dev" | |
@echo "qas Build for qas" |