Skip to content

Instantly share code, notes, and snippets.

View P8H's full-sized avatar
🛰️

Kevin P8H

🛰️
  • Darmstadt, Germany
  • 10:04 (UTC +02:00)
View GitHub Profile
@allene
allene / python-azure-blob-storage-download.py
Last active August 1, 2021 19:25 — forked from brijrajsingh/python-azure-blob-storage-download.py
Downloadin an Azure Storage Blob Container with complex path of folders and sub folders
import os
from azure.storage.blob import BlobServiceClient,ContainerClient, BlobClient
import datetime
# Assuming your Azure connection string environment variable set.
# If not, create BlobServiceClient using trl & credentials.
#Example: https://docs.microsoft.com/en-us/python/api/azure-storage-blob/azure.storage.blob.blobserviceclient
connection_string = os.getenv("AZURE_STORAGE_CONNECTION_STRING")
@yoelrc88
yoelrc88 / ssh-into-colab.sh
Last active April 29, 2019 17:03 — forked from creotiv/gist:d091515703672ec0bf1a6271336806f0
script to ssh into colab notebook
#Generate root password
import random, string
password = ''.join(random.choice(string.ascii_letters + string.digits) for i in range(20))
#Download ngrok
! wget -q -c -nc https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
! unzip -qq -n ngrok-stable-linux-amd64.zip
#Setup sshd
! apt-get install -qq -o=Dpkg::Use-Pty=0 openssh-server pwgen > /dev/null
#Set root password
@kauffmanes
kauffmanes / install_anaconda.md
Last active June 7, 2024 23:06
Install Anaconda on Windows Subsystem for Linux (WSL)

Thanks everyone for commenting/contributing! I made this in college for a class and I no longer really use the technology. I encourage you all to help each other, but I probably won't be answering questions anymore.

This article is also on my blog: https://emilykauffman.com/blog/install-anaconda-on-wsl

Note: $ denotes the start of a command. Don't actually type this.

Steps to Install Anaconda on Windows Ubuntu Terminal

  1. Install WSL (Ubuntu for Windows - can be found in Windows Store). I recommend the latest version (I'm using 18.04) because there are some bugs they worked out during 14/16 (microsoft/WSL#785)
  2. Go to https://repo.continuum.io/archive to find the list of Anaconda releases
  3. Select the release you want. I have a 64-bit computer, so I chose the latest release ending in x86_64.sh. If I had a 32-bit computer, I'd select the x86.sh version. If you accidentally try to install the wrong one, you'll get a warning in the terminal. I chose `Anaconda3-5.2.0-Li
@bshishov
bshishov / forecasting_metrics.py
Last active April 20, 2024 04:29
Python Numpy functions for most common forecasting metrics
import numpy as np
EPSILON = 1e-10
def _error(actual: np.ndarray, predicted: np.ndarray):
""" Simple error """
return actual - predicted
@delta2323
delta2323 / dataset_in_chainer.md
Last active April 23, 2019 13:58
How to create your own dataset and use it in Chainer

The goal of this document is to explain the basic mechanism of the dataset in Chainer and how to prepare customized dataset that can work with Trainer.

See the official document for the full detail of the specifications.

Intarface of dataset

In order to make the dataset be able to work with the Trainer, it must have two methods:

  • __getitem__, which is used for indexing like dataset[i] or slicing like dataset[i:j]
  • __len__ , which enables us to feed it to len()
@asielen
asielen / data.csv
Last active March 1, 2023 09:59
Violin Plot + Box Plot v3
date value
2000 208.4968974
2000 160.5328879
2002 292.3321976
1998 95.07969441
2001 251.6346499
1996 4.723143097
1997 221.3608926
2002 257.5135771
1999 256.6401961
@jukworks
jukworks / gist:4037243
Created November 8, 2012 06:34
A Sample Code: Getting a Real FFT of 1D array using jTransform library.
import edu.emory.mathcs.jtransforms.fft.DoubleFFT_1D;
public class FftTest {
public static void main(String[] args) {
double[] input = new double[]{
0.0176,
-0.0620,
0.2467,
0.4599,
-0.0582,