Skip to content

Instantly share code, notes, and snippets.

@ghost355
ghost355 / gist:de3ec24795cf80fdc8a675e352e0f332
Last active November 8, 2022 15:56
Vim testing .vimrc file
Настройка Vim
1. Базовая настройка
a. Настройка поведения
b. Настройка внешнего вида
c.
2. Настройка клавиш
a. Настройка Lead key
b. Настройка команд
c. Настройки для плагинов
@ghost355
ghost355 / gist:95ae31d114368b6c6ccc0fe1c842da4d
Created March 23, 2021 10:19
VIMRC ets-labs / python-vimrc
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
" __ _ _ _ __ ___ _ __ ___ "
" \ \ / / | '_ ` _ \| '__/ __| "
" \ V /| | | | | | | | | (__ "
" \_/ |_|_| |_| |_|_| \___| "
" "
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
let $vimhome=fnamemodify(resolve(expand("~/.vimrc")), ':p:h')
let $vundle=$vimhome."/bundle/Vundle.vim"
@ghost355
ghost355 / gist:6e169c87a5bbcbf5aaec754ffb19ded7
Last active January 30, 2023 22:44
draw charts in pdf IBD style
# usage: make_charts(one_ticker as stirng or list of string, number_days(bars)for_showing)
from tqdm import tqdm
import pandas_ta as ta
import yfinance as yf
import pandas as pd
import numpy as np
import mplfinance as mpf
import matplotlib.pyplot as plt
@ghost355
ghost355 / gist:83cfc0791ae3f4b41611b6d5c98e1f39
Last active January 28, 2021 16:46
full history stock chart like IBD in multipage pdf
import json
from tqdm import tqdm
from bs4 import BeautifulSoup
import requests
import pandas_ta as ta
import yfinance as yf
import pandas as pd
import numpy as np
import mplfinance as mpf
@ghost355
ghost355 / gist:594270c771a10fdc79f3c5458a73c9c8
Last active January 28, 2021 16:44
Creating several overlapping pdf with a stock chart for printing and analysis (DRAFT edition)
import json
from tqdm import tqdm
from bs4 import BeautifulSoup
import requests
import pandas_ta as ta
import yfinance as yf
import pandas as pd
import numpy as np
import mplfinance as mpf
;; Build and Run C code from Spacemacs
;; If the code hasn't compilied then we build the code and create an execute file with a buffer's name without an extensions in the current folder
;; Or just run the program in bottom pop-up shell window
;; P.Pavlov 2016
(defun execute-c-program ()
(interactive)
(let ((c-code-compile (concat "gcc " (buffer-name) " -o " (file-name-base)))
(c-code-run (concat "./" (file-name-base))))
(if (not (locate-file (file-name-base) "."))
(shell-command c-code-compile))
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