Skip to content

Instantly share code, notes, and snippets.

@poulter7
poulter7 / ContentView.swift
Created Apr 21, 2020
An example of using UserDefaults
View ContentView.swift
import SwiftUI
struct ContentView: View {
// stores the input from the text field
@State private var message = ""
// stores the saved input
// note the this variable is initialized from the UserDefaults
@State private var pesistedMessage = UserDefaults.standard.string(forKey: "UserMessage")
var body: some View {
View 01_bc_day_04.md

For Python Quants Bootcamp

This is the Gist the For Python Quants Bootcamp in London 24. November 2017 (http://fpq.io)

This fourth boocamp day is about Python for Algorithmic Trading (II).

Topics

View 01_overview.md

For Python Quants Bootcamp

This is the Gist the For Python Quants Bootcamp in London, 21.-24. November 2017 (http://fpq.io)

Notebooks & Code Files

View 01_bc_day_03.md

For Python Quants Bootcamp

This is the Gist the For Python Quants Bootcamp in London 23. November 2017 (http://fpq.io)

This third boocamp day is about Python for Algorithmic Trading (I).

Topics

@poulter7
poulter7 / timepoint
Created Apr 7, 2013
Unix converters
View timepoint
datetimes = [datetime.datetime.fromtimestamp(timestamp) for timestamp in timestamps]
dates = matplotlib.dates.date2num(datetimes)
View sleep_until_modified.sh
#!/bin/bash
SCRIPTNAME=`basename "$0"`
print_help() {
cat << EOF
Usage: $SCRIPTNAME filename
Uses 'inotifywait' to sleep until 'filename' has been modified.
Inspired by http://superuser.com/questions/181517/how-to-execute-a-command-whenever-a-file-changes/181543#181543
View main.py
main.py
a = 7
import second
print f(a)
---------------
second.py
View domain_extract.clj
(import '(java.io BufferedReader FileReader))
(line-seq (BufferedReader. (FileReader. "users.txt")))
@poulter7
poulter7 / .vimrc
Created Mar 7, 2012
For Andy... a simple addition to .vimrc for rails development
View .vimrc
set nocompatible
filetype indent plugin on | syn on
set hidden
filetype on
filetype plugin on
filetype indent on
" let's copy paste some lines from documentation
fun! SetupVAM()
let addons_base = expand('$HOME') . '/.vim/vim-addons'
@poulter7
poulter7 / setup
Created Mar 1, 2012
setup an environment quickly
View setup
#!/bin/bash
mkdir ~/poulter7setup
cd ~/poulter7setup
git clone https://github.com/poulter7/dotfiles
git clone https://github.com/poulter7/Vim-files
cd ~
ln -s ~/poulter7setup/Vim-files/.vimrc
ln -s ~/poulter7setup/dotfiles/.bash_tweaks
ln -s ~/poulter7setup/dotfiles/.bash_aliases
echo '
You can’t perform that action at this time.