In this article, I will share some of my experience on installing NVIDIA driver and CUDA on Linux OS. Here I mainly use Ubuntu as example. Comments for CentOS/Fedora are also provided as much as I can.
#!/usr/bin/env python3 | |
import sys | |
import fontforge | |
def main(file): | |
for font in fontforge.fontsInFile(file): | |
f = fontforge.open(u'%s(%s)' % (file, font)) | |
f.generate('%s.ttf' % font) |
This tutorial is dated Oct 2021, if it's much further on than that this information might be out of date.
This is a guide on setting up a static HTTPS website on your raspberry pi using docker and nginx. The aim is to have this running on the raspberry pi and to be able to access it from a host computer on the same local network. You should already be able to ssh into your pi from your host computer and have raspberry pi OS set up.
import os | |
import nibabel as nb | |
import numpy as np | |
from nipype.interfaces.base import isdefined | |
from nipype.interfaces import fsl, ants, afni | |
import nipype.pipeline.engine as pe | |
from niworkflows.interfaces.registration import ( | |
EstimateReferenceImage, |
A lot of GitHub projects need to have pretty math formulas in READMEs, wikis or other markdown pages. The desired approach would be to just write inline LaTeX-style formulas like this:
$e^{i \pi} = -1$
Unfortunately, GitHub does not support inline formulas. The issue is tracked here.
# Makefile for Sphinx documentation | |
# | |
# You can set these variables from the command line. | |
SPHINXOPTS = | |
SPHINXBUILD = sphinx-build | |
PAPER = | |
BUILDDIR = _build | |
# User-friendly check for sphinx-build |
ANTS : http://picsl.upenn.edu/ANTS/ c3d : http://www.itksnap.org/pmwiki/pmwiki.php?n=Convert3D.Convert3D
export PATH=/software/ANTS-dev:$PATH c3d_affine_tool -ref [A] -src [B] bbreg.mat -fsl2ras -oitk fsl2antsAffine.txt WarpImageMultiTransform 3 [B] [C] -R [D] [A_Warp].nii.gz [A_Affine].txt fsl2antsAffine.txt
#! /bin/sh | |
# | |
# Author: Andreas Olsson <[email protected]> | |
# Version: @(#)autossh_tunnel.foo 0.1 27-Aug-2008 [email protected] | |
# | |
# For each tunnel; make a uniquely named copy of this template. | |
## SETTINGS | |
# |
""" | |
Usage: python remove_output.py notebook.ipynb [ > without_output.ipynb ] | |
Modified from remove_output by Minrk | |
""" | |
import sys | |
import io | |
import os | |
from IPython.nbformat.current import read, write |
# -*- coding: utf-8 -*- | |
# Author: Douglas Creager <[email protected]> | |
# This file is placed into the public domain. | |
# Calculates the current version number. If possible, this is the | |
# output of “git describe”, modified to conform to the versioning | |
# scheme that setuptools uses. If “git describe” returns an error | |
# (most likely because we're in an unpacked copy of a release tarball, | |
# rather than in a git working copy), then we fall back on reading the | |
# contents of the RELEASE-VERSION file. |