Skip to content

Instantly share code, notes, and snippets.

View ryszard's full-sized avatar

Ric (Ryszard) Szopa ryszard

View GitHub Profile
The existence of moral conflicts as an argument against cognitivism
==========
Introduction
I'll try to avoid logical formalism at all costs as I believe that in
this case it neither contributes to the clarity of the discourse nor
is interesting from the logical point of view.
Process: MacBlip [92683]
Path: /Users/ryszard/Downloads/MacBlip.app/Contents/MacOS/MacBlip
Identifier: net.psionides.MacBlip
Version: ??? (0.1)
Code Type: X86-64 (Native)
Parent Process: launchd [195]
Date/Time: 2010-02-25 13:39:40.559 +0100
OS Version: Mac OS X 10.6.2 (10C540)
Report Version: 6
script type="text/javascript">
window.parent.callback()
</script>
<h1>It works</h1>
from ngrams import Ngrams, CharNgrams
def distance(left, right):
season = abs(int(left.get('season') or 0) - int(right.get('season') or 0))
number = abs(int(left.get('number') or 0) - int(right.get('number') or 0))
title = 1 - (CharNgrams(left.get('title', '')) * CharNgrams(right.get('title', '')))
#description = 1 - (Ngrams(left.get('description', '')) * Ngrams(right.get('description', '')))
return season * 5 + number * 5 + title * 15# + description * 10
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
</head>
<body>
<script type="text/javascript">
$(document).ready(function() {
$.getJSON('http://adhoc.setjam.com/api/subscriptions/title/battlestar-galactica-2?callback=?', console.log)
})
</script>
{'agents.adultswim.agent.AdultSwimAgent': 'adult-swim',
'agents.amazon_dvd.agent.AmazonDVDAgent': 'amazon',
'agents.amazon_vod.agent.AmazonVodAgent': 'amazon',
'agents.cartoonnetwork.agent.CartoonNetworkAgent': 'cartoon-network',
'agents.cbs_xml.agent.CBSXmlAgent': 'cbs',
'agents.comedy_central.agent.ComedyCentralAgent': 'comedy-central',
'agents.crunchyroll.agent.CrunchyrollAgent': 'crunchy-roll',
'agents.cwtv.agent.CWTVAgent': 'cwtv',
'agents.disney.agent.DisneyAgent': 'disney',
'agents.fxnetworks.agent.FXNetworksAgent': 'fxnetworks',
--- a/setjam/__init__.py
+++ b/setjam/__init__.py
@@ -26,6 +26,7 @@ logging.handlers.SysLogHandler.priority_map['START'] = 'notice'
# access - impossible in ini file without deep magic)
logger = logging.getLogger("setjam")
root_logger = logging.getLogger('')
+timer_logger = logging.getLogger('setjam.classification.timer')
default_formatter = root_logger.handlers[0].formatter
def _setting(name, default):
(ryszard franklin):~/tmp/leiningen% lein
Downloading Leiningen now...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 6468k 100 6468k 0 0 1076k 0 0:00:06 0:00:06 --:--:-- 1241k
java.io.FileNotFoundException: Could not locate leiningen/core__init.class or leiningen/core.clj on classpath: (NO_SOURCE_FILE:0)
at clojure.lang.Compiler.eval(Compiler.java:4186)
at clojure.core$eval__3818.invoke(core.clj:1635)
at clojure.main$eval_opt__5584.invoke(main.clj:181)
at clojure.main$initialize__5591.invoke(main.clj:200)
lein plugin install swank-clojure 1.4.0
$ cd .emacs.d
$ wget https://raw.github.com/technomancy/slime/master/contrib/swank-c-p-c.lisp