This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .PHONY: help lint run | |
| # Makefile variables | |
| VENV_NAME:=venv | |
| PYTHON=${VENV_NAME}/bin/python3 | |
| # Include your variables here | |
| RANDOM_SEED:=42 | |
| NUM_EPOCHS:=15 | |
| INPUT_DIM:=784 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Byte-compiled / optimized / DLL files | |
| __pycache__/ | |
| *.py[cod] | |
| *$py.class | |
| # C extensions | |
| *.so | |
| # Distribution / packaging | |
| .Python |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import luigi | |
| import pandas as pd | |
| from luigi.mock import MockTarget | |
| class MopedExport(luigi.ExternalTask): | |
| """ source data """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| OwnerAge Gender Zone McClass VehicleAge BonusClass Duration NoClaims ClaimCost | |
| 0 M 1 4 12 1 0.1753 0 0 | |
| 4 M 3 6 9 1 0.0000 0 0 | |
| 5 K 3 3 18 1 0.4548 0 0 | |
| 5 K 4 1 25 1 0.1726 0 0 | |
| 6 K 2 1 26 1 0.1808 0 0 | |
| 9 K 3 3 8 1 0.5425 0 0 | |
| 9 K 4 3 6 1 0.0000 0 0 | |
| 9 M 4 4 20 1 0.5041 0 0 | |
| 10 M 2 3 16 1 0.1507 0 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Extracting various figures from Statnett | |
| """ | |
| import requests | |
| import datetime | |
| import pprint |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Some code to asses an SVM with a two-dimensional feature space: | |
| # trend (price - simple moving average) and relative strength index. | |
| # The code is an adaptation of the code found in the following linkedin post: | |
| # "Trading the RSI using a Support Vector Machine" | |
| # "https://www.linkedin.com/pulse/article/20141103165037-172934333-trading-the-rsi-using-a-support-vector-machine" | |
| # Settings | |
| sma.window = 50 # Number of observations in simple moving average. | |
| rsi.window = 3 # Number of observation in relative strength index (RSI) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import csv | |
| import datetime | |
| outfile = "profile_20150801.csv" | |
| startdate = datetime.datetime(2015, 1, 1, 0) | |
| #startdate = datetime.datetime.now() | |
| enddate = datetime.datetime(2019, 1, 1) | |
| hour = datetime.timedelta(hours=1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| """ | |
| Created on Tue Sep 09 10:59:11 2014 | |
| @author: bjorskog | |
| """ | |
| import numpy as np | |
| import pandas as pd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| """ | |
| Created on Tue Jun 17 17:59:59 2014 | |
| @author: bjorskog | |
| """ | |
| from datetime import datetime | |
| from bson.objectid import ObjectId | |
| from pymongo import MongoClient |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import win32service | |
| import win32serviceutil | |
| import win32api | |
| import win32con | |
| import win32event | |
| import win32evtlogutil | |
| import os | |
| class aservice(win32serviceutil.ServiceFramework): | |
NewerOlder