Skip to content

Instantly share code, notes, and snippets.

View dokato's full-sized avatar

dokato

  • University of Cambridge
  • Cambridge, UK
View GitHub Profile
@dokato
dokato / badges.tex
Created October 15, 2020 17:18
badges sample
\documentclass[a4paper,10pt]{letter}
\usepackage[utf8]{inputenc}
\usepackage[freepin,crossmark]{ticket}
\usepackage{graphicx}
\unitlength=1mm
\ticketSize{52}{78}
\ticketNumbers{2}{3}
\renewcommand{\ticketdefault}{
@dokato
dokato / precomputed.R
Created December 7, 2021 17:18
precomputed
library(nat)
library(jsonlite)
library(float)
#' Based on specification
#' https://github.com/google/neuroglancer/tree/master/src/neuroglancer/datasource/precomputed
# write mesh to single res precomputed format
#meshes = read.neurons("../registration/dns_objs21_reg/")
#!/usr/bin/env python3
"""
Serialize a Python AST and save it as a pickle.
Usage examples
- From a file: $ python serialize_python_ast.py --input path/to/code.py --out ast.pkl
- From stdin: cat code.py | python serialize_python_ast.py --out ast.pkl
Output format (pickle)
- Pickled Python `ast.AST` object (the root node of the parsed tree)