Skip to content

Instantly share code, notes, and snippets.

View Demeter's full-sized avatar

demeter Demeter

  • Phoenix Arizona
  • 07:03 (UTC -07:00)
View GitHub Profile
@shanselman
shanselman / gist:5422230
Last active March 28, 2024 10:33
Evil Blog Comment Spammer just exposed his template through some error and the whole thing showed up in my comments.
{
{I have|I've} been {surfing|browsing} online more than {three|3|2|4} hours today, yet I never found any interesting article like yours. {It's|It
is} pretty worth enough for me. {In my opinion|Personally|In my view}, if all {webmasters|site owners|website owners|web owners} and bloggers made good content as
you did, the {internet|net|web} will be {much more|a lot more}
useful than ever before.|
I {couldn't|could not} {resist|refrain from} commenting. {Very well|Perfectly|Well|Exceptionally well} written!|
{I will|I'll} {right away|immediately} {take hold of|grab|clutch|grasp|seize|snatch}
your {rss|rss feed} as I {can not|can't} {in finding|find|to find} your {email|e-mail} subscription {link|hyperlink} or {newsletter|e-newsletter} service. Do {you have|you've} any?
{Please|Kindly} {allow|permit|let} me {realize|recognize|understand|recognise|know} {so that|in order that} I {may just|may|could} subscribe.
Thanks.|
@audreyt
audreyt / posa.mkdn
Last active October 12, 2021 01:06
EtherCalc Chapter for the upcoming book "The Performance of Open Source Applications" - Draft - comments welcome!

From SocialCalc to EtherCalc

Previously, in The Architecture of Open Source Applications, I described SocialCalc, an in-browser spreadsheet system that replaced the server-centric WikiCalc architecture. SocialCalc performs all of its computations in the browser; it uses the server only for loading and saving spreadsheets.

For the Socialtext team, performance was the primary goal behind SocialCalc's design in 2006. The key observation was this: Client-side computation in JavaScript, while an order of magnitude slower than server-side computation in Perl, was still much faster than the network latency incurred during AJAX roundtrips:


WikiCalc and SocialCalc's performance model

******
@jaredwoodard
jaredwoodard / CBOE_csv_to_xts
Created October 19, 2012 01:57
pulls csv files from the CBOE and converts them to xts
library("quantmod")
# we're pulling the Google VIX index (VXGOG) but this also works for VXAPL, VXGS etc.
# see http://www.cboe.com/micro/equityvix/introduction.aspx
url <- "http://www.cboe.com/publish/ScheduledTask/mktdata/datahouse/VXGOGDailyPrices.csv"
symb = read.csv(url,header=FALSE, stringsAsFactors=F)
symb <- symb[-1,]
colnames(symb) <- c(symb[1,])
symb <- symb[-1,]
@LeFreq
LeFreq / Python3000
Last active October 11, 2015 07:58
The real Python 3000
This is a start for an examination of Python and its evolution. More specifically, it looks at the issue of what was called Python3000 (Python3k) and how well the release of Python3 lived up to its hopes and vision. (For more detail see Ward's Wiki at the WikiWikiWeb).
I think many have not migrated over to python3 because there was a feeling of being let down with the possibilities of re-structuring Python for its famed 3000 release. This gist is a place holder for all issues that I know relating to a fully satisfying Python 3000 that keeps to the spirit of the Python community and continues the path of elegance.
Without knowing, Python (and the computer programming domain, in general) has been evolving into a Unified Information Model. In hindsight, this seems a natural trajectory within the field of Computer Science towards simplification of data handling and ease of use. Elegance has become the keyword for programmers in the Programming and Open Source community and I think Python is the language w
@joyita
joyita / gist:3736164
Created September 17, 2012 08:24
PhraseTokensier
package uk.co.fues.submission.classifier.nlp;
import java.util.ArrayList;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import opennlp.tools.cmdline.parser.ParserTool;
import opennlp.tools.parser.Parse;
@joyita
joyita / gist:3610899
Created September 3, 2012 17:07
Parsing spam
private static Set<String> removeRepeatedSentances(String text) {
String [] paras = text.split("\n+");
List<String> paragraphs = Arrays.asList(paras);
for(int i = 0; i<paragraphs.size(); i++) {
String paragraph = paragraphs.get(i);
paragraphs.set(i, clearWhitespace(paragraph));
}
Set<String> ret = new HashSet<String>();
for(String para:paragraphs) {
ret.add(para);
(def rand-string (n)
(let c "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
(with (nc 62 s (newstring n) i 0)
(w/infile str "/dev/urandom"
(while (< i n)
(let x (readb str)
(unless (> x 247)
(= (s i) (c (mod x nc)))
(++ i)))))
s)))
@schlamar
schlamar / gist:2993700
Last active September 23, 2016 20:55
urllib2 HTTPS connection with proxy and cert verification
import httplib
import urllib2
import ssl
import certifi
from backports.ssl_match_hostname import match_hostname
class CertValidatingHTTPSConnection(httplib.HTTPConnection):
default_port = httplib.HTTPS_PORT
@paulmillr
paulmillr / active.md
Last active May 15, 2024 02:25
Most active GitHub users (by contributions). http://twitter.com/paulmillr

Most active GitHub users (git.io/top)

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 21 Sep 2022 till Thu, 21 Sep 2023.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

githubUsers
 .filter(user =&gt; user.followers &gt; 1000)
@jlatt
jlatt / gist:2504275
Created April 26, 2012 23:56
Sex Porn

Sex Porn is the foundation of Sex Pics. When men are looking for Sex Pics, they inevitably have to Deal with Sex Porn. Laura's Sex Porn had slimy sex with sexage pussy and gardners is little sex that the butt thinks is furry on Sex Porn. Sex Pics is the ultimate goal of hardcore. Once you have Dealt with the Sex Porn, you can proceed to the Sex Pics. Example. Pamela went to the Sex Pics pics and saw hardcore pics full of blowjobs and cumshots. The Sex Pics too much for her huge tits to handle. You must have your reasons for wanting Sex Porn. I went to the store to look for Sex Porn. I only found Sex Pics. Cheerleaders, blowjobs, and cumshots lined the shelves. I pulled down a can of wet pussy. Hardcore sexagers surrounded the young pussy pics. sexs with dildos rushed to rub the can of smelly pussy. I grabbed the huge tits, and watched them partake in blowjobs and cumshots. Luckily my sex slut was with me and grabbed the cheerleader pussy, Sex Porn, wet pussy, and Sex Pics. Celebs grabbed my hairy pussy and to