Skip to content

Instantly share code, notes, and snippets.

View johndpope's full-sized avatar

John D. Pope johndpope

View GitHub Profile
@johndpope
johndpope / install.sh
Created October 14, 2021 04:49 — forked from aaabramov/install.sh
Installing zsh + oh-my-zsh on Amazon EC2 Amazon Linux 2 AMI
sudo yum update
# Installing ZSH
sudo yum -y install zsh
# Check ZSH has been installed
zsh --version
# Install "util-linux-user" because "chsh" is not available by default
# See https://superuser.com/a/1389273/599050
package app
import (
"context"
"fin-go/routes/accounts"
"fin-go/routes/analysisTrees"
"fin-go/routes/categories"
"fin-go/routes/itemTokens"
"fin-go/routes/plaidHelper"
"fin-go/routes/resetDB"
# weechat script to display image in terminal
# (tested in termite, which is based on vte-ng)
# requirements:
# * weechat (of course)
# * w3m (for w3mimgdisplay)
# * imlib2-webp (optional, for webp support)
#
# save this script as ~/.weechat/python/test.py and load using
# /python load test.py
# in weechat.
#!/usr/bin/env python
# coding: utf-8
import os
os.chdir('/home/jp/Documents/gitWorkspace')
CODE_DIR = 'PTI'
os.chdir(f'./{CODE_DIR}')
# from https://github.com/rolux/stylegan2encoder
import argparse
import os
import shutil
import numpy as np
import dnnlib
import dnnlib.tflib as tflib
import pretrained_networks
@johndpope
johndpope / killer.sh
Created July 25, 2021 04:41 — forked from ride90/killer.sh
Process killer by name
#!/usr/bin/env bash
# Author: Oleh Pshenychnyi
# Date: 13.02.2021
#
# Kill all processes matching a provided pattern.
#
# Usage:
#
# >> bash killer.sh celery
@johndpope
johndpope / LinuxCUDAtoolkits.md
Last active July 4, 2021 20:31 — forked from khansun/LinuxCUDAtoolkits.md
Multiple versions of CUDA toolkit and CUDNN installation guide for Linux

Remove previous NVIDIA drivers if needed:

sudo dpkg -P $(dpkg -l | grep nvidia-driver | awk '{print $2}')

sudo apt autoremove

sudo lshw -C display

NVIDIA Apmere cards including 3070, 3080 and 3090 dos not work with CUDA 10.
@johndpope
johndpope / build.sh
Last active June 10, 2021 10:50
libceres.a universal build
#!/bin/bash
#brew install eigen3
EIGEN_PATH=/opt/local/include/eigen3
# build for device
cmake . -DCMAKE_TOOLCHAIN_FILE=./cmake/iOS.cmake -DEIGEN_INCLUDE_DIR=${EIGEN_PATH} -DIOS_PLATFORM=OS -DEIGENSPARSE=ON
make -j8
# install headers in ..
make install
import Foundation
import AVFoundation
import UIKit
private let userDefaultsCachePathKey = "video.cache.path"
private let userDefaultsFileSizeKey = "video.cache.size"
private let userDefaultsLastAccessedDictionaryKey = "video.cache.last.accessed.key" // Key: last accessed, value: path
private let maxConcurrentDownloads = 2
// written for MasOSX
import Foundation
import Alamofire
import ShellOut
import SwiftyJSON
class GitData{