text
stringlengths
0
1.05M
meta
dict
"""Builds a DRAGNN graph for local training.""" from abc import ABCMeta from abc import abstractmethod import tensorflow as tf from tensorflow.python.platform import tf_logging as logging from dragnn.python import dragnn_ops from dragnn.python import network_units from syntaxnet.util import check from syntaxnet.util...
{ "repo_name": "hang-qi/models", "path": "syntaxnet/dragnn/python/component.py", "copies": "2", "size": "23212", "license": "apache-2.0", "hash": 6119372489346881000, "line_mean": 38.4091680815, "line_max": 80, "alpha_frac": 0.6690504911, "autogenerated": false, "ratio": 4.165081643638974, "conf...
# builds a list of protein types in refseq organisms # each output line is refseq_organism_ID gene_function1 gene_function2 ... # # also builds a list of gene IDs to protein descriptions # each output line is gene_ID gene_description # # usage: # *.py GMG.fasta organism2gene_table.txt gene2description_table.txt # # h...
{ "repo_name": "knights-lab/NINJA-SHOGUN", "path": "shogun/scripts/old/scrape_organism2protein_map_from_GMG.py", "copies": "2", "size": "1906", "license": "mit", "hash": -3238302870817395700, "line_mean": 30.2459016393, "line_max": 172, "alpha_frac": 0.5991605456, "autogenerated": false, "ratio": ...
'''Builds a model, organizes and loads data, and runs model training.''' import argparse from collections import defaultdict import os import glob import random import keras import numpy as np from keras.layers import Input, Average from keras.layers.core import Dense, Flatten, Dropout from keras.layers.merge import ...
{ "repo_name": "yujanshrestha/pre-trained-keras-example", "path": "train.py", "copies": "1", "size": "8100", "license": "mit", "hash": 6233075144927382000, "line_mean": 44.5056179775, "line_max": 131, "alpha_frac": 0.6214814815, "autogenerated": false, "ratio": 3.957010258915486, "config_test": ...
"""Build sandboxes""" from __future__ import print_function import os.path import re import sys from collections import OrderedDict from glob import glob try: import simplejson as json except ImportError: import json DEFAULT_ORDER = ( 'type', 'ns', 'author', 'prefix', 'match', 'patte...
{ "repo_name": "marianocarrazana/anticontainer", "path": "build/build_sandboxes.py", "copies": "1", "size": "2653", "license": "mpl-2.0", "hash": -7183662565266471000, "line_mean": 25.2673267327, "line_max": 73, "alpha_frac": 0.5461741425, "autogenerated": false, "ratio": 3.726123595505618, "con...
"""Builds a pip package suitable for redistribution. Adapted from tensorflow/tools/pip_package/build_pip_package.sh. This might have to change if Bazel changes how it modifies paths. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse impor...
{ "repo_name": "hang-qi/models", "path": "syntaxnet/dragnn/tools/build_pip_package.py", "copies": "2", "size": "2371", "license": "apache-2.0", "hash": 5010136837265826000, "line_mean": 32.3943661972, "line_max": 80, "alpha_frac": 0.6916912695, "autogenerated": false, "ratio": 3.5178041543026706, ...
"""Builds a portfolio object containing asset allocation details.""" import time import decimal from stockretriever import get_current_info DEC = decimal.Decimal def init_portfolio(filename): """Returns a portfolio object containing positional, categorical, and portfolio totals. Usage: call init...
{ "repo_name": "gurch101/portfolio-manager", "path": "portfolio.py", "copies": "1", "size": "3332", "license": "mit", "hash": -6806379426760526000, "line_mean": 34.4468085106, "line_max": 75, "alpha_frac": 0.6053421369, "autogenerated": false, "ratio": 4.0535279805352795, "config_test": false, ...
'''Builds arch ''' import copy import logging import time from . import data, exp, optimizer from .parsing import parse_docstring, parse_inputs, parse_kwargs from .handlers import (aliased, prefixed, NetworkHandler, LossHandler, ResultsHandler) from .utils import bad_values, update_dict_of_lis...
{ "repo_name": "rdevon/cortex", "path": "cortex/_lib/models.py", "copies": "1", "size": "16743", "license": "bsd-3-clause", "hash": -3674438622647771600, "line_mean": 27.7680412371, "line_max": 80, "alpha_frac": 0.5052260646, "autogenerated": false, "ratio": 4.297484599589322, "config_test": fal...
"""Builds a simple NNVM graph for testing.""" from os import path as osp import nnvm from nnvm import sym from nnvm.compiler import graph_util from nnvm.testing import init import numpy as np import tvm CWD = osp.dirname(osp.abspath(osp.expanduser(__file__))) def _get_model(dshape): data = sym.Variable('data',...
{ "repo_name": "mlperf/training_results_v0.6", "path": "Fujitsu/benchmarks/resnet/implementations/mxnet/3rdparty/tvm/rust/tests/build_model.py", "copies": "1", "size": "1762", "license": "apache-2.0", "hash": -866007126072056700, "line_mean": 32.2452830189, "line_max": 74, "alpha_frac": 0.5976163451, ...
"""Builds a spritemap image from a set of sprites.""" from array import array from itertools import izip, chain, repeat from .image import Image class StitchedSpriteNodes(object): """An iterable that yields the image data rows of a tree of sprite nodes. Suitable for writing to an image. """ def __in...
{ "repo_name": "yostudios/Spritemapper", "path": "spritecss/stitch.py", "copies": "2", "size": "3522", "license": "mit", "hash": 4191786147034988000, "line_mean": 33.1941747573, "line_max": 81, "alpha_frac": 0.5905735378, "autogenerated": false, "ratio": 3.354285714285714, "config_test": false, ...
# # Copyright (c) 2013 - 2018 Software AG, Darmstadt, Germany and/or its licensors # Copyright (c) 2013 - 2019 Ben Spiller and Matthew Johnson # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the Lice...
{ "repo_name": "xpybuild/xpybuild", "path": "release-xpy.xpybuild.py", "copies": "1", "size": "2958", "license": "apache-2.0", "hash": -4769531556634403000, "line_mean": 33.3953488372, "line_max": 199, "alpha_frac": 0.7231237323, "autogenerated": false, "ratio": 3.372862029646522, "config_test":...
# build script for 'require.cython' # - a cython extension for 'require', a Validation library # ( script stolen from http://wiki.cython.org/PackageHierarchy ) import sys, os, stat, commands from distutils.core import setup from distutils.extension import Extension #from setuptools import setup, Extension include_di...
{ "repo_name": "doncatnip/require.cython", "path": "setup.py", "copies": "1", "size": "1970", "license": "unlicense", "hash": -7895806552033004000, "line_mean": 29.78125, "line_max": 91, "alpha_frac": 0.6558375635, "autogenerated": false, "ratio": 3.731060606060606, "config_test": false, "has_...
# build-script import pyjvm import pyjvm.build import pyjvm.build_java import pyjvm.build_py from pyjvm.build_java import JavacError import shutil import os import sys import yaml import subprocess from os.path import join pyjvm.assert_build_script(__name__) pyjvm.add_dir_to_path(__file__) target_name = 'android-15...
{ "repo_name": "zielmicha/pyjvm", "path": "android/src/build.py", "copies": "1", "size": "8948", "license": "mit", "hash": 7924830179405249000, "line_mean": 30.3964912281, "line_max": 160, "alpha_frac": 0.6099687081, "autogenerated": false, "ratio": 3.39453717754173, "config_test": true, "has_...
# Build script of unrealcv, supports win, linux and mac. # A single file library # Weichao Qiu @ 2017 import subprocess, sys, os, argparse, platform, logging, glob, shutil, json try: input = raw_input # to support python3 except NameError: pass def get_platform_name(): '''' Python and UE4 use different names f...
{ "repo_name": "unrealcv/unrealcv", "path": "client/python/unrealcv/automation.py", "copies": "1", "size": "10484", "license": "mit", "hash": -7133231393818282000, "line_mean": 35.5296167247, "line_max": 226, "alpha_frac": 0.6069248378, "autogenerated": false, "ratio": 3.8013052936910805, "confi...
# Build script of unrealcv, supports win, linux and mac. # Weichao Qiu @ 2017 # Use python build.py to build the plugin import argparse from unrealcv.automation import UE4Automation import os def main(): # Parse arguments parser = argparse.ArgumentParser() parser.add_argument( 'descriptor_file', ...
{ "repo_name": "unrealcv/unrealcv", "path": "build.py", "copies": "1", "size": "1970", "license": "mit", "hash": 8502698251459517000, "line_mean": 27.9705882353, "line_max": 98, "alpha_frac": 0.6294416244, "autogenerated": false, "ratio": 3.832684824902724, "config_test": false, "has_no_keywor...
"""Builds data packages with flash""" __author__ = 'edelman@room77.com (Nicholas Edelman)' __copyright__ = 'Copyright 2013 Room77, Inc.' import re from pylib.base.flags import Flags from pylib.base.term_color import TermColor from pylib.file.file_utils import FileUtils from pylib.flash.make_rules import MakeRules F...
{ "repo_name": "room77/py77", "path": "pylib/flash/pkg_rules.py", "copies": "1", "size": "3191", "license": "mit", "hash": -130679831186046580, "line_mean": 42.1216216216, "line_max": 86, "alpha_frac": 0.620808524, "autogenerated": false, "ratio": 3.6426940639269407, "config_test": false, "has...
"""Builds elevation graph between one or more points. Module searches route between two coordinate points, draws a elevation graph and constructs a summary. Route and elevation are fetched using Google Maps APIs. Graph is created from fetched elevation points and drawn with Matplotlib. Usage: Find elevation from He...
{ "repo_name": "anttilip/telepybot", "path": "telepybot/modules/elevation.py", "copies": "1", "size": "8954", "license": "mit", "hash": 8115131771954967000, "line_mean": 31.56, "line_max": 82, "alpha_frac": 0.6219566674, "autogenerated": false, "ratio": 3.816709292412617, "config_test": true, ...
"""build setup for corda """ from setuptools import setup, find_packages from codecs import open from os import path import versioneer here = path.abspath(path.dirname(__file__)) # Get the long description from the README file with open(path.join(here, 'README.rst'), encoding='utf-8') as f: long_description = f....
{ "repo_name": "resendislab/corda", "path": "setup.py", "copies": "2", "size": "2575", "license": "mit", "hash": -6234275930503238000, "line_mean": 33.7972972973, "line_max": 79, "alpha_frac": 0.652815534, "autogenerated": false, "ratio": 3.9493865030674846, "config_test": false, "has_no_keywo...
# Builds homology models import os, inspect dirs = {} dirs['script'] = os.path.dirname(os.path.abspath(\ inspect.getfile(inspect.currentframe()))) execfile(os.path.join(dirs['script'],'_external_paths.py')) command_paths = findPaths(['qsub_command']) # Parse arguments import argparse parser = argparse.ArgumentParse...
{ "repo_name": "CCBatIIT/AlGDock", "path": "Pipeline/run_homology_model.py", "copies": "1", "size": "2460", "license": "mit", "hash": 8904852072360567000, "line_mean": 32.2432432432, "line_max": 68, "alpha_frac": 0.6764227642, "autogenerated": false, "ratio": 3.241106719367589, "config_test": fa...
"""Builds objects representing a produced factorio item for templating.""" from __future__ import division import math from factorio import recipe from factorio import production from factorio import names from appengine import icons def get_wiki_url(username): """Constructs a URL refering to the factorio wik...
{ "repo_name": "brianquinlan/factorio-tools", "path": "appengine/produced_item.py", "copies": "1", "size": "7445", "license": "mit", "hash": -2211776471871175400, "line_mean": 30.1506276151, "line_max": 80, "alpha_frac": 0.6288784419, "autogenerated": false, "ratio": 4.264032073310424, "config_t...
# Builds one homology model # Parse arguments # import argparse # parser = argparse.ArgumentParser() # parser.add_argument('sequence_ali', default=None, help='Location of seq.ali') # parser.add_argument('template_pdb', default=None, help='Template') # parser.add_argument('--pylab', action='store_true') # args = ...
{ "repo_name": "gkumar7/AlGDock", "path": "Pipeline/homology_model.modeller.py", "copies": "3", "size": "4054", "license": "mit", "hash": 1543134286682547500, "line_mean": 32.5123966942, "line_max": 82, "alpha_frac": 0.6642821904, "autogenerated": false, "ratio": 3.1184615384615384, "config_test...
"""Builds on top of nodes.py to track brackets.""" from dataclasses import dataclass, field import sys from typing import Dict, Iterable, List, Optional, Tuple, Union if sys.version_info < (3, 8): from typing_extensions import Final else: from typing import Final from blib2to3.pytree import Leaf, Node from b...
{ "repo_name": "psf/black", "path": "src/black/brackets.py", "copies": "1", "size": "10760", "license": "mit", "hash": 1549267766199463200, "line_mean": 31.2155688623, "line_max": 87, "alpha_frac": 0.6152416357, "autogenerated": false, "ratio": 3.938506588579795, "config_test": false, "has_no_...
"""Builds packaged application. Usage: # For distribution. python setup.py py2app # For development (aliases). python setup.py py2app -A """ from distutils import core import py2app import setuptools import sys import os sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'pygrow')) from grow.common i...
{ "repo_name": "jeremydw/macgrow", "path": "setup.py", "copies": "1", "size": "1429", "license": "mit", "hash": 1008890121736608000, "line_mean": 19.1267605634, "line_max": 74, "alpha_frac": 0.6039188244, "autogenerated": false, "ratio": 3.292626728110599, "config_test": false, "has_no_keyword...
"""Builds Swagger data model definitions using PAPI source docs.""" from __future__ import print_function import argparse import json import modulefinder import os import re import sys def find_matching_obj_def(obj_defs, new_obj_def): """Find matching object definition.""" for obj_name in obj_defs: e...
{ "repo_name": "Isilon/isilon_sdk", "path": "components/papi_swagger_obj_defs_builder.py", "copies": "1", "size": "15948", "license": "mit", "hash": -1625208605476117000, "line_mean": 37.062052506, "line_max": 79, "alpha_frac": 0.540381239, "autogenerated": false, "ratio": 3.919390513639715, "co...
"""build-stack-docs command-line application. """ __all__ = ("run_build_cli",) import argparse import logging import os import sys from pkg_resources import DistributionNotFound, get_distribution from ..stackdocs.build import build_stack_docs try: __version__ = get_distribution("documenteer").version except Di...
{ "repo_name": "lsst-sqre/sphinxkit", "path": "documenteer/bin/buildstackdocs.py", "copies": "2", "size": "1967", "license": "mit", "hash": 7213622407428009000, "line_mean": 24.2179487179, "line_max": 78, "alpha_frac": 0.6120996441, "autogenerated": false, "ratio": 3.8796844181459567, "config_te...
"""Build standard, boring user interfaces in processing.py. An Interface object can hold multiple Controls that represent standard UI elements, like buttons, dropdown menus, etc. To create an interface: import spatialpixel.ui as ui def setup(): global gui gui = ui.Interface(this) def dr...
{ "repo_name": "awmartin/spatialpixel", "path": "ui/interface.py", "copies": "2", "size": "1721", "license": "mit", "hash": 3450545969395319000, "line_mean": 25.4769230769, "line_max": 89, "alpha_frac": 0.6321905869, "autogenerated": false, "ratio": 4.107398568019093, "config_test": false, "ha...
"""Builds templates/agreements based on input data (in json format), submitting to sla manager. It is intended as backend service for a rest interface. The json input must work together with the templates to form a valid template or agreement for Xifi (be careful!) This (very simple) service is coupled to t...
{ "repo_name": "Fiware/ops.Sla-dashboard", "path": "slaclient/service/xifi/xifiservice.py", "copies": "2", "size": "2979", "license": "apache-2.0", "hash": 1880217281791343900, "line_mean": 24.8378378378, "line_max": 79, "alpha_frac": 0.696878147, "autogenerated": false, "ratio": 3.12591815320042,...
"""Builds the Adience network. Summary of available functions: # Compute input images and labels for training. If you would like to run # evaluations, use input() instead. inputs, labels = distorted_inputs() # Compute inference on the model inputs to make a prediction. predictions = inference(inputs) # Comput...
{ "repo_name": "NumesSanguis/MLTensor", "path": "adience/adience.py", "copies": "1", "size": "18728", "license": "apache-2.0", "hash": 4289414121911946000, "line_mean": 38.0981210856, "line_max": 107, "alpha_frac": 0.6212622811, "autogenerated": false, "ratio": 3.8111518111518112, "config_test":...
"""Builds the application binaries.""" ##==============================================================# ## SECTION: Imports # ##==============================================================# import os import os.path as op import auxly.filesys as fs import auxly.shell as ...
{ "repo_name": "jeffrimko/QuickWin", "path": "app/_Build.py", "copies": "1", "size": "2747", "license": "mit", "hash": 6913422642520431000, "line_mean": 28.5376344086, "line_max": 72, "alpha_frac": 0.4521295959, "autogenerated": false, "ratio": 4.149546827794562, "config_test": false, "has_no_...
"""Builds the C3D network. Implements the inference pattern for model building. model(): Builds the model as far as is required for running the network forward to make predictions. """ import re import numpy as np import tensorflow as tf def accuracy(logit, labels): correct_pred = tf.equal(tf.argmax(logit, 1), ...
{ "repo_name": "frankgu/tensorflow_video_classification_LSTM", "path": "source_dir/c3d_model.py", "copies": "1", "size": "8620", "license": "mit", "hash": -1150046351308033800, "line_mean": 36.9735682819, "line_max": 119, "alpha_frac": 0.6216937355, "autogenerated": false, "ratio": 3.4674175382139...
"""Builds the CIFAR-10 network. Summary of available functions: # Compute input images and labels for training. If you would like to run # evaluations, use input() instead. inputs, labels = distorted_inputs() # Compute inference on the model inputs to make a prediction. predictions = inference(inputs) # Compu...
{ "repo_name": "rickyHong/Tensorflow_modi", "path": "tensorflow/models/image/cifar10/cifar10.py", "copies": "5", "size": "17758", "license": "apache-2.0", "hash": -5243008305147953000, "line_mean": 35.9189189189, "line_max": 80, "alpha_frac": 0.6670796261, "autogenerated": false, "ratio": 3.573038...
"""Builds the convolutional neural network model. Matthew Alger The Australian National University 2016 """ import argparse def main(n_filters, conv_size, pool_size, dropout, patch_size, n_astro=7, out_path=None): # Imports must be in the function, or whenever we import this module, Keras # will du...
{ "repo_name": "chengsoonong/crowdastro", "path": "crowdastro/compile_cnn.py", "copies": "1", "size": "3390", "license": "mit", "hash": 3277154968723846000, "line_mean": 37.0898876404, "line_max": 79, "alpha_frac": 0.5725663717, "autogenerated": false, "ratio": 3.946449359720605, "config_test": ...
"""Builds the download page based on the released files. This is just a little helper to execute after building all the release files. It will generate the contents of a wiki page that I can upload to wildbear to finish off a release. """ import hashlib import sys RELEASE_LISTING = [ 'fct.h', 'fctx-doc-%(ver...
{ "repo_name": "imb/fctx", "path": "wikify.py", "copies": "1", "size": "1699", "license": "bsd-3-clause", "hash": 3645844882083856000, "line_mean": 26.4032258065, "line_max": 177, "alpha_frac": 0.5991759859, "autogenerated": false, "ratio": 3.1117216117216118, "config_test": false, "has_no_key...
"""Builds the eye network. Summary of available functions: # Compute input images and labels for training. If you would like to run # evaluations, use inputs() instead. inputs, labels = distorted_inputs() # Compute inference on the model inputs to make a prediction. predictions = inference(inputs) # Compute t...
{ "repo_name": "callofdutyops/YXH2016724098982", "path": "eye_model_predict.py", "copies": "1", "size": "14773", "license": "mit", "hash": -8834148983620873000, "line_mean": 36.9768637532, "line_max": 99, "alpha_frac": 0.6082718473, "autogenerated": false, "ratio": 3.7230342741935485, "config_te...
'''Builds the lib and examples packages. Then, syncs to Dropbox ''' import os import subprocess import shutil from paths import PROJECT_DIR SYNC_JARS = True HOME_DIR = os.getenv("HOME") OUTPUT_DIR = os.path.join(HOME_DIR, 'Dropbox/Public/') LIB_JAR_PATH = os.path.join(HOME_DIR, '.ivy2/l...
{ "repo_name": "dalab/dissolve-struct", "path": "helpers/buildall.py", "copies": "1", "size": "1696", "license": "apache-2.0", "hash": 7457016097244273000, "line_mean": 31.0188679245, "line_max": 118, "alpha_frac": 0.6574292453, "autogenerated": false, "ratio": 2.9964664310954063, "config_test":...
"""Builds the MNIST network. Built to duplicate Hinton 2012 and Srivastava 2014 method of dropout feed forward network with max norm regularisaton. A few learnings: * dropout not applied to softmax layer (input and hidden layers only ) * max norm not applied to softmax layer - though it could be applied at a dif...
{ "repo_name": "mikowals/mnist", "path": "mnist.py", "copies": "1", "size": "9825", "license": "mit", "hash": 7270090399144656000, "line_mean": 40.4556962025, "line_max": 174, "alpha_frac": 0.6740966921, "autogenerated": false, "ratio": 3.3996539792387543, "config_test": false, "has_no_keyword...
"""Builds the MNIST network. Implements the inference/loss/training pattern for model building. 1. inference() - Builds the model as far as is required for running the network forward to make predictions. 2. loss() - Adds to the inference model the layers required to generate loss. 3. training() - Adds to the loss mode...
{ "repo_name": "dnlcrl/TensorFlow-Playground", "path": "1.tutorials/3.TensorFlow Mechanics 101/mnist.py", "copies": "1", "size": "5611", "license": "mit", "hash": -4377784828179855400, "line_mean": 41.5075757576, "line_max": 79, "alpha_frac": 0.6489039387, "autogenerated": false, "ratio": 3.956981...
"""Builds the MNIST network. Implements the inference/loss/training pattern for model building. 1. inference() - Builds the model as far as is required for running the network forward to make predictions. 2. loss() - Adds to the inference model the layers required to generate loss. 3. training() - Adds to the loss mo...
{ "repo_name": "MemeticParadigm/TensorFlow", "path": "tensorflow/g3doc/tutorials/mnist/mnist.py", "copies": "2", "size": "5438", "license": "apache-2.0", "hash": -6110393723923970000, "line_mean": 34.7763157895, "line_max": 79, "alpha_frac": 0.6754321442, "autogenerated": false, "ratio": 3.7842727...
"""Builds the MNIST network. Simplify the MNIST model building work. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import math import tensorflow as tf # The MNIST dataset has 10 classes, representing the digits 0 through 9. NUM_CLASSES = 10 # The ...
{ "repo_name": "mengli/PcmAudioRecorder", "path": "mnist/mnist_with_summary.py", "copies": "2", "size": "3224", "license": "apache-2.0", "hash": -6829788456317698000, "line_mean": 35.6363636364, "line_max": 82, "alpha_frac": 0.6947890819, "autogenerated": false, "ratio": 3.418875927889714, "conf...
#builds the model from existing data import inspect,os import markovify from textstat.textstat import textstat #Read files from directory #Add their contents to a single string #Make a model from this string #generate first sentence from this model class train(): dir=os.path.dirname(os.path.dirname(os.path.abspa...
{ "repo_name": "hailthedawn/HaikuGen", "path": "haikubot/train.py", "copies": "1", "size": "1282", "license": "mit", "hash": 6718578018938595000, "line_mean": 24.66, "line_max": 146, "alpha_frac": 0.616224649, "autogenerated": false, "ratio": 3.3385416666666665, "config_test": false, "has_no_k...
"""Builds the network. Summary of available functions: # Compute input images and labels for training. If you would like to run # evaluations, use inputs() instead. inputs, labels = distorted_inputs() # Compute inference on the model inputs to make a prediction. predictions = inference(inputs) # Compute the tota...
{ "repo_name": "sridhar912/Udacity_SDC_Challenge", "path": "code/predict_steering.py", "copies": "1", "size": "22483", "license": "mit", "hash": 6951375620969463000, "line_mean": 40.947761194, "line_max": 106, "alpha_frac": 0.5860427879, "autogenerated": false, "ratio": 3.494404724898974, "confi...
"""Builds the ocr network. Summary of available functions: # Compute input images and labels for training. If you would like to run # evaluations, use inputs() instead. inputs, labels = distorted_inputs() # Compute inference on the model inputs to make a prediction. predictions = inference(inputs) # Compute t...
{ "repo_name": "Luonic/tf-cnn-lstm-ocr-captcha", "path": "ocr.py", "copies": "1", "size": "22365", "license": "mit", "hash": -1114303585883825900, "line_mean": 37.495697074, "line_max": 103, "alpha_frac": 0.6292421194, "autogenerated": false, "ratio": 3.6591950261780104, "config_test": false, ...
"""Builds the Python Package """ from __future__ import ( print_function, unicode_literals, division, absolute_import) import os import shutil from subprocess import run, CalledProcessError def copy_metadata(): """ Copies metadata files from toolboxes folder to help folder When geoprocessing toolbox...
{ "repo_name": "WSDOT-GIS/wsdot-route-gp", "path": "build_package.py", "copies": "1", "size": "1819", "license": "unlicense", "hash": 324211018822026300, "line_mean": 32.0727272727, "line_max": 123, "alpha_frac": 0.691588785, "autogenerated": false, "ratio": 3.829473684210526, "config_test": fal...
"""Builds the Unlimited Hand - sensor values network. (made from MNIST) Implements the inference/loss/training pattern for model building. 1. inference() - Builds the model as far as is required for running the network forward to make predictions. 2. loss() - Adds to the inference model the layers required to generat...
{ "repo_name": "eq-inc/eq-tensorflow-learn_uh_sensor_values", "path": "uh_sensor_values.py", "copies": "1", "size": "4846", "license": "apache-2.0", "hash": 2338439048135673000, "line_mean": 37.768, "line_max": 107, "alpha_frac": 0.6564176641, "autogenerated": false, "ratio": 3.9526916802610113, ...
"""Builds the VGG16 network. Implements the inference/loss/training pattern for model building. 1. inference() - Builds the model as far as is required for running the network forward to make predictions. 2. loss() - Adds to the inference model the layers required to generate loss. 3. training() - Adds to the loss mo...
{ "repo_name": "HaydenFaulkner/phd", "path": "tensorflow_code/model_defs/cnns/vgg16.py", "copies": "1", "size": "11503", "license": "mit", "hash": -2177490810821993700, "line_mean": 40.3776978417, "line_max": 117, "alpha_frac": 0.6334869165, "autogenerated": false, "ratio": 3.3255276091355883, "...
""" Builds up a release package ready to be built or distributed by NPM. The distributable content is taken from the development folder to make it easier to strip out unneeded package content. """ #!/usr/bin/python # Imports import os import shutil import fnmatch import distutils.dir_util import cli # # Finds all fi...
{ "repo_name": "leewinder/ng2-google-recaptcha", "path": "automation/prepare_distribution_package.py", "copies": "1", "size": "2678", "license": "mit", "hash": -2391677465756806700, "line_mean": 26.6082474227, "line_max": 99, "alpha_frac": 0.6631814787, "autogenerated": false, "ratio": 3.793201133...
""" Build swig and f2py sources. """ from __future__ import division, absolute_import, print_function import copy import os import re import shlex import sys from distutils.command import build_ext from distutils.dep_util import newer_group, newer from distutils.errors import DistutilsError, DistutilsSetupError from d...
{ "repo_name": "DailyActie/Surrogate-Model", "path": "01-codes/numpy-master/numpy/distutils/command/build_src.py", "copies": "1", "size": "31019", "license": "mit", "hash": -4454575390726785500, "line_mean": 38.7679487179, "line_max": 109, "alpha_frac": 0.5049808182, "autogenerated": false, "ratio...
""" Build swig and f2py sources. """ from __future__ import division, absolute_import, print_function import os import re import sys import shlex import copy from distutils.command import build_ext from distutils.dep_util import newer_group, newer from distutils.util import get_platform from distutils.errors import D...
{ "repo_name": "lancezlin/ml_template_py", "path": "lib/python2.7/site-packages/numpy/distutils/command/build_src.py", "copies": "24", "size": "30917", "license": "mit", "hash": -6741487784436391000, "line_mean": 38.8929032258, "line_max": 122, "alpha_frac": 0.5070349646, "autogenerated": false, "...
""" Build swig and f2py sources. """ import os import re import sys import shlex import copy from distutils.command import build_ext from distutils.dep_util import newer_group, newer from distutils.util import get_platform from distutils.errors import DistutilsError, DistutilsSetupError # this import can't be done h...
{ "repo_name": "simongibbons/numpy", "path": "numpy/distutils/command/build_src.py", "copies": "8", "size": "31180", "license": "bsd-3-clause", "hash": 6605238329278689000, "line_mean": 39.3363518758, "line_max": 122, "alpha_frac": 0.5074727389, "autogenerated": false, "ratio": 4.067840834964123, ...
""" Build swig, f2py, pyrex sources. """ from __future__ import division, absolute_import, print_function import os import re import sys import shlex import copy from distutils.command import build_ext from distutils.dep_util import newer_group, newer from distutils.util import get_platform from distutils.errors impo...
{ "repo_name": "WillieMaddox/numpy", "path": "numpy/distutils/command/build_src.py", "copies": "141", "size": "32258", "license": "bsd-3-clause", "hash": 3010673648088964000, "line_mean": 39.0223325062, "line_max": 122, "alpha_frac": 0.5061070122, "autogenerated": false, "ratio": 4.070410094637224...
""" Build swig, f2py, pyrex sources. """ import os import re import sys import shlex import copy from distutils.command import build_ext from distutils.dep_util import newer_group, newer from distutils.util import get_platform from distutils.errors import DistutilsError, DistutilsSetupError def have_pyrex(): try...
{ "repo_name": "qsnake/numpy", "path": "numpy/distutils/command/build_src.py", "copies": "87", "size": "32440", "license": "bsd-3-clause", "hash": -6927743717376959000, "line_mean": 39.049382716, "line_max": 122, "alpha_frac": 0.5061960543, "autogenerated": false, "ratio": 4.075376884422111, "co...
""" Build swig, f2py, pyrex sources. """ import os import re import sys import shlex from distutils.command import build_ext from distutils.dep_util import newer_group, newer from distutils.util import get_platform from distutils.errors import DistutilsError, DistutilsSetupError try: import Pyrex.Compiler.Main ...
{ "repo_name": "houseind/robothon", "path": "GlyphProofer/dist/GlyphProofer.app/Contents/Resources/lib/python2.6/numpy/distutils/command/build_src.py", "copies": "1", "size": "28704", "license": "mit", "hash": 6403029177121419000, "line_mean": 39.0893854749, "line_max": 122, "alpha_frac": 0.5029960981...
""" Build swig, f2py, pyrex sources. """ import os import re import sys from distutils.command import build_ext from distutils.dep_util import newer_group, newer from distutils.util import get_platform from distutils.errors import DistutilsError, DistutilsSetupError try: import Pyrex.Compiler.Main have_pyrex...
{ "repo_name": "santisiri/popego", "path": "envs/ALPHA-POPEGO/lib/python2.5/site-packages/numpy-1.0.4-py2.5-linux-x86_64.egg/numpy/distutils/command/build_src.py", "copies": "1", "size": "28765", "license": "bsd-3-clause", "hash": -2258175597111122000, "line_mean": 39.1745810056, "line_max": 122, "alp...
"""Build taggers and tag text""" __author__ = 'Kyle P. Johnson <kyle@kyle-p-johnson.com>' __license__ = 'MIT License. See LICENSE.' import logging import os from pprint import pprint import re import site class MakePOSTagger(object): """rework Perseus latin-analyses.txt into Python dictionary""" def __init...
{ "repo_name": "cltk/latin_pos_lemmata_cltk", "path": "pos_latin.py", "copies": "1", "size": "24334", "license": "mit", "hash": -1303732333404194000, "line_mean": 55.1986143187, "line_max": 87, "alpha_frac": 0.3128955371, "autogenerated": false, "ratio": 5.246658042259595, "config_test": false, ...
# BuildTarget: images/blank.png # BuildTarget: images/parameters.png # BuildTarget: images/shaderBallColoredStripes.png # BuildTarget: images/shaderBallStripes.png import time import imath import Gaffer import GafferOSL import GafferUI scriptWindow = GafferUI.ScriptWindow.acquire( script ) script["OSLCode"] = Gaf...
{ "repo_name": "hradec/gaffer", "path": "doc/source/WorkingWithTheNodeGraph/TutorialUsingTheOSLCodeNode/screengrab.py", "copies": "4", "size": "2079", "license": "bsd-3-clause", "hash": -6429782668177917000, "line_mean": 45.2, "line_max": 169, "alpha_frac": 0.7176527177, "autogenerated": false, "r...
# BuildTarget: images/blank.png import time import imath import Gaffer import GafferOSL import GafferUI scriptWindow = GafferUI.ScriptWindow.acquire( script ) script["OSLCode"] = GafferOSL.OSLCode() script.selection().add( script["OSLCode"] ) oslEditor = GafferUI.NodeEditor.acquire( script["OSLCode"], floating=Tr...
{ "repo_name": "appleseedhq/gaffer", "path": "doc/source/WorkingWithTheNodeGraph/TutorialUsingTheOSLCodeNode/screengrab.py", "copies": "6", "size": "1947", "license": "bsd-3-clause", "hash": -6904201482599586000, "line_mean": 45.3571428571, "line_max": 169, "alpha_frac": 0.7092963534, "autogenerated...
# BuildTarget: images/conceptPerformanceBestPracticesContextsGraphEditor.png # BuildTarget: images/conceptPerformanceBestPracticesContextsImprovedStats.png # BuildTarget: images/conceptPerformanceBestPracticesContextsStats.png # BuildTarget: images/conceptPerformanceBestPracticesContextsViewer.png # BuildTarget: images...
{ "repo_name": "hradec/gaffer", "path": "doc/source/WorkingWithTheNodeGraph/PerformanceBestPractices/screengrab.py", "copies": "4", "size": "5294", "license": "bsd-3-clause", "hash": 4165350455686202400, "line_mean": 42.7603305785, "line_max": 175, "alpha_frac": 0.7661503589, "autogenerated": false,...
# BuildTarget: images/exampleAnamorphicCameraSetup.png # BuildTarget: images/exampleSphericalCameraSetupArnoldTweaks.png # BuildTarget: images/interfaceCameraVisualizer.png # BuildTarget: images/renderDepthOfFieldBlur.png # BuildTarget: images/taskCameraApertureFocalLengthPlugs.png # BuildTarget: images/taskCameraCusto...
{ "repo_name": "hradec/gaffer", "path": "doc/source/WorkingWithScenes/Camera/screengrab.py", "copies": "4", "size": "15251", "license": "bsd-3-clause", "hash": 6826189736502910000, "line_mean": 53.6630824373, "line_max": 194, "alpha_frac": 0.7362140188, "autogenerated": false, "ratio": 3.332095258...
# BuildTarget: images/exampleMacbethChart.png import os import tempfile import subprocess32 as subprocess import imath import IECore import Gaffer import GafferUI # Create a random directory in `/tmp` for the dispatcher's `jobsDirectory`, so we don't clutter the user's `~gaffer` directory __temporaryDirectory = temp...
{ "repo_name": "appleseedhq/gaffer", "path": "doc/source/WorkingWithThePythonScriptingAPI/TutorialStartupConfig3/screengrab.py", "copies": "3", "size": "1528", "license": "bsd-3-clause", "hash": -5004691224341638000, "line_mean": 34.5348837209, "line_max": 140, "alpha_frac": 0.7342931937, "autogener...
# BuildTarget: images/exampleMultiShotRenderSpreadsheet.png # BuildTarget: images/examplePerLocationLightTweakSpreadsheet.png # BuildTarget: images/examplePerLocationTransformSpreadsheet.png # BuildTarget: images/interfaceSpreadsheetNode.png # BuildTarget: images/interfaceSpreadsheetNodeAuxiliaryConnections.png # Build...
{ "repo_name": "hradec/gaffer", "path": "doc/source/WorkingWithTheNodeGraph/SpreadsheetNode/screengrab.py", "copies": "4", "size": "30022", "license": "bsd-3-clause", "hash": -655466601704415000, "line_mean": 44.3504531722, "line_max": 277, "alpha_frac": 0.7578775565, "autogenerated": false, "rati...
# BuildTarget: images/graphEditorAllNodes.png # BuildTarget: images/graphEditorGroupConnections.png # BuildTarget: images/graphEditorRearrangedNodes.png # BuildTarget: images/graphEditorShaderAssignmentConnections.png # BuildTarget: images/mainWindowFinalScene.png # BuildTarget: images/mainWindowSphereNode.png # BuildT...
{ "repo_name": "hradec/gaffer", "path": "doc/source/WorkingWithThePythonScriptingAPI/TutorialNodeGraphEditingInPython/screengrab.py", "copies": "4", "size": "6266", "license": "bsd-3-clause", "hash": -8978495803349897000, "line_mean": 45.0735294118, "line_max": 172, "alpha_frac": 0.7701883179, "auto...
# BuildTarget: images/graphEditorGroupFirst.png images/graphEditorGroupSecond.png images/conceptPerformanceBestPracticesContextsViewer.png images/conceptPerformanceBestPracticesContextsGraphEditor.png images/conceptPerformanceBestPracticesContextsStats.png images/conceptPerformanceBestPracticesContextsImprovedStats.png...
{ "repo_name": "lucienfostier/gaffer", "path": "doc/source/WorkingWithTheNodeGraph/PerformanceBestPractices/screengrab.py", "copies": "2", "size": "5311", "license": "bsd-3-clause", "hash": -6117138415407566000, "line_mean": 44.0169491525, "line_max": 320, "alpha_frac": 0.7661457353, "autogenerated"...
# BuildTarget: images/hierarchyView.png # BuildTarget: images/sceneInspector.png # BuildTarget: images/sceneInspectorAttributesSection.png # BuildTarget: images/sceneInspectorBoundSection.png # BuildTarget: images/sceneInspectorObjectSection.png # BuildTarget: images/sceneInspectorTransformSection.png import IECore im...
{ "repo_name": "hradec/gaffer", "path": "doc/source/WorkingWithScenes/AnatomyOfAScene/screengrab.py", "copies": "4", "size": "3630", "license": "bsd-3-clause", "hash": 4625653591915193000, "line_mean": 42.734939759, "line_max": 117, "alpha_frac": 0.764738292, "autogenerated": false, "ratio": 3.483...
# BuildTarget: images/illustrationStartupConfigDirectoryTree.png # BuildTarget: images/tutorialSettingsWindowCustomContextVariable.png # BuildTarget: images/tutorialSettingsWindowDefaultContextVariables.png # BuildTarget: images/tutorialVariableSubstitutionExpression.png # BuildTarget: images/tutorialVariableSubstituti...
{ "repo_name": "hradec/gaffer", "path": "doc/source/WorkingWithThePythonScriptingAPI/TutorialStartupConfig1/screengrab.py", "copies": "4", "size": "4670", "license": "bsd-3-clause", "hash": -5152656293151585000, "line_mean": 43.9038461538, "line_max": 140, "alpha_frac": 0.7655246253, "autogenerated"...
# BuildTarget: images/interfaceCameraParameters.png # BuildTarget: images/interfaceCameraSets.png import IECore import time import imath import Gaffer import GafferUI import GafferScene import GafferSceneUI import GafferOSL import GafferAppleseed # Interface: the object and set sections of a camera in the Scene Ins...
{ "repo_name": "hradec/gaffer", "path": "doc/source/WorkingWithScenes/AnatomyOfACamera/screengrab.py", "copies": "4", "size": "2326", "license": "bsd-3-clause", "hash": 912905782515140200, "line_mean": 40.5357142857, "line_max": 137, "alpha_frac": 0.7489251935, "autogenerated": false, "ratio": 3.8...
# BuildTarget: images/interfaceCameraParameters.png import IECore import time import imath import Gaffer import GafferUI import GafferScene import GafferSceneUI import GafferOSL import GafferAppleseed # Interface: the object and set sections of a camera in the Scene Inspector script["Camera"] = GafferScene.Camera()...
{ "repo_name": "lucienfostier/gaffer", "path": "doc/source/WorkingWithScenes/AnatomyOfACamera/screengrab.py", "copies": "4", "size": "2280", "license": "bsd-3-clause", "hash": -4457397723045275000, "line_mean": 40.4545454545, "line_max": 137, "alpha_frac": 0.7469298246, "autogenerated": false, "ra...
# BuildTarget: images/interfaceCameraVisualizer.png import os import subprocess32 as subprocess import tempfile import time import imath import IECore import Gaffer import GafferScene import GafferUI import GafferSceneUI scriptWindow = GafferUI.ScriptWindow.acquire( script ) viewer = scriptWindow.getLayout().editors...
{ "repo_name": "appleseedhq/gaffer", "path": "doc/source/WorkingWithScenes/Camera/screengrab.py", "copies": "3", "size": "14762", "license": "bsd-3-clause", "hash": 6743312741693265000, "line_mean": 53.2720588235, "line_max": 194, "alpha_frac": 0.7310662512, "autogenerated": false, "ratio": 3.3375...
# BuildTarget: images/interfaceDefaultLightPlug.png # BuildTarget: images/interfaceLightLinkSetupGraphEditor.png # BuildTarget: images/interfaceLightSetGraphEditor.png # BuildTarget: images/interfaceLightSetNodeEditor.png # BuildTarget: images/interfaceLinkedLightsAttribute.png # BuildTarget: images/interfaceLinkedLigh...
{ "repo_name": "hradec/gaffer", "path": "doc/source/WorkingWithScenes/LightLinking/screengrab.py", "copies": "4", "size": "6123", "license": "bsd-3-clause", "hash": 3266396225535910000, "line_mean": 45.7404580153, "line_max": 117, "alpha_frac": 0.7759268333, "autogenerated": false, "ratio": 3.7244...
# BuildTarget: images/interfaceDefaultLightPlug.png # BuildTarget: images/interfaceLinkedLightsAttribute.png # BuildTarget: images/interfaceLightLinkSetupGraphEditor.png # BuildTarget: images/interfaceLinkedLightsPlug.png # BuildTarget: images/taskLightLinkingSetExpressionLocation.png # BuildTarget: images/interfaceLig...
{ "repo_name": "appleseedhq/gaffer", "path": "doc/source/WorkingWithScenes/LightLinking/screengrab.py", "copies": "4", "size": "6066", "license": "bsd-3-clause", "hash": -8720241115458316000, "line_mean": 45.6615384615, "line_max": 117, "alpha_frac": 0.774975272, "autogenerated": false, "ratio": 3...
# BuildTarget: images/interfaceUIEditor.png import os import Gaffer import GafferScene import GafferUI scriptWindow = GafferUI.ScriptWindow.acquire( script ) graphEditor = scriptWindow.getLayout().editors( GafferUI.GraphEditor )[0] # Illustration of the basics of a Box # script["fileName"].setValue( os.path.abspat...
{ "repo_name": "boberfly/gaffer", "path": "doc/source/WorkingWithTheNodeGraph/BoxNode/screengrab.py", "copies": "4", "size": "5310", "license": "bsd-3-clause", "hash": -5940319457675287000, "line_mean": 45.5789473684, "line_max": 97, "alpha_frac": 0.770433145, "autogenerated": false, "ratio": 3.39...
# BuildTarget: images/mainDefaultLayout.png # BuildTarget: images/mainSceneReaderNode.png # BuildTarget: images/sceneReaderBound.png # BuildTarget: images/viewerSceneReaderBounding.png # BuildTarget: images/hierarchyViewExpandedTwoLevels.png # BuildTarget: images/mainHeadAndLeftLegExpanded.png # BuildTarget: images/vie...
{ "repo_name": "hradec/gaffer", "path": "doc/source/GettingStarted/TutorialAssemblingTheGafferBot/screengrab.py", "copies": "4", "size": "11759", "license": "bsd-3-clause", "hash": -145281597199879070, "line_mean": 47.9958333333, "line_max": 178, "alpha_frac": 0.775065907, "autogenerated": false, ...
# BuildTarget: images/mainDefaultLayout.png import os import time import imath import IECore import Gaffer import GafferScene import GafferUI import GafferSceneUI scriptWindow = GafferUI.ScriptWindow.acquire( script ) viewer = scriptWindow.getLayout().editors( GafferUI.Viewer )[0] graphEditor = scriptWindow.getLa...
{ "repo_name": "boberfly/gaffer", "path": "doc/source/GettingStarted/TutorialAssemblingTheGafferBot/screengrab.py", "copies": "4", "size": "10624", "license": "bsd-3-clause", "hash": -1710939308407735800, "line_mean": 47.9585253456, "line_max": 178, "alpha_frac": 0.766189759, "autogenerated": false,...
# BuildTarget: images/pythonEditorHelloWorld.png import os import IECore import imath import time import Gaffer import GafferScene import GafferUI import GafferSceneUI mainWindow = GafferUI.ScriptWindow.acquire( script ) pythonEditor = mainWindow.getLayout().editors( GafferUI.PythonEditor )[0] graphEditor = mainWin...
{ "repo_name": "appleseedhq/gaffer", "path": "doc/source/WorkingWithThePythonScriptingAPI/TutorialNodeGraphEditingInPython/screengrab.py", "copies": "4", "size": "5611", "license": "bsd-3-clause", "hash": 1104920265094168700, "line_mean": 44.6178861789, "line_max": 172, "alpha_frac": 0.7595793976, "...
# BuildTarget: images/sceneInspector.png import IECore import time import Gaffer import GafferUI import GafferScene import GafferSceneUI import GafferOSL import GafferAppleseed # Create and connect nodes script["SceneReader"] = GafferScene.SceneReader() script["ShaderAssignment"] = GafferScene.ShaderAssignment() sc...
{ "repo_name": "appleseedhq/gaffer", "path": "doc/source/WorkingWithScenes/AnatomyOfAScene/screengrab.py", "copies": "4", "size": "3368", "license": "bsd-3-clause", "hash": -1111725627480746900, "line_mean": 42.1794871795, "line_max": 117, "alpha_frac": 0.7568289786, "autogenerated": false, "ratio...
# BuildTarget: images/tutorialBookmarks.png # BuildTarget: images/tutorialDefaultBookmark.png # BuildTarget: images/tutorialDefaultImageNodeBookmark.png # BuildTarget: images/tutorialDefaultImageNodePath.png import os import subprocess32 as subprocess import tempfile import time import Gaffer import GafferUI import G...
{ "repo_name": "ImageEngine/gaffer", "path": "doc/source/WorkingWithThePythonScriptingAPI/TutorialStartupConfig2/screengrab.py", "copies": "5", "size": "4648", "license": "bsd-3-clause", "hash": -4368838754671804000, "line_mean": 39.7719298246, "line_max": 140, "alpha_frac": 0.72267642, "autogenerat...
# BuildTarget: images/tutorialSettingsWindowDefaultContextVariables.png # BuildTarget: images/tutorialSettingsWindowCustomContextVariable.png # BuildTarget: images/tutorialVariableSubstitutionInStringPlug.png # BuildTarget: images/tutorialVariableSubstitutionExpression.png # BuildTarget: images/tutorialVariableSubstitu...
{ "repo_name": "lucienfostier/gaffer", "path": "doc/source/WorkingWithThePythonScriptingAPI/TutorialStartupConfig1/screengrab.py", "copies": "3", "size": "4669", "license": "bsd-3-clause", "hash": 998621555613013400, "line_mean": 43.0471698113, "line_max": 140, "alpha_frac": 0.7633326194, "autogener...
# BuildTarget: images/tutorialSettingUpASpreadsheetAppleseedOptionsNode.png # BuildTarget: images/tutorialSettingUpASpreadsheetCleanColumn.png # BuildTarget: images/tutorialSettingUpASpreadsheetDefaultCell.png # BuildTarget: images/tutorialSettingUpASpreadsheetFullName.png # BuildTarget: images/tutorialSettingUpASpread...
{ "repo_name": "hradec/gaffer", "path": "doc/source/WorkingWithTheNodeGraph/TutorialSettingUpASpreadsheet/screengrab.py", "copies": "4", "size": "6922", "license": "bsd-3-clause", "hash": -1817683678453973000, "line_mean": 41.9937888199, "line_max": 130, "alpha_frac": 0.7827217567, "autogenerated": ...
# BuildTarget: images/tutorialSettingUpASpreadsheetRow2Other.png images/tutorialSettingUpASpreadsheetRows2A2B.png images/tutorialSettingUpASpreadsheetOverscanValues.png images/tutorialSettingUpASpreadsheetFullName.png images/tutorialSettingUpASpreadsheetRow2.png images/tutorialSettingUpASpreadsheetCleanColumn.png image...
{ "repo_name": "lucienfostier/gaffer", "path": "doc/source/WorkingWithTheNodeGraph/TutorialSettingUpASpreadsheet/screengrab.py", "copies": "3", "size": "6742", "license": "bsd-3-clause", "hash": 3867123581439572000, "line_mean": 44.2483221477, "line_max": 699, "alpha_frac": 0.7840403441, "autogenera...
import El import numpy as np def buildTFUSE(k,N,fieldCode, ncells) delta = np.divide(n,N, dtype=float) N_sub = ncells[0] n_sub = np.floor(delta * N_sub) A_sub = El.DistSparseMatrix() A_sub.Resize(n_sub,N_sub) if fieldCode in ('R', 'Pos'): El.Gaussian(A_sub , n_sub, N_sub) #should be ...
{ "repo_name": "monajemi/TensorPT", "path": "Python/DEP/buildTFUSE.py", "copies": "1", "size": "1067", "license": "bsd-3-clause", "hash": -1057294037146373200, "line_mean": 26.358974359, "line_max": 98, "alpha_frac": 0.633552015, "autogenerated": false, "ratio": 2.822751322751323, "config_test":...
'Build the bundled capnp distribution' import subprocess import os import shutil import struct import sys def build_libcapnp(bundle_dir, build_dir): ''' Build capnproto ''' bundle_dir = os.path.abspath(bundle_dir) capnp_dir = os.path.join(bundle_dir, 'capnproto-c++') build_dir = os.path.abspa...
{ "repo_name": "SymbiFlow/pycapnp", "path": "buildutils/build.py", "copies": "1", "size": "2374", "license": "bsd-2-clause", "hash": -4587249826285556700, "line_mean": 28.3086419753, "line_max": 81, "alpha_frac": 0.597725358, "autogenerated": false, "ratio": 3.657935285053929, "config_test": fal...
'Build the bundled capnp distribution' import subprocess import os import shutil import struct import sys def build_libcapnp(bundle_dir, build_dir): # noqa: C901 ''' Build capnproto ''' bundle_dir = os.path.abspath(bundle_dir) capnp_dir = os.path.join(bundle_dir, 'capnproto-c++') build_dir =...
{ "repo_name": "jparyani/pycapnp", "path": "buildutils/build.py", "copies": "1", "size": "2586", "license": "bsd-2-clause", "hash": -5532029897994063000, "line_mean": 28.724137931, "line_max": 81, "alpha_frac": 0.5966744006, "autogenerated": false, "ratio": 3.6628895184135977, "config_test": fal...
"""Build the C client docs. """ from __future__ import with_statement import os import shutil import socket import subprocess import time import urllib2 def clean_dir(dir): try: shutil.rmtree(dir) except: pass os.makedirs(dir) def gen_api(dir): clean_dir(dir) clean_dir("docs/sourc...
{ "repo_name": "HeliumProject/mongo-c", "path": "docs/buildscripts/docs.py", "copies": "5", "size": "1285", "license": "apache-2.0", "hash": -5538134482434875000, "line_mean": 21.5438596491, "line_max": 79, "alpha_frac": 0.6194552529, "autogenerated": false, "ratio": 3.454301075268817, "config_t...
# Build the documentation for nanodbc library # Configuration nanodbc_name = 'nanodbc' nanodbc_versions = ['master', '2.13.0'] # End of Configuration import errno import os import sys from subprocess import check_call, CalledProcessError, Popen, PIPE def build_docs(**kwargs): assert nanodbc_versions version ...
{ "repo_name": "nanodbc/nanodbc", "path": "doc/build.py", "copies": "1", "size": "2161", "license": "mit", "hash": 982275134241818600, "line_mean": 33.3015873016, "line_max": 76, "alpha_frac": 0.5654789449, "autogenerated": false, "ratio": 3.43015873015873, "config_test": false, "has_no_keywor...
"""Build the documentation Copyright (c) 2015 Francesco Montesano MIT Licence """ import colorama import dodocs.config as dconf import dodocs.logger as dlog from dodocs.mkdoc import mkprofile as mkp def build_cmd_arguments(subparser, formatter_class): """Create the ``build`` parser and fill it with the releva...
{ "repo_name": "montefra/dodocs", "path": "dodocs/mkdoc/__init__.py", "copies": "1", "size": "1815", "license": "mit", "hash": -183293192613631400, "line_mean": 26.5, "line_max": 78, "alpha_frac": 0.5785123967, "autogenerated": false, "ratio": 4.571788413098237, "config_test": false, "has_no_k...
# build the exe by simply running this script #import sys #sys.argv.append("py2exe") # standard setup file from distutils.core import setup import py2exe # get all dependencies from dependencies folder # and make sure all dlls and pyds are included import sys sys.path.append("pythongis/dependencies") import os def al...
{ "repo_name": "karimbahgat/PythonGis", "path": "(sandbox,tobemerged)/setup,works.py", "copies": "1", "size": "1313", "license": "mit", "hash": 724995078176668800, "line_mean": 31.0243902439, "line_max": 72, "alpha_frac": 0.5811119573, "autogenerated": false, "ratio": 4.015290519877676, "config_...
# Build the model, restore the variables and run the inference # Need to use SavedModel builder and loader instead - future work import os import time from multiprocessing import Process import imageio import numpy as np import tensorflow as tf from kafka import KafkaProducer from scipy.misc import imread from skimage...
{ "repo_name": "ani2404/ee6761cloud", "path": "inf_main.py", "copies": "1", "size": "4827", "license": "mit", "hash": -7988056586810563000, "line_mean": 36.4263565891, "line_max": 172, "alpha_frac": 0.6631448104, "autogenerated": false, "ratio": 3.623873873873874, "config_test": false, "has_no...
""" build the nb classifier using the weka api after training need to make predictions on an incremental basis for the test data USAGE : python naivebayes_casa.py path_to_training_arff path_to_test_arff """ # <imports> import sys import os import weka.core.jvm as jvm from weka.core.converters impo...
{ "repo_name": "aksheus/Detect-Depression", "path": "naivebayes_csa.py", "copies": "1", "size": "1954", "license": "mit", "hash": 7962689176924905000, "line_mean": 20.2391304348, "line_max": 128, "alpha_frac": 0.698567042, "autogenerated": false, "ratio": 3.166936790923825, "config_test": true, ...
""" Build the network architecture. >>> arch = Architecture( ... rgb_shape=(3, 64, 64), ... lidar_shape=(6, 64, 64), ... fusion='early', ... obb_parametrization='vector_and_width', ... synthetic='no_pretrain', ... channel_dropout='cdrop', ....
{ "repo_name": "jfemiani/srp-boxes", "path": "srp/model/arch.py", "copies": "1", "size": "35262", "license": "mit", "hash": -94830538689034260, "line_mean": 36.9569429494, "line_max": 120, "alpha_frac": 0.609664795, "autogenerated": false, "ratio": 3.7709335899903755, "config_test": false, "ha...
"""Build the Pygments modules from the CSS.""" import os import tools.pyg_css_convert as pcc pth = os.path.dirname(os.path.abspath(__file__)) css = os.path.join(pth, 'stylesheets') output = os.path.join(pth, 'pymdown_styles') added = [] for f in os.listdir(output): os.remove(os.path.join(output, f)) for f in os....
{ "repo_name": "facelessuser/pymdown-styles", "path": "build_modules.py", "copies": "1", "size": "1403", "license": "mit", "hash": 2937327654731811300, "line_mean": 36.9189189189, "line_max": 99, "alpha_frac": 0.5759087669, "autogenerated": false, "ratio": 2.817269076305221, "config_test": false...
"""Build the qbsolv package.""" from setuptools import setup from setuptools.extension import Extension from setuptools.command.build_ext import build_ext import os cwd = os.path.abspath(os.path.dirname(__file__)) if not os.path.exists(os.path.join(cwd, 'PKG-INFO')): try: from Cython.Build import cythoniz...
{ "repo_name": "myriagon/qbsolv", "path": "setup.py", "copies": "1", "size": "1915", "license": "apache-2.0", "hash": 2821918566325579300, "line_mean": 26.3571428571, "line_max": 80, "alpha_frac": 0.5702349869, "autogenerated": false, "ratio": 3.377425044091711, "config_test": false, "has_no_k...
# Build the Rust field and message types from the FIX spec. import errno import os import re from collections import namedtuple, Counter import xml.etree.ElementTree as ET from codegen_base import * def format_name(name): # Handle case where name begins with a numeric character numbers = '0123456789' if...
{ "repo_name": "billpmurphy/rustfix", "path": "codegen/codegen.py", "copies": "1", "size": "13252", "license": "bsd-2-clause", "hash": 1693970052971519500, "line_mean": 31.4009779951, "line_max": 83, "alpha_frac": 0.5402958044, "autogenerated": false, "ratio": 3.6306849315068495, "config_test": ...
""" Build the SASS - main.css and optionally the widgets """ import sass import os import shutil from datetime import datetime # SASS directory SASS = os.path.join("cms", "sass") # Output style STYLE = "compressed" # SASS and error file for the main CSS MAIN_SETTINGS = (os.path.join(SASS, "main.scss"), ...
{ "repo_name": "DOAJ/doaj", "path": "portality/cms/build_sass.py", "copies": "1", "size": "4028", "license": "apache-2.0", "hash": -9202428084632396000, "line_mean": 33.1355932203, "line_max": 146, "alpha_frac": 0.566285998, "autogenerated": false, "ratio": 3.382031905961377, "config_test": fals...
"""Build the simplest model of bilayer graphene and compute its band structure""" import pybinding as pb import matplotlib.pyplot as plt from math import sqrt, pi pb.pltutils.use_style() def bilayer_graphene(): """Bilayer lattice in the AB-stacked form (Bernal-stacked) This is the simplest model with just a...
{ "repo_name": "dean0x7d/pybinding", "path": "docs/examples/lattice/bilayer_graphene.py", "copies": "2", "size": "1728", "license": "bsd-2-clause", "hash": 7181603806228669000, "line_mean": 24.7910447761, "line_max": 93, "alpha_frac": 0.5289351852, "autogenerated": false, "ratio": 2.48275862068965...
"""Build the Srctools package.""" from setuptools import setup, Extension, find_packages import sys import os WIN = sys.platform.startswith('win') SQUISH_CPP = [ 'libsquish/alpha.cpp', 'libsquish/clusterfit.cpp', 'libsquish/colourblock.cpp', 'libsquish/colourfit.cpp', 'libsquish/colourset.cpp', ...
{ "repo_name": "TeamSpen210/srctools", "path": "setup.py", "copies": "1", "size": "3043", "license": "unlicense", "hash": -3213793882237253600, "line_mean": 27.7075471698, "line_max": 79, "alpha_frac": 0.5264541571, "autogenerated": false, "ratio": 3.7291666666666665, "config_test": false, "ha...
"""Build the static files.""" import os import sys import time import csscompressor import watchdog.events import watchdog.observers maps = { 'index.min.css': ( 'normalize.css', 'skeleton.css', 'common.css', 'index.css', ), 'analyse.min.css': ( 'normalize.css', ...
{ "repo_name": "thisismyrobot/dnstwister", "path": "build/build_fed.py", "copies": "1", "size": "1786", "license": "unlicense", "hash": 6212118969230743000, "line_mean": 21.325, "line_max": 72, "alpha_frac": 0.539193729, "autogenerated": false, "ratio": 3.447876447876448, "config_test": false, ...
"""Build the thumbnails for the hexbin """ import itertools from random import shuffle import sys import json import io import urllib import yaml from PIL import Image import requests def check_status(datum): """Check that both the url and image link are valid URLs and that the image link isn't just a redi...
{ "repo_name": "wd15/chimad-phase-field", "path": "_data/hexbin.py", "copies": "1", "size": "2868", "license": "mit", "hash": -4053042398622083000, "line_mean": 28.5670103093, "line_max": 86, "alpha_frac": 0.6052998605, "autogenerated": false, "ratio": 3.2739726027397262, "config_test": false, ...
"""Build the thumbnails for the hexbin """ import json import io import urllib import yaml from PIL import Image import progressbar import numpy as np import requests def hexbin_yaml_to_json(): """Generate JSON image data from the YAML. """ data = yaml.load(open('_data/hexbin.yaml', 'r')) for item ...
{ "repo_name": "usnistgov/chimad-phase-field", "path": "_data/hexbin.py", "copies": "1", "size": "3066", "license": "mit", "hash": -2217355434092464000, "line_mean": 29.3564356436, "line_max": 77, "alpha_frac": 0.5769732551, "autogenerated": false, "ratio": 3.3217768147345614, "config_test": fal...
"""Build the tutorial data files from the IMDB *.list.gz files.""" import csv import gzip import os import re from datetime import datetime split_on_tabs = re.compile(b'\t+').split def main(): os.chdir(os.path.dirname(__file__)) if not os.path.isdir('../data'): os.makedirs('../data') # Load movi...
{ "repo_name": "randomthought/mastering_python_pandas", "path": "build/BUILD.py", "copies": "3", "size": "6055", "license": "mit", "hash": -8994958366625696000, "line_mean": 26.3981900452, "line_max": 78, "alpha_frac": 0.5156069364, "autogenerated": false, "ratio": 3.8371356147021545, "config_te...
"""Build the tutorial data files from the IMDB *.list.gz files.""" import csv import gzip import os import re from datetime import datetime split_on_tabs = re.compile(b'\t+').split def main(): os.chdir(os.path.dirname(os.path.abspath(__file__))) if not os.path.isdir('../data'): os.makedirs('../data'...
{ "repo_name": "abecede753/trax", "path": "notebooks/pycon-pandas-tutorial-master/build/BUILD.py", "copies": "1", "size": "6174", "license": "mit", "hash": 5315510542815042000, "line_mean": 26.3185840708, "line_max": 78, "alpha_frac": 0.5155490768, "autogenerated": false, "ratio": 3.84194150591163...
"""Build the tutorial data files from the IMDB *.list.gz files.""" import csv import gzip import os import re import sys from datetime import datetime split_on_tabs = re.compile(b'\t+').split BAD_GENRES = {b'Adult', b'Documentary', b'Short', b'Horror', b'Reality-TV', b'Talk-Show', b'Game-Show', b'Reali...
{ "repo_name": "brandon-rhodes/pycon-pandas-tutorial", "path": "build/BUILD.py", "copies": "1", "size": "6481", "license": "mit", "hash": 283241817587773730, "line_mean": 26.8154506438, "line_max": 78, "alpha_frac": 0.5176670267, "autogenerated": false, "ratio": 3.772409778812573, "config_test":...
"""Build the yago to lkif mapping using lkif_to_yago mapping and the yago hierarchy graph. Usage: get_yago_to_lkif.py <mapping_filename> <graph_filename> <output_file> """ import utils from collections import defaultdict from docopt import docopt def get_oldest_ancestors(node, graph): """Returns the oldes...
{ "repo_name": "MIREL-UNC/mirel-scripts", "path": "yago_scripts/get_yago_to_lkif.py", "copies": "1", "size": "1481", "license": "bsd-3-clause", "hash": 402588031861680700, "line_mean": 25.4464285714, "line_max": 75, "alpha_frac": 0.6482106685, "autogenerated": false, "ratio": 3.526190476190476, ...