repo_name stringlengths 5 92 | path stringlengths 4 232 | copies stringclasses 19
values | size stringlengths 4 7 | content stringlengths 721 1.04M | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 15 997 | alpha_frac float64 0.25 0.97 | autogenerated bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|
deepmind/deepmind-research | ogb_lsc/mag/losses.py | 1 | 6654 | # Copyright 2021 DeepMind Technologies Limited.
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | apache-2.0 | -7,726,497,317,545,474,000 | 32.437186 | 80 | 0.681996 | false |
adhocish/MELEEDB | meleedb/main.py | 1 | 1570 | import logging
import datetime
import os
from scrapy.crawler import CrawlerProcess
from scrapy.settings import Settings
from scrapy.utils.log import configure_logging
import spiders
def run():
# Logging settings
configure_logging(install_root_handler=False)
logging.basicConfig(
datefmt='%Y-%m-%d ... | gpl-3.0 | 334,612,834,064,739,840 | 29.803922 | 107 | 0.664968 | false |
uwescience/pulse2percept | pulse2percept/implants/bvt.py | 1 | 4694 | """`BVT24`"""
import numpy as np
from .base import ProsthesisSystem
from .electrodes import DiskElectrode
from .electrode_arrays import ElectrodeArray
class BVT24(ProsthesisSystem):
"""24-channel suprachoroidal retinal prosthesis
This class creates a 24-channel suprachoroidal retinal prosthesis
[Layton2... | bsd-3-clause | -6,385,752,689,116,946,000 | 37.162602 | 78 | 0.553473 | false |
wanderknight/tushare | tushare/__init__.py | 1 | 2582 | __version__ = '0.4.1'
__author__ = 'Jimmy Liu'
"""
for trading data
"""
from tushare.stock.trading import (get_hist_data, get_tick_data,
get_today_all, get_realtime_quotes,
get_h_data, get_today_ticks,
get... | bsd-3-clause | 8,037,513,311,149,606,000 | 32.426667 | 87 | 0.45701 | false |
belemizz/mimic2_tools | clinical_db/classify_patients.py | 1 | 3203 | """
classify patients based on lab tests
"""
import get_sample.mimic2
from mutil import Graph
import mutil.mycsv
import time
import datetime
import random
import numpy as np
import theano
import theano.tensor as T
import alg.classification
def main( max_id = 2000, target_codes = ['428.0'], show_flag = True):
m... | mit | -5,518,623,470,133,790,000 | 33.074468 | 100 | 0.547924 | false |
Erotemic/utool | utool/util_logging.py | 1 | 20540 | # -*- coding: utf-8 -*-
"""
If logging is on, utool will overwrite the print function with a logging function
This is a special module which will not get injected into (should it be internal?)
References:
# maybe we can do something like this Queue to try fixing error when
# when using injected print statment... | apache-2.0 | -7,436,012,474,006,777,000 | 35.353982 | 122 | 0.574099 | false |
Stymphalian/sublime-plugins | KeyMapQuery/KeyMapQuery.py | 1 | 8716 | import sublime, sublime_plugin
import re
from collections import namedtuple
import os.path
"""
KeyMapQueryCommand allows you to quickly query if a key-binding is bound.
A combo-box will appear displayings a list of bound key-bindings. Type a key-combination
into the inptu box to narrow the results ( i.e. ctrl+... | mit | -5,049,045,572,851,911,000 | 44.37234 | 101 | 0.572855 | false |
alfredodeza/execnet | execnet/gateway_io.py | 1 | 7538 | # -*- coding: utf-8 -*-
"""
execnet io initialization code
creates io instances used for gateway io
"""
import os
import shlex
import sys
try:
from execnet.gateway_base import Popen2IO, Message
except ImportError:
from __main__ import Popen2IO, Message
from functools import partial
class Popen2IOMaster(Pop... | mit | 4,103,531,356,347,174,000 | 29.152 | 82 | 0.645795 | false |
wpjesus/codematch | ietf/secr/proceedings/forms.py | 1 | 6833 | import os
from django import forms
from django.conf import settings
from django.template.defaultfilters import filesizeformat
from ietf.doc.models import Document
from ietf.group.models import Group
from ietf.name.models import DocTypeName
from ietf.meeting.models import Meeting, Session
# -------------------------... | bsd-3-clause | 3,905,673,467,625,157,000 | 45.482993 | 492 | 0.647007 | false |
alaeddine10/ggrc-core | src/ggrc/models/relationship_types.py | 1 | 21783 |
class RelationshipTypes(object):
@classmethod
def types(cls):
types = {}
for k, rt in RELATIONSHIP_TYPES.items():
types[k] = rt.copy()
types[k].update({ 'relationship_type': k })
return types
@classmethod
def get_type(cls, relationship_type_id):
return cls.types().get(relationship_... | apache-2.0 | -5,848,448,770,137,311,000 | 40.333966 | 102 | 0.66786 | false |
3liz/qgis-wps4server | filters/PyWPS/tests/process_inits.py | 1 | 3027 | import os
import sys
pywpsPath = os.path.abspath(os.path.join(
os.path.split(os.path.abspath(__file__))[0], ".."))
sys.path.append(pywpsPath)
import pywps
import pywps.Process
import unittest
import os
from xml.dom import minidom
class RequestGetTestCase(unittest.TestCase):
inputs = None
getcapabilities... | gpl-3.0 | -3,480,720,783,210,404,000 | 37.807692 | 124 | 0.670631 | false |
benjaminrigaud/django | tests/migrations/test_autodetector.py | 1 | 81958 | # -*- coding: utf-8 -*-
from django.conf import settings
from django.test import TestCase, override_settings
from django.db.migrations.autodetector import MigrationAutodetector
from django.db.migrations.questioner import MigrationQuestioner
from django.db.migrations.state import ProjectState, ModelState
from django.db.... | bsd-3-clause | 1,305,360,902,814,706,000 | 54.190572 | 273 | 0.650724 | false |
bworrell/mixbox | mixbox/parser.py | 1 | 6500 | # Copyright (c) 2015, The MITRE Corporation. All rights reserved.
# See LICENSE.txt for complete terms.
from abc import ABCMeta, abstractmethod
from distutils.version import StrictVersion
from .exceptions import ignored
from .xml import get_etree_root, get_schemaloc_pairs
class UnknownVersionError(Exception):
"... | bsd-3-clause | 6,696,311,111,732,359,000 | 32.333333 | 79 | 0.612154 | false |
urska19/LVR-sat | src/graphColoring.py | 1 | 1511 | #!/usr/bin/env python
from logConstructs import *
def graph_coloring(graph, colors):
if len(graph) < colors:
return False
variables=[[None for i in range(colors)] for j in range(len(graph))]
#construct variables
for i in range(len(graph)):
for j in range(colors):
variable... | bsd-3-clause | 3,202,995,941,548,603,000 | 24.610169 | 104 | 0.578425 | false |
dschien/PyExcelModelingHelper | excel_helper/__init__.py | 1 | 33092 | import csv
import datetime
import importlib
import sys
from abc import abstractmethod
from collections import defaultdict
from typing import Dict, List, Set
import numpy as np
import pandas as pd
from dateutil import relativedelta as rdelta
import logging
from functools import partial
from xlrd import xldate_as_tupl... | mit | -7,804,508,916,194,763,000 | 36.434389 | 177 | 0.579808 | false |
Laufire/ec | tests/test_utils.py | 1 | 1168 | r"""
Test ec.utils.
"""
import unittest
from ec.utils import get, static, custom, walk
from support.helpers import RawInputHook as RIH, expect_exception
# Tests
class TestUtils(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_get(self):
Inputs = 'a', 1
RIH.values(*I... | bsd-3-clause | 2,234,203,857,414,561,800 | 19.491228 | 69 | 0.621575 | false |
mike-perdide/gitbuster | gitbuster/q_git_delegate.py | 1 | 4118 | # q_git_delegate.py
# Copyright (C) 2010 Julien Miotte <miotte.julien@gmail.com>
#
# This module is part of gitbuster and is released under the GPLv3
# License: http://www.gnu.org/licenses/gpl-3.0.txt
#
from PyQt4.QtCore import QDateTime, QVariant, Qt, SIGNAL, QRect
from PyQt4.QtGui import QDateTimeEdit, QItemDelegate... | gpl-3.0 | -6,977,865,863,436,541,000 | 36.099099 | 80 | 0.602234 | false |
SetBased/py-stratum | pystratum/command/LoaderCommand.py | 1 | 3242 | """
PyStratum
"""
import configparser
from pydoc import locate
from cleo import Command, Input, Output
from pystratum.RoutineLoader import RoutineLoader
from pystratum.style.PyStratumStyle import PyStratumStyle
class LoaderCommand(Command):
"""
Command for loading stored routines into a MySQL/MsSQL/PgSQL in... | mit | -4,059,710,956,174,533,600 | 35.840909 | 120 | 0.520666 | false |
luaduck/suds | soapclient.py | 1 | 6841 |
###
# This file is part of Soap.
#
# Soap is free software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation, version 2.
#
# Soap is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without ev... | gpl-2.0 | -6,182,395,961,143,806,000 | 29.095455 | 94 | 0.597427 | false |
cloudnull/skylab | skylab/executable.py | 1 | 9051 | # =============================================================================
# Copyright [2013] [Kevin Carter]
# License Information :
# This software has no warranty, it is provided 'as is'. It is your
# responsibility to validate the behavior of the routines and its accuracy
# using the code provided. Consult the ... | gpl-3.0 | -6,981,783,929,136,485,000 | 34.774704 | 79 | 0.481936 | false |
kmaglione/amo-validator | validator/testcases/javascript/obsolete.py | 1 | 3693 | from __future__ import absolute_import, print_function, unicode_literals
from .jstypes import Hook, Interfaces
OBSOLETE_EXTENSION_MANAGER = {
'on_get': 'This interface is part of the obsolete extension manager '
'interface, which is not available in any remotely modern '
'version of F... | bsd-3-clause | -5,829,427,618,306,759,000 | 37.46875 | 78 | 0.620092 | false |
tchellomello/home-assistant | homeassistant/components/roomba/sensor.py | 1 | 1696 | """Sensor for checking the battery level of Roomba."""
import logging
from homeassistant.components.vacuum import STATE_DOCKED
from homeassistant.const import DEVICE_CLASS_BATTERY, PERCENTAGE
from homeassistant.helpers.icon import icon_for_battery_level
from .const import BLID, DOMAIN, ROOMBA_SESSION
from .irobot_bas... | apache-2.0 | -4,041,612,516,098,413,000 | 28.241379 | 68 | 0.665684 | false |
bcopeland/speccy | scanner.py | 1 | 9599 | #!/usr/bin/python
from multiprocessing import Value
from threading import Thread, Lock
import os
import time
class Scanner(object):
interface = None
freqlist = None
process = None
debugfs_dir = None
is_ath10k = False
lock = None
run = True
def dev_to_phy(self, dev):
f = open(... | gpl-2.0 | 7,727,370,529,989,816,000 | 32.680702 | 114 | 0.551307 | false |
kretusmaximus/MicroFTP.py | microftp/common_view.py | 1 | 2633 | # -*- coding: utf-8 -*-
import Tkinter
import tkFont
class Window(Tkinter.Tk):
def __init__(self, parent):
Tkinter.Tk.__init__(self,parent)
self.parent = parent
def initialize(self):
pass
class Listbox(Tkinter.Listbox):
def autowidth(self, maxwidth):
f = tkFont.Font(font... | mit | 5,434,954,006,917,956,000 | 27.619565 | 105 | 0.582226 | false |
distributed-system-analysis/pbench | server/bin/pbench-server-prep-shim-002.py | 1 | 12572 | #!/usr/bin/env python3
# -*- mode: python -*-
# This script is used to prepare the tarballs that a version 002 client
# submits for further processing. It copies the tarballs and their MD5
# sums to the archive (after checking) and sets the state links, so
# that the dispatch script will pick them up and get the ball
... | gpl-3.0 | -8,785,501,480,780,962,000 | 33.443836 | 88 | 0.595291 | false |
Donkyhotay/MoonPy | zope/rdb/tests/test_gadflyphantom.py | 1 | 2917 | ##############################################################################
#
# Copyright (c) 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SO... | gpl-3.0 | -2,021,767,907,325,298,700 | 27.881188 | 78 | 0.57182 | false |
kaushik94/sympy | sympy/integrals/tests/test_integrals.py | 2 | 59772 | from sympy import (
Abs, acos, acosh, Add, And, asin, asinh, atan, Ci, cos, sinh, cosh,
tanh, Derivative, diff, DiracDelta, E, Ei, Eq, exp, erf, erfc, erfi,
EulerGamma, Expr, factor, Function, gamma, gammasimp, I, Idx, im, IndexedBase,
integrate, Interval, Lambda, LambertW, log, Matrix, Max, meijerg, Mi... | bsd-3-clause | -3,841,913,268,088,145,000 | 35.919086 | 108 | 0.53326 | false |
ArcherSys/ArcherSys | Lib/test/testcodec.py | 1 | 3278 | <<<<<<< HEAD
<<<<<<< HEAD
""" Test Codecs (used by test_charmapcodec)
Written by Marc-Andre Lemburg (mal@lemburg.com).
(c) Copyright 2000 Guido van Rossum.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,e... | mit | 195,848,417,422,403,780 | 20.853333 | 68 | 0.680293 | false |
ebrelsford/django-moderation | setup.py | 1 | 1044 | from setuptools import setup, find_packages
import os
version = '0.3.2'
setup(name='django-moderation',
version=version,
description="Generic Django objects moderation application",
long_description=open("README.rst").read() + "\n" +
open(os.path.join("docs", "HISTORY.txt")).r... | bsd-3-clause | -987,593,874,246,280,200 | 30.636364 | 72 | 0.582375 | false |
akx/coffin | tests/test_env.py | 1 | 1798 | """Test construction of the implicitly provided JinjaEnvironment,
in the common.py module.
"""
from coffin.common import get_env
from django.test.utils import override_settings
def test_i18n():
with override_settings(USE_I18N=True):
assert get_env().from_string('{{ _("test") }}').render() == 'test'
cla... | bsd-3-clause | 4,239,459,690,103,146,500 | 38.086957 | 93 | 0.657953 | false |
piyushroshan/tuxofwar2012 | questiondb.py | 1 | 1400 | # Model Defining Questions Database
import string
from google.appengine.ext import db
class questionm(db.Model):
questionNumber = db.IntegerProperty(required=True)
question = db.StringProperty(required=True, multiline=True)
qimage = db.StringProperty()
opt1 = db.StringProperty(required=True, multiline=True)
opt2 =... | gpl-2.0 | -2,501,730,747,631,768,600 | 32.333333 | 81 | 0.487857 | false |
playpauseandstop/setman | setman/utils/importlib.py | 1 | 1408 | """
Backported from `importlib <http://pypi.python.org/pypi/importlib>` library,
which itself backported from Python 3.x branch.
"""
# While not critical (and in no way guaranteed!), it would be nice to keep this
# code compatible with Python 2.3.
import sys
def _resolve_name(name, package, level):
"""Return the a... | bsd-3-clause | -9,140,119,519,811,707,000 | 33.341463 | 79 | 0.617898 | false |
authman/Python201609 | Nguyen_Ken/Assignments/Flask/registration_form/server.py | 1 | 1721 | from flask import Flask, render_template, request, redirect, session, flash
import re
app = Flask(__name__)
app.secret_key = 'secretsquirrel'
EMAIL_REGEX = re.compile(r'^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9._-]+\.[a-zA-Z]+$')
@app.route('/')
def index():
return render_template('index.html')
@app.route('/process', meth... | mit | 6,433,111,740,301,173,000 | 27.683333 | 80 | 0.632191 | false |
altova/sec-edgar-tools | sec_filing_to_xlsx.py | 1 | 11948 | # Copyright 2015 Altova GmbH
#
# 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 writi... | apache-2.0 | -8,564,099,729,764,443,000 | 42.286232 | 134 | 0.640214 | false |
Kyly/mustaske | test/selenium_src/leave_room.py | 1 | 3018 | # -*- coding: utf-8 -*-
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select
from selenium.common.exceptions import NoSuchElementException
from selenium.common.exceptions import NoAlertPresentException... | mit | 4,663,683,868,890,262,000 | 41.507042 | 98 | 0.661034 | false |
jayvdb/flake8-copyright | setup.py | 1 | 1860 | # -=- encoding: utf-8 -=-
#
# Copyright (C) 2014 Savoir-faire Linux Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later versio... | gpl-3.0 | 3,025,203,135,656,725,500 | 30.525424 | 85 | 0.667204 | false |
berkmancenter/mediacloud | apps/common/tests/python/mediawords/languages/test_ro.py | 1 | 5631 | from unittest import TestCase
from mediawords.languages.ro import RomanianLanguage
# noinspection SpellCheckingInspection
class TestRomanianLanguage(TestCase):
def setUp(self):
self.__tokenizer = RomanianLanguage()
def test_language_code(self):
assert self.__tokenizer.language_code() == "ro... | agpl-3.0 | 8,981,776,761,986,026,000 | 53.71 | 120 | 0.634984 | false |
mohitsethi/solum | solum/api/controllers/v1/extension.py | 1 | 2846 | # 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 writing, software
# distributed under t... | apache-2.0 | -1,911,150,574,673,588,200 | 34.575 | 76 | 0.682713 | false |
amacd31/bom_data_parser | tests/test_hrs.py | 1 | 2066 | import os
import numpy as np
import pandas as pd
import unittest
from datetime import datetime
from bom_data_parser import read_hrs_csv
class HRSTest(unittest.TestCase):
def setUp(self):
self.test_cdo_file = os.path.join(os.path.dirname(__file__), 'data', 'HRS', '410730_daily_ts.csv')
def test_hrs(se... | bsd-3-clause | 2,147,693,488,770,582,500 | 42.041667 | 106 | 0.659245 | false |
Microsoft/hummingbird | hummingbird/ml/exceptions.py | 1 | 1451 | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
"""
Commo... | mit | 3,006,908,187,354,725,400 | 29.229167 | 92 | 0.623019 | false |
zhaogaolong/oneFinger | openstack/api/opentack_ansible.py | 1 | 1743 | #!/usr/bin/env python
# coding:utf8
# import pdb
import ansible.runner
from one_finger.cloud_logging import cloud_logging as logging
log = logging.logger
class CmmAndRun():
def __init__(self, module_name='shell', host=None, cmd=None, timeout=20):
self.username = 'root'
self.module_n... | apache-2.0 | -7,011,476,624,317,718,000 | 24.846154 | 77 | 0.522088 | false |
moiseshiraldo/inviMarket | inviMarket/views/register.py | 1 | 2814 | # -*- coding: utf-8 -*-
from django.shortcuts import render, redirect
from django.template.loader import render_to_string
from django.core.mail import send_mail
from django.conf import settings
from django.utils.http import urlsafe_base64_encode
from django.utils.encoding import force_bytes
from django.utils import ti... | agpl-3.0 | -5,880,959,783,419,259,000 | 36.533333 | 78 | 0.615849 | false |
scealiontach/cryptotrading | src/autotrader/hashnest.py | 1 | 4020 | import urllib,urllib.parse,urllib.request,urllib.error
import json
import time,datetime
import hashlib,hmac,base64
import logging
LOG=logging.getLogger(__name__)
#SELL='sale'
#BUY='purchase'
class hashnest(object):
URL = 'https://www.hashnest.com/api/v1/'
def __init__(self,username,key,secret):
... | apache-2.0 | -3,889,870,154,564,766,000 | 29.687023 | 116 | 0.568159 | false |
sony/nnabla | python/test/utils/learning_rate_scheduler/test_cosine_scheduler.py | 1 | 1249 | # Copyright 2018,2019,2020,2021 Sony Corporation.
#
# 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 a... | apache-2.0 | 3,984,834,450,309,616,600 | 33.694444 | 92 | 0.717374 | false |
foxmask/django-th | django_th/html_entities.py | 1 | 1275 | # coding: utf-8
import html.entities as htmlentities
import re
class HtmlEntities:
def __init__(self, my_string):
self.my_string = my_string
def html_entity_decode_char(self, m, defs=htmlentities.entitydefs):
"""
decode html entity into one of the html char
"""
tr... | bsd-3-clause | 8,504,328,862,743,241,000 | 27.977273 | 74 | 0.545098 | false |
cihai/cihai-python | tests/test_conversion.py | 1 | 3543 | # -*- coding: utf-8 -*-
"""Tests for cihai.
test.conversion
~~~~~~~~~~~~~~~
"""
from __future__ import absolute_import, print_function, unicode_literals
from cihai import conversion
from cihai._compat import string_types, text_type
def test_text_type():
c1 = '(same as U+7A69 穩) firm; stable; secure'
c2 = ... | bsd-3-clause | 5,327,725,858,940,054,000 | 23.608392 | 85 | 0.687411 | false |
sajeeshcs/nested_projects_keystone | keystone/credential/controllers.py | 1 | 4503 | # Copyright 2013 OpenStack Foundation
#
# 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... | apache-2.0 | -4,493,071,998,995,930,600 | 41.084112 | 78 | 0.642016 | false |
guoxuesong/deepstacks | deepstacks/lasagne/utils.py | 1 | 2721 | #!/usr/bin/env python
# coding:utf-8
# vi:tabstop=4:shiftwidth=4:expandtab:sts=4
import theano
import lasagne
from join import join_layer as JoinLayer
from ..utils.curry import curry
floatX = theano.config.floatX
def ordered_errors(errors, m=None, prefix='', deterministic=False):
res = []
for t in errors:
... | mit | 6,609,764,372,025,347,000 | 30.275862 | 109 | 0.575891 | false |
DevynCJohnson/Pybooster | pylib/convvolume.py | 1 | 120739 | #!/usr/bin/env python3
# -*- coding: utf-8; Mode: Python; indent-tabs-mode: nil; tab-width: 4 -*-
# vim: set fileencoding=utf-8 filetype=python syntax=python.doxygen fileformat=unix tabstop=4 expandtab :
# kate: encoding utf-8; bom off; syntax python; indent-mode python; eol unix; replace-tabs off; indent-width 4; tab-... | lgpl-3.0 | 8,123,197,804,647,962,000 | 31.317719 | 150 | 0.65307 | false |
googleapis/python-pubsublite | tests/unit/pubsublite/cloudpubsub/internal/single_partition_subscriber_test.py | 1 | 10169 | # Copyright 2020 Google LLC
#
# 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 writing, s... | apache-2.0 | -7,433,503,452,001,105,000 | 33.588435 | 86 | 0.68699 | false |
slickqa/slickqaweb | slickqaweb/api/files.py | 1 | 7168 | __author__ = 'jcorbett'
from slickqaweb.app import app
from flask import request, Response
from bson import ObjectId
from slickqaweb.model.storedFile import StoredFile
from slickqaweb.model.fileChunk import FileChunk
from slickqaweb.model.serialize import deserialize_that
from .standardResponses import JsonResponse, r... | apache-2.0 | -2,193,309,757,777,340,400 | 43.8 | 183 | 0.667132 | false |
r3kall/AnimeRecommenderSystem | animerecommendersystem/recommender_systems/CollaborativeFilteringRS.py | 1 | 8293 | """
This files offers a recommendation system based on collaborative filtering technique.
1) Let U be the user we want to give recommendations to, for each user U2 != U we need to compute distance(U, U2) (*)
and get the top K neighbors. These neighbors should have watched a lot of animes also watched by U,
giv... | gpl-3.0 | -702,501,294,063,169,000 | 42.647368 | 123 | 0.606415 | false |
icereval/scrapi | scrapi/harvesters/stepic.py | 1 | 2795 | """
Stepic.org harvester of MOOC-online courses for SHARE Notification Service
Example API query: https://stepic.org:443/api/lessons/100
"""
from __future__ import unicode_literals
import json
import pycountry
from dateutil.parser import parse
from scrapi import requests
from scrapi.base import JSONHarvester
from s... | apache-2.0 | -3,222,189,658,091,499,500 | 31.126437 | 97 | 0.546333 | false |
Onager/plaso | plaso/analysis/interface.py | 1 | 2822 | # -*- coding: utf-8 -*-
"""This file contains the interface for analysis plugins."""
import abc
import calendar
import collections
import time
from plaso.analysis import definitions as analysis_definitions
from plaso.analysis import logger
from plaso.containers import events
from plaso.containers import reports
from ... | apache-2.0 | -2,152,688,887,689,937,000 | 29.673913 | 76 | 0.706591 | false |
karras/gitlab-docsbot | setup.py | 1 | 2639 | # -*- coding: UTF-8 -*-
"""Setuptools package definition"""
from setuptools import setup
from setuptools import find_packages
import codecs
import os
import sys
version = sys.version_info[0]
if version > 2:
pass
else:
pass
__version__ = None
version_file = "autodocs/version.py"
with codecs.open(version_fi... | gpl-3.0 | 5,100,969,825,408,567,000 | 28 | 76 | 0.560818 | false |
KarrLab/kinetic_datanator | datanator/data_source/metabolites_meta_collection.py | 1 | 14782 | from datanator_query_python.query import query_sabiork, query_xmdb
from datanator.util import chem_util
from datanator.util import file_util
from datanator.util import index_collection
import datanator.config.core
import pymongo
import re
from pymongo.collation import Collation, CollationStrength
class MetabolitesMet... | mit | -7,996,290,644,230,414,000 | 48.273333 | 124 | 0.468069 | false |
DigitalPandacoin/pandacoin | test/functional/feature_config_args.py | 1 | 2329 | #!/usr/bin/env python3
# Copyright (c) 2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test various command line arguments and configuration file parameters."""
import os
from test_framework.te... | mit | -4,612,651,100,947,003,000 | 46.530612 | 169 | 0.661228 | false |
metomi/rose | metomi/rosie/graph.py | 1 | 9686 | # Copyright (C) British Crown (Met Office) & Contributors.
# This file is part of Rose, a framework for meteorological suites.
#
# Rose is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the L... | gpl-3.0 | -901,207,645,010,932,700 | 33.469751 | 79 | 0.596118 | false |
bitmazk/django-frequently | frequently/tests/forms_tests.py | 1 | 1290 | """Tests for the forms of the ``django-frequently`` app."""
from django.test import TestCase
from mixer.backend.django import mixer
from .. import forms
class EntryFormTestCase(TestCase):
"""Tests for the ``EntryForm`` form class."""
def setUp(self):
self.owner = mixer.blend('auth.User')
def te... | mit | 9,197,072,594,367,914,000 | 38.090909 | 79 | 0.570543 | false |
herrnst/script.xbmc.lcdproc | resources/lib/lcdproc.py | 1 | 21691 | '''
XBMC LCDproc addon
Copyright (C) 2012-2018 Team Kodi
Copyright (C) 2012-2018 Daniel 'herrnst' Scheller
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of ... | gpl-2.0 | 4,010,940,431,878,455,000 | 32.681677 | 360 | 0.647411 | false |
deepmind/deep-verify | deep_verify/src/auto_verifier.py | 1 | 9808 | # coding=utf-8
# Copyright 2019 DeepMind Technologies Limited.
#
# 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 applic... | apache-2.0 | 5,044,877,332,549,764,000 | 38.869919 | 80 | 0.662622 | false |
SafeW3rd/Ciphers | simpleSubHacker.py | 1 | 7029 | # Simple Substitution Cipher Hacker
# http://inventwithpython.com/hacking (BSD Licensed)
import os, re, copy, pprint, pyperclip, simpleSubCipher, makeWordPatterns
if not os.path.exists('wordPatterns.py'):
makeWordPatterns.main() # create the wordPatterns.py file
import wordPatterns
LETTERS = 'ABCDEFGHIJ... | mit | -4,164,585,501,999,395,000 | 43.070513 | 405 | 0.654289 | false |
fle-internal/content-curation | contentcuration/contentcuration/management/commands/exportchannel.py | 1 | 27865 | import collections
import itertools
import json
import logging as logmodule
import os
import re
import sys
import tempfile
import uuid
import zipfile
from itertools import chain
from django.conf import settings
from django.core.files import File
from django.core.files.storage import default_storage as storage
from dja... | mit | -1,944,273,147,826,961,200 | 42.335925 | 156 | 0.656271 | false |
ntt-sic/nova | nova/compute/api.py | 1 | 161884 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2011 Piston Cloud Computing, Inc.
# Copyright 2012-2013 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache Lic... | apache-2.0 | -2,824,583,000,643,304,000 | 42.505509 | 79 | 0.569476 | false |
ammarkhann/FinalSeniorCode | lib/python2.7/site-packages/google/cloud/gapic/errorreporting/v1beta1/error_group_service_client.py | 1 | 10469 | # Copyright 2017, Google Inc. All rights reserved.
#
# 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 ... | mit | 8,283,711,628,382,273,000 | 40.543651 | 169 | 0.647244 | false |
kmoocdev2/edx-platform | openedx/features/course_experience/views/course_outline.py | 1 | 5344 | """
Views to show a course outline.
"""
import re
import datetime
from completion import waffle as completion_waffle
from django.contrib.auth.models import User
from django.template.context_processors import csrf
from django.template.loader import render_to_string
from opaque_keys.edx.keys import CourseKey
from pytz i... | agpl-3.0 | -8,452,376,268,452,737,000 | 38.007299 | 115 | 0.661302 | false |
openpermissions/repository-srv | tests/unit/controllers/test_assets_handler.py | 1 | 5620 | # -*- coding: utf-8 -*-
# Copyright 2016 Open Permissions Platform Coalition
# 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 appl... | apache-2.0 | -9,183,863,592,397,668,000 | 37.758621 | 122 | 0.738256 | false |
davidsminor/gaffer | python/GafferSceneUI/ExecutableRenderUI.py | 1 | 2102 | ##########################################################################
#
# Copyright (c) 2014, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Red... | bsd-3-clause | -8,632,754,748,786,710,000 | 47.883721 | 123 | 0.694577 | false |
FilipeMaia/arrayfire-python | arrayfire/array.py | 1 | 30063 | #######################################################
# Copyright (c) 2015, ArrayFire
# All rights reserved.
#
# This file is distributed under 3-clause BSD license.
# The complete license agreement can be obtained at:
# http://arrayfire.com/licenses/BSD-3-Clause
######################################################... | bsd-3-clause | -5,315,669,486,786,941,000 | 27.30791 | 100 | 0.520939 | false |
ethansshaw/stellavitrum | ScienceFairProcess.py | 1 | 10349 | #!/usr/bin/env python
"""
Written by Ethan Shaw
"""
from astropy.io import fits
import sys, png, math, os
colors = ['red', 'green', 'blue']
# Build x_axis_len rows, each containing y_axis_len columns
# access with PNG_data[row][column]
def buildMatrix(x_axis_len, y_axis_len, greyscale=True):
# set up empty list (mat... | mit | 1,193,926,610,286,185,000 | 30.081081 | 109 | 0.689439 | false |
sbelskie/symplicity | Symplicity/local_settings.py | 1 | 2695 | """
Django settings for Symplicity project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
import os
import dj_database_url
# Build paths inside the... | apache-2.0 | 5,726,592,050,074,065,000 | 24.683168 | 77 | 0.687199 | false |
oldm/OldMan | oldman/schema/hydra.py | 1 | 1520 | from uuid import uuid4
from rdflib import URIRef, RDF, RDFS
from oldman.vocabulary import OLDM_CORRESPONDING_CLASS
class HydraSchemaAdapter(object):
"""Updates some Hydra patterns in the schema graph:
- hydra:Link: create a hydra:Class, subclass of the link range that support the same operations
"... | bsd-3-clause | -5,559,144,035,788,686,000 | 35.190476 | 105 | 0.646053 | false |
rkokkelk/Gulliver | deluge/core/core.py | 1 | 36618 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2009 Andrew Resch <andrewresch@gmail.com>
# Copyright (C) 2011 Pedro Algarvio <pedro@algarvio.me>
#
# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
# the additional special exception to link portions of this program with t... | gpl-3.0 | -1,125,341,462,122,659,600 | 36.441718 | 118 | 0.612458 | false |
blackshirt/dompetku | dompetku/handler/services.py | 1 | 3750 | #!/usr/bin/env python
#
# Copyright @2014 blackshirtmuslim@yahoo.com
# Licensed: see Python license
"""Module to handle json services."""
import datetime
import json
import peewee
import tornado.web
import tornado.escape
from dompetku.handler import base
from dompetku.utils import jsonify
from dompetku.model import ... | bsd-2-clause | -4,487,325,386,750,957,000 | 29.241935 | 92 | 0.524267 | false |
spel-uchile/SUCHAI-Flight-Software | sandbox/log_parser.py | 1 | 1956 | import re
import argparse
import pandas as pd
# General expressions
re_error = re.compile(r'\[ERROR\]\[(\d+)\]\[(\w+)\](.+)')
re_warning = re.compile(r'\[WARN \]\[(\d+)\]\[(\w+)\](.+)')
re_info = re.compile(r'\[INFO \]\[(\d+)\]\[(\w+)\](.+)')
re_debug = re.compile(r'\[DEBUG\]\[(\d+)\]\[(\w+)\](.+)')
re_verbose = re.co... | gpl-3.0 | 7,759,135,881,385,060,000 | 30.548387 | 83 | 0.599182 | false |
pombreda/ruffus | ruffus/test/test_verbosity.py | 1 | 8627 | #!/usr/bin/env python
from __future__ import print_function
"""
test_verbosity.py
"""
temp_dir = "test_verbosity/"
import unittest
import os
import sys
# add grandparent to search path for testing
grandparent_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", ".."))
sys.path.insert(0, grandpar... | mit | 8,074,170,189,742,017,000 | 44.405263 | 144 | 0.534833 | false |
ewilazarus/snnm | snnm.py | 1 | 2886 | #!/usr/bin/python
"""
snnm
~~~~
This module contains the source code for `snnm`
Snnm is an utility tool created to fetch synonyms for a given expression from
the web and print them to the console.
"""
import bs4
import click
import requests
BASE_URL = 'http://www.thesaurus.com/browse/'
def _fetch_html(expression):... | mit | -3,771,467,267,364,749,000 | 24.767857 | 79 | 0.592862 | false |
guillaume-philippon/aquilon | tests/broker/test_del_virtual_switch.py | 1 | 2507 | #!/usr/bin/env python
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*-
# ex: set expandtab softtabstop=4 shiftwidth=4:
#
# Copyright (C) 2009,2010,2012,2013,2014,2015,2016 Contributor
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the Licen... | apache-2.0 | -7,692,059,405,420,377,000 | 38.171875 | 79 | 0.682489 | false |
vmalloc/gossip | gossip/utils.py | 2 | 2484 | import itertools
from .exceptions import CannotResolveDependencies
from .helpers import DONT_CARE, FIRST
def topological_sort_registrations(registrations, unconstrained_priority=DONT_CARE):
graph = _build_dependency_graph(registrations, unconstrained_priority=unconstrained_priority)
returned_indices = _topolo... | bsd-3-clause | 8,597,037,287,050,342,000 | 36.636364 | 99 | 0.612721 | false |
BrewPi/brewpi-service | test/test_couchdb_client.py | 1 | 3284 | """
Tests brewblox_service.couchdb_client
"""
import pytest
from aiohttp import web
from aiohttp.client_exceptions import ClientResponseError
from brewblox_service import couchdb_client, http_client
TESTED = couchdb_client.__name__
SRV_URL = couchdb_client.COUCH_URL[len('http://'):]
DB_URL = '/sparkbase'
DOC_URL = '... | gpl-3.0 | -3,470,771,546,410,322,400 | 39.04878 | 100 | 0.643423 | false |
philanthropy-u/edx-platform | openedx/core/djangoapps/user_authn/views/tests/test_login.py | 1 | 29762 | # coding:utf-8
"""
Tests for student activation and login
"""
import json
import unicodedata
import unittest
import ddt
import six
from django.conf import settings
from django.contrib.auth.models import User
from django.core import mail
from django.core.cache import cache
from django.http import HttpResponse, HttpResp... | agpl-3.0 | -3,259,418,563,379,477,500 | 44.621538 | 118 | 0.643859 | false |
bruteforce1/cryptopals | set2/ch10/implement_aes_cbc.py | 1 | 2510 | #!/usr/bin/python3
"""
CBC mode is a block cipher mode that allows us to encrypt irregularly-
sized messages, despite the fact that a block cipher natively only
transforms individual blocks.
In CBC mode, each ciphertext block is added to the next plaintext block
before the next call to the cipher core.
The first... | mit | 5,468,502,557,935,550,000 | 34.352113 | 77 | 0.61753 | false |
charanpald/features | features/test/PrimalCCATest.py | 1 | 3226 |
import unittest
import numpy
import scipy.linalg
from features.PrimalCCA import PrimalCCA
from features.KernelCCA import KernelCCA
from kernel.LinearKernel import LinearKernel
import logging
class PrimalCCATest(unittest.TestCase):
def setUp(self):
numpy.seterr(all='ignore')
pass
def test... | gpl-3.0 | -873,620,248,228,570,200 | 27.298246 | 85 | 0.579045 | false |
myt00seven/svrg | cifar/alexnet_lasagne/lasagne-googlenet-master/googlenet/layers/bn.py | 1 | 4243 | import numpy as np
import theano.tensor as T
import theano
from lasagne import init # from .. import init
from lasagne import nonlinearities # from .. import nonlinearities
from lasagne.layers.base import Layer # from .base import Layer
__all__ = [
"BNLayer",
]
class BNLayer(Layer):
"""
lasagne.layers... | mit | 4,750,715,369,948,741,000 | 40.194175 | 191 | 0.634928 | false |
qrsforever/workspace | python/learn/thinkstats/rankit.py | 1 | 1807 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
"""This file contains code for use with "Think Stats",
by Allen B. Downey, available from greenteapress.com
Copyright 2010 Allen B. Downey
License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html
"""
import random
import thinkstats
import myplot
import matplotlib.pyplot as p... | mit | 151,881,123,661,949,600 | 21.308642 | 75 | 0.614278 | false |
baliga-lab/weeder_patched | python/seqtools.py | 1 | 3069 | HAMMING_MAX = 9999
def read_sequences_from_fasta_string(fasta_string):
"""reads the sequences contained in a FASTA string"""
lines = fasta_string.split('\n')
sequences = []
seqbuffer = ""
seqname = None
for line in lines:
line = line.strip()
if line.startswith('>'):
... | gpl-3.0 | -7,517,009,544,331,105,000 | 24.789916 | 62 | 0.525904 | false |
mohanprasath/Course-Work | data_analysis/uh_data_analysis_with_python/hy-data-analysis-with-python-spring-2020/part03-e05_correlation/test/test_correlation.py | 1 | 2795 | #!/usr/bin/env python3
import unittest
from unittest.mock import patch
from tmc import points
from tmc.utils import load, get_out
module_name="src.correlation"
correlations = load(module_name, "correlations")
lengths = load(module_name, "lengths")
def patch_name(m, d):
import importlib
parts=d.split(".")
... | gpl-3.0 | -656,753,270,546,592,900 | 33.085366 | 105 | 0.563148 | false |
hobarrera/todoman | tests/test_filtering.py | 1 | 8808 | from datetime import datetime
from datetime import timedelta
from todoman.cli import cli
from todoman.model import Database
from todoman.model import Todo
def test_priority(tmpdir, runner, create):
result = runner.invoke(cli, ["list"], catch_exceptions=False)
assert not result.exception
assert not result... | isc | 6,266,408,189,354,740,000 | 32.618321 | 75 | 0.642484 | false |
NeoRazorX/ubuntufaq | public.py | 1 | 15820 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This file is part of ubuntufaq
# Copyright (C) 2011 Carlos Garcia Gomez neorazorx@gmail.com
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foun... | agpl-3.0 | -7,409,657,376,595,017,000 | 43.784703 | 179 | 0.49864 | false |
DataDog/integrations-core | openstack_controller/tests/common.py | 1 | 14615 | # (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
import datetime
import os
CHECK_NAME = 'openstack'
FIXTURES_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'fixtures')
ALL_IDS = ['server-1', 'server-2', 'other-1', 'other-2']
EXCLUDED_NETWORK... | bsd-3-clause | 3,778,650,173,125,150,700 | 37.159269 | 119 | 0.515156 | false |
asimshankar/tensorflow | tensorflow/python/saved_model/save.py | 1 | 34278 | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# 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 applica... | apache-2.0 | -1,015,136,350,667,706,800 | 45.010738 | 162 | 0.722212 | false |
alejandroesquiva/AutomaticApiRest-PythonConnector | example/test.py | 1 | 1552 | __author__ = 'Alejandro Esquiva Rodriguez'
from aarpy.AARConnector import AARConnector
#AAR Instance
##Create instance via URL
AAR = AARConnector(url="http://automaticapirest.info/demo/getData.php?t=Country&c=Code,Name&l=0,5")
##Create instance via parameters
AAR = AARConnector(domain="http://automaticapirest.info/d... | mit | 2,217,455,657,594,030,000 | 17.258824 | 362 | 0.556701 | false |
stephane-caron/ijhr-2016 | pymanoid/cone.py | 1 | 2305 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2015 Stephane Caron <stephane.caron@normalesup.org>
#
# This file is part of pymanoid.
#
# pymanoid is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundatio... | gpl-3.0 | 8,395,834,680,207,245,000 | 25.802326 | 79 | 0.625163 | false |
cs98jrb/Trinity | mysite/events/forms/booking.py | 1 | 2961 | __author__ = 'james'
from django.utils.translation import ugettext as _
from django import forms
from django.core.exceptions import ValidationError
from django.contrib.auth.models import User
from django.contrib.auth import login, authenticate
from events.models import Booking
from orders.models import Order, OrderIt... | gpl-2.0 | -287,810,376,454,806,340 | 28.039216 | 72 | 0.570078 | false |
Midnighter/pyorganism | setup.py | 1 | 2511 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
==================
PyOrganism Package
==================
:Authors:
Moritz Emanuel Beber
:Date:
2012-05-22
:Copyright:
Copyright(c) 2012 Jacobs University of Bremen. All rights reserved.
:File:
setup.py
"""
import sys
from os.path import join
from s... | bsd-3-clause | 7,473,944,302,607,792,000 | 29.621951 | 94 | 0.562724 | false |
abice-sbr/adaptsearch | blastalign.py | 1 | 4394 | import string, re
# Written by Robert Belshaw (School of Biomedical & Healthcare Sciences, University of Plymouth) & Aris Katzourakis (Department of Zoology, University of Oxford)
# For more information and to cite see Belshaw, R & Katzourakis, A (2005) BlastAlign: a program that uses blast to align problematic nucleo... | gpl-3.0 | 5,974,816,698,575,030,000 | 28.891156 | 181 | 0.69117 | false |
chrismamil/chowda | test/test_chowda.py | 1 | 2201 | import unittest
import os
import chowda.parsing as parse
import datetime
import pandas as pd
from chowda.load import load_file
DATA_DIR = os.path.join(os.path.dirname(__file__), "data")
TEST_FILE = "CTL1 wk3 exp1 RAW data.txt"
TEST_1 = os.path.join(DATA_DIR, TEST_FILE)
class TestChowda(unittest.TestCase):
def s... | mit | -1,276,954,630,114,679,000 | 35.081967 | 73 | 0.613358 | false |
CDKGlobal/cd-performance-promotion | cd_perf_promotion/engines/comparisonengine.py | 1 | 19434 | import json
import operator
class ComparisonEngine:
"""
Queries the performance tools' APIs and determines if the build passes
the target requirements.
"""
def check_health_severity(self, violation):
"""
Fails the build if the defined severity is found in the health rule
vi... | mit | -1,119,515,072,854,985,200 | 64.877966 | 229 | 0.591129 | false |
Frky/scat | src/shell/memory/addrtable.py | 1 | 1331 | #-*- coding: utf-8 -*-
class AddrTable(object):
TABLE_SIZE = 10000
def __init__(self, dic=False):
self.__addr = list()
self.__dic = dic
for i in xrange(AddrTable.TABLE_SIZE):
if self.__dic:
self.__addr.append(dict())
else:
self._... | mit | -7,471,110,895,551,581,000 | 26.163265 | 50 | 0.486852 | false |
BenjaminSchubert/web-polls | backend/errors/http.py | 1 | 1737 | """
This module contains a collection of commonly encountered HTTP exceptions.
This allows all these http exceptions to be treated in the same way and simplifies the return of errors to the user.
"""
from errors import ErrorMessage
__author__ = "Benjamin Schubert <ben.c.schubert@gmail.com>"
class BaseHTTPExceptio... | mit | -7,086,277,074,543,223,000 | 27.95 | 116 | 0.639033 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.