Skip to content

Instantly share code, notes, and snippets.

View cjtu's full-sized avatar

Christian J. Tai Udovicic cjtu

View GitHub Profile
@cjtu
cjtu / craterpy_tutorial.ipynb
Last active July 29, 2022 21:52
Tutorial for craterpy v0.5.2 (see https://github.com/cjtu/craterpy).
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cjtu
cjtu / Numberwang.ipynb
Last active January 22, 2019 00:15
Itsa me, Numberwang
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cjtu
cjtu / hw2.ipynb
Created February 25, 2019 23:33
PHY 530 homework 2
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cjtu
cjtu / run_davinci.py
Created August 15, 2019 19:46
Guide for running Davinci commands from Python and passing image data to / from Davinci to Python
# Built-in dependencies
import os
import subprocess
# External dependencies (requires install, e.g. with conda)
import h5py
import numpy as np
# Uncomment and edit this if your Davinci interpreter is not at '/usr/local/bin/davinci'
# DAVINCI_PATH = "/path/to/bin/davinci"
@cjtu
cjtu / run_davinci.py
Last active August 15, 2019 19:51
Guide for running Davinci commands from Python and passing image data to / from Davinci to Python. Scroll to bottom for notebook with examples
# Built-in dependencies
import os
import subprocess
# External dependencies (requires install, e.g. with conda)
import h5py
import numpy as np
# Uncomment and edit this if your Davinci interpreter is not at '/usr/local/bin/davinci'
# DAVINCI_PATH = "/path/to/bin/davinci"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cjtu
cjtu / AST501_hw1.ipynb
Created February 5, 2020 18:14
AST501 Homework 1
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cjtu
cjtu / README.md
Last active June 18, 2020 00:01
Rename master branch to trunk for all git repos in a directory.

Trunkify

Tl;DR

  1. Run trunkify.sh <GH_username> to rename the master branch of all repos in a directory.
  2. You need to update the default branch for each repo on GitHub (follow urls printed out).

More instructions

First download the .trunkify.sh script and place it in a folder that has git repo(s) in it (e.g. your projects/ folder, NOT in a Git repo itself).

@cjtu
cjtu / environment.yml
Last active March 17, 2024 03:56
OLS regression tutorial with statsmodels in Python
channels:
- conda-forge
dependencies:
- statsmodels
- numpy
- matplotlib
@cjtu
cjtu / cookiecutter.md
Created March 12, 2021 21:23
Make a new repo with CookieCutter

How to make a repo from a template with CookieCutter

  1. Sign up for a GitHub account here
  2. Install cookiecutter with pip/conda/apt-get instructions here
  3. Choose a cookiecutter template (search on GitHub here)
  4. Get the link to the cookiecutter repo that ends in .git (should be in the template install instructions)
  5. Run cookiecutter reponame.git (e.g. cookiecutter https://github.com/mgancita/cookiecutter-pypackage.git)
  6. Follow the prompts to set the options for your new template folder (your name, the repo name, etc.)
  7. Change directory to your new empty template (cd new-repo-name)