[tog] Help with Python Programming?!

Alastair Langwell sonofbelial at gmail.com
Wed Dec 5 23:15:46 GMT 2012


Hi All,

I'm currently working on a program, and right now I'm having some
serious problems with it. I'm hoping someone could take the time to
point me in the right direction (without writing the whole code for me)
and can help out?

Essentially I need to take a CSV file involving daily stock prices for
Google over the last few years. My program is to run through the CSV,
calculate the monthly average price for Google and tell us the best and
worst six-month period for Google.

The data-set is at the following Dropbox URL:
https://www.dropbox.com/s/sz885fohzzj7fga/googlePrices.csv

My code, such as it is so far, and of which I have a few versions is at
the following PasteBin:
http://pastebin.com/kKmanWqz

After this I'm a little hazy on what I'm doing, how to parse out
columns, exactly what I'm doing with tuples etc.?

Any help at all would be very much appreciated!

Thanks,

Alastair

On Mon, 2012-12-03 at 12:00 +0000, tog-request at lists.tog.ie wrote:
> Send tog mailing list submissions to
> 	tog at lists.tog.ie
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	https://lists.tog.ie/mailman/listinfo/tog
> or, via email, send a message with subject or body 'help' to
> 	tog-request at lists.tog.ie
> 
> You can reach the person managing the list at
> 	tog-owner at lists.tog.ie
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of tog digest..."
> 
> 
> Today's Topics:
> 
>    1. OpenWRT workshop, anyone? (Christian Gagneraud)
>    2. Re: OpenWRT workshop, anyone? (Daniel Cussen)
>    3. Re: OpenWRT workshop, anyone? (Schrodinger)
>    4. TOG Activities December 3rd to December 9th (Jeffrey Roe)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Sun, 02 Dec 2012 20:12:42 +0000
> From: Christian Gagneraud <chgans at gna.org>
> To: tog at lists.tog.ie
> Subject: [tog] OpenWRT workshop, anyone?
> Message-ID: <50BBB63A.7070904 at gna.org>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> 
> Hi,
> 
> Is anyone interested in an OpenWRT[1] workshop? If so, then I would like 
> to lead a workshop to help people get OpenWRT on their routers.
> I've heard that some people form the Dublin Linux User Group woukld be 
> interested.
> 
> Please bear in mind, that you can brick your router by doing so, and 
> that in no event shall I be liable for any direct or indirect damage of 
> your device(s).
> 
> I would bring myself am Alpha Networks R36, a Linksys WRT54G2-V1 and/or 
> a Linksys WAG354G-V2. They all run stock firmware and I would update 
> them with OpenWRT and offer them to TOG.
> 
> Updating your router usually requires some basic hardware hacking 
> (usually it is as simple as soldering a RS232 transceiver), so you will 
> need a soldering iron, a TTL-RS232 transceiver and a RS232/USB converter.
> 
> To know if your router is supported, simply google OpenWRT with the 
> manufacturer name of your router and it's model number, like "OpenWRT 
> Linksys WRT54G2 V1"
> 
> Chris.
> 
> [1] https://openwrt.org/
> OpenWRT is an alternative and open source firmware for wireless/ADSL 
> routers.
> Quote from there web page:
> "Instead of trying to create a single, static firmware, OpenWrt provides 
> a fully writable filesystem with package management. This frees you from 
> the application selection and configuration provided by the vendor and 
> allows you to customize the device through the use of packages to suit 
> any application. For developer, OpenWrt is the framework to build an 
> application without having to build a complete firmware around it; for 
> users this means the ability for full customization, to use the device 
> in ways never envisioned."
> 
> 
> -- 
> Chris
> 
> 
> 
> ------------------------------
> 
> Message: 2
> Date: Mon, 3 Dec 2012 09:07:52 +0000
> From: Daniel Cussen <dan at post.com>
> Cc: tog at lists.tog.ie
> Subject: Re: [tog] OpenWRT workshop, anyone?
> Message-ID:
> 	<CAF3DnKhJnBRzX5BwnpJSXH2Hj6nb-APB-=wbPARbeZ1jdsoFtg at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
> 
> I would be interested.
> 
> I have used DDWRT, OPENWRT and TOMATO firmware on routers. I have a
> compatable spare router in the space at the moment.
> 
> Have a check of the calendar and see what dates suit you.
> 
> Daniel
> 
> On 02/12/2012, Christian Gagneraud <chgans at gna.org> wrote:
> > Hi,
> >
> > Is anyone interested in an OpenWRT[1] workshop? If so, then I would like
> > to lead a workshop to help people get OpenWRT on their routers.
> > I've heard that some people form the Dublin Linux User Group woukld be
> > interested.
> >
> > Please bear in mind, that you can brick your router by doing so, and
> > that in no event shall I be liable for any direct or indirect damage of
> > your device(s).
> >
> > I would bring myself am Alpha Networks R36, a Linksys WRT54G2-V1 and/or
> > a Linksys WAG354G-V2. They all run stock firmware and I would update
> > them with OpenWRT and offer them to TOG.
> >
> > Updating your router usually requires some basic hardware hacking
> > (usually it is as simple as soldering a RS232 transceiver), so you will
> > need a soldering iron, a TTL-RS232 transceiver and a RS232/USB converter.
> >
> > To know if your router is supported, simply google OpenWRT with the
> > manufacturer name of your router and it's model number, like "OpenWRT
> > Linksys WRT54G2 V1"
> >
> > Chris.
> >
> > [1] https://openwrt.org/
> > OpenWRT is an alternative and open source firmware for wireless/ADSL
> > routers.
> > Quote from there web page:
> > "Instead of trying to create a single, static firmware, OpenWrt provides
> > a fully writable filesystem with package management. This frees you from
> > the application selection and configuration provided by the vendor and
> > allows you to customize the device through the use of packages to suit
> > any application. For developer, OpenWrt is the framework to build an
> > application without having to build a complete firmware around it; for
> > users this means the ability for full customization, to use the device
> > in ways never envisioned."
> >
> >
> > --
> > Chris
> >
> > _______________________________________________
> > tog mailing list
> > tog at lists.tog.ie
> > https://lists.tog.ie/mailman/listinfo/tog
> >
> 
> 
> 
> ------------------------------
> 
> Message: 3
> Date: Mon, 3 Dec 2012 09:32:59 +0000
> From: Schrodinger <schrodinger at konundrum.org>
> To: tog at lists.tog.ie
> Subject: Re: [tog] OpenWRT workshop, anyone?
> Message-ID: <20121203093258.GA85711 at defiant.konundrum.org>
> Content-Type: text/plain; charset="us-ascii"
> 
> I'd be very interested in this workshop. I've thought about buying some
> hardware and rolling out a custom OpenWRT firmware for hackerspaces.
> 
> I know there was a plan in Tog to roll out wireless access points with
> PBX software/webUI firmware but I'd love to see custom access points
> that would connect hackerspaces to either or both of ChaosVPN and
> SpaceFed. Low power and less hassle :)
> 
> Schrodinger.
> 
> On 2012/12/02 20:12, Christian Gagneraud wrote:
> > Hi,
> > 
> > Is anyone interested in an OpenWRT[1] workshop? If so, then I would like 
> > to lead a workshop to help people get OpenWRT on their routers.
> > I've heard that some people form the Dublin Linux User Group woukld be 
> > interested.
> > 
> > Please bear in mind, that you can brick your router by doing so, and 
> > that in no event shall I be liable for any direct or indirect damage of 
> > your device(s).
> > 
> > I would bring myself am Alpha Networks R36, a Linksys WRT54G2-V1 and/or 
> > a Linksys WAG354G-V2. They all run stock firmware and I would update 
> > them with OpenWRT and offer them to TOG.
> > 
> > Updating your router usually requires some basic hardware hacking 
> > (usually it is as simple as soldering a RS232 transceiver), so you will 
> > need a soldering iron, a TTL-RS232 transceiver and a RS232/USB converter.
> > 
> > To know if your router is supported, simply google OpenWRT with the 
> > manufacturer name of your router and it's model number, like "OpenWRT 
> > Linksys WRT54G2 V1"
> > 
> > Chris.
> > 
> > [1] https://openwrt.org/
> > OpenWRT is an alternative and open source firmware for wireless/ADSL 
> > routers.
> > Quote from there web page:
> > "Instead of trying to create a single, static firmware, OpenWrt provides 
> > a fully writable filesystem with package management. This frees you from 
> > the application selection and configuration provided by the vendor and 
> > allows you to customize the device through the use of packages to suit 
> > any application. For developer, OpenWrt is the framework to build an 
> > application without having to build a complete firmware around it; for 
> > users this means the ability for full customization, to use the device 
> > in ways never envisioned."
> > 
> > 
> > -- 
> > Chris
> > 
> > _______________________________________________
> > tog mailing list
> > tog at lists.tog.ie
> > https://lists.tog.ie/mailman/listinfo/tog
> 





More information about the tog mailing list