8918 W 64th Pl, Apt 203 / Merriam, KS 66202
816-200-7301 / [email protected]
To obtain a position working with web technologies that leverages my skills,
8918 W 64th Pl, Apt 203 / Merriam, KS 66202
816-200-7301 / [email protected]
To obtain a position working with web technologies that leverages my skills,
| <?php | |
| /** | |
| * An example of how to use the `squarize()` function below. | |
| */ | |
| $path_input = 'input.png'; | |
| $path_output = 'output.png'; | |
| $thumb_w = 100; | |
| $thumb_h = 100; |
| <?php | |
| /** | |
| * Wrapper class for AtomicParsley for setting iTunes style meta data on MPEG-4 files. | |
| * | |
| * Dependencies: | |
| * - Bunsen <http://github.com/jnrbsn/bunsen> | |
| * - AtomicParsley <http://atomicparsley.sourceforge.net/> | |
| */ | |
| class AtomicParsley |
| <?php | |
| error_reporting(-1); | |
| set_time_limit(0); | |
| $host = '0.0.0.0'; | |
| $port = 12345; | |
| $max_clients = 10; | |
| // Create the socket. |
| <?php | |
| /** | |
| * Objected-oriented command line output library for PHP. | |
| * | |
| * Dependencies: | |
| * - Console_Color PEAR package | |
| * - Bash | |
| * | |
| * PHP version 5 | |
| * |
| try { Thread.sleep(5000); } catch (InterruptedException e) { e.printStackTrace(); } |
| import inspect | |
| def privatemethod(func): | |
| """decorator for making an instance method private""" | |
| def func_wrapper(*args, **kwargs): | |
| """decorator wrapper function""" | |
| outer_frame = inspect.stack()[1][0] | |
| if 'self' not in outer_frame.f_locals or outer_frame.f_locals['self'] is not args[0]: | |
| raise Exception('%s.%s is a private method' % (args[0].__class__.__name__, func.__name__)) | |
| func(*args, **kwargs) |
| sudo yum update | |
| sudo yum install python27 | |
| curl https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py | sudo /usr/bin/python27 | |
| sudo easy_install pip | |
| echo "alias python='python27'" >> ~/.bashrc | |
| source ~/.bashrc |
| import time | |
| from redis import StrictRedis, ConnectionError | |
| channels = ['test'] | |
| redis = StrictRedis() | |
| pubsub = redis.pubsub() | |
| pubsub.subscribe(channels) | |
| while True: | |
| try: | |
| for item in pubsub.listen(): |
| def degrees_to_direction(degrees): | |
| """Convert degrees to a compass direction.""" | |
| directions = [ | |
| 'N', 'NNE', 'NE', 'ENE', 'E', 'ESE', 'SE', 'SSE', | |
| 'S', 'SSW', 'SW', 'WSW', 'W', 'WNW', 'NW', 'NNW', | |
| ] | |
| return directions[int(round(float(degrees) / 22.5)) % 16] |