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 / 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
@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 / 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)
Sorry, this is too big to display.
@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

@den-run-ai
den-run-ai / bench_excel_writers.py
Created April 18, 2017 18:33 — forked from jmcnamara/bench_excel_writers.py
Benchmark of several Python Excel writing modules
##############################################################################
#
# Simple Python program to benchmark several Python Excel writing modules.
#
# python bench_excel_writers.py [num_rows] [num_cols]
#
#
import sys
from time import clock
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@den-run-ai
den-run-ai / keymouseloggertest.py
Created October 4, 2016 14:39 — forked from Sebelino/keymouseloggertest.py
Key/mouse logger demo with PyUserInput
#!/usr/bin/env python
# The following is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
from pykeyboard import PyKeyboardEvent
from pymouse import PyMouseEvent
from threading import Thread
@den-run-ai
den-run-ai / gist:7fc5c00530d77bc14bf7813e68314274
Created September 28, 2016 04:40 — forked from Bouke/gist:11261620
Multiple Python installations on OS X

Previous versions used homebrew to install the various versions. As suggested in the comments, it's better to use pyenv instead. If you are looking for the previous version of this document, see the revision history.

$ brew update
$ brew install pyenv
$ pyenv install 3.5.0
$ pyenv install 3.4.3
$ pyenv install 3.3.6
$ pyenv install 3.2.6
$ pyenv install 2.7.10

$ pyenv install 2.6.9