This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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/") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \documentclass[a4paper,10pt]{letter} | |
| \usepackage[utf8]{inputenc} | |
| \usepackage[freepin,crossmark]{ticket} | |
| \usepackage{graphicx} | |
| \unitlength=1mm | |
| \ticketSize{52}{78} | |
| \ticketNumbers{2}{3} | |
| \renewcommand{\ticketdefault}{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script src="https://cdn.jsdelivr.net/npm/chart.js@2.9.3/dist/Chart.min.js"></script> | |
| </head> | |
| <body> | |
| <div width="100px" height="100px"> | |
| <canvas id="myChart"></canvas> | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pickle | |
| import itertools | |
| import numpy as np | |
| import tensorflow.keras as keras | |
| with open('HackathonMetadata.pkl','rb') as ff: | |
| metad = pickle.load(ff) | |
| with open('HackathonData_Homology0.pkl','rb') as ff: | |
| homol = pickle.load(ff) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| __author__ = 'Dominik Krzeminski (dokato)' | |
| tau = 2 | |
| I_ext = 0.5 | |
| a = 0.8 | |
| b = 0.7 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(shiny) | |
| library(magrittr) | |
| library(ggplot2) | |
| ui <- fluidPage( | |
| checkboxGroupInput("checkbox", "Variables to show:", | |
| c("psavert", "uempmed", "unemploy")), | |
| plotOutput("plot") | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import mne | |
| from mne.datasets.brainstorm import bst_resting | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| import scipy.signal as ss | |
| ########################## INPUT: | |
| folder = os.path.join(bst_resting.data_path(), 'MEG/bst_resting') | |
| file = 'subj002_spontaneous_20111102_01_AUX_raw.fif' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import mne | |
| from mne.datasets.brainstorm import bst_resting | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| import scipy.signal as ss | |
| folder = os.path.join(bst_resting.data_path(), 'MEG/bst_resting') | |
| file = 'subj002_spontaneous_20111102_01_AUX_raw.fif' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(shiny) | |
| library(shiny.router) | |
| options(shiny.router.debug = T) | |
| # This generates menu in user interface with links. | |
| menu <- ( | |
| tags$ul( | |
| tags$li(a(class = "item", href = "/", "Page")), | |
| tags$li(a(class = "item", href = route_link("other"), "Other page")) | |
| ) |
NewerOlder