LinuxPlanet

Syndicate content
By Linux Geeks, For Linux Geeks.
Updated: 6 hours 15 min ago

Weirdness with hplip package in Debian wheezy

Fri, 2015-01-02 22:20

I suspect this information is of limited use because it's far too vague. I didn't even file it as a Debian bug because I don't think I have enough information here to report a bug. It's not dissimilar from the issues reported in Debian bug 663868, but the system in question doesn't have foo2zjs installed. So, I filed Debian Bug 774460.

However, in searching around the Internet for the syslog messages below, I found very few results. So, in the interest of increasing the indexing on these error messages, I include the below: Jan 2 18:29:04 puggington kernel: [ 2822.256130] usb 2-1: new high-speed USB device number 16 using ehci_hcd Jan 2 18:29:04 puggington kernel: [ 2822.388961] usb 2-1: New USB device found, idVendor=03f0, idProduct=5417 Jan 2 18:29:04 puggington kernel: [ 2822.388970] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 Jan 2 18:29:04 puggington kernel: [ 2822.388977] usb 2-1: Product: HP Color LaserJet CP2025dn Jan 2 18:29:04 puggington kernel: [ 2822.388983] usb 2-1: Manufacturer: Hewlett-Packard Jan 2 18:29:04 puggington kernel: [ 2822.388988] usb 2-1: SerialNumber: 00CNGS705379 Jan 2 18:29:04 puggington kernel: [ 2822.390346] usblp0: USB Bidirectional printer dev 16 if 0 alt 0 proto 2 vid 0x03F0 pid 0x5417 Jan 2 18:29:04 puggington udevd[25370]: missing file parameter for attr Jan 2 18:29:04 puggington mtp-probe: checking bus 2, device 16: "/sys/devices/pci0000:00/0000:00:1d.7/usb2/2-1" Jan 2 18:29:04 puggington mtp-probe: bus: 2, device: 16 was not an MTP device Jan 2 18:29:04 puggington hp-mkuri: io/hpmud/model.c 625: unable to find [s{product}] support-type in /usr/share/hplip/data/models/models.dat Jan 2 18:25:19 puggington kernel: [ 2596.528574] usblp0: removed Jan 2 18:25:19 puggington kernel: [ 2596.535273] usblp0: USB Bidirectional printer dev 12 if 0 alt 0 proto 2 vid 0x03F0 pid 0x5417 Jan 2 18:25:24 puggington kernel: [ 2601.727506] usblp0: removed Jan 2 18:25:24 puggington kernel: [ 2601.733244] usblp0: USB Bidirectional printer dev 12 if 0 alt 0 proto 2 vid 0x03F0 pid 0x5417 [last two repeat until unplugged]

I really think the problem relates specifically to hplip 3.12.6-3.1+deb7u1, as I said in the bug report, the following commands resolved the problem for me: # dpkg --purge hplip # dpkg --purge system-config-printer-udev # aptitude install system-config-printer-udev

Categories: FLOSS Project Planets

Happy New Year & Browser and OS stats for 2014

Fri, 2015-01-02 13:22

I’d like to wish everyone a happy new year on behalf of the entire LQ team. 2014 has been another great year for LQ and we have quite a few exciting developments in store for 2015, including a major code update that we originally had planned for 2013. A few highlights: LQ ISO recently surpassed 55,000,000 Linux downloads. AndroidQuestions.org and ChromeOSQuestions.org continue to grow. Outside The Questions Network, I think we’ve really hit our stride on Bad Voltage.

As has become tradition, here are the browser and OS statistics for the main LQ site for all of 2014 (2013 stats for comparison).

Browsers Chrome 45.34% Firefox 39.00% Internet Explorer 8.12% Safari 4.57% Opera 1.29% Android Browser 0.56%

A big change here, as Chrome has finally supplanted Firefox as the most used browser at LQ (and has done so quite handily).

Operating Systems Windows 52.58% Linux 32.32% Macintosh 10.62% Android 2.42% iOS 1.44%

Linux usage has remained fairly steady, while OS X usage is now over 10% for the first time ever.

I’d also like to take this time to thank each and every LQ member. You are what make the site great; without you, we simply wouldn’t exist. I’d like to once again thank the LQ mod team, whose continued dedication ensures that things run as smoothly as they do. Don’t forget to vote in the 2014 LinuxQuestions.org Members Choice Awards, which recently opened.

–jeremy


Categories: FLOSS Project Planets

Free parallel programming webinar (Python and R) by Domino Data Labs

Tue, 2014-12-30 17:07

By Vasudev Ram





I had blogged a few times earlier about Domino Data Lab, which is the maker of Domino, a Python PaaS (Platform as a Service) for data science (though it can also be used for general programming in the cloud). I had done a trial of it and found it to be quite good and easy to use. In fact Domino's ease of use for cloud programming was one of the points I specifically noticed and commented on, after trying it out.

Here is the last of those posts:

Domino Python PaaS now has a free plan

That post links to my earlier posts about Domino.



Today I got to know that they are hosting a free webinar on parallel programming with Python and R, using Domino. Here are the details:

[

Free webinar on parallel programming in R and Python

We'll show you how to utilize multi-core, high-memory machines to dramatically accelerate your computations in R and Python, without any complex or time-consuming setup.

You'll learn:

How to determine whether your tasks can be parallelized on multi-core, high-memory machines

General purpose techniques in R and Python for parallel programming

Specific applications of parallel programming in a machine learning context, including how to speed up cross-validation, grid search, and random forest calculations

Finally, how to use Domino for easy access to powerful multi-core machines where you can utilize these techniques.

About the instructor

The webinar will be led by Nick Elprin, one of Domino’s co-founders. Before starting Domino, Nick was a senior technologist and technology manager at a large hedge fund, where he managed a team that designed, developed, and delivered the firm’s next generation research platform. He has a BA and MS in computer science from Harvard.

]

You can sign up for the webinar here:

Domino Data Lab: free webinar on parallel programming in Python and R

- Vasudev Ram - Python training and consulting - Dancing Bison Enterprises

Signup to hear about new products or services from me.

Contact Page

Share | var addthis_config = {"data_track_clickback":true}; Vasudev Ram

Categories: FLOSS Project Planets

Building Self-Healing Applications with Saltstack

Tue, 2014-12-30 09:50

Self-healing infrastructure is something that has always piqued my interest. The first iteration of self healing infrastructure that I came across was the Solaris Service Management Facility aka "SMF". SMF would restart services if they crashed due to hardware errors or general errors outside of the service itself.

For today's article we are going to explore another way of creating a self healing environment; going beyond restarting failed services. In today's article we are going to take a snippet of code that connects to a database service and give that application not only the ability to reconnect during database failure but also give it the ability to automatically resolve the database issues.

Starting with a simple connection

For today's article we are going to take a snippet of code from an existing applicaton and give it self healing super powers. The code we are using is from Runbook a side project of mine that does all sorts of cool automation for DevOps.

# RethinkDB Server try: rdb_server = r.connect( host=config['rethink_host'], port=config['rethink_port'], auth_key=config['rethink_authkey'], db=config['rethink_db']) print("Connected to RethinkDB") except (RqlDriverError, socket.error) as e: print("Cannot connect to rethinkdb, shutting down") print("RethinkDB Error: %s") % e.message sys.exit(1)

This code has been altered a bit for simplification.

The code above will attempt to connect to a RethinkDB instance. If successful it creates a connection object rdb_server which can be used later for running queries against the database. If the connection is not successful the application will log an error and exit with an exit code of 1.

To put it simply, if RethinkDB is down or not accepting connections this process stops.

Let's try again

Before we start adding super powers we need to change how the application handles connection errors. Right now it simply exits the process and unless we have external systems restarting the process it never attempts to reconnect. For a self healing application we should change this behavior to have the application reattempt connections until RethinkDB is online.

# Set initial values connection_attempts = 0 connected = False # Retry RethinkDB Connections until successful while connected == False: # RethinkDB Server try: rdb_server = r.connect( host=config['rethink_host'], port=config['rethink_port'], auth_key=config['rethink_authkey'], db=config['rethink_db']) connected = True print("Connected to RethinkDB") except (RqlDriverError, socket.error) as e: print("Cannot connect to rethinkdb") print("RethinkDB Error: %s") % e.message connection_attempts = connection_attempts + 1 print("RethinkDB connection attempts: %d") % connection_attempts

If we breakdown the above code we can see that we added two new variables and a while loop. The above code will simply retry connecting to RethinkDB until successful. In some ways this in itself is making the application self healing, as it is gracefully handling an error with an external system and keeps trying to reconnect. These however are not the super powers I was referring to.

Giving our application superpowers via Saltstack

In an earlier article I covered implementing salt-api the API for Saltstack. While that article covered utilizing salt-api with third party services such as Runbook or Datadog; that same level of integration could be added to applications themselves. Giving those applications the ability to run infrastructure tasks.

Using Salt-API and Reactor Formula

For sake of brevity this article will assume that you already have Saltstack and salt-api installed and configured to accept webhook requests as outlined in the previous article. For this article we will also be utilizing a salt-api and reactor formula that I created for Runbook.

This formula provides several template reactor configurations that can be used to pickup salt-api webhook requests and perform salt actions. Actions such as restarting services, executing shell commands, or even start a highstate. To get started we will first need to download and extract the formula.

# wget -O /var/tmp/master.zip https://github.com/madflojo/salt-api-reactor-formula/archive/master.zip # cd /var/tmp/ # unzip master.zip

Once extracted we can copy the reactor directory to /srv/salt/, this is the default salt directory and may need to be updated for your environment.

# cp -R salt-api-reactor-formula-master/reactor /srv/salt/

We will also need to deploy our reactor config to the /etc/salt/master.d/ directory as this is what maps the URL endpoint to a specific salt action. Once deployed we will also need to restart the salt-master service.

# cp salt-api-reactor-formula-master/reactor.conf /etc/salt/master.d/ # service salt-master restart Examining a reactor configuration

When our application is unable to connect to RethinkDB we want to perform some sort of corrective task. The easiest and safest thing to do in Runbook's environment is to simply run a salt highstate. A highstate execution will tell Saltstack to go through all of the defined configurations and make them true on the desired minion server. In our environment that includes ensuring the RethinkDB service is running and configured.

If our application is able to call a highstate execution on the database hosts there is a good chance that the issue may be corrected. Giving our application the ability to resolve any issue that was caused by RethinkDB not matching our desired state.

highstate.sls

In order to give our application the ability to run a highstate we will utilize the reactor/states/highstate.sls formula. Before going further we should first examine how this formula works.

{% set postdata = data.get('post', {}) %} {% if postdata.secretkey == "PICKSOMETHINGBETTERPLZKTHX" %} state_highstate: cmd.state.highstate: - tgt: '{{ postdata.tgt }}' {% if "matcher" in postdata %} - expr_form: {{ postdata.matcher }} {% endif %} {% if "args" in postdata %} - arg: - {{ postdata.args }} {% endif %} {% endif %}

When a POST request is made to the http://saltapiurl/webhooks/states/highstate address salt-api will take the POST data of that request and pass it along salts event system. When processed this reactor configuration will take the POST data and assign it to a dictionary named postdata. From there salt will check for a key in the postdata dictionary named secretkey and ensure that the value of that key matches the defined "secretkey" in the template. This section is used to act as an authentication method for webhooks.

Each reactor template has an example secret key defined, it is recommended that you modify this to a unique value for your environment.

After validation salt will look for additional keys in the postdata dictionary, for our purpose we will need to understand the tgt and matcher keys. The tgt key is used to specify the "target" for the highstate execution. This target can be a hostname, a grain value, pillar value, subnet or any other target Saltstack accepts. The matcher key contains a definition of the tgt keys expression, for instance if the tgt value was a hostname, the matcher value should be glob for a hostname glob. If the tgt value was a pillar value, the matcher value should be pillar. You can find all of the valid matcher values in salt-api's documentation.

Calling salt-api

Now that we have salt-api configured to accept webhook requests and start highstate executions, we now need to code our application to call those webhooks. Since this is something we may want to do somewhat often in our code we can create a function to perform this webhook request.

Highstate Function def callSaltHighstate(config): ''' Call Saltstack to initiate a highstate ''' import requests url = config['salt_url'] + "/states/highstate" headers = { "Accept:" : "application/json" } postdata = { "tgt" : "db*", "matcher" : "glob", "secretkey" : config['salt_key'] } try: req = requests.post(url=url, headers=headers, data=postdata, verify=False) print("Called for help and got response code: %d") % req.status_code if req.status_code == 200: return True else: return False except (requests.exceptions.RequestException) as e: print("Error calling for help: %s") % e.message return False

The code above is pretty simple, it essentially performs an HTTP POST request with POST data fields tgt, matcher and secretkey. The tgt field contains db* which in our field is a hostname glob that matches our database server names. The matcher value is glob to denote that the tgt value is a hostname glob value. The secretkey actually contains the value of config['salt_key'] which is pulled from our configuration file when the main process starts and is passed to the callSaltHighstate() function.

Now that the code to call salt-api is defined we can add the callSaltHighstate() function into the exception handling for RethinkDB.

Adding callSaltHighstate as an action # Set initial values connection_attempts = 0 connected = False # Retry RethinkDB Connections until successful while connected == False: # RethinkDB Server try: rdb_server = r.connect( host=config['rethink_host'], port=config['rethink_port'], auth_key=config['rethink_authkey'], db=config['rethink_db']) connected = True print("Connected to RethinkDB") except (RqlDriverError, socket.error) as e: print("Cannot connect to rethinkdb") print("RethinkDB Error: %s") % e.message callSaltHighstate(config) connection_attempts = connection_attempts + 1 print("RethinkDB connection attempts: %d") % connection_attempts

As you can see the code above hasn't changed much from the previous example. The biggest change is that after printing the RethinkDB error we experienced we then execute the callSaltHighstate() function.

Leveling up

For a simple example the above code works quite well, however there is a bit of a flaw. With the above code a highstate will be called every time the application attempts to connect to RethinkDB and fails. Since a highstate will take a bit of time to execute this could cause a backlog of highstate executions which could in theory cause even more issues.

To combat this at the end of the while loop you could add a time.sleep(120) to cause the application to sleep for 120 seconds between each while loop executions. This would give Saltstack some time to execute the highstate before another is queued. While a sleep would work and is simple, it is not the most elegant method.

Since we can call Saltstack to perform essentially any task Saltstack can perform. Why stop at just a highstate? Below we are going to create another function that calls salt-api, but rather than run a highstate this function will send a webhook request that tells salt-api to restart the RethinkDB service.

Restart function def callSaltRestart(config): ''' Call Saltstack to restart a service ''' import requests url = config['salt_url'] + "/services/restart" headers = { "Accept:" : "application/json" } postdata = { "tgt" : "db*", "matcher" : "glob", "args" : "rethinkdb", "secretkey" : config['salt_key'] } try: req = requests.post(url=url, headers=headers, data=postdata, verify=False) print("Called for help and got response code: %d") % req.status_code if req.status_code == 200: return True else: return False except (requests.exceptions.RequestException) as e: print("Error calling for help: %s") % e.message return False

The above code is very similar to the highstate function with the exception that the URL endpoint has changed to /services/restart (which utilizes the reactor/services/restart.sls template) and there is a new POST data key called args which contains rethinkdb the service in which we want to restart.

Since we are adding the complexity of restarting the RethinkDB service we want to make sure that this call is not made too often. At the moment the best way to do this is to build that logic into the application itself.

Extending when to call salt-api # Set initial values connection_attempts = 0 first_connect = 0.00 last_restart = 0.00 last_highstate = 0.00 connected = False called = None # Retry RethinkDB Connections until successful while connected == False: if first_connect == 0.00: first_connect = time.time() # RethinkDB Server try: rdb_server = r.connect( host=config['rethink_host'], port=config['rethink_port'], auth_key=config['rethink_authkey'], db=config['rethink_db']) connected = True print("Connected to RethinkDB") except (RqlDriverError, socket.error) as e: print("Cannot connect to rethinkdb") print("RethinkDB Error: %s") % e.message timediff = time.time() - first_connect if timediff > 300.00: last_timediff = time.time() - last_restart if last_timediff > 600.00 or last_restart == 0.00: if timediff > 600: callSaltRestart(config) last_restart = time.time() last_timediff = time.time() - last_highstate if last_timediff > 300.00 or last_highstate == 0.00: callSaltHighstate(config) last_highstate = time.time() connection_attempts = connection_attempts + 1 print("RethinkDB connection attempts: %d") % connection_attempts time.sleep(60)

As you can see with the above code we added quite a bit of logic around when to run and when not to run. With the above code, when our application is unable to connect to RethinkDB it will keep retrying until successful, just as before. However, every 5 minutes if the application is unable to connect to RethinkDB it will call Saltstack via salt-api requesting a highstate be executed on the database servers. Every 10 minutes, if RethinkDB is still not accessible this application will call Saltstack via salt-api requesting a restart of the RethinkDB service on all database servers.

Improvements

With today's example we are able to correct situations that many applications cannot. Being able to restart the database when you are unable to connect to it is a good example of a self healing environment. However, there are more things that could be done to this application.

This same type of logic could be built into Query exceptions rather than Connection exceptions only. With query exceptions you could also use salt-api to execute database maintenance scripts or call salt-cloud to provision additional servers. Once you give your application the ability to perform infrastructure wide actions you open the door to a wide range of automation capabilities.

To see the full script from this example you can view it on this GitHub Gist


Originally Posted on BenCane.com: Go To Article
Categories: FLOSS Project Planets

pyDAL, a pure Python Database Abstraction Layer

Mon, 2014-12-29 18:10

By Vasudev Ram


pyDAL is a pure Python Database Abstraction Layer. So it seems to be something like the lower layer of SQLAlchemy, i.e. SQLAlchemy Core, the library that is used by the upper layer, SQLAlchemy ORM. See the SQLAlchemy (0.8) documentation.

From the pyDAL site:

[ It dynamically generates the SQL in real time using the specified dialect for the database back end, so that you do not have to write SQL code or learn different SQL dialects (the term SQL is used generically), and your code will be portable among different types of databases.

pyDAL comes from the original web2py's DAL, with the aim of being wide-compatible. pyDAL doesn't require web2py and can be used in any Python context. ]

IOW, pyDAL has been separated out into a different project from web2py, a Python web framework, of which it was originally a part.

The use of an ORM (Object Relational Mapper) vs. writing plain SQL code (vs. using an intermediate option like pyDAL or SQLAlchemy Core), can be controversial; there are at least some pros and cons on both (or all 3) sides. I've read some about this, and have got some experience with using some of these options in different projects, but am not an expert on which is the best approach, and also, it can vary depending on your project's needs, so I'm not getting into that topic in this post.

pyDAL seems to support many popular databases, mostly SQL ones, but also a NoSQL one or two, and even IMAP. Here is a list, from the site: SQLite, PostgreSQL, MySQL, Oracle, MSSQL, FireBird, DB2, Informix, Ingres, Cubrid, Sybase, Teradata, SAPDB, MongoDB, IMAP.

For some of those databases, it uses PyMySQL, pyodbc or fbd, which are all Python database libraries that I had blogged about earlier.

I tried out pyDAL a little, with this simple program, adapted from its documentation:
import sys
import time
from pydal import DAL, Field
db = DAL('sqlite://storage.db')
db.define_table('product', Field('name'))
t1 = time.time()
num_rows = int(sys.argv[1])
for product_number in range(num_rows):
db.product.insert(name='Product-'.format(str(product_number).zfill(4)))
t2 = time.time()
print "time to insert {} rows = {} seconds".format(num_rows, int(t2 - t1))
query = db.product.name
t1 = time.time()
rows = db(query).select()
for idx, row in enumerate(rows):
#print idx, row.name
pass
t2 = time.time()
print "time to select {} rows = {} seconds".format(num_rows, int(t2 - t1))

It worked, and gave this output:

$ python test_pydal2.py 100000
No handlers could be found for logger "web2py"
time to insert 100000 rows = 18 seconds
time to select 100000 rows = 7 seconds

Note: I first ran it with this statement uncommented:
#print idx, row.name
to confirm that it did select the records, and then commented it and replaced it with "pass" in order to time the select without the overhead of displaying the records to the screen.

I'll check out pyDAL some more, for other commonly needed database operations, and may write about it here.
There may be a way to disable that message about a logger.

The timing statements in the code and the time output can be ignored for now, since they are not meaningful without doing a comparison against the same operations done without pyDAL (i.e. just using SQL from Python with the DB API). I will do a comparison later on and blog about it if anything interesting is found.

- Vasudev Ram - Dancing Bison Enterprises - Python training and consulting

Signup to hear about new products or services from me.

Contact Page

Share | var addthis_config = {"data_track_clickback":true}; Vasudev Ram

Categories: FLOSS Project Planets

New Skype Translator service

Sun, 2014-12-28 17:33
http://m.bbc.com/news/technology-30539198Vasudev Ram
Categories: FLOSS Project Planets

Popcorn, black olives and turnip pickle – a nice evening snack

Sat, 2014-12-27 14:21

By Vasudev Ram




I had this snack today:

Bought some popcorn and black olives (Figaro olives from Seville, Spain), and had them with some turnip pickle that I had made. Crazy, no? :) Turned out to be a good snack.

The turnip pickle was a simple one with salt and a couple of powdered spices - no oil.

As I sometimes do when I eat something, I googled olive and was interested to see that it is one of the most extensively cultivated fruit crops, more than apples, mangoes and bananas, according to Wikipedia:

[ Olives are one of the most extensively cultivated fruit crops in the world.[69] In 2011 there were about 9.6 million hectares planted with olive trees, which is more than twice the amount of land devoted to apples, bananas or mangoes. Only coconut trees and oil palms command more space. ]


- Vasudev Ram - Dancing Bison Enterprises

Contact Page

Share | var addthis_config = {"data_track_clickback":true};
Vasudev Ram

Categories: FLOSS Project Planets

Checking out RevolverMaps.com widget

Thu, 2014-12-25 08:50

By Vasudev Ram


The revolving map should appear below.


- Vasudev Ram - Dancing Bison Enterprises


Contact Page

Share | var addthis_config = {"data_track_clickback":true};
Vasudev Ram

Categories: FLOSS Project Planets

Music Players, Production, and Experimentation – Part 5

Thu, 2014-12-25 04:56
Updated and added a few more playlists to my YouTube account.
  • Alternative-Hip-Hop-23-Dec-14
  • Classic-Disco-24-Dec-14
  • Classical-19-Dec-14
  • Foreign-Hip-Hop-and-R&B-19-Dec-14
  • Lounge-24-Dec-14 overlaps Chillout-4-Dec-14 because style is very similar at times
  • Latin-and-Tango-4-Dec-14 has become Latin-Chillout-and-Tango-4-Dec-14 
https://www.youtube.com/channel/UCwVJG67iHHPbmBxuHVbyOlw/playlists
    After the recent end of production of the Apple iPod Classic it's become clear that the total number of options available in the high capacity digital music department have dwindled drastically (everyone is basically going to Flash or SSD based storage). There are some options from Fiio, an extremely option from Sony, plus using smartphones with support for high capacity flash based storage. If you're willing to buy used products other options may be the Tonium Pacemaker or old iPod Classics (they're selling for multiples of what they were selling last at retail now on eBay and Gumtree).http://www.gizmodo.com.au/2014/09/where-can-you-buy-a-high-capacity-mp3-player-now-the-ipod-classic-is-dead/http://www.addictedtoaudio.com.au/product/fiio-x1-digital-audio-player
    http://www.addictedtoaudio.com.au/product/fiio-x3-portable-music-player
    http://www.addictedtoaudio.com.au/product/fiio-x5-portable-high-resolution-lossless-music-playerhttp://www.addictedtoaudio.com.au/product/sony-nwz-zx1-walkman-digital-portable-player
    http://pacemakerdevice.org/forum/viewtopic.php?f=5&t=68
    http://pacemakerdevice.org/forum/viewtopic.php?f=20&t=76
    Another option are high storage wireless based devices.http://www.cnet.com/au/products/seagate-wireless-plus-1tb/
    http://knowledge.seagate.com/articles/en_US/FAQ/005087en?language=en_US
    Been struggling with sound engineering of late. Have wondered whether or not it's simply easier to go for transiest shaper VST's across the board.
    http://bedroomproducersblog.com/2012/01/05/bpb-freeware-studio-best-free-transient-shaper-vstau-plugins/http://www.airmusictech.com/product/the-riser
    https://www.youtube.com/user/AIRmusictech
    Someone questioned why it seemed easy for me to improvise. I was curious about this as well. I think for the most part it's been about listening to heaps of music since I was young.http://www.perfectpitch.com/perfectrelative.htm
    http://www.pianonoise.com/Article.Simple_gifts.htmBeen having major struggles of late how to relate percussion to melody. The best music I've come across seems to have tracks and sections which blend perfectly  into one another and where the relative complexity and tempo remains roughtly the same. A bigger toolkit (software or hardware) also helps. Look at work of 'Groove Armada', 'Artful Dodger', and 'Kaskade' and you'll understand what I mean.

    A lot of software allows for automated scale selection (useful for me because I tend to select notes based on ear rather than selecting a key first). For those who don't who just prefer the old fashioned mechanism please consider the, 'circle of fifths'.
    http://en.wikipedia.org/wiki/Circle_of_fifths

    Think about use of Melodyne and Antares Auto-Tune for easier composition if you're lazy. Record whistling or singing as a 'WAV'. Import it into Melodyne and then convert the notes into MIDI for import into Ableton or other DAW software.
    Some interesting stuff I've come across recently. Possibly worth reworking/remixing them (looking around for good stems for remixing but am willing to work with existing songs if necessary).
    • Nice track but could have really done something with some note changes here and there. Strange use of panning at times, bit muddy, could have been clarified a bit in multiple frequency ranges. Could have done with master bus (or simply another layer) over the top to add some common effects to the overall track that are common to Latin and Tango tracks (Vinyl distortion, bitcrushing, equalisation, compression, etc...). Some sections don't blend into one another as a stronger song should, could be interesting for samples. https://www.youtube.com/watch?v=edHXUHTCvBI 
    • Great overall. Some beautiful sections but a little bit disjointed. Bridges (personally, currently struggling with this) into breakdowns use heavy delay, reverb. Breakdowns similarly awkward at times (feel and emotion is just way off). More active strings/harmonica in parts, realy bring out the best in the musician/clip/instrument in question. Rain effect possibly replaced with heavy vinyl distortion effect? Just strange with that muddied sound. Bring up velocity or mixing volume of the piano in some parts? Better use of velocity/dynamics in some parts. Could have used some light scratching in some sections and some glitching if you going for an Alternative Hip Hop and Latin feel to it, made more use of panning and other effects to create better atmosphere. The best tracks that I've come across you can often close you're eyes and you're sitting right in front of the ochestra or band itself. You can't do that here. Ripe for sampling or remixing. https://www.youtube.com/watch?v=bOYb9CV2qoQ
    • Ripe for sampling/remix... Heavier percussion in sections. Overlay scratching in parts. Some glitching. Perhaps electrical guitar over top. Vinyl distortion, bitchrushing for greater character. Really bring out some instruments and dynamics of them... Aware that lazy feel is common to this particular style/genre of music though. https://www.youtube.com/watch?v=P2dFLlaEaIU
    • Overall nice, downtempo track. Slow down vibrato/tremolo rate on some synthesiser sections. Suffering from distortion in the mix in the lower end bass and percussion area. Could have done with some extra complexity/variation in the percussion/synthesiser pad area. Am using monitor style headphones (Audio Technica ATH-M50X) so believe it may be the mix rather than equipment. Deals with high frequency harshness nicely. Feels like, low pass (or multi-band) filter, EQ, compressed, etc... Extra reverb plus some delay across the board on the bus to emphasise atmosphere? https://www.youtube.com/watch?v=mhskiBuoIiY
    • Lacks oomph, character. A bit lost at times but that is particular to this genre. Greater dynamics across the board. Extra complexity on percussion, staccato shorter, more sincupated rim. Violin string section slightly more active at times. Clarify sound, enhance detail or is that just this particular copy? https://www.youtube.com/watch?v=4c1ngk41fm0
    Looking to try some remix competitions. Looking for stems...http://www.remixcomps.com/http://www.rudimental.co.uk/remixes/https://soundcloud.com/groups/free-stems-project-remixs-show-off-your-skillshttps://soundcloud.com/tags/stemsNote that there may be a lot of restrictions depending on where you get the stems from. Also that many competitions force you to forfeit right to royalties. You may get prizes/recognition though.https://realworldrecords.com/remixed/get-stems/84776/
    Interesting stuff from these guys (from a song that I found elsewhere). http://www.chilloutmusic.yolasite.com
    Categories: FLOSS Project Planets

    Create tabular PDF reports with Python, xtopdf and tablib

    Wed, 2014-12-24 17:25

    By Vasudev Ram


    Tablib is a Python library that allows you to import, export and manipulate tabular data.

    I had come across tablib a while ago. Today I thought of using it with xtopdf, my Python library for PDF creation, to generate PDF output from tabular data. So I wrote a program, TablibToPDF.py, for that. It generates dummy data for student grades (for an examination), then puts that data into a tablib Dataset, and then exports the contents of that Dataset to PDF, using xtopdf. Given the comments in the code, it is mostly self-explanatory. I first wrote the program in an obvious/naive way, and then improved it a little by removing some intermediate variables, and by converting some for loops to list comprehensions, thereby shortening the code by a few lines. Here is the code for TablibToPDF.py:
    """
    TablibToPDF.py
    Author: Vasudev Ram
    Copyright 2014 Vasudev Ram - www.dancingbison.com
    This program is a demo of how to use the tablib and xtopdf Python libraries
    to generate tabular data reports as PDF output.
    Tablib is at: https://tablib.readthedocs.org/en/latest/
    xtopdf is at: https://bitbucket.org/vasudevram/xtopdf
    and info about xtopdf is at: http://slides.com/vasudevram/xtopdf or
    at: http://slid.es/vasudevram/xtopdf
    """

    import random
    import tablib
    from PDFWriter import PDFWriter

    # Helper function to output a string to both screen and PDF.
    def print_and_write(pw, strng):
    print strng
    pw.writeLine(strng)

    # Set up grade and result names and mappings.
    grade_letters = ['F', 'E', 'D', 'C', 'B', 'A']
    results = {'A': 'Pass', 'B': 'Pass', 'C': 'Pass',
    'D': 'Pass', 'E': 'Pass', 'F': 'Fail'}

    # Create an empty Dataset and set its headers.
    data = tablib.Dataset()
    data.headers = ['ID', 'Name', 'Marks', 'Grade', 'Result']
    widths = [5, 12, 8, 8, 12] # Display widths for columns.

    # Create some rows of student data and use it to populate the Dataset.
    # Columns for each student row correspond to the header columns
    # shown above.

    for i in range(20):
    id = str(i).zfill(2)
    name = 'Student-' + id
    # Let's grade them on the curve [1].
    # This examiner doesn't give anyone 100 marks :)
    marks = random.randint(40, 99)
    # Compute grade from marks.
    grade = grade_letters[(marks - 40) / 10]
    result = results[grade]
    columns = [id, name, marks, grade, result]
    row = [ str(col).center(widths[idx]) for idx, col in enumerate(columns) ]
    data.append(row)

    # Set up the PDFWriter.
    pw = PDFWriter('student_grades.pdf')
    pw.setFont('Courier', 10)
    pw.setHeader('Student Grades Report - generated by xtopdf')
    pw.setFooter('xtopdf: http://slides.com/vasudevram/xtopdf')

    # Generate header and data rows as strings; output them to screen and PDF.

    separator = '-' * sum(widths)
    print_and_write(pw, separator)

    # Output headers
    header_strs = [ header.center(widths[idx]) for idx, header in enumerate(data.headers) ]
    print_and_write(pw, ''.join(header_strs))
    print_and_write(pw, separator)

    # Output data
    for row in data:
    print_and_write(pw, ''.join(row))

    print_and_write(pw, separator)
    pw.close()

    # [1] http://en.wikipedia.org/wiki/Grading_on_a_curve
    # I'm not endorsing the idea of grading on a curve; I only used it as a
    # simple algorithm to generate the marks and grades for this example.

    You can run it with:
    $ python TablibToPDF.py
    It sends the tabular output that it generates, to both the screen and to a PDF file named student_grades.pdf.
    Here is a screenshot of the generated PDF file, opened in Foxit PDF Reader:


    The program that I wrote could actually have been written without using tablib, just with plain Python lists and/or dictionaries. But tablib has some additional features, such as dynamic columns, export to various formats (but not PDF), and more - see its documentation, linked near the top of this post. I may write another blog post later that explores the use of some of those tablib features.

    - Enjoy.

    Vasudev Ram - Python consulting and training - Dancing Bison Enterprises

    Signup to hear about new products or services from me.

    Contact Page

    Share | var addthis_config = {"data_track_clickback":true}; Vasudev Ram

    Categories: FLOSS Project Planets

    Toward Civil Behavior

    Tue, 2014-12-23 08:55

    I thought recently of a quote from a Sopranos' Season 1 episode, A Hit is a Hit, wherein Tony Soprano's neighbor proclaims for laughs at a party, Sometimes I think the only thing separating American business from the Mob is [EXPLETIVE] whacking somebody.

    The line stuck with me in the decade and a half since I heard it. When I saw the episode in 1999, my career was basically just beginning, as I was just finishing graduate school and had just begun working for the FSF. I've often wondered over these years how close that quote — offered glibly to explore a complex literary theme — matches reality.

    Organized crime drama connects with audiences because such drama explores a primal human theme: given the human capacity for physical violence and notwithstanding the Enlightenment, how and why does physical violence find its way into otherwise civilized social systems? A year before my own birth, The Godfather explored the same theme famously with the line, It's not personal, Sonny. It's strictly business. I've actually heard a would-be community leader quote that line as a warped justification for his verbally abusive behavior.

    Before I explain further, I should state my belief that physical violence always crosses a line that's as wide as the Grand Canyon. Film depictions consider the question of whether the line is blurry, but it's certainly not. However, what intrigues me is how often “businesspeople” and celebrities will literally walk right up to the edge of that Grand Canyon, and pace back and forth there for days — and even years.

    In the politics of Free, Libre and Open Source Software (FLOSS), some people regularly engage in behavior right on that line: berating, verbal abuse, and intimidation. These behaviors are consistently tolerated, accepted, and sometimes lauded in FLOSS projects and organizations. I can report from direct experience: if you think what happens on public mailing lists is bad, what happens on the private phone calls and in-person meetings is even worse. The types of behavior that would-be leaders employ would surely shock you.

    I regularly ponder whether I have a duty to disclose how much worse the back-room behavior is compared to the already abysmal public actions. The main reason I don't (until a few decades from now in my memoirs — drafting is already underway ;) is that I suspect people won't believe me. The smart abusive people know how to avoid leaving a record of their most abusive behavior perpetrated against their colleagues. I know of at least one person who will refuse to have a discussion via email or IRC and insist on in-person or telephone meetings specifically because the person outright plans to act abusively and doesn't want a record.

    While it's certainly a relief that I cannot report a single incident of actual assault in the FLOSS community, I have seen behavior escalate from ill-advised and mean political strategies to downright menacing. For example, I often receive threats of public character assassination, and character assassination in the backchannel rumor mill remains ongoing. At a USENIX conference in the late 1990s, I saw Hans Reiser screaming and wagging his finger menacingly in the face of another Linux developer. During many FLOSS community scandals, women have received threats of physical violence. Nevertheless, many FLOSS “leaders” still consider psychological intimidation a completely reasonable course of action and employ it regularly.

    How long are we going to tolerate this, and should we simply tolerate it, merely because it doesn't cross that huge chasm (on the other side of which lies physical violence)? How close are we willing to get? Is it really true that any words are fair game, and nothing you can say is off-limits? (In my experience, verbally abusive people often use that claim as an iron-clad excuse.) But, if we don't start asking these questions regularly, our community culture will continue to deteriorate.

    I realize I'm just making a statement, and not proposing real action, which (I admit) is only marginally helpful. As Tor recently showed, though, making a statement is the first step. In other words, saying “No, this behavior is not acceptable” is undoubtedly the only way to begin. Our community has been way too slow in taking that one step, so we've now got a lot of catching up to get to the right place in a reasonable timeframe.

    Categories: FLOSS Project Planets

    Updated Google-chrome

    Mon, 2014-12-22 16:01

    Maybe you are using google-chrome-stable in Foresight-c7. Then you might be using the contrib repository. To get the latest, you need to change the repository to grab it from foresighters instead.

     

    I have updated the wiki to use foresighters repo instead, read more here.

    Categories: FLOSS Project Planets

    SAR GUI: Export sar / sysstat reports as PDF using kSar

    Sat, 2014-12-20 23:54
    Hello, If you are Linux Administrator you must know what SAR is, sar is a very useful utility for Linux Administrators to get the report of CPU Usage and You can monitor I/O, CPU Usage, Idle system state using sar utility. This article will help you to read / export sar reports in Graphical mode. […]
    Categories: FLOSS Project Planets

    Blogging, Music Production, and Experimentation – Part 4

    Sat, 2014-12-20 04:06
    A follow on from: http://dtbnguyen.blogspot.com/2014/12/music-production-and-experimentation_18.html
    Have been struggling to come up with ideas for establishing myself within the music sector. Have been going through the possibilities and some of the following options look interesting.

    When you are ready (have something worthy of selling to the public), submit your work to various music aggregators (and media outlets) for more advertising.
    http://musicaggregator.blogspot.com.au/
    http://musicaggregator.blogspot.com.au/p/add-your-music-blog.html
    http://musicbloglist.com/
    http://songtweak.com/

    Hook up with relevant social groups to get you some interest.
    https://www.facebook.com/AbletonUserGroupMelbourne?_fb_noscript=1
    https://www.ableton.com/en/community/user-groups/
    http://www.meetup.com/Ableton-Live-User-Group-Melbourne/

    Other options include the usual web specific blogs.
    https://soundcloud.com/
    http://www.mixcloud.com/
    https://bandcamp.com/ 
    I've sometimes seen MIDI files being sold online. Who's to say that up and coming artists can't do the same for themselves. Even if you are just a composer or soemthing who's beginining to learn the business you still need to create stems and samples that may be worthy of selling (sample some of the discs from some music magazines) and you'll understand what I mean. Besides, a lot of the time you need composition pieces to be able to audition for music school (if you ever intend to do so). The easiest way that I can think of at the moment to gather interest is to basically, stick the sample on loop and then stick it on YouTube. You can sell it via an online market or else via something like, https://selz.com/
    http://subaqueousmusic.com/free-dubstep-and-downtempo-midi-drums/
    https://www.dubstepforum.com/forum/viewtopic.php?f=8&t=193790
    http://www.nonstop2k.com/midi-files/archive.php?cid=50
    http://www.download-midi.com/files/genre/Dubstep
    http://www.partnersinrhyme.com/midi/index.shtml
    http://www.dancemidisamples.com/download-free-samples.html
    http://mididrumfiles.com/
    https://www.loopmasters.com/genres/49-Dubstep/products/1062-MIDI-Focus-Dubstep-Synths
    http://www.dancemidisamples.com/by-genre-45/dubstep.html
    https://primeloops.com/ultimate-dubstep-drummer.html
    http://www.midichords.com/midichords
    http://mididb.com/

    You may need to think about copyright difficulties if you decide to 'cover/copy' from another artist though.
    http://www.quora.com/Are-downloaded-MIDI-files-copyright-free

    Sell sound samples if you have anything worth sampling.
    http://www.midiworld.com/sounds.htm

    Sell synthesiser patch sets. Problem is that you often may not be able to sell anything if you don't have any music to be able to advertise your 'wares'. Stick the sample on loop on a group of notes and then run it through a presets at regular intervals to provide a sample of what the customer is being offered on YouTube.
    http://alonso-sound.com/dt_catalog/alonso-thomas-gold-spire-soundset/

    Sell music making templates. Problem is that like a lot of other things there is a huge market to that you need to deal with. It's a bit of a chicken and egg problem here. You need music to have people want to purchase the template?
    http://subaqueousmusic.com/product-category/live-packs/

    Another way is to simply make synthesiser software which is easily possible via Reaktor, create sample packs via Kontakt. A lot of the required documentation actually comes with the software to enable you to be able to create.
    http://www.native-instruments.com/en/community/reaktor-user-library/other/10/all/all/all/latest/1/
    http://www.reaktortips.com/search/label/Practical%20Reaktor

    Have been having significant troubles with regards to running CPU load when running certain software synthesiser VSTs. 'Freezing' seems like the easiest option without having to upgrade hardware.
    http://www.soundonsound.com/sos/nov07/articles/livetech_1107.htm
    https://www.ableton.com/en/articles/reduce-cpu-load/
    http://sonicbloom.net/en/ableton-live-tutorial-how-to-freeze-tracks-to-reduce-processing-power/

    If you can't figure anything else for the moment try to monetise you're musical journey in the meantime.
    http://www.theguardian.com/money/2011/sep/02/how-to-build-and-monetise-a-blog
    http://www.wpcopilot.com.au/blog/monetize-wordpress-blog/
    http://www.wpcopilot.com.au/affiliate-program/
    http://www.blogmarketingacademy.com/top-10-blog-monetization-strategies-ranked/
    http://www.problogger.net/make-money-blogging/
    Which reminds me there are some interesting options out there for those of you looking to simplify you're blogging environment (if you're running multiple blogs. Note that some of these options are no longer relevant and some services such as Tumblr and YouTube already have such facilities builtin).http://tweetymail.com/
    http://freenuts.com/10-ways-to-update-twitter-via-email/
    http://www.labnol.org/internet/email/send-twitter-updates-email-mobile-phone-without-sms/2955/https://support.google.com/blogger/answer/41452?hl=en
    http://mashable.com/2009/08/11/how-to-update-facebook/
    http://facebookawesometricks.blogspot.com.au/2013/09/easiest-way-to-update-facebook-status.html
    http://email.about.com/od/Facebook-Messages-Tips/qt/How-To-Post-Updates-And-Upload-Photos-By-Email-In-Facebook.htmhttp://bamajr.com/2013/02/16/posting-to-google-plus-via-email/
    http://www.computerworlduk.com/how-to/applications/3308148/how-to-post-to-google-by-email/
    Categories: FLOSS Project Planets

    Music Production and Experimentation – Part 3

    Fri, 2014-12-19 02:29
    A follow on from:
    http://dtbnguyen.blogspot.com.au/2014/12/music-production-and-experimentation.html

    Have created 'Classical', 'Foreign Hip Hop and R&B', and 'Soundtrack' playlists on my YouTube profile. Not much there at the moment. I'll add more as time goes on.
    https://www.youtube.com/channel/UCwVJG67iHHPbmBxuHVbyOlw/playlists

    I've been looking at doing a music course of some sort for a while now (short course or even a degree). Fees can range from several hundred to several thousand dollars.
    http://www.bhtafe.edu.au/courses/local/Pages/MUPF5.aspx
    http://www.aim.edu.au/?gclid=CLfnmJeMyMICFVIDvAodhaUAsw
    http://www.aim.edu.au/future-students/domestic-student-information/fees
    http://www.aim.edu.au/courses/composition-music-production/entry-requirements
    https://www.kangan.edu.au/courses/tafe-courses/browse-for-courses/course-detail?coursecode=2404
    http://www.jmcacademy.edu.au/Course/Contemporary-Music-and-Performance.cfm
    http://www.melbournepolytechnic.edu.au/sem/music-courses/?gclid=CO22hpeNyMICFUkGvAodmWUA0g
    http://www.vu.edu.au/courses/advanced-diploma-of-music-cus60109
    http://www.careerfaqs.com.au/online-courses/diploma-of-music-melbourne/
    https://www.nida.edu.au/courses/vet/musical-theatre
    http://www.melbournepolytechnic.edu.au/study-areas/creative-industries/music/?gclid=CJOz4fDnx8ICFVcJvAod5BkAeg#
    http://www.cae.edu.au/web/?category=58
    http://www.cae.edu.au/web/?cinfo=courseguides

    There may be some government help but you must fit specific criteria.
    http://www.melbournepolytechnic.edu.au/study-areas/creative-industries/music/?gclid=CJOz4fDnx8ICFVcJvAod5BkAeg
    http://www.melbournepolytechnic.edu.au/shortcourses/song-writing-online
    http://www.ctaonline.com.au/Government-Funding-Training-Courses.html
    http://www.eaa.edu.au/index.php/prospective-students/government-funding
    http://www.melbournepolytechnic.edu.au/fees/fees-for-local-students/
    http://www.vic.gov.au/grants.html


    There are, of course, some online options which will also provide certification of skills if you aren't keen on spending too much time on campus and/or don't have the time/dedication to go the other way. In most cases, you'll have to pass an audition of some sort though which involves a demonstration of proficiency, a portfolio, as well as possibly an academic pedigree (high school or private tuition).
    http://www.quora.com/What-are-some-websites-similar-to-Coursera
    https://www.coursera.org/course/classicalcomp
    https://www.coursera.org/signature/course/classicalcomp/973841
    http://www.quora.com/What-are-some-websites-similar-to-Coursera
    http://ocw.mit.edu/courses/music-and-theater-arts/
    http://ocw.mit.edu/courses/
    http://ocw.mit.edu/courses/music-and-theater-arts/21m-303-writing-in-tonal-forms-i-spring-2009/
    http://www.matchacollege.com/blog/2008/get-into-the-rhythm-50-open-courseware-collections-for-musicians/
    http://www.musictheory.net/
    http://musescore.org/
    http://www.pianopractice.org/


    There will be some websites which will often place there reference materials behind walls of some sort but with intelligent searching you can often find a way around these limitations without having to register/signup for further marketing material.
    https://s3.amazonaws.com/bm-marketing-assets/handbooks/music-theory-handbook.pdf
    http://bundles2.bittorrent.com/berklee-online/pdf/Berklee%20Online%20-%20Piano%20Handbook.pdf

    http://bundles2.bittorrent.com/berklee-online/

    Some material on programming synthesisers.
    http://www.musicradar.com/tuition/tech/26-essential-synth-tutorials-224845/
    http://exellon.net/book/The_Complete_Synthesizer.pdf
    http://www.infekted.org/virus/files/HowardScarr-VirusTutorial-ProgrammingAnalogueSynths.pdf

    A place where you can purchase parts to experiment with .
    http://littlebits.cc/
    http://littlebits.cc/kits/synth-kit

    There are a lot of tablet based music making applications now .
    http://www.musicradar.com/news/tech/the-best-android-music-making-apps-in-the-world-today-276167
    http://www.musicradar.com/news/tech/the-best-android-music-making-apps-in-the-world-today-276167/4
    http://www.musicradar.com/news/tech/free-music-software-the-best-audio-app-and-plug-in-downloads-on-the-net-255880

    Sometimes you don't have a vocalist nearby. An option is to try computerised vocals.
    http://www.bestservice.de/en/virtual_instruments/vocals.html
    http://howtomakeelectronicmusic.com/how-to-create-computerized-vocals-in-fl-studio-without-vocalist
    https://www.dubstepforum.com/forum/viewtopic.php?f=8&t=263246

    Sometimes, I have difficulties with getting the type of sound that I want and/or need. Here are some itneresting manuals.
    http://lakeishak129.files.wordpress.com/2014/01/the-mixing-engineers-handbook-2nd.pdf
    http://www.bengribaudo.com/audio-engineering/free-learning-resources
    http://www.martin-audio.com/userguides/GUIDES/MANUALS/Engineer%20User%20Guide.pdf
    http://www.yamahaproaudio.com/global/en/training_support/selftraining/

    Having being having some frustrations with sound libraries being built with later versions of Kontakt/Reaktor. Has been frustrating me to the point where I thought is there a way to bypass the checks (easily possible with many simple system checks. I only investigated as I'm on a mobile prepaid connection at the moment which means that I am trying limit my downloads.).
    http://www.native-instruments.com/forum/threads/ewql-libraries-with-more-recent-kontakt.148838/
    http://www.native-instruments.com/en/support/knowledge-base/show/904/installing-different-versions-of-the-same-native-instruments-application-on-one-computer/
    http://www.native-instruments.com/en/support/all-downloads/
    http://co.native-instruments.com/index.php?id=freeupdates
    http://www.native-instruments.com/?id=freeupdates
    http://www.native-instruments.com/en/support/downloads/
    https://co.native-instruments.com/?id=updates

    Some interesting tips with regards to 'House Music'.
    http://modeaudio.com/magazine/deep-house-5-production-essentials
    http://www.soundonsound.com/sos/oct99/articles/20tips.htm
    http://en.wikipedia.org/wiki/List_of_progressive_house_artists
    http://en.wikipedia.org/wiki/Kaskade
    http://en.wikipedia.org/wiki/Progressive_house
    http://en.wikipedia.org/wiki/List_of_progressive_house_artists
    https://topdeejays.com/genres//


    Setup a new Tumblr account. Basically, a mirror of my Twitter account.
    http://dtbnguyen.tumblr.com/
    Categories: FLOSS Project Planets

    Password hygiene – every man’s responsibility

    Fri, 2014-12-19 02:18

    Everybody knows what hand hygiene is: hands are disinfected every time we enter a hospital. In the same way as germ-free hands stops diseases from spreading, password hygiene helps to prevent the misuse of credentials. Password hygiene may feel useless when the effect is not immediately visible, but it is never the less very important in the age of information society.

    Password hygiene is no harder that normal hygiene. Everybody can learn it with the following simple principles:

    1. Store your passwords securely

    A trick to avoid storing passwords in plain-text on paper

    The best would of course be to store all passwords inside one’s head, but since remembering all credentials by heart isn’t simply possible, another good option is keeping the in your wallet. People keep money in their wallets, so most of us are used to store it securely.

    Passwords can be “encrypted” on paper with a simple trick: use a common first part in all passwords, for example ‘Ma55i’, which you remember by heart. Then write the last part of the password on paper, for example ‘hU8kkP’. Only you will know that the complete password is then ‘Ma55ihU8kkkP’.

    Remember also to make backups of it for example by xeroxing the paper slip. Use the money analogue to choose a good place to store the backup: put the important paper in a safe.

    Using paper has some drawbacks, like the need to type passwords all the time. Using a piece of software on the computer will make things easier, because then it is possible to simply copy-paste the usernames and passwords from the program. The recommended program is KeePass. It is free and open source software, its internal functioning is transparent and it is unlikely to have backdoors or other weaknesses, and the same program is available for multiple platforms, including Windows, Linux, OS X, Jolla, Android.

    2. Use different passwords in different systems

    It is dangerous to use the same password in multiple accounts. For example if your Twitter-password leaks and somebody can log in to Twitter using your account, they will quickly find out what your e-mail address is, and then for sure try to log into your e-mail account using the same password you had on Twitter. Can you afford to loose control of multiple accounts at the same time?

    Here too, programs like KeePass help, because they facilitate the automatic generation of new passwords for each new account.

    3. Use passwords which are difficult to guess and complex

    KeePass password strength meter

    Password crackers always start out by trying to guess typical passwords, like horse99 or 123hound. Don’t have a weak password that is likely to be cracked by brute-force password cracking tools. A good password is complex and consists of at least 9 characters, and includes both capitals and small letters, numbers and special characters like +-.,_:;.

    Again, KeePass helps with this too, because it has a built-in password strength meter, which will tell you it the password is strong enough, or it can even generate the passwords automatically for you.

    4. Change your passwords regularly – or immediately if you think it has leaked!

    If the password is strong enough, then a suitable interval to change passwords is a few years. If a password is too weak, then it does not matter much if you change if often or not. Rule number 3 is therefore more important.

    In KeePass the dates when a new password was saved is automatically stored, so it can also help you see how old your passwords are.

    If somebody suspect somebody peaked over your shoulder and spied on your password, you need to change it immediately. Well designed computer systems show you on login when your previous login was. For example if you return to work after a holiday, and when you log in the system tells your last visit was a few days ago – while you were still on holiday – you will notice that something is wrong and know that the password needs to be changed.

    5. Never tell you password to anybody

    Never ever tell your password to anybody. No administrator on any system needs to know your password – administrators can anyway always reset your account and get the password that way. If somebody asks for your passwords, it is almost for sure some kind of fraud.

    The most common reason for password leaks is that users have themselves told the password to somebody who had a credible enough sounding reason to ask for it!

    6. Send you passwords to the correct system and only using a secure connection

    When you are about to sign in to a system, try to make sure that you are really connected to the correct system and that the connection is securely protected. A common way to steal passwords is to do a so called man-in-the-middle attack, where the user is tricked in a way or another to enter their credentials to a false system, yet the connection is passed on to the real system so the user does not notice anything unusual. For websites make sure the URL in the address bar is correct before you sign in and make sure it contains the s in the https part so that the connection is secure.

    This is however not a guarantee – sophisticated attacks can make the remote system appear perfectly normal with correct address and everything, because the attack might target the underlying network infrastructure. But none the less, every user must make sure they do their own part in keeping the systems secure, and what happens after that is up to the system engineers to take care of.

    Original presentation in Finnish

    ..is available on Slideshare:

    Categories: FLOSS Project Planets

    Tortilla, a Python API wrapper

    Wed, 2014-12-17 13:18

    By Vasudev Ram



    tortilla is a Python library for wrapping APIs. It's headline says "Wrapping web APIs made easy."

    It can be installed with:
    pip install tortilla
    I tried it out, and slightly modified an example given in its documentation, to give this:
    # test_tortilla.py
    import tortilla
    github = tortilla.wrap('https://api.github.com')
    user = github.users.get('redodo')
    for key in user:
    print key, ":", user[key]
    That code uses the Github API (wrapped by tortilla) to get the information for user redodo, who is the creator of tortilla.
    Here is the output of running:
    python test_tortilla.py
    bio : None
    site_admin : False
    updated_at : 2014-12-17T16:39:55Z
    gravatar_id :
    hireable : True
    id : 2227416
    followers_url : https://api.github.com/users/redodo/followers
    following_url : https://api.github.com/users/redodo/following{/other_user}
    blog :
    followers : 6
    location : Kingdom of the Netherlands
    type : User
    email : dodo@gododo.co
    public_repos : 9
    events_url : https://api.github.com/users/redodo/events{/privacy}
    company :
    gists_url : https://api.github.com/users/redodo/gists{/gist_id}
    html_url : https://github.com/redodo
    subscriptions_url : https://api.github.com/users/redodo/subscriptions
    received_events_url : https://api.github.com/users/redodo/received_events
    starred_url : https://api.github.com/users/redodo/starred{/owner}{/repo}
    public_gists : 0
    name : Hidde Bultsma
    organizations_url : https://api.github.com/users/redodo/orgs
    url : https://api.github.com/users/redodo
    created_at : 2012-08-27T13:03:15Z
    avatar_url : https://avatars.githubusercontent.com/u/2227416?v=3
    repos_url : https://api.github.com/users/redodo/repos
    following : 2
    login : redodo
    Adding:
    print type(user)
    to the end of test_tortilla.py, shows that the user object is of type bunch.Bunch.

    Bunch is a Python module providing "a dictionary that supports attribute-style access, a la JavaScript."

    Did you know that tortillas are roughly similar to rotis?

    - Vasudev Ram - Dancing Bison Enterprises

    Signup for news about new products from me.

    Contact Page

    Share | var addthis_config = {"data_track_clickback":true}; Vasudev Ram

    Categories: FLOSS Project Planets

    Flash not working in iceweasel

    Mon, 2014-12-15 09:30
    If the some update of iceweasel has broken the flash in iceweasel,and all flash sites stop working , we might see the following message in the page Tool->Addons->plugins

    shockwave flash is known to be vulnerable

    The link given in the page to update the flash might be broken.

    The workaround for this is to update the flash with the latest one from

    https://get.adobe.com/flashplayer/

    Select the .tar.gz version for debian systems. Close all instances of iceweasel and Untar the downloaded package.

    $ tar -xzvf install_flash_player_11_linux.i386.tar.gz

    After the untar, we will get a folder named usr, a file libflashplayer.so and a file readme.txt.

    We need to copy the file libflashplayer.so to the folder which contains the plugins for iceweasel.

    $ cp libflashplayer.so /usr/lib/iceweasel/.

    For mozilla copy it to .

    $cp libflashplayer.so /usr/lib/mozilla/plugins/libflashplayer.so

    Now launch iceweasel and the problem with flash should not occur.
    Categories: FLOSS Project Planets

    Indian couple (1 Xoogler) buys small US bank, innovates online payments

    Sun, 2014-12-14 14:31

    By Vasudev Ram

    Interesting story of innovation in the financial space, involving an Indian couple (of whom one is a Xoogler a.k.a ex-Googler), a small US bank, and cheaper / faster online money transfers / payments:


    (Did you know that the English word bank supposedly comes from the old Italian word banca (for bench)?

    An Indian couple has bought a small bank in Weir, Kansas, USA, and is using it to innovate in the online financial payments / money transfers space (while preserving and improving the existing brick-and-mortar business of the bank). The site through they allow faster / cheaper payments or money transfers from the US to India (and currently, or soon, other countries), is globalremit.com. Their rate for sending a payment under $1000 USD is $2.50, which works out to 0.25 percent. For above $1000, it is free (disclaimer: all this is according to what I saw on the site recently).

    Suresh Ramamurthi earlier worked at Google on the Checkout product, and Suchitra Padmanabhan earlier worked at Lehman Brothers and Bankers Trust.

    I saw this news via this tweet by Quentin Hardy (@qhardy), Deputy Tech Editor, The New York Times. (Saw it from a retweet by Bernard Lunn.)

    The tweet goes thusly:

    "Guy from India learns payments at Google, buys tiny Kansas bank, transforms money. Great, from @nathanielpopper dealbook.nytimes.com/2014/12/13/sma…"

    And here is the New York Times article referred to in the tweet:

    Small Bank in Kansas Is a Financial Testing Ground

    - Vasudev Ram - Dancing Bison Enterprises

    Signup for email about new products from Vasudev Ram.

    Contact Page

    Share | var addthis_config = {"data_track_clickback":true}; Vasudev Ram

    Categories: FLOSS Project Planets

    cc1: all warnings being treated as errors

    Sun, 2014-12-14 09:54
    While compiling big source codes, written in C, most often using make, we can pass many options called as flags, to gcc compiler, to control the behaviour of the compiler while compilation.

    Encountering warnings in any code is common, but some times while running the make command we might hit the error.

    cc1: all warnings being treated as errors

    This is because the compiler has been instructed not to ignore the warnings and treat all the warnings as errors. This is done by passing the options -Werror to gcc compiler. Ignoring warnings in bigger codes is not considered a good practice and to avoid the same the -Werror option is used.

    For example the make file could have a like passing the options as below.

    TARGET_CFLAGS = -ffreestanding -Os -DGRUB_MACHINE_PCBIOS=1 -Wall -W -Wshadow -Wpointer-arith -Wmissing-prototypes -Wundef -Wstrict-prototypes -fno-strict-aliasing -g -falign-jumps=1 -falign-loops=1 -falign-functions=1 -mno-mmx -mno-sse -mno-sse2 -mno-3dnow -fno-dwarf2-cfi-asm -DGRUB_MACHINE_PCBIOS=1 -m32 -fno-stack-protector -mno-stack-arg-probe -Werror

    We can see that the last option is -Werror. This flag causes the error that we saw above. So if we do not want to treat warnings as errors, we just need to remove -Werror from the list of Target Flags. But be careful, it might not be the wisest thing to do.
    Categories: FLOSS Project Planets