Skip to content

Instantly share code, notes, and snippets.

View den-run-ai's full-sized avatar
🎯
Focusing

Denis Akhiyarov den-run-ai

🎯
Focusing
View GitHub Profile
@den-run-ai
den-run-ai / 01_multi_select_widget_readme.md
Created September 29, 2017 15:00 — forked from pbugnion/01_multi_select_widget_readme.md
Multiple checkbox selection with searching with ipywidgets

Multiple selection with checkboxes and search field

Often, you want the user to choose n options (where n is small-ish) from a very large (hundreds or thousands) number of possibilities. Good UX around this dictates that the user should be able to search for the options they want.

This gist puts together a minimal example of binding a search field with multiple checkboxes using ipywidgets.

Usage

Sorry, this is too big to display.
@den-run-ai
den-run-ai / open file dialog
Last active March 4, 2020 16:29 — forked from tritemio/open file dialog
Open file dialog for default ipython notebook in Anaconda
def openfile_dialog():
from PyQt5 import QtGui
from PyQt5 import QtGui, QtWidgets
app = QtWidgets.QApplication([dir])
fname = QtWidgets.QFileDialog.getOpenFileName(None, "Select a file...", '.', filter="All files (*)")
return str(fname)
@den-run-ai
den-run-ai / fourex.py
Created December 5, 2018 17:47 — forked from tartakynov/fourex.py
Fourier Extrapolation in Python
import numpy as np
import pylab as pl
from numpy import fft
def fourierExtrapolation(x, n_predict):
n = x.size
n_harm = 10 # number of harmonics in model
t = np.arange(0, n)
p = np.polyfit(t, x, 1) # find linear trend in x
x_notrend = x - p[0] * t # detrended x
@den-run-ai
den-run-ai / getobject.py
Created December 26, 2018 14:44 — forked from EBNull/getobject.py
"Missing" win32com utilities for getting object instances from DLLs or from run-time licenced servers
__all__ = (
####### Class Objects
#CoGetClassObject - Normal, not wrapped
'CoDllGetClassObject', #Get ClassObject from a DLL file
####### ClassFactory::CreateInstance Wrappers
'CoCreateInstanceFromFactory', #Create an object via IClassFactory::CreateInstance
'CoCreateInstanceFromFactoryLicenced', #Create a licenced object via IClassFactory2::CreateInstanceLic