Skip to content

Instantly share code, notes, and snippets.

View Kienyew's full-sized avatar

Kienyew

  • Earth
View GitHub Profile
@Kienyew
Kienyew / dpll.py
Last active November 23, 2021 05:45
DPLL
from typing import Optional
from pprint import pprint
# A Literal is P or ¬P
class Literal:
@classmethod
def from_string(cls, s: str) -> 'Literal':
if s.startswith('-'):
return Literal(s[1:], True)
@Kienyew
Kienyew / PYTHONSTARTUP.py
Created October 31, 2020 13:57
My Interactive Python startup script
import os
import sys
import itertools
import collections
import subprocess
import random
import bisect
from math import *
from fractions import Fraction
from pathlib import Path
@Kienyew
Kienyew / bat.zsh
Created September 14, 2020 13:03
zsh bat completion
#compdef bat
local context state state_descr line
typeset -A opt_args
(( $+functions[_cache_subcommand] )) ||
_cache_subcommand() {
local -a args
args=(
'(-b --build -c --clear)'{-b,--build}'[Initialize or update the syntax/theme cache]'
@Kienyew
Kienyew / article-style.css
Last active July 14, 2020 09:39 — forked from bangedorrunt/article-style.css
GoldenDict Dark Theme
body
{
margin-top: 1px;
margin-right: 3px;
margin-left: 2px;
margin-bottom: 3px;
background: #201F1F;
color: white;
font-family: Bookerly, Segoe UI, Palatino Linotype, Arial Unicode MS;
}