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 numpy as np | |
| from typing import Text, List, TypeVar, Generic, Protocol | |
| T = TypeVar('T') | |
| @dataclass | |
| class ItemPotential(Protocol): | |
| item_id: Text | |
| gmv_eur: float |
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
| <html> | |
| <head> | |
| <script src="https://unpkg.com/axios/dist/axios.min.js"></script> | |
| <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> | |
| </head> | |
| <body> | |
| <table class="table"> | |
| <thead> | |
| <th>id</th> | |
| <th>email</th> |
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 Mom: | |
| def on_door_opened(self): | |
| print("Who's there?") | |
| class Priest: | |
| def on_door_opened(self): | |
| print("Is it police? Run!") | |
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
| from ahocorapy.keywordtree import KeywordTree | |
| digit2letter = { | |
| 0: ["#"], | |
| 1: ["#"], | |
| 2: ['a', 'b', 'c'], | |
| 3: ['d', 'e', 'f'], | |
| 4: ['g', 'h', 'i'], | |
| 5: ['j', 'k', 'l'], |
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
| from ahocorapy.keywordtree import KeywordTree | |
| digit2letter = { | |
| 1: [], | |
| 2: ['a', 'b', 'c'], | |
| 3: ['d', 'e', 'f'], | |
| 4: ['g', 'h', 'i'], | |
| 5: ['j', 'k', 'l'], | |
| 6: ['m', 'n', 'o'], |
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 tensorflow as tf | |
| import numpy as np | |
| import random | |
| # neural network predicting if input hour is 21:37 | |
| # network created with layers of size: [73 21] | |
| # because of small number of neurons if may take few tries to read good results (around 0.98 accuracy) | |
| X, y = [], [] | |
| for _ in range(10000): |
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 | |
| def adjust_directory(directory_path): | |
| def adjust_file(file_path): | |
| lines = open(file_path).read().split('\n') | |
| scale = 0.1 | |
| with open(file_path, "w") as output_file: | |
| for line in lines: | |
| if line.startswith("v "): | |
| splited = line.split(' ') | |
| splited[1] = str(round(float(splited[1]) * scale, 5)-0.5) |
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
| from pynput import keyboard | |
| import pyperclip | |
| current = {"tags":[]} | |
| def on_press(key): | |
| global current | |
| try: k = key.char # single-char keys | |
| except: k = key.name # other keys |
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
| from pynput import keyboard | |
| import pyperclip | |
| current = {"tags":[]} | |
| def on_press(key): | |
| global current | |
| try: k = key.char # single-char keys | |
| except: k = key.name # other keys |
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
| set smartindent " TODO | |
| set tabstop=4 | |
| set shiftwidth=4 | |
| set expandtab " TODO | |
| set encoding=utf-8 | |
| set completeopt=menuone,longest " TODO | |
| set number " Displays line number | |
| set autochdir | |
| set clipboard=unnamedplus |
NewerOlder