Skip to content

Instantly share code, notes, and snippets.

@sremy
sremy / dropfile.js
Created February 27, 2020 00:31
File -> Parser -> Graph!
function dropHandler(ev) {
ev.target.classList.remove("over_zone");
// Prevent default behavior (Prevent file from being opened)
ev.preventDefault();
if (ev.dataTransfer.items) {
// Use DataTransferItemList interface to access the file(s)
// console.log(ev.dataTransfer)
@sremy
sremy / checkFilenames.py
Created April 9, 2019 23:31
Python script to check if each pattern matches at least one filename
#!/usr/bin/python
# Finds files based on patterns (supporting wildcards *?[-])
# Prints matching filenames or otherwise "NOT FOUND"
# Exits with code 1 if at least one pattern doesn't match
from __future__ import print_function
import glob
import sys
import os
@sremy
sremy / nexus-uploader.py
Created February 26, 2019 00:36 — forked from omnisis/nexus-uploader.py
Uploads a local M2 repo to a remote Nexus Server
#!/usr/bin/env python
""""
nexus-uploader.py
Allows mirroring local M2 repositories to a remote Nexus server with a single command.
Supports:
- uploading of common classifiers (sources, javadocs) if available
- using regex include pattern for artifactIds/groupIds
- recursively processing local repo, just point to the root
@sremy
sremy / multiple_linear_regression.py
Last active January 8, 2019 00:56
Multiple Linear Regression
# Multiple Linear Regression
# https://www.superdatascience.com/machine-learning/
# Importing the libraries
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
# Importing the dataset
dataset = pd.read_csv('50_Startups.csv')
@sremy
sremy / webserver
Created November 26, 2018 01:08 — forked from toonetown/webserver
A quick-and-dirty python web server that also handles SSL and client certificate authentication
#!/usr/bin/python
import BaseHTTPServer, SimpleHTTPServer, ssl, argparse, re
from tempfile import mkdtemp
from shutil import rmtree
from contextlib import contextmanager
from OpenSSL import crypto
from os.path import exists, join, abspath
@contextmanager
def TemporaryDirectory():
@sremy
sremy / CopyToClipboard.js
Created February 4, 2017 11:33
CopyToClipboard
// From Github: https://assets-cdn.github.com/assets/github-debf0b32d523b7b17d8bd81d3e9e086bb87af44c5d347e2a0f49bc991d0a77e6.js
function(e, t) {
function n(e) {
return e && e.__esModule ? e : {
"default": e
}
}
function i(e) {