Skip to content

Instantly share code, notes, and snippets.

View JupyterJones's full-sized avatar

Jack Northrup JupyterJones

View GitHub Profile
@JupyterJones
JupyterJones / Search.py
Created September 25, 2022 04:14
Search Jupyter notebooks for a term then enter the results in an SQLITE database
import glob
import os.path
FILES = []
dir = '.'
files = glob.glob(os.path.join(dir, '*.ipynb'))
for file in files:
print (file)
FILES.append(file)
def insert(data):
@JupyterJones
JupyterJones / Working-With-Dates-and-TimeStamps.ipynb
Created May 12, 2022 03:22
Python - Working with Dates, Epochs and Time
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@JupyterJones
JupyterJones / mybootstrap.css
Created May 1, 2022 11:47
bootstrapcss modified
/*!
* Bootstrap v4.0.0 (https://getbootstrap.com)
* Copyright 2011-2018 The Bootstrap Authors
* Copyright 2011-2018 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
:root {
--blue: #007bff;
--indigo: #6610f2;
--purple: #6f42c1;
@JupyterJones
JupyterJones / mongodb.html
Last active May 1, 2022 11:30
mongodb information
<!doctype html>
<html lang="en">
<head>
<title>MongoDB Information</title>
<meta name="description" content="Information concerning ChatterBot, mongodb, using mongo-compass and the terminal commands to work with Chatterbot statements.">
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
@JupyterJones
JupyterJones / InitiateDockerSqlserver.sh
Last active April 20, 2022 06:14
Start an SQL server
sudo docker pull microsoft/mssql-server-linux:2017-latest &&
docker run \
-e 'ACCEPT_EULA=Y' \
-e 'MSSQL_SA_PASSWORD=YourSTRONG!Passw0rd' \
-p 1401:1433 \
-n sql1 \
-d microsoft/mssql-server-linux:2017-latest
private static string _connStr = @"
Server=127.0.0.1,1401;
@JupyterJones
JupyterJones / Covid-Chart-USA-States.html
Created July 3, 2020 08:17
JavaScript - Get the twenty five states with most covid deaths Graphed high to low. Live data uploaded. All in one including CSS
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Covid-19 Deaths in USA and Territories.</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta content="Jack Northrup " name="author" />
@JupyterJones
JupyterJones / NormalizeData.py
Created May 29, 2020 00:30
Normalize - Ranges any span of numeric data in a list between 0-1
#!/usr/bin/python
'''
Ranges any span of numeric data in a list between 0-1
Usage:
from NormalizeData import *
DATA = [1,34,546,3985,857463,49495857]
NormalizeData(DATA)
>>> array([0.00000000e+00, 6.66722483e-07, 1.10110228e-05, 8.04915870e-05,
1.73239150e-02, 1.00000000e+00])
'''
@JupyterJones
JupyterJones / FileSearch.py
Created April 29, 2020 02:03
Search a file for a word or exact term. Prints lines before and after the search term. Finds multiple occurances.
#!/usr/bin/env -m python
"""
Searches a file enter search term and filename
Range is to give context before and after the search term.
It defaults to eight lines before the word and eight lines after.
USAGE:
from FileSearch import filesearch
search ="urcrnrlat"
filename = "basemap.help"
filesearch(search,filename,Range=2)
@JupyterJones
JupyterJones / Draw-Covid-19-plot.py
Last active April 26, 2020 01:28
Draw-Covid-19-plot - state by state from current data Using https://github.com/CSSEGISandData/COVID-19 data
import random
from random import randint
import time
import markovify
import os
import sys
import sys
sys.path.insert(1, "/home/jack/hidden")
import Key
import twython
ffmpeg -y -f alsa -ac 2 -i hw:1,0 -strict -2 -f x11grab -framerate 30 \
-video_size 1280x720 -i :0.0+0,36 \
-c:v libx264 -pix_fmt yuv420p -qp 0 -preset ultrafast \
-f flv rtmp://a.rtmp.youtube.com/live2/XXX-XXXX-XXXX-XXXX