Skip to content

Instantly share code, notes, and snippets.

View prakashjayy's full-sized avatar
🏠
Working from home

prakashjay prakashjayy

🏠
Working from home
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@slint
slint / zenodo-restricted-curl.sh
Created April 15, 2019 08:54
Zenodo restricted access REST API usage
# Let's assume you have received via email the secret link:
# https://zenodo.org/record/123456?token=<LONG-TOKEN-HERE>
# Make a curl request, but store the cookies in a file:
$ curl --cookie-jar zenodo-cookies.txt "https://zenodo.org/record/123456?token=<LONG-TOKEN-HERE>"
...HTML output...
# Use the cookie file to make subsequent requests to the api:
$ curl --cookie zenodo-cookies.txt "https://zenodo.org/api/records/123456"
{
@jcreinhold
jcreinhold / nii_to_tif.py
Last active August 1, 2023 18:23
Convert NIfTI images into multiple TIF images
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
nii_to_tif
command line executable to convert 3d nifti images to
individual tiff images along a user-specified axis
call as: python nii_to_tif.py /path/to/nifti /path/to/tif
(append optional arguments to the call as desired)
@andrequeiroz
andrequeiroz / holtwinters.py
Last active July 5, 2023 07:50
Implementation of Holt-Winters algorithms in Python 2
#The MIT License (MIT)
#
#Copyright (c) 2015 Andre Queiroz
#
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
#copies of the Software, and to permit persons to whom the Software is
#furnished to do so, subject to the following conditions: