In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
This file contains 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 time | |
import numpy as np | |
import cvxpy as cp | |
from mosek.fusion import Model, Domain, Expr, ObjectiveSense | |
def cvx_explicit(cov_factor, residual_var, F, mu, gamma, Lmax): | |
n, m = F.shape |
http://www.oreilly.com/programming/free/files/microservices-for-java-developers.pdf
http://www.oreilly.com/programming/free/files/microservices-for-java-developers.epub
http://www.oreilly.com/programming/free/files/microservices-for-java-developers.mobi
http://www.oreilly.com/programming/free/files/modern-java-ee-design-patterns.pdf
http://www.oreilly.com/programming/free/files/modern-java-ee-design-patterns.epub
http://www.oreilly.com/programming/free/files/modern-java-ee-design-patterns.mobi
This file contains 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
def f1(precision, recall): | |
return 2*(precision*recall)/(precision+recall) | |
if __name__ == '__main__': | |
# Matrix for crypto finance | |
TP = 70 # on how many days did you correctly predict the market goes up? | |
FP = 10 # on how many days did you predict the market goes up, but it actually went down? | |
FN = 8 # on how many days did you predict the market goes down, but it actually went up? | |
TN = 12 # on how many days did you correctly predict the market goes down? |
This file contains 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
FROM rocker/rstudio:3.6.1 | |
# see https://arrow.apache.org/install/ | |
# rocker/rstudio is based on debian | |
RUN apt update && \ | |
apt install -y -V apt-transport-https curl gnupg lsb-release apt-utils | |
RUN echo "deb http://deb.debian.org/debian $(lsb_release --codename --short)-backports main contrib" >> /etc/apt/sources.list.d/backports.list && \ | |
curl --output /usr/share/keyrings/apache-arrow-keyring.gpg https://dl.bintray.com/apache/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-keyring.gpg && \ | |
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/apache-arrow-keyring.gpg] https://dl.bintray.com/apache/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/ $(lsb_release --codename --short) main" >> /etc/apt/sources.list.d/apache-arrow.list && \ |
This file contains 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 python3 | |
import os | |
import nbformat as nbf | |
from config.config import logger | |
from pyutil.parent import Production | |
from pyutil.sql.interfaces.symbols.strategy import Strategy | |
from pyutil.sql.session import session | |
This file contains 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
# We create a standard logger with two handlers | |
# One of them is using io.StringIO for streaming | |
# Subsequently we add the value() method to the logger, e.g. it will be possible to call | |
# logger.value() and get the entire history of all messages sent to the logger. | |
# | |
# I have never managed to get my head around logging in Python. Any comments are very appreciated. | |
import logging | |
import types |
This file contains 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 pandas as pd | |
from influxdb import DataFrameClient | |
class Client(DataFrameClient): | |
def __init__(self, host=None, port=8086, database=None): | |
host = host or os.environ["INFLUXDB_HOST"] | |
super().__init__(host, port) |
This file contains 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
# construct a random SO(3) matrix | |
import numpy as np | |
# We construct a random element in SO(3) | |
def rand_so3(): | |
A = np.random.randn(3,3) | |
# normalize the first column | |
A[:,0]=A[:,0]/np.linalg.norm(A[:,0], 2) | |
# make the 2nd column orthogonal to first column |
This file contains 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
# Makefile | |
# | |
ROOT_DIR = $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) | |
SPHINXBUILD = sphinx-build | |
BUILDDIR = ${ROOT_DIR}/build | |
SOURCEDIR = ${ROOT_DIR}/source | |
PROJECT = pylobnek |
NewerOlder