jq is useful to slice, filter, map and transform structured json data.
brew install jq
# 10_basic.py | |
# 15_make_soup.py | |
# 20_search.py | |
# 25_navigation.py | |
# 30_edit.py | |
# 40_encoding.py | |
# 50_parse_only_part.py |
1. Copy/Paste the information below to the clipboard | |
2. Open the spreadsheet whose sheets need to be alphabetised | |
3. Choose Tools > Script editor > Blank (this opens a new tab in the browser) | |
4. Press Control+A followed by Control+V copy and paste the script in | |
5. Press Control+S to save the script | |
6. Choose Run > sortSheets | |
7. Go back to the spreadsheet tab to view the new sorted tab order | |
--Copy everything below this line-- | |
function sortSheets () { |
#!/bin/bash | |
iatest=$(expr index "$-" i) | |
####################################################### | |
# SOURCED ALIAS'S AND SCRIPTS BY zachbrowne.me | |
####################################################### | |
# Source global definitions | |
if [ -f /etc/bashrc ]; then | |
. /etc/bashrc |
#!/bin/bash | |
# This bash script copies pictures from Mapillary folders stored on an iPhone | |
# then update the pictures EXIF data to get the GPS and timestamp | |
# written by Christian Quest - August 2016 | |
# requires jq and exiftool, if missing: apt install jq exiftool | |
# tested on Ubuntu 16.04 | |
# copy Mapillary internal json data (contains GPS info, and more) | |
rsync /run/user/1000/gvfs/afc*/com.mapillary.app/cameras/internal/ internal -a |
-- Based on code here: http://www.sqlservercentral.com/articles/Fuzzy+Match/65702/ | |
-- Modified to be used in SQL Server Database Projects or run on its own, and fixed similarity vs distance confusion | |
CREATE FUNCTION [dbo].JaroWinklerGetCommonCharacters(@firstWord VARCHAR(MAX), @secondWord VARCHAR(MAX), @matchWindow INT) | |
RETURNS VARCHAR(MAX) AS | |
BEGIN | |
DECLARE @CommonChars VARCHAR(MAX) | |
DECLARE @copy VARCHAR(MAX) | |
DECLARE @char CHAR(1) | |
DECLARE @foundIT BIT |
import nltk | |
import pandas as pd | |
import re | |
import pprint | |
import operator | |
import csv | |
import logging | |
from stop_words import get_stop_words | |
from collections import defaultdict | |
from gensim import corpora |
from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter | |
from pdfminer.converter import TextConverter, XMLConverter, HTMLConverter | |
from pdfminer.layout import LAParams | |
from pdfminer.pdfpage import PDFPage | |
from io import BytesIO | |
def convert_pdf(path, format='text', codec='utf-8', password=''): | |
rsrcmgr = PDFResourceManager() | |
retstr = BytesIO() | |
laparams = LAParams() |
src: https://www.stationx.net/nmap-cheat-sheet
| Switch | Example | Description |