This file contains 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
module fbin | |
use iso_c_binding | |
implicit none | |
contains | |
subroutine eqpop_bin(X, Nb, Ntrl, Xout) | |
! ARG | |
integer, intent(in) :: Nb, Ntrl | |
real(c_double), intent(in) :: X(Ntrl) | |
integer(c_int8_t), intent(out) :: Xout(Ntrl) | |
! LOC |
This file contains 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
function x = rebin(x_in,m) | |
% rebin(x, m) - rebin an integer sequence | |
% | |
% Rebin an already discretised sequence (eg of intger values) into m levels | |
% | |
x_flat = x_in(:); | |
% test for positive integer input | |
if any(mod(x_flat,1)) || (min(x_flat) < 0) |
This file contains 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 | |
# check given path is an NFS mount | |
FSTYPE="$(df -P -T $1 | tail -n +2 | awk '{print $2}')" | |
# first three characters | |
FSTYPE=${FSTYPE:0:3} | |
if [ "$FSTYPE" = "nfs" ] | |
then | |
RC=0 |
This file contains 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
module class_ExtendArray | |
implicit none | |
private | |
type, public :: ExtendArray | |
integer(8) :: capacity | |
integer(8) :: length | |
real(8), pointer :: data(:) | |
real(8), pointer :: buffer(:) |
This file contains 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 | |
# | |
# This script is useful if: | |
# - you have a manuscript that you want to upload to the arXiv, | |
# - you are using biblatex, and | |
# - you are using texlive2015 while arXiv is still on texlive2011 | |
# | |
# Put this file in a directory containing the manuscript you want to | |
# upload to arXiv.org, and adapt the paths below. |
This file contains 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 python | |
import os | |
import sys | |
import time | |
from datetime import datetime | |
def set_folder_dates(root): | |
for x in os.walk(root, topdown=False): |
This file contains 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
Ntrl_class = 720; | |
% can change effect strength here | |
effect_mean = 0.2; | |
% effect_mean = 0.1; | |
r = rng(999); | |
% stimulus values (ie 0: standard, 1: deviant) | |
y = [zeros(Ntrl_class,1); ones(Ntrl_class,1)]; | |
% class 0 data: standard norml | |
x0 = randn(Ntrl_class,1); | |
% class 1 data: a small difference in mena |
OlderNewer