text
stringlengths
0
1.05M
meta
dict
"""Attempts to figure out what version of things we're using in playdoh-lib. This is made exceedingly difficult because of the following things: 1. We install with pip to lib/python/, but nix the .egg-info files so we have no clue what we installed unless the package also has the version information tucked away ...
{ "repo_name": "willkg/victor", "path": "victor/cmdline.py", "copies": "1", "size": "6760", "license": "bsd-3-clause", "hash": -5004679920419993000, "line_mean": 27.5232067511, "line_max": 79, "alpha_frac": 0.5806213018, "autogenerated": false, "ratio": 3.86949055523755, "config_test": false, ...
# attempts to locate Space Engineers and git, it will try common paths if build.ini is incorrect if (not os.path.exists(GitExe)): GitExe = r"C:\Program Files (x86)\Git\bin\git.exe" if (os.path.exists(GitExe)): logging.info("Git in Program Files (x86)") else: GitExe = r"C:\Program Files\Git\bin\git.exe" if (os...
{ "repo_name": "Rynchodon/ARMS", "path": ".build/find-git.py", "copies": "2", "size": "2175", "license": "cc0-1.0", "hash": 3104833589695850500, "line_mean": 32.4769230769, "line_max": 103, "alpha_frac": 0.672183908, "autogenerated": false, "ratio": 2.8173575129533677, "config_test": false, "h...
""" Attempts to simulate a system consisting of a tone being received by multiple phase-shifted and amplitude scaled sensors with uncorrelated noise at each """ import numpy as np import logging import itertools from directionFinder_backend.signal_generator_correlation import SignalGeneratorCorrelation class SignalGe...
{ "repo_name": "jgowans/directionFinder_backend", "path": "directionFinder_backend/signal_generator.py", "copies": "1", "size": "6980", "license": "mit", "hash": -388002788820253760, "line_mean": 41.303030303, "line_max": 138, "alpha_frac": 0.5815186246, "autogenerated": false, "ratio": 3.93461104...
"""Attempts to spellcheck and correct failed cd commands""" import os from difflib import get_close_matches from thefuck.specific.sudo import sudo_support from thefuck.rules import cd_mkdir from thefuck.utils import for_app __author__ = "mmussomele" MAX_ALLOWED_DIFF = 0.6 def _get_sub_dirs(parent): """Returns ...
{ "repo_name": "levythu/thefuck", "path": "thefuck/rules/cd_correction.py", "copies": "1", "size": "1678", "license": "mit", "hash": 4810766269784511000, "line_mean": 30.0740740741, "line_max": 96, "alpha_frac": 0.6442193087, "autogenerated": false, "ratio": 3.6086021505376342, "config_test": fa...
"""Attempts to spellcheck and correct failed cd commands""" import os from difflib import get_close_matches from thefuck.utils import sudo_support from thefuck.rules import cd_mkdir __author__ = "mmussomele" MAX_ALLOWED_DIFF = 0.6 def _get_sub_dirs(parent): """Returns a list of the child directories of the giv...
{ "repo_name": "zhangzhishan/thefuck", "path": "thefuck/rules/cd_correction.py", "copies": "4", "size": "1653", "license": "mit", "hash": 3175311209669262300, "line_mean": 30.7884615385, "line_max": 96, "alpha_frac": 0.6424682396, "autogenerated": false, "ratio": 3.6733333333333333, "config_test...
"""Attempts to spellcheck and correct failed cd commands""" import os import six from difflib import get_close_matches from thefuck.specific.sudo import sudo_support from thefuck.rules import cd_mkdir from thefuck.utils import for_app __author__ = "mmussomele" MAX_ALLOWED_DIFF = 0.6 def _get_sub_dirs(parent): ...
{ "repo_name": "mlk/thefuck", "path": "thefuck/rules/cd_correction.py", "copies": "4", "size": "1747", "license": "mit", "hash": -1179209368808488000, "line_mean": 29.1206896552, "line_max": 96, "alpha_frac": 0.6382369777, "autogenerated": false, "ratio": 3.5799180327868854, "config_test": false...
"""Attempts to spellcheck and correct failed cd commands""" import os import six from thefuck.specific.sudo import sudo_support from thefuck.rules import cd_mkdir from thefuck.utils import for_app, get_close_matches __author__ = "mmussomele" MAX_ALLOWED_DIFF = 0.6 def _get_sub_dirs(parent): """Returns a list o...
{ "repo_name": "nvbn/thefuck", "path": "thefuck/rules/cd_correction.py", "copies": "3", "size": "1843", "license": "mit", "hash": -1145849367275746400, "line_mean": 29.2131147541, "line_max": 96, "alpha_frac": 0.6169289202, "autogenerated": false, "ratio": 3.585603112840467, "config_test": false...
""" Attempt to clone https://github.com/michaeldv/awesome_print Usage: from awesome_print import ap ap(object) """ import __builtin__ from types import * mode = 'ansi' def ap(*args): for arg in args: print format(arg) def indent(level): return ' ' * level def format(obj, level = 0): ty...
{ "repo_name": "smazhara/awesome_print", "path": "awesome_print/awesome_print.py", "copies": "1", "size": "2738", "license": "mit", "hash": 4212010509238425600, "line_mean": 19.5864661654, "line_max": 73, "alpha_frac": 0.5178962747, "autogenerated": false, "ratio": 3.183720930232558, "config_tes...
"""Attempt to determine the current user's "system" directories""" try: ## raise ImportError from win32com.shell import shell, shellcon except ImportError: shell = None try: ## raise ImportError import _winreg except ImportError: _winreg = None import os, sys ## The registry keys where the SHGetFolder...
{ "repo_name": "alexus37/AugmentedRealityChess", "path": "pythonAnimations/pyOpenGLChess/engineDirectory/oglc-env/lib/python2.7/site-packages/OpenGLContext/browser/homedirectory.py", "copies": "2", "size": "2711", "license": "mit", "hash": 6004529105698446000, "line_mean": 34.6842105263, "line_max": 95,...
# Attempt to find faces and draw rectangles around them using openCV # Dan Kolbman import sys, cv2 def detect( path ): img = cv2.imread( path ) face_cascade = cv2.CascadeClassifier( 'haarcascade_frontalface_default.xml' ) eye_cascade = cv2.CascadeClassifier('haarcascade_eye.xml') try: gray = cv2.cvtColor(...
{ "repo_name": "dankolbman/CleverTind", "path": "face_detect.py", "copies": "1", "size": "1355", "license": "mit", "hash": 1808044439759640000, "line_mean": 26.6530612245, "line_max": 80, "alpha_frac": 0.6184501845, "autogenerated": false, "ratio": 2.913978494623656, "config_test": false, "has...
"""Attempt to generate templates for module reference with Sphinx XXX - we exclude extension modules To include extension modules, first identify them as valid in the ``_uri2path`` method, then handle them in the ``_parse_module`` script. We get functions and classes by parsing the text of .py files. Alternatively w...
{ "repo_name": "e-koch/pyspeckit", "path": "docs/sphinxext/apigen.py", "copies": "8", "size": "15658", "license": "mit", "hash": -3882542394503865300, "line_mean": 35.5841121495, "line_max": 79, "alpha_frac": 0.5342955678, "autogenerated": false, "ratio": 4.292214912280702, "config_test": false,...
"""Attempt to generate templates for module reference with Sphinx XXX - we exclude extension modules To include extension modules, first identify them as valid in the ``_uri2path`` method, then handle them in the ``_parse_module`` script. We get functions and classes by parsing the text of .py files. Alternatively we c...
{ "repo_name": "process-asl/process-asl", "path": "tools/interfacedocgen.py", "copies": "2", "size": "18245", "license": "bsd-3-clause", "hash": 8976197156278363000, "line_mean": 36.3893442623, "line_max": 79, "alpha_frac": 0.5348862702, "autogenerated": false, "ratio": 4.255889899696758, "confi...
""" Attempt to implement a reactive system in Python. With that I mean a system in which signals are bound implicitly, as in Shiny. The Signal is the core element here. It is like the Property in HasProps. A function can easily be turned into a Signal object by decorating it. Other than Properties, signals have a fun...
{ "repo_name": "synmnstr/flexx", "path": "exp/reactive.py", "copies": "22", "size": "9230", "license": "bsd-2-clause", "hash": 2199809718498553900, "line_mean": 26.3076923077, "line_max": 93, "alpha_frac": 0.5511375948, "autogenerated": false, "ratio": 3.65689381933439, "config_test": false, "...
"""Attempt to implement the Multilinear Jigsaw Puzzles as described in Appendix A of the paper [0]. !!! ATTENTION !!! There are several issues and this implementation is NOT working correctly for now. !!! ATTENTION !!! 0. Parameter Choices: Generally the correct choice of parameters and the relation between th...
{ "repo_name": "tum-i22/indistinguishability-obfuscation", "path": "obfusc8/mjp.py", "copies": "1", "size": "8222", "license": "apache-2.0", "hash": 3352941483547593700, "line_mean": 32.5632653061, "line_max": 111, "alpha_frac": 0.6630990027, "autogenerated": false, "ratio": 2.8818787241500177, ...
"""Attempt to install all datasets into all database management systems This module, when run, attempts to install datasets from all Retriever scripts in the /scripts folder (except for those listed in IGNORE), for each engine in engine_list in retriever.engines. In other words, it runs trys to install using all possi...
{ "repo_name": "goelakash/retriever", "path": "retriever/try_install_all.py", "copies": "1", "size": "3460", "license": "mit", "hash": 1641011411192851200, "line_mean": 30.7431192661, "line_max": 105, "alpha_frac": 0.5757225434, "autogenerated": false, "ratio": 3.7814207650273226, "config_test":...
"""Attempt to make the FeedPlatform command line tools available as a Django management subcommand. """ # Introducing a 2.5 dependency here so we can name our django # command "feedplatform" (i.e. same as the top-level module). # Unfortunately, Django names commands always after their filename. from __future__ ...
{ "repo_name": "miracle2k/feedplatform", "path": "feedplatform/integration/django/management/commands/feedplatform.py", "copies": "1", "size": "4101", "license": "bsd-2-clause", "hash": -2936878308026166000, "line_mean": 36.3457943925, "line_max": 83, "alpha_frac": 0.6166788588, "autogenerated": fal...
"""Attempt to manage the disaster that is IEM symlinking""" import os import datetime from pyiem.util import logger LOG = logger() # LINK , TARGET PAIRS = [ ["/mesonet/data/merra2", "/mnt/mesonet2/data/merra2"], ["/mesonet/nawips", "/mnt/mesonet2/gempak"], ["/mesonet/scripts", "/mnt/mesonet2/scripts"], ...
{ "repo_name": "akrherz/iem", "path": "deployment/symlink_manager.py", "copies": "1", "size": "3305", "license": "mit", "hash": -5575315607649993000, "line_mean": 37.8823529412, "line_max": 68, "alpha_frac": 0.619667171, "autogenerated": false, "ratio": 2.9430097951914513, "config_test": false, ...
"""Attempt to rerun all feature plots to see what I broke.""" import datetime import sys from multiprocessing import Pool from bs4 import BeautifulSoup import requests import pandas as pd from pyiem.util import get_dbconn, logger LOG = logger() def run_plot(uri): """Run this plot""" uri = "http://iem.local/...
{ "repo_name": "akrherz/iem", "path": "test/run_feature_autoplots.py", "copies": "1", "size": "2536", "license": "mit", "hash": 8241654511635232000, "line_mean": 26.2688172043, "line_max": 67, "alpha_frac": 0.5611198738, "autogenerated": false, "ratio": 3.556802244039271, "config_test": false, ...
"""Attempt to tabulate single qubit gates required to generate a target 2Q gate with a product A k A.""" from functools import reduce from typing import Tuple, Sequence, List, NamedTuple from dataclasses import dataclass import numpy as np import cirq from cirq import value from cirq._compat import proper_repr, prope...
{ "repo_name": "quantumlib/Cirq", "path": "cirq-google/cirq_google/optimizers/two_qubit_gates/gate_compilation.py", "copies": "1", "size": "19289", "license": "apache-2.0", "hash": 5839971014964772000, "line_mean": 39.4255765199, "line_max": 100, "alpha_frac": 0.6343929886, "autogenerated": false, ...
# Attemp using words to paragraph : (Features) Vector averaging method from bs4 import BeautifulSoup import numpy as np import pandas as pd import gensim, re from nltk.corpus import stopwords train = pd.read_csv( "../data/labeledTrainData.tsv", delimiter="\t", quoting=3 ) test = pd.read_csv( "../data/testData.tsv", d...
{ "repo_name": "switchkiller/ml_imdb", "path": "src/word2vec_vectorAveraging.py", "copies": "1", "size": "3350", "license": "mit", "hash": -629967639560238000, "line_mean": 33.8958333333, "line_max": 84, "alpha_frac": 0.6919402985, "autogenerated": false, "ratio": 3.5828877005347595, "config_tes...
import time class AttendanceManager(object): prefillKeys = ["first_name", "last_name", "tags", "badge_icons"] def __init__(self, cardStore, eventKey, onAttend): self.cardStore = cardStore self.onAttend = onAttend self.attendKey = "attended_"+eventKey def prefill(self, key...
{ "repo_name": "novas0x2a/devhouse", "path": "attendance.py", "copies": "1", "size": "2164", "license": "mit", "hash": 3559714082186833400, "line_mean": 39.0740740741, "line_max": 73, "alpha_frac": 0.7218114603, "autogenerated": false, "ratio": 3.857397504456328, "config_test": false, "has_no_...
"""attendance tweaks Revision ID: 44d9d3bf2abb Revises: 3559c36f279d Create Date: 2015-07-21 17:28:29.177619 """ # revision identifiers, used by Alembic. revision = '44d9d3bf2abb' down_revision = '3559c36f279d' branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa def upgrade(): ...
{ "repo_name": "Code4SA/pmg-cms-2", "path": "migrations/versions/44d9d3bf2abb_attendance_tweaks.py", "copies": "1", "size": "1380", "license": "apache-2.0", "hash": 73121187074579250, "line_mean": 38.4285714286, "line_max": 170, "alpha_frac": 0.7014492754, "autogenerated": false, "ratio": 3.301435...
attendees = ['Alison', 'Carolyn', 'Hannah'] for person in attendees: #for "name of variable that we're going to use as we go through this list" in "this list" print person #person = 'Alison', print person #person = 'Carolyn', print person for cow in range(5): print cow print '\n\n\n\n\n' days_of_wee...
{ "repo_name": "codelikeagirlcny/python-lessons-cny", "path": "code-exercises-etc/section_05_(loops)/ajm.loops_basic-for.20170715.py", "copies": "1", "size": "1246", "license": "mit", "hash": -5606292625204184000, "line_mean": 14.7721518987, "line_max": 131, "alpha_frac": 0.5722311396, "autogenerate...
##attendees = ['Hannah', 'Kseniya', 'Sarah', 'Christy'] ##print [0] ##print [1] ##print [2] ## ##number_of_attendees = len(attendees) ##print number_of_attendees ## ###append, add one item at a time to the end of the list ##attendees.append ('Alison') ##print attendees ## ##attendees_ages = [] ##attendees_ages.append(2...
{ "repo_name": "hannahkwarren/CLaG-Sp2016", "path": "code-exercises-etc/section_02_(strings)/HKW-Lesson2.py", "copies": "1", "size": "6087", "license": "mit", "hash": 8736106151340556000, "line_mean": 32.8166666667, "line_max": 120, "alpha_frac": 0.6771808773, "autogenerated": false, "ratio": 3.10...
# ATTENTION: Add a file called settings.py with appropriate settings # as imported below. import tweepy from settings import consumer_key, consumer_secret, access_token, access_token_secret, hashtag print ("Authenticating.") auth = tweepy.OAuthHandler(consumer_key, consumer_secret) auth.set_access_token(access_token...
{ "repo_name": "svineet/TweetCounter", "path": "main.py", "copies": "1", "size": "1265", "license": "mit", "hash": 4483028826675521500, "line_mean": 24.8163265306, "line_max": 94, "alpha_frac": 0.6134387352, "autogenerated": false, "ratio": 3.1944444444444446, "config_test": false, "has_no_key...
"""Attention combination strategies. This modules implements attention combination strategies for multi-encoder scenario when we may want to combine the hidden states of the encoders in more complicated fashion. Currently there are two attention combination strategies flat and hierarchical (see paper `Attention Combi...
{ "repo_name": "bastings/neuralmonkey", "path": "neuralmonkey/encoders/encoder_wrapper.py", "copies": "1", "size": "18095", "license": "bsd-3-clause", "hash": -6862849683702879000, "line_mean": 40.0317460317, "line_max": 79, "alpha_frac": 0.5879524731, "autogenerated": false, "ratio": 4.2209003965...
"""AttentionDecoderCorr takes an array of correlations and outputs attention. This code is based on Matlab code published here: https://github.com/sinamiran/Real-Time-Tracking-of-Selective-Auditory-Attention Based on the work: S. Miran, S. Akram, A. Sheikhattar, J. Z. Simon, T. Zhang, and B. Babadi, Real-Time Trackin...
{ "repo_name": "google/telluride_decoding", "path": "telluride_decoding/attention_decoder.py", "copies": "1", "size": "17663", "license": "apache-2.0", "hash": 5979323538553667000, "line_mean": 38.4263392857, "line_max": 86, "alpha_frac": 0.6087301138, "autogenerated": false, "ratio": 3.1317375886...
""" Attention Factory Hacked together by / Copyright 2021 Ross Wightman """ import torch from functools import partial from .bottleneck_attn import BottleneckAttn from .cbam import CbamModule, LightCbamModule from .eca import EcaModule, CecaModule from .gather_excite import GatherExcite from .global_context import Gl...
{ "repo_name": "rwightman/pytorch-image-models", "path": "timm/models/layers/create_attn.py", "copies": "1", "size": "3633", "license": "apache-2.0", "hash": -3660059667459771400, "line_mean": 38.064516129, "line_max": 109, "alpha_frac": 0.6072116708, "autogenerated": false, "ratio": 4.10508474576...
"""Attention mechanisms. This module defines the interface of attention mechanisms and a few concrete implementations. For a gentle introduction and usage examples see the tutorial TODO. An attention mechanism decides to what part of the input to pay attention. It is typically used as a component of a recurrent netwo...
{ "repo_name": "nke001/attention-lvcsr", "path": "libs/blocks/blocks/bricks/attention.py", "copies": "1", "size": "30120", "license": "mit", "hash": 5477704904373049000, "line_mean": 38.4757536042, "line_max": 78, "alpha_frac": 0.6508300133, "autogenerated": false, "ratio": 4.386194844910441, "c...
# ATTENTION: The code in this file is highly EXPERIMENTAL. # Adventurous users should note that the APIs will probably change. """onnx optimizer This enables users to optimize their models. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__...
{ "repo_name": "mlperf/training_results_v0.6", "path": "Fujitsu/benchmarks/resnet/implementations/mxnet/3rdparty/onnx-tensorrt/third_party/onnx/onnx/optimizer.py", "copies": "1", "size": "1526", "license": "apache-2.0", "hash": 4766287612232548000, "line_mean": 28.9215686275, "line_max": 101, "alpha_f...
# at terminal window, run: # python track_uscis_rd.py <rd_process_center argument> <rd_date_start argument> <rd_date_end argument> <rd_form argument> import re import mechanize from lxml import html from bs4 import BeautifulSoup import os import sys from termcolor import colored import glob from time import gmtime,...
{ "repo_name": "tianchuliang/my_util", "path": "track_uscis_rd.py", "copies": "1", "size": "5590", "license": "mit", "hash": 4430383382748590000, "line_mean": 33.9375, "line_max": 133, "alpha_frac": 0.6241502683, "autogenerated": false, "ratio": 2.7442317133038783, "config_test": false, "has_n...
# at terminal window, run: # python track_uscis_receipt_no.py <receipt_num_start> <number_of_receipts> <target_form_type> import re import mechanize from lxml import html from bs4 import BeautifulSoup import os import sys from termcolor import colored import glob from time import gmtime, strftime import datetime im...
{ "repo_name": "tianchuliang/my_util", "path": "track_uscis_receipt_no.py", "copies": "1", "size": "3226", "license": "mit", "hash": 5610696897448368000, "line_mean": 32.6145833333, "line_max": 160, "alpha_frac": 0.6385616863, "autogenerated": false, "ratio": 2.938069216757741, "config_test": fa...
# At the 64-bit Anaconda prompt, "activate my-rdkit-env" first. import sys from rdkit import Chem from io import StringIO import common class MyAromaticSmilesWriter(common.AromaticSmilesWriter): def getoutput(self, smi): m = Chem.MolFromSmiles(smi) if m is None: return "" ...
{ "repo_name": "nextmovesoftware/smilesreading", "path": "scripts/RDKit.py", "copies": "1", "size": "1948", "license": "bsd-2-clause", "hash": -7929839737922268000, "line_mean": 33.4181818182, "line_max": 73, "alpha_frac": 0.5882956879, "autogenerated": false, "ratio": 3.4055944055944054, "confi...
# at the moment, this file isn't used. All configuration parameters are located in the cralgo.py file import operator as op import itertools # Initial conditions start_time = '01-01-2017 00:00' # MM-DD-YYYY HH:MM format (military time). GMT timezone end_time = '01-01-2018 00:00' # MM-DD-YYYY HH:MM format (m...
{ "repo_name": "Shutch/Cralgo", "path": "cralgo/config.py", "copies": "1", "size": "1678", "license": "mit", "hash": -1884570414998841900, "line_mean": 38.023255814, "line_max": 102, "alpha_frac": 0.5399284863, "autogenerated": false, "ratio": 2.975177304964539, "config_test": false, "has_no_k...
# At the time of writing, unicurses just doesn't work on Windows (pdcurses.dll # lookup is wrong) # This module provides escape sequences for terminal colors import os _DEFAULT = b'\x1B[0m' class _ColorMethod(object): def __init__(self, code): self._code = code def __get__(self, obj, type=None): ...
{ "repo_name": "pombredanne/timyd", "path": "timyd/console.py", "copies": "1", "size": "1115", "license": "mit", "hash": -4738208748202939000, "line_mean": 21.7551020408, "line_max": 78, "alpha_frac": 0.5730941704, "autogenerated": false, "ratio": 3.1766381766381766, "config_test": false, "has...
# At the top. import sphinx_bootstrap_theme # -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup ---------------...
{ "repo_name": "psychrometrics/psychrolib", "path": "docs/sphinx/conf.py", "copies": "1", "size": "5453", "license": "mit", "hash": -1123750895907104900, "line_mean": 32.8757763975, "line_max": 82, "alpha_frac": 0.6464331561, "autogenerated": false, "ratio": 3.7374914324880053, "config_test": fa...
"""AtThirty URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/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-ba...
{ "repo_name": "AjayHao/AtThirty", "path": "AtThirty/urls.py", "copies": "1", "size": "2021", "license": "mit", "hash": -6534309756124921000, "line_mean": 42, "line_max": 77, "alpha_frac": 0.6259277585, "autogenerated": false, "ratio": 3.2336, "config_test": false, "has_no_keywords": false, ...
# at this stage in the book we haven't actually installed matplotlib, # comment this out if you need to from matplotlib import pyplot as plt ########################## # # # FINDING KEY CONNECTORS # # # ########################## users = [ { "id": 0, "name": "Hero" },...
{ "repo_name": "trenton3983/Data_Science_from_Scratch", "path": "code-python3/introduction.py", "copies": "6", "size": "8194", "license": "unlicense", "hash": 8313053104128269000, "line_mean": 31.3873517787, "line_max": 87, "alpha_frac": 0.5400292897, "autogenerated": false, "ratio": 3.33631921824...
"""attic URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/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-based...
{ "repo_name": "SkySchermer/uweclang", "path": "django/src/attic/urls.py", "copies": "1", "size": "1456", "license": "mit", "hash": -9031290404592725000, "line_mean": 47.5333333333, "line_max": 119, "alpha_frac": 0.6641483516, "autogenerated": false, "ratio": 3.20704845814978, "config_test": fal...
"""attitude constraint corrections Revision ID: 420f9b8b9e Revises: 162f93d4393 Create Date: 2015-06-24 16:52:02.606637 """ # revision identifiers, used by Alembic. revision = '420f9b8b9e' down_revision = '162f93d4393' branch_labels = None depends_on = None from alembic import op def upgrade(): op.drop_constr...
{ "repo_name": "kkamkou/gitmostwanted.com", "path": "migration/versions/420f9b8b9e_attitude_constraint_corrections.py", "copies": "1", "size": "1048", "license": "mit", "hash": 5627134195796560000, "line_mean": 31.75, "line_max": 89, "alpha_frac": 0.6583969466, "autogenerated": false, "ratio": 2.9...
''' Attitude discipline for CADRE. ''' from six.moves import range import numpy as np from openmdao.core.component import Component from CADRE.kinematics import computepositionrotd, computepositionrotdjacobian # Allow non-standard variable names for scientific calc # pylint: disable=C0103 class Attitude_Angular(C...
{ "repo_name": "hschilling/CADRE-1", "path": "src/CADRE/attitude.py", "copies": "1", "size": "22488", "license": "apache-2.0", "hash": -5147041392915192000, "line_mean": 32.7657657658, "line_max": 88, "alpha_frac": 0.4174226254, "autogenerated": false, "ratio": 3.0339989206691853, "config_test":...
"""Attitude reconstruction example.""" import yaipopt import numpy as np import sympy import sym2num from numpy import ma from scipy import integrate, interpolate, signal, stats from ceacoest import kalman, sde, utils class SymbolicModel(sde.SymbolicModel): """Symbolic SDE model.""" var_names = {'t', ...
{ "repo_name": "dimasad/ceacoest", "path": "examples/attitude.py", "copies": "2", "size": "9068", "license": "mit", "hash": 4090559878153489400, "line_mean": 32.7100371747, "line_max": 80, "alpha_frac": 0.4996691663, "autogenerated": false, "ratio": 2.6049985636311406, "config_test": false, "h...
"""Attitude reconstruction of an ArduPilot Mega.""" import os import re import yaipopt import numpy as np import sympy import sym2num from numpy import ma from scipy import interpolate from ceacoest import kalman, sde, utils class SymbolicModel(sde.SymbolicModel): """Symbolic SDE model.""" var_names ...
{ "repo_name": "dimasad/apm-estimation", "path": "attitude.py", "copies": "1", "size": "8734", "license": "mit", "hash": -7044896596579060000, "line_mean": 32.4636015326, "line_max": 80, "alpha_frac": 0.4965651477, "autogenerated": false, "ratio": 2.6362813160277696, "config_test": false, "has...
"""Attitude reconstruction of an Ascention Technology trakSTAR sensor.""" import os import yaipopt import numpy as np import sympy import sym2num from numpy import ma from scipy import io from ceacoest import kalman, sde, utils class SymbolicModel(sde.SymbolicModel): """Symbolic SDE model.""" var_nam...
{ "repo_name": "dimasad/corujas", "path": "pem.py", "copies": "1", "size": "5626", "license": "mit", "hash": 408456086512305660, "line_mean": 30.2555555556, "line_max": 78, "alpha_frac": 0.522929257, "autogenerated": false, "ratio": 2.757843137254902, "config_test": false, "has_no_keywords": f...
"""A Ttk Notebook with close buttons. Based on an example by patthoyts, http://paste.tclers.tk/896 """ import datetime import os import Tkinter as tk import ttk import os.path from tkFileDialog import askopenfilename import tkSimpleDialog import configuration import pcwg_tool import Analysis from gui.utils import * im...
{ "repo_name": "peterdougstuart/PCWG", "path": "test-gui/pcwg_tool_reborn.py", "copies": "3", "size": "19571", "license": "mit", "hash": -428638948834878500, "line_mean": 30.8227642276, "line_max": 137, "alpha_frac": 0.5853558837, "autogenerated": false, "ratio": 3.7832978929054706, "config_test...
"""A Ttk Notebook with close buttons. Based on an example by patthoyts, http://paste.tclers.tk/896 """ import os import Tkinter as tk import ttk import os.path from tkFileDialog import * import tkMessageBox import tkSimpleDialog #http://effbot.org/tkbook/menu.htm class Analysis: def __init__(self, fileName): ...
{ "repo_name": "lcameron05/PCWG", "path": "test-gui/closable_Tab_with_menu.py", "copies": "3", "size": "12573", "license": "mit", "hash": -301020007839592400, "line_mean": 26.7571743929, "line_max": 132, "alpha_frac": 0.5938121371, "autogenerated": false, "ratio": 3.5912596401028276, "config_tes...
"""A Ttk Notebook with close buttons. Based on an example by patthoyts, http://paste.tclers.tk/896 """ import os import Tkinter import ttk root = Tkinter.Tk() imgdir = os.path.join(os.path.dirname(__file__), 'img') i1 = Tkinter.PhotoImage("img_close", file=os.path.join(imgdir, 'close.gif')) i2 = Tkinter.PhotoImage("...
{ "repo_name": "dexterx17/nodoSocket", "path": "clients/Python-2.7.6/Demo/tkinter/ttk/notebook_closebtn.py", "copies": "10", "size": "2527", "license": "mit", "hash": -2158715972527956000, "line_mean": 31.3974358974, "line_max": 79, "alpha_frac": 0.610605461, "autogenerated": false, "ratio": 3.260...
from Behaviour import Behaviour from lwmath.Vector import Vector class Attraction(Behaviour): def __init__(self, radius=1000, strength=100.0): self.target = Vector() self.radius = radius self.strength = strength self._delta = Vector() self.setRadius(self.radius) ...
{ "repo_name": "gregroper/Pycipia", "path": "behaviour/Attraction.py", "copies": "1", "size": "1041", "license": "mit", "hash": -9118255832838071000, "line_mean": 28.7428571429, "line_max": 66, "alpha_frac": 0.6013448607, "autogenerated": false, "ratio": 3.9283018867924526, "config_test": false,...
# Attract mode Scriptlet for STTNG from mpf.system.scriptlet import Scriptlet from mpf.system.show_controller import Playlist class Attract(Scriptlet): def on_load(self): self.machine.events.add_handler('machineflow_Attract_start', self.start) self.machine.events.add_handler('machineflow_Attract...
{ "repo_name": "GabeKnuth/STTNG", "path": "scriptlets/attract.py", "copies": "1", "size": "2312", "license": "mit", "hash": -3370643827637617700, "line_mean": 38.186440678, "line_max": 81, "alpha_frac": 0.6388408304, "autogenerated": false, "ratio": 3.312320916905444, "config_test": false, "ha...
ATTRIB_DATA = """ Faction|Amarr Empire|Caldari State|Gallente Federation|Minmatar Republic|Angel Cartel|Serpentis|Guristas|Sansha's Nation|Blood Raider Covenant|Outer Ring Excavations Meta Group|T1|T2|Empire Faction|Pirate Faction|Deadspace Profession|Combat|Mining|Industry|Exploration Miscellaneous|Credit-Only|Monocle...
{ "repo_name": "fsufitch/eve-shipspinning", "path": "models/default_attribs.py", "copies": "1", "size": "1345", "license": "mit", "hash": -9064605418605556000, "line_mean": 38.5588235294, "line_max": 165, "alpha_frac": 0.6252788104, "autogenerated": false, "ratio": 3.3209876543209877, "config_te...
#attribute 12dicts appropriately #make dictionary loading choice class WordList: ''' Provides subsets of words from an internal dictionary of words Internal Dictionary based on 12dicts ''' def __init__(self): self._words = self._load_words() def __iter__(self): for word in s...
{ "repo_name": "kobejohn/BookwormUtility", "path": "wordlist.py", "copies": "1", "size": "2133", "license": "mit", "hash": -4297200148732603400, "line_mean": 27.8243243243, "line_max": 72, "alpha_frac": 0.5410220347, "autogenerated": false, "ratio": 4.09404990403071, "config_test": false, "has...
""" Attribute and method access on Python objects from C++. Note: std::cout type operations currently crash python... Not sure what is up with this... """ from __future__ import absolute_import, print_function import scipy.weave as weave #----------------------------------------------------------------...
{ "repo_name": "newemailjdm/scipy", "path": "scipy/weave/examples/object.py", "copies": "100", "size": "1679", "license": "bsd-3-clause", "hash": 3781669792563363300, "line_mean": 26.9833333333, "line_max": 77, "alpha_frac": 0.4377605718, "autogenerated": false, "ratio": 4.075242718446602, "conf...
""" Attribute and method access on Python objects from C++. Note: std::cout type operations currently crash python... Not sure what is up with this... """ import scipy.weave as weave #---------------------------------------------------------------------------- # get/set attribute and call methods exampl...
{ "repo_name": "jasonmccampbell/scipy-refactor", "path": "scipy/weave/examples/object.py", "copies": "12", "size": "1619", "license": "bsd-3-clause", "hash": -4255223307918579000, "line_mean": 27.9107142857, "line_max": 77, "alpha_frac": 0.427424336, "autogenerated": false, "ratio": 4.078085642317...
# Attribute basis to MRL - (do not individually apply to MTP) # http://www.music.mcgill.ca/~jason/mumt621/papers5/fujishima_1999.pdf ? # https://www.jstor.org/stable/pdf/40285717.pdf # Zicheng (Brian) Gao from MusicRoll import * import TensionModule import PPMBasis import numpy as np import pickle import pprint fro...
{ "repo_name": "ichaelm/MusicPrediction", "path": "src/midibasis.py", "copies": "1", "size": "9495", "license": "mit", "hash": -2509689958420297700, "line_mean": 30.7591973244, "line_max": 126, "alpha_frac": 0.6614007372, "autogenerated": false, "ratio": 2.909898866074165, "config_test": false, ...
"""Attribute implementation for _Dispatch classes. The various listener targets for a particular event class are represented as attributes, which refer to collections of listeners to be fired off. These collections can exist at the class level as well as at the instance level. An event is fired off using code like th...
{ "repo_name": "mitsuhiko/sqlalchemy", "path": "lib/sqlalchemy/event/attr.py", "copies": "2", "size": "11965", "license": "mit", "hash": -8599331259657875000, "line_mean": 31.7808219178, "line_max": 77, "alpha_frac": 0.5982448809, "autogenerated": false, "ratio": 4.1938310550297935, "config_test...
"""Attribute/instance expiration, deferral of attributes, etc.""" from sqlalchemy.testing import eq_, assert_raises, assert_raises_message from sqlalchemy.testing.util import gc_collect import sqlalchemy as sa from sqlalchemy import testing from sqlalchemy import Integer, String, ForeignKey, exc as sa_exc, FetchedValu...
{ "repo_name": "robin900/sqlalchemy", "path": "test/orm/test_expire.py", "copies": "2", "size": "50809", "license": "mit", "hash": 3924879550385398300, "line_mean": 32.7153284672, "line_max": 123, "alpha_frac": 0.5622232282, "autogenerated": false, "ratio": 4.016521739130435, "config_test": true...
"""Attribute/instance expiration, deferral of attributes, etc.""" from sqlalchemy.test.testing import eq_, assert_raises, assert_raises_message from sqlalchemy.test.util import gc_collect import sqlalchemy as sa from sqlalchemy.test import testing from sqlalchemy import Integer, String, ForeignKey, exc as sa_exc from ...
{ "repo_name": "obeattie/sqlalchemy", "path": "test/orm/test_expire.py", "copies": "1", "size": "35601", "license": "mit", "hash": 5676430808786989000, "line_mean": 33.1005747126, "line_max": 122, "alpha_frac": 0.5752085616, "autogenerated": false, "ratio": 3.936421937195931, "config_test": true...
"""Attribute/instance expiration, deferral of attributes, etc.""" import sqlalchemy as sa from sqlalchemy import exc as sa_exc from sqlalchemy import FetchedValue from sqlalchemy import ForeignKey from sqlalchemy import inspect from sqlalchemy import Integer from sqlalchemy import String from sqlalchemy import testing...
{ "repo_name": "sqlalchemy/sqlalchemy", "path": "test/orm/test_expire.py", "copies": "3", "size": "62125", "license": "mit", "hash": -8323893350973690000, "line_mean": 28.7391096218, "line_max": 79, "alpha_frac": 0.5433239437, "autogenerated": false, "ratio": 4.093364960137049, "config_test": tr...
""" attribute.py Provides functions for creating simple properties. If, inside a class definition, you write: attribute(foo=1, bar=2) simple properties named 'foo' and 'bar' are created for this class. Also, private instance variables '__foo' and '__bar' will be added to instances of this class. USEAGE: #...
{ "repo_name": "ActiveState/code", "path": "recipes/Python/157768_Automating_simple_property/recipe-157768.py", "copies": "1", "size": "3957", "license": "mit", "hash": -6295531705713396000, "line_mean": 31.975, "line_max": 78, "alpha_frac": 0.6194086429, "autogenerated": false, "ratio": 3.6706864...
"""Attributes common to PolyData and Grid Objects.""" import collections import logging import warnings from weakref import proxy import numpy as np import vtk from vtk.util.numpy_support import numpy_to_vtk, vtk_to_numpy import pyvista from pyvista.utilities import (FieldAssociation, convert_array, get_array, ...
{ "repo_name": "akaszynski/vtkInterface", "path": "pyvista/core/common.py", "copies": "1", "size": "53338", "license": "mit", "hash": -5678833343762723000, "line_mean": 32.4827369743, "line_max": 147, "alpha_frac": 0.5759683528, "autogenerated": false, "ratio": 4.211781427668983, "config_test": ...
"""Attribute selector plugin. Oftentimes when testing you will want to select tests based on criteria rather then simply by filename. For example, you might want to run all tests except for the slow ones. You can do this with the Attribute selector plugin by setting attributes on your test methods. Here is an example:...
{ "repo_name": "yongshengwang/hue", "path": "build/env/lib/python2.7/site-packages/nose-0.11.3-py2.7.egg/nose/plugins/attrib.py", "copies": "4", "size": "9857", "license": "apache-2.0", "hash": -5700206111975440000, "line_mean": 33.2256944444, "line_max": 80, "alpha_frac": 0.5426600386, "autogenerat...
"""Attributes for auto-completion.""" from typing import List from typing import Optional from typing import TYPE_CHECKING from beancount.core.data import Entries from beancount.core.data import Transaction from beancount.core.getters import get_active_years as getters_get_active_years from beancount.core.getters impo...
{ "repo_name": "beancount/fava", "path": "src/fava/core/attributes.py", "copies": "2", "size": "3759", "license": "mit", "hash": -1591602126895865600, "line_mean": 34.4622641509, "line_max": 79, "alpha_frac": 0.628358606, "autogenerated": false, "ratio": 3.7627627627627627, "config_test": false,...
"""Attributes for auto-completion.""" from typing import List from beancount.core import getters from beancount.core.data import Entries from beancount.core.data import Transaction from fava.core.module_base import FavaModule from fava.util.date import FiscalYearEnd from fava.util.ranking import ExponentialDecayRanke...
{ "repo_name": "aumayr/beancount-web", "path": "src/fava/core/attributes.py", "copies": "1", "size": "3383", "license": "mit", "hash": -5034807808477338000, "line_mean": 33.8762886598, "line_max": 75, "alpha_frac": 0.6180904523, "autogenerated": false, "ratio": 3.767260579064588, "config_test": ...
"""Defines SQLAlchemy's system of class instrumentation.. This module is usually not directly visible to user applications, but defines a large part of the ORM's interactivity. SQLA's instrumentation system is completely customizable, in which case an understanding of the general mechanics of this module is helpful. ...
{ "repo_name": "obeattie/sqlalchemy", "path": "lib/sqlalchemy/orm/attributes.py", "copies": "1", "size": "62613", "license": "mit", "hash": -5276984382939762000, "line_mean": 35.7016412661, "line_max": 110, "alpha_frac": 0.6108156453, "autogenerated": false, "ratio": 4.519815202483216, "config_t...
import operator, weakref from itertools import chain import UserDict from sqlalchemy import util from sqlalchemy.orm import interfaces, collections from sqlalchemy.orm.util import identity_equal from sqlalchemy import exceptions PASSIVE_NORESULT = util.symbol('PASSIVE_NORESULT') ATTR_WAS_SET = util.symbol('ATTR_WAS_S...
{ "repo_name": "carlgao/lenga", "path": "images/lenny64-peon/usr/share/python-support/python-sqlalchemy/sqlalchemy/orm/attributes.py", "copies": "1", "size": "46232", "license": "mit", "hash": 548088894391894660, "line_mean": 34.7003861004, "line_max": 226, "alpha_frac": 0.6129304378, "autogenerated...
import weakref, threading, operator from itertools import chain import UserDict from sqlalchemy import util from sqlalchemy.orm import interfaces, collections from sqlalchemy.orm.util import identity_equal from sqlalchemy import exceptions PASSIVE_NORESULT = object() ATTR_WAS_SET = object() NO_VALUE = object() NEVER_...
{ "repo_name": "santisiri/popego", "path": "envs/ALPHA-POPEGO/lib/python2.5/site-packages/SQLAlchemy-0.4.3-py2.5.egg/sqlalchemy/orm/attributes.py", "copies": "1", "size": "43456", "license": "bsd-3-clause", "hash": -1148292408318795000, "line_mean": 34.5613747954, "line_max": 244, "alpha_frac": 0.6137...
import weakref, threading import UserDict from sqlalchemy import util from sqlalchemy.orm import interfaces, collections from sqlalchemy.orm.mapper import class_mapper from sqlalchemy import exceptions PASSIVE_NORESULT = object() ATTR_WAS_SET = object() NO_VALUE = object() class InstrumentedAttribute(interfaces.Pro...
{ "repo_name": "santisiri/popego", "path": "envs/ALPHA-POPEGO/lib/python2.5/site-packages/SQLAlchemy-0.4.0-py2.5.egg/sqlalchemy/orm/attributes.py", "copies": "1", "size": "39285", "license": "bsd-3-clause", "hash": 5839364163224691000, "line_mean": 35.0082493126, "line_max": 167, "alpha_frac": 0.58477...
# Attribute --> Stat bonus/penalty mapping methods def mgt_to_atk(mgt): if mgt <= 4: return "1d2" elif mgt <= 8: return "1d4" elif mgt <= 10: return "1d6" elif mgt <= 12: return "1d8" elif mgt <= 14: return "1d10" elif mgt <= 16: return "1d12" elif mgt <= 18: return "1d6+1d8" elif mgt <= 20: re...
{ "repo_name": "mouseroot/Otrera", "path": "Code/attMappings.py", "copies": "1", "size": "2527", "license": "apache-2.0", "hash": 5631716055785649000, "line_mean": 14.0416666667, "line_max": 50, "alpha_frac": 0.6086268302, "autogenerated": false, "ratio": 2.178448275862069, "config_test": false,...
# Attribute TIMEX2 TIMEX3 #--------------------------------- # ID None tid ('t' + ID) # value val value # mod mod mod # type set type # (only if type=set) # freq None freq # quant None quan...
{ "repo_name": "jo-fu/TimeLineCurator", "path": "ternip/timex.py", "copies": "3", "size": "1837", "license": "mit", "hash": -3481613535321094700, "line_mean": 30.8392857143, "line_max": 78, "alpha_frac": 0.5209580838, "autogenerated": false, "ratio": 3.984815618221258, "config_test": false, "h...
"""Attribute validatior""" import flask import ggrc.models import ggrc.access_control from ggrc import db from ggrc.utils import benchmark from ggrc.models.reflection import AttributeInfo class AttributeValidator(object): """Adds methods needed for attribute name vaidation""" # pylint: disable=too-few-public-met...
{ "repo_name": "AleksNeStu/ggrc-core", "path": "src/ggrc/models/mixins/attributevalidator.py", "copies": "1", "size": "2906", "license": "apache-2.0", "hash": 2971662961646752000, "line_mean": 38.2702702703, "line_max": 79, "alpha_frac": 0.6754989677, "autogenerated": false, "ratio": 3.99724896836...
"""Attribute-value matrix.""" from matcher import Matcher from pymachine.machine import Machine from pyparsing import * import logging class AVM(object): TYPE, REQUIRED, DEFAULT, VALUE = xrange(4) RREQ, ROPT, RNEG = xrange(1, -2, -1) def __init__(self, name): self.name = name self.__data ...
{ "repo_name": "Eszti/pymachine", "path": "src/pymachine/avm.py", "copies": "3", "size": "4928", "license": "mit", "hash": 502940020530876500, "line_mean": 31.8533333333, "line_max": 91, "alpha_frac": 0.5073051948, "autogenerated": false, "ratio": 4.059308072487644, "config_test": false, "has_...
# attribution https://thihara.github.io/Django-Req-Parsing/ import time from random import randint import logging from django.http import HttpResponseBadRequest from django.utils.deprecation import MiddlewareMixin from django.http import HttpResponse from gwells.settings.base import get_env_variable logger = loggin...
{ "repo_name": "bcgov/gwells", "path": "app/backend/gwells/middleware.py", "copies": "1", "size": "1200", "license": "apache-2.0", "hash": 395920648164291260, "line_mean": 26.2727272727, "line_max": 59, "alpha_frac": 0.6091666667, "autogenerated": false, "ratio": 4.270462633451957, "config_test"...
import pdb class ENTSfeatures(): def __init__(self, subcell_info, odds_dict, proteins, domine_interactions, protein_domain_dict, protein_gene_dict, entreztoensembl, domain_cols, svm_subcell_cols, svm_detail_cols): """Object to return a feature vector for a given protein p...
{ "repo_name": "gngdb/opencast-bio", "path": "ocbio/ents.py", "copies": "1", "size": "8267", "license": "mit", "hash": 7866148477981778000, "line_mean": 48.502994012, "line_max": 143, "alpha_frac": 0.5676787226, "autogenerated": false, "ratio": 3.5803378085751407, "config_test": false, "has_no...
# attrz, (C) 2015 Harshavardhana. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
{ "repo_name": "harshavardhana/attrz", "path": "setup.py", "copies": "1", "size": "1832", "license": "apache-2.0", "hash": 5674238181315570000, "line_mean": 36.387755102, "line_max": 84, "alpha_frac": 0.673580786, "autogenerated": false, "ratio": 3.991285403050109, "config_test": false, "has_n...
"""A TVTK interactor scene widget. This class only uses TVTK and Traits. It does not even use any Pyface widgets. This is nice when you want to create a raw TVTK window but with some nice funcationality that is similar to the widgets. It is also the base class for the toolkit specific classes since it implements th...
{ "repo_name": "liulion/mayavi", "path": "tvtk/pyface/tvtk_scene.py", "copies": "2", "size": "35476", "license": "bsd-3-clause", "hash": -1374724449480720000, "line_mean": 37.0235798499, "line_max": 112, "alpha_frac": 0.5597868982, "autogenerated": false, "ratio": 4.122719349215572, "config_test...
"""A tvtk pipeline browser. An abstract `TreeGenerator` class defines the interface of a tree generator. This class is responsible for generating the list of children. Often tvtk object's children are collections of various objects, some sequences and some simple objects. In order to provide a unified interface to ...
{ "repo_name": "alexandreleroux/mayavi", "path": "tvtk/pipeline/browser.py", "copies": "3", "size": "29233", "license": "bsd-3-clause", "hash": 9132788576032677000, "line_mean": 35.54125, "line_max": 79, "alpha_frac": 0.502445866, "autogenerated": false, "ratio": 4.592772977219167, "config_test"...
""" A TVTK render window scene UI plugin. """ # Enthought library imports. from envisage.api import Plugin from traits.api import List class SceneUIPlugin(Plugin): """ A TVTK render window scene UI plugin. This is the plugin that contributes actions, menus, preferences pages etc. """ # Extens...
{ "repo_name": "liulion/mayavi", "path": "tvtk/plugins/scene/ui/scene_ui_plugin.py", "copies": "5", "size": "1491", "license": "bsd-3-clause", "hash": -6605028382514468000, "line_mean": 25.1578947368, "line_max": 79, "alpha_frac": 0.5761234071, "autogenerated": false, "ratio": 4.176470588235294, ...
""" A TVTK scene editor. """ # Author: Prabhu Ramachandran <prabhu_r@users.sf.net> # Copyright (c) 2005, Enthought, Inc. # License: BSD Style. # Enthought library imports. from apptools.preferences.api import get_default_preferences from tvtk.pyface.tvtk_scene import TVTKScene from tvtk.pyface.api import DecoratedSc...
{ "repo_name": "dmsurti/mayavi", "path": "tvtk/plugins/scene/scene_editor.py", "copies": "2", "size": "3381", "license": "bsd-3-clause", "hash": 1895553751413019100, "line_mean": 31.5096153846, "line_max": 79, "alpha_frac": 0.5226264419, "autogenerated": false, "ratio": 4.722067039106145, "confi...
"""A two dimensional table having row and column headers.""" from __future__ import print_function from __future__ import absolute_import import copy from .display import H2ODisplay from .utils.shared_utils import _is_list_of_lists, can_use_pandas class H2OTwoDimTable(object): """A class representing an 2D table (f...
{ "repo_name": "YzPaul3/h2o-3", "path": "h2o-py/h2o/two_dim_table.py", "copies": "1", "size": "3819", "license": "apache-2.0", "hash": -717793542187626100, "line_mean": 39.6382978723, "line_max": 119, "alpha_frac": 0.6554071747, "autogenerated": false, "ratio": 3.446750902527076, "config_test": ...
"""A two-dimension grid of numeric values, used for input and output to a stencil kernel. """ import numpy import math class StencilGrid(object): def __init__(self, size): self.dim = len(size) self.data = numpy.zeros(size) self.shape = size self.ghost_depth = 1 self.set_g...
{ "repo_name": "mbdriscoll/asp-old", "path": "specializers/stencil/stencil_grid.py", "copies": "2", "size": "2970", "license": "bsd-3-clause", "hash": 6041666372925128000, "line_mean": 30.935483871, "line_max": 102, "alpha_frac": 0.5912457912, "autogenerated": false, "ratio": 3.9705882352941178, ...
"""A two-dimension grid of numeric values, used for input and output to a stencil kernel. """ import numpy import math class StencilGrid(object): def __init__(self, size): self.dim = len(size) self.data = numpy.zeros(size) self.shape = size self.ghost_depth = 1 self.set_...
{ "repo_name": "mbdriscoll/ctree", "path": "examples/stencil_grid/stencil_grid.py", "copies": "2", "size": "3046", "license": "bsd-2-clause", "hash": -1937327913148585200, "line_mean": 31.0631578947, "line_max": 102, "alpha_frac": 0.5912672357, "autogenerated": false, "ratio": 4.06675567423231, ...
"""A two-way, reliable communication channel. Byte arrays can be read and written; asyncio based implementation """ import struct import asyncio from abc import ABCMeta, abstractmethod import saltchannel.util as util from .exceptions import ComException, BadPeer class ByteChannel(metaclass=ABCMeta): def __init_...
{ "repo_name": "assaabloy-ppi/salt-channel-python", "path": "saltchannel/channel.py", "copies": "1", "size": "2995", "license": "mit", "hash": -7243546980260357000, "line_mean": 29.5714285714, "line_max": 101, "alpha_frac": 0.6060100167, "autogenerated": false, "ratio": 3.998664886515354, "confi...
"""A `Type` and `Op` classes to work with numpy.ndarrays symbolically.""" from __future__ import absolute_import, print_function, division from six.moves import builtins import sys import warnings import numpy from six import integer_types from six.moves import xrange import numbers import theano from theano.compat ...
{ "repo_name": "JazzeYoung/VeryDeepAutoEncoder", "path": "theano/tensor/basic.py", "copies": "1", "size": "211461", "license": "bsd-3-clause", "hash": -4765078037086965000, "line_mean": 32.3482100615, "line_max": 121, "alpha_frac": 0.5681378599, "autogenerated": false, "ratio": 3.8549083948591742,...
"""A `Type` and `Op` classes to work with numpy.ndarrays symbolically.""" from six.moves import builtins import sys import warnings import numpy from six import integer_types from six.moves import xrange import numbers import theano from theano.compat import izip from theano.configparser import config from theano imp...
{ "repo_name": "surgebiswas/poker", "path": "PokerBots_2017/Johnny/theano/tensor/basic.py", "copies": "3", "size": "210812", "license": "mit", "hash": -2067400171024641000, "line_mean": 32.3880266075, "line_max": 121, "alpha_frac": 0.5680653853, "autogenerated": false, "ratio": 3.853051377186409, ...
"""A `Type` and `Op` classes to work with numpy.ndarrays symbolically.""" from six.moves import builtins import sys import warnings import numpy from six.moves import xrange import numbers import theano from theano.compat import izip from theano.configparser import config from theano import gof from theano.gof import...
{ "repo_name": "cmdunkers/DeeperMind", "path": "PythonEnv/lib/python2.7/site-packages/theano/tensor/basic.py", "copies": "1", "size": "205429", "license": "bsd-3-clause", "hash": 8055024834781171000, "line_mean": 32.2140662894, "line_max": 121, "alpha_frac": 0.5674028496, "autogenerated": false, "...
"""A `Type` and `Op` classes to work with numpy.ndarrays symbolically.""" import sys import warnings import numpy from six.moves import xrange import numbers import theano from theano.compat import izip from theano.configparser import config from theano import gof from theano.gof import Apply, Constant, Op, Variable...
{ "repo_name": "nke001/attention-lvcsr", "path": "libs/Theano/theano/tensor/basic.py", "copies": "1", "size": "197364", "license": "mit", "hash": -2563540603326548500, "line_mean": 33.6678376954, "line_max": 121, "alpha_frac": 0.5703927768, "autogenerated": false, "ratio": 3.8112194650960705, "c...
""" a type of plots used so frequently that I think they merit their own utility """ __author__ = 'Tom Schaul, tom@idsia.ch' import pylab from pylab import xlabel, ylabel, legend, plot, semilogy from scipy import array, zeros plotsymbols = ['-', ':', '-.'] psymbol = '-' def plotFitnessProgession(fitdict, batc...
{ "repo_name": "daanwierstra/pybrain", "path": "pybrain/tools/plotting/fitnessprogression.py", "copies": "1", "size": "3513", "license": "bsd-3-clause", "hash": 639755814044554500, "line_mean": 32.1509433962, "line_max": 91, "alpha_frac": 0.5337318531, "autogenerated": false, "ratio": 4.3051470588...
# A type representing an image - this wraps the underlying C++ image type # exposed via fract4dmodule and provides some higher-level options around it import os try: import fract4dcgmp as fract4dc except ImportError, err: import fract4dc file_types = { ".jpg" : fract4dc.FILE_TYPE_JPG, ".jpeg" : fract...
{ "repo_name": "ericchill/gnofract4d", "path": "fract4d/image.py", "copies": "1", "size": "5511", "license": "bsd-3-clause", "hash": -3900973267689917400, "line_mean": 28.1587301587, "line_max": 84, "alpha_frac": 0.5646888042, "autogenerated": false, "ratio": 3.136596471257826, "config_test": fa...
'''Atypes is built on top of multimethods, which is in turn built on top of atypes. To resolve this cyclic dependencies, we use Pythons type system to create a low-functionality (cold) atypes-like systems. The cold atypes can then be used to construct a cold multimethods as used in the boostraping process. ...
{ "repo_name": "matthagy/Jamenson", "path": "jamenson/runtime/atypes/cold.py", "copies": "1", "size": "1402", "license": "apache-2.0", "hash": 5627593077249432000, "line_mean": 27.612244898, "line_max": 92, "alpha_frac": 0.6419400856, "autogenerated": false, "ratio": 3.4362745098039214, "config_...
a = "\u0030" #unicode for 0 b = "\u00B2" #unicode for &sup2; c = "10km2" print(a.isnumeric()) print(b.isnumeric()) print(c.isnumeric()) txt = "565543" x = txt.isnumeric() print(x) a = "Hello world!" b = "hello 123" c = "mynameisPeter" print(a.islower()) print(b.islower()) print(c.islower()) txt = "hello world...
{ "repo_name": "antalpeti/Python-Tutorial", "path": "src/w3s_pg_004.py", "copies": "1", "size": "5610", "license": "mit", "hash": 2956738694532142600, "line_mean": 15.6994047619, "line_max": 153, "alpha_frac": 0.6629233512, "autogenerated": false, "ratio": 2.764908822079842, "config_test": false...
# Añadimos la raqueta de la CPU que sigue la pelota. import pygame from pong_v0 import SharedState from pong_v1 import Pong_v1 import lib.colors as Color WIDTH = 0 HEIGHT = 1 CPU_SPEED = 0.9 class CPURacket(pygame.sprite.Sprite): def __init__(self, color, width, ...
{ "repo_name": "vicente-gonzalez-ruiz/YAPT", "path": "workshops/programacion_python_ESO/pong_v2.py", "copies": "1", "size": "2575", "license": "cc0-1.0", "hash": -922051741333786000, "line_mean": 31.175, "line_max": 98, "alpha_frac": 0.5516705517, "autogenerated": false, "ratio": 3.521203830369357...
# Añadimos la raqueta del juador que se mueve con el ratón. import pygame from pong_v0 import Pong_v0 import lib.colors as Color WIDTH = 0 HEIGHT = 1 class PlayerRacket(pygame.sprite.Sprite): def __init__(self, color, width, height, display_siz...
{ "repo_name": "vicente-gonzalez-ruiz/YAPT", "path": "workshops/programacion_python_ESO/pong_v1.py", "copies": "1", "size": "2364", "license": "cc0-1.0", "hash": 8445700108988196000, "line_mean": 31.3561643836, "line_max": 98, "alpha_frac": 0.5419136325, "autogenerated": false, "ratio": 3.56797583...
# Añadimos las raquetas del jugador y de la CPU. El jugador usa el # ratón y la CPU sigue la pelota. import pygame from Pong_v0 import Pong_v0 import lib.colors as Color import random CPU_DIFFICULTY = 4 # 2 is more difficult than 1 class PlayerRacket(pygame.sprite.Sprite): def __init__(self, color, width, heigh...
{ "repo_name": "vicente-gonzalez-ruiz/YAPT", "path": "workshops/programacion_python_ESO/Pong_v1.py", "copies": "1", "size": "5285", "license": "cc0-1.0", "hash": -6917286210587525000, "line_mean": 35.1780821918, "line_max": 133, "alpha_frac": 0.5721317683, "autogenerated": false, "ratio": 3.461336...
# Añadimos puntuaciones. import pygame from Pong_v1 import Pong_v1 import lib.colors as Color class Pong_v2(Pong_v1): def __init__(self, width = 800, height = 600, caption = "A version of Pong"): super().__init__(width, height, caption) ...
{ "repo_name": "vicente-gonzalez-ruiz/YAPT", "path": "workshops/programacion_python_ESO/Pong_v2.py", "copies": "1", "size": "1124", "license": "cc0-1.0", "hash": -4687826936247811000, "line_mean": 27.7948717949, "line_max": 69, "alpha_frac": 0.5636687444, "autogenerated": false, "ratio": 3.3126843...
# Demo of running a half-duplex protocol to a device. The device never sends # unsolicited messages. An example is a communications device which responds # to AT commands. # The master sends a message to the device, which may respond with one or more # lines of data. The master assumes that the device has sent all its...
{ "repo_name": "peterhinch/micropython-async", "path": "v2/auart_hd.py", "copies": "1", "size": "3742", "license": "mit", "hash": -6905485254207354000, "line_mean": 34.3018867925, "line_max": 81, "alpha_frac": 0.6421699626, "autogenerated": false, "ratio": 3.7608040201005024, "config_test": true...
""" Auction completion task runner """ from celery.signals import task_postrun from datetime import datetime from penelophant import crud, celery from penelophant.database import db from penelophant.models.Auction import Auction as Auction_model from penelophant.models.Invoice import Invoice as Invoice_model @celery....
{ "repo_name": "kevinoconnor7/penelophant", "path": "penelophant/tasks.py", "copies": "1", "size": "1245", "license": "apache-2.0", "hash": 2045860935003055600, "line_mean": 29.3658536585, "line_max": 92, "alpha_frac": 0.7333333333, "autogenerated": false, "ratio": 3.619186046511628, "config_tes...
""" Auction helper functions """ from penelophant.models import Auction from penelophant.models import auctions from penelophant.database import db from penelophant.models.Auction import Auction from flask_restful import abort def find_subclasses(module, clazz): """ Return all the classes in a given module """ for...
{ "repo_name": "kevinoconnor7/penelophant", "path": "penelophant/helpers/auction.py", "copies": "1", "size": "1340", "license": "apache-2.0", "hash": -4066881796684643000, "line_mean": 29.4545454545, "line_max": 66, "alpha_frac": 0.6970149254, "autogenerated": false, "ratio": 3.325062034739454, ...
import suds # Auction's iPay API endpoint api_base = 'https://api.auction.co.kr/ArcheSystem/IpayService.asmx?wsdl' class AddAttributePlugin(suds.plugin.MessagePlugin): """Plugin to add the item_option_name attribute to the IpayServiceItems.""" def marshalled(self, context): body = context.envelope.ge...
{ "repo_name": "narrowcast/pyipay", "path": "pyipay/__init__.py", "copies": "1", "size": "5132", "license": "mit", "hash": 6250943742706417000, "line_mean": 41.7666666667, "line_max": 80, "alpha_frac": 0.6237334373, "autogenerated": false, "ratio": 3.784660766961652, "config_test": false, "has...
AUCTION_ITEM_CATEGORY_GENERAL = 1 AUCTION_ITEM_CATEGORY_ELECTRONICS = 2 AUCTION_ITEM_CATEGORY_MEDIA = 3 AUCTION_ITEM_CATEGORY_CLOTHING = 4 AUCTION_ITEM_CATEGORY_CHOICES = ( (AUCTION_ITEM_CATEGORY_ELECTRONICS, 'Electronics'), (AUCTION_ITEM_CATEGORY_MEDIA, 'Media'), (AUCTION_ITEM_CATEGORY_CLOTHING, 'Clothing...
{ "repo_name": "tarequeh/little-ebay", "path": "lebay/apps/lebay/constants.py", "copies": "1", "size": "2515", "license": "mit", "hash": 921785972464057500, "line_mean": 32.1052631579, "line_max": 60, "alpha_frac": 0.7161033797, "autogenerated": false, "ratio": 2.628004179728318, "config_test": ...
""" Auction Model """ from flask import g from datetime import datetime from sqlalchemy.orm.exc import NoResultFound from sqlalchemy.orm import object_session from penelophant.database import db from .Model import Model from .User import User from .Bid import Bid class Auction(Model): """ Auction data representatio...
{ "repo_name": "kevinoconnor7/penelophant", "path": "penelophant/models/Auction.py", "copies": "1", "size": "3339", "license": "apache-2.0", "hash": 3380692652957668000, "line_mean": 24.4885496183, "line_max": 99, "alpha_frac": 0.6445043426, "autogenerated": false, "ratio": 3.4745057232049947, "...