Python

Cinepub pe Kodi

Posted by Strainu on December 12, 2015
Python, Society, Software / No Comments

Pentru amatorii de filme românești, Cinepub este locul unde pot urmări legal filme românești. Deși majoritatea nu sunt foarte cunoscute publicului larg, sunt și câteva din cele care au ajuns în sălile de cinema în ultimii ani.

Cum în ultima vreme am folosit numai Kodi pentru a urmări filme, am zis că n-ar strica să fac un plug-in care să-mi permită să urmăresc filmele pe TV. Cinepub folosește youtube pentru găzduirea filmelor, deci aș fi putut teoretic să fac un playlist ce conținea toate filmele, dar ar fi fost mai puțin interesant. 🙂 Codul e pe github, feel free to fork and improve.

Instalare

  1. Descărcați arhiva
  2. Deschieți Kodi și mergeti la System->Settings->Add-ons->Install from zip file și alegeți arhiva.
  3. Dacă instalarea a avut loc cu succes, găsiți filmele la Video->Add-ons->cinepub.ro

Asta-i tot, enjoy!

Share and Enjoy:
  • Facebook
  • Twitter
  • Identi.ca
  • LinkedIn
  • Reddit
  • Add to favorites

Python library for working with the SIRUTA database

Posted by Strainu on November 19, 2012
Python / No Comments

For those of you who don’t know, SIRUTA is the official classification of the Romanian towns and villages. It is maintained by the National Statistics Institute.

Many of the projects I work on for OSM or Wikipedia are centered around location, which means I was writing similar code many times over. To simplify my life, I made a python library that offers a simple interface to the SIRUTA database. Called SIRUTAlib, you can find its homepage here.

As you can expect, it is open-source, licensed under the 3-clause BSD license. The source code is available on Github.

As always, all feedback is appreciated. If you find bugs or want to submit a patch, please use the issue tracker and the pull request system from Github.

Share and Enjoy:
  • Facebook
  • Twitter
  • Identi.ca
  • LinkedIn
  • Reddit
  • Add to favorites

Romanian Postal Codes in OpenStreetMap

Posted by Strainu on October 11, 2010
Cool webpages, Open Content, Python / 2 Comments

After a short discussion on the Romanian OSM mailing list, I decided to write a small Python script to import the postal code data from SIRUTA into OSM, cited as demanded by law 542/2008, art. 32. As cities have multiple postal codes, I had to settle for importing data for villages, hamlets and towns. Still, over 12.000 new entries were added to OpenStreetMap. I will surely be an important resource for people wanting to use coordinates – postal codes association freely.

For people wanting to peek at the code, you can find it here. It uses the OsmApi library and a stripped version of the dbf fron INSSE (converted to CSV), containing the following fields: siruta_code, village_name, postcode, postocde_source.

Share and Enjoy:
  • Facebook
  • Twitter
  • Identi.ca
  • LinkedIn
  • Reddit
  • Add to favorites

Tags: , , , , ,

Pagerename

Posted by Strainu on November 16, 2007
My Projects, Python / No Comments

Pagerename.py is a small Python script that integrates in the pywikipedia framework. For those of you who don’t know, it’s the main tool used by robots on Wikipedia. I wrote the script a good while ago, when I needed to quickly rename several hundred pages on the Romanian Wikipedia. The script was designed to make the same modification on all the titles from a series of pages. You can remove parts of the title or add a new text at the beginning and/or and of the title.

In the mean time the guys at pywikipedia wrote movepages.py, a somewhat similar script. Nevertheless, in September I decided to propose my script for inclusion in pywikipedia. Unfortunately, it didn’t make it, however it was included in the project’s encyclopedia, at http://botwiki.sno.cc/wiki/Python:Pagerename.py. I’d love to hear your opinion about the script. Please leave any comments you might have below.

Share and Enjoy:
  • Facebook
  • Twitter
  • Identi.ca
  • LinkedIn
  • Reddit
  • Add to favorites

Call by sharing

Posted by Strainu on June 15, 2007
Functional Programming, Java, Python / No Comments

In a previous article, I was saying trying to convince you that Java passes its parameters by value. Although this is the most widely-spread name for the action of passing references to objects, some experts have a different opinion. They name this parameter-passing technique “call by object” or “call by sharing“.

The only programming language that openly uses that name is CLU, however one must note that languages like LISP, Scheme, Python or Java use the same technique. You can find a short study on the subject in the python mailing list archives.

Share and Enjoy:
  • Facebook
  • Twitter
  • Identi.ca
  • LinkedIn
  • Reddit
  • Add to favorites

Pagerename.py

Posted by Strainu on January 30, 2007
Python, Software / No Comments

Pagerename.py is a script for the pywikipedia framework, used to rename a series of pages on Wikipedia and other MediaWiki sites. The script is designed to make the same modification on all the titles it reads from the input file. You can remove parts of the title or add a new text at the beginning and/or and of the title. You can find it’s source code below or at this site.
Continue reading…

Share and Enjoy:
  • Facebook
  • Twitter
  • Identi.ca
  • LinkedIn
  • Reddit
  • Add to favorites

Tags: , ,

Computer Systems’ Structure homeworks

Posted by Strainu on January 30, 2007
C, Python, Software / No Comments

Computer Systems’ Structure homeworks from Automatics and Computer Science Faculty, 4th year, prof. Emil Sluşanschi. The archive contains a homework made in C. Themes: threads, semaphores, queues, locks, fat-tree inter-connection structures, file-sharing, network programming in python. The C homework is a simulation using the Blitzen simulator (not included).
Continue reading…

Share and Enjoy:
  • Facebook
  • Twitter
  • Identi.ca
  • LinkedIn
  • Reddit
  • Add to favorites

Tags: , ,