Skip to content

Instantly share code, notes, and snippets.

View eric-wieser's full-sized avatar

Eric Wieser eric-wieser

View GitHub Profile
import data.dfinsupp
import tactic
universes u v w
variables {ii : Type u} {jj : Type v} [decidable_eq ii] [decidable_eq jj]
variables (β : ii → jj → Type w) [Π i j, decidable_eq (β i j)]
variables [Π i j, has_zero (β i j)]
def to_fun (x : Π₀ (ij : ii × jj), β ij.1 ij.2) : Π₀ i, Π₀ j, β i j :=
@eric-wieser
eric-wieser / README.md
Last active August 29, 2015 14:27 — forked from anonymous/Legoline.md
Legoline work

Initial concepts

Option A - chain with pin holes

Special parts needed:

  • 57520 - small sprocket (3LU diam)
  • 57519 - large sprocket (5LU diam)
  • 57518 - chain tread (1.5LU pitch)

Want to fork your own gists? No fork button? No problem! Install this user script by clicking refork.user.js' "raw" link down below: ⇓

@eric-wieser
eric-wieser / Indent.tmPreferences
Created August 11, 2012 14:53 — forked from stravant/Indent.tmPreferences
Roblox Lua completion support for SublimeText
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Indent</string>
<key>scope</key>
<string>source.lua</string>
<key>settings</key>
<dict>
@eric-wieser
eric-wieser / 2.py
Created August 4, 2012 09:55 — forked from kragniz/2.py
A2S 2
#!/usr/bin/env python
import itertools
def f(a, b, c, d):
return a*b + b*c + c*d + a*d
print max(f(*p) for p in itertools.permutations([1,2,3,4]))
groups:
default:
default: true
permissions:
- modifyworld.*
- bukkit.broadcast.user
- group.default
- ultimatearena.player
- hcw.ban.world.world
@eric-wieser
eric-wieser / rename.sh
Created March 13, 2012 20:18 — forked from rabbidrabbit/rename.sh
Rewrites the SR repos history
#!/bin/bash
git filter-branch -f --tag-name-filter cat --env-filter '
an="$GIT_AUTHOR_NAME"
am="$GIT_AUTHOR_EMAIL"
cn="$GIT_COMMITTER_NAME"
cm="$GIT_COMMITTER_EMAIL"
case an in
@eric-wieser
eric-wieser / rename.sh
Created March 13, 2012 19:40 — forked from rabbidrabbit/rename.sh
Rewrites the SR repos history
#!/bin/bash
git filter-branch -f --tag-name-filter cat --env-filter '
an="$GIT_AUTHOR_NAME"
am="$GIT_AUTHOR_EMAIL"
cn="$GIT_COMMITTER_NAME"
cm="$GIT_COMMITTER_EMAIL"
if [ "$GIT_COMMITTER_NAME" = "ew3" ]
@eric-wieser
eric-wieser / alphabet-soup.py
Created January 24, 2012 18:16 — forked from eric-wieser/alphabet-soup.py
One-line solution for Alphabet Soup
inFile = open('alphabet.in')
outFile = open('alphabet.out', 'w')
print >> outFile, '\n'.join(
'Case #%d: %d' % (i + 1,
(lambda s, target: min(s.count(l) / target.count(l) for l in target))
(inFile.readline(), 'HACKERCUP')
) for i in xrange(int(inFile.readline()))
)
@eric-wieser
eric-wieser / alphabet-soup.py
Created January 24, 2012 08:54 — forked from eric-wieser/alphabet-soup.py
One-statement solution for Alphabet Soup
(lambda i, o:
o.write('\n'.join(
'Case #%d: %d' % (n + 1,
(lambda str, target: min(str.count(l) / target.count(l) for l in target))
(i.readline(), 'HACKERCUP')
) for n in xrange(int(i.readline()))
))
)(open('alphabet.in'), open('alphabet.out', 'w'))