Skip to content

Instantly share code, notes, and snippets.

View markthomas93's full-sized avatar
:shipit:
Working from home

Mark Thomas markthomas93

:shipit:
Working from home
  • freelance
  • California
View GitHub Profile
@markthomas93
markthomas93 / Batch File Rename.scpt
Created July 8, 2019 22:44 — forked from oliveratgithub/Batch File Rename.scpt
Simple AppleScript to easily batch rename multiple files sequentially. GUI asks user to select files and input a name before renaming.
-- This code comes from https://gist.github.com/oliveratgithub/
-- Open in AppleScript Editor and save as Application
-- ------------------------------------------------------------
--this is required to break the filename into pieces (separate name and extension)
set text item delimiters to "."
tell application "Finder"
set all_files to every item of (choose file with prompt "Choose the Files you'd like to rename:" with multiple selections allowed) as list
display dialog "New file name:" default answer ""
set new_name to text returned of result
--now we start looping through all selected files. 'index' is our counter that we initially set to 1 and then count up with every file.
2016-10-26 22:04:26.315 Unison[2816:462371] Roots are not set on the command line
2016-10-26 22:04:28.293 Unison[2816:462371] Connecting to [internal error!]...
Preferences:
ui = graphic
host =
server = false
prefsdocs = false
doc =
version = false
silent = false
$ ssh <user>@<mac-without-screen>
$ sudo defaults write /var/db/launchd.db/com.apple.launchd/overrides.plist com.apple.screensharing -dict Disabled -bool false
$ sudo launchctl load /System/Library/LaunchDaemons/com.apple.screensharing.plist
/System/Library/LaunchDaemons/com.apple.screensharing.plist: Service is disabled
$ sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.screensharing.plist
@markthomas93
markthomas93 / github.css
Created August 6, 2019 10:31 — forked from tuzz/github.css
Github Markdown Stylesheet
/*
Copyright (c) 2017 Chris Patuzzo
https://twitter.com/chrispatuzzo
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@markthomas93
markthomas93 / ffmpeg.md
Created August 6, 2019 16:29 — forked from protrolium/ffmpeg.md
using ffmpeg to extract audio from video files

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@markthomas93
markthomas93 / bitcoin_data_wrangling.md
Created August 7, 2019 08:25
Data Wrangling Process

Data Wrangling for Bitcoin Headlines

I. Selection of sources

Obtaining news data online can be obtained primarily in two ways - web scraping or use of an API. Python has libraries such as BeautifulSoup for web scraping. However, many sites actively discourage this due to violation of the terms of use or possibly copyright restrictions on the data. The latter option was chosen for this project because data can be quickly obtained using the appropriate Python wrapper.

There were three APIs that were used to construct the data set used in this project. NPR, NYTimes, and The Guardian are three currently active APIs at the time of this project. Other subscription based options such as Bloomberg are available, but the intent is to use open source information. Although NYTimes is one API, it is technically a compilation of two other sources: Reuters and Associated Press.

Obtaining bitcoin price data is fairly straightforward because the ledger is open source and public. Initially the data set contained ea

@markthomas93
markthomas93 / data_science_meetup.md
Created August 7, 2019 08:25
Data Visualization Meetup

Data Science Meetup

In the Seattle area, most data science meetups originate from a company called Galvanize. Some of their worksshops are helpful, but I find the constant pressure to enroll in one of their classes or bootcamps to be rather intrusive. There are a few smaller groups composed of enthusiasts that meet up a lot less regularly. One group was called the data vis meetup with a small group of ten people. There was a representation from a mix of disciplines. One apparent trait was the group primarily favored R over Python because there were more staticians in the group. The group recently got a sponsorship from R Studio!

I spoke with someone who worked at a startup in Austin, TX where he tracked movement of bicycles across rental stations. He had the entire project on github as well as a blog post on his analysis. Some of the data is not available due to privacy concerns, but the analysis is outline from data wrang

Informational Interviews

Finding experts in the field to interview turns out to be to less intimidating once getting over the initial stage of awkwardness. Most professionals are more than happy to promote their work as well as share their perspective towards career goals for newcomers.

Inteview 1: Tim Gasser

I met this person at a data visualization meetup. He worked at a startup in Austin, TX before moving to Seattle, WA. Besides having a British accent, he gave a ton of recommendations for Python libraries when doing analysis. I learned about Folium for GIS data as well as a several libaries for R.

He showed me a project that he did for a bike share company:

@markthomas93
markthomas93 / gist:7084cbc5f04bbd7b1913dfef81c22faa
Created August 7, 2019 08:27 — forked from lmiles2/gist:f73435f2f5bf20e8e5710257fc07c770
4 Essays for Leila Miles Ada Developer Academy Submission

1. Why are you interested in programming? What have you done to expose yourself to programming so far?

My entrée into programming occurred on my path to graduation from Stanford – the bastion of Computer Science where companies like Hewlett-Packard, Apple, Yahoo!, Google and SnapChat came into existence. Though I was surrounded by these greats, my interests lay elsewhere. I was focused on business and Marketing particularly in the Entertainment world. These were different skill sets I needed to develop – I majored in Psychology and Communication to determine what made people want to buy things and what were the best ways to reach them. I focused on Networking which I did by traveling to LA on my Spring Break talking to Stanford Alumni who were professionals in the Entertainment world like the Senior Vice President of Programming for ABC.

Along the way, I took a computer course entitled Intro to Computer Science. In this course, I wrote programs which rarely worked and it was difficult to find the reason