Skip to content

Instantly share code, notes, and snippets.

View mamonu's full-sized avatar
🎯
Focusing

Theodore M mamonu

🎯
Focusing
View GitHub Profile
@mamonu
mamonu / macOS Internals.md
Created May 7, 2023 05:42 — forked from kconner/macOS Internals.md
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@mamonu
mamonu / appleworkstopdf.py
Created February 28, 2023 18:53
AppleWorks and ClarisWorks files in a folder to PDF
'''
Python script for Mac to convert AppleWorks and ClarisWorks files in a folder to PDF
Author: Mathias Beke
Date: August 2019
'''
import os
import subprocess
import sys
@mamonu
mamonu / find-latest-ami.sh
Created July 29, 2022 17:40 — forked from daveadams/find-latest-ami.sh
Find latest Amazon deep learning AMI
#!/usr/bin/env bash
# Find the latest Amazon-created "Deep Learning AMI (Ubuntu 18.04)" AMI image ID
#
# args explanation:
# --region us-east-1
# Specifies the AWS region (you can also specify it in your
# ~/.aws/config or via the `AWS_REGION` or `AWS_DEFAULT_REGION`
# env vars)
#
@mamonu
mamonu / browncorpuswordcount.py
Last active April 9, 2020 17:32
brown corpus word count
import nltk
import string
# nltk.download('brown')
# if nltk hasnt been used before this will download the brown corpus
from nltk.corpus import brown
from collections import Counter
import pandas as pd
@mamonu
mamonu / data.csv
Created February 7, 2020 12:04
data for graphs simple
NodeA NodeB similarity
Theodore Theodoras 0.9
Theodore Sam 0.0
Samuel Sam 0.7
@mamonu
mamonu / python-django-postgres-ci.yml
Created November 17, 2019 01:32 — forked from jefftriplett/python-django-postgres-ci.yml
This is a good starting point for getting Python, Django, Postgres running as a service, pytest, black, and pip caching rolling with GitHub Actions.
name: CI
on: [push]
jobs:
test:
runs-on: ubuntu-latest
services:
@mamonu
mamonu / SparkUI.md
Last active October 22, 2019 18:40
sparkui

I will have to think about a sensible place to put this.
But here’s how you can get the spark UI for a glue job:

job = GlueJob('my_dir/', bucket=bucket, job_role=my_role,
              job_arguments={"--test_arg": 'some_string',
                             '--enable-spark-ui': 'true',
                             '--spark-event-logs-path': 's3://alpha-data-linking/glue_test_delete/logsdelete' })
@mamonu
mamonu / AWK.txt
Created June 26, 2019 10:43
HANDY ONE-LINE SCRIPTS FOR AWK
HANDY ONE-LINE SCRIPTS FOR AWK 30 April 2008
Compiled by Eric Pement - eric [at] pement.org version 0.27
Latest version of this file (in English) is usually at:
http://www.pement.org/awk/awk1line.txt
USAGE:
Unix: awk '/pattern/ {print "$1"}' # standard Unix shells
DOS/Win: awk '/pattern/ {print "$1"}' # compiled with DJGPP, Cygwin
@mamonu
mamonu / exampleproject.md
Created May 15, 2019 10:01
contains an example data science project and setup guide

example project

contains an example data science project and setup guide

Project Organization

├── LICENSE

├── Makefile <- Makefile with commands like make data or make train

@mamonu
mamonu / ordinalexample.R
Last active April 19, 2019 02:10
ordinal example
library(datasets)
library(sjmisc)
library(sjPlot)
library(ordinal)
set.seed(111)
ab <-datasets::airquality
ab$orddep<- as.factor(ab$Month)
ord.1 <- clm(orddep ~ Temp , data=ab)