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
$a=8;$G{int(++$a/9).$a%9+1}=$_ for split//,<>;@A=1..9;sub c{int(($_[0]-1 | |
)/3)*3}sub G{for$y(@A){for$x(@A){$p=$t=$G{my$c=$y.$x}&&next;$t.=$G{$_.$x | |
}.$G{$y.$_}for@A;for$f(1..3){$t.=$G{c($y)+$f.c($x)+$_}for 1..3}G($G{$c}= | |
$_)&&return for grep$t!~m/$_/,@A;return$G{$c}=0}}die map{$G{$_}}9..99}G |
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
<?xml version="1.0" encoding="utf-8"?> | |
<rss version="2.0" xmlns:itunes="http://www.itunes.com/DTDs/Podcast-1.0.dtd" xmlns:media="http://search.yahoo.com/mrss/"> | |
<channel> | |
<title>Captain Fatty Lives the High Life on the High Seas</title> | |
<description>Weekend Edition Sunday follows Captain Fatty Goodlander as he sails through Southeast Asia and talks about his life at sea and his philosophy of freedom and discovery.</description> | |
<link>http://www.npr.org/templates/story/story.php?storyId=90411144</link> | |
<itunes:image href="https://media.npr.org/programs/wesun/features/2008/may/fatty540-47c249204d6b6e9d473df4cb080a6b88262e97e4.jpg" /> | |
<pubDate>18 May 2008 00:01:00 EST</pubDate> | |
<language>en-us</language> | |
<copyright> 2017 NPR </copyright> |
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
use integer; | |
@A = split //, <>; | |
sub R { | |
for $i ( 0 .. 80 ) { | |
next if $A[$i]; | |
my %t = map { | |
$_ / 9 == $i / 9 | |
|| $_ % 9 == $i % 9 | |
|| $_ / 27 == $i / 27 && $_ % 9 / 3 == $i % 9 / 3 |
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
use integer;@A=split//,<>;sub R{for$i(0..80){next if$A[$i];my%t=map{$_/9 | |
==$i/9||$_%9==$i%9||$_/27==$i/27&&$_%9/3==$i%9/3?$A[$_]:0=>1}0..80;R($A[ | |
$i]=$_)for grep{!$t{$_}}1..9;return$A[$i]=0}die@A}R |
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
$a=8;$G{int(++$a/9).$a%9+1}=$_ for split//,<>;@A=1..9;sub c{int(($_[0]-1 | |
)/3)*3}sub G{for$y(@A){for$x(@A){$t=$G{my$c=$y.$x}&&next;$t.=$G{$_.$x}. | |
$G{$y.$_}for@A;for$f(1..3){$t.=$G{c($y)+$f.c($x)+$_}for 1..3}G($G{$c}=$_ | |
)for grep$t!~m/$_/,@A;return$G{$c}=0}}die map{$G{$_}||"\n"}9..100}G |
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
$a = 8; | |
$G{ int( ++$a / 9 ) . $a % 9 + 1 } = $_ for split //, <>; | |
@A = 1 .. 9; | |
sub c { | |
int( ( $_[0] - 1 ) / 3 ) * 3; | |
} | |
sub G { | |
for $y (@A) { |
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
wip.csv |
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 django.db import models | |
from autoslug import AutoSlugField | |
from pombola.core.models import Person | |
# TODO | |
# | |
# - add a source for the data, possibly as a field on the Release? | |
# - resolve how to differentiate between items that are one-offs (like gift to person) and ongoing (like employment or land ownership). Concern is that one-offs may get lost if only the latest release is shown, or duplicated if they are included in several releases. |
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
(pombola-virtualenv)mzalendo-staging@ajax:/data/vhost/za-pombola.staging.mysociety.org/pombola$ ./manage.py | |
...snip... | |
[za_hansard] | |
hansard_check_for_new_sources | |
hansard_load_into_sayit | |
hansard_run_parsing | |
pmg_scraper | |
questions | |
za_hansard_check_for_new_sources | |
za_hansard_load_into_sayit |
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
evdb@custard-2 ~ $ virtualenv .venv | |
New python executable in .venv/bin/python | |
Installing setuptools............done. | |
Installing pip...............done. | |
evdb@custard-2 ~ $ source .venv/bin/activate | |
(.venv)evdb@custard-2 ~ $ pip install scraperwiki |
NewerOlder