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/python3 | |
import os | |
def bomberMan(n, grid): | |
# TODO Write your code here | |
if __name__ == '__main__': | |
fptr = open(os.environ['OUTPUT_PATH'], 'w') |
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
def miniMaxSum(arr): | |
# TODO Fill this in | |
if __name__ == '__main__': | |
arr = list(map(int, input().rstrip().split())) | |
miniMaxSum(arr) |
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 | |
export B2_ACCOUNT_ID=<your keyID here> | |
export B2_ACCOUNT_KEY=<your key here> | |
export RESTIC_PASSWORD=<your restic repository password here> | |
command1="restic -r b2:mybucket-desktop-backups:alfred/ backup /home/eric/Documents/ 2>&1" | |
output1=$(eval "${command1}") | |
result1=$? |
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
package ec.neat; | |
import ec.EvolutionState; | |
import ec.Statistics; | |
import ec.neat.NEATGene; |
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 xmltodict | |
def perseus_xml_to_text(path): | |
'''Manually load a work, because I don't know how to do it with CLTK (see https://github.com/cltk/cltk/issues/615).''' | |
with open(path) as f: | |
doc = xmltodict.parse(f.read()) | |
paragraphs = doc['TEI.2']['text']['body']['div1']['div2'] | |
return [perseus_get_paragraph(p['p']) for p in paragraphs] | |
def perseus_get_paragraph(p_root): |
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
from __future__ import print_function, unicode_literals | |
import codecs | |
# Use the c version of ElementTree, which is faster, if possible: | |
try: from xml.etree import cElementTree as ElementTree | |
except ImportError: from xml.etree import ElementTree | |
from six import string_types |