Skip to content

Instantly share code, notes, and snippets.

node_modules
*.swp
@ChristianSch
ChristianSch / min-char-rnn.py
Created October 27, 2015 20:07 — forked from karpathy/min-char-rnn.py
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@ChristianSch
ChristianSch / macvim-padding
Created January 29, 2016 14:42 — forked from meleyal/macvim-padding
Add padding to MacVim windows
defaults write org.vim.MacVim MMTextInsetTop '10'
defaults write org.vim.MacVim MMTextInsetLeft '10'
defaults write org.vim.MacVim MMTextInsetBottom '10'
defaults write org.vim.MacVim MMTextInsetRight '10'
@ChristianSch
ChristianSch / fish-prompt.sh
Created November 10, 2016 13:21 — forked from gak/fish-prompt.sh
My custom fish prompt code explained at http://geraldkaszuba.com/tweaking-fish-shell/
function _common_section
printf $c1
printf $argv[1]
printf $c0
printf ":"
printf $c2
printf $argv[2]
printf $argv[3]
printf $c0
printf ", "
@ChristianSch
ChristianSch / tmux-cheatsheet.markdown
Created September 9, 2017 16:06 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@ChristianSch
ChristianSch / geneticAlgorithms
Created May 6, 2018 09:02 — forked from thertrader/geneticAlgorithms
Using Genetic Algorithms in Quantitative Trading
############################################################
## Using Genetic Algorithms in Quantitative Trading
##
## thertrader@gmail.com - Mar 2014
############################################################
library(PerformanceAnalytics)
library(rgenoud)
library(quantmod)
library(TTR)
import alpaca_trade_api as tradeapi
api = tradeapi.REST(key_id=<your key id>,secret_key=<your secret key>)
class positionHandler:
def __init__(self,startingBalance=10000,liveTrading=False):
self.cashBalance = startingBalance
self.livePositions = {} # Dictionary of currently open positions
self.openOrders = [] # List of open orders
self.positionHistory = [] # List of items [Symbol, new position size]

What would you need:

Hardware requirements

@ChristianSch
ChristianSch / MailhogContainer.kt
Created May 24, 2023 14:53 — forked from xhanin/MailhogContainer.kt
A simple Kotlin Mailhog Test Container - allow to use mailhog to test sending emails with a real smtp server
package mailhog
/*
dependencies:
testImplementation("org.testcontainers:testcontainers:1.15.2")
testImplementation(platform("org.http4k:http4k-bom:4.3.5.4"))
testImplementation("org.http4k:http4k-core")
testImplementation("org.http4k:http4k-client-apache") {
because("mailhog http api messages access")
@ChristianSch
ChristianSch / dailyNoteTemplate.txt
Created July 3, 2023 08:24 — forked from bennewton999/dailyNoteTemplate.txt
My current Daily Note Template in Obsidian utilizing Templater and DataView Plugins
---
creation date: <% tp.file.creation_date() %>
tags: DailyNote <% tp.file.title.split('-')[0] %>
---
modification date: <%+ tp.file.last_modified_date("dddd Do MMMM YYYY HH:mm:ss") %> // This doesn't currently work in front matter, hoping that gets fixed.
# <% tp.file.title %>
<< [[<% tp.date.now("YYYY-MM-DD", -1, tp.file.title, "YYYY-MM-DD") %>]] | [[<% tp.date.now("YYYY-MM-DD", 1, tp.file.title, "YYYY-MM-DD") %>]]>>