View index.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header('Content-type: text/xml'); | |
/* | |
Runs from a directory containing files to provide an | |
RSS 2.0 feed that contains the list and modification times for all the | |
files. | |
*/ | |
$feedName = "My Audio Feed"; | |
$feedDesc = "Feed for the my audio files in some server folder"; |
View decorators.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.contrib.auth import REDIRECT_FIELD_NAME | |
from django.shortcuts import render, resolve_url | |
from myapp.settings import cfg | |
from myapp import settings | |
from urllib.parse import urlparse | |
import uuid | |
def login_is_required( |
View main.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
) | |
type Fruit struct { | |
Name string | |
Color string | |
} |
View latex-jekyll-site.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: generate-site | |
on: | |
pull_request: [] | |
push: | |
branches: | |
- "main" | |
jobs: | |
Update: |
View Singularity
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bootstrap: docker | |
From: ubuntu:16.04 | |
%runscript | |
. /torch/install/bin/torch-activate | |
exec /bin/bash | |
%labels | |
MAINTAINER vsochat@stanford.edu |
View vcademy_mutual_information.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Mutual Information | |
% This shows why mutual information is important for registration, more-so | |
% than another metric like the least sum of squares. | |
% VSoch July 2013 | |
% First, let's read in two pickle images that we want to register | |
% Note - this is a picture I found on google search, and I transformed it in | |
% photoshop by moving it down and right, and then CONTROL+I to get the inverse | |
pickle1 = imread('pickle1.png'); | |
pickle2 = imread('pickle2.png'); |
View dinosaur.lp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% clingo dinosaur.lp | |
% These are blanket facts, statements that each of these is living | |
% I think these are called atoms | |
living(vanessa). | |
living(fernando). | |
living(maria). | |
% This tells use size of arms for each living thing | |
armsize(vanessa, "small"). | |
armsize(fernando, "large"). |
View joblib_vs_pickle.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sklearn.externals import joblib | |
import time | |
import numpy | |
import pickle | |
bigarray = numpy.zeros([190,91,190]) | |
bigarray = bigarray.flatten() | |
### Saving |
View snakemake-debugging.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a small script (that typically I copy paste) on a Google Cloud instance | |
# to set up an environment to mimic a worker. It includes installing snakemake, | |
# retrieving a package with the working directory (which typically has the | |
# version of snakemake I aim to develop or debug, and then interactively debugging | |
# or doing this. | |
sudo apt-get install -y wget bzip2 ca-certificates gnupg2 git | |
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh | |
sudo chown -R $USER /opt | |
bash Miniconda3-latest-Linux-x86_64.sh -b -p /opt/conda |
NewerOlder