Skip to content

Instantly share code, notes, and snippets.

View smutch's full-sized avatar

Simon Mutch smutch

View GitHub Profile
@smutch
smutch / bayesopt_test_2d.ipynb
Created November 21, 2017 06:23
py: Scikit-optimize issue
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@smutch
smutch / CMakeLists.txt
Last active September 12, 2017 07:25
c: iterate hdf5 datasets
cmake_minimum_required(VERSION 3.0)
project(hdf5_check_ds)
# output paths
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
find_package(HDF5 REQUIRED COMPONENTS C HL)
include_directories(${HDF5_INCLUDE_DIRS})
@smutch
smutch / chiara_send.ipynb
Created June 9, 2016 04:38
ipynb: PCA analysis Tonini 2016b galaxies
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@smutch
smutch / PCA.ipynb
Created June 6, 2016 00:13
ipynb: PCA
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@smutch
smutch / diff_with_version.sh
Last active May 24, 2016 02:01
sh: diff latex with previous version
#!/usr/bin/env bash
# This is free and unencumbered software released into the public domain.
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# means.
# In jurisdictions that recognize copyright laws, the author or authors
@smutch
smutch / groupby_cis.py
Created May 17, 2016 06:28
py: pandas grouping and aggregating to plot relations with confidence intervals (CIs)
#!/usr/bin/env python
import numpy as np
import matplotlib.pyplot as plt
from dragons import meraxes
import pandas as pd
__author__ = "Simon Mutch"
__date__ = "2016-05-17"
@smutch
smutch / ads
Last active May 18, 2016 02:44
py: ADS tools
#!/usr/bin/env python3
"""ADS tools."""
from requests import post
from pathlib import Path
import subprocess
import click
import webbrowser
from urllib.parse import quote as url_quote
@smutch
smutch / raw_cells.html
Created March 23, 2016 03:49
ipynb: raw cells for presentation
<!-- Place these cells at the head of the notebook (N.B. there are cells below which go at the end though)-->
<script>
jQuery(document).ready(function($) {
$(window).load(function(){
$('#preloader').fadeOut('slow',function(){$(this).remove();});
});
});
</script>
@smutch
smutch / hank_turnover.ipynb
Last active March 23, 2016 06:56
ipynb: Turnover plots for hank
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@smutch
smutch / bootstrap.py
Created February 29, 2016 00:44
py: boostrap generator
import numpy as np
class Bootstrap():
def __init__(self, arr, n, statistic=np.mean):
self.ii = 0
self.n = n
self.arr = np.array(arr).squeeze()
self.statistic = statistic
def __iter__(self):