Skip to content

Instantly share code, notes, and snippets.

@matt-bertoncello
matt-bertoncello / Dockerfile
Created May 18, 2020 07:54
Dockerfile and python script to run selenium with headless chromedriver in debian docker container.
# define base image as python slim-buster.
FROM python:3.7-slim-buster as base
## start builder stage.
# this is the first stage of the build.
# it will install all requirements.
FROM base as builder
# install all packages for chromedriver: https://gist.github.com/varyonic/dea40abcf3dd891d204ef235c6e8dd79
@korakot
korakot / sheet_df.py
Last active March 29, 2024 23:33
Save dataframe to Google Sheet from Colab
# authenticate
from google.colab import auth
auth.authenticate_user()
import gspread
from oauth2client.client import GoogleCredentials as GC
gc = gspread.authorize(GC.get_application_default())
# create, and save df
from gspread_dataframe import set_with_dataframe
title = 'New Sheet'
gc.create(title) # if not exist
@Brainiarc7
Brainiarc7 / nvidia-docker2-deploy-ubuntu-16.04LTS.md
Last active September 17, 2022 04:51
How to correctly install nvidia-docker2 on Ubuntu 16.04LTS

How to install NVIDIA Docker 2 package on Ubuntu and Debian:

If you came to this result (from Google or elsewhere) after realizing that Nvidia-docker's entry on this subject does not result in a working installation, here are the basic steps needed to install this package correctly:

For starters, ensure that you've installed the latest Docker Community edition by following the steps below:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

@javierluraschi
javierluraschi / using-tensorflow-in-emr-with-sparklyr.md
Last active January 20, 2020 16:53
Using TensorFlow in EMR with sparklyr

A script to demonstrate using TensorFlow in Spark with Amazon EMR and sparklyr.

  1. Create an EMR cluster for sparklyr, connect to EMR and install required tools:
install.packages(tensorflow)
devtools::install_github("rstudio/tfdeploy")
  1. Connect to Spark using sparklyr, copy some data and the mtcars TensorFlow model:
@jimmysitu
jimmysitu / morningstar.com API.md
Last active November 5, 2023 09:54
morningstar.com API

morningstar.com API

  • Get key ratio, return csv format file
http://financials.morningstar.com/ajax/exportKR2CSV.html?t=<market>:<stock>

Market

  • XHKG: Hong Kong Stock Exchange
  • XASE: American Stock Exchange
  • XNAS: Nasdaq Stock Exchange >* XNYS: New York Stock Exchange
@mohanrajendran
mohanrajendran / gcloud-fastai.sh
Last active March 7, 2018 20:36
Script to set up a deep learning box for fast.ai MOOC on Google cloud
# This script is designed to work with ubuntu 16.04 LTS
# ensure system is updated and has basic build tools
sudo apt-get update
sudo apt-get --assume-yes upgrade
sudo apt-get --assume-yes install tmux build-essential gcc g++ make binutils git
sudo apt-get --assume-yes install software-properties-common
# download and install GPU drivers
wget "http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_8.0.44-1_amd64.deb" -O "cuda-repo-ubuntu1604_8.0.44-1_amd64.deb"
@nikhilkumarsingh
nikhilkumarsingh / softmax-regression.py
Created August 6, 2017 06:18
Softmax regression implementation on MNSIT data using tensorflow
import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt
# loading data
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("MNIST_data/", one_hot=True)
# number of features
num_features = 784
@mjdietzx
mjdietzx / waya-dl-setup.sh
Last active October 14, 2024 12:19
Install CUDA Toolkit v8.0 and cuDNN v6.0 on Ubuntu 16.04
#!/bin/bash
# install CUDA Toolkit v8.0
# instructions from https://developer.nvidia.com/cuda-downloads (linux -> x86_64 -> Ubuntu -> 16.04 -> deb (network))
CUDA_REPO_PKG="cuda-repo-ubuntu1604_8.0.61-1_amd64.deb"
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/${CUDA_REPO_PKG}
sudo dpkg -i ${CUDA_REPO_PKG}
sudo apt-get update
sudo apt-get -y install cuda
@jmxpearson
jmxpearson / tf_edward_example.ipynb
Created February 20, 2017 18:07
Example of Poisson GLM in TensorFlow/Edward
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ziadoz
ziadoz / install.sh
Last active November 7, 2024 19:48
Install Chrome, ChromeDriver and Selenium on Ubuntu 16.04
#!/usr/bin/env bash
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c
# https://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver
# https://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception
# https://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal
# https://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04
# Versions
CHROME_DRIVER_VERSION=`curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE`