Skip to content

Instantly share code, notes, and snippets.

@ChristianSch
ChristianSch / bellman_ford.go
Created March 9, 2024 08:14 — forked from ewancook/bellman_ford.go
Arbitrage with Bellman Ford
package bellmanford
import (
"math"
)
// Graph represents a graph consisting of edges and vertices
type Graph struct {
edges []*Edge
vertices []uint
@ChristianSch
ChristianSch / maderas.txt
Created January 14, 2024 16:26 — forked from heywoodlh/maderas.txt
Clone of the arsenal, armory & library by Maderas (@hackermaderas) -- https://pastebin.com/v8Mr2k95
The arsenal, armory & library by Maderas (@hackermaderas, #CyberpunkisNow) 6/8/2019
Original / 1st version here: https://pastebin.com/rMw4WbhX
___________________________________________________________________________________
# Basic knowledge requirements for Red Teaming, PenTesting, Hacking & Cybersecurity
# These are the basic competencies expected (and tested for during the in-person technical interview) by one of the largest, most visible InfoSec companies # on Earth.
@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") %>]]>>
@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")

What would you need:

Hardware requirements

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]
@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)
@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 / 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 / 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'