-
Create ~/.netrc with your WatIAM credentials to log into the SVN server
machine ecesvn.uwaterloo.ca login <USERNAME> password <PASSWORD> -
Set the correct permissions on ~/.netrc (Note: This won't save you from untrusted sysadmins on that box.)
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 | |
| if [[ `uname -s` == 'Darwin' ]]; then | |
| brew update | |
| brew install libtool autoconf automake | |
| else | |
| sudo apt-get update | |
| sudo apt-get install -y libtool autoconf automake uuid-dev git-core | |
| fi |
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
| In [1]: import socket | |
| In [2]: serversocket = socket.socket( | |
| socket.AF_INET, socket.SOCK_STREAM) | |
| In [3]: serversocket.bind(('0.0.0.0', 0)) | |
| In [4]: serversocket. | |
| serversocket.accept serversocket.getsockname serversocket.recvfrom_into | |
| serversocket.bind serversocket.getsockopt serversocket.send |
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
| <style> | |
| .ExternalClass{ | |
| width: 100%; | |
| } | |
| </style> | |
| <div align="center" style="width:100%;background-color:#EDEDED;color:#999"> | |
| <table style="font-size:12px;color:#999;width:690px;height:35px"> | |
| <tr> | |
| <td style="text-align: left"> | |
| 邮件显示有问题? 查看 |
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
| # -*- coding: utf-8 -*- | |
| import requests | |
| from urlparse import urlparse | |
| from flask import Flask | |
| from flask import Response | |
| from flask import request | |
| from flask import stream_with_context | |
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
| #! python | |
| ''' | |
| pip install pyobjc-core | |
| pip install pyobjc-framework-QTKit | |
| pip install pyautogui | |
| ''' | |
| import pyautogui, sys | |
| print('Press Ctrl-C to quit.') | |
| try: |
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 sys | |
| while 1: | |
| print str(i), | |
| print '\b'*(len(str(i)) + 2), | |
| i += 1 | |
| sys.stdout.flush() |
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
| # -*- coding: utf-8 -*- | |
| from math import ceil | |
| from flask import request | |
| from werkzeug.utils import cached_property | |
| class Pagination(object): | |
| def __init__(self, page, per_page, total, max_label_count=16): |
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
| #!/usr/bin/env python | |
| import sys, os, time, atexit | |
| from signal import SIGTERM | |
| class Daemon: | |
| """ | |
| A generic daemon class. | |
| Usage: subclass the Daemon class and override the run() method |
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
| class MetaClass(type): | |
| def __new__(mcls, classname, baseclasses, attrs): | |
| print '\nMetaClass.__new__ ------> ' | |
| print '-' * 40 | |
| print '\tmcls: %s:%s' % (mcls, type(mcls)) | |
| print '\tclassname: %s:%s' % (classname, type(classname)) | |
| print '\tbaseclasses: %s:%s' % (baseclasses, type(baseclasses)) | |
| print '\tattrs: %s:%s' % (attrs, type(attrs)) | |
| return type.__new__(mcls, classname, baseclasses, attrs) |