Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
mstring=$*
set -- $mstring
if [[ -z $mstring ]]; then
echo NULL
else
for a in $*; do
<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Foundation | Welcome</title>
<link rel="stylesheet" href="css/foundation.css" />
<script src="js/vendor/modernizr.js"></script>
<script src="js/vendor/jquery.js"></script>
<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Foundation | Welcome</title>
<link rel="stylesheet" href="css/foundation.css" />
<script src="js/vendor/modernizr.js"></script>
<script src="js/vendor/jquery.js"></script>
from pandas import ExcelFile
from os import scandir
import matplotlib.pyplot as plt
import numpy as np
info_path = "C:/Users/johng/Downloads/chats/"
all_times = []
def autolabel(rects, ax):
import socket
import pyautogui as pag
__author__ = 'johng'
pag.FAILSAFE = False
def getIPAddr():
"""Creates a UDP Socket to the Google DNS in order to retrieve the host ip address"""
@jgrant41475
jgrant41475 / YouTube Video Data Tool.html
Last active March 26, 2024 10:54
Fetches YouTube Video Information and creates a json-ld Video Object
<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Foundation | Welcome</title>
<link rel="stylesheet" href="css/foundation.css" />
</head>
<body>
<div class="row">
from html.parser import HTMLParser
from os import makedirs, error as os_error
from os.path import exists
from pymsgbox import alert, prompt, confirm
from re import findall, search, IGNORECASE
from sre_constants import error as sre_error
from sys import winver
from time import sleep, strftime
from urllib.error import HTTPError, URLError
from urllib.parse import urlparse
@jgrant41475
jgrant41475 / WebCrawler.py
Last active May 8, 2018 11:33
Crawls websites for links originating from the same host and exports list as text file in current directory. Optionally scans pages for content identifiers or archives entire page if no such identifiers are found.
from html.parser import HTMLParser
from os import makedirs, error as os_error
from os.path import exists
from pymsgbox import alert, prompt, confirm
from re import findall, search, IGNORECASE
from sre_constants import error as sre_error
from sys import winver
from time import sleep, strftime
from urllib.error import HTTPError, URLError
from urllib.parse import urlparse
@jgrant41475
jgrant41475 / Gallery.js
Last active November 30, 2017 13:08
Content Gallery
@jgrant41475
jgrant41475 / Excel-Macro.py
Created November 7, 2017 17:38
A generic solution for filtering, grouping, and sorting a csv file by two fields
from functools import reduce
from operator import itemgetter as get
from sys import argv, maxsize as max_int
from itertools import groupby as by
class CSVEditor:
"""CSV Editor Class
A generic solution for filtering, grouping, and sorting a csv file by two fields
Creates new csv file in the same directory as file_path using the naming template: '[filename] - edited.csv'