Skip to content. | Skip to navigation

Personal tools
Log in
You are here: Home - Blog

Skriv på bästa amerikanska

Assisterar med att ta bort passivum, använda verb istället för adverb med mera, i engelska språket.



Read more: Link - Hemingway

Jul 22, 2014 06:04 | Comments (2)

A handbook on how to build trust and topple dictators

Written by Gene Sharp. Can be downloaded here:

Deals with how to build trust between people and slowly strengthen the civil society until the dictator can be toppled (and something better come in his place).


From Dictatorship to Democracy, A Conceptual Framework for Liberation

Read more: Link - From Dictatorship to Democracy - Wikipedia, the free encyclopedia

Jul 12, 2014 12:04

Python's dateutils: "Generic parsing of dates in almost any string format"

Worked like a charm for me:


Generic parsing of dates in almost any string format;

Read more: Link - python-dateutil - Labix

Jun 27, 2014 09:19

How to share a global variable across python modules

How can you have a global object or variable that you can share across modules in python? Each module in python has its own name space and is happily unaware of anything defined in the others' name spaces. You can however import a variable from another name space, and then you can modify that and it will be visible in other modules that do the same. Except that you can't, because now it is in your name space and not the same as what the others have imported. What you can do however is to import the module in which it is defined, and then it gets changed everywhere.


Basically this won't work:

from flum import bletch

bletch = 67

That change will not be picked up by any other modules that do the same kind of import.

But this will work:

import flum

flum.bletch = 67

Because there is only one instance of each module, any changes made to the module object get reflected everywhere. For example:

Read more: Link - How do I share global variables across modules?

Jun 19, 2014 06:30

A quick way to switch keys and values in a python dictionary

{value:key for key, value in a_dictionary.items()}


Tested in python 2.7

Jun 12, 2014 07:55

Having something be decrypted after a specific amount of time

Even though we have got used to computers getting faster all the time, the truth of the matter is that certain things, such as clock speed, have barely improved at all for many years. If we can find calculations whose speed are basically proportional to the clock speed one can therefore know, roughly, how long time that calculation will take in wall clock time (human time) on a single processor. If that calculation is a decryption, then you have made a secret that will not be revealed before a certain amount of time. The calculation must not be possible to parallelize.


The decryption process uses long chains of hashes so it can't be parallelized - one fast CPU can decrypt the file faster than a million slightly slower CPUs. Moores law long ago ended for scalar performance - CPU clock speeds haven't budged in years - so predicting how long it'll take for the decryption to happen is possible

Read more: Link - Timelock: time-release encryption incentivised by Bitcoins (w/ 320mBTC bounty) : Bitcoin

Jun 04, 2014 03:28

This may be a book worth reading

Liberalism: The Life of an Idea. By Edmund Fawcett.Princeton University Press; 468 pages; $35 and £24.95. Buy from (ISBN=unknown)

Read more: Link - Liberal thought: On the barricades | The Economist

May 27, 2014 07:35

Virusexperiment inte värt risken

But in a report on Tuesday, researchers at Harvard and Yale universities argue that the benefits of the work are outweighed by the risk of pathogenic strains escaping from laboratories and spreading around the world. They calculate that if 10 high-containment labs in the US performed such experiments for 10 years, the chance of at least one person becoming infected was nearly 20%. If an infected person left the laboratory, the virus might then spread more widely.

Read more: Link - Virus experiments risk unleashing global pandemic, study warns | World news | The Guardian
May 20, 2014 08:04

Blod kan göras ungt igen och föryngra hela personen

Verkar det som, mycket intressant om de kommer nånvart med detta:


The Harvard teams went on to show they could replicate the anti-ageing effects of young blood with injections of a single blood protein called GDF11. The amount of GDF11 in the blood slumps when mice grow old. The injections restored the protein to more youthful levels.

Man kan f ö köpa GDF11 över Internet. Nån gamling kanske vill prova?

Read more: Link - Infusions of young blood may reverse some effects of ageing, studies suggest | Science | The Guardian

May 04, 2014 09:20

Install Oracle Java on Ubuntu the easy way

I cannot vouch for the quality or integrity but my guess is that it is legit.


sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

Read more: Link - 10 Things To Do After Installing Ubuntu 14.04 Trusty Tahr To Get A Near Perfect Desktop ~ Web Upd8: Ubuntu / Linux blog

Apr 19, 2014 10:59