Skip to content

Instantly share code, notes, and snippets.

View tritemio's full-sized avatar

Antonino Ingargiola tritemio

View GitHub Profile
@tritemio
tritemio / matplotlib spectrogram
Last active August 29, 2015 14:15
matplotlib spectrogram
{
"metadata": {
"name": "",
"signature": "sha256:f2f3593c1d178e2336d96bcb978c3642ce5e0a5943dbf554e24448310bff2a7b"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tritemio
tritemio / open file dialog
Created June 24, 2015 00:25
Open file dialog for default ipython notebook in Anaconda
def openfile_dialog():
from PyQt4 import QtGui
app = QtGui.QApplication([dir])
fname = QtGui.QFileDialog.getOpenFileName(None, "Select a file...", '.', filter="All files (*)")
return str(fname)
<?xml version="1.0" encoding="UTF-16"?>
<DATABASE>
<EXE NAME="python.exe" FILTER="CMI_FILTER_PRIVACY">
<MATCHING_FILE NAME="python.exe" SIZE="40960" CHECKSUM="0xBCD8C813" MODULE_TYPE="WIN32" PE_CHECKSUM="0xA500" LINKER_VERSION="0x0" LINK_DATE="03/06/2015 18:06:11" UPTO_LINK_DATE="03/06/2015 18:06:11" EXE_WRAPPER="0x0" />
<MATCHING_FILE NAME="python34.dll" SIZE="4058624" CHECKSUM="0xDAC8FABC" BIN_FILE_VERSION="3.4.3150.1013" BIN_PRODUCT_VERSION="3.4.3150.1013" PRODUCT_VERSION="3.4.3" FILE_DESCRIPTION="Python Core" COMPANY_NAME="Python Software Foundation" PRODUCT_NAME="Python" FILE_VERSION="3.4.3" ORIGINAL_FILENAME="python34.dll" INTERNAL_NAME="Python DLL" LEGAL_COPYRIGHT="Copyright © 2001-2015 Python Software Foundation. Copyright © 2000 BeOpen.com. Copyright © 1995-2001 CNRI. Copyright © 1991-1995 SMC." VERDATEHI="0x0" VERDATELO="0x0" VERFILEOS="0x40004" VERFILETYPE="0x1" MODULE_TYPE="WIN32" PE_CHECKSUM="0x3EDF55" LINKER_VERSION="0x0" UPTO_BIN_FILE_VERSION="3.4.3150.1013" UPTO_BIN_PRODUCT_VERSION="3.
<?xml version="1.0" encoding="UTF-16"?>
<WERReportMetadata>
<OSVersionInformation>
<WindowsNTVersion>6.1</WindowsNTVersion>
<Build>7601 Service Pack 1</Build>
<Product>(0x4): Windows 7 Enterprise</Product>
<Edition>Enterprise</Edition>
<BuildString>7601.18933.amd64fre.win7sp1_gdr.150715-0600</BuildString>
<Revision>1130</Revision>
<Flavor>Multiprocessor Free</Flavor>
@tritemio
tritemio / ipython notebook error log
Created September 10, 2015 16:22
ipython notebook error
[W 18:42:14.631 NotebookApp] WebSocket ping timeout after 8895168 ms.
[W 18:42:28.588 NotebookApp] WebSocket ping timeout after 8912305 ms.
[E 18:42:32.639 NotebookApp] Uncaught exception GET /api/kernels/0057f989-3be1-47d6-9c45-c2e9f4090f56/channels?session_id=36FCE332E3374711BAC31245B311D11C (::1)
HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/api/kernels/0057f989-3be1-47d6-9c45-c2e9f4090f56/channels?session_id=36FCE332E3374711BAC31245B311D11C', version='HTTP/1.1', remote_ip='::1', headers={'Connection': 'keep-alive, Upgrade', 'Host': 'localhost:8888', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'Sec-Websocket-Key': '4HDkCm1669Wv1RaGMTL5OA==', 'Sec-Websocket-Version': '13', 'Accept-Language': 'en-US,en;q=0.5', 'Accept-Encoding': 'gzip, deflate', 'Pragma': 'no-cache', 'Origin': 'http://localhost:8888', 'Sec-Websocket-Extensions': 'permessage-deflate', 'Upgrade': 'websocket', 'Cache-Control': 'no-cache', 'User-Agent': 'Mozilla/5.0 (Windows NT
@tritemio
tritemio / matplotlib bug backend switching.ipynb
Last active June 27, 2016 23:05
Matplotlib notebook bug while switching backend inline <-> notebook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tritemio
tritemio / notebook_runner.py
Created November 10, 2015 18:06
Run notebooks from another notebook, with input parameters
def run_notebook(notebook_name):
"""Runs the notebook `notebook_name` (file name with no extension).
This function executes notebook with name `notebook_name` (no extension)
and saves the fully executed notebook in a new file appending "-out"
to the original file name.
It also displays links to the original and executed notebooks.
"""
nb_name_full = notebook_name + '.ipynb'
@tritemio
tritemio / Example - 2CDE Method.ipynb
Last active March 16, 2016 00:22
A FRETBursts notebooks implementing the 2CDE method.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tritemio
tritemio / Decoding PTU files.ipynb
Last active November 8, 2016 20:15
Jupyter Notebook for decoding PicoQuant PTU files in python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.