Skip to content

Instantly share code, notes, and snippets.

@tomjohnneill
tomjohnneill / calculate.js
Created January 5, 2022 01:38
Calculate the best possible guess for Wordle
import { list } from "./wordlist.json";
const matchesFilters = (wordList, filters) => {
return wordList.filter((word) => {
let match = true;
for (let i = 0; i < filters.length; i += 1) {
const { colour, position, letter } = filters[i];
if (colour === "black") {
if (word.includes(letter)) {
match = false;
@mzjp2
mzjp2 / skip_hook.py
Created October 1, 2020 11:26
A prototype of a hook that will skip a node run based on the last modified time of input and output datasets
import logging
from kedro.framework.hooks import hook_impl
from kedro.io import MemoryDataSet
from kedro.io.core import get_filepath_str
class SkipHook:
def __init__(self):
self.logger = logging.getLogger(__name__)
/* rs-theme-name: Idle Eyes */
/* rs-theme-is-dark: TRUE */
.ace_gutter {
background: #3b3b3b;
color: rgb(153,153,153)
}
.ace_print-margin {
width: 1px;
background: #555;
}
@afrandsen
afrandsen / AKF_Dark.reg
Created August 12, 2019 16:32
SAS 9.4 Enhanced Editor Custom Theme
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\SAS Institute Inc.\Enhanced Editor\9.4\Editor Settings\.sas\Schemes\AKF_Dark]
"FontCharSetEx"=dword:ffffffff
"FontName"="Lucida Console"
"FontSize"=dword:0000000a
[HKEY_CURRENT_USER\Software\SAS Institute Inc.\Enhanced Editor\9.4\Editor Settings\.sas\Schemes\AKF_Dark\Elements]
[HKEY_CURRENT_USER\Software\SAS Institute Inc.\Enhanced Editor\9.4\Editor Settings\.sas\Schemes\AKF_Dark\Elements\code]
@JoostImpink
JoostImpink / array.sas
Created February 1, 2016 02:19
Clay's Array, Do_over and Numlist macros
%MACRO ARRAY(arraypos, array=, data=, var=, values=,
delim=%STR( ), debug=N, numlist=Y);
/* last modified 8/4/2006 a.k.a. MACARRAY( ).
72nd col -->|
Function: Define one or more Macro Arrays
This macro creates one or more macro arrays, and stores in them
character values from a SAS dataset or view, or an explicit list
of values.
@cmtoomey
cmtoomey / Tableau.xml
Last active December 28, 2023 21:46
Fully Documented Tableau Workbook as XML
<?xml version='1.0' encoding='utf-8' ?>
<!--This is the basics - platform (windows or mac)and version number-->
<workbook source-platform='mac' version='9.0' xmlns:user='http://www.tableausoftware.com/xml/user'>
<!-- build 9000.15.0318.1720 -->
<!--No idea what this for -->
<preferences>
<preference name='ui.encoding.shelf.height' value='250' />
<preference name='ui.shelf.height' value='250' />
</preferences>
<!--This is everything you need to know about datasources -->
@rogerallen
rogerallen / vihart_braid.clj
Last active December 18, 2015 15:19
Overtone Translation of Vi Hart's Sound Braid. See http://www.youtube.com/watch?v=VB6a4nI0BPA
;; Overtone Translation of Vi Hart's Sound Braid by Roger Allen
;; http://www.youtube.com/watch?v=VB6a4nI0BPA
;;
;; Listen to what this sounds like here: http://goo.gl/HSzgM
;;
(ns vihart-braid
(:require [overtone.live :as o]
[overtone.synth.stringed :as strings]
[leipzig.canon :as lc]
[leipzig.live :as ll]
@tavisrudd
tavisrudd / alphabet.txt
Created April 11, 2013 06:03
My dragonfly / natlink alphabet code words. I also have the standard NATO phonetic alphabet enabled (https://en.wikipedia.org/wiki/NATO_phonetic_alphabet).
Aff
Brav Bravo
Cai
Doy Delt Delta
Eck Echo
Fay
Goff
Hoop
Ish
Jo
@tavisrudd
tavisrudd / links.txt
Created March 23, 2013 04:55
some links related to my voice coding talk at #pycon
@heimbrg
heimbrg / problem_m4.tex
Created September 4, 2012 13:58
Latex (tikz) version of Problem M4
\documentclass{article}
\usepackage[latin1]{inputenc}
\usepackage{tikz}
\pagestyle{empty}
\begin{document}
\begin{tikzpicture}
\tikzstyle{every node}=[font=\footnotesize]