Search Results: "paultag"

31 March 2012

Paul Tagliamonte: Django + Git = ?

I d be interested in getting an instance set up of a Django powered Git project viewer (or rather, something between GitHub and viewgit) The ideal implementation would use something like dulwich, and be super snappy. If anyone feels like writing this, let me know. If something like this exists, please let me know even faster.

24 March 2012

Paul Tagliamonte: Software that doesn't suck volume 1

As many of you know, I m highly critical of most software. Anyone that s met me in person has most likely heard my all-too-common tirades on why software makes my life worse. I figured, since I m so hard, and I ve recently found some software I feel good about using, I d start another one of my ongoing series on software I don t hate, or rather, software I might actually say I like. Out of nothing but pure luck (the author followed me on twitter, so I ended up checking out his profile, finding some stuff I liked, and checked out his github), I came across Github Notifier, which works on Chrome, Firefox and Opera. This plugin shows the octocat on the toolbar, with a count of the unread GitHub notifications. Octocat 1 The GitHub API (both V2 and V3) don t have support for getting notification counts, so this plugin / extension works by scraping the notification page. I feel OK about this because the code is pretty minimal and clean. Here s it in use (on my machine) Octocat 2 Thanks, @sindresorhus!

22 March 2012

Paul Tagliamonte: Setting up uWSGI + nginx

I ve spent some time recently converting from using PHP to using Django for my web applications. As a result, I m migrating from apache2 (to be totally fair, it does have wsgi support, but I d rather re-design using the latest fad) to nginx and uWSGI. So, here s some notes to myself on setting it up again. Given
SRV="/srv/www/uwsgi"
DATA="$SRV/app/$APP"
SOCK="$SRV/sock/$APP.sock"
Invocation
exec uwsgi \
    --plugins python27 \
    --chdir   $DATA/.. \
    --socket  $SOCK \
    --chmod-socket \
    -wsgi ./$APP/django_wsgi.py
I wrote some tools to daemonize this, but I have a hunch daemontools might be better.

13 March 2012

Paul Tagliamonte: OpenStates Hackathon

The OpenStates / GASP hackathon here at PyCon is going killer. We ve got a bunch of brandy-new contributors hacking away, and sending in pull requests. We re squashing bugs like crazy, and it s going super well. Shout-out to all the new contributors!

7 March 2012

Paul Tagliamonte: I'm going to PyCon!

I ll be at PyCon with some of the Sunlight crew, and we ll be hosting a Hackathon after the talks. I hope anyone in the area will consider hacking with us this year. If you re going to PyCon, send me an email, tweet or other digital message - the talks this year look awesome!

2 March 2012

Paul Tagliamonte: Syn rewrite

I m thinking of rewriting Syn, but this time, with the lessons learned from Syn1, 2, and 3. While I don t want to rewrite it (again), it ll be a nice time to simplify the project, and give it a chance to actually function (well) as a LFS-esque package manager. Hopefully, this can be the final rewrite.

23 February 2012

Paul Tagliamonte: Intent to become a Debian Developer

Howdy! I d like to officially state (for the record) that it is my intent to apply to become a Debian Developer within the next $TIMEFRAME. Currently soliciting advice and opinions before nm.d.o comes back online :) It s a big step, but it s a natural one. Gametime?

4 February 2012

Paul Tagliamonte: Mapping the Ubuntu Community

In playing with some tools I ve run into at $work, I ve tried loading in some Ubuntu datasets in some fun and interesting ways. Today, I ve chosen to map all Ubuntu Members with a public lat/lon, sized by Karma. The sizes relate to if the Karma is greater then: 1: 10 2: 50 3: 100 4: 500 5: 1000 6: 2000 7: 7000 8: 15000 9: 25000 10: 50000 So, without further adieu, here re some maps! UK US EU EEU SA Globe

31 January 2012

Paul Tagliamonte: python-sunlight (or: get at some awesome US Political data programmatically)

I ve spent a few days during work, after work and on the weekend working on python-sunlight, a unified API implementation of a few Sunlight services. This is very unstable, and not released yet (so please don t rely on it yet), but it will be shortly. Be sure to sign up for an API Key, and dump the key to ~/.sunlight.key there s a simple script to help with some of this in bin/, but nothing solid yet. I do, however, encourage you to use it and play around with it, and report your bugs. Contributions (in the form of code) are also very welcome, so please do fork the project and play around with it. Just to give everyone a taste of how cool this is this will pull up a list of twitter IDs of people who mention free market more then anyone else according to the congressional record:
from sunlight import capitolwords
from sunlight import congress
for person in capitolwords.phrases_by_entity(
    "legislator",
    phrase="free market",
    sort="count",
):
    n = congress.legislators( bioguide_id=person['legislator'],
        all_legislators="true" )
    if len(n) >= 1:
        n = n[0]
        if n['twitter_id'] != "":
            print n['twitter_id']
And the output:
RepRonPaul
stevekingia
SenSherrodBrown
JacksonLeeTX18
SenatorLeahy
ChuckGrassley
SenJohnMcCain
OrrinHatch
DanaRohrabacher
JudgeTedPoe
McConnellPress
edtowns
SenatorDurbin
SenatorSessions
SenatorHarkin
SenChrisDodd
russfeingold
RosLehtinen
sencarllevin
senjonkyl
Dennis_Kucinich
senatorsanders
SenatorReid
RepDanBurton
RepMikePence
SenSamBrownback
joebiden
FrankPallone
ToddAkin
senatorboxer
RepTrentFranks
JohnCornyn
Have fun! Show off what cha got, and please let me know if you do something cool!

24 January 2012

Paul Tagliamonte: Hey look! Openstates data!

Sweet! npr s site is using some OpenStates data, the project I m currently working on at sunlight labs. If you feel like affecting change in US politics, and know Python, we could use some help (it s a F/OSS project!) over on github Keep being awesome!

20 January 2012

Paul Tagliamonte: Dual-screen setup with aligned bottom edges

For the sake of anyone else who s fighting their screens, I ve got a script that will do this (but very very slowly) setup script
xrandr --output VGA1  --auto
xrandr --output LVDS1 --auto
xrandr --output VGA1  --rotate left
eval " monconf "
monoconf script
#!/usr/bin/env python
import subprocess
output = subprocess.check_output(["/home/tag/.bin/mon.ls"])
output = [ item.split() for item in output.split("\n") ]
mons =  
for mon in output:
    if len(mon) > 0:
        if mon[1] == "connected":
            res=mon[2]
            res=res.split("x")
            for item in res[1].split("+"):
                res.append(item)
            res.pop(1)
            mons[mon[0]] = res
BOTTOM_LEFT = "LVDS1"
TOP_RIGHT="VGA1"
LEFT_WIDTH  = mons[BOTTOM_LEFT][0]
LEFT_HEIGHT = mons[BOTTOM_LEFT][1]
RIGHT_WIDTH  = mons[TOP_RIGHT][0]
RIGHT_HEIGHT = mons[TOP_RIGHT][1]
print "xrandr --output %s --pos 0x%s" % (
    BOTTOM_LEFT,
    (int(RIGHT_HEIGHT) - int(LEFT_HEIGHT)))
print "xrandr --output %s --pos %sx0" % (
    TOP_RIGHT,
    int(LEFT_WIDTH)
)
and the mon.ls command
xrandr -q   grep "^[^\ ].*"   grep -v Screen
All of this is super hacky, but it works.

12 January 2012

Paul Tagliamonte: json / vim love

Use vim? Check out some sweet vim exrc stuff for editing one-line JSON files:
autocmd BufRead,BufNewFile *.json set filetype=json
command Js silent %!jp
command Jc silent %!jcompress
autocmd FileType json Js
jcompress and jp are both on my github. Have fun!

28 December 2011

Paul Tagliamonte: libolla (from the useless script department)

Hello, World! Today s hacks come remotely, on the first day of my long trek to Cleveland. As many debian readers know, debian URLs are usually transmitted over IRC or email with some snappy abbreviations. Usually, you ll see something like:
Feel free to check out information about frob at wiki.d.o/Frob
or something like:
I have uploaded package bar onto mentors.d.n for review
What bugs me most about this is that I have to expand URLs by hand. Which is lame. Enter libolla (a fitting name as well as a graceful nod to my alma mater John Carroll University s crest). When LD_PRELOAD d, it ll intercept and expand calls to getaddrinfo transparently. It seems to work fine on SSH, and chrome (but I can t test well, since I m not on a real line). This was all hacked up in a few hours I had to spare, and without any sort of internet love, so I m willing to bet there are some bits that can be cleaned up (after all, the name of the blog is Peace, Love and C++ , not Peace, Love and C - I don t clam to be a c expert ;) ) So, feel free to fork the project on github (or as I can now do - http://g.c/paultag/libolla) Now, I just need to find a way to globally pre-load this for apps that I start in my DE. Should be easy enough fiddling with some env-var files.

28 November 2011

Paul Tagliamonte: Another post from the "Useless Script" department

A while back I wrote some nodejs that mish-moshed email and web 2.0 long-poll action into a very ugly, but fairly up-to-date showing of debian changes. That is over on my server here. The code s fairly simple, so I also wrote a python consumer here. Since it s so simple, I ve pasted it below, too. Feel free to use (but please not abuse) my server :)
#!/usr/bin/env python
import time
import urllib
import json
service = "http://pault.ag:8080/tail"
lastts  = 0
def loop():
        global lastts
        while True:
                f = urllib.urlopen("%s?since=%s" % (service, str(lastts)))
                msgs = json.loads(f.read())
                for x in msgs['messages']:
                        print x['text']
                        if lastts < x['timestamp']:
                                lastts = x['timestamp']
loop()

Next.

Previous.