Skip to content

Instantly share code, notes, and snippets.

View spinCubes.pde
float[][] result;
float t, c;
float ease(float p) {
p = c01(p);
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
@spazione
spazione / input.scss
Created Feb 3, 2023
Generated by SassMeister.com.
View input.scss
@use "sass:string";
@use 'sass:meta';
@use "sass:map";
@function str-replace($string, $search, $replace: "") {
$index: str-index($string, $search);
@if $index {
@return str-slice($string, 1, $index - 1) + $replace +
str-replace(str-slice($string, $index + str-length($search)), $search, $replace);
}
View gist:26802a95d50c32264b6b69bd398db79e
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
(setq
user-full-name "Miroslav Toman"
user-mail-address "toman@fastmail.com"
;; doom-theme 'doom-sourcerer
doom-theme 'doom-gruvbox
; doom-font (font-spec :family "Essential Pragmata Pro" :size 18)
doom-font (font-spec :family "Tamzen" :size 16)
doom-big-font (font-spec :family "Essential Pragmata Pro" :size 24)
View untrusted-lvl6-solution.js
/****************
* drones101.js *
****************
*
* Do you remember, my dear Professor, a certain introductory
* computational rationality class you taught long ago? Assignment
* #2, behavior functions of autonomous agents? I remember that one
* fondly - but attack drones are so much easier to reason about
* when they're not staring you in the face, I would imagine!
@LucaHermes
LucaHermes / label_informativeness.py
Created Feb 3, 2023
Code to compute label informativeness given an edge index and node labels as proposed by Platonov et al. (2022) Characterizing Graph Datasets for Node Classification: Beyond Homophily-Heterophily Dichotomy
View label_informativeness.py
from scipy.stats import entropy
import numpy as np
def label_informativeness(edge_index, labels):
'''
Computes the label informativeness metric proposed in
Platonov et al. (2022)
Characterizing Graph Datasets for Node Classification:
Beyond Homophily-Heterophily Dichotomy
https://arxiv.org/abs/2209.06177
@thief-5668
thief-5668 / top bots.md
Created Feb 3, 2023 — forked from advaith1/top bots.md
The top Discord bots ranked by server count
View top bots.md
Rank Bot Approximate Server Count Library
1 MEE6 19,800,000 Custom Python
2 Rythm 🪦 16,000,000 JDA
3 Groovy 🪦 11,200,000 JDA, Discord4J
4 Dank Memer 9,230,000 Custom TypeScript
5 ProBot
View i3status.config
order += "disk /"
order += "cpu_usage"
order += "battery 0"
order += "memory"
general {
colors = true
color_good = "#a3be8c"
color_bad = "#bf616a"
color_degraded = "#ebcb8b"
@cupdike
cupdike / InstallCaCerts.sh
Created Feb 3, 2023
Install SSL Proxy Certs Into Finch VM to Fix 'x509: certificate signed by unknown authority'
View InstallCaCerts.sh
##### Scenario:
# You are getting 'x509: certificate signed by unknown authority' trying to
# run a simple finch container on your mac.
# $ finch run --rm public.ecr.aws/finch/hello-finch
# public.ecr.aws/finch/hello-finch:latest: resolving |--------------------------------------|
# elapsed: 0.1 s total: 0.0 B (0.0 B/s)
# INFO[0000] trying next host error="failed to do request: Head \"https://public.ecr.aws/v2/finch/hello-finch/manifests/latest\": x509: certificate signed by unknown authority" host=public.ecr.aws
# FATA[0000] failed to resolve reference "public.ecr.aws/finch/hello-finch:latest": failed to do request: Head "https://public.ecr.aws/v2/finch/hello-finch/manifests/latest": x509: certificate signed by unknown authority
# FATA[0000] exit status 1
View disabled_dates_style.css
/** Disabled dates color **/
.bfwc-optimise-colours .ui-datepicker td.ui-state-disabled {
background: #FF0000 !important;
opacity: 1 !important;
}
/** Fix calendar next/previous icons **/
.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span{
display: none !important;