start new:
tmux
start new with session name:
tmux new -s myname
# inspired by the algorithm to find all possible strings from a given | |
# set of alphabets (as in the function permute here) | |
# the execution time is compared with itertools.permutations | |
def permute(lst): | |
if len(lst) < 2: | |
yield lst | |
else: | |
for perm in permute(lst[1:]): | |
for i in range(len(lst)): |
#!/bin/bash | |
# Paste at Pastebin.com using command line (browsers are slow, right?) | |
# coder : Anil Dewani | |
# date : Novemeber 7, 2010 | |
#help function | |
howto() | |
{ | |
echo "\ | |
Pastebin.com Bash Script \ |
#!/bin/bash | |
# | |
# This is sp, the command-line Spotify controller. It talks to a running | |
# instance of the Spotify Linux client over dbus, providing an interface not | |
# unlike mpc. | |
# | |
# Put differently, it allows you to control Spotify without leaving the comfort | |
# of your command line, and without a custom client or Premium subscription. | |
# |
#!/usr/bin/env python3 | |
# Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015 The spop contributors | |
# | |
# This file is part of spop. | |
# | |
# spop is free software: you can redistribute it and/or modify it under the | |
# terms of the GNU General Public License as published by the Free Software | |
# Foundation, either version 3 of the License, or (at your option) any later | |
# version. |
# It is an order of magnitude slower. So dont try this at home. I wanted to save | |
# it since I found this list comprehension interesting when I came up with it. | |
import itertools | |
def comprehend(long_list, batch_size): | |
return [[u for u in k if u is not None] for k in | |
itertools.izip_longest(*[long_list[i::batch_size] | |
for i in range(batch_size)])] |