- type : git clone --recursive https://github.com/dmlc/xgboost.git
- type : cd xgboost
- type : make
- type : cd python-package
- type : python setup.py install --user
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
| """ Unsupervised evaluation metrics. """ | |
| # License: BSD Style. | |
| from itertools import combinations | |
| import numpy as np | |
| from sklearn.utils import check_random_state | |
| from sklearn.metrics.pairwise import distance_metrics | |
| from sklearn.metrics.pairwise import pairwise_distances |
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
| crypto = require('crypto'); | |
| #Quick MD5 of text | |
| text = "MD5 this text!" | |
| md5hash1 = crypto.createHash('md5').update(text).digest("hex") | |
| #MD5 of text with updates | |
| m = crypto.createHash('md5') | |
| m.update("MD5 ") | |
| m.update("this ") |
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
| install_opencv: | |
| sudo dnf install --best --allowerasing \ | |
| cmake python-devel numpy gcc gcc-c++ \ | |
| python3-devel python3-numpy \ | |
| gtk2-devel libdc1394-devel libv4l-devel ffmpeg-devel \ | |
| gstreamer-plugins-base-devel libpng-devel libjpeg-turbo-devel \ | |
| jasper-devel openexr-devel libtiff-devel libwebp-devel \ | |
| tbb-devel eigen3-devel python-sphinx texlive git | |
| if [ ! -d opencv/ ]; then \ |
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
| #include <opencv/cv.h> | |
| #include <opencv/highgui.h> | |
| #include <opencv/ml.h> | |
| void doMosaic(IplImage* in, int x, int y, | |
| int width, int height, int size); | |
| int main (int argc, char **argv) | |
| { | |
| int i, c; |
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
| %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
| % Matlab code to produce PCA animations shown here: | |
| % http://stats.stackexchange.com/questions/2691 | |
| %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
| % Static image | |
| clear all | |
| rng(42) |
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 pandas as pd | |
| import matplotlib.pyplot as plt | |
| import seaborn | |
| from sklearn.cluster import KMeans | |
| import numpy as np | |
| from scipy.spatial.distance import cdist, pdist | |
| def eblow(df, n): | |
| kMeansVar = [KMeans(n_clusters=k).fit(df.values) for k in range(1, n)] | |
| centroids = [X.cluster_centers_ for X in kMeansVar] |
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 subprocess | |
| import optparse | |
| import platform | |
| #---------------------------------------Globals---------------------------------------------------- | |
| install = [] | |
| PLATFORM = platform.system() | |
| ARCHITECTURE = platform.architecture()[0] |
Last week, we got another great and widely publicised case of Graph Databases' usefullness throw our way. The ICIJ published their FinCEN Files research, and on top of allowing you to explore the data on their website they also published an anonymised subset of the data as a series of CSV/JSON files. My friends and colleagues Michael Hunger, Will Lyon and the rest of the team, helped with the process of making this subset available as a Neo4j database (see this github repo), and there's even a super easy FinCEN Files Neo4j Sandbox that you can spin up in no time for some investigation fun.
So of course I had to take this data for a spin myself - it seems real
OlderNewer