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
| [ | |
| {'code': 'CL3281', | |
| 'desc': 'This module, designed for Level 2nd-4th year students (not necessarily majoring in Chinese Studies), deals with some problems not specified for attention under CL2280 or CL2281, requiring students to translate some literary works into Chinese and English respectively. Topics will include the relationship between contemporary translation theory and practice, the use of more specific semantic and cultural understanding of the text, as well as more complex formation of textual structures in the process of translation. Special attention will be paid to online resources for translators.', | |
| 'exam': {'date': '2012-04-23', 'time': 'PM'}, | |
| 'lecture_time_table': [ | |
| {'name': 'LECTURE Class [1]', | |
| 'sessions': [ | |
| {'day': 2, | |
| 'endtime': '1700', | |
| 'starttime': '1400' |
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
| { | |
| 'code': 'CH2223', | |
| 'mc': '4', | |
| 'name': 'Chinese Fiction', | |
| 'desc': 'This module is designed to acquaint students with the historical evolution and characteristics of ancient Chinese fiction. It covers different genres of the fictional narrative tradition, zhiguai, zhiren, Tang chuanqi short tale, huaben colloquial short story and full-length xiaoshuo. The course is open to students across the University with an interest in Chinese literary tradition and particularly in Chinese fiction.', | |
| 'exam': {'date': '2012-04-30', 'time': 'EVENING'}, | |
| 'lecture_time_table': [ | |
| {'name': 'LECTURE Class [1]', | |
| 'sessions': [ | |
| {'day': 3, |
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
| { | |
| "tutorial_time_table": [ | |
| {"name": "TUTORIAL Class [1]", | |
| "sessions": [ | |
| {"starttime": "1000", | |
| "endtime": "1200", | |
| "occurence": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], | |
| "day": 2, | |
| "location": "I3/3-47"} | |
| ]}, |
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
| cd $HOME | |
| mkdir -p bin lib/python2.6 src tmp | |
| cat > ~/.pydistutils.cfg << EOF | |
| [build_ext] | |
| include_dirs=$HOME/include | |
| library_dirs=$HOME/lib | |
| EOF | |
| export PATH=$HOME/bin:$PATH | |
| export TEMP=$HOME/tmp | |
| export LD_LIBRARY_PATH=$HOME/lib:$LD_LIBRARY_PATH |
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
| [program:mongodb] | |
| directory=/home/username/webapps/appname | |
| command=/home/username/webapps/mongodb-appname/mongodb-linux-i686-2.0.1/bin/mongod --dbpath /home/username/webapps/mongodb-appname/data --logpath /home/username/webapps/mongodb-appname/log/corsdb.log --logappend --port 34006 |
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
| 2012-01-08 06:11:50-0600 [cors] DEBUG: Crawled (200) <GET https://aces01.nus.edu.sg/cors/jsp/report/ModuleDetailedInfo.jsp?acad_y=2011%2F2012&mod_c=ID1223&sem_c=2> (referer: https://aces01.nus.edu.sg/cors/jsp/report/ModuleInfoListing.jsp) | |
| 2012-01-08 06:11:50-0600 [cors] DEBUG: Scraped from <200 https://aces01.nus.edu.sg/cors/jsp/report/ModuleDetailedInfo.jsp?acad_y=2011%2F2012&mod_c=ID1223&sem_c=2> | |
| {'code': u'ID1223', | |
| 'desc': 'This module serves to introduce students to the development of thoughts and ideas in industrial and product design. It will enable students to relate recent history in technological advancement and product development to current trends in design. The module will concentrate on the design innovations from the period of the industrial revolution in the 19th century. This was the transitional period from the Arts and Craft movement to the current design and production methods that are dominated by industrial processes.', | |
| 'exam': {'date': '2012-05-02', 'time': u'PM'}, | |
| 'lecture_time_t |
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 | |
| import tweepy | |
| auth1 = tweepy.auth.OAuthHandler('TRiKhYeNtbNpYFFP2IzLNw','L4oxb6sYbO0xnNDPfvb2YzyhssZX3PavKibt8enkuU') #Replace 'Consumer Key' and 'Consumer Secret' with required authorization keys | |
| auth1.set_access_token('391314557-6dCHNYx6jud1MsHY9zr4taBM31RUAVthsFO2ondw','50mDNQfei6gVTatuZYY1uskNvvtBHR2X8MwCggl7Dw') #Key 'Access Token' and 'Access Token Secret' with required authorization keys | |
| api = tweepy.API(auth1) | |
| class StreamListener(tweepy.StreamListener): | |
| def on_status(self, status): | |
| print 'blah' | |
| try: | |
| tweet = status.text |
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 "os" | |
| // filepath is a string containing the filepath (no duh) | |
| // os.O_RDWR = read write flag, //os.O_CREATE = create if file not exist flag | |
| fl, flErr := os.OpenFile(filepath, os.O_RDWR|os.O_CREATE, 0666) | |
| if flErr != nil { | |
| fmt.Println("File write error:", flErr) | |
| } | |
| defer fl.Close() | |
| // for a string named output, write it |
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
| def escape_string(self, string): | |
| """Exposes the MySQL escape_string function | |
| Escapes the given string for saving into the db | |
| """ | |
| import MySQLdb | |
| return MySQLdb.escape_string(string) |
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 | |
| """Use Twitter's streaming API to grab tweets. | |
| Requires the tweetstream lib as a dependency | |
| """ | |
| import tweetstream | |
| from sgbeat.database import Connection | |
| from details import ( | |
| USERNAME, | |
| PASSWORD, |