Skip to content

Instantly share code, notes, and snippets.

View slavfox's full-sized avatar
🦊
Testing in production

fox & circe slavfox

🦊
Testing in production
View GitHub Profile
{
"basics": {
"name": "Thomas Edison",
"label": "Inventor and Businessman",
"picture": "https://example.com/photo.jpg",
"email": "[email protected]",
"phone": "(123) 456-7890",
"website": "https://thomasedison.com",
"summary": "Prolific inventor and businessman known for developing many devices that greatly influenced life around the world, including the phonograph, the motion picture camera, and the electric light bulb.",
"location": {
#[inline]
pub fn copilot(x0: i32, y0: i32, x1: i32, y1: i32) -> Vec<(i32, i32)> {
let mut points = Vec::new();
let mut x = x0;
let mut y = y0;
let dx = x1 - x0;
let dy = y1 - y0;
let mut step = if x1.abs() > x0.abs() { 1 } else { -1 };
let mut err = dx.abs() - dy.abs();
while x != x1 {
SPECIES_SYLLABLES = [
'a', 'aar', 'ab', 'ac', 'ad', 'ai', 'ak', 'al', 'am', 'an', 'ap', 'aq',
'ar', 'as', 'at', 'aun', 'aur', 'ax', 'ay', 'az', 'b', 'bal', 'ban', 'bar',
'beas', 'bes', 'bit', 'blar', 'bol', 'bot', 'boun', 'caam', 'cab',
'cal', 'car', 'cat', 'cel', 'cer', 'ch', 'chad', 'chag', 'chal', 'chi',
'chis', 'chor', 'claw', 'cod', 'con', 'cow', 'd', 'da', 'dai', 'dan',
'das', 'dat', 'def', 'dek', 'dev', 'dit', 'do', 'dor', 'dos', 'dow',
'drac', 'dres', 'droc', 'dro', 'duag', 'dug', 'dul', 'dur', 'e', 'ean',
'eb', 'ec', 'ed', 'een', 'ees', 'eg', 'ek', 'el', 'em', 'en', 'ep', 'er',
'es', 'et', 'ew', 'eyr', 'fa', 'fal', 'fan', 'far', 'feeor', 'fer', 'fir',
@slavfox
slavfox / clippy.rs
Created November 15, 2021 08:04
clippy config
#![warn(
clippy::all,
clippy::pedantic,
clippy::nursery,
missing_docs,
clippy::missing_docs_in_private_items,
clippy::mod_module_files
)]
combine_control_expr = false
comment_width = 0
wrap_comments = false
fn_single_line = true
format_strings = true
max_width = 79
merge_imports = false
newline_style = "Unix"
normalize_comments = true
use_try_shorthand = true
STRIKEOUT = 200
HIT = 200
HOMERUN = 1000
SHUTOUT = 10_000
import requests
from collections import defaultdict
# saved full S6 game_events list from the datablase
with open("game_events.json") as f:
@slavfox
slavfox / .clang-format
Last active August 19, 2020 01:27
Default clang format
---
Language: Cpp
# BasedOnStyle: Mozilla
AccessModifierOffset: 0
AlignAfterOpenBracket: AlwaysBreak
AlignConsecutiveMacros: false
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Right
AlignOperands: Align
from typing import List, Dict, Type
from dataclasses import dataclass
# importing separately to make clear which names come from dataclasses
import dataclasses
from pprint import pprint
import json
@slavfox
slavfox / sample
Created February 16, 2020 16:43
Cozette sample file
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ β™‘ Cozette β™‘ ┃
┑━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
β”‚ A B C D E F G H I J K L M β”‚
β”‚ N O P Q R S T U V W X Y Z β”‚
β•žβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•‘
β”‚ 1 2 3 4 5 6 7 8 9 0 β”‚
β•žβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•‘
@slavfox
slavfox / .gitignore
Created February 3, 2020 16:23
Base gitignore
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
build/
develop-eggs/
dist/
downloads/
eggs/