This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2016 (C) Almar Klein. Consider this 2-clause BSD licensed. | |
""" | |
I initially wrote this to be included in flexx for multiple processes | |
on the same machine to communicate, more specifically, to allow a Flexx | |
CLI to get info on and terminate running server processes. I tested it | |
to work on Windows and Linux. I eventuially discarded this approach | |
because I don't fully get how UDP multicast works. It's important for | |
this to only work for localhost, and I am not sure if it does, or how | |
hard it is to compromise this. I went with a simpler approach based on | |
http requests using Tornado. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
D:\dev>conda build pyapps\conda-recipes\freeimage | |
Removing old build environment | |
Removing old work directory | |
BUILD START: freeimage-3.17.0-vc10_1 | |
Fetching package metadata: ........ | |
Solving package specifications: ........... | |
The following NEW packages will be INSTALLED: | |
msvc_runtime: 1.0.1-vc10_0 [vc10] | |
pip: 7.1.2-py34_0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from bokeh.plotting import output_notebook, show, figure | |
from bokeh.models import Plot, CustomJS, TapTool, ColumnDataSource, Line, DataRange1d | |
output_notebook() | |
p = figure() | |
t = np.linspace(0, 5, 100) | |
l1 = p.line(t, np.sin(t), color='#ff0000', nonselection_color='#888', line_width=5) | |
l2 = p.line(t, np.sin(t+1), color='#00ff00', nonselection_color='#888', line_width=5) | |
#l3 = p.line(t, np.sin(t+2), color='#0000ff', nonselection_color='#888', line_width=5) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c:\Anaconda34>Scripts\conda-build c:\almar\devel\conda-recipes\freeimage | |
Removing old build environment | |
Removing old work directory | |
BUILD START: freeimage-3.17.0-vc10_1 | |
Fetching package metadata: ...... | |
Solving package specifications: ......... | |
The following NEW packages will be INSTALLED: | |
pip: 7.1.2-py34_0 | |
python: 3.4.3-0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import itertools | |
import os | |
import hashlib | |
import numpy as np | |
import vispy | |
from vispy import app | |
from vispy import scene | |
from vispy import gloo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# Copyright (c) 2014, Vispy Development Team. | |
# Distributed under the (new) BSD License. See LICENSE.txt for more info. | |
""" | |
vispy backend for Qt (PySide and PyQt4). | |
""" | |
from __future__ import division |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# ----------------------------------------------------------------------------- | |
# Copyright (c) 2014, Vispy Development Team. All Rights Reserved. | |
# Distributed under the (new) BSD License. See LICENSE.txt for more info. | |
# ----------------------------------------------------------------------------- | |
from __future__ import print_function | |
import sys | |
import ctypes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Image(np.ndarray): | |
def __new__(cls, array): | |
return array.view(cls) | |
def __repr__(self): | |
n = 'x'.join([str(i) for i in self.shape]) | |
dtype = self.dtype | |
ndim = self.ndim | |
if self.shape[-1] in (1,3,4): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PointSet(np.ndarray): | |
""" The PointSet class can be used to represent sets of points or | |
vectors, as well as singleton points. The dimensionality of the | |
vectors in the pointset can be anything, and the dtype can be any | |
of those supported by numpy. | |
This class inherits from np.ndarray, which makes it very flexible; | |
you can threat it as a regular array, and also pass it to functions | |
that require a numpy array. The shape of the array is NxD, with N | |
the number of points, and D the dimensionality of each point. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
Functionality for cleaning up your git repository. | |
This uses commands found on: | |
https://help.github.com/articles/remove-sensitive-data | |
""" | |