FSi. The blog.

This is my tumblog. Read more about me.
Jul 6 '14

So I went to a jazz fest…

Tags: усадьбаjazz polaroid creepy

Feb 17 '14

python one-liner to choose 10 random subfolders

So, the basic idea is that I pirate music a lot and, as it sometimes is the case, am quite often lost when it comes to choosing something to actually listen to. (hey, boys and girls, that’s why you don’t pirate!)

Anyway, there’s this folder on my pc, called ~/Downloads/Music, right, and inside are a few hundred subfolders, each holding a different music album which I’ve downloaded (possibly a long while ago) but haven’t got time and/or resolve to listen to yet.

I used to count the number of albums with handy ls | wc -l line, then go to http://random.org to roll the appropriately-sided die a number of times.

Then it got tedious.

So I decided to make a simple python one-liner to do that for me. I mean, how hard could it be?

Turns out, not hard at all.

    #! /usr/bin/python3
    import os, random
    print('\n'.join(random.sample([d for d in os.listdir('.') if not os.path.isfile(d)], 10)))

Well, technically it’s a three-liner, but who cares. It gets the job done. Then I can use its output as an argument for mv so the randomly-chosen albums will get transferred to my mp3 player. Quite handy!

Cheers!

Apr 25 '13
pic unrelated

pic unrelated

226 notes (via miloserdie)

Apr 24 '13

Apr 19 '13

60 notes (via togawafiction & ulan-bator)

Apr 15 '13
At last I made a successful sponge cake! Third time’s the charm, apparently.

At last I made a successful sponge cake! Third time’s the charm, apparently.

Mar 5 '13

zong1:

me

(Source: elwnenano)

29,009 notes (via error888 & elwnenano)

Feb 22 '13
В свободное от работы время люблю выглядеть, как дебил.

В свободное от работы время люблю выглядеть, как дебил.

3 notes

Feb 18 '13
Fap.

Fap.

Jan 30 '13

That moment when..

goatinahat:

You realize you’ve been worshipping Eris your entire life.

14 notes (via fundiediscord & goatinahat)