Skip to content

Instantly share code, notes, and snippets.

@pnbrown
pnbrown / BulkRename.applescript
Created February 26, 2018 22:40 — forked from nrollr/BulkRename.applescript
Bulk rename files with csv file
-- Store the .csv file in the same directory as the files you wish to rename
-- Replace 'username' in the path with your own (lines 3 & 10)
set csvFile to "/Users/username/Documents/index.csv"
set csvList to paragraphs of (read csvFile)
set {theID, my text item delimiters} to {my text item delimiters, ","}
repeat with csvLines in csvList
set {oldName, newName} to text items of csvLines
tell application "System Events"
set name of file oldName of folder "/Users/username/Documents/" to newName
@pnbrown
pnbrown / graph.py
Created July 30, 2019 20:23
For plotting data
import pandas as pd
data=[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.009803921568627416, 0.0, 0.006896551724137945, 0.0, 0.0064102564102563875, 0.0, 0.01098901098901095, 0.004950495049504955, 0.0046948356807511304, 0.0, 0.0091324200913242, 0.004065040650406471, 0.0, 0.00983606557377048, 0.006896551724137945, 0.0, 0.0, 0.005730659025787954, 0.011111111111111072, 0.014534883720930258, 0.0027700831024930483, 0.0025445292620864812, 0.0, 0.007009345794392496, 0.017937219730941756, 0.008658008658008698, 0.004149377593360981, 0.003831417624521105, 0.02626262626262621, 0.007648183556405397, 0.0018832391713747842, 0.0, 0.0, 0.003278688524590123, 0.0016556291390728006, 0.0017421602787456303, 0.0, 0.0015649452269170805, 0.033333333333333326, 0.0014641288433382416, 0.004373177842565634, 0.006079027355623046, 0.017069701280227556, 0.005681818181818232, 0.06986301369863013, 0.021563342318059342, 0.02813299232736577, 0.1934673366834171, 0.0, 0.04834605597964381, 0.025000000000000022, 0.0, 0.016431924882629123, 0.022421524663677084, 0.
@pnbrown
pnbrown / May the 4th Developer's Introduction to Kubernetes.md
Last active March 5, 2021 08:49
May the 4th Developer's Introduction to Kubernetes