Skip to content

Instantly share code, notes, and snippets.

View zagfai's full-sized avatar
🐢

Zach zagfai

🐢
View GitHub Profile
@zagfai
zagfai / MyBot.py
Created December 24, 2011 09:27
My BOT which got the 800th place in the Ants ( AI Challenge ). Have fun.
#!/usr/bin/env python
import math
import heapq
from ants import *
class MyBot:
def __init__(self):
pass
def do_setup(self, ants):
@zagfai
zagfai / py-non-blocking-input
Created September 25, 2013 05:58
python non blocking input
#!/usr/bin/python
# -*- coding: utf-8 -*-
""" python non blocking input
"""
__author__ = 'Zagfai'
__version__= '2013-09-13'
import sys
import select
from time import sleep
@zagfai
zagfai / centpy.sh
Last active August 29, 2015 13:56
CentOS release 6.3 (Final) INSTALL python 2.7 env including pip mysqldb and do the links.
#!/bin/bash
# system packages =============================================================
yum -y install python-devel openssl openssl-devel gcc sqlite sqlite-devel mysql-devel libxml2-devel libxslt-devel
# Python ======================================================================
wget http://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz
tar -xzf Python-2.7.6.tgz
cd Python-2.7.6
./configure --prefix=/usr/local/python2.7 --with-threads --enable-shared