Skip to content

Instantly share code, notes, and snippets.

<?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/
# 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;
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''
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)
@pedrokoblitz
pedrokoblitz / resources.js
Created April 19, 2016 20:53 — forked from brucecoddington/resources.js
Wrapping $resource with api and data services.
angular.module('app.resources', ['ngResource'])
.factory('api', function ($resource) {
var api = {
defaultConfig : {id: '@id'},
extraMethods: {
'update' : {
method: 'PUT'
}