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
| const colors = require('tailwindcss/colors'); | |
| const Color = require('color'); | |
| // Range generation function | |
| const range = (lower, upper, step) => { | |
| return Array.from( | |
| new Array(Math.floor(upper / step - lower / step) + 1), | |
| (_, i) => lower / step + i | |
| ).map((x) => x * step); | |
| }; |
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
| { | |
| "Response": { | |
| "status": 200, | |
| "flightInfo": { | |
| "logo": null, | |
| "airlineName": null, | |
| "airlineCode": "ASA", | |
| "airlineCodeIata": null, | |
| "tailNumber": "N976AK", | |
| "flightNumberInfo": "ASA541", |
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
| Error detected while processing WinEnter Autocommands for "*": | |
| E5108: Error executing lua Vim:E495: no autocommand file name to substitute for "<afile>" | |
| stack traceback: | |
| [C]: in function 'expand' | |
| [string ":lua"]:1: in main chunk |
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
| def score(distribution): | |
| count = len(distribution) | |
| deviation = [abs(1 / count - d) for d in distribution] | |
| avg_deviation = sum(deviation) / count | |
| return 1 - sum(deviation) / count | |
| print(score([1 / 5 for _ in range(5)])) | |
| print(score([0.12, 0.33, 0.55])) |
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
| ❯ type -a pkg-config | |
| pkg-config is /home/linuxbrew/.linuxbrew/bin/pkg-config | |
| pkg-config is /usr/bin/pkg-config | |
| pkg-config is /bin/pkg-config | |
| ❯ pkg-config --variable pc_path pkg-config | |
| /home/linuxbrew/.linuxbrew/lib/pkgconfig:/home/linuxbrew/.linuxbrew/share/pkgconfig:/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/os/linux/pkgconfig |
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
| warning: variable does not need to be mutable | |
| --> src/item.rs:412:15 | |
| | | |
| 412 | if let Ok(mut asleep) = (&mut asleeps).try_get(who) { | |
| | ----^^^^^^ | |
| | | | |
| | help: remove this `mut` | |
| | | |
| = note: `#[warn(unused_mut)]` on by default |
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
| use std::env; | |
| use std::fs::File; | |
| use std::io::{BufRead, BufReader, BufWriter, Write}; | |
| use std::path::Path; | |
| use regex::Regex; | |
| use chrono::{FixedOffset}; | |
| const HOUR: u32 = 3600; | |
| fn parse_offset(raw_offset: &str) -> i32 { |
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
| use std::env; | |
| use std::fs::File; | |
| use std::io::{BufRead, BufReader, BufWriter, Write}; | |
| use std::path::Path; | |
| use regex::Regex; | |
| use chrono::{FixedOffset}; | |
| const HOUR: u32 = 3600; | |
| fn parse_offset(raw_offset: &str) -> i32 { |
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
| adject = ['adult human', 'AFAB', 'alpha', 'AMAB', 'anime', 'biological', 'butch', 'cisgender', 'ex', 'failed', 'female', 'FtM', 'gamer', 'gay', 'gender neutral', 'it/its', 'male', 'MtF', 'neurodivergent', 'normal', 'non-binary', 'pathetic', 'punished', 'sigma', 'they/them', 'transgender', 'transsexual'] | |
| prefix = [ 'a', 'allo', 'andro', 'bi', 'boy', 'cat', 'cis', 'demi', 'dog', 'doll', 'fem', 'fluid', 'gender', 'girl', 'grey-a', 'guy', 'hetero', 'homo', 'him', 'inter', 'intra', 'les', 'lesbo', 'male', 'man', 'masc', 'macro', 'meta', 'micro', 'neo', 'neutro', 'non', 'nu', 'pan', 'poly', 'post', 'pre', 'she', 't', 'tom', 'trans', 'them', 'tri', 'x-', 'xirl']; | |
| suffix = ['bian', 'binary', 'bo', 'boi', 'boy', 'butch', 'bxy', 'by', 'cat', 'dog', 'doll', 'fem', 'femme', 'friend', 'flux', 'fucky', 'gal', 'gender', 'girl', 'guy', 'gxrl', 'gyne', 'husband', 'lesbian', 'masc', 'male', 'man', 'moder', 'queer', 'sex', 'vir', 'wife', 'witch', 'woman', 'xirl']; | |
| flags = { | |
| nonbinary: ['#fcf434', '#fcfcfc', '#9c59d1', '#2c2 |
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 datetime import datetime, timedelta | |
| def get_start_of_week(value: datetime) -> datetime: | |
| """Returns the datetime of the start of the week for the given datetime.""" | |
| return (value - timedelta(days=value.weekday())).replace(hour=0, minute=0, second=0, microsecond=0) | |
| def get_minutes_since_start_of_week(value: datetime) -> float: | |
| """Returns the number of minutes since the start of the week.""" |