Skip to content

Instantly share code, notes, and snippets.

def arg_process():
for arg in sys.argv[1:]:
if arg in ["-h", "--help"]:
print("usage:csv2html.py [maxwidth=int] [format=str] < infile.csv > outfile.html")
return None, None
elif arg.startswith(maxwidth_arg):
try:
maxwidth = int(arg[len(maxwidth_arg):])
except ValueError:
pass
@ghost355
ghost355 / httpswwwdropboxcoms0mq5bj3sm4qzc2lOmenTokenobjdl1.obj
Created January 24, 2016 08:14
модель жетона знамений из Древнего Ужаса
This file has been truncated, but you can view the full file.
# Blender v2.70 (sub 0) OBJ File: 'OmenToken.blend'
# www.blender.org
o Circle.004
v -0.263000 -0.000935 0.492039
v -0.238541 -0.000935 0.504352
v -0.263208 -0.000905 0.492427
v -0.286827 -0.000935 0.478542
v -0.262793 -0.000905 0.491651
v -0.238352 -0.000905 0.503954
v -0.238729 -0.000905 0.504750
# Blender v2.70 (sub 0) OBJ File: 'OmenTokenCollision.blend'
# www.blender.org
o Circle.004
v -0.307290 -0.000000 0.164250
v -0.314980 -0.000000 0.148974
v -0.298861 -0.000000 0.179130
v 0.333429 -0.000000 -0.101145
v 0.337991 -0.000000 -0.084662
v 0.328065 -0.000000 -0.117384
v -0.221043 -0.000000 -0.269341
@ghost355
ghost355 / EmacsAutoKbdSwitch.el
Last active May 22, 2022 02:22
How to smart switch Russian /English keyboard layout mode when use Emacs and Evil mode (or Spacemacs)
;; Mac OS Edition
;; This code helps us to work with Spacemacs (Emacs + Evil mode) in multilanguage mode
;; You need to install https://github.com/vovkasm/input-source-switcher
;; It's a console utilite to switch input language.
;; Pavel Pavlov (c) 2015
;; In other OS you'll have to change name of langages layers and name of Switcher like issw
;; In thу Terminal # issw show you namу of the current layout
(setq shell-file-name "/bin/bash")
(setq lang_source "com.apple.keylayout.US") ;set default var lang_source for issw arg
(add-hook 'evil-insert-state-entry-hook ;what we do when enter insert mode
@ghost355
ghost355 / .dir.locals.el
Last active September 30, 2015 21:07
Add this file dir.locals.el in root of your home folder or root of your Haskell projects folder or into each of folder your Haskel projects
((haskell-mode
. ((haskell-indent-spaces . 2)
(hindent-style . "gibiansky")
(haskell-process-type . stack-ghci)
(haskell-process-path-ghci . "stack")
(haskell-process-args-ghci . ("ghci"))
(haskell-process-args-stack-ghci . ("--ghc-options=-ferror-spans" "--with-ghc=ghci-ng"))))
(haskell-cabal-mode
. ((haskell-process-type . stack-ghci)
(haskell-process-path-ghci . "stack")
@ghost355
ghost355 / .spacemacs
Created September 30, 2015 20:49
My .spacemacs config file. Working well with Haskell stack only environment.
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration."
(setq-default
;; List of additional paths where to look for configuration layers.
;; Paths must have a trailing slash (i.e. `~/.mycontribs/')
dotspacemacs-configuration-layer-path '()