Skip to content

Instantly share code, notes, and snippets.

View JupyterJones's full-sized avatar

Jack Northrup JupyterJones

View GitHub Profile
#!/bin/bash
# Bash Prompt Menu
PS3='Please enter your choice: '
options=("LBRY" "YouTube" "JupyterJones" "MyLinuxToyBox" "Philippines" "PWD" "Date-Time" "Time-PWD" "Quit")
select opt in "${options[@]}"
do
case $opt in
"LBRY")
PS1="\[\e[33;42m\] LBRY \[\e[m\]Terminal: \\$ "
break
#!/bin/bash
# Bash Prompt Menu
PS3='Choose screen capture size: '
# PS3 means (Prompt String 3) a Shell prompts available for Linux.
# The PS3 prompt is useful in scripts that use the select command in order to select a value.
options=("FullScreen" "Terminal-1280x508" "1280x720" "Quit")
select opt in "${options[@]}"
do
case $opt in
"1280x720")
@JupyterJones
JupyterJones / rotate-inc.sh
Created May 12, 2019 05:49
Rotate / spin an image and turn into am mp4 video
#!/bin/bash
# Create variable NUM starting at 0
NUM=0
# Create the directory images-spin if it does not exist
[ -d images-spin ] || mkdir images-spin
# Renove any *.png images that may exist in the directory
rm images-spin/*.png
# Create a loop of 360 ( $i for each degree of a circle )
for i in {1..360}; do
# if $i divided by input variable $1 equals 0 ( no remainer )
@JupyterJones
JupyterJones / install-beef.sh
Created April 19, 2019 22:41
Script to install beef in Ubuntu 18.04
#!/bin/bash
sudo apt install ruby-full
git clone https://github.com/beefproject/beef
cd beef
# Inserts the line
#gem 'xmlrpc' in line 28
sed -i "28i gem 'xmlrpc'" Gemfile
@JupyterJones
JupyterJones / randomcrop.py
Created April 8, 2019 23:23
randomly finds an image in a directory crops it and overlays it on a blank image
from PIL import Image
from random import randint
import randon
import os
def ol(filenamez,num):
body = Image.open(filenamez).convert("RGBA")
path = r"/home/jack/Desktop/Images/thegirls/IMGS/"
base_image = random.choice([
y for y in os.listdir(path) if y.endswith(".jpg") or y.endswith(".png")
@JupyterJones
JupyterJones / tubep.sh
Created March 15, 2019 11:38
Create custom prompts for screen captures
#!/bin/bash
# Bash Prompt Menu
PS3='Please enter your choice: '
options=("YouTube" "JupyterJones" "MyLinuxToyBox" "Philippines" "Date-Time" "Original" "Quit")
select opt in "${options[@]}"
do
case $opt in
"YouTube")
PS1="\[\e[41m\]YouTube\[\e[m\]Videos: \\$ "
break ;;
@JupyterJones
JupyterJones / FFMPEG-Tutorial-YouTube-Video-Toolkit-Jupyter-Notebook.ipynb
Created March 13, 2019 12:54
FFMPEG-Tutorial-YouTube-Video-Toolkit-Jupyter-Notebook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@JupyterJones
JupyterJones / VIDEOinfo.py
Last active December 20, 2018 01:42
Retrieve and print video info using skvideo . SEE Comment: This code may be indexed to parse a video file for specific information.
from skvideo.io import *
import json
INFO = ffprobe("VID/videos/out.mp4")
print(json.dumps(INFO, indent=4))
"""
results in:
{
"video": {
"@index": "0",
"@codec_name": "h264",
import numpy as np
# R matrix
R = np.matrix([ [-1,-1,-1,-1,0,-1],
[-1,-1,-1,0,-1,100],
[-1,-1,-1,0,-1,-1],
[-1,0,0,-1,0,-1],
[-1,0,0,-1,-1,100],
[-1,0,-1,-1,0,100] ])
@JupyterJones
JupyterJones / answer.sh
Created October 23, 2018 00:06
A script created for viewing text created with Char-rnn
#!/bin/bash
# A script created for viewing text created with Char-rnn
# https://github.com/karpathy/char-rnn
# this script turns the last file in dirctory "cv" into a variable fn
fn=$(ls -rt1 cv | tail -1)
# Below this runs the command:
# th sample.lua on the last file created in the directory 'cv'
# and primes it with the text entered after answer :
# The -gpuid -1 means no GPU is used just a CPU
# Actual use Example: