Skip to content

Instantly share code, notes, and snippets.

View johndpope's full-sized avatar

John D. Pope johndpope

View GitHub Profile
@zsyzzsoft
zsyzzsoft / data-efficient-gans.ipynb
Last active December 18, 2020 12:04
data-efficient-gans.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kmhofmann
kmhofmann / installing_nvidia_driver_cuda_cudnn_linux.md
Last active January 10, 2025 22:30
Installing the NVIDIA driver, CUDA and cuDNN on Linux

Installing the NVIDIA driver, CUDA and cuDNN on Linux (Ubuntu 20.04)

This is a companion piece to my instructions on building TensorFlow from source. In particular, the aim is to install the following pieces of software

on an Ubuntu Linux system, in particular Ubuntu 20.04.

@korakot
korakot / demucs.py
Last active December 5, 2021 06:35
Separate vocals from a song (no music) with demucs
# install
!npx degit facebookresearch/demucs -f
!pip install lameenc==1.2.2 musdb==0.3.1 museval==0.3.0 treetable==0.2.3
# separate
!python3 -m demucs.separate --dl -n demucs_extra song.m4a
# get separated/demucs_extra/song/vocals.wav
'an easy-to-use function'
def get_voc(fname):
from pathlib import Path
@aarani
aarani / tl-schema-108.json
Created April 3, 2020 07:12
Layer 108 of Telegram API
{"constructors":[{"id":"-1132882121","predicate":"boolFalse","params":[],"type":"Bool"},{"id":"-1720552011","predicate":"boolTrue","params":[],"type":"Bool"},{"id":"1072550713","predicate":"true","params":[],"type":"True"},{"id":"481674261","predicate":"vector","params":[],"type":"Vector t"},{"id":"-994444869","predicate":"error","params":[{"name":"code","type":"int"},{"name":"text","type":"string"}],"type":"Error"},{"id":"1450380236","predicate":"null","params":[],"type":"Null"},{"id":"2134579434","predicate":"inputPeerEmpty","params":[],"type":"InputPeer"},{"id":"2107670217","predicate":"inputPeerSelf","params":[],"type":"InputPeer"},{"id":"396093539","predicate":"inputPeerChat","params":[{"name":"chat_id","type":"int"}],"type":"InputPeer"},{"id":"-1182234929","predicate":"inputUserEmpty","params":[],"type":"InputUser"},{"id":"-138301121","predicate":"inputUserSelf","params":[],"type":"InputUser"},{"id":"-208488460","predicate":"inputPhoneContact","params":[{"name":"client_id","type":"long"},{"name":"phone"
@redhajuanda
redhajuanda / README.md
Created February 4, 2020 10:13
Execute golang service with node pm2

Run the service with pm2

pm2 start package.json

@joeytwiddle
joeytwiddle / github_get_all_forks.sh
Last active June 3, 2024 22:36
Add all forks of the current repo as remotes
#!/usr/bin/env bash
set -e
# See also: https://github.com/frost-nzcr4/find_forks (same thing but in python)
origin_url="$(git remote show origin | grep 'Fetch URL:' | sed 's+.*: ++')"
full_repo_name="$(echo "$origin_url" | sed 's+.*github.com/++ ; s+\.git$++')"
forks_url="https://api.github.com/repos/${full_repo_name}/forks"
"""Tensorflow implementation of VGG perceptual distance network."""
import numpy as np
import tensorflow as tf
tft=tf.transpose
def _i(x): return tft(x,[0,2,3,1])
def _o(x): return tft(x,[0,3,1,2])
# Initialize dict which maps TF variable names to pre-trained weight dict keys.
_vgg16_params_dict = dict()
@choongng
choongng / notes.md
Last active December 29, 2019 23:01
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

@louisguitton
louisguitton / v1.sh
Last active April 3, 2025 14:04
New Machine Setup
# (forked and adapted from Gitlab's https://gitlab.com/gitlab-data/analytics/blob/master/admin/onboarding_script.sh)
## 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 homebrew/cask
@nekonora
nekonora / AnimationSyncToKeyboard.swift
Last active July 14, 2022 04:46
Sync animation to keyboard appearing
@objc func keyboardWillShow(_ notification: NSNotification) {
let keyboardAnimationDetail = notification.userInfo
let animationCurve: Int = {
if let keyboardAnimationCurve = keyboardAnimationDetail?[UIResponder.keyboardAnimationCurveUserInfoKey] as? Int {
let curve: Int? = UIView.AnimationCurve(rawValue: keyboardAnimationCurve)?.rawValue
return curve ?? 0
} else {
return 0
}