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
<?php | |
/* Merge multiple RSS feeds with SimplePie | |
* | |
* Just modify the path to SimplePie and | |
* modify the $feeds array with the feeds you want | |
* | |
* You should probably also change the channel title, link and description, | |
* plus I added a CC license you may not want | |
* | |
* Help from: http://www.webmaster-source.com/2007/08/06/merging-rss-feeds-with-simplepie/ |
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
# recursively replace text in all files with a certain file ending | |
find . -type f -iname '*.html' -exec sed -i 's,href="../css/stylesheet.css",href="../../css/stylesheet.css",g' {} + | |
# download Springer Link Books via University Proxy and add the ".pdf" file ending | |
export http_proxy="http://proxy.zfn.uni-bremen.de:3128"; | |
wget -r -l 1 --reject html,js,css,jpg,png --proxy-user STUD_IP_USERNAME --proxy-passwd STUD_IP_PASSWORD LINK_TO_BOOK; |
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 Cheetah.Filters | |
class UnicodeHarder(Cheetah.Filters.Filter): | |
def filter(self, val, | |
encoding='utf8', | |
str=str, | |
**kw): | |
""" Try our best to unicode our strings """ | |
if not val: | |
return u'' |
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
from sklearn.datasets import load_svmlight_file | |
from sklearn.naive_bayes import MultinomialNB | |
from sklearn.svm.sparse import LinearSVC | |
from sklearn.cross_validation import StratifiedKFold | |
from sklearn import metrics | |
import numpy as np | |
X, y = load_svmlight_file("fr.vec") | |
y[y == -1] = 0 | |
kf = StratifiedKFold(y, k = 10, indices=True) |
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
angular.module('app.resources', ['ngResource']) | |
.factory('api', function ($resource) { | |
var api = { | |
defaultConfig : {id: '@id'}, | |
extraMethods: { | |
'update' : { | |
method: 'PUT' | |
} |