Skip to content

Instantly share code, notes, and snippets.

View carbocation's full-sized avatar

James Pirruccello carbocation

View GitHub Profile
@rwightman
rwightman / timm_unet.py
Created April 15, 2021 19:12
An example U-Net using timm features_only functionality.
""" A simple U-Net w/ timm backbone encoder
Based off an old version of Unet in https://github.com/qubvel/segmentation_models.pytorch
Hacked together by Ross Wightman
"""
from typing import Optional, List
import torch
@smestern
smestern / testSW.py
Last active November 9, 2023 10:57 — forked from ctralie/testOt.py
2D Histogram Sliced Wasserstein Distance via Scipy.stats
"""
Original Docstring -
Programmer: Chris Tralie
Purpose: To use the POT library (https://github.com/rflamary/POT)
to compute the Entropic regularized Wasserstein distance
between points on a 2D grid
Modified by Sam Mestern
Shows the usage of the sliced wasserstein distance to measure the distance between two
from fastai.core import ItemBase
from fastai.vision import *
from fastai.basic_data import *
from fastai.imports import *
import rasterio as rio
import scipy
"""
TODO: separate transformations and such to different files
"""
@ww9
ww9 / gui_apps_using_go_html_js_css.md
Last active September 1, 2020 19:32
Simple GUI example using https://github.com/zserge/lorca. Shows Go<->Js communication. #go

GUI programs using Go and HTML/CSS/JS

Superior to similar solutions. Doesn't use electron or cgo. Easy communication between Go and Js. Can easily use libs like React, Vue and Angular.

This is a demo app using GUI library https://github.com/zserge/lorca which requires only Chrome and might even work with Firefox in the future.

@yang-zhang
yang-zhang / multi-face.ipynb
Last active December 27, 2023 05:28
Multi-task Deep Learning Experiment using fastai Pytorch
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jcreinhold
jcreinhold / test_transforms.ipynb
Last active April 1, 2019 20:37
test fastai transforms with nifti images
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Davor111
Davor111 / sshuttle.sh
Created February 17, 2017 08:34
How to use sshuttle with .key, .csr or .pem files for authentication
#It's not directly mentioned in the documentation on how to do this, so here you go. This command will tunnel everything including DNS:
sshuttle --dns -vr user@yourserver.com 0/0 --ssh-cmd 'ssh -i /your/key/path.pem'
@Willib
Willib / export images to a video (async)
Last active May 28, 2023 13:24
export images(or one image) to a video in swift 3
//
// CXEImageToVideo.swift
// VideoAPPTest
//
// Created by Wulei on 16/12/14.
// Copyright © 2016年 wulei. All rights reserved.
//
import Foundation
import AVFoundation
@scottfrazer
scottfrazer / style_guide.md
Last active May 18, 2023 17:37
WDL Best Practices / Style Guide

"My First WDL" Template

task name {
  String in
  command {
    echo '${in}'
  }
  output {
 String out = read_string(stdout())
func myFunc(i: Int, @noescape f: Int -> Bool) -> Bool {
return f(i)
}
func myFunc(i: Int) -> Bool {
return myFunc(i) { n in n % 2 == 0 }
}