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
"""Kernel K-means""" | |
# Author: Mathieu Blondel <mathieu@mblondel.org> | |
# License: BSD 3 clause | |
import numpy as np | |
from sklearn.base import BaseEstimator, ClusterMixin | |
from sklearn.metrics.pairwise import pairwise_kernels | |
from sklearn.utils import check_random_state |
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
########################################################################### | |
########################################################################### | |
## @purpose: Simulate return data with dense shocks and show that the | |
## LASSO doesn't add any forecasting power. | |
## ------------------------------------------------------------------------ | |
## @author: Alex Chinco | |
## @date: 04-DEC-2015 | |
########################################################################### | |
########################################################################### |
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
""" | |
Implementation of pairwise ranking using scikit-learn LinearSVC | |
Reference: "Large Margin Rank Boundaries for Ordinal Regression", R. Herbrich, | |
T. Graepel, K. Obermayer. | |
Authors: Fabian Pedregosa <fabian@fseoane.net> | |
Alexandre Gramfort <alexandre.gramfort@inria.fr> | |
""" |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# After Ubuntu 16.04, Systemd becomes the default. | |
# It is simpler than https://gist.github.com/Doowon/38910829898a6624ce4ed554f082c4dd | |
[Unit] | |
Description=Jupyter Notebook | |
[Service] | |
Type=simple | |
PIDFile=/run/jupyter.pid | |
ExecStart=/home/phil/Enthought/Canopy_64bit/User/bin/jupyter-notebook --config=/home/phil/.jupyter/jupyter_notebook_config.py |
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
(dbus-introspect :session "org.freedesktop.Tracker1" | |
"/org/freedesktop/Tracker1") | |
"<!DOCTYPE node PUBLIC \"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN\" | |
\"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd\"> | |
<!-- GDBus 2.54.0 --> | |
<node> | |
<node name=\"Backup\"/> | |
<node name=\"Steroids\"/> | |
<node name=\"Statistics\"/> | |
<node name=\"Status\"/> |
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
(require 'dbus) | |
(require 'dash) | |
(defun tracker-dbus-async (search-terms) | |
(interactive "sFulltext Search String: ") | |
;; mapcar 'car --> mapcar 'url-file-truename --> dired cons | |
(defun tracker-results-process (search-terms results) | |
(if | |
(-contains? |
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
Feb 20 16:28:28 einstein org.gnome.Shell.desktop[19485]: gnome-shell: ../libinput-1.10.0/src/evdev-mt-touchpad-tap.c:1073: tp_tap_handlle_state: Assertion `tp->tap.nfingers_down <= tp->nfingers_down' failed. | |
Feb 20 16:28:28 einstein org.gnome.Shell.desktop[19485]: == Stack trace for context 0x5638f1dec000 == | |
Feb 20 16:28:29 einstein gnome-terminal-[19854]: Error reading events from display: Broken pipe | |
Feb 20 16:28:29 einstein evolution-alarm[19716]: Error reading events from display: Broken pipe | |
Feb 20 16:28:29 einstein org.gnome.Shell.desktop[19485]: (EE) | |
Feb 20 16:28:29 einstein org.gnome.Shell.desktop[19485]: Fatal server error: | |
Feb 20 16:28:29 einstein org.gnome.Shell.desktop[19485]: (EE) failed to read Wayland events: Broken pipe | |
Feb 20 16:28:29 einstein org.gnome.Shell.desktop[19485]: (EE) | |
Feb 20 16:28:29 einstein systemd[19409]: gnome-terminal-server.service: Main process exited, code=exited, status=1/FAILURE | |
Feb 20 16:28:29 einstein systemd[19409]: gnome-terminal-server.service: Failed with result 'e |
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 pandas_datareader.data as web | |
import numpy as np | |
import datetime | |
from scipy.optimize import minimize | |
TOLERANCE = 1e-10 | |
def _allocation_risk(weights, covariances): |
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
################################################################################ | |
################################################################################ | |
## Prep workspace | |
################################################################################ | |
################################################################################ | |
options(width=200, digits=6, digits.secs=6) | |
rm(list=ls()) | |
library(foreign) |
OlderNewer