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.
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- | |
# vi: set ft=python sts=4 ts=4 sw=4 et: | |
# | |
# Copyright 2023 Oscar Esteban <code@oscaresteban.es> | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 |
#!/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.
from pathlib import Path | |
from nipype.pipeline import engine as pe | |
from nibabies.workflows.anatomical.registration import init_coregistration_wf | |
from nibabies.workflows.anatomical.brain_extraction import init_infant_brain_extraction_wf | |
from nibabies.workflows.anatomical.outputs import init_coreg_report_wf | |
wf = pe.Workflow(name="nibabies_anat") | |
be = init_infant_brain_extraction_wf(omp_nthreads=8, age_months=2) | |
be.inputs.inputnode.in_t2w = "/Users/oesteban/tmp/nibabies-coregistration/data/sub-MOD1319/anat/sub-MOD1319_run-14_T2w.nii.gz" |
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, |
<?xml version="1.0" encoding="utf-8"?> | |
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only" default-locale="en-GB"> | |
<info> | |
<title>Nature (brief style)</title> | |
<id>http://www.zotero.org/styles/nature</id> | |
<link href="http://www.zotero.org/styles/nature" rel="self"/> | |
<link href="http://www.nature.com/nature/authors/gta/index.html#a5.4" rel="documentation"/> | |
<link href="http://www.nature.com/srep/publish/guidelines#references" rel="documentation"/> | |
<author> | |
<name>Oscar Esteban</name> |
"""Conforming input data.""" | |
from pathlib import Path | |
from tempfile import mkdtemp | |
import numpy as np | |
import nibabel as nb | |
from scipy.ndimage import map_coordinates | |
def conform_data(in_file, out_file=None, out_size=(256, 256, 256), out_zooms=(1.0, 1.0, 1.0), order=3): | |
"""Conform the input dataset to the canonical orientation.""" |
This is the table
+----------+-------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Priority | Data | Behavior | +==========+===================================================================================================================+=============================================================================================================================================================================================