Skip to content

Instantly share code, notes, and snippets.

View lan496's full-sized avatar

Kohei Shinohara lan496

View GitHub Profile
@mariogeiger
mariogeiger / spherical_harmonics.py
Created December 8, 2020 17:31
jax code for spherical harmonics
# from sympy.functions.special.spherical_harmonics import Znm
# yl(x, y, z) = -(-1)**l * (-(-1)**m if m >=0 else 1) sqrt(4 pi) * Znm(l, m, acos(z), atan2(y, x))
# assuming x**2 + y**2 + z**2 = 1
import jax
import jax.numpy as jnp
@jax.jit
def y0(x, y, z):
return jnp.stack([
@mbinna
mbinna / effective_modern_cmake.md
Last active May 3, 2024 15:44
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

@domenic
domenic / redirecting-github-pages.md
Created February 10, 2017 19:28
Redirecting GitHub pages after a repository move

Redirecting GitHub Pages after a repository move

The problem

You have a repository, call it alice/repo. You would like to transfer it to the user bob, so it will become bob/repo.

However, you make heavy use of the GitHub Pages feature, so that people are often accessing https://alice.github.io/repo/. GitHub will helpfully redirect all of your repository stuff hosted on github.com after the move, but will not redirect the GitHub Pages hosted on github.io.

The solution

@0xjac
0xjac / private_fork.md
Last active May 3, 2024 18:34
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git