This file contains 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
package lejos.nxt.addon; | |
import lejos.nxt.I2CPort; | |
import lejos.nxt.I2CSensor; | |
public class IRSeekerV2 | |
{ | |
public static enum Mode { | |
AC, DC | |
}; |
This file contains 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
[ | |
{"angle": 5, "pos": [0.08, 2.58], "date": "Thu 6"}, | |
{"angle": 5, "pos": [0.09, 2.40], "date": "Thu 6"}, | |
{"angle": 5, "pos": [0.10, 2.39], "date": "Thu 6"}, | |
{"angle": 5, "pos": [0.10, 2.49], "date": "Thu 6"}, | |
{"angle": 5, "pos": [0.10, 2.54], "date": "Thu 6"}, | |
{"angle": 5, "pos": [0.12, 2.49], "date": "Thu 6"}, | |
{"angle": 5, "pos": [0.12, 2.68], "date": "Thu 6"}, | |
{"angle": 5, "pos": [0.13, 2.62], "date": "Thu 6"}, | |
{"angle": 5, "pos": [0.13, 2.67], "date": "Thu 6"}, |
This file contains 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 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')) |
This file contains 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 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
t,n='HACKERCUP',input() | |
for i in range(n):s=raw_input();print'Case #%d: %d'%(i+1,min(s.count(l)/t.count(l) for l in t)) |
This file contains 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 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 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
from functools import wraps | |
#Create a class to house the methods | |
class fires(object): | |
@staticmethod | |
def whenCalled(event): | |
e = (lambda s: getattr(s, event)) if type(event) == str else (lambda s: event) | |
def decorator(f): | |
"""Fires the event before the function executes""" |
This file contains 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
set -g default-terminal "screen-256color" | |
#key bindings | |
#window splitting | |
unbind % | |
bind - split-window -v | |
bind \ split-window -h | |
#window resizing |
OlderNewer