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 flask import Flask | |
import os | |
import threading | |
app = Flask(__name__) | |
@app.route('/') | |
def root(): | |
folder_contents = "" | |
for node in os.listdir(os.environ.get('HOME')): |
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
# -*- coding: utf-8 -*- | |
from __future__ import print_function | |
import hashlib | |
class City(object): | |
""" This is the Foo object | |
""" | |
def __init__(self, name, population): | |
self._name = name |
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
# -*- coding: utf-8 -*- | |
""" This module gives a shit about encoding. """ | |
from __future__ import print_function | |
import sys | |
if __name__ == '__main__': | |
print('---------------------------') | |
print('| Unicode Analysis Script |') | |
print('---------------------------') |
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
def list_join(sep, items): | |
""" method wrapper for str.join alternative. | |
>>> foo = ['foo', 'bar', 'baz'] | |
>>> sep = "," | |
>>> sep.join(foo) | |
'foo,bar,baz' | |
>>> list_join(',', foo) | |
'foo,bar,baz' | |
""" | |
return reduce(lambda x, y: '%s%s%s' % (x, sep, y), items) |
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 | |
FOLDERS=`find "$1" -maxdepth 1 -type d ! -path "$1" | sed "s|^"$1"/||"` | |
for i in $FOLDERS; do | |
printf "\e[34m$1/$i\e[0m\n" | |
cd "./$1/$i" | |
git pull | |
cd ../.. | |
done |
NewerOlder