repo_name
stringlengths
5
100
path
stringlengths
4
299
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1.03M
license
stringclasses
15 values
hash
int64
-9,223,351,895,964,839,000
9,223,297,778B
line_mean
float64
3.17
100
line_max
int64
7
1k
alpha_frac
float64
0.25
0.98
autogenerated
bool
1 class
funkbit/django-funky-user
funky_user/views.py
1
2479
from django.conf import settings from django.contrib.auth import login as auth_login, get_user_model from django.contrib.auth.tokens import default_token_generator from django.shortcuts import redirect, render from django.utils.http import base36_to_int from django.views.decorators.debug import sensitive_post_parameter...
bsd-2-clause
-5,861,493,197,801,414,000
26.544444
84
0.653086
false
mooninite/cobbler
cobbler/action_check.py
6
19294
""" Copyright 2006-2009, Red Hat, Inc and Others Michael DeHaan <michael.dehaan AT gmail> 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 the License, or (at your option) any late...
gpl-2.0
-3,521,767,215,008,514,600
43.354023
538
0.593915
false
ocefpaf/iris
lib/iris/tests/integration/test_pp.py
2
29216
# Copyright Iris contributors # # This file is part of Iris and is released under the LGPL license. # See COPYING and COPYING.LESSER in the root of the repository for full # licensing details. """Integration tests for loading and saving PP files.""" # Import iris.tests first so that some things can be initialised befo...
lgpl-3.0
1,716,455,523,335,447,000
35.474407
79
0.586904
false
devbv/incubator-openwhisk
tools/travis/box-upload.py
11
2013
#!/usr/bin/env python """Executable Python script for compressing folders to Box. Compresses the contents of a folder and upload the result to Box. Run this script as: $ upload-logs.py LOG_DIR DEST_NAME e.g.: $ upload-logs.py /tmp/wsklogs logs-5512.tar.gz /* * Licensed to the Apache Software Foundation (ASF)...
apache-2.0
-247,345,912,731,283,650
30.952381
79
0.667163
false
maestrano/openerp
maestrano/app/sso/MnoSsoUser.py
1
5468
import os from MnoSsoBaseUser import MnoSsoBaseUser import openerp from openerp import SUPERUSER_ID from openerp.modules.registry import RegistryManager from openerp.osv.fields import char import inspect import werkzeug # # Configure App specific behavior for # Maestrano SSO # class MnoSsoUser(MnoSsoBaseUser): # ...
agpl-3.0
-1,341,544,641,695,872,500
35.211921
113
0.56218
false
jleclanche/dj-stripe
djstripe/settings.py
1
7051
# -*- coding: utf-8 -*- """ .. module:: djstripe.settings. :synopsis: dj-stripe settings .. moduleauthor:: @kavdev, @pydanny, @lskillen, and @chrissmejia """ from __future__ import absolute_import, division, print_function, unicode_literals import stripe from django.apps import apps as django_apps from django.con...
mit
-6,082,480,904,387,415,000
34.791878
107
0.698341
false
Kriechi/mitmproxy
mitmproxy/io/tnetstring.py
3
8699
""" tnetstring: data serialization using typed netstrings ====================================================== This is a custom Python 3 implementation of tnetstrings. Compared to other implementations, the main difference is that this implementation supports a custom unicode datatype. An ordinary tnetstring is a ...
mit
2,927,276,284,385,943,000
33.796
89
0.620876
false
h3llrais3r/Auto-Subliminal
lib/rebulk/pattern.py
13
18405
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Abstract pattern class definition along with various implementations (regexp, string, functional) """ # pylint: disable=super-init-not-called,wrong-import-position from abc import ABCMeta, abstractmethod, abstractproperty import six from . import debug from .loose im...
gpl-3.0
-2,933,228,572,577,658,000
36.638037
118
0.571801
false
MrElusive/Subforce
Subforce.py
1
29459
# Useful documentation: # Sublime Plugin Framework: http://docs.sublimetext.info/en/latest/reference/plugins.html # Sublime Plugin Python API: http://www.sublimetext.com/docs/3/api_reference.html # Perforce API: https://www.perforce.com/perforce/r16.1/manuals/cmdref # Perforce Python API: https://www.perforce.com/perfo...
mit
2,428,327,707,528,457,000
36.43202
156
0.676771
false
mentholi/django-user-accounts
account/models.py
8
13425
from __future__ import unicode_literals import datetime import operator try: from urllib.parse import urlencode except ImportError: # python 2 from urllib import urlencode from django.core.urlresolvers import reverse from django.db import models, transaction from django.db.models import Q from django.db.mod...
mit
-2,159,135,778,819,646,700
34.143979
110
0.626443
false
crafty78/ansible
lib/ansible/utils/color.py
9
3198
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible 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) an...
gpl-3.0
6,810,178,754,648,268,000
32.663158
98
0.629143
false
ScotticusMaximus/ModTest
ModTest.py
1
2941
#!/usr/bin/env python3 # Copyright 2015 Scott Haiden. # # 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 # version. # # This progra...
gpl-3.0
-327,454,508,247,026,200
25.981651
79
0.654879
false
RollMan/LtSRcon
src/onchatcommands.py
1
4142
# -*- coding: utf-8 -*- mapdic = {"Locker" :"MP_Prison", "Zavod" :"MP_Abandoned", "Dam" :"MP_Damage", "Flood" :"MP_Flooded", "Railway" :"MP_Journey", "Paracel" :"MP_Naval", "Hainan" :"MP_Resort", "Shanghai":"MP_Siege", "Rogue" ...
mit
-553,197,620,928,180,540
35.017391
108
0.472236
false
tungvx/deploy
Django-0.90/django/core/template/loader.py
1
8648
# Wrapper for loading templates from storage of some sort (e.g. filesystem, database). # # This uses the TEMPLATE_LOADERS setting, which is a list of loaders to use. # Each loader is expected to have this interface: # # callable(name, dirs=[]) # # name is the template name. # dirs is an optional list of directories ...
apache-2.0
1,179,641,253,401,067,500
40.980583
201
0.662697
false
saulpw/visidata
visidata/graph.py
1
7594
from visidata import * option('color_graph_axis', 'bold', 'color for graph axis labels') def numericCols(cols): return [c for c in cols if vd.isNumeric(c)] class InvertedCanvas(Canvas): def zoomTo(self, bbox): super().zoomTo(bbox) self.fixPoint(Point(self.plotviewBox.xmin, self.plotviewBox...
gpl-3.0
-749,379,561,964,870,000
40.950276
290
0.650863
false
tjakway/Gnucash-Regex-Importer
accregex/Args.py
1
2127
import argparse import datetime #see http://stackoverflow.com/questions/25470844/specify-format-for-input-arguments-argparse-python def _valid_date(s): try: return datetime.datetime.strptime(s, "%Y-%m-%d") except ValueError: msg = "Not a valid date: '{0}'.".format(s) raise argparse.Argu...
gpl-2.0
4,687,797,864,417,723,000
47.340909
212
0.679361
false
jruiperezv/ANALYSE
common/lib/xmodule/xmodule/template_module.py
20
2423
from xmodule.x_module import XModule from xmodule.raw_module import RawDescriptor from lxml import etree from mako.template import Template class CustomTagModule(XModule): """ This module supports tags of the form <customtag option="val" option2="val2" impl="tagname"/> In this case, $tagname should r...
agpl-3.0
-6,219,778,616,322,502,000
32.652778
96
0.63475
false
waseem18/oh-mainline
mysite/customs/migrations/0004_add_newcomers_field_toroundupbugtracker.py
17
3422
# This file is part of OpenHatch. # Copyright (C) 2009 OpenHatch, Inc. # # 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 Foundation, either version 3 of the License, or # (at your option) any later v...
agpl-3.0
288,147,291,279,919,000
51.646154
163
0.614553
false
FenceAtMHacks/flaskbackend
fence-api/flask/lib/python2.7/site-packages/setuptools/_vendor/packaging/specifiers.py
13
26705
# Copyright 2014 Donald Stufft # # 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, so...
mit
-5,997,865,656,622,859,000
35.382834
79
0.555814
false
ets-labs/python-dependency-injector
tests/unit/providers/test_container_py2_py3.py
1
9113
"""Dependency injector container provider unit tests.""" import copy import unittest from dependency_injector import containers, providers, errors TEST_VALUE_1 = 'core_section_value1' TEST_CONFIG_1 = { 'core': { 'section': { 'value': TEST_VALUE_1, }, }, } TEST_VALUE_2 = 'core_s...
bsd-3-clause
-4,025,203,194,327,189,500
33.259398
105
0.634368
false
david30907d/feedback_django
spirit/comment/poll/managers.py
2
1541
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models from django.db.models.loading import get_model from django.db.models import Prefetch class CommentPollQuerySet(models.QuerySet): def unremoved(self): return self.filter(is_removed=False) def for_comment(se...
mit
-6,985,964,599,124,078,000
25.118644
96
0.658663
false
debugger87/spark
python/setup.py
5
10182
#!/usr/bin/env python # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "Li...
apache-2.0
-3,248,820,117,489,993,000
41.07438
100
0.630426
false
kkintaro/termite-data-server
web2py/gluon/contrib/DowCommerce.py
16
9206
""" DowCommerce class to process credit card payments with DowCommerce.com Modifications to support Dow Commerce API from code originally written by John Conde http://www.johnconde.net/blog/integrate-the-authorizenet-aim-api-with-python-3-2/ Unknown license, assuming public domain Modifed by Dave Stoll dave.stoll@gma...
bsd-3-clause
219,258,216,984,566,080
36.729508
130
0.613404
false
trishume/MacRanger
ranger/gui/widgets/console.py
1
15189
# Copyright (C) 2009-2013 Roman Zimbelmann <hut@lepus.uberspace.de> # This software is distributed under the terms of the GNU GPL version 3. """The Console widget implements a vim-like console""" import curses import re from collections import deque from . import Widget from ranger.ext.direction import Direction fr...
gpl-3.0
-1,572,149,570,765,976,300
33.997696
85
0.524656
false
egbertbouman/tribler-g
Tribler/Plugin/Search.py
1
35105
# Written by Arno Bakker, Diego Rabioli # see LICENSE.txt for license information # # TODO: # - Switch to SIMPLE+METADATA query # # - adjust SIMPLE+METADATA such that it returns P2PURLs if possible. # - DO NOT SAVE P2PURLs as .torrent, put in 'torrent_file_name' field in DB. # # - Implement continuous dump of...
lgpl-2.1
5,569,890,133,682,828,000
36.625938
314
0.584589
false
topic2k/EventGhost
plugins/FileOperations/__init__.py
1
37658
# -*- coding: utf-8 -*- version="0.1.7" # Copyright (C) 2008-2011 Pako (lubos.ruckl@quick.cz) # # This file is a plugin for EventGhost. # Copyright © 2005-2019 EventGhost Project <http://www.eventghost.net/> # # EventGhost is free software: you can redistribute it and/or modify it under # the terms of the GNU Gener...
gpl-2.0
-7,533,842,122,160,694,000
35.27842
94
0.540271
false
googleapis/python-aiplatform
google/cloud/aiplatform_v1beta1/types/pipeline_state.py
1
1155
# -*- coding: utf-8 -*- # 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...
apache-2.0
1,121,764,629,500,372,100
30.216216
75
0.716017
false
javierag/samba
lib/subunit/python/subunit/iso8601.py
14
4587
# Copyright (c) 2007 Michael Twomey # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # d...
gpl-3.0
-7,549,753,754,683,362,000
33.488722
112
0.661871
false
houqp/floyd-cli
tests/cli/data/delete_test.py
1
7277
from click.testing import CliRunner import unittest from mock import patch, call from floyd.cli.data import delete from floyd.model.experiment_config import ExperimentConfig from tests.cli.data.mocks import mock_data, mock_project_client, mock_access_token from tests.cli.mocks import mock_data_config from tests.cli im...
apache-2.0
-7,629,995,316,263,644,000
46.253247
127
0.585681
false
laurent-george/weboob
modules/residentadvisor/test.py
7
1605
# -*- coding: utf-8 -*- # Copyright(C) 2014 Alexandre Morignot # # This file is part of weboob. # # weboob 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 Foundation, either version 3 of the License, or # (at...
agpl-3.0
-1,187,164,371,780,062,200
32.4375
77
0.701558
false
ninnux/exscript
tests/Exscript/util/ipTest.py
6
1044
import sys, unittest, re, os.path sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..', '..', 'src')) import Exscript.util.ip class ipTest(unittest.TestCase): CORRELATE = Exscript.util.ip def testIsIp(self): from Exscript.util.ip import is_ip self.assert_(is_ip('0.0.0.0')) ...
gpl-2.0
6,527,308,790,610,414,000
35
84
0.616858
false
kkmonlee/Project-Euler-Solutions
Python/p356v2.py
1
2577
import sys class Matrix(): def __init__(self, entries): self.entries = entries def __mul__(self, other): result = [[0 for j in range(len(other.entries[0]))] for i in range(len(self.entries))] for i in range(len(self.entries)): for j in range(len(other.entries[0])): ...
gpl-3.0
-250,995,158,572,273,570
32.921053
113
0.540163
false
ryfeus/lambda-packs
Opencv_pil/source/PIL/PixarImagePlugin.py
25
1671
# # The Python Imaging Library. # $Id$ # # PIXAR raster support for PIL # # history: # 97-01-29 fl Created # # notes: # This is incomplete; it is based on a few samples created with # Photoshop 2.5 and 3.0, and a summary description provided by # Greg Coats <gcoats@labiris.er.usgs.gov>. Hop...
mit
3,788,393,903,357,963,300
22.535211
72
0.591263
false
ViDA-NYU/reprozip
reprozip/reprozip/pack.py
1
7952
# Copyright (C) 2014-2017 New York University # This file is part of ReproZip which is released under the Revised BSD License # See file LICENSE for full license details. """Packing logic for reprozip. This module contains the :func:`~reprozip.pack.pack` function and associated utilities that are used to build the .r...
bsd-3-clause
-1,183,094,330,447,568,000
31.995851
79
0.577968
false
belokop/indico_bare
indico/modules/events/payment/util.py
2
3173
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
gpl-3.0
-308,189,249,017,586,370
46.358209
110
0.710054
false
Joergen/zamboni
mkt/developers/views_payments.py
1
14470
import json import urllib from datetime import datetime from django import http from django.conf import settings from django.core.exceptions import ObjectDoesNotExist from django.shortcuts import get_object_or_404, redirect import commonware from curling.lib import HttpClientError import jingo from jingo import helpe...
bsd-3-clause
4,215,820,748,799,579,600
35.819338
79
0.615204
false
MrReN/django-oscar
oscar/apps/order/migrations/0008_auto__add_field_orderdiscount_category.py
16
33182
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models from oscar.core.compat import AUTH_USER_MODEL, AUTH_USER_MODEL_NAME class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'OrderDiscount.category' ...
bsd-3-clause
2,084,114,572,480,455,400
86.783069
222
0.554276
false
Foxfanmedium/python_training
OnlineCoursera/mail_ru/Python_1/env/Lib/site-packages/prompt_toolkit/validation.py
23
1755
""" Input validation for a `Buffer`. (Validators will be called before accepting input.) """ from __future__ import unicode_literals from .filters import to_simple_filter from abc import ABCMeta, abstractmethod from six import with_metaclass __all__ = ( 'ConditionalValidator', 'ValidationError', 'Validato...
apache-2.0
6,711,840,564,356,401,000
26.421875
77
0.646154
false
pschmitt/home-assistant
homeassistant/components/powerwall/config_flow.py
6
2793
"""Config flow for Tesla Powerwall integration.""" import logging from tesla_powerwall import APIChangedError, Powerwall, PowerwallUnreachableError import voluptuous as vol from homeassistant import config_entries, core, exceptions from homeassistant.const import CONF_IP_ADDRESS from .const import DOMAIN # pylint:d...
apache-2.0
1,197,514,514,682,018,600
33.481481
90
0.664518
false
bestrauc/seqan
util/bin/demo_checker.py
10
4665
#!/usr/bin/env python2 """Demo checker script. Given a demo .cpp file PATH.cpp we can make it a small test if there is a file PATH.cpp.stdout and/or PATH.cpp.stderr. The test is implemented using this script. The script is called with the options --binary-path and one or both of --stdout-path and --stderr-path. The...
bsd-3-clause
-694,974,993,020,110,200
37.553719
140
0.598071
false
hahnicity/meg-server
meg/db.py
1
3263
from collections import namedtuple import datetime from flask.ext.sqlalchemy import SQLAlchemy from sqlalchemy.dialects.postgresql import ARRAY def create_db(app): db = SQLAlchemy(app) return db def generate_models(db): class RevocationKey(db.Model): """ The model for a PGP Revocation K...
gpl-2.0
-9,116,469,193,310,956,000
35.662921
85
0.608336
false
VHAINNOVATIONS/DmD
scrubber/MIST_2_0_4/src/MAT/lib/mat/python/MAT/Document.py
1
62461
# Copyright (C) 2007 - 2009 The MITRE Corporation. See the toplevel # file LICENSE for license terms. import sys import Command class OverlapError(Exception): pass from MAT.Annotation import Annotation, DocumentAnnotationTypeRepository, SpanlessAnnotation, \ AnnotationCore, AttributeValueSequence, Annotati...
apache-2.0
3,540,611,689,557,830,700
43.710809
192
0.543715
false
dpmatthews/rose
metomi/rose/env_cat.py
4
2206
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (C) 2012-2019 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 t...
gpl-3.0
-6,525,386,018,596,820,000
34.015873
79
0.56301
false
BarraQDA/nvivotools
querySource.py
1
5135
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2016 Jonathan Schultz # # 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 lat...
gpl-3.0
7,609,732,775,818,592,000
34.413793
110
0.55482
false
googleapis/python-aiplatform
samples/model-builder/image_dataset_import_data_sample_test.py
1
1361
# Copyright 2021 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
-2,818,455,065,200,854,500
33.025
75
0.736958
false
jumpstarter-io/glance
glance/api/v2/images.py
3
38110
# Copyright 2012 OpenStack Foundation. # 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 req...
apache-2.0
7,292,079,490,618,843,000
38.822362
79
0.548491
false
AutorestCI/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_03_01/models/application_gateway.py
1
8366
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
-275,036,238,992,185,660
55.911565
478
0.705475
false
tweezy23/nogotofail
nogotofail/mitm/connection/server.py
2
6988
r''' Copyright 2014 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 agreed to i...
apache-2.0
-2,954,718,907,837,573,600
39.865497
140
0.590298
false
miminar/openshift-ansible
roles/openshift_facts/library/openshift_facts.py
11
51780
#!/usr/bin/python # pylint: disable=too-many-lines # -*- coding: utf-8 -*- # Reason: Disable pylint too-many-lines because we don't want to split up this file. # Status: Permanently disabled to keep this module as self-contained as possible. """Ansible module for retrieving and setting openshift related facts""" # py...
apache-2.0
-8,617,930,880,546,161,000
38.830769
118
0.569139
false
orbitfp7/horizon
openstack_dashboard/dashboards/project/data_processing/clusters/urls.py
34
1613
# 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 the...
apache-2.0
-1,235,539,989,835,135,500
41.447368
69
0.549287
false
QEF/q-e_schrodinger
test-suite/testcode/lib/testcode2/validation.py
1
11350
''' testcode2.validation -------------------- Classes and functions for comparing data. :copyright: (c) 2012 James Spencer. :license: modified BSD; see LICENSE for more details. ''' import re import sys import warnings import testcode2.ansi as ansi import testcode2.compatibility as compat import testcode2.exception...
gpl-2.0
-6,717,007,280,243,656,000
41.037037
94
0.554361
false
arielalmendral/ert
python/python/ert/enkf/state_map.py
2
4920
# Copyright (C) 2012 Statoil ASA, Norway. # # The file 'enkf_fs.py' is part of ERT - Ensemble based Reservoir Tool. # # ERT 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 t...
gpl-3.0
664,415,046,870,531,500
33.405594
138
0.616057
false
mick-d/nipype
nipype/interfaces/utility/wrappers.py
1
5987
# -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """Various utilities Change directory to provide relative paths for doctests >>> import os >>> filepath = os.path.dirname(os.path.realpath(__file__)) >>> datadir = o...
bsd-3-clause
-1,269,931,418,162,323,200
36.654088
82
0.564557
false
alexkasko/krakatau-java
krakatau-lib/src/main/resources/Lib/Krakatau/ssa/exceptionset.py
1
8266
import collections, itertools from . import objtypes from .mixin import ValueType class CatchSetManager(object): def __init__(self, env, chpairs, attributes=None): if attributes is not None: self.env, self.sets, self.mask = attributes else: self.env = env self.se...
gpl-3.0
6,571,110,257,106,938,000
37.451163
119
0.572586
false
akira-baruah/bazel
third_party/py/gflags/gflags/argument_parser.py
11
15710
#!/usr/bin/env python # Copyright 2002 Google 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: # # * Redistributions of source code must retain the above copyright # notice, this list of c...
apache-2.0
-905,356,330,432,378,500
31.729167
80
0.668682
false
chrisndodge/edx-platform
openedx/core/djangoapps/catalog/tests/test_utils.py
3
9344
"""Tests covering utilities for integrating with the catalog service.""" import uuid import ddt from django.test import TestCase import mock from opaque_keys.edx.keys import CourseKey from openedx.core.djangoapps.catalog import utils from openedx.core.djangoapps.catalog.models import CatalogIntegration from openedx.c...
agpl-3.0
-628,021,784,483,039,200
37.771784
137
0.630351
false
popldo/fabric
bddtests/steps/bdd_test_util.py
14
4632
# Copyright IBM Corp. 2016 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 a...
apache-2.0
3,013,707,842,821,020,000
36.658537
99
0.712219
false
illicitonion/givabit
lib/sdks/google_appengine_1.7.1/google_appengine/google/appengine/api/xmpp/xmpp_service_stub.py
5
6883
#!/usr/bin/env python # # Copyright 2007 Google 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/licenses/LICENSE-2.0 # # Unless required by applicable law o...
apache-2.0
838,252,406,215,235,800
29.865471
80
0.640709
false
salv-orlando/MyRepo
nova/db/sqlalchemy/migrate_repo/versions/044_update_instance_states.py
4
3926
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 OpenStack 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 # ...
apache-2.0
1,963,922,868,546,017,000
27.449275
78
0.604177
false
0x46616c6b/ansible
lib/ansible/modules/cloud/google/gcpubsub.py
16
11841
#!/usr/bin/python # Copyright 2016 Google Inc. # # This file is part of Ansible # # Ansible 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 vers...
gpl-3.0
-4,408,834,727,503,473,000
34.990881
436
0.671312
false
eclectic-boy/rhodonea_mapper
tests/rhodonea_mapper/tests_models.py
1
2164
from unittest.mock import patch, call from django.contrib.gis.geos import MultiPolygon, Polygon from django.test import TestCase from pyproj import Geod from rhodonea_mapper.models import Rhodonea, Layer from tests.rhodonea_mapper.factories import ( LayerFactory, RhodoneaFactory, get_centered_envelope, ) ...
bsd-3-clause
8,421,178,477,606,176,000
27.473684
64
0.60536
false
cosailer/caeproject
simulation_result/8/project3_harmonic_coat.py
1
1991
# -*- coding: utf-8 -*- """ ------------------------------------- N A C S P Y T H O N S C R I P T ------------------------------------- NACS version: 2.0.2745 - pre3 NACS architecture: CENTOS 5.11 (X86_64) File generated at Tue Jan 20 16:55:05 2015 On host 'lse86' by 'cae42' """ from __future__ import division ...
gpl-2.0
3,311,929,993,577,821,000
27.855072
174
0.641888
false
zincsoda/qemu-heca
scripts/tracetool/backend/dtrace.py
11
2147
#!/usr/bin/env python # -*- coding: utf-8 -*- """ DTrace/SystemTAP backend. """ __author__ = "Lluís Vilanova <vilanova@ac.upc.edu>" __copyright__ = "Copyright 2012, Lluís Vilanova <vilanova@ac.upc.edu>" __license__ = "GPL version 2 or (at your option) any later version" __maintainer__ = "Stefan Hajnoczi" __e...
gpl-2.0
-1,816,221,435,878,794,000
21.113402
86
0.495105
false
Azure/azure-sdk-for-python
sdk/cognitiveservices/azure-cognitiveservices-personalizer/azure/cognitiveservices/personalizer/models/error_response_py3.py
1
1522
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
-8,343,446,994,285,037,000
30.708333
99
0.620894
false
hawwach/Hawwach-Work
plugin.video.bokra/default.py
1
8440
# -*- coding: utf8 -*- import urllib,urllib2,re,xbmcplugin,xbmcgui import xbmc, xbmcgui, xbmcplugin, xbmcaddon from httplib import HTTP from urlparse import urlparse import StringIO import urllib2,urllib import re import httplib import time import xbmcgui from urllib2 import Request, build_opener, HTTPCookieProcessor, ...
gpl-2.0
-6,845,934,217,304,861,000
33.4
159
0.562055
false
BehnamEmamian/tdesktop
Telegram/SourceFiles/mtproto/generate.py
3
45546
''' This file is part of Telegram Desktop, the official desktop version of Telegram messaging app, see https://telegram.org Telegram Desktop 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...
gpl-3.0
-52,681,385,546,284,330
45.006061
232
0.573113
false
cades/qualitybots
src/appengine/common/useragent_parser.py
26
6495
#!/usr/bin/python2.4 # # Copyright 2011 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...
apache-2.0
-311,655,636,466,601,340
28.793578
80
0.653118
false
scitran/api
tests/unit_tests/python/test_gear_util.py
2
1538
import copy from api.jobs import gears # DISCUSS: this basically asserts that the log helper doesn't throw, which is of non-zero but questionable value. # Could instead be marked for pytest et. al to ignore coverage? Desirability? Compatibility? def test_fill_defaults(): gear_config = { 'key_one': {...
mit
-6,420,825,812,181,520,000
26.464286
113
0.574122
false
hackultura/django-badger
badger/south_migrations/0006_auto__add_field_nomination_rejecter__add_field_nomination_rejection_re.py
9
11582
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Nomination.rejected_by' db.add_column('badger_nomination', 'rejected_by', ...
bsd-3-clause
6,520,274,571,262,319,000
78.875862
183
0.551718
false
psi29a/django-authopenid
django_authopenid/forms.py
1
5436
# -*- coding: utf-8 -*- # Copyright 2007, 2008,2009 by Benoît Chesneau <benoitc@e-engura.org> # # 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...
apache-2.0
-6,427,070,213,331,639,000
41.460938
97
0.616375
false
xparedesfortuny/Phot
analysis/multi_night_std_test.py
1
2214
# Author: Xavier Paredes-Fortuny (xparedesfortuny@gmail.com) # License: MIT, see LICENSE.md import numpy as np import matplotlib.pyplot as plt from matplotlib.ticker import MultipleLocator def compute_nightly_average(cat_mag): return np.asarray([[np.average(mag[:, i]) for i in xrange(len(mag[0, :]))] for mag in...
mit
1,029,043,583,157,024,300
34.709677
99
0.542909
false
wslihgt/pyfasst
pyfasst/tftransforms/nsgt/nsgtf.py
1
3768
''' Created on 05.11.2011 @author: thomas ''' import numpy as N from math import ceil from itertools import izip from util import chkM,fftp,ifftp try: import theano as T except ImportError: T = None #@profile def nsgtf_sl(f_slices,g,wins,nn,M=None,real=False,reducedform=0,measurefft=False): M = chkM(M,g...
gpl-2.0
-7,260,402,539,768,473,000
32.052632
102
0.49655
false
frewsxcv/python-geojson
geojson/feature.py
6
1884
""" SimpleWebFeature is a working example of a class that satisfies the Python geo interface. """ from geojson.base import GeoJSON class Feature(GeoJSON): """ Represents a WGS84 GIS feature. """ def __init__(self, id=None, geometry=None, properties=None, **extra): """ Initialises a F...
bsd-3-clause
5,742,698,560,417,820,000
29.885246
78
0.60828
false
Hypernode/xtraceback
xtraceback/shim.py
2
1261
import inspect import os class Shim(object): _instances = {} def __init__(self, target, xtb): self.target = target self.xtb = xtb def __repr__(self): raise NotImplementedError() @classmethod def get_instance(cls, target, xtb): oid = id(target) if oid not...
mit
-6,364,031,631,502,445,000
27.659091
77
0.536082
false
googleapis/java-workflow-executions
synth.py
1
1142
# 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
-4,461,214,997,939,001,000
32.588235
106
0.745184
false
Afnarel/django-threadedcomments
setup.py
3
1797
#!/usr/bin/env python from setuptools import setup, find_packages from os import path import codecs import re def read(*parts): file_path = path.join(path.dirname(__file__), *parts) return codecs.open(file_path, encoding='utf-8').read() def find_version(*parts): version_file = read(*parts) version_m...
bsd-3-clause
4,456,813,197,631,138,000
30.526316
88
0.642738
false
DickJC123/mxnet
python/mxnet/gluon/metric.py
4
64655
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
5,248,670,525,985,007,000
33.610814
117
0.584412
false
Zac-HD/home-assistant
homeassistant/components/sensor/steam_online.py
17
2490
""" Sensor for Steam account status. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.steam_online/ """ import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.helpers.entity import Entity from homeas...
apache-2.0
3,849,808,604,584,554,500
26.362637
74
0.613655
false
ekini/micolog_ru
app/trackback.py
10
3389
"""tblib.py: A Trackback (client) implementation in Python """ __author__ = "Matt Croydon <matt@ooiio.com>" __copyright__ = "Copyright 2003, Matt Croydon" __license__ = "GPL" __version__ = "0.1.0" __history__ = """ 0.1.0: 1/29/03 - Code cleanup, release. It can send pings, and autodiscover a URL to ping. 0.0.9...
mit
170,196,212,935,383,140
43.213333
131
0.612275
false
cydcowley/Imperial-Visualizations
visuals_maths/VC-Polar/script/numeric/tools/selenium_links.py
28
1550
from selenium import webdriver from selenium.common.exceptions import TimeoutException from selenium.webdriver.support.ui import WebDriverWait import time import traceback import sys import urllib import re url = "" def test(links,driver): p=0 f=0 t=0 for k in range(len(links)): x = links[k] ...
mit
-9,113,981,134,049,957,000
23.21875
63
0.549677
false
rabipanda/tensorflow
tensorflow/contrib/kfac/python/ops/fisher_blocks_lib.py
4
1509
# Copyright 2017 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
4,860,322,328,813,758,000
34.928571
80
0.706428
false
srznew/pacemaker
cts/CM_lha.py
10
20829
'''CTS: Cluster Testing System: LinuxHA v2 dependent modules... ''' __copyright__ = ''' Author: Huang Zhen <zhenhltc@cn.ibm.com> Copyright (C) 2004 International Business Machines Additional Audits, Revised Start action, Default Configuration: Copyright (C) 2004 Andrew Beekhof <andrew@beekhof.net> ''' # # This...
gpl-2.0
-6,502,040,889,149,689,000
38.374291
143
0.532047
false
ettrig/NIPAP
nipap-www/setup.py
4
1117
from setuptools import setup, find_packages import nipapwww setup( name='nipap-www', version=nipapwww.__version__, description='web frontend for NIPAP', author=nipapwww.__author__, author_email=nipapwww.__author_email__, url=nipapwww.__url__, install_requires=[ "Pylons>=1.0", ...
mit
2,465,306,052,816,235,500
27.641026
65
0.575649
false
kenorb-contrib/BitTorrent
twisted/internet/iocpreactor/udp.py
2
8229
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. import socket import struct import operator from twisted.internet import interfaces, defer, error, protocol, address from twisted.internet.udp import MulticastMixin from twisted.internet.abstract import isIPAddress from twisted.persist...
gpl-3.0
-2,383,504,930,815,237,000
36.235294
122
0.651598
false
dchaplinsky/garnahata.in.ua
garnahata_site/catalog/management/commands/load_wp.py
1
3144
import os.path import csv import re from django.core.management.base import BaseCommand, CommandError from catalog.models import Address # CSV was retrieved with help of this SQL # SELECT # post_title, # post_content, # garnahata.wp_leafletmapsmarker_markers.*, # SUBSTRING( # post_content, # ...
mit
-9,012,706,543,481,014,000
37.292683
77
0.506688
false
coreos/autotest
frontend/urls.py
3
1392
import os from django.conf.urls import defaults from django.conf import settings # The next two lines enable the admin and load each admin.py file: from django.contrib import admin admin.autodiscover() RE_PREFIX = '^' + settings.URL_PREFIX TKO_RE_PREFIX = '^' + settings.TKO_URL_PREFIX handler404 = 'django.views.defa...
gpl-2.0
8,001,938,237,103,695,000
35.631579
85
0.639368
false
fsouza/tdc_django
tdc/tdc/enquetes/views.py
1
1119
# coding: utf-8 from django import http, shortcuts from django.template import response from django.views.generic import base from tdc.enquetes import models class EnqueteView(base.View): def get(self, request, *args, **kwargs): enquete = shortcuts.get_object_or_404(models.Enquete, ...
bsd-2-clause
-693,909,208,123,491,500
36.233333
75
0.529096
false
dpoulson/r2_control
Hardware/Lights/FlthyHPControl.py
1
7222
from __future__ import print_function from __future__ import absolute_import from future import standard_library import smbus import os import datetime import time from r2utils import mainconfig from flask import Blueprint, request import configparser standard_library.install_aliases() from builtins import hex from bui...
gpl-2.0
6,547,194,968,440,524,000
32.906103
123
0.472861
false
PhilSk/zulip
zerver/worker/queue_processors.py
9
17179
# Documented in http://zulip.readthedocs.io/en/latest/queuing.html from __future__ import absolute_import from typing import Any, Callable, Dict, List, Mapping, Optional from django.conf import settings from django.core.handlers.wsgi import WSGIRequest from django.core.handlers.base import BaseHandler from zerver.mode...
apache-2.0
2,599,879,186,572,168,000
39.902381
109
0.633797
false
CSD-Public/stonix
src/tests/rules/unit_tests/zzzTestRuleSetFSMountOptions.py
1
4525
#!/usr/bin/env python3 ############################################################################### # # # Copyright 2019. Triad National Security, LLC. All rights reserved. # # This program was produced under U.S. Government contrac...
gpl-2.0
8,118,355,819,487,207,000
38.347826
79
0.577459
false
turbokongen/home-assistant
homeassistant/components/ipp/__init__.py
3
4975
"""The Internet Printing Protocol (IPP) integration.""" import asyncio from datetime import timedelta import logging from typing import Any, Dict from pyipp import IPP, IPPError, Printer as IPPPrinter from homeassistant.components.sensor import DOMAIN as SENSOR_DOMAIN from homeassistant.config_entries import ConfigEn...
apache-2.0
6,653,180,964,060,747,000
26.638889
93
0.614472
false
irudayarajisawa/django-cms
cms/models/managers.py
46
18640
# -*- coding: utf-8 -*- from django.contrib.sites.models import Site from django.db import models from django.db.models import Q from django.utils import six from cms.cache.permissions import get_permission_cache, set_permission_cache from cms.exceptions import NoPermissionsException from cms.models.query import PageQ...
bsd-3-clause
-2,844,040,086,095,711,000
39.69869
122
0.585783
false
geminy/aidear
oss/qt/qt-everywhere-opensource-src-5.9.0/qtwebengine/src/3rdparty/chromium/third_party/pdfium/testing/tools/pngdiffer.py
4
3264
#!/usr/bin/env python # Copyright 2015 The PDFium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import sys import common class PNGDiffer(): ACTUAL_TEMPLATE = '.pdf.%d.png' EXPECTED_TEMPLATE = '_expected' + ACTUAL_TEMP...
gpl-3.0
6,642,088,539,112,358,000
37.4
79
0.66299
false
spearheadsys/check_mk-rds_licenses
web/plugins/wato/rds_licenses.py
1
1037
#!/usr/bin/python # 2015 george.mocanu@sphs.ro # SpearHead Systems register_check_parameters( subgroup_applications, "rds_licenses", _("RDS Licenses Usage Status"), Dictionary( elements = [ ("levels", # Name of your parameters Tuple( title = "Leve...
gpl-2.0
3,685,275,934,627,379,700
30.424242
104
0.403086
false
jaredly/django-feedback
test/test_settings.py
5
1957
""" Django settings for t project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) import o...
mit
8,863,966,426,106,192,000
22.865854
71
0.718958
false
highco-groupe/odoo
addons/analytic/wizard/__init__.py
23
1300
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
4,674,212,764,106,266,000
43.827586
78
0.660769
false
qlai/stochasticLDA
stochastic_lda.py
1
7754
import sys, re, time, string, random, csv, argparse import numpy as n from scipy.special import psi from nltk.tokenize import wordpunct_tokenize from utils import * # import matplotlib.pyplot as plt n.random.seed(10000001) meanchangethresh = 1e-3 MAXITER = 10000 class SVILDA(): def __init__(self, vocab, K, D, alph...
gpl-3.0
2,381,726,608,113,466,000
30.909465
139
0.656306
false
idan/oauthlib
tests/openid/connect/core/grant_types/test_implicit.py
1
5919
# -*- coding: utf-8 -*- from unittest import mock from oauthlib.common import Request from oauthlib.oauth2.rfc6749 import errors from oauthlib.oauth2.rfc6749.tokens import BearerToken from oauthlib.openid.connect.core.grant_types.exceptions import OIDCNoPrompt from oauthlib.openid.connect.core.grant_types.implicit imp...
bsd-3-clause
4,533,979,543,435,547,600
43.503759
144
0.68221
false
sveetch/Optimus
optimus/pages/views/base.py
1
8912
# -*- coding: utf-8 -*- import logging import os import six from jinja2 import meta as Jinja2Meta from optimus.exceptions import ViewImproperlyConfigured from optimus.utils import UnicodeMixin from optimus.i18n.lang import LangBase class PageViewBase(UnicodeMixin): """ Base view object for a page You ...
mit
3,893,322,322,326,397,000
29.520548
78
0.593133
false
commaai/openpilot
selfdrive/car/toyota/radar_interface.py
2
3743
#!/usr/bin/env python3 from opendbc.can.parser import CANParser from cereal import car from selfdrive.car.toyota.values import NO_DSU_CAR, DBC, TSS2_CAR from selfdrive.car.interfaces import RadarInterfaceBase def _create_radar_can_parser(car_fingerprint): if car_fingerprint in TSS2_CAR: RADAR_A_MSGS = list(range...
mit
1,808,293,244,215,928,300
35.339806
113
0.604595
false