Skip to content

Instantly share code, notes, and snippets.

View jcfr's full-sized avatar
🎯
Focusing

Jean-Christophe Fillion-Robin jcfr

🎯
Focusing
View GitHub Profile
@jcfr
jcfr / slicer-4.0-module-description.xsl
Created October 21, 2011 03:49
slicer-4.0-module-description.xsl
<?xml version="1.0" encoding="UTF-8"?>
<xsl:transform version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" indent="yes" encoding="UTF-8"/>
<xsl:template name="newline"><xsl:text>&#10;</xsl:text></xsl:template>
<!-- Source: http://geekswithblogs.net/Erik/archive/2008/04/01/120915.aspx -->
<xsl:template name="string-replace-all">
@jcfr
jcfr / slicer-4.0-module-category.xsl
Created October 21, 2011 03:50
slicer-4.0-module-category.xsl
<?xml version="1.0" encoding="UTF-8"?>
<xsl:transform version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" indent="yes" encoding="UTF-8"/>
<xsl:template match="/executable">
<xsl:value-of select="category" />
</xsl:template>
@jcfr
jcfr / slicer-4.0-module-parameterdescription.xsl
Last active September 27, 2015 17:08
slicer-4.0-module-parameterdescription.xslThe XSLT understands nested parameter tag (Thanks Julien)
<?xml version="1.0" encoding="UTF-8"?>
<xsl:transform version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" indent="yes" encoding="UTF-8"/>
<xsl:template name="newline"><xsl:text>&#10;</xsl:text></xsl:template>
<!-- See http://na-mic.org/Mantis/view.php?id=2536 -->
<xsl:template match="name"> (<xsl:value-of select="."/>)</xsl:template>
@jcfr
jcfr / slicer-4.0-module-acknowledgements.xsl
Last active September 27, 2015 17:08
slicer-4.0-module-acknowledgements.xsl In addition to Acknowledgements, also display Title, Authod/Contributor and License (Thanks Julien)
<?xml version="1.0" encoding="UTF-8"?>
<xsl:transform version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" indent="yes" encoding="UTF-8"/>
<xsl:template name="newline"><xsl:text>&#10;</xsl:text></xsl:template>
<xsl:template match="/executable">
<xsl:text>:'''Title:''' </xsl:text><xsl:value-of select="title"/><xsl:call-template name="newline"/>
@yamaya
yamaya / xcode-clang-vers
Last active November 10, 2024 04:44
Xcode clang version record
# Xcode 4.3.3
Apple clang version 3.1 (tags/Apple/clang-318.0.61) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin11.4.0
Thread model: posix
# Xcode 4.3.2
Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin11.4.0
Thread model: posix
import numpy as np
def run(self,mvNode,labelNode, filename):
"""
Extract pixel curves from a multivolume node
prerequisite: labelNode and mvNode need to have the same dimensions, this is not checked.
As long as the label node is created from the mvNode, that's no problem at all.
"""
# get a numpy reference to the moving volume buffer
@oliora
oliora / CMakeLists.txt
Last active June 17, 2023 05:59
Forward added/changed variables to the function's parent scope
# forward_variables usage example
include(forward_variables.cmake)
# After call to this function, all variables set by find_package will be forwarded to
# function caller scope (i.e. into parent scope).
function(find_boost_package)
start_track_variables()
set(bla_bla 1)
@nolanlawson
nolanlawson / citizen.md
Last active February 19, 2019 12:38
How to be a good open-source citizen

How to be a good open-source citizen

A short list of tips and recommendations, for those who use OSS and/or want to contribute to it.

  1. Give feedback

Before I get into the wrong ways to give feedback, let me be clear: the worst thing you can do is give no feedback at all.

@njsmith
njsmith / ucrt-csv.py
Last active June 10, 2024 06:53
Information on linking to the new Windows UCRT
import sys
import subprocess
import csv
def describe_ucrt_lib(platform):
lib_path = "windows-10-sdk/Lib/10.0.10240.0/ucrt/{}/ucrt.lib".format(platform)
output = subprocess.check_output(["nm", lib_path])
output = output.decode("utf-8")
# Output (x86 32-bit) looks like:
@lukas-h
lukas-h / license-badges.md
Last active November 11, 2024 03:22
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.

Translations: (No guarantee that the translations are up-to-date)