Skip to content

Instantly share code, notes, and snippets.

View avansp's full-sized avatar
🎯
Focusing

Avan Suinesiaputra avansp

🎯
Focusing
  • King's College London
  • United Kingdom
  • X @asui085
View GitHub Profile
@avansp
avansp / .block
Last active April 1, 2017 11:38
Visualising ideas
license: gpl-3.0
@avansp
avansp / PatientRepository.java
Last active August 19, 2016 22:15 — forked from anonymous/PatientRepository.java
Repository interface for Patient table
package io.avansp.spring_mysql.services;
import org.springframework.data.jpa.repository.JpaRepository;
import io.avansp.spring_mysql.domain.Patient;
public interface PatientRepository
extends JpaRepository<Patient, Long> {}
@avansp
avansp / Patient.java
Last active August 19, 2016 03:13
Entity for Patient table
@Entity
public class Patient {
@Id
private long id;
private String PatientID;
private int Age;
private String Gender;
@avansp
avansp / Dummy.xml
Last active January 5, 2016 07:00
A template for XNAT pipeline XML file
<?xml version="1.0" encoding="UTF-8"?>
<Pipeline xmlns="http://nrg.wustl.edu/pipeline" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://nrg.wustl.edu/pipeline ..\schema\pipeline.xsd" xmlns:fileUtils="http://www.xnat.org/java/org.nrg.imagingtools.utils.FileUtils">
<name>Dummy</name>
<location>/opt/xnat/tools/pipelines</location>
<description>Dummy pipeline test</description>
<documentation>
<authors>
<author>
<lastname>Suinesiaputra</lastname>
<firstname>Avan</firstname>
@avansp
avansp / dcm2niix.xml
Created January 4, 2016 08:38
A sample XNAT resource descriptor for dcm2niix (DICOM to NIFTI) converter
<?xml version="1.0" encoding="UTF-8"?>
<Resource xmlns="http://nrg.wustl.edu/pipeline">
<name>dcm2niix</name>
<type>executable</type>
<location>/opt/xnat/tools/bin</location>
<description>Convert DICOM images into NIFTI image files</description>
<input>
<argument id="output">
<name>f</name>
<descriptor>Output folder</descriptor>
# WINDOWS USERS: The '\' character is not supported by Maven. Do not use the '\' character in your file paths.
# Replace any '\' characters with the '/'. The '/' works as a file path separator on UNIX and WINDOWS.
# NOTE: All file paths should be absolute, not relative to the xnat_builder folder. This means that, if your
# pipeline or modules folder is in the same relative folder as your xnat_builder folder, you should still use
# the full path to those folders instead of ../pipeline or ../modules.
maven.appserver.home = /opt/tomcat
# Default XNAT site title, also used as mail subject prefix.
@avansp
avansp / tomcat
Last active December 28, 2015 09:12
#!/bin/bash
# description: Tomcat Start Stop Restart
# processname: tomcat
# chkconfig: 234 20 80
CATALINA_HOME=/opt/tomcat/bin
case $1 in
start)
/bin/su tomcat $CATALINA_HOME/startup.sh
;;
@avansp
avansp / tomcat7-simple
Created March 5, 2015 07:36
Tomcat7 init script for RedHat 6.6 (to be placed inside /etc/init.d/ directory)
#!/bin/bash
#
# tomcat7 This shell script takes care of starting and stopping Tomcat 7
#
# chkconfig: 234 80 20
#
### BEGIN INIT INFO
# Provides: tomcat7
# Required-Start: $network $syslog
# Required-Stop: $network $syslog
@avansp
avansp / AIC_vs_BIC.r
Created November 7, 2014 21:27
Comparison plot between AIC and BIC penalty terms
# AIC vs BIC comparison
#
# AIC = -2*log(L) + 2*k
# BIC = -2*log(L) + k*log(n)
#
# Since the first term is equal, we only compute the penalized term
k <- seq(1,50)
n <- seq(1,20)
@avansp
avansp / README.md
Last active March 29, 2017 23:38
A generic simulated annealing algorithm

Simulated Annealing with R

Playing around.