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
with open('http.txt') as f: | |
first_line = f.readline() | |
split_lines = first_line.split('http://') | |
with open('output.txt') as g: | |
for x in split_lines: | |
to_output = 'http://' + x + '\n' | |
g.write(to_output) |
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
# GLOBAL CONFIGURATIONS | |
# ------------------------------------------------------------------- | |
# See https://github.com/jigish/slate/wiki/Global-Configs | |
config defaultToCurrentScreen true | |
config secondsBeforeRepeat 0.4 | |
config secondsBetweenRepeat 0.1 | |
config keyboardLayout "qwerty" | |
config nudgePercentOf screenSize | |
config resizePercentOf screenSize |
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
(Pdb) master_cb | |
{'solar.Quote': [{'fx': 'solve', 'priority': 1}], 'system.System': [], 'system.Array': [{'fx': 'map_generation', 'priority': 10}]} | |
Extract callback and sort | |
res = [(k, x) for k,v in master_cb.items() for x in v] | |
res.sort(key=lambda x: x[1]['priority'], reverse=True) | |
(Pdb) res | |
[('system.Array', {'fx': 'map_generation', 'priority': 10}), ('solar.Quote', {'fx': 'solve', 'priority': 1})] |