text
stringlengths
0
1.05M
meta
dict
#BEGIN_HEADER from biokbase.workspace.client import Workspace as workspaceService #END_HEADER class PSDContigCountExample: ''' Module Name: PSDContigCountExample Module Description: ''' ######## WARNING FOR GEVENT USERS ####### # Since asynchronous IO can lead to methods - even t...
{ "repo_name": "psdehal/PSDContigCountExample", "path": "lib/PSDContigCountExample/PSDContigCountExampleImpl.py", "copies": "1", "size": "1653", "license": "mit", "hash": 904129009032911200, "line_mean": 34.170212766, "line_max": 95, "alpha_frac": 0.6170598911, "autogenerated": false, "ratio": 4.3...
#BEGIN_HEADER from biokbase.workspace.client import Workspace as workspaceService #END_HEADER class psd_contigs: ''' Module Name: psd_contigs Module Description: A KBase module: psd_contigs This sample module contains one small method - count_contigs. ''' ######## WARNING FOR GEVENT USER...
{ "repo_name": "psdehal/psd_contigs", "path": "lib/psd_contigs/psd_contigsImpl.py", "copies": "2", "size": "1703", "license": "mit", "hash": 1341006904099779800, "line_mean": 33.7551020408, "line_max": 95, "alpha_frac": 0.6259541985, "autogenerated": false, "ratio": 4.143552311435523, "config_te...
#BEGIN_HEADER from biokbase.workspace.client import Workspace as workspaceService #END_HEADER class psd_count_contigs: ''' Module Name: psd_count_contigs Module Description: A KBase module: psd_count_contigs This sample module contains one small method - count_contigs. ''' ######## WARNI...
{ "repo_name": "nlharris/psd_count_contigs", "path": "lib/psd_count_contigs/psd_count_contigsImpl.py", "copies": "2", "size": "1848", "license": "mit", "hash": -8273216686966263000, "line_mean": 34.5384615385, "line_max": 95, "alpha_frac": 0.625, "autogenerated": false, "ratio": 4.088495575221239,...
#BEGIN_HEADER from biokbase.workspace.client import Workspace as workspaceService #END_HEADER class ranjanContigCount: ''' Module Name: ranjanContigCount Module Description: A KBase module: ranjanContigCount ''' ######## WARNING FOR GEVENT USERS ####### # Since asynchronous IO can le...
{ "repo_name": "pranjan77/ranjanContigCount", "path": "lib/ranjanContigCount/ranjanContigCountImpl.py", "copies": "1", "size": "1652", "license": "mit", "hash": 9143632469273712000, "line_mean": 33.4166666667, "line_max": 95, "alpha_frac": 0.6277239709, "autogenerated": false, "ratio": 4.192893401...
#BEGIN_HEADER from biokbase.workspace.client import Workspace as workspaceService #END_HEADER class rscount: ''' Module Name: rscount Module Description: A KBase module: rscount ''' ######## WARNING FOR GEVENT USERS ####### # Since asynchronous IO can lead to methods - even the same ...
{ "repo_name": "pranjan77/rscount", "path": "lib/rscount/rscountImpl.py", "copies": "1", "size": "1631", "license": "mit", "hash": 6111332847439690000, "line_mean": 31.62, "line_max": 95, "alpha_frac": 0.6174126303, "autogenerated": false, "ratio": 4.247395833333333, "config_test": false, "has...
#BEGIN_HEADER from biokbase.workspace.client import Workspace as workspaceService #END_HEADER class singleRepoTestpsd: ''' Module Name: singleRepoTestpsd Module Description: A KBase module: singleRepoTestpsd This sample module contains one small method - count_contigs. ''' ######## WARNI...
{ "repo_name": "psdehal/singleRepoTestpsd", "path": "lib/singleRepoTestpsd/singleRepoTestpsdImpl.py", "copies": "1", "size": "1721", "license": "mit", "hash": -341677698821812350, "line_mean": 34.1224489796, "line_max": 95, "alpha_frac": 0.6316095293, "autogenerated": false, "ratio": 4.24938271604...
#BEGIN_HEADER from biokbase.workspace.client import Workspace as workspaceService #END_HEADER class sk_count_contigs: ''' Module Name: sk_count_contigs Module Description: A KBase module: sk_count_contigs This sample module contains one small method - count_contigs. ''' ######## WARNING ...
{ "repo_name": "r2sunita/sk_count_contigs", "path": "lib/sk_count_contigs/sk_count_contigsImpl.py", "copies": "1", "size": "1845", "license": "mit", "hash": -1938957601147927000, "line_mean": 34.4807692308, "line_max": 95, "alpha_frac": 0.6243902439, "autogenerated": false, "ratio": 4.109131403118...
#BEGIN_HEADER from biokbase.workspace.client import Workspace as workspaceService #END_HEADER class SneddonContigCounter: ''' Module Name: SneddonContigCounter Module Description: A KBase module: SneddonContigCounter This sample module contains one small method - count_contigs. ''' #####...
{ "repo_name": "msneddon/contigcount3", "path": "lib/SneddonContigCounter/SneddonContigCounterImpl.py", "copies": "1", "size": "1730", "license": "mit", "hash": 5602394427222076000, "line_mean": 34.306122449, "line_max": 95, "alpha_frac": 0.6335260116, "autogenerated": false, "ratio": 4.2092457420...
#BEGIN_HEADER from biokbase.workspace.client import Workspace as workspaceService from Bio import SeqIO from Bio.Seq import Seq from Bio.SeqRecord import SeqRecord from Bio.Alphabet import generic_protein import os #END_HEADER class msa_muscle: ''' Module Name: msa_muscle Module Description: A KB...
{ "repo_name": "psnovichkov/kbase_msa_muscle", "path": "lib/msa_muscle/msa_muscleImpl.py", "copies": "1", "size": "4236", "license": "mit", "hash": -6557323034629363000, "line_mean": 34.5966386555, "line_max": 120, "alpha_frac": 0.5979697828, "autogenerated": false, "ratio": 4.026615969581749, "...
#BEGIN_HEADER from biokbase.workspace.client import Workspace as workspaceService from biokbase.fbaModelServices.Client import fbaModelServices as fbaService #END_HEADER class MyContigCount: ''' Module Name: MyContigCount Module Description: A KBase module: MyContigCount This sample module contai...
{ "repo_name": "mdejongh/MyContigCount", "path": "lib/MyContigCount/MyContigCountImpl.py", "copies": "1", "size": "4003", "license": "mit", "hash": 6862742034556211000, "line_mean": 37.4903846154, "line_max": 152, "alpha_frac": 0.5810642018, "autogenerated": false, "ratio": 4.047522750252781, "c...
#BEGIN_HEADER from biokbase.workspace.client import Workspace as workspaceService import requests import subprocess import os import sys import re #END_HEADER class Trimmomatic: ''' Module Name: Trimmomatic Module Description: A KBase module: Trimmomatic ''' ######## WARNING FOR GEVENT U...
{ "repo_name": "psdehal/Trimmomatic", "path": "lib/Trimmomatic/TrimmomaticImpl.py", "copies": "1", "size": "15262", "license": "mit", "hash": 1693463725609080800, "line_mean": 51.8096885813, "line_max": 166, "alpha_frac": 0.5795439654, "autogenerated": false, "ratio": 4.1071044133476855, "config...
#BEGIN_HEADER import os import sys import shutil import hashlib import subprocess import requests import re import traceback import uuid from datetime import datetime from pprint import pprint, pformat import numpy as np import gzip from Bio import SeqIO from Bio.Seq import Seq from Bio.SeqRecord import SeqRecord from...
{ "repo_name": "dcchivian/kb_vsearch", "path": "lib/kb_vsearch/kb_vsearchImpl.py", "copies": "1", "size": "54860", "license": "mit", "hash": -8053665846996120000, "line_mean": 46.0497427101, "line_max": 209, "alpha_frac": 0.5062522785, "autogenerated": false, "ratio": 4.292980671414039, "config_...
#BEGIN_HEADER import os import sys import traceback import json import logging import subprocess import tempfile import uuid import hashlib from datetime import datetime from Bio import SeqIO from Bio.Seq import Seq from Bio.SeqRecord import SeqRecord from biokbase.workspace.client import Workspace as workspaceServi...
{ "repo_name": "levinas/kb_wga", "path": "lib/WholeGenomeAlignment/WholeGenomeAlignmentImpl.py", "copies": "1", "size": "20034", "license": "mit", "hash": -7533392899807898000, "line_mean": 36.8714555766, "line_max": 148, "alpha_frac": 0.5326445043, "autogenerated": false, "ratio": 3.9789473684210...
#BEGIN_HEADER import os import sys import uuid from biokbase.workspace.client import Workspace as workspaceService #END_HEADER class MegaHitTest: ''' Module Name: MegaHitTest Module Description: A KBase module: MegaHitTest ''' ######## WARNING FOR GEVENT USERS ####### # Since asynch...
{ "repo_name": "levinas/kb_megahit_test", "path": "lib/MegaHitTest/MegaHitTestImpl.py", "copies": "1", "size": "3001", "license": "mit", "hash": 1278995040191188700, "line_mean": 31.6195652174, "line_max": 149, "alpha_frac": 0.5498167278, "autogenerated": false, "ratio": 4.173852573018081, "conf...
#BEGIN_HEADER import sklearn.cluster as cl #END_HEADER class ClusterServicePy: ''' Module Name: ClusterServicePy Module Description: ''' ######## WARNING FOR GEVENT USERS ####### # Since asynchronous IO can lead to methods - even the same method - # interrupting each other, you ...
{ "repo_name": "kbase/feature_values", "path": "clusterservice/ClusterServicePyImpl.py", "copies": "1", "size": "4205", "license": "mit", "hash": 3605709357234663000, "line_mean": 36.5446428571, "line_max": 112, "alpha_frac": 0.6080856124, "autogenerated": false, "ratio": 4.435654008438819, "con...
#BEGIN_HEADER import subprocess from subprocess import CalledProcessError import pymongo ''' This service prepares an JGI / KBase Push to KBase (PtKB) installation for testing by wiping the Shock, Workspace, and Handle Service databases. Configuration options are set below. To understand exactly what the server does,...
{ "repo_name": "MrCreosote/jgi_kbase_integration_tests", "path": "lib/biokbase/wipe_dev03/impl.py", "copies": "1", "size": "7146", "license": "mit", "hash": 3831713016173720600, "line_mean": 35.4591836735, "line_max": 79, "alpha_frac": 0.6175482788, "autogenerated": false, "ratio": 4.0304568527918...
#BEGIN_HEADER import sys import traceback from biokbase.workspace.client import Workspace as workspaceService #END_HEADER class kb_sdk_filter_contigs: ''' Module Name: kb_sdk_filter_contigs Module Description: A KBase module: kb_sdk_filter_contigs This sample module contains one small method - fi...
{ "repo_name": "psdehal/kb_sdk_filter_contigs", "path": "lib/kb_sdk_filter_contigs/kb_sdk_filter_contigsImpl.py", "copies": "1", "size": "4953", "license": "mit", "hash": -2126532990086474800, "line_mean": 37.6953125, "line_max": 109, "alpha_frac": 0.5495659196, "autogenerated": false, "ratio": 4....
#BEGIN_HEADER import sys import os import glob import json #sys.path.insert(0, '/kb/dev_container/modules/genome_util/lib/biokbase/genome_util') import script_util #from biokbase.workspace.client import Workspace #from workspace.client import Workspace #END_HEADER class KBaseGenomeUtil: ''' Module Name: ...
{ "repo_name": "plane83/genome_util", "path": "lib/biokbase/genome_util/KBaseGenomeUtilImpl.py", "copies": "1", "size": "3110", "license": "mit", "hash": 4012153421133999600, "line_mean": 26.2807017544, "line_max": 88, "alpha_frac": 0.6617363344, "autogenerated": false, "ratio": 3.2531380753138075...
#BEGIN_HEADER # The header block is where all import statements should live from __future__ import print_function import os import re import uuid from pprint import pformat from biokbase.workspace.client import Workspace as workspaceService # @UnresolvedImport @IgnorePep8 import requests import json import psutil impo...
{ "repo_name": "kbaseapps/gaprice_SPAdes", "path": "lib/gaprice_SPAdes/gaprice_SPAdesImpl.py", "copies": "1", "size": "27088", "license": "mit", "hash": -5019252211295571000, "line_mean": 39.249628529, "line_max": 143, "alpha_frac": 0.5288688718, "autogenerated": false, "ratio": 4.05205684367988, ...
#BEGIN_HEADER # The header block is where all import statements should live import os import re import json import requests import time from pprint import pformat from biokbase.workspace.client import Workspace as workspaceService # @UnresolvedImport @IgnorePep8 from biokbase.workspace.client import ServerError as Wor...
{ "repo_name": "MrCreosote/kb_read_library_to_file", "path": "lib/kb_read_library_to_file/kb_read_library_to_fileImpl.py", "copies": "1", "size": "31889", "license": "mit", "hash": -115231195873119870, "line_mean": 43.914084507, "line_max": 104, "alpha_frac": 0.5755276114, "autogenerated": false, ...
#BEGIN_HEADER # The header block is where all import statements should live import sys import traceback import uuid import json import requests import random from pprint import pprint, pformat from biokbase.workspace.client import Workspace as workspaceService #END_HEADER class HomologySearch: ''' Module Name...
{ "repo_name": "hyoo/kb_sdk_homology", "path": "lib/HomologySearch/HomologySearchImpl.py", "copies": "1", "size": "9714", "license": "mit", "hash": 8136342665684240000, "line_mean": 42.3660714286, "line_max": 156, "alpha_frac": 0.5312950381, "autogenerated": false, "ratio": 4.179862306368331, "c...
#BEGIN_HEADER # The header block is where all import statments should live import csv import os import re import subprocess import sys import time import traceback import uuid from pprint import pprint, pformat from biokbase.workspace.client import Workspace as workspaceService from Bio import SeqIO from Bio.Seq impor...
{ "repo_name": "levinas/kb_sdk_ontology", "path": "lib/ElectronicAnnotationMethods/ElectronicAnnotationMethodsImpl.py", "copies": "1", "size": "32417", "license": "mit", "hash": 2794186156918598700, "line_mean": 44.1490250696, "line_max": 114, "alpha_frac": 0.5589968227, "autogenerated": false, "r...
#BEGIN_HEADER # The header block is where all import statments should live import sys import traceback import uuid from pprint import pprint, pformat from biokbase.workspace.client import Workspace as workspaceService #END_HEADER class ContigCount: ''' Module Name: ContigCount Module Description: ...
{ "repo_name": "hyoo/kb_sdk_contigcount", "path": "lib/ContigCount/ContigCountImpl.py", "copies": "1", "size": "9389", "license": "mit", "hash": 2213157385529866500, "line_mean": 43.4976303318, "line_max": 114, "alpha_frac": 0.5610821174, "autogenerated": false, "ratio": 4.306880733944954, "conf...
#BEGIN_HEADER # The header block is where all import statments should live import sys import traceback import uuid import random import os #for callig weka - fix later from pprint import pprint, pformat from biokbase.workspace.client import Workspace as workspaceService #END_HEADER class mcashman_FS: ''' Modu...
{ "repo_name": "mikacashman/mcashmanFS", "path": "lib/mcashman_FS/mcashman_FSImpl.py", "copies": "1", "size": "10758", "license": "mit", "hash": 2164446776707501600, "line_mean": 33.1523809524, "line_max": 113, "alpha_frac": 0.630228667, "autogenerated": false, "ratio": 2.9767570558937466, "conf...
# BEGIN: Imports from datastore_pb2 from .datastore_pb2 import AllocateIdsRequest from .datastore_pb2 import AllocateIdsResponse from .datastore_pb2 import BeginTransactionRequest from .datastore_pb2 import BeginTransactionResponse from .datastore_pb2 import CommitRequest from .datastore_pb2 import CommitResponse from ...
{ "repo_name": "Kapiche/gcloud-datastore-oem", "path": "gcloudoem/datastore/_generated/datastore_grpc_pb2.py", "copies": "1", "size": "13799", "license": "apache-2.0", "hash": 7342079500167370000, "line_mean": 44.8438538206, "line_max": 254, "alpha_frac": 0.7441843612, "autogenerated": false, "rat...
# BEGIN: Imports from datastore_pb2 from google.cloud.datastore._generated.datastore_pb2 import AllocateIdsRequest from google.cloud.datastore._generated.datastore_pb2 import AllocateIdsResponse from google.cloud.datastore._generated.datastore_pb2 import BeginTransactionRequest from google.cloud.datastore._generated.da...
{ "repo_name": "jgeewax/gcloud-python", "path": "datastore/google/cloud/datastore/_generated/datastore_grpc_pb2.py", "copies": "2", "size": "14294", "license": "apache-2.0", "hash": -716113938578419600, "line_mean": 46.488372093, "line_max": 254, "alpha_frac": 0.7488456695, "autogenerated": false, ...
# [BEGIN IMPORTS] # for mapper code from sqlalchemy import (Column, ForeignKey, Integer, String, DateTime, create_engine) # use in config and class from sqlalchemy.ext.declarative import declarative_base # for mapper from sqlalchemy.orm import relationship # for relationship table from sqlalchem...
{ "repo_name": "vondirath/UD---sellit", "path": "sellit/database/__init__.py", "copies": "1", "size": "2478", "license": "mit", "hash": 7310999080019788000, "line_mean": 27.4827586207, "line_max": 77, "alpha_frac": 0.6428571429, "autogenerated": false, "ratio": 3.952153110047847, "config_test": ...
# Begin: imports import itertools import numpy as np import matplotlib.pyplot as plt import janus.green as green import janus.fft.serial as fft import janus.material.elastic.linear.isotropic as material import janus.operators as operators from janus.operators import isotropic_4 # End: imports # Begin: init class Ex...
{ "repo_name": "sbrisard/janus", "path": "sphinx/tutorials/square_basic/square_basic.py", "copies": "1", "size": "3972", "license": "bsd-3-clause", "hash": 3351545820374374000, "line_mean": 33.3826086957, "line_max": 76, "alpha_frac": 0.5551340415, "autogenerated": false, "ratio": 3.04387990762124...
# Begin imports import calendar import datetime import time from fabric import api as fab from fabric.api import settings as fab_settings from fabric.contrib import django import boto from boto.ec2 import connection as aws from django.conf import settings # End imports # Begin support def isotime2datetime(isotim...
{ "repo_name": "dpetzold/dakku", "path": "dakku/fab/ec2.py", "copies": "1", "size": "2219", "license": "bsd-3-clause", "hash": -6965938115713853000, "line_mean": 23.6555555556, "line_max": 78, "alpha_frac": 0.6286615593, "autogenerated": false, "ratio": 3.211287988422576, "config_test": false, ...
# Begin imports import datetime import os import socket from MySQLdb import cursors from fabric import api as fab from django.conf import settings from django.db import connection, transaction # End imports # Begin support mysqlbase = '{cmd} -h {host} -u {user} --password={password}' mysql = mysqlbase.format( ...
{ "repo_name": "dpetzold/dakku", "path": "dakku/fab/mysql.py", "copies": "1", "size": "3889", "license": "bsd-3-clause", "hash": -3589263259898884000, "line_mean": 27.1811594203, "line_max": 115, "alpha_frac": 0.6289534585, "autogenerated": false, "ratio": 3.587638376383764, "config_test": false...
""" Author: Justin Cappos Start date: October 9th, 2009 Purpose: A simple library that serializes and deserializes built-in repy types. This includes strings, integers, floats, booleans, None, complex, tuples, lists, sets, frozensets, and dictionaries. There are no plans for including objects. Note: that all item...
{ "repo_name": "toregreijer/horse-battery", "path": "pingneighbors.py", "copies": "1", "size": "9413", "license": "mit", "hash": -5939214721268378000, "line_mean": 24.718579235, "line_max": 125, "alpha_frac": 0.6533517476, "autogenerated": false, "ratio": 3.656954156954157, "config_test": false,...
### BEGIN INIT INFO # Provides: dnscheck # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start daemon at boot time # Description: Enable service provided by daemon. ### END INIT INFO import arg...
{ "repo_name": "GeekyShiva/FordMotors-SelfDrivingCar", "path": "Machine Learning/driver_program.py", "copies": "4", "size": "5372", "license": "mit", "hash": -6187419092350078000, "line_mean": 25.865, "line_max": 354, "alpha_frac": 0.566827997, "autogenerated": false, "ratio": 3.906909090909091, ...
"""This is mbuild: a simple portable dependence-based build-system written in python. mbuild is a python-based build system very similar to scons with some philosophical features of make. mbuild exposes the scan and build phases allowing them to be repeated as necessary. Multiple DAGs can be built, one during each s...
{ "repo_name": "intelxed/mbuild", "path": "mbuild/__init__.py", "copies": "1", "size": "4760", "license": "apache-2.0", "hash": 3497379200855825400, "line_mean": 34, "line_max": 82, "alpha_frac": 0.6768907563, "autogenerated": false, "ratio": 3.701399688958009, "config_test": false, "has_no_ke...
from __future__ import print_function import os import collections import codegen import encutil import genutil import actions import verbosity max_in_byte = 256 #max unsigned int per byte emit_function_prefix = 'xed_encode_instruction_emit_pattern' bind_function_prefix = 'xed_encode_instruction_fb_pattern' get_field...
{ "repo_name": "intelxed/xed", "path": "pysrc/ins_emit.py", "copies": "1", "size": "34888", "license": "apache-2.0", "hash": 4507206356246084000, "line_mean": 38.9176201373, "line_max": 149, "alpha_frac": 0.5316727815, "autogenerated": false, "ratio": 4.028637413394919, "config_test": false, "...
from verbosity import * import patterns import genutil import encutil import mbuild import copy def msgb(s,b=''): mbuild.msgb(s,b) def gen_return_action(ret_val): ''' create new action with type return ''' action = action_t("return {}".format(ret_val)) return action def dummy_emit(act_in,name): '...
{ "repo_name": "intelxed/xed", "path": "pysrc/actions.py", "copies": "1", "size": "12757", "license": "apache-2.0", "hash": 2488289467705431600, "line_mean": 35.0367231638, "line_max": 138, "alpha_frac": 0.5108567845, "autogenerated": false, "ratio": 3.798987492555092, "config_test": false, "h...
import collections import ild_info import genutil def _die(s): genutil.die(s) def get_lookup(agi): """Return a dict[map][opcode]->list""" map_names = ild_info.get_maps(agi) lookup = {} for insn_map in map_names: lookup[insn_map] = collections.defaultdict(list) return lookup ...
{ "repo_name": "intelxed/xed", "path": "pysrc/ild_storage.py", "copies": "1", "size": "1909", "license": "apache-2.0", "hash": -7279490785397851000, "line_mean": 28.828125, "line_max": 75, "alpha_frac": 0.6359350445, "autogenerated": false, "ratio": 3.608695652173913, "config_test": false, "ha...
import collections import ild_nt import ildutil import codegen import mbuild import ild_info import operand_storage _arg_const_suffix = 'CONST' _dec_strings = {'obj_str' : 'd', 'obj_type' : 'xed_decoded_inst_t', 'obj_const' : 'const ', 'lu_namespace' : 'dec...
{ "repo_name": "intelxed/xed", "path": "pysrc/ild_codegen.py", "copies": "1", "size": "30927", "license": "apache-2.0", "hash": 7169117302369886000, "line_mean": 37.275990099, "line_max": 102, "alpha_frac": 0.5632942089, "autogenerated": false, "ratio": 3.316212738580313, "config_test": false, ...
import genutil def read_file(fn): lines = open(fn,'r').readlines() lines = map(genutil.no_comments, lines) lines = list(filter(genutil.blank_line, lines)) d = {} # isa-set to list of cpuid records for line in lines: wrds = line.split(':') isa_set = wrds[0].strip() cpuid_bits...
{ "repo_name": "intelxed/xed", "path": "pysrc/cpuid_rdr.py", "copies": "1", "size": "1194", "license": "apache-2.0", "hash": -1132244784907420800, "line_mean": 35.1818181818, "line_max": 84, "alpha_frac": 0.6649916248, "autogenerated": false, "ratio": 3.4310344827586206, "config_test": false, ...
import math import collections import genutil import ildutil import codegen import hashmul import hashfks import hashlin import xedhash # phash means "perfect hash". _l1_bucket_max = 8 # FIXME: also in hashfks.py #FIXME: using 64 bits for _hkey_ctype because sometimes 16bi-UIMM00 is #a constraint and we are out...
{ "repo_name": "intelxed/xed", "path": "pysrc/ild_phash.py", "copies": "1", "size": "23468", "license": "apache-2.0", "hash": 1913006206298719200, "line_mean": 36.8516129032, "line_max": 93, "alpha_frac": 0.5346855292, "autogenerated": false, "ratio": 3.378635185718399, "config_test": false, "...
import math import copy import collections import genutil import ildutil import ild_info import opnds import ild_phash import ild_codegen import ild_eosz import ild_easz import ild_nt import actions_codegen import actions import verbosity import tup2int import operand_storage # _token_2_module is for fields that migh...
{ "repo_name": "intelxed/xed", "path": "pysrc/ild_cdict.py", "copies": "1", "size": "32280", "license": "apache-2.0", "hash": -4334627860109916700, "line_mean": 37.3372921615, "line_max": 93, "alpha_frac": 0.579739777, "autogenerated": false, "ratio": 3.6347258191645087, "config_test": false, ...
import re import copy import os import collections import shutil import genutil import ildutil import mbuild import ild_info import ild_storage import ild_eosz import ild_easz import ild_imm import ild_disp import ild_modrm import codegen import ild_codegen import ild_cdict import dec_dyn import actions import verbosi...
{ "repo_name": "intelxed/xed", "path": "pysrc/ild.py", "copies": "1", "size": "22110", "license": "apache-2.0", "hash": 8474430297442317000, "line_mean": 36.6660988075, "line_max": 106, "alpha_frac": 0.5509724107, "autogenerated": false, "ratio": 3.6794807788317523, "config_test": false, "has_...
import re import genutil import ildutil import codegen import opnds def is_target_op(agi, op, target_op): """ @param op: instruction_info_t.operands[i] - the binded operand by an NT row @param target_op: string - the name of the target operand @param agi: all_generator_info_t - the main generator's d...
{ "repo_name": "intelxed/xed", "path": "pysrc/ild_nt.py", "copies": "1", "size": "23861", "license": "apache-2.0", "hash": 6033242271529030000, "line_mean": 38.8347245409, "line_max": 88, "alpha_frac": 0.6363941159, "autogenerated": false, "ratio": 3.6065598548972186, "config_test": true, "has...
import re macro_def_pattern = \ re.compile(r'^MACRO_DEF[ \t]*[:][ \t]*(?P<name>[_A-Za-z0-9]+)[ \t]*$') macro_use_pattern = \ re.compile(r'^MACRO_USE[ \t]*[:][ \t]*(?P<name>[_A-Za-z0-9]+)[(](?P<args>[^)]+)[)][ \t]*$') xed_reg_pattern = re.compile(r'(?P<regname>XED_REG_[A-Za-z0-9_]+)') nt_name_pat...
{ "repo_name": "intelxed/xed", "path": "pysrc/patterns.py", "copies": "1", "size": "3813", "license": "apache-2.0", "hash": -6626491779176552000, "line_mean": 45.5, "line_max": 101, "alpha_frac": 0.615263572, "autogenerated": false, "ratio": 2.4937867887508176, "config_test": false, "has_no_ke...
# dynamic decode for: # (a) part 1 (for OSZ/ASZ NTs), # (b) part 2 (for NTs within in instr patterns), and # (c) operands (mostly register NTLUFs). import os import collections import ildutil import ild_nt import ild_cdict import mbuild import codegen import ild_codegen import operand_storage import verbosity i...
{ "repo_name": "intelxed/xed", "path": "pysrc/dec_dyn.py", "copies": "1", "size": "26440", "license": "apache-2.0", "hash": 2646419077504624600, "line_mean": 36.2394366197, "line_max": 79, "alpha_frac": 0.5604387292, "autogenerated": false, "ratio": 3.3634397659330872, "config_test": false, "h...
import actions class actions_codegen_t(object): ''' This file is about: (a) examining the actions that we'll do after hashing. Some actions may be conditional and this creates valid indicators for the conditional bindings. (b) printing the values of the actions for the hash table initialization....
{ "repo_name": "intelxed/xed", "path": "pysrc/actions_codegen.py", "copies": "1", "size": "13903", "license": "apache-2.0", "hash": 3767311308616335400, "line_mean": 38.3852691218, "line_max": 96, "alpha_frac": 0.5281593901, "autogenerated": false, "ratio": 4.006628242074928, "config_test": fals...
import collections import ild_nt import ildutil import codegen import ild_eosz import ild_easz import ild_info import ild_codegen import operand_storage import mbuild _disp_token = 'DISP_WIDTH' _brdisp_token = 'BRDISP_WIDTH' _ild_t_disp_member = 'disp_width' _l3_c_fn = 'xed-ild-disp-l3.c' _l2_c...
{ "repo_name": "intelxed/xed", "path": "pysrc/ild_disp.py", "copies": "1", "size": "15175", "license": "apache-2.0", "hash": 5606980365892771000, "line_mean": 37.5152284264, "line_max": 81, "alpha_frac": 0.6005930807, "autogenerated": false, "ratio": 3.3797327394209353, "config_test": false, "...
import ild_info import ild_codegen import ildutil import genutil _modrm_nt = 'MODRM()' _vmodrm = 'VMODRM' _modrm_bind = 'MOD[' _mod3_req = 'MOD=3' _modrm_header_fn = 'xed-ild-modrm.h' _has_modrm_true = 'XED_ILD_HASMODRM_TRUE' _has_modrm_false = 'XED_ILD_HASMODRM_FAL...
{ "repo_name": "intelxed/xed", "path": "pysrc/ild_modrm.py", "copies": "1", "size": "7386", "license": "apache-2.0", "hash": -6847800711523646000, "line_mean": 34.6811594203, "line_max": 96, "alpha_frac": 0.5970755483, "autogenerated": false, "ratio": 3.303220035778175, "config_test": false, "...
import ild_nt import mbuild import ildutil import codegen import ild_eosz import ild_info import ild_codegen import operand_storage _imm_token = 'IMM_WIDTH' _ild_t_imm_member = 'imm_width' _uimm1_nt = 'UIMM8_1' _l3_header_fn = 'xed-ild-imm-l3.h' _l2_header_fn = 'xed-ild-imm-l2.h' _l1_heade...
{ "repo_name": "intelxed/xed", "path": "pysrc/ild_imm.py", "copies": "1", "size": "15248", "license": "apache-2.0", "hash": 139775605396264030, "line_mean": 38.7083333333, "line_max": 82, "alpha_frac": 0.5952256034, "autogenerated": false, "ratio": 3.459165154264973, "config_test": false, "has...
import re import ild_nt import mbuild import ild_codegen import operand_storage import genutil import ildutil import ild_info _easz_token = 'EASZ' _easz_binding_pattern = re.compile(r'EASZ=(?P<rhs>[0-9]+)') #FIXME: we can get default NT by looking at the spine _easz_default_nt = 'ASZ_NONTERM' _easz_...
{ "repo_name": "intelxed/xed", "path": "pysrc/ild_easz.py", "copies": "1", "size": "6729", "license": "apache-2.0", "hash": -5702218421106054000, "line_mean": 34.2303664921, "line_max": 79, "alpha_frac": 0.606330807, "autogenerated": false, "ratio": 3.0923713235294117, "config_test": false, "h...
import re import ild_nt import mbuild import ild_info import genutil import ildutil import operand_storage import ild_codegen _eosz_token = 'EOSZ' _eosz_binding_pattern = re.compile(r'EOSZ=(?P<rhs>[0-9]+)') #FIXME: we can get default NT by looking at the spine _eosz_default_nt = 'OSZ_NONTERM' _eosz_c_...
{ "repo_name": "intelxed/xed", "path": "pysrc/ild_eosz.py", "copies": "1", "size": "8641", "license": "apache-2.0", "hash": -557244715112832600, "line_mean": 36.899122807, "line_max": 86, "alpha_frac": 0.6280523088, "autogenerated": false, "ratio": 3.293064024390244, "config_test": false, "has...
## The ild.py needs the mapping from decode search patterns to ## symbolic map names. It includes V0F, V0F38, V0F3A and it has order ## requirements V0F and 0x0F must be after the longer patterns. ## ## The ild_info.py map information is really just the raw map names ## in order as we all as an indicator for wh...
{ "repo_name": "intelxed/xed", "path": "pysrc/ild_info.py", "copies": "1", "size": "8854", "license": "apache-2.0", "hash": 9179631221375205000, "line_mean": 36.5169491525, "line_max": 88, "alpha_frac": 0.6087644003, "autogenerated": false, "ratio": 3.5218774860779636, "config_test": false, "h...
'''Run CI checks on github''' import os import platform import subprocess def github_actions(): return 'GITHUB_ACTIONS' in os.environ and os.environ['GITHUB_ACTIONS'] == 'true' def size_variants(): if platform.system() == 'Darwin' and github_actions(): # 32 bit deprecated in latest macos ...
{ "repo_name": "intelxed/xed", "path": "ci.py", "copies": "1", "size": "2034", "license": "apache-2.0", "hash": 5019088902623855000, "line_mean": 35.9818181818, "line_max": 98, "alpha_frac": 0.6391347099, "autogenerated": false, "ratio": 3.612788632326821, "config_test": false, "has_no_keyword...
import os from conans import ConanFile class MBuildConan(ConanFile): name = "mbuild" description = "A simple portable dependence-based build-system written in Python." url = "https://gitlab.devtools.intel.com/xed-group/xed" homepage = "https://intelxed.github.io/" license = "Apache License 2.0" ...
{ "repo_name": "intelxed/mbuild", "path": "conanfile.py", "copies": "1", "size": "1545", "license": "apache-2.0", "hash": 4699789090925436000, "line_mean": 29.2941176471, "line_max": 86, "alpha_frac": 0.6763754045, "autogenerated": false, "ratio": 3.576388888888889, "config_test": false, "has_...
import os from conans import ConanFile, tools from conans.errors import ConanInvalidConfiguration class XedConan(ConanFile): name = "xed" description = "The X86 Encoder Decoder (XED) library for encoding/decoding X86 instructions." url = "https://gitlab.devtools.intel.com/xed-group/xed" homepage = "...
{ "repo_name": "intelxed/xed", "path": "conanfile.py", "copies": "1", "size": "3754", "license": "apache-2.0", "hash": -7278209638590590000, "line_mean": 33.1272727273, "line_max": 97, "alpha_frac": 0.5980287693, "autogenerated": false, "ratio": 3.5616698292220113, "config_test": false, "has_n...
# Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binar...
{ "repo_name": "arruda/ANTLR3-python", "path": "antlr3/debug.py", "copies": "15", "size": "33665", "license": "bsd-3-clause", "hash": 8055031492723111000, "line_mean": 28.6086191733, "line_max": 80, "alpha_frac": 0.6280112877, "autogenerated": false, "ratio": 3.9411144930929525, "config_test": f...
import nose from os import path from pyffi.utils.withref import ref from pyffi.formats.nif import NifFormat from pyffi.utils.withref import ref from pyffi.formats.nif import NifFormat def n_create_bump_map_property(n_nitexturingproperty): """Adds a bumpmap texture to a NiTexturingProperty""" n_nitextur...
{ "repo_name": "nightstrike/blender_nif_plugin", "path": "testframework/integration/textures/bump/n_gen_bumpmap.py", "copies": "1", "size": "4435", "license": "bsd-3-clause", "hash": -753485111765886500, "line_mean": 43.35, "line_max": 104, "alpha_frac": 0.7289129454, "autogenerated": false, "rati...
import nose from pyffi.utils.withref import ref from pyffi.formats.nif import NifFormat def n_attach_specular_prop(n_trishapedata): '''Attaches a NiSpecularProperty to a trishapedata block property's array at pos[0]''' n_nispecularprop = NifFormat.NiSpecularProperty() n_nispecularprop.flags = 0x1 ...
{ "repo_name": "nightstrike/blender_nif_plugin", "path": "testframework/integration/property/specular/n_gen_specular.py", "copies": "1", "size": "2982", "license": "bsd-3-clause", "hash": -1866627550687699200, "line_mean": 39.2837837838, "line_max": 90, "alpha_frac": 0.7118416639, "autogenerated": f...
from setuptools import setup import os import platform requirements = list() requirements.append('numpy') long_description = ('Pika is a pure-Python implementation of the AMQP 0-9-1 ' 'protocol that tries to stay fairly independent of the ' 'underlying network support library....
{ "repo_name": "jamutton/pyjumphash", "path": "setup.py", "copies": "1", "size": "1586", "license": "apache-2.0", "hash": 6626148997818192000, "line_mean": 36.7619047619, "line_max": 78, "alpha_frac": 0.60592686, "autogenerated": false, "ratio": 4.357142857142857, "config_test": false, "has_no...
from __future__ import nested_scopes import os import sys RABBITMQ_PUBLIC_UMBRELLA = '../../rabbitmq-public-umbrella' RABBITMQ_CODEGEN = 'rabbitmq-codegen' PIKA_SPEC = '../pika/spec.py' CODEGEN_PATH = os.path.realpath('%s/%s' % (RABBITMQ_PUBLIC_UMBRELLA, RABBITMQ_CODEGEN))...
{ "repo_name": "reddec/pika", "path": "utils/codegen.py", "copies": "5", "size": "14858", "license": "bsd-3-clause", "hash": -3660623430679884300, "line_mean": 36.2380952381, "line_max": 109, "alpha_frac": 0.4672903486, "autogenerated": false, "ratio": 3.9130892810113247, "config_test": false, ...
import os import sys RABBITMQ_PUBLIC_UMBRELLA = '../../rabbitmq-public-umbrella' RABBITMQ_CODEGEN = 'rabbitmq-codegen' PIKA_SPEC = '../pika/spec.py' CODEGEN_PATH = os.path.realpath('%s/%s' % (RABBITMQ_PUBLIC_UMBRELLA, RABBITMQ_CODEGEN)) print('codegen-path: %s' % CODEGEN_...
{ "repo_name": "renshawbay/pika-python3", "path": "utils/codegen.py", "copies": "2", "size": "14691", "license": "mpl-2.0", "hash": 4555426273612755500, "line_mean": 37.3577023499, "line_max": 118, "alpha_frac": 0.4883261861, "autogenerated": false, "ratio": 3.779521481862619, "config_test": fal...
# NOTE: Autogenerated code by codegen.py, do not edit import struct from pika import amqp_object from pika import data from pika.compat import str_or_bytes, unicode_type str = bytes PROTOCOL_VERSION = (0, 9, 1) PORT = 5672 ACCESS_REFUSED = 403 CHANNEL_ERROR = 504 COMMAND_INVALID = 503 CONNECTION_FORCED = 320 CONT...
{ "repo_name": "vrtsystems/pika", "path": "pika/spec.py", "copies": "7", "size": "78652", "license": "bsd-3-clause", "hash": -2833658277288490000, "line_mean": 33.0190311419, "line_max": 255, "alpha_frac": 0.5520393633, "autogenerated": false, "ratio": 4.061554350632584, "config_test": false, ...
# NOTE: Autogenerated code by codegen.py, do not edit import struct from pika import amqp_object from pika import data PROTOCOL_VERSION = (0, 9, 1) PORT = 5672 ACCESS_REFUSED = 403 CHANNEL_ERROR = 504 COMMAND_INVALID = 503 CONNECTION_FORCED = 320 CONTENT_TOO_LARGE = 311 FRAME_BODY = 3 FRAME_END = 206 FRAME_END_SIZ...
{ "repo_name": "fkarb/pika-python3", "path": "pika/spec.py", "copies": "2", "size": "99653", "license": "mpl-2.0", "hash": -1918754071417200400, "line_mean": 34.3630234209, "line_max": 255, "alpha_frac": 0.5409771909, "autogenerated": false, "ratio": 4.185518081397791, "config_test": true, "ha...
try: import tornado.ioloop IOLoop = tornado.ioloop.IOLoop except ImportError: IOLoop = None from warnings import warn from pika.adapters.base_connection import BaseConnection # Redefine our constants with Tornado's if IOLoop: ERROR = tornado.ioloop.IOLoop.ERROR READ = tornado.ioloop.IOLoop.READ ...
{ "repo_name": "kaze/paasmaker", "path": "paasmaker/thirdparty/pika/tornado_connection.py", "copies": "2", "size": "2084", "license": "mpl-2.0", "hash": -7541573004603222000, "line_mean": 29.2028985507, "line_max": 70, "alpha_frac": 0.61756238, "autogenerated": false, "ratio": 4.43404255319149, ...
import os import racy import racy.renv as renv import racy.renv.target from os.path import join as opjoin from ide_project import IdeProject from dev_project import DevProject from wix_project import WixProject from cmake_project import CMakeProject from global_dico import * try: import mako except ImportError...
{ "repo_name": "cfobel/sconspiracy", "path": "Python/racy/plugins/templating/__init__.py", "copies": "1", "size": "3628", "license": "bsd-3-clause", "hash": -1119308581289322900, "line_mean": 28.4959349593, "line_max": 95, "alpha_frac": 0.5181918412, "autogenerated": false, "ratio": 3.876068376068...
import os import racy import racy.rlog as rlog import racy.rplugins as rplug from racy.renv import constants from racy.renv.options import get_option from racy.rproject.project import ConstructibleRacyProject, \ InstallableRacyProject from racy.rutils ...
{ "repo_name": "cfobel/sconspiracy", "path": "Python/racy/rproject/projectsdb.py", "copies": "1", "size": "7169", "license": "bsd-3-clause", "hash": -7730287345219897000, "line_mean": 29.900862069, "line_max": 78, "alpha_frac": 0.532291812, "autogenerated": false, "ratio": 3.7731578947368423, "c...
# ***** BEGIN LICENSE BLOCK ***** # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # ***** END LICENSE BLOCK ***** import json from mozharness.base import log from mozha...
{ "repo_name": "escapewindow/mozharness", "path": "mozharness/mozilla/structuredlog.py", "copies": "1", "size": "4816", "license": "mpl-2.0", "hash": 4425650834797516300, "line_mean": 34.9402985075, "line_max": 100, "alpha_frac": 0.5849252492, "autogenerated": false, "ratio": 3.65402124430956, "...
# ***** BEGIN LICENSE BLOCK ***** # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, # You can obtain one at http://mozilla.org/MPL/2.0/. # ***** END LICENSE BLOCK ***** """ Exceptions """ from configparser import Error c...
{ "repo_name": "mozilla-services/shavar", "path": "mozsvc/exceptions.py", "copies": "1", "size": "3534", "license": "mpl-2.0", "hash": -3620302111493889000, "line_mean": 32.6571428571, "line_max": 78, "alpha_frac": 0.6239388795, "autogenerated": false, "ratio": 4.099767981438515, "config_test": ...
# ***** BEGIN LICENSE BLOCK ***** # Version: MPL 1.1/GPL 2.0/LGPL 2.1 # # The contents of this file are subject to the Mozilla Public License # Version 1.1 (the "License"); you may not use this file except in # compliance with the License. You may obtain a copy of the License at # http://www.mozilla.org/MPL/ # # Softwa...
{ "repo_name": "anisku11/sublimeku", "path": "Packages/CodeComplice/CodeComplice.py", "copies": "1", "size": "67898", "license": "mit", "hash": -2834201108391473700, "line_mean": 36.9888080582, "line_max": 172, "alpha_frac": 0.5635771735, "autogenerated": false, "ratio": 3.833418036026879, "conf...
# ***** BEGIN LICENSE BLOCK ***** # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # ***** END LICENSE BLOCK ***** # This is a template config file for web-platfor...
{ "repo_name": "cstipkovic/spidermonkey-research", "path": "testing/mozharness/configs/web_platform_tests/prod_config_windows.py", "copies": "1", "size": "1629", "license": "mpl-2.0", "hash": -5910955413355778000, "line_mean": 31.9375, "line_max": 84, "alpha_frac": 0.5825659914, "autogenerated": fal...
from __future__ import absolute_import import logging from cliff.command import Command from ..exc import * class EndpointCreate(Command): log = logging.getLogger(__name__) def get_parser(self, prog_name): parser = super(EndpointCreate, self).get_parser(prog_name) parser.add_argument('-...
{ "repo_name": "shakamunyi/crux", "path": "crux/commands/endpoint_create.py", "copies": "2", "size": "4424", "license": "apache-2.0", "hash": -6809702542268644000, "line_mean": 34.6774193548, "line_max": 75, "alpha_frac": 0.5332278481, "autogenerated": false, "ratio": 4.574974146845915, "config_...
from __future__ import absolute_import import logging from cliff.command import Command from ..exc import * class TenantCreate(Command): log = logging.getLogger(__name__) def get_parser(self, prog_name): parser = super(TenantCreate, self).get_parser(prog_name) parser.add_argument('--ten...
{ "repo_name": "shakamunyi/crux", "path": "crux/commands/tenant_create.py", "copies": "2", "size": "2798", "license": "apache-2.0", "hash": -2808270090605204000, "line_mean": 33.5432098765, "line_max": 78, "alpha_frac": 0.5639742673, "autogenerated": false, "ratio": 4.520193861066236, "config_te...
from __future__ import absolute_import import logging from cliff.lister import Lister from ..exc import * class EndpointList(Lister): log = logging.getLogger(__name__) def get_parser(self, prog_name): parser = super(EndpointList, self).get_parser(prog_name) parser.add_argument('--endpoin...
{ "repo_name": "larsks/crux", "path": "crux/commands/endpoint_list.py", "copies": "2", "size": "2117", "license": "apache-2.0", "hash": 578946522046975700, "line_mean": 32.6031746032, "line_max": 74, "alpha_frac": 0.5838450638, "autogenerated": false, "ratio": 4.3028455284552845, "config_test": ...
from __future__ import absolute_import import logging import random import string from cliff.command import Command from ..exc import * class UserCreate(Command): log = logging.getLogger(__name__) def get_parser(self, prog_name): parser = super(UserCreate, self).get_parser(prog_name) pa...
{ "repo_name": "larsks/crux", "path": "crux/commands/user_create.py", "copies": "2", "size": "6240", "license": "apache-2.0", "hash": -5992148720337137000, "line_mean": 35.0693641618, "line_max": 77, "alpha_frac": 0.5200320513, "autogenerated": false, "ratio": 4.3153526970954355, "config_test": ...
import os import sys import logging from cliff.app import App from cliff.commandmanager import CommandManager import keystoneclient.v2_0.client as ksclient import crux.commands.user_list import crux.commands.user_create import crux.commands.endpoint_list import crux.commands.endpoint_create import crux.commands.te...
{ "repo_name": "shakamunyi/crux", "path": "crux/main.py", "copies": "2", "size": "3847", "license": "apache-2.0", "hash": -2126379998463591400, "line_mean": 33.3482142857, "line_max": 74, "alpha_frac": 0.6095658955, "autogenerated": false, "ratio": 4.053740779768177, "config_test": false, "has...
from google.appengine.ext.webapp import template from django import template as django_template import urlparse register = template.create_template_register() @register.simple_tag def latlon360(latitude, longitude): return '%0.2f&#176;%s %0.2f&#176;E' % (abs(latitude), 'NS'[latitude<0], longitude%360) class Bal...
{ "repo_name": "deleted/kml-layer-manager", "path": "layermanager/template_functions/kml_util.py", "copies": "1", "size": "1596", "license": "apache-2.0", "hash": 6924195749071499000, "line_mean": 36.1162790698, "line_max": 114, "alpha_frac": 0.6766917293, "autogenerated": false, "ratio": 3.773049...
import collections import threading import Queue KEY, PREV, NEXT = range(3) class OrderedSet(collections.MutableSet): def __init__(self, iterable=None): self.end = end = [] end += [None, end, end] # sentinel node for doubly linked list self.map = {} # key --> [...
{ "repo_name": "NeoGeographyToolkit/StereoPipeline", "path": "graveyard/ngt_utils/containers.py", "copies": "5", "size": "3668", "license": "apache-2.0", "hash": -4453411795122952700, "line_mean": 28.1111111111, "line_max": 111, "alpha_frac": 0.5485278081, "autogenerated": false, "ratio": 3.973997...
import layermanager_client as lmc import inspect _cms_client = None def get_default_client(): from config import cms_connection_options global _cms_client if not _cms_client: _cms_client = lmc.LayersManagerClient(*cms_connection_options) return _cms_client class MissingPropertyError(Exception...
{ "repo_name": "deleted/kml-layer-manager", "path": "client/layers.py", "copies": "1", "size": "7490", "license": "apache-2.0", "hash": 2082560075387783000, "line_mean": 34.3301886792, "line_max": 137, "alpha_frac": 0.5833110814, "autogenerated": false, "ratio": 4.026881720430108, "config_test":...
import sys import math import numpy def w2e_deg(lon): '''Convert positive-west longitude to positive-east in the range [-180,180).''' lon = -lon if lon >= 180: lon -= 360 if lon <= -180: lon += 360 return lon def pm180(lon): '''Convert latitudes to the range [-180,180).''' ...
{ "repo_name": "NeoGeographyToolkit/StereoPipeline", "path": "graveyard/ngt_utils/lonlat.py", "copies": "5", "size": "4499", "license": "apache-2.0", "hash": 6341255974838368000, "line_mean": 36.4916666667, "line_max": 100, "alpha_frac": 0.6072460547, "autogenerated": false, "ratio": 2.71351025331...
import threading import math import os, os.path, sys import time import datetime import urllib2 import json import random import socket import re ############################################################################## # # # Kivy ...
{ "repo_name": "chaeron/thermostat", "path": "thermostat.py", "copies": "1", "size": "56241", "license": "mit", "hash": 9155351075929799000, "line_mean": 38.3568929321, "line_max": 217, "alpha_frac": 0.5856759304, "autogenerated": false, "ratio": 3.2692553624367844, "config_test": false, "has_...
import os import traceback from geocamUtil.management import commandUtil from geocamUtil.management.commandUtil import getSiteDir, dosys from basaltApp.models import Element from adaptor.model import CsvDbModel class ElementCsvModel(CsvDbModel): class Meta: dbModel = Element delimiter = "\t" cla...
{ "repo_name": "xgds/xgds_basalt", "path": "apps/basaltApp/management/commands/prepelements.py", "copies": "1", "size": "1425", "license": "apache-2.0", "hash": -7384413797960320000, "line_mean": 35.5384615385, "line_max": 132, "alpha_frac": 0.6371929825, "autogenerated": false, "ratio": 4.0830945...
from django.utils import timezone from django.db import models from django.db.models import Max from django.conf import settings from django.core.exceptions import ObjectDoesNotExist from django.core.urlresolvers import reverse from geocamUtil.models.AbstractEnum import AbstractEnumModel from geocamUtil.UserUtil impo...
{ "repo_name": "xgds/xgds_sample", "path": "xgds_sample/models.py", "copies": "1", "size": "15237", "license": "apache-2.0", "hash": 8507165502816877000, "line_mean": 36.2542787286, "line_max": 177, "alpha_frac": 0.6070092538, "autogenerated": false, "ratio": 4.199834619625138, "config_test": fa...
from django import template from django.core.urlresolvers import reverse from django.utils.safestring import mark_safe register = template.Library() @register.simple_tag(name='typeahead') def typeahead(url, input_id): result = (''' <script type="text/javascript"> var theInput = $('#%(input_id)s'); theInpu...
{ "repo_name": "xgds/xgds_core", "path": "xgds_core/templatetags/typeahead.py", "copies": "1", "size": "3135", "license": "apache-2.0", "hash": -3292251579732041700, "line_mean": 42.5555555556, "line_max": 110, "alpha_frac": 0.5435406699, "autogenerated": false, "ratio": 4.2422192151556155, "con...
from __future__ import division import httplib import json import logging import os import datetime import calendar import m3u8 import zmq from django.shortcuts import render from django.shortcuts import redirect from django.contrib import messages from django.contrib.auth.models import User from geocamUtil import d...
{ "repo_name": "xgds/xgds_video", "path": "xgds_video/views.py", "copies": "1", "size": "31416", "license": "apache-2.0", "hash": -8686055453818230000, "line_mean": 39.0714285714, "line_max": 187, "alpha_frac": 0.6535204991, "autogenerated": false, "ratio": 3.8958333333333335, "config_test": fal...
import datetime from django import forms from django.conf import settings from geocamUtil.extFileField import ExtFileField from xgds_planner2.models import getPlanSchema class CreatePlanForm(forms.Form): planNumber = forms.IntegerField(label=settings.XGDS_PLANNER_PLAN_MONIKER + ' number') planVersion = form...
{ "repo_name": "xgds/xgds_planner2", "path": "xgds_planner2/forms.py", "copies": "1", "size": "2868", "license": "apache-2.0", "hash": -6978860585691978000, "line_mean": 41.1764705882, "line_max": 145, "alpha_frac": 0.6886331939, "autogenerated": false, "ratio": 3.8756756756756756, "config_test"...
import datetime import json import pandas as pd import pytz import httplib from django.http import HttpResponse from django.shortcuts import render, get_object_or_404 from django.conf import settings from xgds_instrument.forms import ImportInstrumentDataForm from requests.api import request from django.core.urlresolve...
{ "repo_name": "xgds/xgds_instrument", "path": "xgds_instrument/views.py", "copies": "1", "size": "6157", "license": "apache-2.0", "hash": -3669720795208453600, "line_mean": 40.0466666667, "line_max": 126, "alpha_frac": 0.6319636186, "autogenerated": false, "ratio": 4.523879500367377, "config_te...
import httplib import pytz import json import os import traceback import time from datetime import datetime from dateutil.parser import parse as dateparser from threading import Thread from threading import Timer import requests from django.conf import settings from django.contrib import messages from django.contrib...
{ "repo_name": "xgds/xgds_image", "path": "xgds_image/views.py", "copies": "1", "size": "41028", "license": "apache-2.0", "hash": -8294325034175063000, "line_mean": 42.0514165792, "line_max": 147, "alpha_frac": 0.6226235741, "autogenerated": false, "ratio": 4.186530612244898, "config_test": fals...
import json from django.contrib.auth.models import User from django.utils.decorators import classonlymethod from django.http.response import HttpResponse from django.views.generic.list import BaseListView from dal.autocomplete import Select2QuerySetView from geocamUtil.loader import getModelByName, getClassByName from ...
{ "repo_name": "xgds/xgds_core", "path": "xgds_core/typeahead.py", "copies": "1", "size": "3646", "license": "apache-2.0", "hash": -8941272359408433000, "line_mean": 37.7872340426, "line_max": 99, "alpha_frac": 0.655787164, "autogenerated": false, "ratio": 4.1431818181818185, "config_test": fals...
import re import datetime import pytz from dateutil.parser import parse as dateparser import copy import logging import os from django.contrib.contenttypes.fields import GenericRelation from django.db import models from django.conf import settings from django.contrib.auth.models import User from django.core.urlresolv...
{ "repo_name": "xgds/xgds_planner2", "path": "xgds_planner2/models.py", "copies": "1", "size": "15173", "license": "apache-2.0", "hash": 6457672143732790000, "line_mean": 37.8056265985, "line_max": 122, "alpha_frac": 0.6263098926, "autogenerated": false, "ratio": 4.086453002962564, "config_test"...
import requests import datetime import json import pytz from django.test import TestCase HTTP_PREFIX = 'https' URL_PREFIX = 'xgds-local.xgds.org' def test_set(): url = "%s://%s%s" % (HTTP_PREFIX, URL_PREFIX, '/xgds_core/condition/set/') nowtime = datetime.datetime.now(pytz.utc) isonow = nowtime.isoformat...
{ "repo_name": "xgds/xgds_basalt", "path": "apps/basaltApp/tests.py", "copies": "1", "size": "10205", "license": "apache-2.0", "hash": -2195301066744851500, "line_mean": 44.7623318386, "line_max": 98, "alpha_frac": 0.5736403724, "autogenerated": false, "ratio": 3.8523971309928275, "config_test":...
import time import pytz import traceback import os import json import datetime from django.db import models from django.contrib.auth.models import User from django.conf import settings from django.utils import timezone from django.core.exceptions import ObjectDoesNotExist from django.core.urlresolvers import reverse fr...
{ "repo_name": "xgds/xgds_basalt", "path": "apps/basaltApp/models.py", "copies": "1", "size": "46614", "license": "apache-2.0", "hash": 8948211123721582000, "line_mean": 37.8773978315, "line_max": 158, "alpha_frac": 0.5839876432, "autogenerated": false, "ratio": 4.150106837606837, "config_test":...
import traceback import json import datetime import csv from collections import deque from django.http import HttpResponse, HttpResponseRedirect from django.core.urlresolvers import reverse from django.contrib.auth.models import User from cStringIO import StringIO import pytz import spc # library for reading SPC for...
{ "repo_name": "xgds/xgds_basalt", "path": "apps/basaltApp/instrumentDataImporters.py", "copies": "1", "size": "17423", "license": "apache-2.0", "hash": 6436486621060891, "line_mean": 37.8040089087, "line_max": 166, "alpha_frac": 0.5804396487, "autogenerated": false, "ratio": 4.5020671834625325, ...
import traceback import json import os from pextant.api import Pathfinder from pextant.explorers import Astronaut from pextant.lib.geoshapely import GeoPoint, GeoEnvelope, LAT_LONG from pextant.EnvironmentalModel import loadElevationMap class SettingsTest: def __init__(self, root): self.DATA_ROOT = root s...
{ "repo_name": "kezilu/pextant", "path": "pextant/api_future/pextantHarness.py", "copies": "2", "size": "4783", "license": "mit", "hash": -7714380829510355000, "line_mean": 34.6940298507, "line_max": 109, "alpha_frac": 0.6383023207, "autogenerated": false, "ratio": 3.9398682042833606, "config_te...
import traceback import logging import json import os from django.conf import settings from pextant.api import Pathfinder from pextant.explorers import Astronaut from pextant.lib.geoshapely import GeoPoint, GeoEnvelope, LAT_LONG from pextant.EnvironmentalModel import loadElevationMap def getCornersForMap(extent, zon...
{ "repo_name": "xgds/xgds_basalt", "path": "apps/basaltApp/pextantHarness.py", "copies": "1", "size": "4806", "license": "apache-2.0", "hash": -7657594085912362000, "line_mean": 35.6870229008, "line_max": 113, "alpha_frac": 0.6312942156, "autogenerated": false, "ratio": 4.008340283569641, "confi...
class DbRouter(object): def db_for_read(self, model, **hints): if model._meta.db_table == 'StatusBoard_Announcement' or \ model._meta.db_table == 'StatusBoard_Event' or \ model._meta.db_table == 'StatusBoard_PlanStatus': # print "Select GDS Ops DB read" ...
{ "repo_name": "xgds/xgds_status_board", "path": "xgds_status_board/dbrouter.py", "copies": "1", "size": "2204", "license": "apache-2.0", "hash": 4053283002285874700, "line_mean": 41.3846153846, "line_max": 83, "alpha_frac": 0.6188747731, "autogenerated": false, "ratio": 3.887125220458554, "conf...
from collections import OrderedDict import traceback import json import types from datetime import timedelta from dateutil.parser import parse as dateparser from inspect import getargspec from django.utils import timezone from django.db import models from django.db.models import Q from django.conf import settings fro...
{ "repo_name": "xgds/xgds_core", "path": "xgds_core/models.py", "copies": "1", "size": "46592", "license": "apache-2.0", "hash": -1251208284962292200, "line_mean": 34.1107761869, "line_max": 142, "alpha_frac": 0.6054258242, "autogenerated": false, "ratio": 4.155547627541919, "config_test": false...
from datetime import datetime import pytz from django.utils import timezone from django.db import models from django.contrib.auth.models import User from django.http import HttpRequest from django.contrib.contenttypes.models import ContentType from django.core.urlresolvers import reverse try: from django.contrib....
{ "repo_name": "xgds/xgds_data", "path": "xgds_data/models.py", "copies": "1", "size": "14471", "license": "apache-2.0", "hash": -2248382013345458000, "line_mean": 36.2005141388, "line_max": 128, "alpha_frac": 0.6057632506, "autogenerated": false, "ratio": 4.23376243417203, "config_test": false,...
from datetime import datetime import qrcode import textwrap import os from fpdf import Template from django.conf import settings from xgds_sample import labelTemplates from geocamUtil.loader import LazyGetModelByName SAMPLE_MODEL = LazyGetModelByName(settings.XGDS_SAMPLE_SAMPLE_MODEL) def generateMultiPDF(sampleLa...
{ "repo_name": "xgds/xgds_sample", "path": "xgds_sample/labels.py", "copies": "1", "size": "4546", "license": "apache-2.0", "hash": -6057260693754467000, "line_mean": 36.2704918033, "line_max": 113, "alpha_frac": 0.6174659041, "autogenerated": false, "ratio": 3.9947275922671355, "config_test": f...
from datetime import timedelta import logging import os import stat import traceback import time from django.utils import timezone from django.conf import settings from django.db.models.aggregates import Max from geocamPycroraptor2.views import getPyraptordClient, stopPyraptordServiceIfRunning from geocamUtil.load...
{ "repo_name": "xgds/xgds_video", "path": "xgds_video/recordingUtil.py", "copies": "1", "size": "12816", "license": "apache-2.0", "hash": -1084174442597597800, "line_mean": 38.5555555556, "line_max": 221, "alpha_frac": 0.6594881398, "autogenerated": false, "ratio": 3.962894248608534, "config_tes...
from django.conf import settings from geocamUtil import loader class ExporterInfo(object): def __init__(self, formatCode, extension, exporterClass, customLabel=None): self.formatCode = formatCode self.extension = extension self.exporterClass = exporterClass if customLabel: ...
{ "repo_name": "xgds/xgds_planner2", "path": "xgds_planner2/choosePlanExporter.py", "copies": "1", "size": "1880", "license": "apache-2.0", "hash": 2345647354644928000, "line_mean": 38.1666666667, "line_max": 83, "alpha_frac": 0.6904255319, "autogenerated": false, "ratio": 3.9495798319327733, "c...
from django.conf.urls import url, include from django.conf import settings from django.contrib.auth.views import login from django.contrib import auth from django.views.generic import RedirectView, TemplateView from django.contrib import admin admin.autodiscover() from basaltApp.views import wrist, editInstrumentDat...
{ "repo_name": "xgds/xgds_basalt", "path": "urls.py", "copies": "1", "size": "2853", "license": "apache-2.0", "hash": 4914701714708150000, "line_mean": 51.8333333333, "line_max": 140, "alpha_frac": 0.6410795654, "autogenerated": false, "ratio": 3.6955958549222796, "config_test": false, "has_no...