Skip to content

Instantly share code, notes, and snippets.

View cjnolet's full-sized avatar

Corey J. Nolet cjnolet

View GitHub Profile
@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
@cjnolet
cjnolet / spark-svd.scala
Created August 8, 2018 20:44 — forked from vrilleup/spark-svd.scala
Spark/mllib SVD example
import org.apache.spark.mllib.linalg.distributed.RowMatrix
import org.apache.spark.mllib.linalg._
import org.apache.spark.{SparkConf, SparkContext}
// To use the latest sparse SVD implementation, please build your spark-assembly after this
// change: https://github.com/apache/spark/pull/1378
// Input tsv with 3 fields: rowIndex(Long), columnIndex(Long), weight(Double), indices start with 0
// Assume the number of rows is larger than the number of columns, and the number of columns is
// smaller than Int.MaxValue
@cjnolet
cjnolet / vi.py
Created April 18, 2018 02:07 — forked from jwcarr/vi.py
Variation of information (VI)
# Variation of information (VI)
#
# Meila, M. (2007). Comparing clusterings-an information
# based distance. Journal of Multivariate Analysis, 98,
# 873-895. doi:10.1016/j.jmva.2006.11.013
#
# https://en.wikipedia.org/wiki/Variation_of_information
from math import log