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
// CopyGrid defined in lib_grid/file_io/file_io.cpp | |
CopyGrid<APosition>(grid, gridOut, sh, destSh, aPosition); | |
size_t numVertsGrid = grid.num<Vertex>(); | |
size_t numVertsGridOut = gridOut.num<Vertex>(); | |
UG_COND_THROW(numVertsGrid != numVertsGridOut, "Num vertices of copied grid must agree."); | |
for (VertexIterator iter = grid.vertices_begin(); iter != grid.vertices_end(); ++iter) { | |
UG_LOGN("(grid before) aaSurfParams[*iter]: " << aaSurfParams[*iter]); | |
} |
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[utf8]{article} | |
\usepackage{url} | |
\usepackage{lineno} | |
\usepackage{microtype} | |
\usepackage{booktabs} | |
\usepackage[onehalfspacing]{setspace} | |
\usepackage{blindtext} | |
\usepackage{timestamp} | |
\usepackage{lscape} | |
\usepackage{tabularx} |
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
param( | |
[Parameter(Mandatory=$true)][String]$APPVEYOR_TOKEN="", | |
[Parameter(Mandatory=$true)][String]$PROJECT_SLUG="", | |
[String]$APPVEYOR_USER=stephanmg) | |
if ([string]::IsNullOrWhiteSpace($APPVEYOR_TOKEN)) { "No AppVeyor API token given" } | |
if ([string]::IsNullOrWhiteSpace($PROJECT_SLUG)) { "No project slug to trigger given" } | |
if ([string]::IsNullOrWhiteSpace($APPVEYOR_USER)) { "No Appveyor user given } | |
$headers = @{Authorization = "Bearer $APPVEYOR_TOKEN" } |
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
#!/bin/bash | |
# number of neurons | |
numNeurons=100 | |
# get neurons | |
for index in $(seq 1 "$numNeurons"); do | |
python get_swc.py --search "brain_region=neocortex" \ | |
--filter "cell_type=pyramidal" \ | |
--filter "archive=Hrvoj-Mihic_Semendeferi" \ |
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
using UnityEngine; | |
using System.Collections; | |
[RequireComponent (typeof (MeshFilter))] | |
public class Cone : MonoBehaviour { | |
/// subdivision | |
public int subdivisions = 10; | |
/// height and radius | |
public float radius = 1f; |
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
using UnityEngine; | |
using UnityEditor; | |
using System.Collections; | |
// an Editor method to create a cone primitive (so far no end caps) | |
// the top center is placed at (0/0/0) | |
// the bottom center is placed at (0/0/length) | |
// if either one of the radii is 0, the result will be a cone, otherwise a truncated cone | |
// note you will get inevitable breaks in the smooth shading at cone tips | |
// note the resulting mesh will be created as an asset in Assets/Editor |
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
GameObject cone = GameObject.Find("cone"); | |
Mesh mesh = cone.GetComponent<MeshFilter>().sharedMesh; | |
AssetDatabase.CreateAsset(msh, assetpath); | |
PrefabUtility.SaveAsPrefabAsset(mesh, prefabpath); | |
AssetDatabase.SaveAssets(); | |
AssetDatabase.Refresh(); |
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
parpool(4) | |
parfor K = 1 : 4 | |
if K == 1; compute_function_val(10); end | |
if K == 2; compute_function_val(20); end | |
if K == 3; compute_function_val(30); end | |
if K == 4; compute_function_val(40); end | |
end | |
function y=compute_function_val(m) |
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
# Amici.py | |
def check_gradients(self, x: np.ndarray = None, *args, **kwargs): | |
if x is None and 'petab_problem' in dir(self.amici_object_builder): | |
x = self.amici_object_builder.petab_problem.x_nominal_scaled | |
x_free = self.amici_object_builder.petab_problem.x_free_indices | |
return ObjectiveBase.check_gradients(self, x=x, x_free=x_free, *args, **kwargs) | |
# Base.py |
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
def run_optimization(importer, optimizer, output_folder, yaml_file, algorithm_name, num_starts, parallel): | |
""" | |
Run the optimization | |
Parameters | |
---------- | |
importer: | |
PEtab model importer | |
optimizer: | |
name of the optimizer | |
output_folder: |