Special parts needed:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 := |
Want to fork your own gists? No fork button? No problem! Install this user script by clicking refork.user.js' "raw" link down below: ⇓
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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])) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
groups: | |
default: | |
default: true | |
permissions: | |
- modifyworld.* | |
- bukkit.broadcast.user | |
- group.default | |
- ultimatearena.player | |
- hcw.ban.world.world |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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())) | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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')) |
NewerOlder