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 json | |
from pprint import pprint as pp | |
import numpy as np | |
from numba import autojit, typeof, int32 | |
INF = float('inf') | |
@autojit | |
def jenks_matrics_init(data, n_classes, ): |
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
define %unknown* @test3(%unknown* %a, %unknown* %b, %unknown* %c) { | |
block0: | |
%0 = load %unknown** @numba.builtin.range | |
%1 = call %unknown* @numba.abstract.const.i32(i32 1) | |
%2 = call %unknown* @numba.abstract.pack.unknown_p.unknown_p(%unknown* %1, %unknown* %a) | |
%3 = call %unknown* @numba.abstract.call.unknown_p.unknown_p.unknown_p(%unknown* %0, %unknown* %2, %unknown* null) | |
%4 = call %unknown* @numba.abstract.get_iter.unknown_p(%unknown* %3) | |
br label %block16 |
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
#if __APPLE__ | |
#include "CUDA/cuda.h" | |
#else | |
#include "cuda.h" | |
#endif | |
const char ptx[] = "//\n// Generated by NVIDIA NVVM Compiler\n// Compiler built on Thu May 16 17:15:21 2013 (1368742521)\n// Cuda compilation tools, release 5.5, V5.5.0\n//\n\n.version 3.2\n.target sm_20\n.address_size 64\n\n\n.visible .entry sum(\n\t.param .u64 sum_param_0\n)\n{\n\t.reg .s32 \t%r<3>;\n\t.reg .s64 \t%rd<5>;\n\n\n\tld.param.u64 \t%rd1, [sum_param_0];\n\tcvta.to.global.u64 \t%rd2, %rd1;\n\tld.global.u64 \t%rd3, [%rd2];\n\tcvta.to.global.u64 \t%rd4, %rd3;\n\tld.global.u32 \t%r1, [%rd4];\n\tadd.s32 \t%r2, %r1, 1;\n\tst.global.u32 \t[%rd4], %r2;\n\tret;\n}\n\n\n\x00"; | |
int main(int argc, char **argv){ |
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 numbapro import async | |
# Create a plan for a asynchronous computation task | |
plan = async.Plan() | |
# Create the data sources as arrays |
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
@contextlib.contextmanager | |
def benchmark(ident): | |
ts = timer() | |
yield | |
te = timer() | |
print('%s %.3fms' % (ident, (te - ts)*1000)) | |
class FunctionWrapper(object): | |
""" | |
Result of @jit for functions. |
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
from __future__ import division | |
import time | |
import numpy as np | |
import bokeh.plotting as bkhplt | |
from bokeh.objects import Range1d | |
RADIUS = 1 | |
FRAMERATE = 1 / 24 |
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 -*- | |
""" | |
Test and wrapper script for simulator core functions. | |
To recompile the C++ library type ! ./make.sh from the ipython console and restart | |
the ipython kernel. | |
""" | |
import os | |
import sys | |
path = os.path.dirname(os.path.realpath(__file__)) | |
sys.path.append(path + '/..') |
This file has been truncated, but you can view the full file.
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
There was an error importing jinja2. | |
Please run `conda install jinja2` to enable jinja template support | |
BUILD START: numba-testing-np17py26_0 | |
Fetching package metadata: ... | |
Solving package specifications: . | |
C:\Users\win7x32\Miniconda\conda-bld\work>call "C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86 | |
Setting environment for using Microsoft Visual Studio 2008 x86 tools. | |
C:\Users\win7x32\Miniconda\conda-bld\work>set TMP=C:\Users\win7x32\AppData\Local\Temp |
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
BUILD START: numba-testing-np17py26_0 | |
Fetching package metadata: ... | |
Solving package specifications: . | |
C:\Users\win7x32\Miniconda\conda-bld\work>call "C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86 | |
Setting environment for using Microsoft Visual Studio 2008 x86 tools. | |
C:\Users\win7x32\Miniconda\conda-bld\work>set TMP=C:\Users\win7x32\AppData\Local\Temp | |
C:\Users\win7x32\Miniconda\conda-bld\work>set COMPUTERNAME=WIN7X32-PC |
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
BUILD START: numba-testing-np17py26_0 | |
Fetching package metadata: ... | |
Solving package specifications: . | |
The following packages will be downloaded: | |
package | build | |
---------------------------|----------------- | |
numpy-1.7.1 | py26_3 14.6 MB | |
The following packages will be linked: |
OlderNewer