Skip to content

Instantly share code, notes, and snippets.

View cjnolet's full-sized avatar

Corey J. Nolet cjnolet

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cjnolet
cjnolet / hlca_lung_gpu_analysis-Copy1 (1).ipynb
Last active January 14, 2023 03:33
Demonstration of GPU-enabled HDBSCAN on Single-Cell RNA Dataset
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cjnolet
cjnolet / hdbscan_blog_np.ipynb
Last active October 11, 2021 19:18
Notebook to accompany RAPIDS cuML HDBSCAN Blog
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Basic Usage

Example of training an HDBSCAN model using the hdbscan Python package in Scikit-learn contrib:

from sklearn import datasets
from hdbscan import HDBSCAN

X = datasets.make_moons(n_samples=50, noise=0.05)

model = HDBSCAN(min_samples=5)
@cjnolet
cjnolet / cuml_nearest_neighbors_symmetrized_knn_graph.md
Created August 19, 2020 04:05
Creating a Symmetrized K-Nearest Neighbors Graph on GPU with cuML

Brief Example of Building a KNN Graph from cuML's NearestNeighbors Output

Import cupy and cuML's NearestNeighbors estimator

import cupy
from cuml.neighbors import NearestNeighbors

Set up some variables and create some random data on GPU

@cjnolet
cjnolet / cuml-kmeans-mnmg-api.md
Last active August 17, 2022 05:35
Simple example of cuML's K-Means Single-GPU (SG) and Multi-Node Multi-GPU (MNMG) APIs compared to Scikit-learn and Dask-ML

Comparing cuML K-Means API Against Scikit-learn & Dask-ML

First, a quick code example of K-Means in Scikit-learn

from sklearn.datasets import make_blobs
from sklearn.cluster import KMeans

n_centers = 5

X, _ = make_blobs(n_samples=10000, n_centers=n_centers)
@cjnolet
cjnolet / webex-fedora-centos.md
Created July 27, 2019 22:50
Run Cisco Webex on 64-bit Fedora 28

Run Cisco Webex on 64-bit Fedora 28/CentOS 7

With Audio and Screen Sharing Enabled

IMPORTANT NOTE :

1. The Screen Sharing works when you use Xorg instead of Wayland.
2. In my test, I disabled SELinux but maybe it works even if SElinux is permissive.
3. This was tested and worked on the DELL VOSTRO 3560 but does not work on DELL PRECISION 7510
@cjnolet
cjnolet / gcc-5.4.0-install.sh
Created December 14, 2018 18:51 — forked from jdhao/gcc-5.4.0-install.sh
The script will install GCC 5.4.0 on your CentOS 7 system, make sure you have root right. See https://jdhao.github.io/2017/09/04/install-gcc-newer-version-on-centos/ for more details.
echo "Downloading gcc source files..."
curl https://ftp.gnu.org/gnu/gcc/gcc-5.4.0/gcc-5.4.0.tar.bz2 -O
echo "extracting files..."
tar xvfj gcc-5.4.0.tar.bz2
echo "Installing dependencies..."
yum install gmp-devel mpfr-devel libmpc-devel -y
echo "Configure and install..."
@cjnolet
cjnolet / fourex.py
Created September 19, 2018 18:46 — forked from tartakynov/fourex.py
Fourier Extrapolation in Python
import numpy as np
import pylab as pl
from numpy import fft
def fourierExtrapolation(x, n_predict):
n = x.size
n_harm = 10 # number of harmonics in model
t = np.arange(0, n)
p = np.polyfit(t, x, 1) # find linear trend in x
x_notrend = x - p[0] * t # detrended x