Skip to content

Instantly share code, notes, and snippets.

View johndpope's full-sized avatar

John D. Pope johndpope

View GitHub Profile
#!/bin/bash
# Run like so: echo http://cam.hackerspace.sg.s3-ap-southeast-1.amazonaws.com/ | ./listing.sh
s3ns=http://s3.amazonaws.com/doc/2006-03-01/
while read s3url
do
test "$s3url" || continue
i=0
Just to +1 and pile on: :-)
I agree that Swift isn’t perfect here, but I think there is some progress and reason to be optimistic. For example, there is now a new independent “swift numerics” library that is being developed that includes things like ShapedArray and other application independent numerics things.
I’m also thrilled to see the improvements in plotting, concurrency primitives etc. As things continue, I think a major missing link is that we need to have some kind of structure to pull together a “batteries included” set of libraries and provide a community curation mechanism. There are examples of this from other communities (e.g. Boost in the C++ world), but Swift has not evolved one yet. I think that figuring this out will be key to getting to the next level of community involvement and providing a coherent product for users,
-Chris
On Jan 11, 2020, at 3:35 PM, 'Brennan Saeta' via Swift for TensorFlow <swift@tensorflow.org> wrote:
@johndpope
johndpope / mp3.sh
Created November 23, 2019 12:54
download youtube to mp3
#! bin/bash
#PREREQ's: Install XCode Command Line Tools, Homebrew, and MacPorts
brew install wget lame #wget retrieves files via HTTP, lame is an MP3 encoder
sudo port install ffmpeg
sudo wget http://youtube-dl.org/downloads/2013.02.25/youtube-dl -O /usr/local/bin/youtube-dl
sudo chmod a+x /usr/local/bin/youtube-dl #make youtube-dl file executable
#make custom bash shortcut. Source: http://alias.sh/youtube-video-mp3-file
echo "mp3(){ youtube-dl $1 --extract-audio --title --audio-format mp3 }" >> ~/.zprofile
source ~/.zprofile
@johndpope
johndpope / local_machine_setup.sh
Last active February 10, 2021 15:57 — forked from louisguitton/local_machine_setup.sh
New Machine Setup
## install homebrew
echo "Installing Homebrew.."
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
echo "Homebrew successfully installed"
## install brew cask
echo "Installing brew cask.."
brew tap caskroom/cask
echo "Homebrew cask successfully installed"
// tslint:disable
/// <reference path="./custom.d.ts" />
/**
* LoopBack Application
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@johndpope
johndpope / install cuda toolkit xenial
Last active April 22, 2020 12:48
ubuntu 16 + cuda + docker
https://askubuntu.com/questions/903944/how-to-install-nvidia-375-39-drivers-in-ubuntu-14-04-error-displayed-as-x-ser/903950
// CUDA TOOLKIT - you need to have disable
// ubuntu disable nouveau kernel driver and successfully installed nvidia k2200 at this point.
https://linuxconfig.org/how-to-disable-nouveau-nvidia-driver-on-ubuntu-18-04-bionic-beaver-linux
$ sudo bash -c "echo blacklist nouveau > /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
$ sudo bash -c "echo options nouveau modeset=0 >> /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-ubuntu1604.pin
sudo mv cuda-ubuntu1604.pin /etc/apt/preferences.d/cuda-repository-pin-600
<|startoftext|>
160A T-1000 looks at the text on the screen. It is a jagged jagged
surrounding a rectangle of light on the wall, about the size of a
decor. The T-1000's eyes fill the rectangle. There is no
form or surface that the T-1000 can see. It looks into the
shadows of the building. We hear that sickening THUNK followed by a
TWISTER of some kind. Then the SHAPER! Like a saw-saw.
It cuts across the light, and emerges from the other side.
@johndpope
johndpope / notes.md
Created August 19, 2019 09:24 — forked from choongng/notes.md
Swift for TensorFlow quick start with Docker on Mac

A good way to get a taste of Swift for Tensorflow language and tools is to set it up with Jupyter with the fastai Swift notebooks. I wanted a quick setup, which the Mac install experience currently not, so instead I installed the release binaries in a Ubuntu container via Docker. The setup process for this scenario is not well documented, so here it is for you / future me.

What we're about to do is install the S4TF 0.4 release and the fastai v3 Swift notebooks on Ubuntu 18.04. Generally we follow the swift-jupyter docker file, but install cpu-only release versions of the packages.

Below are some of the references I looked at:

Rationale for S4TF and background reading

https://github.com/tensorflow/swift/blob/master/docs/WhySwiftForTensorFlow.md https://github.com/tensorflow/swift/blob/master/docs/DifferentiableFunctions.md

// written for MasOSX
import Foundation
import Alamofire
import ShellOut
import SwiftyJSON
class GitData{
export CUDA_HOME=/usr/local/cuda
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64
export PATH=$PATH:$CUDA_HOME/bin