This file contains 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
/** | |
Program to simlulate Log Normal Shadowing | |
Program generates data in "plot.dat" file which can be plottes using gnuplot | |
*Compile with | |
g++ lns.cpp -o lns -std=c++11 | |
*Plot with | |
plot "plot.dat" ;set xlabel "Seperation";set ylabel "Path Loss" |
This file contains 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
from SimpleCV import Image | |
from SimpleCV import Display,Camera | |
from socket import setdefaulttimeout | |
import SimpleCV as scv | |
setdefaulttimeout(None) | |
cam = Camera() | |
d1 = Display(title = "Resize to fit", fit = scv.RESIZE) | |
d2 = Display(title = "Crop to fit", fit = scv.SCROLL) |
This file contains 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
from SimpleCV import Image | |
from SimpleCV.DisplayNew import GtkDisplay | |
from socket import setdefaulttimeout | |
setdefaulttimeout(None) | |
d1 = GtkDisplay(title = "Resize to fit", fit = GtkDisplay.RESIZE) | |
d2 = GtkDisplay(title = "Crop to fit", fit = GtkDisplay.CROP) | |
img = Image('lenna') | |
fs = img.findLines() |
This file contains 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
img = Image('abc.png') | |
img.show() # should open a new qt window to show the image | |
#this call should not block, and should reutrn immediately to allow the user to do further image processing | |
#additional image processing | |
img.toGray() | |
img.whatever() |
This file contains 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
from time import sleep | |
from SimpleCV import Image | |
class Example: | |
def __init__(self): | |
pass | |
while(True): | |
l = Example() |
This file contains 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
from IPython.core.display import Javascript as JS | |
str = """ | |
window = window.open('http://simplecv.org/sites/all/themes/kalypso/images/SM_logo_color.png','simplecv','width=500,height=500') | |
""" | |
JS(str) |
This file contains 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
from abc import ABCMeta,abstractmethod | |
class Display: | |
__metaclass__ = ABCMeta | |
#TODO add text for adjusting image size to fit | |
""" | |
**SUMMARY** |
This file contains 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
==4870== Memcheck, a memory error detector | |
==4870== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. | |
==4870== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info | |
==4870== Command: python tsne_test.py | |
==4870== | |
==4870== Invalid read of size 4 | |
==4870== at 0x57398A: PyObject_GC_Del (in /usr/bin/python2.7) | |
==4870== by 0x55A056: ??? (in /usr/bin/python2.7) | |
==4870== by 0x4F7BA5: ??? (in /usr/bin/python2.7) | |
==4870== by 0x5B1F2C: ??? (in /usr/bin/python2.7) |
This file contains 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
# distutils: language = c++ | |
# https://groups.google.com/forum/#!topic/cython-users/Ady-DdWu6rE | |
from cython.parallel import parallel, prange, threadid | |
from libcpp.vector cimport vector | |
from libc.stdlib cimport malloc, free | |
cimport openmp | |
import time | |
print("Threads = ", openmp.omp_get_max_threads()) |
This file contains 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
# distutils: language = c++ | |
from cython.parallel import parallel, prange | |
from libcpp.vector cimport vector | |
from libc.stdlib cimport malloc, free | |
cdef struct Data: | |
int x | |
int y | |