Search Results: "Paul Tagliamonte"

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()

30 June 2011

Rapha&#235;l Hertzog: How to start contributing to Debian?

I often get requests of persons who would like to contribute to Debian but who don t know where to start. Let s try to answer this question properly so that I can give out this URL the next time that I am asked. The Debian website has a page explaining how to help Debian. While it provides no less than 10 suggestions in a daunting text-only list, it s difficult to know what to do next once you picked up something that you could do. I will try to fix this by providing concrete information for each cases in upcoming articles but in the mean time I propose you another approach to start with. Before answering your question ( what can I do for Debian ), we need to know some information about you. What motivates you? You re a volunteer, you re not doing stuff for Debian because someone told you so. You must have some intrinsic motivation and the ultimate motivation is usually that you re enjoying what you re doing. So what are you enjoying and/or what are your motivations ? On the opposite, make sure to know what you hate and what you want to stay far away from. Maybe you dislike a programming language so much that you don t want to be involved in a project where you would have to use it, etc. Write down the answers to the questions, you might need them later when you ll ask other Debian contributors how you can help. What are your skills? If you re not interested in learning new skills, then you must obviously select a task where your current skills are sufficient. Again make a list of your skills and in particular of skills that you d like to practice! Here s a non-exhaustive list of skills to consider: How much time can you spend on Debian? This is the last important information that you need to communicate whenever you re asking someone else what you could do for Debian. There s no point giving you a big task if you can only spend 30 minutes every week. On the opposite if you can work on Debian full time during a week (because you re between 2 contracts or because you re in vacation), it s equally important to know. In general contributing to Debian requires time, you should be ready to spend at least several hours per week and possibly more at the start while you re learning everything. Find something to do At this point you have a generic idea of what you d like to do but you re still missing a concrete objective. Let s try to find one, we ll explore several ways to do this. Scratch your itch The best objectives are those that satisfy your own needs. Here are some examples: If you re a good Debian citizen, you have already filed bugs for issues that bugged you. Then you can browse http://bugs.debian.org/from:hertzog@debian.org to find out some ideas of stuff to do (obviously replace hertzog@debian.org by your own email address). Join a team If you don t have a specific itch to scratch, you might want to focus your work on a specific team. Head over to wiki.debian.org/Teams and browse the list of teams. You ll surely find one that works in an area that you like. If you select a packaging team, pick one that works on packages that you re actually using. Some of the teams have instructions for newcomers, follow them when that is the case. Otherwise join the mailing list and the IRC channel, and get a feel of how the team works. See if it suits you, you can follow several teams at the same time and pick the one that you prefer after a few days/weeks. Once you have lurked a bit, if you still don t know how you could help, then just ask on the mailing list. Include all the answers you have collected to the 3 questions on your motivations, your skills and your time available. Focus on a specific package You can concentrate your work on a specific package even if you re in a team, it s often a good idea. But I list it separately because not all packages are team maintained and you might want to help maintain a package where there s a single maintainer currently. I leave it up to you to find a way to select a package that interests you Then head over to the package tracking system: http://packages.qa.debian.org/dpkg (replace dpkg by the name of the package that interests you) Fill in the form in the bottom-left corner with your email and select opts in the drop-down list, then click go . You get a new form where you can select the information that you ll receive, I recommend you to keep everything except upload-binary and to validate the form. From now on, you get the same mails than the maintainer (and a bit more actually), and it s a good idea to inform the maintainer that you subscribed and that you re going to help a bit. Maybe he s willing to grant you commit rights immediately, maybe he will ask you to send patches for a start. The important thing is to create a good relationship. In any case (even if you did not get any answer from the maintainer), you should be free to help triage existing bugs and to help deal with the flow of incoming bugs (including forwarding bugs when appropriate). Help a Debian developer Paul Tagliamonte once blogged Hey, DDs, need help?. He offered his help to overworked Debian developers . His post was missing all the information required (cf motivations/skills/time) but the approach is a good one. The best way to start contributing is to work with existing Debian developers. Even if you just want to be sponsored for your own pet package, you should consider that mentoring is a burden for many Debian developers and that you re more likely to get a sponsor if you have an existing relationship with a Debian developer that you helped. Pick a developer that works in an area that is of interest, and offer him your help. To simplify things even further, I have created a wiki page where you can find out how you can help me and thus build a relationship with me. That s it for now, I hope this article will help you to start contributing. Don t forget to subscribe to my newsletter to not miss future articles for new contributors. Note that you can refer to this article with the following URL: http://raphaelhertzog.com/go/contributing/ (easier to type and remember).

13 comments Liked this article? Click here. My blog is Flattr-enabled.

Next.

Previous.