Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 __future__ import division | |
import logging | |
import numpy as np | |
log = logging.getLogger(__name__) | |
class ReplicasPerBinDriver(object): | |
def __init__(self, sim_manager, plugin_config): | |
super(ReplicasPerBinDriver, self).__init__() |
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
rm -f west.h5 | |
BSTATES="--bstate initial,1.0" | |
#TSTATES="--tstate drift,10.01 --tstate bound,1.3" | |
#TSTATES="--tstate bound,1.2" | |
w_init $BSTATES $TSTATES "$@" |
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 distutils.core import setup | |
from distutils.extension import Extension | |
from Cython.Build import cythonize | |
import numpy as np | |
include_dir = np.get_include() | |
extensions = [ | |
Extension('testlib', ['testlib.pyx', ], include_dirs=[include_dir, ]) |
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 __future__ import print_function | |
import numba as nb | |
import random | |
import time | |
from concurrent.futures import ThreadPoolExecutor, as_completed | |
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
import numpy as np | |
from bokeh.layouts import column, row | |
from bokeh.models import CustomJS, ColumnDataSource, Slider | |
from bokeh.plotting import figure, output_file, show | |
from bokeh.core.property.containers import PropertyValueDict | |
output_file('test.html') |
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
''' | |
This script is based on the original work of Randal S. Olson (randalolson.com) for the Traveling Salesman Portrait project. | |
http://www.randalolson.com/2018/04/11/traveling-salesman-portrait-in-python/ | |
Please check out the original project repository for information: | |
https://github.com/rhiever/Data-Analysis-and-Machine-Learning-Projects | |
The script was updated by Joshua L. Adelman, adapting the work of Antonio S. Chinchón described in the following blog post: | |
https://fronkonstin.com/2018/04/17/pencil-scribbles/ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 tlib import * | |
from tlib cimport * | |
import numpy as np | |
cimport numpy as np | |
class A(object): | |
def main(self, np.int32_t ix): |
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
import numpy as np | |
import numba as nb | |
from numba import types | |
from numba.extending import overload_method | |
@overload_method(types.Array, 'take') | |
def array_take(arr, indices): | |
if isinstance(indices, types.Array): |
NewerOlder