I hereby claim:
- I am quad on github.
- I am quad (https://keybase.io/quad) on keybase.
- I have a public key ASBxDFR1P5fGthosSBX-iUd18uAFSCpNZdqCY0yE0QaPvQo
To claim this, I am signing this object:
OPERATORS = "+-" | |
def simplify_parens(expr): | |
""" | |
Remove all unnecessary parenthesis for a simple algebra-like string. It maintains the brackets, so any operator can be swapped for any other and the resulting expression will have the same results before and after parenthesis reduction. | |
>>> simplify_parens('a') | |
'a' | |
>>> simplify_parens('a + b') |
tgray: tgray.c | |
clang -g -std=c11 -Wall -framework ApplicationServices $^ -o $@ |
CFLAGS=-Wall -Wextra -Werror -std=c99 -O | |
all: cycle | |
./cycle | |
cycle: cycle.c |
I hereby claim:
To claim this, I am signing this object:
<html> | |
<meta charset="utf-8" /> | |
<style> | |
body { background-color: white; margin: auto; text-align: center; } | |
p { writing-mode: vertical-rl; } | |
span { font-size: 3vh; } | |
#off { color: white }; | |
</style> |
import datetime | |
import enum | |
import re | |
import sys | |
import types | |
from collections import namedtuple | |
from decimal import Decimal | |
from operator import attrgetter |
import typing | |
import unittest | |
class TreeNode: | |
def __init__(self, left=None, right=None): | |
self.left = left | |
self.right = right | |
def is_superbalanced(self): |
class Thing < Struct.new(:color) | |
@@things = {} | |
def self.parse description | |
type_name, color = description.split | |
@@things[type_name].new color | |
end | |
def self.type_code code | |
@@things[code] = self |
require 'date' | |
require 'minitest/autorun' | |
class Time | |
def self.normalize time | |
dt = DateTime.parse(time).to_time.utc | |
Time.utc(Time.now.year, nil, nil, dt.hour, dt.min) | |
end | |
def inbetween start_time, end_time |
# -*- coding: utf-8 -*- | |
# Welcome to the Chinese Support Add-on's field edition ruleset. | |
# Here, you can tweak the note editor helper's behavior to your liking. | |
# | |
# If you messed things up, you can safely delete file | |
# addons/chinese/edit_behavior.py from your Anki directory. | |
# It will be recreated the next time you restart Anki. | |
# | |
# You can read about all available functions at: | |
# https://github.com/ttempe/chinese-support-addon/wiki/Edit-behavior |