Skip to content

Instantly share code, notes, and snippets.

Avatar

Andrew minkymorgan

View GitHub Profile
View tab2json.awk
NR == 1 {sep=""}
NR > 2 {sep=","}
{
if (NR == 1) {
split($0, tags);
if (EC == "") EC = "\"";
}
else {
split($0, vals);
jrec = sep"{";
@minkymorgan
minkymorgan / gist:1dde65b654bf1c07ade3
Created Sep 26, 2014
GDELT Event File - some BigQuery SQL that smooths the goldstein scale over the last 28 days.
View gist:1dde65b654bf1c07ade3
select
end_SQLDATE as SQLDATE
, AVG_GoldsteinScale
from
(
SELECT
ending_at_day AS end_SQLDATE
, ROUND(AVG(SUMG),5) AS AVG_GoldsteinScale
, COUNT(DISTINCT SQLDATE) as C
FROM
@minkymorgan
minkymorgan / gist:4702013
Last active May 1, 2019
setup mysql on a raspberryPI
View gist:4702013
## shell commands I used to setup mysql on my raspberryPI and enable SQLyog access to it from my laptop
# install mysql using these instructions
# http://databaseblog.myname.nl/2013/01/how-to-install-mysql-succesfully-on.html
# Verify the MySQL Client was installed
mysql --version
# alter the settings to enable it to be a server on your lan
You can’t perform that action at this time.