text
stringlengths
0
1.05M
meta
dict
"""Assertions related to logical operations. """ import pydash from .base import Assertion, Comparator, Negate __all__ = ( 'Truthy', 'Falsy', 'Not', 'Predicate', 'All', 'NotAll', 'Any', 'NotAny', ) class Truthy(Assertion): """Asserts that `value` is truthy. Aliases: ...
{ "repo_name": "dgilland/verify", "path": "verify/logic.py", "copies": "1", "size": "4500", "license": "mit", "hash": 5598259363816018000, "line_mean": 18.9115044248, "line_max": 79, "alpha_frac": 0.5484444444, "autogenerated": false, "ratio": 3.5183737294761532, "config_test": false, "has_no_...
"""Assertions related to numbers. """ import operator import pydash from .base import Assertion, Comparator, Negate, NotSet __all__ = ( 'Greater', 'GreaterThan', 'GreaterEqual', 'GreaterOrEqual', 'Less', 'LessThan', 'LessEqual', 'LessOrEqual', 'Between', 'NotBetween', 'P...
{ "repo_name": "dgilland/verify", "path": "verify/numbers.py", "copies": "1", "size": "7662", "license": "mit", "hash": -8531949127484391000, "line_mean": 19.7642276423, "line_max": 79, "alpha_frac": 0.5894022448, "autogenerated": false, "ratio": 3.341474051460968, "config_test": false, "has_n...
assert not __debug__ # Run with -OO from panda3d.core import * from collections import OrderedDict import subprocess, glob, sys, os import niraimarshal import aes SOURCE_ROOT = os.path.dirname(os.path.abspath(__file__)) NIRAI_ROOT = os.path.abspath(os.path.join(SOURCE_ROOT, '..')) PYTHON_ROOT = os.path.join(NIRAI_R...
{ "repo_name": "sctigercat1/src", "path": "niraitools.py", "copies": "1", "size": "12905", "license": "bsd-3-clause", "hash": -7961749429924829000, "line_mean": 34.0679347826, "line_max": 135, "alpha_frac": 0.580705153, "autogenerated": false, "ratio": 3.399631190727081, "config_test": false, ...
# assert repeated exports of the same plot produce the same output file import subprocess import sys import tempfile # We create the tikz files in separate subprocesses, as when producing those in # the same process, the order of axis parameters is deterministic. plot_code = """ import sys import numpy as np from mat...
{ "repo_name": "m-rossi/matplotlib2tikz", "path": "test/test_deterministic_output.py", "copies": "1", "size": "1525", "license": "mit", "hash": 7901895924169194000, "line_mean": 28.3269230769, "line_max": 79, "alpha_frac": 0.5718032787, "autogenerated": false, "ratio": 3.7195121951219514, "confi...
import re import stat from nose.tools import ( assert_equal, assert_not_equal, assert_raises, raises, assert_true, assert_false ) from mock import patch __all__ = ['assert_instance_of', 'assert_not_instance_of', 'assert_none', 'assert_not_none', 'assert_match', 'assert_...
{ "repo_name": "StyXman/GitPython", "path": "git/test/lib/asserts.py", "copies": "14", "size": "2048", "license": "bsd-3-clause", "hash": 5544488482593953000, "line_mean": 29.1176470588, "line_max": 110, "alpha_frac": 0.6625976562, "autogenerated": false, "ratio": 3.2979066022544283, "config_tes...
import re import stat from nose.tools import ( assert_equal, # @UnusedImport assert_not_equal, # @UnusedImport assert_raises, # @UnusedImport raises, # @UnusedImport assert_true, # @UnusedImport assert_false # @UnusedImport ) try: from unittest.mock ...
{ "repo_name": "jeblair/GitPython", "path": "git/test/lib/asserts.py", "copies": "6", "size": "2273", "license": "bsd-3-clause", "hash": -7670994152401468000, "line_mean": 31.014084507, "line_max": 110, "alpha_frac": 0.6572811263, "autogenerated": false, "ratio": 3.37741456166419, "config_test":...
import re import unittest from nose import tools from nose.tools import * __all__ = ['assert_instance_of', 'assert_not_instance_of', 'assert_none', 'assert_not_none', 'assert_match', 'assert_not_match'] + tools.__all__ def assert_instance_of(expected, actual, msg=None): """Verify that obje...
{ "repo_name": "directeur/git-python", "path": "test/testlib/asserts.py", "copies": "1", "size": "1315", "license": "bsd-3-clause", "hash": 5967770841612742000, "line_mean": 33.6315789474, "line_max": 70, "alpha_frac": 0.6942965779, "autogenerated": false, "ratio": 3.573369565217391, "config_tes...
"""Asserts to use in energy tests.""" from physalia.models import Measurement def consumption_below(sample, energy_consumption_baseline): """Test for energy consumption lower than a given value in Joules (avg). Args: sample (list of Measurement): sample of measurements energy_consumption (num...
{ "repo_name": "TQRG/physalia", "path": "physalia/asserts.py", "copies": "1", "size": "1844", "license": "mit", "hash": 7109295954098101000, "line_mean": 39.0869565217, "line_max": 88, "alpha_frac": 0.6849240781, "autogenerated": false, "ratio": 4.288372093023256, "config_test": false, "has_no...
"""Assert that arguments meet specific criteria This module organizes functions that assert whether a criteria for their arguments is met. All functions within this module raise one or more errors on certain conditions not being bet. If the assertion is met, the functions will return True """ import shutil import os ...
{ "repo_name": "pappasam/latexbuild", "path": "latexbuild/assertions.py", "copies": "1", "size": "2253", "license": "mit", "hash": -1703761920197350400, "line_mean": 34.7619047619, "line_max": 75, "alpha_frac": 0.6813138038, "autogenerated": false, "ratio": 4.141544117647059, "config_test": fals...
# Assess graph connectivity in terms of a threshold distance (edge # weight) or sequence of these, to look at how a graph connects # as the threshold distance is systematically increased. # # Contains 4 functions, as they would be used in sequence, # along with some helper functions. # # THIS VERSION IS FOR ...
{ "repo_name": "Duke-NSOE/GeoHAT", "path": "GeoHat_V10/Scripts/DU_GraphTools99.py", "copies": "1", "size": "8152", "license": "cc0-1.0", "hash": 6811382821546239000, "line_mean": 29.6466165414, "line_max": 75, "alpha_frac": 0.6225466143, "autogenerated": false, "ratio": 3.4852501068832833, "conf...
"""Assessment Engine API view functions""" from datetime import datetime from flask import ( Blueprint, abort, current_app, flash, jsonify, redirect, request, session, url_for, ) from flask_babel import gettext as _ from flask_user import roles_required import jsonschema import requ...
{ "repo_name": "uwcirg/true_nth_usa_portal", "path": "portal/views/assessment_engine.py", "copies": "1", "size": "75011", "license": "bsd-3-clause", "hash": -78243782092636270, "line_mean": 36.9802531646, "line_max": 154, "alpha_frac": 0.5310021197, "autogenerated": false, "ratio": 4.6254547696861...
" assess mesh quality of howorka geometry and how it changes with uniform refinement and snapping " from nanopores import * from nanopores.geometries.curved import Cylinder, Sphere, Circle from dolfin import * from matplotlib import pyplot geo_name = "H_cyl_geo" nm = import_vars("nanopores.geometries.%s.params_geo" %...
{ "repo_name": "mitschabaude/nanopores", "path": "scripts/numerics/H3Drefine.py", "copies": "1", "size": "3496", "license": "mit", "hash": 6749357663890491000, "line_mean": 30.7818181818, "line_max": 99, "alpha_frac": 0.6287185355, "autogenerated": false, "ratio": 3.110320284697509, "config_test...
"""Assess phenotype recall relative to known HPO-PMID map.""" import collections import random import sys sys.path.append('../code') import extractor_util as util import data_util as dutil NUM_ERRORS_TO_SAMPLE = 50 def main(id_file, candidate_file): # Load list of all pubmed IDs in the dataset print >> sys.stder...
{ "repo_name": "HazyResearch/dd-genomics", "path": "eval/pheno_recall.py", "copies": "1", "size": "3975", "license": "apache-2.0", "hash": 8585529978542728000, "line_mean": 34.8108108108, "line_max": 118, "alpha_frac": 0.6500628931, "autogenerated": false, "ratio": 2.853553481694185, "config_tes...
"""Assess the accuracy of the reference values using the Wronskian relations. This follows the methodology of Liang-Wu Cai (2011), eqs. (9) and (10). It should give me more confidence in the reference values. At the moment, I only implement a single Wronskian relation (between jn and yn), but once the code is vetted ...
{ "repo_name": "tpudlik/sbf", "path": "reference/wronskian.py", "copies": "1", "size": "3646", "license": "mit", "hash": -8244892156947000000, "line_mean": 29.3833333333, "line_max": 98, "alpha_frac": 0.607515085, "autogenerated": false, "ratio": 3.095076400679117, "config_test": false, "has_n...
"""Assess transcript abundance in RNA-seq experiments using Cufflinks. http://cufflinks.cbcb.umd.edu/manual.html """ import os import shutil import tempfile import pandas as pd from bcbio import bam from bcbio.utils import get_in, file_exists, safe_makedir from bcbio.distributed.transaction import file_transaction fro...
{ "repo_name": "vladsaveliev/bcbio-nextgen", "path": "bcbio/rnaseq/cufflinks.py", "copies": "4", "size": "10844", "license": "mit", "hash": 1915336726007167700, "line_mean": 39.920754717, "line_max": 91, "alpha_frac": 0.609738104, "autogenerated": false, "ratio": 3.4079195474544313, "config_test...
"""Assess transcript abundance in RNA-seq experiments using Cufflinks. http://cufflinks.cbcb.umd.edu/manual.html """ import os import tempfile from bcbio.utils import get_in, file_exists, safe_makedir from bcbio.distributed.transaction import file_transaction from bcbio.pipeline import config_utils from bcbio.provena...
{ "repo_name": "SciLifeLab/bcbio-nextgen", "path": "bcbio/rnaseq/cufflinks.py", "copies": "1", "size": "10133", "license": "mit", "hash": -382943128400980350, "line_mean": 41.3974895397, "line_max": 91, "alpha_frac": 0.6129477943, "autogenerated": false, "ratio": 3.3923669233344493, "config_test...
# asset class import os, sys, pygame from logging import debug, info, warn tile_size = 16 class Assets: def __init__(self, data_dir='data', data_file='data/assets.txt'): self.data_dir = data_dir self.data_file = data_file self._assets = {} def load_all(self): # load a...
{ "repo_name": "SafPlusPlus/pyweek19", "path": "pw19/assets.py", "copies": "1", "size": "1566", "license": "apache-2.0", "hash": 3407339189766433000, "line_mean": 36.3095238095, "line_max": 127, "alpha_frac": 0.4872286079, "autogenerated": false, "ratio": 3.9645569620253163, "config_test": false...
"""assethub URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-b...
{ "repo_name": "portnov/assethub", "path": "assethub/assethub/urls.py", "copies": "1", "size": "1918", "license": "bsd-3-clause", "hash": -3170563905660059600, "line_mean": 50.8378378378, "line_max": 121, "alpha_frac": 0.712721585, "autogenerated": false, "ratio": 3.5650557620817844, "config_tes...
# Asset import : Assimp library # from pyassimp import pyassimp from ctypes import * import cPickle import logging from pogle_math import Matrix4x4, AABB, Vector, Transform from pogle_scene import SceneNode from pogle_bufferobject import BufferObject from pogle_opengl import * from pogle_stats import Stats...
{ "repo_name": "clems71/pogle", "path": "pogle/pogle_mesh.py", "copies": "1", "size": "10505", "license": "mit", "hash": 4080257619794925000, "line_mean": 27.7592067989, "line_max": 136, "alpha_frac": 0.541170871, "autogenerated": false, "ratio": 3.5828785811732606, "config_test": false, "has_...
"""Asset Item Dialog""" import logging import sys from PyQt5 import QtWidgets import ui.functions from config import configurations from database.db import Database from helpers.functions import ham from ui.window.ui_asset_item import ( Ui_AssetItemDialog, ) logger = logging.getLogger(__name__) class AssetItem...
{ "repo_name": "hueyyeng/AssetsBrowser", "path": "ui/dialog/asset_item.py", "copies": "1", "size": "1716", "license": "mit", "hash": 8341241874736016000, "line_mean": 28.5862068966, "line_max": 79, "alpha_frac": 0.668997669, "autogenerated": false, "ratio": 3.926773455377574, "config_test": fals...
"""Asset Item Format Dialog""" import logging import sys from PyQt5 import QtWidgets import ui.functions from database.db import Database from helpers.functions import ham from ui.window.ui_asset_item_format import ( Ui_AssetItemFormatDialog, ) logger = logging.getLogger(__name__) class AssetItemFormatDialog(Q...
{ "repo_name": "hueyyeng/AssetsBrowser", "path": "ui/dialog/asset_item_format.py", "copies": "1", "size": "1086", "license": "mit", "hash": -2140980871963230200, "line_mean": 25.487804878, "line_max": 73, "alpha_frac": 0.6887661142, "autogenerated": false, "ratio": 3.719178082191781, "config_tes...
#Asset LOAN_PORTFOLIO_CONTROL_ACCOUNT = "14100000" LOAN_FUND_SOURCE = "11220000" LOANS_RECOVERED = "14400000" LOAN_ALLOWANCE_FOR_LOSS_ACCOUNT = "14300000" #Income Receivable LOAN_INCOME_RECEIVABLE_ACCOUNT = "15100000" INTEREST_INCOME_RECEIVABLE_ACCOUNT = "15110000" FEE_INCOME_RECEIVABLE_ACCOUNT = "15120000" PENALTY_INC...
{ "repo_name": "AjabWorld/ajabsacco", "path": "ajabsacco/core/codes/loans.py", "copies": "1", "size": "1701", "license": "apache-2.0", "hash": 7722886778613149000, "line_mean": 31.7115384615, "line_max": 72, "alpha_frac": 0.7589653145, "autogenerated": false, "ratio": 2.62095531587057, "config_t...
ASSET_PATH = "__assets" SEARCH_INDEX_PATH = "__bock_search_index" # Give the "/" of the article root a special name ROOT_NAME = "ROOT" MARKDOWN_FILE_EXTENSION = "md" ABBREVIATED_SHA_SIZE = 8 MAX_LENGTH_OF_LATEST_ARTICLES = 10 MAX_DEPTH_OF_FOLDERS = 3 WORDS_IN_EXCERPT = 64 # Search MAX_SEARCH_RESULTS = 100 MAX_CHARS_...
{ "repo_name": "afreeorange/bock", "path": "bock/constants.py", "copies": "1", "size": "2689", "license": "mit", "hash": 4135760028740059000, "line_mean": 23.4454545455, "line_max": 79, "alpha_frac": 0.6578653775, "autogenerated": false, "ratio": 2.935589519650655, "config_test": false, "has_n...
"""Assets Browser Custom Widgets""" import logging import platform from pathlib import Path from PyQt5 import QtCore, QtGui, QtWidgets from config.configurations import get_setting from config.constants import IMAGE_FORMAT from helpers.enums import FileManager from helpers.utils import get_file_size, open_file, revea...
{ "repo_name": "hueyyeng/AssetsBrowser", "path": "helpers/widgets.py", "copies": "1", "size": "7421", "license": "mit", "hash": -1376616365287477200, "line_mean": 40, "line_max": 99, "alpha_frac": 0.6534159817, "autogenerated": false, "ratio": 3.8391101914123125, "config_test": false, "has_no_...
"""Assets can be filtered through one or multiple filters, modifying their contents (think minification, compression). """ from __future__ import with_statement import os import subprocess import inspect import shlex import tempfile from .. import six from ..six.moves import map from ..six.moves import zip try: f...
{ "repo_name": "gi0baro/weppy-assets", "path": "weppy_assets/webassets/filter/__init__.py", "copies": "1", "size": "24918", "license": "bsd-3-clause", "hash": 248853785013087680, "line_mean": 35.3766423358, "line_max": 81, "alpha_frac": 0.5971586805, "autogenerated": false, "ratio": 4.557892811413...
"""Assets can be filtered through one or multiple filters, modifying their contents (think minification, compression). """ from __future__ import with_statement import os, subprocess import inspect import shlex import tempfile try: frozenset except NameError: from sets import ImmutableSet as frozenset from we...
{ "repo_name": "torchbox/webassets", "path": "src/webassets/filter/__init__.py", "copies": "1", "size": "22108", "license": "bsd-2-clause", "hash": -6268759008490456000, "line_mean": 35.8466666667, "line_max": 83, "alpha_frac": 0.5933598697, "autogenerated": false, "ratio": 4.585770587015142, "c...
"""Assets can be filtered through one or multiple filters, modifying their contents (think minification, compression). """ import os, re import inspect __all__ = ('Filter', 'CallableFilter', 'get_filter', 'register_filter',) class NameGeneratingMeta(type): """Metaclass that will generate a "name" a...
{ "repo_name": "rs/webassets", "path": "src/webassets/filter/__init__.py", "copies": "1", "size": "8215", "license": "bsd-2-clause", "hash": -2822253581852480000, "line_mean": 30.9919678715, "line_max": 83, "alpha_frac": 0.5776019477, "autogenerated": false, "ratio": 4.683580387685291, "config_t...
# Asset selection window from gi.repository import Gtk, Gdk class AssetSelectionWindow(Gtk.Window): def __init__(self, parent): Gtk.Window.__init__(self, title="Select Asset") self.parent = parent self.set_keep_above(True) self.set_border_width(5) self.set_position(Gtk.Wi...
{ "repo_name": "nilgradisnik/coinprice-indicator", "path": "coin/asset_selection.py", "copies": "1", "size": "5672", "license": "mit", "hash": -7949906752368417000, "line_mean": 34.8987341772, "line_max": 108, "alpha_frac": 0.6232369535, "autogenerated": false, "ratio": 3.4797546012269938, "conf...
"""Assets module.""" import os import logging import pygame import pyscroll import pytmx from .locals import * # noqa from .utils import ContainerAware logger = logging.getLogger(__name__) class AssetManager(ContainerAware): """Asset manager.""" def __init__(self): """Constructor.""" log...
{ "repo_name": "multatronic/akurra", "path": "akurra/assets.py", "copies": "1", "size": "2087", "license": "mit", "hash": 8102100851264531000, "line_mean": 23.5529411765, "line_max": 89, "alpha_frac": 0.6114039291, "autogenerated": false, "ratio": 3.9377358490566037, "config_test": false, "has...
# Assets from flask.ext.assets import (Environment, Bundle) from app import app assets = Environment() assets.init_app(app) # Assets js_base = Bundle( 'bower_components/jquery/jquery.js', 'bower_components/lodash/dist/lodash.js', 'bower_components/bootstrap-sass/js/bootstrap-affix.js', 'bower_componen...
{ "repo_name": "mahrz/kernkrieg", "path": "assets.py", "copies": "1", "size": "3316", "license": "mit", "hash": 4167858654769972000, "line_mean": 37.5697674419, "line_max": 70, "alpha_frac": 0.7198431846, "autogenerated": false, "ratio": 3.059040590405904, "config_test": false, "has_no_keyword...
# assets # to import: from config.assets import patterns from config.assets import default, production, test, development def patterns(version): if version == 'production': return merge(default.exports, production.exports) elif version == 'test': return merge(default.exports, test.exports) else: # default to d...
{ "repo_name": "buckbaskin/flask-vertical", "path": "config/assets/__init__.py", "copies": "1", "size": "1031", "license": "mit", "hash": 2465864327749391000, "line_mean": 27.6388888889, "line_max": 79, "alpha_frac": 0.6314258002, "autogenerated": false, "ratio": 2.8324175824175826, "config_test...
"""Assets represent Financial Assets, these are claims based on a contract. These are often referred to as Securities or Products in other libraries. """ from __future__ import absolute_import, division, print_function import pandas as pd from pandas import DataFrame from numbers import Number from pandas.tseries.o...
{ "repo_name": "caseyclements/pennies", "path": "pennies/trading/assets.py", "copies": "1", "size": "15097", "license": "apache-2.0", "hash": -7175903032183199000, "line_mean": 33.9490740741, "line_max": 93, "alpha_frac": 0.5938265881, "autogenerated": false, "ratio": 4.049624463519313, "config_...
"""A SSH Interface class. An interface to ssh on posix systems, and plink (part of the Putty suite) on Win32 systems. By Rasjid Wilcox. Copyright (c) 2002. Version: 0.2 Last modified 4 September 2002. Drawing on ideas from work by Julian Schaefer-Jasinski, Guido's telnetlib and version 0.1 of pyssh (htt...
{ "repo_name": "isislovecruft/torflow", "path": "NetworkScanners/libs/Pyssh/pyssh.py", "copies": "2", "size": "10720", "license": "bsd-3-clause", "hash": -8387606040305135000, "line_mean": 31.5, "line_max": 81, "alpha_frac": 0.5393656716, "autogenerated": false, "ratio": 3.9703703703703703, "con...
# assign articles import pickle from collections import defaultdict stoplist = set("a about above after again against all am an and any are aren't as at be because been before being below between both but by can't cannot could couldn't did didn't do does doesn't doing don't down during each few for from further had ha...
{ "repo_name": "Humblehound/WikiSpatialTree", "path": "prepare_dictionary.py", "copies": "1", "size": "2061", "license": "mit", "hash": 3678021013947525000, "line_mean": 63.4375, "line_max": 979, "alpha_frac": 0.7151868025, "autogenerated": false, "ratio": 3.7955801104972378, "config_test": fals...
"""Assign a WFO to sites in the metadata tables that have no WFO set.""" from pyiem.util import get_dbconn, logger LOG = logger() def main(): """Go Main""" mesosite = get_dbconn("mesosite") postgis = get_dbconn("postgis") mcursor = mesosite.cursor() mcursor2 = mesosite.cursor() pcursor = pos...
{ "repo_name": "akrherz/iem", "path": "scripts/dbutil/set_wfo.py", "copies": "1", "size": "2127", "license": "mit", "hash": 5840720261777957000, "line_mean": 26.9868421053, "line_max": 79, "alpha_frac": 0.463093559, "autogenerated": false, "ratio": 3.464169381107492, "config_test": false, "has...
"""Assign block storage subnets to the given host id.""" # :license: MIT, see LICENSE for more details. import click import SoftLayer from SoftLayer.CLI import environment @click.command() @click.argument('access_id', type=int) @click.option('--subnet-id', multiple=True, type=int, help="ID of the subne...
{ "repo_name": "allmightyspiff/softlayer-python", "path": "SoftLayer/CLI/block/subnets/assign.py", "copies": "2", "size": "1445", "license": "mit", "hash": -8689241738293449000, "line_mean": 38.0540540541, "line_max": 108, "alpha_frac": 0.676816609, "autogenerated": false, "ratio": 3.8533333333333...
"""Assign chores Write a program that takes a list of people’s email addresses and a list of chores that need to be done and randomly assigns chores to people. Email each person their assigned chores. If you’re feeling ambitious, keep a record of each person’s previously assigned chores so that you can make sure the ...
{ "repo_name": "JoseALermaIII/python-tutorials", "path": "pythontutorials/books/AutomateTheBoringStuff/Ch16/Projects/P1_assignChores.py", "copies": "1", "size": "3180", "license": "mit", "hash": 7366868954102329000, "line_mean": 35.0681818182, "line_max": 102, "alpha_frac": 0.6379962193, "autogenera...
# - Assign kafka cluster and topic to send enent # - Assign one stock and curl one information per second # - AAPL, GOOG symbol of stock # - good practive provide default argument from googlefinance import getQuotes from kafka import KafkaProducer from kafka.errors import KafkaError,KafkaTimeoutError #- raise exceptio...
{ "repo_name": "samli6479/bigdata", "path": "pybuild/data-producer.py", "copies": "2", "size": "2967", "license": "apache-2.0", "hash": -2326645250609006600, "line_mean": 29.2857142857, "line_max": 99, "alpha_frac": 0.7435119649, "autogenerated": false, "ratio": 3.5195729537366547, "config_test"...
"""Assign load balancer rule or list of load balancer rules to a global load balancer rules.""" from baseCmd import * from baseResponse import * class assignToGlobalLoadBalancerRuleCmd (baseCmd): typeInfo = {} def __init__(self): self.isAsync = "true" """the ID of the global load balancer rul...
{ "repo_name": "MissionCriticalCloud/marvin", "path": "marvin/cloudstackAPI/assignToGlobalLoadBalancerRule.py", "copies": "1", "size": "1391", "license": "apache-2.0", "hash": -3113933261371510000, "line_mean": 38.7428571429, "line_max": 242, "alpha_frac": 0.6534867002, "autogenerated": false, "ra...
# Assignment 12 Analysis -- Emily ''' -pull out spike and y-layers in image -(spike) look at distributions of synapse density in the spike across x,y,z -make old plots prettier/writeup this weekend -(spike) in old hist graphs, make bin size a function of sample size -extract image(s) in dataset of y-layers -talk...
{ "repo_name": "Upward-Spiral-Science/team1", "path": "code/assignment12_emily.py", "copies": "1", "size": "3046", "license": "apache-2.0", "hash": 6111872903007349000, "line_mean": 29.7676767677, "line_max": 112, "alpha_frac": 0.6628365069, "autogenerated": false, "ratio": 2.7565610859728507, "...
# Assignment 1 # 18 January 2016 # Team Rython - Dainius Masiliunas - Tim Weerman # Apache license 2.0 # Import packages import os,os.path import mapnik # Set working directory ####### Change this for your own system ####### # os.chdir('YOURWORKINGDIRECTORY') os.chdir('/home/tim/geoscripting/Assignment1') print os.ge...
{ "repo_name": "GreatEmerald/geoscripting", "path": "Assignment1/Assignment1.py", "copies": "1", "size": "3124", "license": "apache-2.0", "hash": -2835492597362380000, "line_mean": 26.1739130435, "line_max": 85, "alpha_frac": 0.7282330346, "autogenerated": false, "ratio": 3.093069306930693, "con...
import httplib2 #Needed to download file from internet, not simply reading a file on the hard drive. YearsOfAge=0 #global variables Workclass=1 #fnlwgt=2 Not needed. #Education=3 Not needed. Education_Number=4 Marital_Status=5 Occupation=6 Relationship=7 Race=8 Sex=9 Capital_Gain=10 Capital_Loss=11 Hours_Per_Wee...
{ "repo_name": "Dylan-Kingston/Python", "path": "Assignment1OOP.py", "copies": "1", "size": "5686", "license": "mit", "hash": -3051187094330681000, "line_mean": 22.8907563025, "line_max": 128, "alpha_frac": 0.6470277875, "autogenerated": false, "ratio": 3.1729910714285716, "config_test": false, ...
# =============================== ASSIGNMENT 2 USE PICKLED DATA FROM ASS 1 ON A NN =============================== # These are all the modules we'll be using later. Make sure you can import them # before proceeding further. from __future__ import print_function import numpy as np import tensorflow as tf from six.moves...
{ "repo_name": "vberthiaume/vblandr", "path": "udacity/Pycharm/ass3/ass2.py", "copies": "1", "size": "7995", "license": "apache-2.0", "hash": -5438227548183845000, "line_mean": 48.96875, "line_max": 142, "alpha_frac": 0.6823014384, "autogenerated": false, "ratio": 3.47911227154047, "config_test"...
# Assignment 3 for OMS6250 # # Defines a Topology, which is a collection of Nodes. Students should not # modify this file. This is NOT a topology like the ones defined in Mininet projects. # # Copyright 2015 Sean Donovan from DistanceVector import * class Topology(object): def __init__(self, conf_file): ...
{ "repo_name": "yevheniyc/Projects", "path": "1c_GT_Computer_Networks/Project-3/Topology.py", "copies": "2", "size": "2803", "license": "mit", "hash": -2006720488810451200, "line_mean": 34.4810126582, "line_max": 86, "alpha_frac": 0.5718872636, "autogenerated": false, "ratio": 4.580065359477124, ...
# Assignment 3 for OMS6250 # # This defines a DistanceVector Node that can run the Bellman-Ford # algorithm. The TODOs are all related to implementing BF. Students should # modify this file as necessary, guided by the TODO comments and the # assignment instructions. This is the only file that needs to be modified # to ...
{ "repo_name": "yevheniyc/Python", "path": "1c_GT_Computer_Networks/Project-3/DistanceVector.py", "copies": "2", "size": "3114", "license": "mit", "hash": 1040994699810046700, "line_mean": 35.6352941176, "line_max": 82, "alpha_frac": 0.6409762364, "autogenerated": false, "ratio": 4.373595505617978...
# Assignment 3 for OMS6250 # # This defines a Node that can fun the Bellman-Ford algorithm. Students # should not modify this file, but should instead modify the DistanceVector # class that inherits from Node. # # Copyright 2015 Sean Donovan class Node(object): def __init__(self, name, topolink, neighbors): #...
{ "repo_name": "yevheniyc/Python", "path": "1c_GT_Computer_Networks/Project-3/Node.py", "copies": "2", "size": "2062", "license": "mit", "hash": 5351375641381893000, "line_mean": 33.3666666667, "line_max": 90, "alpha_frac": 0.611542192, "autogenerated": false, "ratio": 4.174089068825911, "config...
# Assignment 3 output validator for OMS6250 (Fall 2015)+ # # This output validator is designed to check the student's result log files for errors. # Errors Detected: # No intermediate steps shown # Incorrect separator between steps # Improper node label format # Improper node link weight format # Distance vector to sel...
{ "repo_name": "yevheniyc/Python", "path": "1c_GT_Computer_Networks/Project-3/output_validator.py", "copies": "2", "size": "3149", "license": "mit", "hash": -4081770638514540000, "line_mean": 31.4639175258, "line_max": 145, "alpha_frac": 0.6113051762, "autogenerated": false, "ratio": 4.04755784061...
# Assignment 5 # The goal of this assignment is to train a skip-gram model over Text8(http://mattmahoney.net/dc/textdata) data. # These are all the modules we'll be using later. Make sure you can import them before proceeding further. from __future__ import print_function import collections import math import numpy a...
{ "repo_name": "vberthiaume/vblandr", "path": "udacity/Pycharm/ass3/ass5.py", "copies": "1", "size": "9408", "license": "apache-2.0", "hash": 5900785772235257000, "line_mean": 41, "line_max": 284, "alpha_frac": 0.5927933673, "autogenerated": false, "ratio": 3.900497512437811, "config_test": fals...
# Assignment: 5(ThomasBradyITC110Assignment4.py) # Name: Thomas Brady # Date: 2/1/18 # Description: This program imports the graphics library and draws # a "meh" face using circles, rectangles, and lines. from graphics import * def Meh(): # Build Graphic Window and set ...
{ "repo_name": "SeattleCentral/ITC110", "path": "awesomeness/brady_face.py", "copies": "1", "size": "2924", "license": "mit", "hash": 5185509856506638000, "line_mean": 27.24, "line_max": 67, "alpha_frac": 0.626880985, "autogenerated": false, "ratio": 2.877952755905512, "config_test": false, "h...
# Assignment_6.py # Plays Tic Tac Toe with login function and repeatability # <Chad Hobbs> from graphics import * def login(): # Initiates variables and gets name greeting = "" name = False key = -1 print("Welcome to Chad's Tic-Tac-Toe game!") print("") user = input("Please ...
{ "repo_name": "itsallvoodoo/csci-school", "path": "CSCI220/Week 09 - MAR12-16/Assignment_6.py", "copies": "1", "size": "5848", "license": "apache-2.0", "hash": -5589457472817332000, "line_mean": 29.2727272727, "line_max": 130, "alpha_frac": 0.4969220246, "autogenerated": false, "ratio": 3.7083069...
# Assignment_7_CDH.py # Plays tic-tac-toe with 2 players and a database # <Chad Hobbs> from graphics import * def create_board(): board = [['','',''],['','',''],['','','']] wwin = GraphWin("Tic Tac Toe",300,300) wwin.setCoords(30,30,0,0) Line(Point(10,0),Point(10,30)).draw(wwin) Line(Po...
{ "repo_name": "itsallvoodoo/csci-school", "path": "CSCI220/Week 09 - MAR12-16/Assignment_7_CDH.py", "copies": "2", "size": "12857", "license": "apache-2.0", "hash": 7585787189706302000, "line_mean": 28.0397196262, "line_max": 87, "alpha_frac": 0.5078167535, "autogenerated": false, "ratio": 3.3017...
from graphics import * def creature(): win = GraphWin("Creature", 700, 700) # "title", and dimensions body4 = Circle(Point(448, 420), 42) # (center, radius) of body segment 4 body4.setFill("green") # fills the body with green color body4.setOutline("red") # outlines the body with red body4.draw(win) # draws th...
{ "repo_name": "TopGirlCoder/code", "path": "python/caterpillar/creature.py", "copies": "1", "size": "9420", "license": "mit", "hash": 2500584505064649000, "line_mean": 46.5808080808, "line_max": 205, "alpha_frac": 0.7158174098, "autogenerated": false, "ratio": 2.851952770208901, "config_test": ...
#Assignment cw-1 by Andrew Malfavon #Problem 3.6 pg130 #2/10/2016 import math def trapezint1(f, a, b): return ((b-a)/2.0)*(f(a) + f(b)) print trapezint1(math.sin, 0, math.pi) print trapezint1(math.cos, 0, math.pi) print trapezint1(math.sin, 0, math.pi/2) def trapezint2(f, a, b): return (float((b-a))/4.0)*(f(...
{ "repo_name": "chapman-phys227-2016s/cw-1-classwork-team", "path": "trapezint.py", "copies": "1", "size": "1030", "license": "mit", "hash": -4303743580097700400, "line_mean": 25.4102564103, "line_max": 60, "alpha_frac": 0.6203883495, "autogenerated": false, "ratio": 2.172995780590717, "config_t...
# Assignment for Amy Winarske, Module 5 #Coding assignments can be saved as .py files when appropriate or .txt files otherwise, for example, #you may want to past the code from multiple .py files into a single .txt file. #When you've completed the assignment, attach the file(s) to the drop box for this module, which yo...
{ "repo_name": "awinarske/Demo", "path": "UCBPy/Module5.py", "copies": "1", "size": "2628", "license": "mit", "hash": 7648457715759854000, "line_mean": 33.1298701299, "line_max": 275, "alpha_frac": 0.6837899543, "autogenerated": false, "ratio": 3.4761904761904763, "config_test": false, "has_no...
"""AssignmentGroups API Tests for Version 1.0. This is a testing template for the generated AssignmentGroupsAPI Class. """ import unittest import requests import secrets from py3canvas.apis.assignment_groups import AssignmentGroupsAPI from py3canvas.apis.assignment_groups import Gradingrules from py3canvas.ap...
{ "repo_name": "tylerclair/py3canvas", "path": "py3canvas/tests/assignment_groups.py", "copies": "1", "size": "2244", "license": "mit", "hash": 6365111869879541000, "line_mean": 44.75, "line_max": 204, "alpha_frac": 0.7179144385, "autogenerated": false, "ratio": 4.186567164179104, "config_test":...
"""AssignmentGroups API Version 1.0. This API client was generated using a template. Make sure this code is valid before using it. """ import logging from datetime import date, datetime from .base import BaseCanvasAPI from .base import BaseModel class AssignmentGroupsAPI(BaseCanvasAPI): """AssignmentGroups API V...
{ "repo_name": "tylerclair/py3canvas", "path": "py3canvas/apis/assignment_groups.py", "copies": "1", "size": "14670", "license": "mit", "hash": 5859957307424242000, "line_mean": 39.75, "line_max": 195, "alpha_frac": 0.6438991138, "autogenerated": false, "ratio": 4.367371241440905, "config_test":...
"""AssignmentGroups API Version 1.0. This API client was generated using a template. Make sure this code is valid before using it. """ import logging from datetime import date, datetime from base import BaseCanvasAPI from base import BaseModel class AssignmentGroupsAPI(BaseCanvasAPI): """AssignmentGro...
{ "repo_name": "PGower/PyCanvas", "path": "pycanvas/apis/assignment_groups.py", "copies": "1", "size": "15084", "license": "mit", "hash": 4354846805164811000, "line_mean": 39.9, "line_max": 195, "alpha_frac": 0.6294749403, "autogenerated": false, "ratio": 4.473309608540926, "config_test": false,...
ASSIGNMENT_LEFT = "<-" DOG = "dog" CALL = "call" END = "end" BOX = "box" SAY = "say" RETURN = "return" EXIT = "exit" IF = "if" ELSE = "else" COMMA = "," WHILE = "while" PLUS = "+" MINUS = "-" DIVIDE = "/" MOD = "%" MULTIPLY = "*" LEFT_PARAN = "(" RIGHT_PARAN = ")" LT = "<" GT = ">" LE = "<=" GE = ">=" EQ = "=" NE = "!=...
{ "repo_name": "dragosthealex/hackerLite", "path": "python/Parser.py", "copies": "1", "size": "11364", "license": "mit", "hash": -145961674322657900, "line_mean": 25.7388235294, "line_max": 134, "alpha_frac": 0.5869412179, "autogenerated": false, "ratio": 3.63764404609475, "config_test": false, ...
ASSIGNMENT_NAME = 'P5' ASSIGNMENT_TEST_NUM = 8 OUTPUT_RESULT_REG_EXP = [] SCRIPT_REG_EXP = [] SCRIPT_EXISTENCE_REG_EXP = [] FUNCTION_ORDER = ['most_repeated_letters', 'has_equal_letters', 'is_palindrome', 'is_trick_round', 'total_points'] TEST_FUNC = {'most_repeated_letters':[ {'input_args':['a'],...
{ "repo_name": "shenghaozou/PythonGrader", "path": "P5/gradeSettings.py", "copies": "1", "size": "11063", "license": "apache-2.0", "hash": -3032532808754354000, "line_mean": 94.3706896552, "line_max": 178, "alpha_frac": 0.4384886559, "autogenerated": false, "ratio": 4.100444773906598, "config_te...
"""Assignment.""" from . import HDLObject from .const import HDLIntegerConstant from .expr import HDLExpression from .signal import HDLSignal, HDLSignalSlice from .concat import HDLConcatenation from .stmt import HDLStatement from .port import HDLModulePort from .ifelse import HDLIfExp from .macro import HDLMacroValue...
{ "repo_name": "brunosmmm/hdltools", "path": "hdltools/abshdl/assign.py", "copies": "1", "size": "4511", "license": "mit", "hash": -8126923710740754000, "line_mean": 30.5454545455, "line_max": 77, "alpha_frac": 0.530924407, "autogenerated": false, "ratio": 4.325023969319271, "config_test": false...
"""Assignments API Tests for Version 1.0. This is a testing template for the generated AssignmentsAPI Class. """ import unittest import requests import secrets from py3canvas.apis.assignments import AssignmentsAPI from py3canvas.apis.assignments import Turnitinsettings from py3canvas.apis.assignments import A...
{ "repo_name": "tylerclair/py3canvas", "path": "py3canvas/tests/assignments.py", "copies": "1", "size": "6048", "license": "mit", "hash": 1387610063421564400, "line_mean": 45.6220472441, "line_max": 186, "alpha_frac": 0.6937830688, "autogenerated": false, "ratio": 4.182572614107884, "config_test...
#Assignments are 3 length #NOT are 4 length #AND, OR, LSHIFT and RSHIFT are 5 length data = [] with open("Day_7_1.input") as f: for line in f: line = line.split(" ") data.append(line) store={} index = 0 #First evaluate the assignments and then need to do multiple passes to evaluate values while True: index = 0 ...
{ "repo_name": "ujjwalgulecha/AdventOfCode", "path": "2015/Day_07/Part_1.py", "copies": "1", "size": "2044", "license": "mit", "hash": 7142472214036676000, "line_mean": 23.0588235294, "line_max": 93, "alpha_frac": 0.5772994129, "autogenerated": false, "ratio": 2.6788990825688073, "config_test": ...
#Assignments are 3 length #NOT are 4 length #AND, OR, LSHIFT and RSHIFT are 5 length data = [] with open("Day_7_2.input") as f: for line in f: line = line.split(" ") data.append(line) store={} index = 0 #First evaluate the assignments and then need to do multiple passes to evaluate values while True: index = 0 ...
{ "repo_name": "ujjwalgulecha/AdventOfCode", "path": "2015/Day_07/Part_2.py", "copies": "1", "size": "2044", "license": "mit", "hash": 3158296940581670400, "line_mean": 23.0588235294, "line_max": 93, "alpha_frac": 0.5772994129, "autogenerated": false, "ratio": 2.6788990825688073, "config_test": ...
assignments = [] def cross(A, B): "Cross product of elements in A and elements in B." return [s+t for s in A for t in B] rows = 'ABCDEFGHI' cols = '123456789' ## List of all the boxes boxes = cross(rows, cols) ## Units for Horizontal Contraints row_units = [cross(r, cols) for r in rows] ## Units for Vertic...
{ "repo_name": "danielkong/AI_Project", "path": "AIND_Sudoku/solution.py", "copies": "1", "size": "6975", "license": "mit", "hash": -7594114815023191000, "line_mean": 34.2272727273, "line_max": 131, "alpha_frac": 0.6143369176, "autogenerated": false, "ratio": 3.480538922155689, "config_test": fa...
assignments = [] rows = 'ABCDEFGHI' cols = '123456789' def assign_value(values, box, value): """ Please use this function to update your values dictionary! Assigns a value to a given box. If it updates the board record it. """ # Don't waste memory appending actions that don't actually change any...
{ "repo_name": "broundy/udacity", "path": "nanodegrees/artificial_intelligence/project_1/solution.py", "copies": "1", "size": "6869", "license": "unlicense", "hash": -782947461972684200, "line_mean": 32.5073170732, "line_max": 128, "alpha_frac": 0.5952831562, "autogenerated": false, "ratio": 3.657...
assignments = [] rows = 'ABCDEFGHI' cols = '123456789' def assign_value(values, box, value): """ Please use this function to update your values dictionary! Assigns a value to a given box. If it updates the board record it. """ # Don't waste memory appending actions that don't actually change any v...
{ "repo_name": "edno/udacity-sandbox", "path": "ud889/AIND_Sudoku/solution.py", "copies": "1", "size": "6141", "license": "unlicense", "hash": 4764239822282066000, "line_mean": 35.5535714286, "line_max": 127, "alpha_frac": 0.5919231396, "autogenerated": false, "ratio": 3.5662020905923346, "confi...
"""Assignment URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-...
{ "repo_name": "onurhunce/AutoAlbumCreator", "path": "Assignment/Assignment/urls.py", "copies": "1", "size": "1635", "license": "bsd-2-clause", "hash": -4794932525894363000, "line_mean": 33.7872340426, "line_max": 79, "alpha_frac": 0.719266055, "autogenerated": false, "ratio": 3.8111888111888113, ...
"""Assign one or more reviewers to one or more Gerrit CL""" import os import sys from libpycr.exceptions import PyCRError from libpycr.gerrit.changes import fetch_change_list_or_fail from libpycr.gerrit.client import Gerrit from libpycr.meta import GitClBuiltin from libpycr.utils.output import Formatter, NEW_LINE, To...
{ "repo_name": "JcDelay/pycr", "path": "libpycr/builtin/changes/assign.py", "copies": "1", "size": "5261", "license": "apache-2.0", "hash": -3019482366854994000, "line_mean": 31.0792682927, "line_max": 79, "alpha_frac": 0.5533168599, "autogenerated": false, "ratio": 4.435919055649241, "config_te...
"""Assign Params to Attributes by Joel Hedlund <joel.hedlund at gmail.com>. Changed:Fabio Zadrozny (binded to Ctrl+1 too) """ __version__ = "1.0.1" __copyright__ = '''Available under the same conditions as PyDev. See PyDev license for details. http://pydev.sourceforge.net ''' import re from org.eclipse.jface.dial...
{ "repo_name": "smkr/pyclipse", "path": "plugins/org.python.pydev.jython/jysrc/assign_params_to_attributes_action.py", "copies": "1", "size": "7638", "license": "epl-1.0", "hash": -6436391000690919000, "line_mean": 40.5108695652, "line_max": 120, "alpha_frac": 0.5754124116, "autogenerated": false, ...
"""Assign Params to Attributes by Joel Hedlund <joel.hedlund at gmail.com>. PyDev script for generating python code that assigns method parameter values to attributes of self with the same name. Activates with 'a' by default. Edit global constants ACTIVATION_STRING and WAIT_FOR_ENTER if this does not suit your needs...
{ "repo_name": "smkr/pyclipse", "path": "plugins/org.python.pydev.jython/jysrc/pyedit_assign_params_to_attributes.py", "copies": "1", "size": "3468", "license": "epl-1.0", "hash": -4582785159950173700, "line_mean": 40.7831325301, "line_max": 120, "alpha_frac": 0.6023644752, "autogenerated": false, ...
""" Assign pin directions to all tile pins. Tile pins are defined by one of two methods: - Pins that are part of a direct connection (e.g. edge_with_mux) are assigned based on the direction relationship between the two tiles, e.g. facing each other. - Pins that connect to a routing track face a routing track. ...
{ "repo_name": "SymbiFlow/symbiflow-arch-defs", "path": "xc/common/utils/prjxray_assign_tile_pin_direction.py", "copies": "1", "size": "21177", "license": "isc", "hash": 6079953087874920000, "line_mean": 31.6805555556, "line_max": 90, "alpha_frac": 0.5473390943, "autogenerated": false, "ratio": 4....
"""Assigns participants with the specified IDs to the organization. Usage: ./rdr_client/run_client.sh --project all-of-us-rdr-prod --account $USER@pmi-ops.org \ pairing_assigner.py file.csv --pairing [site|organization|awardee] \ [--dry_run] [--override_site] Where site = google_group, organization = external_id,...
{ "repo_name": "all-of-us/raw-data-repository", "path": "rdr_service/rdr_client/pairing_assigner.py", "copies": "1", "size": "5499", "license": "bsd-3-clause", "hash": -593524076951328000, "line_mean": 36.924137931, "line_max": 119, "alpha_frac": 0.5713766139, "autogenerated": false, "ratio": 3.87...
"""Assigns secondary IP to NIC""" from baseCmd import * from baseResponse import * class addIpToNicCmd (baseCmd): typeInfo = {} def __init__(self): self.isAsync = "true" """the ID of the nic to which you want to assign private IP""" """Required""" self.nicid = None sel...
{ "repo_name": "MissionCriticalCloud/marvin", "path": "marvin/cloudstackAPI/addIpToNic.py", "copies": "1", "size": "1143", "license": "apache-2.0", "hash": 1970093816412129300, "line_mean": 27.575, "line_max": 70, "alpha_frac": 0.5634295713, "autogenerated": false, "ratio": 3.901023890784983, "c...
"""Assigns subnets to a given ACL.""" # :license: MIT, see LICENSE for more details.ß import click import SoftLayer from SoftLayer.CLI import environment from SoftLayer.CLI import exceptions @click.command() @click.argument('host_id') @click.option('--subnet-id', '-s', multiple=True, required=True, hel...
{ "repo_name": "kyubifire/softlayer-python", "path": "SoftLayer/CLI/block/acl/subnet_add.py", "copies": "1", "size": "1037", "license": "mit", "hash": -3065124898964429000, "line_mean": 32.4193548387, "line_max": 73, "alpha_frac": 0.6978764479, "autogenerated": false, "ratio": 3.4304635761589406, ...
"""Assigns virtual machine or a list of virtual machines to a load balancer rule.""" from baseCmd import * from baseResponse import * class assignToLoadBalancerRuleCmd (baseCmd): typeInfo = {} def __init__(self): self.isAsync = "true" """the ID of the load balancer rule""" """Required...
{ "repo_name": "MissionCriticalCloud/marvin", "path": "marvin/cloudstackAPI/assignToLoadBalancerRule.py", "copies": "1", "size": "1160", "license": "apache-2.0", "hash": 2957108299332438000, "line_mean": 33.1176470588, "line_max": 132, "alpha_frac": 0.6172413793, "autogenerated": false, "ratio": 3...
'''assign_uniq_master - assign a unique master to each peptide across all samples using a maximum parsimony approach ===================================================================== :Author: Tom Smith, Manasa Ramakrishna :Release: $Id$ :Date: |today| :Tags: Python Proteomics Peptide-assignment Purpose ------- ...
{ "repo_name": "TomSmithCGAT/CamProt", "path": "camprot/scripts/assign_uniq_master.py", "copies": "1", "size": "17343", "license": "mit", "hash": -1992384570623952100, "line_mean": 38.8689655172, "line_max": 157, "alpha_frac": 0.578619616, "autogenerated": false, "ratio": 3.8798657718120806, "co...
"""Assign User role to all existing users. Revision ID: 5b33357784a Revises: 1afc3824d35b Create Date: 2013-09-20 15:42:01.558543 """ # revision identifiers, used by Alembic. revision = '5b33357784a' down_revision = '1afc3824d35b' import sqlalchemy as sa from alembic import op from datetime import datetime from sql...
{ "repo_name": "vladan-m/ggrc-core", "path": "src/ggrc_basic_permissions/migrations/versions/20130920154201_5b33357784a_assign_user_role_to_.py", "copies": "2", "size": "2286", "license": "apache-2.0", "hash": -254989722260366850, "line_mean": 27.9367088608, "line_max": 75, "alpha_frac": 0.6675415573,...
#Assign variables import pygame,random from pygame.locals import * clock = pygame.time.Clock() pygame.init() width=680 height=420 up=False down=False left=False right=False score=0 g=False running=True pieceSize=50 y=(height/2)-(pieceSize/2) x=(width/2)-(pieceSize/2) dir_y=0 dir_x=0 qwerty=0 strobeR...
{ "repo_name": "nocturnalbadgr/SquaresGame", "path": "Squares.py", "copies": "1", "size": "11456", "license": "apache-2.0", "hash": -7086733680725893000, "line_mean": 28.4734042553, "line_max": 349, "alpha_frac": 0.4653456704, "autogenerated": false, "ratio": 3.938123066345823, "config_test": fa...
"""Assimp-based analyzer.""" from __future__ import absolute_import import os import logging import subprocess import pyassimp from damn_at import ( mimetypes, MetaDataType, MetaDataValue, FileId, FileDescription, AssetDescription, AssetId ) from damn_at.pluginmanager import IAnalyzer from...
{ "repo_name": "peragro/peragro-at", "path": "src/damn_at/analyzers/mesh/analyzer_assimp.py", "copies": "1", "size": "7008", "license": "bsd-3-clause", "hash": 8537190452146612000, "line_mean": 32.6923076923, "line_max": 79, "alpha_frac": 0.508847032, "autogenerated": false, "ratio": 4.44106463878...
# Assisting definisions for the pong game # By Anders Busch 2014 import pygame global FUN_COUNTER,RED,GREEN,BLUE,WHITE,BLACK,HORIZONTAL,VERTICAL,LEFT_PLAYER,RIGHT_PLAYER,MAXIMUM_BALL_SPEED,MINIMUM_BALL_SPEED global MAIN_MENU,START_SCREEN,GAME_SCREEN_TIME,GAME_SCREEN_GOAL,GAME_SCREEN_INF,COUNTER_PANEL_HEIGHT,COUNTER_U...
{ "repo_name": "Ezbob/bluPong", "path": "ass_def.py", "copies": "1", "size": "2503", "license": "mit", "hash": 3433467456054023000, "line_mean": 26.8222222222, "line_max": 140, "alpha_frac": 0.7279264882, "autogenerated": false, "ratio": 2.6942949407965555, "config_test": false, "has_no_keywor...
"""assist setup script""" import imp import os.path as pt from setuptools import setup def get_version(): "Get version & version_info without importing assist.__init__ " path = pt.join(pt.dirname(__file__), 'assist', '__version__.py') mod = imp.load_source('assist_version', path) return mod.VERSION, ...
{ "repo_name": "jmlopez-rod/assist", "path": "setup.py", "copies": "1", "size": "1910", "license": "bsd-2-clause", "hash": 867598012022083700, "line_mean": 28.84375, "line_max": 68, "alpha_frac": 0.6083769634, "autogenerated": false, "ratio": 3.687258687258687, "config_test": false, "has_no_ke...
"""associate figure with labnumber Revision ID: 3609361b4b95 Revises: 22c2aac814b7 Create Date: 2014-01-05 12:21:23.261708 """ # revision identifiers, used by Alembic. from sqlalchemy.orm import sessionmaker revision = '3609361b4b95' down_revision = '22c2aac814b7' from alembic import op import sqlalchemy as sa d...
{ "repo_name": "USGSDenverPychron/pychron", "path": "migration/versions/3609361b4b95_associate_figure_with_labnumber.py", "copies": "1", "size": "1282", "license": "apache-2.0", "hash": 8857746002253123000, "line_mean": 28.1363636364, "line_max": 94, "alpha_frac": 0.647425897, "autogenerated": false...
"""Associate file types with editable types Revision ID: 6444c893a21f Revises: 56a26a721717 Create Date: 2020-03-27 15:01:29.736555 """ import sqlalchemy as sa from alembic import op from indico.core.db.sqlalchemy import PyIntEnum from indico.modules.events.editing.models.editable import EditableType # revision id...
{ "repo_name": "indico/indico", "path": "indico/migrations/versions/20200327_1501_6444c893a21f_associate_file_types_with_editable_types.py", "copies": "5", "size": "1429", "license": "mit", "hash": 8246042401571069000, "line_mean": 38.6944444444, "line_max": 111, "alpha_frac": 0.6822953114, "autogen...
"""Associate groups with files. Revision ID: a3fe8c8a344 Revises: 525162a280bd Create Date: 2013-11-05 13:55:04.498181 """ # revision identifiers, used by Alembic. revision = 'a3fe8c8a344' down_revision = '525162a280bd' from alembic import op from collections import defaultdict from sqlalchemy.sql import table, col...
{ "repo_name": "ucsb-cs/submit", "path": "submit/migrations/versions/a3fe8c8a344_associate_groups_wit.py", "copies": "1", "size": "2089", "license": "bsd-2-clause", "hash": 4587324464094041000, "line_mean": 27.6164383562, "line_max": 76, "alpha_frac": 0.6103398755, "autogenerated": false, "ratio":...
"""Associate submissions to users through project groups. Revision ID: a364e6e9c14 Revises: 34ac45196731 Create Date: 2013-09-18 16:24:20.626636 """ # revision identifiers, used by Alembic. revision = 'a364e6e9c14' down_revision = '34ac45196731' from alembic import op from sqlalchemy.sql import table, column import...
{ "repo_name": "ucsb-cs/submit", "path": "submit/migrations/versions/a364e6e9c14_associate_submission.py", "copies": "1", "size": "5651", "license": "bsd-2-clause", "hash": -426090743251291970, "line_mean": 37.4421768707, "line_max": 79, "alpha_frac": 0.5940541497, "autogenerated": false, "ratio":...
"""Associate test results to users. Revision ID: 428e5aef5534 Revises: 534e20be9964 Create Date: 2015-11-03 00:51:34.096598 """ # revision identifiers, used by Alembic. revision = '428e5aef5534' down_revision = '534e20be9964' MYSQL_CHARSET = 'utf8' from alembic import op import sqlalchemy as sa def upgrade(): ...
{ "repo_name": "openstack/refstack", "path": "refstack/db/migrations/alembic/versions/428e5aef5534_associate_test_result.py", "copies": "2", "size": "1215", "license": "apache-2.0", "hash": -5209827904758360000, "line_mean": 25.4130434783, "line_max": 76, "alpha_frac": 0.5687242798, "autogenerated":...
"""Association analysis functions for rdf_dm""" from . import helpers import os import re import subprocess from rdflib import Graph, namespace, URIRef, RDF from slugify import slugify _pwd = os.path.dirname(os.path.realpath(__file__)) _itemset_separator = '|' _predicate_object_separator = '-->' _namespace_prefix...
{ "repo_name": "SemanticComputing/rdf_dm", "path": "rdf_dm/association.py", "copies": "1", "size": "4509", "license": "mit", "hash": -4007834412678563000, "line_mean": 40.3669724771, "line_max": 117, "alpha_frac": 0.5874916833, "autogenerated": false, "ratio": 3.662875710804224, "config_test": f...
"""Association mining -- apriori algo""" __author__ = 'thor' from numpy import * # Modified from: # Everaldo Aguiar & Reid Johnson (https://github.com/cse40647/cse40647/blob/sp.14/10%20-%20Apriori.ipynb) # # Itself Modified from: # Marcel Caraciolo (https://gist.github.com/marcelcaraciolo/1423287) # # Functions to c...
{ "repo_name": "thorwhalen/ut", "path": "ml/association/apriori.py", "copies": "1", "size": "13195", "license": "mit", "hash": -8540431141282688000, "line_mean": 34.1866666667, "line_max": 117, "alpha_frac": 0.6046987495, "autogenerated": false, "ratio": 3.9494163424124515, "config_test": false,...
"""Association mining""" __author__ = 'thor' # Modified from Reid Johnson (http://nbviewer.ipython.org/github/cse40647/cse40647/blob/sp.14/11%20-%20FP-Growth.ipynb) # ... Itself Modified from: # Eric Naeseth <eric@naeseth.com> # (https://github.com/enaeseth/python-fp-growth/blob/master/fp_growth.py) # # A Python impl...
{ "repo_name": "thorwhalen/ut", "path": "ml/association/fp_tree.py", "copies": "1", "size": "21503", "license": "mit", "hash": -9147807926118305000, "line_mean": 33.0792393027, "line_max": 123, "alpha_frac": 0.5851741617, "autogenerated": false, "ratio": 4.2312081857536405, "config_test": false,...
# Association Rules Mining - hw3 # Advanced Database Systems # Pedro Ferro Freitas - pff2108 # Roberto Jose de Amorim - rja2139 import csv from collections import defaultdict from sys import argv # data_file = 'INTEGRATED-DATASET.csv' # min_sup = 0.4 # min_conf = 0.7 data_file = argv[1] min_sup = float(argv[2]) min_...
{ "repo_name": "rjamorim/advdb-hw3", "path": "assoc.py", "copies": "1", "size": "6391", "license": "bsd-3-clause", "hash": 327617201536174200, "line_mean": 42.1824324324, "line_max": 117, "alpha_frac": 0.5629791895, "autogenerated": false, "ratio": 3.937769562538509, "config_test": false, "has...
"""Association testing for DIMSE-N services""" from io import BytesIO import queue import time import pytest from pydicom.dataset import Dataset from pydicom.tag import Tag from pydicom.uid import UID, ImplicitVRLittleEndian, ExplicitVRLittleEndian from pynetdicom import AE, debug_logger, evt from pynetdicom.dimse_...
{ "repo_name": "scaramallion/pynetdicom", "path": "pynetdicom/tests/test_assoc_n.py", "copies": "1", "size": "98607", "license": "mit", "hash": 3944409440555189000, "line_mean": 30.1652970923, "line_max": 89, "alpha_frac": 0.5676777511, "autogenerated": false, "ratio": 3.851384603366793, "config...
"""Association testing""" try: import ctypes HAVE_CTYPES = True except ImportError: HAVE_CTYPES = False from datetime import datetime from io import BytesIO import logging import os from pathlib import Path import queue import socket import sys import time import threading import pytest from pydicom imp...
{ "repo_name": "scaramallion/pynetdicom", "path": "pynetdicom/tests/test_assoc.py", "copies": "1", "size": "241524", "license": "mit", "hash": -5001927215942043000, "line_mean": 32.6900544009, "line_max": 99, "alpha_frac": 0.5934068664, "autogenerated": false, "ratio": 3.828184685612845, "config...
""" Associative and Commutative unification This module provides goals for associative and commutative unification. It accomplishes this through naively trying all possibilities. This was built to be used in the computer algebra systems SymPy and Theano. >>> from logpy import run, var, fact >>> from logpy.assoccomm...
{ "repo_name": "cpcloud/logpy", "path": "logpy/assoccomm.py", "copies": "1", "size": "7954", "license": "bsd-3-clause", "hash": 6187931501800630000, "line_mean": 27.6115107914, "line_max": 79, "alpha_frac": 0.5609756098, "autogenerated": false, "ratio": 3.1538461538461537, "config_test": false, ...
"""assoc_rename_and_uuid_column Revision ID: 1b385158fd32 Revises: 40dfdcb2b07c Create Date: 2016-08-17 14:37:40.391822 """ # revision identifiers, used by Alembic. revision = '1b385158fd32' down_revision = '40dfdcb2b07c' from alembic import op import sqlalchemy as sa def upgrade(): op.rename_table('knowledge...
{ "repo_name": "airbnb/knowledge-repo", "path": "knowledge_repo/app/migrations/versions/1b385158fd32_assoc_rename_and_uuid_column.py", "copies": "1", "size": "1567", "license": "apache-2.0", "hash": -7529395538986187000, "line_mean": 33.0652173913, "line_max": 93, "alpha_frac": 0.6828334397, "autoge...
"Assorted class utilities and tools" class AttrDisplay: def gatherAttrs(self): attrs = [] for key in sorted(self.__dict__): attrs.append("%s=%s" % (key, getattr(self, key))) return ', '.join(attrs) def __str__(self): return '[%s: %s]' % (self.__class__.__name__, self...
{ "repo_name": "zhayangtao/HelloPython", "path": "python01/PythonExample.py", "copies": "1", "size": "1505", "license": "apache-2.0", "hash": -4680060669774696000, "line_mean": 22.8888888889, "line_max": 73, "alpha_frac": 0.5627906977, "autogenerated": false, "ratio": 3.591885441527446, "config_...
"""Assorted commands. """ import os import threading import sublime import sublime_plugin from Vintageous.state import _init_vintageous from Vintageous.state import State from Vintageous.vi import settings from Vintageous.vi import cmd_defs from Vintageous.vi.dot_file import DotFile from Vintageous.vi.utils import m...
{ "repo_name": "vastcharade/Vintageous", "path": "xsupport.py", "copies": "9", "size": "6043", "license": "mit", "hash": -7732688025031808000, "line_mean": 31.1436170213, "line_max": 78, "alpha_frac": 0.5973854046, "autogenerated": false, "ratio": 3.739480198019802, "config_test": false, "has_...
''' Assorted exceptions. ''' class CreateError(Exception): ''' Exception thrown when unable to create a new database record. ''' def __init__(self, message="Failed to create new database record!", orig_exception=None): Exception.__init__(self, message, orig_exception) class NotReadyError(Exceptio...
{ "repo_name": "ChaseSnapshot/smcity", "path": "smcity/misc/errors.py", "copies": "1", "size": "1095", "license": "unlicense", "hash": 4591989279140732000, "line_mean": 42.8, "line_max": 103, "alpha_frac": 0.6885844749, "autogenerated": false, "ratio": 4.600840336134453, "config_test": false, ...
# Assorted functions that are needed frequently. import my_cnf import mysql.connector import sys import unicodecsv as csv def connect_as_db_user(): """ Open a connection as the database user. """ db_option_group = "client%s" % my_cnf.database try: cnx = mysql.connector.connect(option_file...
{ "repo_name": "ptressel/yelp_friend_analysis", "path": "sql_utilities.py", "copies": "1", "size": "3678", "license": "mit", "hash": 8510684639453304000, "line_mean": 29.6583333333, "line_max": 78, "alpha_frac": 0.6033170201, "autogenerated": false, "ratio": 3.916932907348243, "config_test": fal...
"""Assorted functions to deal with specific WP tasks or objects that don't fit anywhere else""" import datetime import warnings from django.db import models from django.core.urlresolvers import reverse def wp_nav_menu(blog, menu_slug, root_id=None): """Return a tree of menu items for a given menu""" if not ...
{ "repo_name": "ludoo/wpkit", "path": "attic/ngfrontman/wp_frontman/wp_helpers.py", "copies": "2", "size": "5568", "license": "bsd-3-clause", "hash": 2069767758599601400, "line_mean": 39.9411764706, "line_max": 106, "alpha_frac": 0.5666307471, "autogenerated": false, "ratio": 3.663157894736842, ...
"""Assorted helper methods""" from collections.abc import Iterable import numpy as np def appendsolwarning(msg, data, result, category="uncategorized"): "Append a particular category of warnings to a solution." if "warnings" not in result: result["warnings"] = {} if category not in result["warning...
{ "repo_name": "hoburg/gpkit", "path": "gpkit/small_scripts.py", "copies": "1", "size": "1709", "license": "mit", "hash": -7182357385960519000, "line_mean": 27.9661016949, "line_max": 101, "alpha_frac": 0.6512580456, "autogenerated": false, "ratio": 3.9107551487414187, "config_test": false, "h...