Skip to content

Instantly share code, notes, and snippets.

View dan-r95's full-sized avatar
🥵
Focusing

Daniel dan-r95

🥵
Focusing
View GitHub Profile
@dan-r95
dan-r95 / tellmeyoursecrets.js
Created June 29, 2017 20:12 — forked from woodwardtw/tellmeyoursecrets.js
google script that lists a lot of info about the files in a particular folder/sub folder structure including viewers, editors, and sharing permissions
function listFolders(folder) {
var sheet = SpreadsheetApp.getActiveSheet();
sheet.appendRow(["Name", "Sharing Access", "Sharing Permission", "Get Editors", "Get Viewers", "Date", "Size", "URL", "Download", "Description", "Type"]); //writes the headers
var folder = DriveApp.getFolderById("YOUR_FOLDER_ID");//that long chunk of random numbers/letters in the URL when you navigate to the folder
var files = folder.getFiles();//initial loop on loose files w/in the folder
var cnt = 0;
var file;
@dan-r95
dan-r95 / gist:6b2bc4806d16f5694fda17df78a1f003
Created July 13, 2018 13:31
gif with ffmpeg using a color palette
ffmpeg -i 2.flv -filter:v "crop=222:448:17:2" 2.gif
ffmpeg -y -i alignment1.mp4 -vf fps=24,scale=1080:-1:flags=lanczos,palettegen palette.png
ffmpeg -i alignment1.mp4 -i palette.png -filter_complex "fps=24,scale=1080:-1:flags=lanczos[x];[x][1:v]paletteuse" alignment1.gif

Well hello there! :bowtie: Check out the blog! 🔥 dan-r95.github.io

NOTE: Top Languages doesn't indicate my proficieny, rather, it's a GitHub metric of my most-used languages.

# https://github.com/ustayready/fireprox
import requests
import json
import traceback
numSuccessFull = 0
ip = ''
port = ''
limit1Reached = False
limit2Reached = False
@dan-r95
dan-r95 / trackMyISPThroughput.sh
Last active February 24, 2020 23:01
crontab job + speedtest-cli to measure isp speed
#!/bin/bash
# schedule with crontab -e every x hours/ minutes
# install speedtest https://www.speedtest.net/apps/cli
str1="\""
str2="\","
FILE=/home/rossy/vodafone_speed.log
if [ ! -f "$FILE" ]; then # if file does not exist, create csv header
echo "creating file $FILE !"
@dan-r95
dan-r95 / magic.sh
Last active April 5, 2020 19:39
zoom and enhance!
docker pull alexjc/neural-enhance:gpu
docker run --rm -v C:/Users/dross/Downloads/docker-enhance:/ne/input -it alexjc/neural-enhance --type=photo --zoom=2 /ne/input/handshake.jpg
#!/bin/bash
sudo apt-get upgrade
sudo apt-get update
sudo apt-get autoremove
sudo do-release-upgrade
@dan-r95
dan-r95 / googleVMsetup.sh
Created May 27, 2020 15:26
setup google vm dependencies
yes | sudo apt update && sudo apt upgrade
pip3 install tensorflow
pip3 install torch torchvision
git clone git://github.com/jupyter/jupyter-drive.git
pip install -e jupyter-drive
python -m jupyterdrive
@dan-r95
dan-r95 / bearing.py
Created June 25, 2020 13:22
download Case Western Reserve University Bearing Data to folder (google colab)
import pandas as pd
""" downloads the dataset, so that all matlab files of each class are in their own folder
the package cwru is sadly only for python2
12DriveEndFault / 172.mat
/ 189.mat
...
12FanEndFault / 89.mat
...
@dan-r95
dan-r95 / memory-error.ipynb
Created August 6, 2020 14:53
memory-error.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.