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
using MongoDB.Bson; | |
using MongoDB.Bson.Serialization.Attributes; | |
using MongoDB.Driver; | |
BsonSerializer.RegisterSerializer(new DecimalSerializer(BsonType.Decimal128)); | |
var settings = MongoClientSettings.FromConnectionString(""); | |
var client = new MongoClient(settings); |
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
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.mdbu</groupId> | |
<artifactId>curriculum</artifactId> | |
<packaging>jar</packaging> | |
<version>1.0-SNAPSHOT</version> | |
<dependencies> | |
<!-- https://mvnrepository.com/artifact/org.mongodb/mongodb-driver-sync --> | |
<dependency> |
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
[program:code-server] | |
command = code-server workspace /app --user-data-dir /app/user-data --auth none --disable-telemetry | |
stdout_events_enabled = true | |
stderr_events_enabled = true |
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
; supervisor config file | |
[unix_http_server] | |
file=/var/run/supervisor.sock ; (the path to the socket file) | |
chmod=0700 ; sockef file mode (default 0700) | |
[supervisord] | |
logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log) | |
pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid) | |
childlogdir=/var/log/supervisor ; ('AUTO' child log dir, default $TEMP) |
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
$ ~/.gitconfig | |
[alias] | |
janitor = !"git remote prune origin ; git branch -vv | grep ' gone]' | awk '{print $1}' | xargs git branch -D" | |
Run using | |
$ git janitor |
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
cycler==0.10.0 | |
dnspython==1.16.0 | |
flatten-json==0.1.7 | |
joblib==0.14.1 | |
kiwisolver==1.1.0 | |
matplotlib==3.1.3 | |
mlxtend==0.17.2 | |
numpy==1.18.1 | |
pandas==1.0.1 | |
pprint==0.1 |
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 datetime | |
import gridfs | |
import pickle | |
import pymongo | |
from bson.binary import Binary | |
# Copy and paste the model here from https://gist.github.com/braz/8a65ffc359fd9f208c1e8ca64b7dfac3 | |
model_name = str(type(model)) |
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 pandas as pd | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from sklearn import linear_model | |
# URL for the Wine Quality Portuguese "Vinho Verde" red wine dataset (UCI Machine Learning Repository) | |
url = "https://archive.ics.uci.edu/ml/machine-learning-databases/wine-quality/winequality-red.csv" | |
# download the file | |
try: |
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 numpy as np | |
from sklearn.model_selection import KFold | |
X = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] | |
kf = KFold(n_splits=10) | |
for train, test in kf.split(X): | |
print("%s %s" % (train, test)) |
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 urllib | |
import pandas as pd | |
import numpy as np | |
import matplotlib.pyplot as plt | |
# URL for the Iris dataset (UCI Machine Learning Repository) | |
url = "http://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data" | |
raw_data = urllib.urlopen(url) |
NewerOlder