This file contains 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 sys | |
import os | |
from os import listdir | |
from os.path import isfile, join | |
import codecs | |
import cgi | |
import sys | |
import xml |
This file contains 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
#resource: http://www.coreseek.cn/products-install/install_on_bsd_linux/ | |
#requirements: | |
# m4 >= 1.4.13 | |
# autoconf >= 2.65 | |
# automake >= 1.11 | |
# libtool >= 2.2.6b | |
wget http://www.coreseek.cn/uploads/csft/4.0/coreseek-4.1-beta.tar.gz | |
tar xzvf coreseek-4.1-beta.tar.gz |
This file contains 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 | |
# -*- coding: utf-8 -*- | |
import csv | |
d = {} | |
infil = open('lemma-freq.csv', 'r') | |
i = 0 | |
for rw in csv.reader(infil, delimiter = ';'): | |
key = rw[0] | |
value = rw[1] | |
d[key]= value |
This file contains 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 | |
# -*- coding: utf-8 -*- | |
import csv | |
d = {} | |
infil = open('lemma-freq.csv', 'r') | |
i = 0 | |
for rw in csv.reader(infil, delimiter = ';'): | |
key = rw[0] | |
value = rw[1] | |
d[key]= value |
This file contains 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 csv | |
writer = csv.writer(open("some.csv", "wb"), delimiter=':', quoting=csv.QUOTE_MINIMAL, \ | |
quotechar='`', lineterminator='|') | |
writer.writerows([ [1997, "Ford", "E350", "ac, abs, moon", "3000.00"], | |
[1999, "Chevy", "Venture `Extended Edition`", "", "4900.00"], | |
[1996, "Jeep", "Grand Cherokee", "air, moon roof, loaded MUST SELL!", "4799.00"] ]) |
This file contains 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 csv | |
reader = csv.reader(open("some.csv", "rb")) | |
for row in reader: | |
print row |
This file contains 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
sudo add-apt-repository ppa:webupd8team/sublime-text-2 | |
sudo apt-get update | |
sudo apt-get install sublime-text-2 |
This file contains 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
# Создание списков | |
List = [] # пустой список | |
List = [ 'hello', 5, [1,2,3] ] # список с вложенным списком | |
List[i] # индекс | |