Skip to content

Instantly share code, notes, and snippets.

@islands04
islands04 / simulator.py
Created January 20, 2020 13:22 — forked from markusrenepae/simulator.py
This gist is for another medium article and is about an investment simulator.
import pandas as pd
import numpy as np
import datetime as dt
import math
import warnings
warnings.filterwarnings("ignore")
prices = pd.read_csv("adjclose.csv", index_col="Date", parse_dates=True)
volumechanges = pd.read_csv("volume.csv", index_col="Date", parse_dates=True).pct_change()*100
# make on raspberry pi 3b
sudo make -j2
sudo make install
sudo make clean
sudo make distclean
[Unit]
Description=MQTT v3.1 message broker
After=network.target
Requires=network.target
[Service]
Type=simple
ExecStart=/usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf
Restart=always
@islands04
islands04 / learn.lua
Created May 25, 2018 13:28 — forked from tylerneylon/learn.lua
Learn Lua quickly with this short yet comprehensive and friendly script. It's written as both an introduction and a quick reference. It's also a valid Lua script so you can verify that the code does what it says, and learn more by modifying and running this script in your Lua interpreter.
-- Two dashes start a one-line comment.
--[[
Adding two ['s and ]'s makes it a
multi-line comment.
--]]
----------------------------------------------------
-- 1. Variables and flow control.
----------------------------------------------------
@islands04
islands04 / tint2rc
Created May 19, 2018 01:46 — forked from rawsh/tint2rc
tint2rc
#---- Generated by tint2conf 9757 ----
# See https://gitlab.com/o9000/tint2/wikis/Configure for
# full documentation of the configuration options.
#-------------------------------------
# Backgrounds
# Background 1: Panel, Tooltip
rounded = 0
border_width = 0
border_sides = TBLR
background_color = #16161d 63
@islands04
islands04 / zram.sh
Created April 13, 2018 13:58 — forked from sultanqasim/zram.sh
ZRAM config for Raspberry Pi 3
#!/bin/bash
# Raspberry Pi ZRAM script
# Tuned for quad core, 1 GB RAM models
# put me in /etc/init.d/zram.sh and make me executable
# then run "sudo update-rc.d zram.sh defaults"
modprobe zram
echo 3 >/sys/devices/virtual/block/zram0/max_comp_streams
echo lz4 >/sys/devices/virtual/block/zram0/comp_algorithm
git fetch --all
git reset --hard origin/branchName
git pull origin branchName
config defaultToCurrentScreen true
# Abstract positions
alias full move screenOriginX+(screenSizeX*.005);screenOriginY+(screenSizeY*.005) ((screenSizeX)*.99);(screenSizeY*.99)
alias lefthalf move screenOriginX+(screenSizeX*.005);screenOriginY+(screenSizeY*.005) ((screenSizeX/2)*.99);(screenSizeY*.99)
alias righthalf move screenOriginX+screenSizeX/2+(screenSizeX*.005);screenOriginY+(screenSizeY*.005) ((screenSizeX/2)*.99);(screenSizeY*.99)
alias tophalf move screenOriginX+(screenSizeX*.005);screenOriginY+(screenSizeY*.005) (screenSizeX*.99);((screenSizeY/2)*.99)
alias bottomhalf move screenOriginX+(screenSizeX*.005);screenOriginY+screenSizeY/2+(screenSizeY*.005) (screenSizeX*.99);((screenSizeY/2)*.99)
alias topleft move screenOriginX+(screenSizeX*.005);screenOriginY+(screenSizeY*.005) ((screenSizeX/2)*.99);((screenSizeY/2)*.99)
alias topright move screenOriginX+screenSizeX/2+(screenSizeX*.005);screenOriginY+(screenSizeY*.005) ((screenSizeX/2)*.99);((screenSizeY/2)*.99)
@islands04
islands04 / i3status.conf
Created January 17, 2018 21:45 — forked from rafi/i3status.conf
Rafi's i3status configuration file
# github.com/rafi i3status config
# i3status configuration file
# see "man i3status" for documentation.
# It is important that this file is edited as UTF-8.
# The following line should contain a sharp s:
# ß
# If the above line is not correctly displayed, fix your editor first!
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:sec="http://www.springframework.org/schema/security"
xmlns:cas="http://unicon.net/schema/cas"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security-3.1.xsd