text
stringlengths
0
1.05M
meta
dict
"""Access the persistent configuration information.""" import json import os import logging class Config(object): __instance = None __config_path = os.path.expanduser('~/.config/throw/throw.json') __log = logging.getLogger(__name__ + '.Config') # Each configuration option is in one section and has so...
{ "repo_name": "rjw57/throw", "path": "throw/config.py", "copies": "1", "size": "3855", "license": "apache-2.0", "hash": -8380047467608163000, "line_mean": 36.427184466, "line_max": 96, "alpha_frac": 0.5463035019, "autogenerated": false, "ratio": 4.519343493552169, "config_test": true, "has_no...
"""Access to account statement webservice.""" import logging import time import xml.etree.ElementTree as et from contextlib import suppress from urllib.request import urlopen from ib_insync import util from ib_insync.objects import DynamicObject __all__ = ('FlexReport', 'FlexError') _logger = logging.getLogger('ib_...
{ "repo_name": "erdewit/ib_insync", "path": "ib_insync/flexreport.py", "copies": "1", "size": "4242", "license": "bsd-2-clause", "hash": -623465338225136000, "line_mean": 31.8837209302, "line_max": 95, "alpha_frac": 0.5763790665, "autogenerated": false, "ratio": 4.013245033112582, "config_test":...
"""Access to common geographic datasets Copyright (c) 2013 Clarinova. This file is licensed under the terms of the Revised BSD License, included in this distribution as LICENSE.txt """ import yaml import sys from ambry.dbexceptions import ConfigurationError class US: """ Access to US states, regions, etc. """ ...
{ "repo_name": "kball/ambry", "path": "ambry/datasets/geo.py", "copies": "1", "size": "7705", "license": "bsd-2-clause", "hash": -3344617720788776000, "line_mean": 29.9477911647, "line_max": 135, "alpha_frac": 0.5756002596, "autogenerated": false, "ratio": 4.155879180151024, "config_test": false...
"access to double and single prec SWIG wrapped FFTW module" __author__ = "Sebastian Haase <haase@msg.ucsf.edu>" __license__ = "BSD license - see LICENSE file" import Priithon_bin.sfftw as _sfftw import Priithon_bin.dfftw as _dfftw import numpy as _N _splans = {} _dplans = {} _measure = _sfftw.FFTW_ESTIMATE # ==0 # ...
{ "repo_name": "macronucleus/chromagnon", "path": "Chromagnon/Priithon/fftwseb.py", "copies": "1", "size": "12556", "license": "mit", "hash": -9146876790278282000, "line_mean": 32.2169312169, "line_max": 96, "alpha_frac": 0.5054953807, "autogenerated": false, "ratio": 3.269791666666667, "config_...
"""Access to filter bandpasses used by FSPS""" import os import numpy as np FILTER_LIST = [(1,'V','Johnson V (from Bessell 1990 via M. Blanton) - this defines V=0 for the Vega system'), (2,"U","Johnson U (from Bessell 1990 via M. Blanton)"), (3,"CFHT_B","CFHT B-band (from Blanton's kcorrect)"), ...
{ "repo_name": "jonathansick/pySPS", "path": "pysps/filters.py", "copies": "1", "size": "8093", "license": "bsd-3-clause", "hash": 8640839226606504000, "line_mean": 50.5477707006, "line_max": 110, "alpha_frac": 0.5632027678, "autogenerated": false, "ratio": 2.82084349947717, "config_test": false...
# Access to KEGG API from bioservices.kegg import KEGG import ora_msc # Define the path of metabolomics data DATA_PATH = './data/' # Stating the annotation files & modzscore files pos_annot = DATA_PATH + 'annotation_pos.txt' pos_mod = DATA_PATH + 'modzscore_pos_annotated.tsv' neg_annot = DATA_PATH + 'annotation_neg....
{ "repo_name": "Louiszr/ora_msc", "path": "scripts/background.py", "copies": "1", "size": "2278", "license": "mit", "hash": 762936314003405400, "line_mean": 42, "line_max": 135, "alpha_frac": 0.6922739245, "autogenerated": false, "ratio": 2.751207729468599, "config_test": false, "has_no_keywor...
# Access to KEGG API from bioservices.kegg import KEGG import ora_msc import matplotlib.pyplot as plt # Define the path of metabolomics data DATA_PATH = './data/' # Stating the annotation files & modzscore files pos_annot = DATA_PATH + 'annotation_pos.txt' pos_mod = DATA_PATH + 'modzscore_pos_annotated.tsv' neg_ann...
{ "repo_name": "Louiszr/ora_msc", "path": "scripts/size_distribution.py", "copies": "1", "size": "2356", "license": "mit", "hash": -5628205044505612000, "line_mean": 30.8513513514, "line_max": 124, "alpha_frac": 0.7224108659, "autogenerated": false, "ratio": 2.83855421686747, "config_test": fals...
# Access to KEGG API from bioservices.kegg import KEGG import ora_msc import random import numpy as np # Define the path of metabolomics data DATA_PATH = './data/' # Stating the annotation files & modzscore files pos_annot = DATA_PATH + 'annotation_pos.txt' pos_mod = DATA_PATH + 'modzscore_pos_annotated.tsv' neg_a...
{ "repo_name": "Louiszr/ora_msc", "path": "scripts/misident.py", "copies": "1", "size": "3229", "license": "mit", "hash": -7525956657943524000, "line_mean": 36.1264367816, "line_max": 129, "alpha_frac": 0.6512852276, "autogenerated": false, "ratio": 2.97329650092081, "config_test": false, "has...
ACCESS_TOKEN_URL = 'https://auth.aweber.com/1.0/oauth/access_token' API_BASE = 'https://api.aweber.com/1.0' AUTHORIZE_URL = 'https://auth.aweber.com/1.0/oauth/authorize' REQUEST_TOKEN_URL = 'https://auth.aweber.com/1.0/oauth/request_token' class APIException(Exception): """APIExceptions.""" class AWeberBase(obj...
{ "repo_name": "aweber/AWeber-API-Python-Library", "path": "aweber_api/base.py", "copies": "1", "size": "2754", "license": "bsd-3-clause", "hash": -8892500995200825000, "line_mean": 30.2954545455, "line_max": 71, "alpha_frac": 0.5566448802, "autogenerated": false, "ratio": 4.008733624454148, "co...
"""Access tool command lines, handling back compatibility and file type issues. Abstracts out """ import subprocess import toolz as tz from bcbio.pipeline import datadict as dd from bcbio.pipeline import config_utils def get_tabix_cmd(config): """Retrieve tabix command, handling new bcftools tabix and older tabix...
{ "repo_name": "biocyberman/bcbio-nextgen", "path": "bcbio/pipeline/tools.py", "copies": "1", "size": "1454", "license": "mit", "hash": -6699806075839547000, "line_mean": 38.2972972973, "line_max": 95, "alpha_frac": 0.6499312242, "autogenerated": false, "ratio": 3.625935162094763, "config_test":...
"""Access to Python's configuration information.""" import os import sys from os.path import pardir, realpath __all__ = [ 'get_config_h_filename', 'get_config_var', 'get_config_vars', 'get_makefile_filename', 'get_path', 'get_path_names', 'get_paths', 'get_platform', 'get_python_ve...
{ "repo_name": "IronLanguages/ironpython3", "path": "Src/StdLib/Lib/sysconfig.py", "copies": "1", "size": "25158", "license": "apache-2.0", "hash": 3062484578502443000, "line_mean": 34.186013986, "line_max": 94, "alpha_frac": 0.575999682, "autogenerated": false, "ratio": 3.8228232791369092, "con...
"""Access to realtime market information.""" from dataclasses import dataclass, field from datetime import datetime from typing import ClassVar, List, Optional, Union from eventkit import Event, Op from ib_insync.contract import Contract from ib_insync.objects import ( DOMLevel, Dividends, FundamentalRatios, Mkt...
{ "repo_name": "erdewit/ib_insync", "path": "ib_insync/ticker.py", "copies": "1", "size": "9222", "license": "bsd-2-clause", "hash": -2300298133865389800, "line_mean": 28.1835443038, "line_max": 79, "alpha_frac": 0.5975927131, "autogenerated": false, "ratio": 3.617889368379757, "config_test": fa...
"""Access to the base Slack Web API. Attributes: ALL (:py:class:`object`): Marker for cases where all child methods should be deleted by :py:func:`api_subclass_factory`. """ from copy import deepcopy import logging import aiohttp from .core import Service, UrlParamMixin from .utils import FriendlyError, rais...
{ "repo_name": "textbook/aslack", "path": "aslack/slack_api.py", "copies": "1", "size": "10598", "license": "isc", "hash": -6237074297638674000, "line_mean": 36.1859649123, "line_max": 80, "alpha_frac": 0.5536893754, "autogenerated": false, "ratio": 4.361316872427984, "config_test": false, "ha...
"""Access to the beeminder.com api""" import datetime import requests BEE42_INI_API_URL = "https://www.beeminder.com/api/v1/" class User: """A readonly Beeminder user that is loaded using the API. It provides access to the read/write goals and thus datapoints""" def __init__(self, username, token): ...
{ "repo_name": "davew/bee42", "path": "bee42/bee42.py", "copies": "1", "size": "3222", "license": "apache-2.0", "hash": 8091386503146415000, "line_mean": 34.8, "line_max": 118, "alpha_frac": 0.60955928, "autogenerated": false, "ratio": 3.7334878331402086, "config_test": false, "has_no_keywords...
# Access to the CIFAR-10 dataset. # # Some of the code is based on the cs231n data utils code # [http://cs231n.github.io/] # See https://www.cs.toronto.edu/~kriz/cifar.html for information on the # data set and its format. # # * Xs (data) are arrays of 32x33x3 arrays of pixels. Logically, the values are # between 0-2...
{ "repo_name": "eliben/deep-learning-samples", "path": "cs231n/cifar10.py", "copies": "1", "size": "2733", "license": "unlicense", "hash": -4175786139159961600, "line_mean": 34.4935064935, "line_max": 79, "alpha_frac": 0.6183680937, "autogenerated": false, "ratio": 3.1341743119266057, "config_te...
"""Access to the imageio library The following main classes of imageio expose an interface for advanced users. A brief overview: * imageio.FormatManager - for keeping track of registered formats. * imageio.Format - representation of a file format reader/writer * imageio.Format.Reader - object used during the re...
{ "repo_name": "Petr-By/qtpyvis", "path": "dltb/thirdparty/imageio.py", "copies": "1", "size": "8032", "license": "mit", "hash": 6719499344711924000, "line_mean": 31.6341463415, "line_max": 77, "alpha_frac": 0.58632287, "autogenerated": false, "ratio": 4.12962962962963, "config_test": false, "...
"""Access to the sounddevice library. This library allows to use sound devices for recording and playback. The library is based on the PortAudio library [1]. [1] http://www.portaudio.com/ """ # FIXME[bug]: I am experiences frequent crashes on my office computer # (Ubuntu 16.04): # src/hostapi/alsa/pa_linux_alsa.c:...
{ "repo_name": "Petr-By/qtpyvis", "path": "dltb/thirdparty/sounddevice.py", "copies": "1", "size": "13443", "license": "mit", "hash": 2750365134079159000, "line_mean": 37.1903409091, "line_max": 77, "alpha_frac": 0.5906419698, "autogenerated": false, "ratio": 4.344861021331609, "config_test": fa...
"""Access to the soundfile library """ # third party imports import soundfile as sf # toolbox imports from ..base.sound import (Sound, SoundReader as SoundReaderBase, SoundWriter as SoundWriterBase) class SoundReader(SoundReaderBase): """A :py:class:`SoundRea...
{ "repo_name": "Petr-By/qtpyvis", "path": "dltb/thirdparty/soundfile.py", "copies": "1", "size": "1640", "license": "mit", "hash": 8925507672980002000, "line_mean": 32.4693877551, "line_max": 78, "alpha_frac": 0.6030487805, "autogenerated": false, "ratio": 4.019607843137255, "config_test": false...
"""access to verb modules (local and imported""" import sys # FIXME PYTHON2 is_python3 = sys.version_info > (3,5) import os import glob if is_python3: import importlib.util else: import imp from collections import OrderedDict from mod import log, util, dep # dictionary of "name: module" verbs = {} # diction...
{ "repo_name": "floooh/fips", "path": "mod/verb.py", "copies": "1", "size": "2849", "license": "mit", "hash": -4549220137953680000, "line_mean": 36.4868421053, "line_max": 107, "alpha_frac": 0.5749385749, "autogenerated": false, "ratio": 3.8656716417910446, "config_test": false, "has_no_keywor...
"""access to verb modules (local and imported""" import sys import os import glob import imp from collections import OrderedDict from mod import log, util, dep # dictionary of "name: module" verbs = {} # dictionary of "projname: name" proj_verbs = OrderedDict() #----------------------------------------------------...
{ "repo_name": "code-disaster/fips", "path": "mod/verb.py", "copies": "1", "size": "2426", "license": "mit", "hash": -4604501551761702400, "line_mean": 36.3230769231, "line_max": 107, "alpha_frac": 0.5812036274, "autogenerated": false, "ratio": 3.850793650793651, "config_test": false, "has_no_...
# Access WeakSet through the weakref module. # This code is separated-out because it is needed # by abc.py to load everything else at startup. from __future__ import with_statement from _weakref import ref __all__ = ['WeakSet'] class _IterationGuard(object): # This context manager registers itself in the curre...
{ "repo_name": "pombredanne/intessa", "path": "lib/intessa/vendor/weakrefset.py", "copies": "1", "size": "6344", "license": "unlicense", "hash": -7212311137005245000, "line_mean": 28.6448598131, "line_max": 78, "alpha_frac": 0.5635245902, "autogenerated": false, "ratio": 4.095545513234344, "conf...
# Access WeakSet through the weakref module. # This code is separated-out because it is needed # by abc.py to load everything else at startup. from __go__.grumpy import WeakRefType as ref __all__ = ['WeakSet'] class _IterationGuard(object): # This context manager registers itself in the current iterators of the...
{ "repo_name": "AlexEKoren/grumpy", "path": "third_party/stdlib/_weakrefset.py", "copies": "3", "size": "5931", "license": "apache-2.0", "hash": 6949381329151338000, "line_mean": 28.0735294118, "line_max": 92, "alpha_frac": 0.5565671893, "autogenerated": false, "ratio": 4.124478442280946, "confi...
# Access WeakSet through the weakref module. # This code is separated-out because it is needed # by abc.py to load everything else at startup. from '__go__/grumpy' import WeakRefType as ref __all__ = ['WeakSet'] class _IterationGuard(object): # This context manager registers itself in the current iterators of t...
{ "repo_name": "pombredanne/grumpy", "path": "grumpy-runtime-src/third_party/stdlib/_weakrefset.py", "copies": "5", "size": "5933", "license": "apache-2.0", "hash": -56669412987478340, "line_mean": 28.0833333333, "line_max": 92, "alpha_frac": 0.5563795719, "autogenerated": false, "ratio": 4.120138...
# Access WeakSet through the weakref module. # This code is separated-out because it is needed # by abc.py to load everything else at startup. from _weakref import ref from types import GenericAlias __all__ = ['WeakSet'] class _IterationGuard: # This context manager registers itself in the current iterators of ...
{ "repo_name": "brython-dev/brython", "path": "www/src/Lib/_weakrefset.py", "copies": "16", "size": "5817", "license": "bsd-3-clause", "hash": -7466073929119844000, "line_mean": 27.797029703, "line_max": 92, "alpha_frac": 0.5569881382, "autogenerated": false, "ratio": 4.108050847457627, "config_...
# Access WeakSet through the weakref module. # This code is separated-out because it is needed # by abc.py to load everything else at startup. from _weakref import ref __all__ = ['WeakSet'] class WeakSet: def __init__(self, data=None): self.data = set() def _remove(item, selfref=ref(self)): ...
{ "repo_name": "MalloyPower/parsing-python", "path": "front-end/testsuite-python-lib/Python-3.1/Lib/_weakrefset.py", "copies": "1", "size": "4257", "license": "mit", "hash": 872988750224217900, "line_mean": 28.1575342466, "line_max": 78, "alpha_frac": 0.5701198027, "autogenerated": false, "ratio":...
# Access WeakSet through the weakref module. # This code is separated-out because it is needed # by abc.py to load everything else at startup. from weakref import ref __all__ = ['WeakSet'] class _IterationGuard: # This context manager registers itself in the current iterators of the # weak container, such a...
{ "repo_name": "alexrudy/Cauldron", "path": "Cauldron/utils/_weakrefset.py", "copies": "1", "size": "5704", "license": "bsd-3-clause", "hash": 922267853704021200, "line_mean": 28.1020408163, "line_max": 92, "alpha_frac": 0.5559256662, "autogenerated": false, "ratio": 4.106551475881929, "config_t...
# Access WeakSet through the weakref module. # This code is separated-out because it is needed # by abc.py to load everything else at startup. from _weakref import ref __all__ = ['WeakSet'] class _IterationGuard: # This context manager registers itself in the current iterators of the # weak container, such ...
{ "repo_name": "jcoady9/python-for-android", "path": "python3-alpha/python3-src/Lib/_weakrefset.py", "copies": "48", "size": "6352", "license": "apache-2.0", "hash": -1486176255627819500, "line_mean": 28.6822429907, "line_max": 78, "alpha_frac": 0.5602959698, "autogenerated": false, "ratio": 4.116...
# Access WeakSet through the weakref module. # This code is separated-out because it is needed # by abc.py to load everything else at startup. from _weakref import ref __all__ = ['WeakSet'] class _IterationGuard(object): # This context manager registers itself in the current iterators of the # we...
{ "repo_name": "mikedchavez1010/XX-Net", "path": "python27/1.0/lib/_weakrefset.py", "copies": "4", "size": "5978", "license": "bsd-2-clause", "hash": -106286645403195310, "line_mean": 27.5940594059, "line_max": 92, "alpha_frac": 0.5379725661, "autogenerated": false, "ratio": 4.251778093883357, "...
# Accompanying blog post: # http://www.jeffwidman.com/blog/847/ from sqlalchemy.ext import compiler from sqlalchemy.schema import DDLElement from .. import db class CreateView(DDLElement): def __init__(self, name, selectable): self.name = name self.selectable = selectable @compiler.compiles(Cre...
{ "repo_name": "bhzunami/reanalytics", "path": "app/models/view_factory.py", "copies": "1", "size": "1299", "license": "apache-2.0", "hash": 2211264313412288000, "line_mean": 26.6382978723, "line_max": 83, "alpha_frac": 0.6505003849, "autogenerated": false, "ratio": 3.588397790055249, "config_te...
# according to http://jdfreder-notebook.readthedocs.org/en/docs/examples/Notebook/Importing%20Notebooks.html import io, os, sys, types from IPython import get_ipython from nbformat import read from IPython.core.interactiveshell import InteractiveShell def find_notebook(fullname, path=None): """find a notebook, gi...
{ "repo_name": "miklevin/pipulate", "path": "examples/cleanup/notebook_finder.py", "copies": "1", "size": "2860", "license": "mit", "hash": 5564449299870722000, "line_mean": 30.4285714286, "line_max": 108, "alpha_frac": 0.5954545455, "autogenerated": false, "ratio": 3.8440860215053765, "config_t...
# According to the Wikipedia's article: "The Game of Life, also known simply as Life, is a cellular automaton devised # by the British mathematician John Horton Conway in 1970." # # Given a board with m by n cells, each cell has an initial state live (1) or dead (0). Each cell interacts with its # eight neighbors (hori...
{ "repo_name": "jigarkb/Programming", "path": "LeetCode/289-M-GameOfLife.py", "copies": "2", "size": "2886", "license": "mit", "hash": 2622683289418849300, "line_mean": 34.6296296296, "line_max": 117, "alpha_frac": 0.6025641026, "autogenerated": false, "ratio": 3.5498154981549814, "config_test":...
"""Accordion directive for reStructuredText.""" import uuid import logging from docutils import nodes from docutils.parsers.rst import Directive, directives from nikola.plugin_categories import RestExtension from nikola.plugins.compile import rest logger = logging.getLogger(__name__) class Plugin(RestExtension)...
{ "repo_name": "getnikola/plugins", "path": "v8/accordion/accordion.py", "copies": "1", "size": "2338", "license": "mit", "hash": -5552551831235421000, "line_mean": 27.1686746988, "line_max": 77, "alpha_frac": 0.5876817793, "autogenerated": false, "ratio": 3.922818791946309, "config_test": false...
""" Accordion ID3 Constants """ __author__ = "Alastair Tse <alastair@tse.id.au>" __license__ = "BSD" __copyright__ = "Copyright (c) 2004, Alastair Tse" __revision__ = "$Id: constants.py,v 1.3 2004/12/21 12:02:06 acnt2 Exp $" ID3_FILE_READ = 0 ID3_FILE_MODIFY = 1 ID3_FILE_NEW = 2 ID3V2_FILE_HEADER_LENGTH = 10 ID3V2...
{ "repo_name": "irvingruan/Accordion", "path": "libacc/constants.py", "copies": "1", "size": "9770", "license": "bsd-2-clause", "hash": -7986977090576239000, "line_mean": 34.5272727273, "line_max": 78, "alpha_frac": 0.6053224156, "autogenerated": false, "ratio": 2.740532959326788, "config_test":...
ACCOUNT = 'account' CHARACTER = 'char' CORPORATION = 'corp' BLUEPRINT_ORIGINAL = -1 BLUEPRINT_COPY = -2 _role_type_bases = { 'global': '', 'at_hq': 'AtHQ', 'at_base': 'AtBase', 'at_other': 'AtOther', } class Char(object): corp_roles = dict((k, 'corporationRoles' + v) for k,v in _role_type_bases.i...
{ "repo_name": "bastianh/evelink", "path": "evelink/constants.py", "copies": "7", "size": "1229", "license": "mit", "hash": 3189523709429040000, "line_mean": 27.5813953488, "line_max": 101, "alpha_frac": 0.6021155411, "autogenerated": false, "ratio": 3.135204081632653, "config_test": false, "h...
ACCOUNT = 'account' CHARACTER = 'char' CORPORATION = 'corp' _role_type_bases = { 'global': '', 'at_hq': 'AtHQ', 'at_base': 'AtBase', 'at_other': 'AtOther', } class Char(object): corp_roles = dict((k, 'corporationRoles' + v) for k,v in _role_type_bases.iteritems()) class Corp(object): role_typ...
{ "repo_name": "EricE/evelink", "path": "evelink/constants.py", "copies": "2", "size": "1185", "license": "mit", "hash": -5552078122674202000, "line_mean": 28.625, "line_max": 93, "alpha_frac": 0.6016877637, "autogenerated": false, "ratio": 3.2027027027027026, "config_test": false, "has_no_key...
"""Account Adapter Template File IMPORTANT: NOT A FUNCTIONAL ADAPTER. FUNCTIONS MUST BE IMPLEMENTED Notes: - Each of the functions defined below must return a json serializable object, json_response, or valid HttpResponse object - A json_response creates an HttpResponse object given parameters: ...
{ "repo_name": "shreddd/newt-2.0", "path": "account/adapters/template_adapter.py", "copies": "3", "size": "2347", "license": "bsd-2-clause", "hash": -5526485707202828000, "line_mean": 28.7215189873, "line_max": 75, "alpha_frac": 0.6224968044, "autogenerated": false, "ratio": 4.395131086142322, "...
"Account and login pages." import csv import logging from collections import OrderedDict as OD from io import StringIO import tornado.web import orderportal from orderportal import constants from orderportal import saver from orderportal import settings from orderportal import utils from orderportal.order import O...
{ "repo_name": "pekrau/OrderPortal", "path": "orderportal/account.py", "copies": "1", "size": "44345", "license": "mit", "hash": 5666294850644271000, "line_mean": 40.1745589601, "line_max": 88, "alpha_frac": 0.5280640433, "autogenerated": false, "ratio": 4.596289386401327, "config_test": false, ...
"""accountant 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...
{ "repo_name": "XeryusTC/18xx-accountant", "path": "accountant/accountant/urls.py", "copies": "1", "size": "1024", "license": "mit", "hash": -202408456602962530, "line_mean": 34.3103448276, "line_max": 79, "alpha_frac": 0.6904296875, "autogenerated": false, "ratio": 3.4829931972789114, "config_t...
"""Account balance trees.""" import collections import datetime from typing import Dict from typing import Generator from typing import Iterable from typing import List from typing import Optional from beancount.core import account from beancount.core import convert from beancount.core.data import Directive from beanc...
{ "repo_name": "yagebu/fava", "path": "src/fava/core/tree.py", "copies": "2", "size": "6509", "license": "mit", "hash": 971715438115993700, "line_mean": 30.9068627451, "line_max": 79, "alpha_frac": 0.5841143033, "autogenerated": false, "ratio": 4.386118598382749, "config_test": false, "has_no_...
"""Account balance trees.""" import collections import datetime from typing import List from beancount.core import account from beancount.core import convert from beancount.core.data import Open from fava.core.conversion import cost_or_value from fava.core.inventory import CounterInventory class TreeNode: """A ...
{ "repo_name": "aumayr/beancount-web", "path": "src/fava/core/tree.py", "copies": "1", "size": "5560", "license": "mit", "hash": 3469645193492222000, "line_mean": 30.4124293785, "line_max": 79, "alpha_frac": 0.5620503597, "autogenerated": false, "ratio": 4.419713831478537, "config_test": false, ...
accountBook = [[34587,'Learning python',4,40.95],[98762,'Programming python',5,56.80],[77226,'Head first python',3,32.95]] accountBook # Out[100]: # [[34587, 'Learning python', 4, 40.95], # [98762, 'Programming python', 5, 56.8], # [77226, 'Head first python', 3, 32.95]] modCostList = list(map(lambda x: (x[0],x[1]...
{ "repo_name": "smenon8/AlgDataStruct_practice", "path": "practice_problems/lambdasAndRE.py", "copies": "1", "size": "2366", "license": "mit", "hash": -4952566905614567000, "line_mean": 27.1666666667, "line_max": 148, "alpha_frac": 0.5519864751, "autogenerated": false, "ratio": 2.366, "config_te...
"""AccountDomainLookups 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 class AccountDomainLookupsAPI(BaseCanvasAPI): """AccountDomainLookups API Version 1.0.""" ...
{ "repo_name": "tylerclair/py3canvas", "path": "py3canvas/apis/account_domain_lookups.py", "copies": "1", "size": "1685", "license": "mit", "hash": -3169244160661558000, "line_mean": 30.7924528302, "line_max": 147, "alpha_frac": 0.6160237389, "autogenerated": false, "ratio": 4.365284974093265, "...
"""AccountDomainLookups 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 class AccountDomainLookupsAPI(BaseCanvasAPI): """AccountDomainLookups API Versio...
{ "repo_name": "PGower/PyCanvas", "path": "pycanvas/apis/account_domain_lookups.py", "copies": "1", "size": "1736", "license": "mit", "hash": -8234783886584270000, "line_mean": 30.7547169811, "line_max": 147, "alpha_frac": 0.5973502304, "autogenerated": false, "ratio": 4.4627249357326475, "confi...
"""Account handler""" from pyramid.httpexceptions import HTTPFound from pyramid.url import route_url from pyramid_handlers import action from webhelpers import paginate import uuid from datetime import datetime from haven.forms.account import RegistrationForm from haven.forms.account import LoginForm from haven.forms...
{ "repo_name": "Niedra/Haven", "path": "haven/handlers/account.py", "copies": "1", "size": "2913", "license": "isc", "hash": -8777797742889887000, "line_mean": 40.0281690141, "line_max": 78, "alpha_frac": 0.5777548919, "autogenerated": false, "ratio": 4.367316341829086, "config_test": false, "...
"""Account handler""" from pyramid.httpexceptions import HTTPFound from pyramid.url import route_url from pyramid_handlers import action import uuid from datetime import datetime from haven.models.account import Account class AdminHandler(object): def __init__(self, request): self.request = request ...
{ "repo_name": "Niedra/Haven", "path": "haven/handlers/admin.py", "copies": "1", "size": "1041", "license": "isc", "hash": 2357238948758059000, "line_mean": 32.5806451613, "line_max": 77, "alpha_frac": 0.6445725264, "autogenerated": false, "ratio": 4.58590308370044, "config_test": false, "has_...
accountimport os,json,pprint,netaddr from colorama import Fore,Style from netaddr import * from api import * print(Style.BRIGHT, Fore.CYAN + '\nChoose the environment for the new Direct-Connect\n s\n') init_input = input(Fore.YELLOW + 'Available options:\n [1] for STAGE \n [2] for PROD\n >>>') aws_virtual_iface_stag...
{ "repo_name": "rkutsel/netbox-scripts", "path": "aws-direct-connect/directconnect.py", "copies": "1", "size": "6836", "license": "mit", "hash": -7575476168008229000, "line_mean": 75.808988764, "line_max": 514, "alpha_frac": 0.6582796957, "autogenerated": false, "ratio": 3.34769833496572, "confi...
"""Account linking via the cloud.""" import asyncio import logging from typing import Any from hass_nabucasa import account_link from homeassistant.const import MAJOR_VERSION, MINOR_VERSION, PATCH_VERSION from homeassistant.core import HomeAssistant, callback from homeassistant.helpers import config_entry_oauth2_flow...
{ "repo_name": "postlund/home-assistant", "path": "homeassistant/components/cloud/account_link.py", "copies": "3", "size": "4238", "license": "apache-2.0", "hash": 142621370464582460, "line_mean": 28.4305555556, "line_max": 87, "alpha_frac": 0.6385087305, "autogenerated": false, "ratio": 4.2253240...
"""Account linking via the cloud.""" import asyncio import logging from typing import Any import aiohttp from hass_nabucasa import account_link from homeassistant.const import MAJOR_VERSION, MINOR_VERSION, PATCH_VERSION from homeassistant.core import HomeAssistant, callback from homeassistant.helpers import config_en...
{ "repo_name": "home-assistant/home-assistant", "path": "homeassistant/components/cloud/account_link.py", "copies": "2", "size": "4348", "license": "apache-2.0", "hash": 63840083992883950, "line_mean": 28.3783783784, "line_max": 87, "alpha_frac": 0.638224471, "autogenerated": false, "ratio": 4.233...
""" POSIX user information and management. Usage: %(cmd)s list %(cmd)s show [ <user> ...] %(cmd)s create <name> [options] %(cmd)s delete [--no-delete-home] [--no-delete-group] [--force] <user> ... Commands: list Prints a list of users. show Show detailed information about user. ...
{ "repo_name": "openlmi/openlmi-scripts", "path": "commands/account/lmi/scripts/account/user_cmd.py", "copies": "2", "size": "7171", "license": "bsd-2-clause", "hash": -8029499722491833000, "line_mean": 36.1554404145, "line_max": 98, "alpha_frac": 0.5969878678, "autogenerated": false, "ratio": 4.2...
"""Account management views for editorial app.""" # -*- coding: utf-8 -*- from __future__ import unicode_literals from braces.views import LoginRequiredMixin from django.views.generic import TemplateView, UpdateView from editorial.forms import ( OrganizationSubscriptionForm, ContractorSubscriptionForm, ) fro...
{ "repo_name": "ProjectFacet/facet", "path": "project/editorial/views/accounts.py", "copies": "1", "size": "1362", "license": "mit", "hash": -6088957119891424000, "line_mean": 30.6744186047, "line_max": 86, "alpha_frac": 0.7804698972, "autogenerated": false, "ratio": 4.7622377622377625, "config_...
"""Account model module.""" from __future__ import unicode_literals from django.contrib.auth.models import (BaseUserManager, AbstractBaseUser) from django.db import models from django.utils.translation import ugettext as _ import uuid class AppUserManager(BaseUserManager): """AppUser manager class.""" def c...
{ "repo_name": "davideferre/django-rest-framework-email-accounts", "path": "models.py", "copies": "2", "size": "3049", "license": "mit", "hash": 3579307861967913000, "line_mean": 33.2584269663, "line_max": 101, "alpha_frac": 0.6490652673, "autogenerated": false, "ratio": 4.125845737483085, "conf...
'''Account models definition.''' import base64 import hashlib import hmac import time from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django.db import models class PendingUser(models.Model): username = models.CharField(max_length=10, unique=True) first_name = mo...
{ "repo_name": "Atilla106/members.atilla.org", "path": "accounts/models.py", "copies": "1", "size": "2493", "license": "mit", "hash": -6114014394245146000, "line_mean": 28.6785714286, "line_max": 76, "alpha_frac": 0.6225431207, "autogenerated": false, "ratio": 4.001605136436597, "config_test": f...
"""AccountNotifications 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 AccountNotificationsAPI(BaseCanvasAPI): """AccountNotific...
{ "repo_name": "tylerclair/py3canvas", "path": "py3canvas/apis/account_notifications.py", "copies": "1", "size": "13285", "license": "mit", "hash": -2953993395364189000, "line_mean": 42.5573770492, "line_max": 262, "alpha_frac": 0.6396687994, "autogenerated": false, "ratio": 4.184251968503937, "...
"""AccountNotifications 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 AccountNotificationsAPI(BaseCanvasAPI): """Accou...
{ "repo_name": "PGower/PyCanvas", "path": "pycanvas/apis/account_notifications.py", "copies": "1", "size": "11882", "license": "mit", "hash": -8459665084057903000, "line_mean": 39.1141868512, "line_max": 262, "alpha_frac": 0.6184144083, "autogenerated": false, "ratio": 4.330174927113703, "config...
"""account.py: Implementation of class AbstractTwitterAccountCommand and its subclasses. """ from argparse import FileType from . import AbstractTwitterCommand, call_decorator from ..parsers import (filter_args, parser_include_entities, parser_skip_status) # POST account/...
{ "repo_name": "showa-yojyo/bin", "path": "twmods/commands/account.py", "copies": "1", "size": "12507", "license": "mit", "hash": 2893237078742796000, "line_mean": 33.8384401114, "line_max": 79, "alpha_frac": 0.5891900536, "autogenerated": false, "ratio": 4.500539762504498, "config_test": false,...
## account.py # Account system support. from pydle.features import rfc1459 import asyncio class AccountSupport(rfc1459.RFC1459Support): ## Internal. def _create_user(self, nickname): super()._create_user(nickname) if nickname in self.users: self.users[nickname].update({ ...
{ "repo_name": "Shizmob/pydle", "path": "pydle/features/account.py", "copies": "1", "size": "1698", "license": "bsd-3-clause", "hash": -4409469115854364700, "line_mean": 28.7894736842, "line_max": 71, "alpha_frac": 0.5753828033, "autogenerated": false, "ratio": 4.042857142857143, "config_test": ...
## account.py # Account system support. from pydle.features import rfc1459 class AccountSupport(rfc1459.RFC1459Support): ## Internal. def _create_user(self, nickname): super()._create_user(nickname) if nickname in self.users: self.users[nickname].update({ 'account'...
{ "repo_name": "suut/psychic-happiness", "path": "pydle/features/account.py", "copies": "1", "size": "1699", "license": "unlicense", "hash": -5230760280550206000, "line_mean": 26.8524590164, "line_max": 70, "alpha_frac": 0.5632725132, "autogenerated": false, "ratio": 4.016548463356974, "config_t...
# account.py import json import falcon import redis_plex import server _r = redis_plex.connection() class Actions(object): @staticmethod def get_account_key(account_id): return 'account:' + str(account_id) @staticmethod def get_account_server_relation_key(account_id): return 'accoun...
{ "repo_name": "fiLLLip/plex-watched-sync", "path": "server/account.py", "copies": "1", "size": "4302", "license": "apache-2.0", "hash": 8936401813842877000, "line_mean": 34.5537190083, "line_max": 108, "alpha_frac": 0.6062296606, "autogenerated": false, "ratio": 3.8037135278514587, "config_test...
"""AccountReports 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 AccountReportsAPI(BaseCanvasAPI): """AccountReports API Version...
{ "repo_name": "tylerclair/py3canvas", "path": "py3canvas/apis/account_reports.py", "copies": "1", "size": "15614", "license": "mit", "hash": 2198437737656990000, "line_mean": 32.7235421166, "line_max": 334, "alpha_frac": 0.6177148713, "autogenerated": false, "ratio": 4.29664281783159, "config_t...
"""AccountReports 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 AccountReportsAPI(BaseCanvasAPI): """AccountReports AP...
{ "repo_name": "PGower/PyCanvas", "path": "pycanvas/apis/account_reports.py", "copies": "1", "size": "15167", "license": "mit", "hash": -6264841880186205000, "line_mean": 32.5489749431, "line_max": 334, "alpha_frac": 0.5976791719, "autogenerated": false, "ratio": 4.3936848203939745, "config_test...
"""Accounts 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 AccountsAPI(BaseCanvasAPI): """Accounts API Version 1.0.""" ...
{ "repo_name": "PGower/PyCanvas", "path": "pycanvas/apis/accounts.py", "copies": "1", "size": "24615", "license": "mit", "hash": -9132528757599086000, "line_mean": 46.4547244094, "line_max": 693, "alpha_frac": 0.6424537883, "autogenerated": false, "ratio": 4.17628096369189, "config_test": false,...
"""Account service.""" from __future__ import division from six import PY2, python_2_unicode_compatible from collections import OrderedDict from pyicloud.utils import underscore_to_camelcase class AccountService(object): """The 'Account' iCloud service.""" def __init__(self, service_root, session, params): ...
{ "repo_name": "picklepete/pyicloud", "path": "pyicloud/services/account.py", "copies": "1", "size": "10780", "license": "mit", "hash": 3523983888212115000, "line_mean": 28.2140921409, "line_max": 88, "alpha_frac": 0.5780148423, "autogenerated": false, "ratio": 3.963235294117647, "config_test": ...
#account setup username = '***'; password = '***'; server = 'smtp.gmail.com:587'; #imports from time import sleep; import smtplib; from email.mime.application import MIMEApplication from email.mime.text import MIMEText; from email.mime.multipart import MIMEMultipart; # create msg - MIME* object # takes addresses to,...
{ "repo_name": "ActiveState/code", "path": "recipes/Python/578807_Sending_Email/recipe-578807.py", "copies": "1", "size": "3638", "license": "mit", "hash": 7553518089418889000, "line_mean": 28.3387096774, "line_max": 87, "alpha_frac": 0.5802638813, "autogenerated": false, "ratio": 3.57016683022571...
# accounts.forms # DJANGO from django import forms from django.contrib import auth # CRISPY from crispy_forms.helper import FormHelper from crispy_forms.layout import ( Layout, Field, Fieldset, ButtonHolder, Submit, Div ) # ACCOUNTS from .models import StaffProfile class LoginForm(forms....
{ "repo_name": "valuesandvalue/valuesandvalue", "path": "vavs_project/accounts/forms.py", "copies": "1", "size": "3118", "license": "mit", "hash": -3291467692359558700, "line_mean": 31.1443298969, "line_max": 125, "alpha_frac": 0.533675433, "autogenerated": false, "ratio": 4.312586445366528, "co...
"""Account sharing Revision ID: 73edd31eee69 Revises: a1498e3da19c Create Date: 2017-04-23 20:00:28.658973 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '73edd31eee69' down_revision = 'a1498e3da19c' branch_labels = None depends_on = None def upgrade(): ...
{ "repo_name": "csdt/Pawi", "path": "migrations/versions/73edd31eee69_.py", "copies": "1", "size": "1907", "license": "mit", "hash": -1277361140435882800, "line_mean": 33.6727272727, "line_max": 73, "alpha_frac": 0.6649187205, "autogenerated": false, "ratio": 3.47992700729927, "config_test": fal...
""" ACCOUNTS MANAGEMENT """ class Accounts(object): """ CLASS FOR ACCOUNT CREATION AND LOGIN""" def __init__(self): self.list_of_accounts = [{'uname':'default', 'email':'default@user.com', 'pwd':'default'}] def get_uname_by_email(...
{ "repo_name": "parseendavid/Andela-Developer-Challenge---Shopping-List-V2.0", "path": "app/accounts.py", "copies": "1", "size": "1709", "license": "mit", "hash": 3251095291821929000, "line_mean": 38.7441860465, "line_max": 71, "alpha_frac": 0.5330602692, "autogenerated": false, "ratio": 4.6566757...
"""Accounts Module.""" import json import pandas as pd class Account(object): """Class with the account methods.""" def __init__(self, main): """Initialise with super's main.""" self.main = main def create_account(self, currency, name, base_account_id, counter_id): """Create a n...
{ "repo_name": "grantstephens/pyluno", "path": "pyluno/accounts.py", "copies": "1", "size": "4030", "license": "mit", "hash": 6704411194936504000, "line_mean": 37.0188679245, "line_max": 78, "alpha_frac": 0.5779156328, "autogenerated": false, "ratio": 4.1891891891891895, "config_test": false, ...
'Accounts' from __future__ import unicode_literals from .... import ProResource, RelatedResourceMixin import six import sys class Account(RelatedResourceMixin, ProResource): 'Abstraction of Accounts resource in duedil v3 pro api' attribute_names = [ 'uri', 'date', 'type' ] acc...
{ "repo_name": "founders4schools/duedilv3", "path": "duedil/resources/pro/company/accounts/__init__.py", "copies": "1", "size": "1414", "license": "apache-2.0", "hash": 2379960115697224700, "line_mean": 32.6666666667, "line_max": 94, "alpha_frac": 0.6485148515, "autogenerated": false, "ratio": 3.8...
# accounts.py from django.contrib.auth import login, logout, authenticate from django.contrib import messages from django.views.generic import View from django.shortcuts import redirect, render from forms import SignupForm, LoginForm from django.contrib.auth.models import User class Login(View): login_template = 'lo...
{ "repo_name": "devs4v/opinify", "path": "opinify/accounts.py", "copies": "1", "size": "1830", "license": "mit", "hash": -3841572699967768000, "line_mean": 28.5161290323, "line_max": 102, "alpha_frac": 0.7027322404, "autogenerated": false, "ratio": 3.4269662921348316, "config_test": false, "ha...
"""Accounts serializers module.""" from rest_framework import serializers from accounts.models import AppUser class AppUserSerializer(serializers.ModelSerializer): """AppUser serializer class.""" class Meta: model = AppUser fields = ( 'id', 'email', 'passwo...
{ "repo_name": "davideferre/django-ember-jwt-tutorial", "path": "server/accounts/serializers.py", "copies": "1", "size": "1132", "license": "mit", "hash": -6020760668961314000, "line_mean": 29.5945945946, "line_max": 115, "alpha_frac": 0.5803886926, "autogenerated": false, "ratio": 4.5829959514170...
"""Accounts serializers module.""" from rest_framework import serializers from .models import AppUser class AppUserSerializer(serializers.ModelSerializer): """AppUser serializer class.""" class Meta: model = AppUser fields = ( 'id', 'email', 'password', ...
{ "repo_name": "davideferre/django-rest-framework-email-accounts", "path": "serializers.py", "copies": "1", "size": "1124", "license": "mit", "hash": -6690558983657224000, "line_mean": 29.3783783784, "line_max": 115, "alpha_frac": 0.5774021352, "autogenerated": false, "ratio": 4.569105691056911, ...
# accounts.sys_stats # PYTHON import os import subprocess # DJANGO from django.conf import settings from django.db import connection def get_disc_usage(): lines = [] process = subprocess.Popen( ['df', '-h'], shell=False, stdout=subprocess.PIPE) result = process.communicate() lines...
{ "repo_name": "valuesandvalue/valuesandvalue", "path": "vavs_project/accounts/sys_stats.py", "copies": "1", "size": "1287", "license": "mit", "hash": -7795802205533882000, "line_mean": 26.9782608696, "line_max": 75, "alpha_frac": 0.6076146076, "autogenerated": false, "ratio": 3.88821752265861, ...
"""accounts table Revision ID: a1498e3da19c Revises: 2cec471fc310 Create Date: 2017-04-23 19:15:13.138625 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'a1498e3da19c' down_revision = '2cec471fc310' branch_labels = None depends_on = None def upgrade(): #...
{ "repo_name": "csdt/Pawi", "path": "migrations/versions/a1498e3da19c_.py", "copies": "1", "size": "1094", "license": "mit", "hash": -8260216397159925000, "line_mean": 27.7894736842, "line_max": 65, "alpha_frac": 0.6636197441, "autogenerated": false, "ratio": 3.4294670846394983, "config_test": f...
# accounts.tasks # PYTHON from datetime import timedelta import logging # DJANGO from django.contrib.auth.models import User from django.utils.timezone import now # CELERY from celery import task # ACCOUNTS from .sys_stats import ( get_db_size, get_disc_usage ) @task.task(ignore_result=False, name...
{ "repo_name": "valuesandvalue/valuesandvalue", "path": "vavs_project/accounts/tasks.py", "copies": "1", "size": "1041", "license": "mit", "hash": -1665759615427360000, "line_mean": 27.1351351351, "line_max": 75, "alpha_frac": 0.6781940442, "autogenerated": false, "ratio": 3.4932885906040267, "c...
account=str(input("당신은 뭐시여")) if account=="admin": f=open("Coffee Stock.txt", "r", encoding="utf-8") menu_status = [] while True: menu = f.readline() if not menu: break menu_status.append(menu.split()) f.close() dict_menu_status={} for adder in menu_status: dict_m...
{ "repo_name": "imn00133/pythonSeminar17", "path": "exercise/vending_machine/Junho/10_14_bendingmachine.py", "copies": "1", "size": "2213", "license": "mit", "hash": 5866571964878378000, "line_mean": 34.3928571429, "line_max": 140, "alpha_frac": 0.5254921757, "autogenerated": false, "ratio": 2.395...
"""Account summary.""" # :license: MIT, see LICENSE for more details. import click import SoftLayer from SoftLayer.CLI import environment from SoftLayer.CLI import formatting COLUMNS = ['datacenter', 'hardware', 'virtual_servers', 'vlans', 'subnets', 'public_ip...
{ "repo_name": "skraghu/softlayer-python", "path": "SoftLayer/CLI/summary.py", "copies": "5", "size": "1051", "license": "mit", "hash": 6492692738974502000, "line_mean": 22.8863636364, "line_max": 48, "alpha_frac": 0.5889628925, "autogenerated": false, "ratio": 4.307377049180328, "config_test": ...
"""Account summary.""" # :license: MIT, see LICENSE for more details. import SoftLayer from SoftLayer.CLI import environment from SoftLayer.CLI import formatting import click @click.command() @click.option('--sortby', help='Column to sort by', default='datacenter', type=cli...
{ "repo_name": "briancline/softlayer-python", "path": "SoftLayer/CLI/summary.py", "copies": "2", "size": "1285", "license": "mit", "hash": -653620810197669100, "line_mean": 27.5555555556, "line_max": 79, "alpha_frac": 0.5143968872, "autogenerated": false, "ratio": 4.923371647509579, "config_test...
"""Account Summary page""" # :license: MIT, see LICENSE for more details. import click from SoftLayer.CLI import environment from SoftLayer.CLI import formatting from SoftLayer.managers.account import AccountManager as AccountManager from SoftLayer import utils @click.command() @environment.pass_env def cli(env): ...
{ "repo_name": "allmightyspiff/softlayer-python", "path": "SoftLayer/CLI/account/summary.py", "copies": "3", "size": "1762", "license": "mit", "hash": -147450281017231500, "line_mean": 44.1794871795, "line_max": 102, "alpha_frac": 0.6923950057, "autogenerated": false, "ratio": 3.813852813852814, ...
"""Accounts URLconf. This includes account authorization and administration. """ # Copyright 2015 Solinea, Inc. # # 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...
{ "repo_name": "slashk/goldstone-server", "path": "goldstone/accounts/urls.py", "copies": "2", "size": "1594", "license": "apache-2.0", "hash": -4535627917164045300, "line_mean": 38.85, "line_max": 79, "alpha_frac": 0.7107904642, "autogenerated": false, "ratio": 3.7417840375586855, "config_test"...
# accounts.views # DJANGO from django.conf import settings from django.contrib import auth from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect from django.views.generic import ( FormView, TemplateView ) # DJANGO-BRACES from braces.views import LoginRequiredMixin # FBDAT...
{ "repo_name": "valuesandvalue/valuesandvalue", "path": "vavs_project/accounts/views.py", "copies": "1", "size": "4922", "license": "mit", "hash": -1485789706435000000, "line_mean": 30.1518987342, "line_max": 79, "alpha_frac": 0.5969118245, "autogenerated": false, "ratio": 4.265164644714038, "co...
# Django Imports from django.shortcuts import render, redirect from django.contrib import messages from django.contrib.auth import logout as logout_user from django.contrib.auth import login as login_user from django.contrib.auth import authenticate from django.utils.translation import ugettext_lazy as _ # Other Impo...
{ "repo_name": "LuckehPickle/Comet", "path": "accounts/views.py", "copies": "2", "size": "7907", "license": "apache-2.0", "hash": -4663285429277430000, "line_mean": 43.1731843575, "line_max": 177, "alpha_frac": 0.6534716074, "autogenerated": false, "ratio": 4.226082308925708, "config_test": fals...
# accounts/views.py from django.contrib.auth import authenticate,login from django.http import HttpResponse,Http404 import json from accounts import forms def auth(username,password): ret = {} user = authenticate(username=username, password=password) if user is not None: # correct username and pa...
{ "repo_name": "EricSchles/veyepar", "path": "dj/accounts/views.py", "copies": "1", "size": "1657", "license": "mit", "hash": 6106258434455011000, "line_mean": 27.5689655172, "line_max": 64, "alpha_frac": 0.5733252867, "autogenerated": false, "ratio": 4.061274509803922, "config_test": false, "...
"""Account types Revision ID: 2cec471fc310 Revises: 9f2d4e946acb Create Date: 2017-04-23 01:30:29.193837 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '2cec471fc310' down_revision = '9f2d4e946acb' branch_labels = None depends_on = None def upgrade(): # ...
{ "repo_name": "csdt/Pawi", "path": "migrations/versions/2cec471fc310_.py", "copies": "1", "size": "1211", "license": "mit", "hash": -3096960457579853000, "line_mean": 27.8333333333, "line_max": 65, "alpha_frac": 0.6655656482, "autogenerated": false, "ratio": 3.440340909090909, "config_test": fa...
# Accumulated Cyclone Energy module def calc(wind): # Converts a single wind point (in knots) to ACE if (wind <= 34): # ACE does not calculate for tropical depressions return 0 else: wind = float(wind) return float((wind * wind)/10000) def calc_ignore(wind): # Converts ...
{ "repo_name": "harrisontran/encyclonepedia", "path": "ace.py", "copies": "1", "size": "1560", "license": "mit", "hash": -4050872378706075600, "line_mean": 27.3636363636, "line_max": 82, "alpha_frac": 0.6070512821, "autogenerated": false, "ratio": 3.586206896551724, "config_test": false, "has_...
"""accumulated precip.""" import datetime from pandas.io.sql import read_sql from pyiem.util import get_autoplot_context, get_dbconn from pyiem.plot import figure_axes from pyiem.exceptions import NoDataFound PDICT = { "precip": "Precipitation", "snow": "Snow", } def get_description(): """ Return a dict...
{ "repo_name": "akrherz/iem", "path": "htdocs/plotting/auto/scripts100/p172.py", "copies": "1", "size": "7820", "license": "mit", "hash": -5308244102199103000, "line_mean": 29.546875, "line_max": 79, "alpha_frac": 0.5267263427, "autogenerated": false, "ratio": 3.585511233379184, "config_test": f...
"""Accumulate messages to show on the next page request. The ``Flash`` class is useful when you want to redirect to another page and also show a status message on that page, such as "Changes saved" or "No previous search found; returning to home page". THE IMPLEMENTATION DEPENDS ON PYLONS. However, it can easily be...
{ "repo_name": "grepme/CMPUT410Lab01", "path": "virt_env/virt1/lib/python2.7/site-packages/WebHelpers-1.3-py2.7.egg/webhelpers/pylonslib/flash.py", "copies": "3", "size": "12551", "license": "apache-2.0", "hash": 5548771639208525000, "line_mean": 32.3803191489, "line_max": 91, "alpha_frac": 0.64449047...
"""accumulator.py: transcription of GeographicLib::Accumulator class.""" # accumulator.py # # This is a rather literal translation of the GeographicLib::Accumulator class # from to python. See the documentation for the C++ class for more information # at # # http://geographiclib.sourceforge.net/html/annotated.html ...
{ "repo_name": "devbharat/gtsam", "path": "gtsam/3rdparty/GeographicLib/python/geographiclib/accumulator.py", "copies": "5", "size": "3000", "license": "bsd-3-clause", "hash": -2649415403908920300, "line_mean": 36.037037037, "line_max": 79, "alpha_frac": 0.577, "autogenerated": false, "ratio": 3.2...
"""Accumuldated days""" import datetime from pandas.io.sql import read_sql from pyiem.plot import figure_axes from pyiem.util import get_autoplot_context, get_dbconn from pyiem.exceptions import NoDataFound PDICT = { "high_above": "High Temperature At or Above", "high_below": "High Temperature Below", "lo...
{ "repo_name": "akrherz/iem", "path": "htdocs/plotting/auto/scripts100/p135.py", "copies": "1", "size": "7121", "license": "mit", "hash": 1867685346489167400, "line_mean": 29.1737288136, "line_max": 79, "alpha_frac": 0.5062491223, "autogenerated": false, "ratio": 3.451769268056229, "config_test"...
accuracy = 1e-8 class Cell: def __init__(self, vtkCell, bounds, q): self.vtkCell = vtkCell self.bounds = bounds self.q = q def __eq__(self, other): global accuracy if abs(self.q - other.q) > accuracy: return false if len(sel.bounds) != len(other.bounds): return false ...
{ "repo_name": "unterweg/peanoclaw", "path": "testscenarios/tools/compareResult.py", "copies": "1", "size": "5050", "license": "bsd-3-clause", "hash": 5339664846835976000, "line_mean": 28.3604651163, "line_max": 148, "alpha_frac": 0.6441584158, "autogenerated": false, "ratio": 3.6462093862815883, ...
"""AccuracyHandler.py: generates gr""" __author__ = "Scott Munro" __copyright__ = "Copyright 2015" import math import pygame import game_constants class AccuracyHandler(object): RANGE = math.pi / 24 GROWTH_FACTOR = math.pi / 2880 FREEDOM = math.pi / 1000 def __init__(self, screen, player): ...
{ "repo_name": "scottnm/itchnscratch", "path": "AccuracyHandler.py", "copies": "1", "size": "1747", "license": "apache-2.0", "hash": -4458856723749836300, "line_mean": 31.9622641509, "line_max": 135, "alpha_frac": 0.6393817974, "autogenerated": false, "ratio": 3.445759368836292, "config_test": f...
"""Accuracy""" # Authors: Nicolas Pinto <nicolas.pinto@gmail.com> # Nicolas Poilvert <nicolas.poilvert@gmail.com> # # License: BSD __all__ = ['accuracy'] import numpy as np def accuracy(y_true, y_pred, balanced=False): """Computes the Accuracy of the predictions (also known as the zero-one score)....
{ "repo_name": "npinto/bangmetric", "path": "bangmetric/accuracy.py", "copies": "1", "size": "1401", "license": "bsd-3-clause", "hash": -1504400192466673000, "line_mean": 24.0178571429, "line_max": 68, "alpha_frac": 0.5824411135, "autogenerated": false, "ratio": 3.3199052132701423, "config_test"...
"""Accuracy tests against data pulled from HORIZONS.""" from numpy import max from skyfield import api from skyfield.constants import AU_M from skyfield.io import download from skyfield.jpllib import Kernel one_second = 1.0 / 24.0 / 60.0 / 60.0 arcsecond = 1.0 / 60.0 / 60.0 ra_arcsecond = 24.0 / 360.0 / 60.0 / 60.0 m...
{ "repo_name": "exoanalytic/python-skyfield", "path": "skyfield/tests/test_against_horizons.py", "copies": "1", "size": "3037", "license": "mit", "hash": 3301222025952200000, "line_mean": 39.4933333333, "line_max": 79, "alpha_frac": 0.6595324333, "autogenerated": false, "ratio": 2.4452495974235107...
"""A central mechanism for settings with defaults. """ from django.conf import settings threadlocal_settings_defaults = { 'DEBUG_DOMAIN' : None, # formatted as "dev" or "dev=com", which means to try substituting 'com' for 'dev' 'AUTO_WWW' : True # try with or without www } def add_setting_defaults(newdefault...
{ "repo_name": "diver-in-sky/django-threaded-multihost", "path": "threaded_multihost/threadlocal_settings.py", "copies": "2", "size": "1082", "license": "bsd-3-clause", "hash": -1224817809742286300, "line_mean": 31.7878787879, "line_max": 113, "alpha_frac": 0.7255083179, "autogenerated": false, "r...
# Aceptando arreglo print "Hola! Necesito que me ayudes a llenar un arreglo de 3 X 4 de enteros" arreglo = [] sumaFila = [] filaPorArreglos = [] for i in range(3): arregloPrimerNivel = [] suma = 0 filaArreglo = [] for j in range(4): mensaje = "Dame el numero entero que va en la posicion: "+str(i)+","+str(j)+"\n" ...
{ "repo_name": "Dreedi/ApoyoAsesoriasProgramacionBatizArregloBidimensionalYGato", "path": "Python/Arreglo Bidimensional de 3 X 4/ArregloBidimensionalOptimizado.py", "copies": "1", "size": "1514", "license": "mit", "hash": -2868117991117848000, "line_mean": 28.1346153846, "line_max": 115, "alpha_frac":...
# Aceptando arreglo print "Hola! Necesito que me ayudes a llenar un arreglo de 3 X 4 de enteros" print "\n"*2 print "-" * 60 arreglo = [] for i in range(3): arregloPrimerNivel = [] for j in range(4): mensaje = "Dame el numero entero que va en la posicion: "+str(i)+","+str(j)+"\n" arregloPrimerNivel.append(int(raw...
{ "repo_name": "Dreedi/ApoyoAsesoriasProgramacionBatizArregloBidimensionalYGato", "path": "Python/Arreglo Bidimensional de 3 X 4/ArregloBidimensional.py", "copies": "1", "size": "2067", "license": "mit", "hash": 91265175392913780, "line_mean": 25.5128205128, "line_max": 115, "alpha_frac": 0.6695694243...
# A CFFI version of numpy/linalg/lapack_module.c import sys, os import warnings try: import cffi use_cffi = True except ImportError: use_cffi = False if use_cffi: import numpy as np # dtype has not been imported yet from numpy.core.multiarray import dtype class Dummy(object): pass ...
{ "repo_name": "NextThought/pypy-numpy", "path": "numpy/linalg/lapack_lite.py", "copies": "1", "size": "15914", "license": "bsd-3-clause", "hash": -2609286443268297700, "line_mean": 33.899122807, "line_max": 126, "alpha_frac": 0.5374513007, "autogenerated": false, "ratio": 3.0405043943446697, "c...
"""A Chaco file reader. """ # Author: Suyog Dutt Jain <suyog.jain@aero.iitb.ac.in> # Copyright (c) 2009, Enthought, Inc. # License: BSD Style. # Enthought library imports. from traits.api import Instance, Str from traitsui.api import View, Group, Item from tvtk.api import tvtk # Local imports. from mayavi.core.source...
{ "repo_name": "dmsurti/mayavi", "path": "mayavi/sources/chaco_reader.py", "copies": "3", "size": "2647", "license": "bsd-3-clause", "hash": -3196526411355711000, "line_mean": 31.2804878049, "line_max": 74, "alpha_frac": 0.4967888175, "autogenerated": false, "ratio": 4.494057724957555, "config_t...
""" A Chaco Shell PlotSession which raises Workbench Editors instead of free-standing windows. """ from traits.api import Any, Dict, List, Str from chaco.shell.session import PlotSession from plot_editor import PlotEditor class WorkbenchSession(PlotSession): """ A Chaco Shell PlotSession which raises Workbench ...
{ "repo_name": "tommy-u/chaco", "path": "chaco/plugin/workbench_session.py", "copies": "3", "size": "1701", "license": "bsd-3-clause", "hash": 1996145580616405000, "line_mean": 28.8421052632, "line_max": 79, "alpha_frac": 0.6278659612, "autogenerated": false, "ratio": 3.8053691275167787, "config...
# a channel contains a corpus and associated settings from Tkinter import * import tkFont from tkSimpleDialog import askstring from tkFileDialog import asksaveasfilename import corpus import operator class Channel(Frame): def __init__(self, parent, textframe, corpus, num=0): Frame.__init__(self, parent) self.c...
{ "repo_name": "jbrew/stereotype", "path": "channel.py", "copies": "1", "size": "4520", "license": "apache-2.0", "hash": 7809080411232063000, "line_mean": 32.7313432836, "line_max": 118, "alpha_frac": 0.582079646, "autogenerated": false, "ratio": 2.7377347062386432, "config_test": false, "has_...
# A character in UTF8 can be from 1 to 4 bytes long, subjected to the following rules: # # For 1-byte character, the first bit is a 0, followed by its unicode code. # For n-bytes character, the first n-bits are all one's, the n+1 bit is 0, followed by n-1 bytes with most significant # 2 bits being 10. # This is how the...
{ "repo_name": "jigarkb/CTCI", "path": "LeetCode/393-M-UTF8Validation.py", "copies": "2", "size": "2199", "license": "mit", "hash": -932966329786990500, "line_mean": 34.4677419355, "line_max": 118, "alpha_frac": 0.5948158254, "autogenerated": false, "ratio": 3.6895973154362416, "config_test": fa...