Skip to content

Instantly share code, notes, and snippets.

View kamilglod's full-sized avatar

Kamil Głód kamilglod

View GitHub Profile
@kamilglod
kamilglod / actions.js
Last active January 19, 2017 21:02
Aurelia redux sync, updates aurelia's viewModel each time the change of state occured. Aurelia, Redux, ImmutableJS
import { getHttp } from 'utils/fetch';
import { HISTORY_URL } from 'conf/urls';
const types = {
START_FETCHING_HISTORY: 'START_FETCHING_HISTORY',
FINISH_FETCHING_HISTORY: 'FINISH_FETCHING_HISTORY',
INVALIDATE_HISTORY: 'INVALIDATE_HISTORY',
};
@kamilglod
kamilglod / atom_insert_debugger.coffee
Created February 25, 2017 14:12
Example how to create a keymapping for Atom to insert custom text line like debugger
addCodeLine = (code) ->
editor = atom.workspace.getActivePaneItem()
cursors = editor.getCursors();
cursors[0].moveToFirstCharacterOfLine();
cursors[0].moveToFirstCharacterOfLine();
editor.insertText(code, options = {
"autoIndentNewline": true,
"autoIndent": true
})
Flask==1.*
gunicorn==20.*
-r base.txt
pytest==5.2.0
pytest-mock==1.10.4
ipdb==0.12
Jinja2==2.11.2
Werkzeug==1.0.1
click==7.1.1
flask==1.1.2
gunicorn==20.0.4
itsdangerous==1.1.0
import json
from sys import argv
from faker import Faker
from .users import User
from .config import USERS_DATASET_PATH
def generate_users(size: int) -> None:
from dataclasses import asdict
import uvicorn
from starlette.applications import Starlette
from starlette.routing import Route
from starlette.responses import UJSONResponse
from src.repo.users import get_user, get_users
import json
from datetime import datetime
from dataclasses import dataclass
from enum import Enum
from typing import List
from warnings import warn
from .config import USERS_DATASET_PATH