http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world
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
| package main | |
| import ( | |
| "fmt" | |
| "sync" | |
| ) | |
| func main() { | |
| wg := &sync.WaitGroup{} |
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
| all: | |
| clang++ main.cpp -o main |
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
| # http://stackoverflow.com/questions/312443/how-do-you-split-a-list-into-evenly-sized-chunks-in-python | |
| def chunks(l, n): | |
| """ Yield successive n-sized chunks from l.""" | |
| for i in xrange(0, len(l), n): | |
| yield l[i:i+n] |
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 re | |
| def fix_column_name(column_name): | |
| temp = column_name.strip() | |
| temp = re.sub('[.,]', '', temp) | |
| temp = temp.replace(' ', '_') | |
| return temp.lower() |
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
| """ | |
| Parse reStructureText into Node Tree | |
| """ | |
| from docutils.parsers.rst import Parser | |
| from docutils.utils import new_document | |
| from docutils.frontend import OptionParser | |
| import logging |
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
| # Clean comma and lower case text | |
| cleanup <- function (text) { | |
| temp <- text | |
| # Clean up comma and period | |
| temp <- gsub('[,.! ]', '', temp) | |
| # To Lowercase | |
| temp <- tolower(temp) | |
| return(temp) |
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
| function AccountFactory(name) { | |
| function AccountClass(accountNumber) { | |
| this.accountNumber = accountNumber; | |
| } | |
| AccountClass.getClassName = function() { | |
| return name + 'Account'; | |
| }; | |
| return AccountClass; |
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
| [alias] | |
| lg = log --graph --pretty='%C(yellow)%h%Creset%C(blue)%d %Creset%C(white bold)%s %Creset%C(white dim)(by %cn %cr)' |
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
| # Compiled source # | |
| ################### | |
| *.com | |
| *.class | |
| *.dll | |
| *.exe | |
| *.o | |
| *.so | |
| # Packages # |
NewerOlder