Skip to content

Instantly share code, notes, and snippets.

View theelous3's full-sized avatar

M.J. theelous3

  • Dublin, Ireland
View GitHub Profile
@theelous3
theelous3 / python_encoding_strings.py
Last active June 15, 2018 15:30
Python formatting list of encodings as strings.
['ascii',
'big5',
'big5hkscs',
'cp037',
'cp273',
'cp424',
'cp437',
'cp500',
'cp720',
'cp737',
import re
import string
from random import choice
import curio
from curio.socket import *
from talkology import *
k=lambda xs:sum([int(z)for y in[str(x*2)for x in[int(d) for d in xs[::-1]][1::2]]for z in y]+[int(d)for d in xs[::-1]][::2])%10==0
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!-- Generated by: TmTheme-Editor -->
<!-- ============================================ -->
<!-- app: http://tmtheme-editor.herokuapp.com -->
<!-- code: https://github.com/aziz/tmTheme-Editor -->
<plist version="1.0">
<dict>
<key>name</key>
<string>otomic</string>
import XMonad
import XMonad.Layout.Spacing
import XMonad.Layout.Gaps
import XMonad.Hooks.ManageDocks
myLayout = gaps [(U, 10), (R, 10), (L, 10), (D, 10)] $ smartSpacing 10 $ (tiled ||| Mirror tiled ||| Full)
where
tiled = Tall nmaster delta ratio
nmaster = 1
ratio = 1/2
Config {
-- appearance
font = "xft:Bitstream Vera Sans Mono:size=9:bold:antialias=true"
, bgColor = "#3B3A32"
, fgColor = "#D9D7BF"
, position = TopW C 98
, border = BottomB
, borderColor = "#000000"
#!/bin/sh
if test -t 1; then
exec 1>/dev/null
fi
if test -t 2; then
exec 2>/dev/null
fi
0x1dd3ed5ba7ad19e8a23c6b01679e4b14464fa2b5
def intersperse(xs, y, gap=1, pre=False):
for i, x in enumerate(xs):
if not pre:
yield x
if not i % gap:
yield y
if pre:
yield x
list(intersperse([1, 2, 3, 4, 5, 6], "X"))
(('fb'if not x%15else('f'if not x%3else(x%5or'b'))or x)for x in range(1,101))