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
dmort27/panphon
panphon/bin/align_wordlists.py
1
2458
#!/usr/bin/env python from __future__ import print_function import unicodecsv as csv import argparse import panphon import Levenshtein import munkres import panphon.distance from functools import partial def levenshtein_dist(_, a, b): return Levenshtein.distance(a, b) def dogol_leven_dist(_, a, b): return ...
mit
-8,969,342,033,401,456,000
32.671233
110
0.626932
false
jounex/hue
desktop/core/ext-py/Django-1.6.10/django/contrib/humanize/templatetags/humanize.py
98
9276
# -*- encoding: utf-8 -*- from __future__ import unicode_literals import re from datetime import date, datetime from decimal import Decimal from django import template from django.conf import settings from django.template import defaultfilters from django.utils.encoding import force_text from django.utils.formats imp...
apache-2.0
93,445,721,547,630,080
36.991803
119
0.587271
false
nvoron23/hue
apps/oozie/src/oozie/migrations/0009_auto__add_decision.py
39
20608
# encoding: 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 model 'Decision' db.create_table('oozie_decision', ( ('node_ptr', self.gf('django.db.models.f...
apache-2.0
4,895,982,263,551,305,000
75.325926
194
0.530085
false
yausern/stlab
TimeDomain_v2/AWG_station.py
2
13357
# author: Wolfgang Pfaff # modified by: Sarwan Peiter """ So I have already written the driver for the AWG. Now the next step is to write an interface to communicates with driver. An also usefull interface is to write a library to generate pulses. """ import time import logging import numpy as np import struct import ...
gpl-3.0
151,102,286,414,462,370
24.785714
103
0.62791
false
stewartpark/django
django/contrib/gis/geos/base.py
437
1280
from ctypes import c_void_p from django.contrib.gis.geos.error import GEOSException class GEOSBase(object): """ Base object for GEOS objects that has a pointer access property that controls access to the underlying C pointer. """ # Initially the pointer is NULL. _ptr = None # Default all...
bsd-3-clause
-6,763,576,273,197,999,000
32.684211
94
0.642188
false
rossgoodwin/musapaedia
musapaedia/muse/lib/python2.7/site-packages/setuptools/tests/test_dist_info.py
148
2261
"""Test .dist-info style distributions. """ import os import shutil import tempfile import pytest import pkg_resources from .textwrap import DALS class TestDistInfo: def test_distinfo(self): dists = dict( (d.project_name, d) for d in pkg_resources.find_distributions(self.tmpdir)...
mit
-6,936,935,225,838,370,000
31.3
80
0.598408
false
victorzhao/miniblink49
third_party/skia/tools/reformat-json.py
208
1741
#!/usr/bin/python ''' Copyright 2013 Google Inc. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. ''' ''' Rewrites a JSON file to use Python's standard JSON pretty-print format, so that subsequent runs of rebaseline.py will generate useful diffs (only the actual check...
gpl-3.0
-3,019,449,073,377,126,000
30.654545
79
0.723148
false
cherez/youtube-dl
youtube_dl/extractor/screencast.py
147
4200
# -*- coding: utf-8 -*- from __future__ import unicode_literals from .common import InfoExtractor from ..compat import ( compat_parse_qs, compat_urllib_request, ) from ..utils import ( ExtractorError, ) class ScreencastIE(InfoExtractor): _VALID_URL = r'https?://www\.screencast\.com/t/(?P<id>[a-zA-Z0-...
unlicense
2,076,698,057,036,148,000
36.837838
118
0.515714
false
jesramirez/odoo
addons/hr_timesheet_sheet/report/__init__.py
342
1074
# -*- 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
164,198,059,339,103,230
41.96
78
0.616387
false
AmandaMoen/AmandaMoen
notes/resources/UW_IntroClass/class8.5/code/basic_app_4.py
1
7168
#!/usr/bin/env python """ Example of the very basic, minimal framework for a wxPython application This version adds a single button """ import wx import os #-------------------------------------------------------------- # This is how you pre-establish a file filter so that the dialog # only shows the extension(s) ...
gpl-2.0
-6,373,040,933,122,016,000
34.661692
89
0.563616
false
jaggu303619/asylum-v2.0
openerp/addons/resource/faces/pcalendar.py
433
28436
#@+leo-ver=4 #@+node:@file pcalendar.py #@@language python #@<< Copyright >> #@+node:<< Copyright >> ############################################################################ # Copyright (C) 2005, 2006, 2007, 2008 by Reithinger GmbH # mreithinger@web.de # # This file is part of faces. # # faces is free softw...
agpl-3.0
-3,814,108,212,738,946,000
28.838405
81
0.521557
false
heihachi/PokemonGo-Bot
pokemongo_bot/cell_workers/pokemon_optimizer.py
1
49784
from __future__ import unicode_literals # import datetime import difflib import itertools import json import math import os import time import datetime from pokemongo_bot import inventory from pokemongo_bot.base_dir import _base_dir from pokemongo_bot.base_task import BaseTask from pokemongo_bot.human_behaviour impor...
mit
-5,109,187,052,893,834,000
43.213144
198
0.534429
false
Titulacion-Sistemas/PythonTitulacion-EV
Lib/site-packages/django/contrib/gis/geos/prototypes/__init__.py
314
1305
""" This module contains all of the GEOS ctypes function prototypes. Each prototype handles the interaction between the GEOS library and Python via ctypes. """ # Coordinate sequence routines. from django.contrib.gis.geos.prototypes.coordseq import (create_cs, get_cs, cs_clone, cs_getordinate, cs_setordinate, cs...
mit
6,113,816,080,719,589,000
42.5
90
0.757088
false
IronLanguages/ironpython2
Src/StdLib/Lib/site-packages/win32/Demos/security/localized_names.py
34
2030
# A Python port of the MS knowledge base article Q157234 # "How to deal with localized and renamed user and group names" # http://support.microsoft.com/default.aspx?kbid=157234 import sys from win32net import NetUserModalsGet from win32security import LookupAccountSid import pywintypes from ntsecuritycon import * def...
apache-2.0
-2,388,378,379,766,461,400
32.278689
72
0.706404
false
mhct/ardupilot
Tools/autotest/param_metadata/xmlemit.py
238
2717
#!/usr/bin/env python from xml.sax.saxutils import escape, quoteattr from param import * from emit import Emit # Emit APM documentation in an machine readable XML format class XmlEmit(Emit): def __init__(self): wiki_fname = 'apm.pdef.xml' self.f = open(wiki_fname, mode='w') preamble ...
gpl-3.0
8,954,940,029,272,926,000
36.736111
142
0.471108
false
apache/airflow
tests/providers/amazon/aws/hooks/test_batch_client.py
2
13457
# # 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...
apache-2.0
8,661,485,429,681,158,000
43.266447
106
0.643977
false
guorendong/iridium-browser-ubuntu
tools/telemetry/telemetry/page/page_test.py
3
7843
# Copyright 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry.page import action_runner as action_runner_module from telemetry.page import test_expectations class TestNotSupportedOnPlatformError(Excepti...
bsd-3-clause
-419,873,031,838,376,300
36.526316
80
0.713885
false
sunny94/temp
sympy/integrals/integrals.py
7
49446
from __future__ import print_function, division from sympy.concrete.expr_with_limits import AddWithLimits from sympy.core.add import Add from sympy.core.basic import Basic, C from sympy.core.compatibility import is_sequence, xrange from sympy.core.containers import Tuple from sympy.core.expr import Expr from sympy.cor...
bsd-3-clause
-3,009,226,579,436,996,000
37.509346
95
0.549953
false
rishiloyola/bedrock
bedrock/press/forms.py
19
6883
# coding: utf-8 # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from django import forms from lib.l10n_utils.dotlang import _, _lazy from bedrock.mozorg.forms import...
mpl-2.0
-7,612,150,388,246,540,000
26.313492
77
0.527677
false
xiandiancloud/edxplaltfom-xusong
lms/djangoapps/shoppingcart/migrations/0005_auto__add_paidcourseregistrationannotation__add_field_orderitem_report.py
58
9807
# -*- 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 model 'PaidCourseRegistrationAnnotation' db.create_table('shoppingcart_paidcourseregistrationannota...
agpl-3.0
-7,644,577,462,375,307,000
73.30303
182
0.563169
false
intgr/django
django/conf/locale/nb/formats.py
65
1699
# This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j. F Y' TIME_FORMAT = 'H:i' DATETIME_FORMAT = 'j. F Y H:i' YEAR_MONTH_FORMAT = 'F Y' MONTH_DAY_FORMA...
bsd-3-clause
3,912,284,169,426,064,000
42.564103
81
0.520306
false
SickRage/SickRage
sickrage/libs/trakt/core/emitter.py
7
6294
from __future__ import absolute_import, division, print_function import logging # concurrent.futures is optional try: from concurrent.futures import ThreadPoolExecutor except ImportError: ThreadPoolExecutor = None log = logging.getLogger(__name__) class Emitter(object): threading = False threading...
gpl-3.0
6,182,695,384,060,411,000
25.445378
117
0.557356
false
chaluemwut/fbserver
venv/lib/python2.7/site-packages/sklearn/neighbors/base.py
1
24541
"""Base and mixin classes for nearest neighbors""" # Authors: Jake Vanderplas <vanderplas@astro.washington.edu> # Fabian Pedregosa <fabian.pedregosa@inria.fr> # Alexandre Gramfort <alexandre.gramfort@inria.fr> # Sparseness support by Lars Buitinck <L.J.Buitinck@uva.nl> # Multi-output...
apache-2.0
-4,065,047,931,965,230,600
36.12708
79
0.533149
false
tedelhourani/ansible
test/units/module_utils/facts/test_collector.py
13
16812
# This file is part of Ansible # -*- coding: utf-8 -*- # # # 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 version. # # Ansible is dis...
gpl-3.0
-8,132,019,064,457,380,000
47.449568
106
0.562812
false
Thraxis/SickRage
lib/github/ContentFile.py
74
6775
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # # Copyright 2012 Zearin <zearin@gonk.net> ...
gpl-3.0
4,919,438,331,659,630,000
37.494318
204
0.544649
false
RubenKelevra/rethinkdb
external/v8_3.30.33.16/build/gyp/tools/pretty_vcproj.py
2637
9586
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Make the format of a vcproj really pretty. This script normalize and sort an xml. It also fetches all the properties inside linked...
agpl-3.0
4,147,145,683,473,757,700
28.136778
76
0.654913
false
sebdelsol/pyload
module/plugins/hoster/RapidshareCom.py
1
7801
# -*- coding: utf-8 -*- import re from module.network.RequestFactory import getURL from module.plugins.Hoster import Hoster def getInfo(urls): ids = "" names = "" p = re.compile(RapidshareCom.__pattern__) for url in urls: r = p.search(url) if r.group("name"): ids += ","...
gpl-3.0
-1,073,814,628,659,868,700
33.214912
157
0.532239
false
PyMNtos/stacks
stacks/library/migrations/0003_auto__add_field_author_uuid.py
1
2747
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding M2M table for field authors on 'Book' m2m_table_name = db.shorte...
gpl-2.0
6,528,894,093,028,434,000
48.071429
137
0.56862
false
Jordonbc/GlassOS
Glass_OS/build/lib/GlassOS/libaries/requests/packages/urllib3/connection.py
196
10286
from __future__ import absolute_import import datetime import os import sys import socket from socket import error as SocketError, timeout as SocketTimeout import warnings from .packages import six try: # Python 3 from http.client import HTTPConnection as _HTTPConnection from http.client import HTTPException ...
mit
3,071,038,301,343,374,000
34.715278
99
0.615497
false
lamby/redis-py
benchmarks/command_packer_benchmark.py
49
3338
import socket import sys from redis.connection import (Connection, SYM_STAR, SYM_DOLLAR, SYM_EMPTY, SYM_CRLF, b) from redis._compat import imap from base import Benchmark class StringJoiningConnection(Connection): def send_packed_command(self, command): "Send an already packe...
mit
2,677,731,210,954,243,000
31.096154
79
0.509587
false
sindhus/hasjob
hasjob/views/login.py
4
1781
# -*- coding: utf-8 -*- from sqlalchemy.exc import IntegrityError from flask import g, Response, redirect, flash from flask.ext.lastuser import signal_user_session_refreshed from coaster.views import get_next_url from baseframe import csrf from .. import app, lastuser from ..signals import signal_login, signal_logout...
agpl-3.0
7,547,748,057,554,435,000
26.4
89
0.683324
false
RockySteveJobs/python-for-android
python-modules/twisted/twisted/test/test_hook.py
81
4290
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. """ Test cases for twisted.hook module. """ from twisted.python import hook from twisted.trial import unittest class BaseClass: """ dummy class to help in testing. """ def __init__(self): """ dummy ini...
apache-2.0
4,409,256,285,021,896,000
27.6
72
0.60303
false
devGregA/code
build/lib.linux-x86_64-2.7/scrapy/tests/test_http_request.py
33
30578
import cgi import unittest from six.moves import xmlrpc_client as xmlrpclib from six.moves.urllib.parse import urlparse from scrapy.http import Request, FormRequest, XmlRpcRequest, Headers, HtmlResponse class RequestTest(unittest.TestCase): request_class = Request default_method = 'GET' default_headers ...
bsd-3-clause
3,537,051,486,304,000,000
41.706704
105
0.566028
false
scottpurdy/nupic
examples/opf/simple_server/model_params.py
10
9318
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2015, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
agpl-3.0
-893,157,681,630,810,600
36.724696
108
0.539493
false
mrjaydee82/SinLessKernel-4.4.4
toolchains/linaro-arm-eabi-4.10-master/share/gdb/system-gdbinit/elinos.py
134
3080
# Copyright (C) 2011-2014 Free Software Foundation, 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 version. # # This progr...
gpl-2.0
-1,691,516,481,179,178,200
32.846154
78
0.644156
false
amnona/heatsequer
heatsequer/experiment/expclass.py
1
28528
#!/usr/bin/env python """ heatsequer experiment class """ # amnonscript __version__ = "0.9" import heatsequer as hs import os import copy import numpy as np from pdb import set_trace as XXX import time import collections class Experiment: ''' experiment class holds the read data and metadata about the experim...
bsd-3-clause
-7,964,009,669,535,403,000
25.439296
115
0.733805
false
j-carl/boto
boto/directconnect/exceptions.py
148
1239
# Copyright (c) 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved # # 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 ...
mit
255,873,484,612,716,740
41.724138
77
0.772397
false
maartenq/ansible
test/units/modules/source_control/test_gitlab_deploy_key.py
12
8009
# -*- coding: utf-8 -*- # Copyright (c) 2018 Marcus Watkins <marwatk@marcuswatkins.net> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from ansible.compat.tests.mock import patch from ansible.modules.source_control import gitlab_deploy_key from ansible.module_utils._text i...
gpl-3.0
-9,096,318,722,550,040,000
33.373391
137
0.621925
false
chainer/chainer
chainer/testing/helper.py
6
3610
import contextlib import sys import unittest import warnings import pkg_resources try: import mock _mock_error = None except ImportError as e: _mock_error = e def _check_mock_available(): if _mock_error is not None: raise RuntimeError( 'mock is not available: Reason: {}'.format(_m...
mit
5,426,637,843,646,993,000
26.557252
76
0.60831
false
liavkoren/djangoDev
django/contrib/gis/geoip/tests.py
48
4728
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os import unittest from unittest import skipUnless from django.conf import settings from django.contrib.gis.geos import HAS_GEOS from django.contrib.gis.geoip import HAS_GEOIP from django.utils import six if HAS_GEOIP: from . import GeoIP, G...
bsd-3-clause
-889,161,696,582,536,300
37.422764
89
0.600296
false
kumanna/Simple-OFDM-Modem
usrp/transmit.py
1
1973
#!/usr/bin/env python """ test """ INTERP = 128 TXGAIN = 30 CONSTANT = 0.10 from gnuradio import gr, gr_unittest import usrp_options from optparse import OptionParser from gnuradio.eng_option import eng_option from pick_bitrate import pick_tx_bitrate def main(): gr.enable_realtime_scheduling() tb = gr.top_b...
gpl-3.0
-1,772,233,772,600,407,300
36.226415
556
0.616827
false
Neamar/django
tests/deprecation/tests.py
199
7253
from __future__ import unicode_literals import os import unittest import warnings from django.test import SimpleTestCase from django.test.utils import reset_warning_registry from django.utils import six from django.utils.deprecation import RenameMethodsBase from django.utils.encoding import force_text class RenameM...
bsd-3-clause
-3,775,015,545,703,534,600
35.447236
79
0.569006
false
twz915/django
django/db/backends/sqlite3/base.py
4
17967
""" SQLite3 backend for the sqlite3 module in the standard library. """ import decimal import re import warnings from sqlite3 import dbapi2 as Database import pytz from django.core.exceptions import ImproperlyConfigured from django.db import utils from django.db.backends import utils as backend_utils from django.db.b...
bsd-3-clause
-5,072,088,559,254,659,000
37.721983
105
0.610953
false
laborautonomo/bitmask_client
src/leap/bitmask/util/credentials.py
6
2785
# -*- coding: utf-8 -*- # credentials.py # Copyright (C) 2013 LEAP # # 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. # #...
gpl-3.0
446,410,588,612,420,500
31.011494
75
0.680431
false
JamisHoo/Cloud-Image-Migration-Tool
usr/lib/requests/packages/chardet/langhungarianmodel.py
2763
12536
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
mit
-7,997,055,318,188,062,000
54.715556
70
0.555361
false
pico12/trading-with-python
sandbox/spreadCalculations.py
78
1496
''' Created on 28 okt 2011 @author: jev ''' from tradingWithPython import estimateBeta, Spread, returns, Portfolio, readBiggerScreener from tradingWithPython.lib import yahooFinance from pandas import DataFrame, Series import numpy as np import matplotlib.pyplot as plt import os symbols = ['SPY','...
bsd-3-clause
2,500,766,741,004,289,500
21.375
115
0.670455
false
chenjun0210/tensorflow
tensorflow/python/tools/strip_unused_lib.py
37
4314
# pylint: disable=g-bad-file-header # Copyright 2015 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/LICENS...
apache-2.0
4,960,497,711,000,664,000
39.317757
80
0.665276
false
monikasulik/django-oscar
sites/demo/apps/checkout/views.py
35
5404
from django.contrib import messages from django import http from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ from datacash.facade import Facade from oscar.apps.checkout import views, exceptions from oscar.apps.payment.forms import BankcardForm from oscar.apps.payment...
bsd-3-clause
6,843,957,011,346,356,000
43.295082
78
0.640822
false
maxamillion/ansible
lib/ansible/executor/discovery/python_target.py
84
1234
# Copyright: (c) 2018 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # FUTURE: this could be swapped out for our bundled version of distro to move more complete platform # logic to the targets, so long as we maintain Py2.6 compat and don't need to do any ki...
gpl-3.0
6,264,226,885,292,910,000
24.708333
108
0.675041
false
wyc/django
tests/forms_tests/widget_tests/test_selectdatewidget.py
144
20641
from datetime import date from django.forms import DateField, Form, SelectDateWidget from django.test import override_settings from django.utils import translation from django.utils.dates import MONTHS_AP from .base import WidgetTest class SelectDateWidgetTest(WidgetTest): maxDiff = None widget = SelectDate...
bsd-3-clause
1,726,808,776,881,684,700
42.091858
106
0.479337
false
mhnatiuk/phd_sociology_of_religion
scrapper/lib/python2.7/site-packages/scrapy/spider.py
15
2307
""" Base class for Scrapy spiders See documentation in docs/topics/spiders.rst """ from scrapy import log from scrapy.http import Request from scrapy.utils.trackref import object_ref from scrapy.utils.url import url_is_from_spider from scrapy.utils.deprecate import create_deprecated_class class Spider(object_ref): ...
gpl-2.0
6,059,015,674,953,269,000
27.481481
137
0.642826
false
DavidIngraham/ardupilot
libraries/AP_HAL_ChibiOS/hwdef/scripts/STM32F103xB.py
10
2607
#!/usr/bin/env python ''' these tables are generated from the STM32 datasheets for the STM32F103x8 ''' # additional build information for ChibiOS build = { "CHIBIOS_STARTUP_MK" : "os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f1xx.mk", "CHIBIOS_PLATFORM_MK" : "os/hal/ports/STM32/STM32F1xx/platform.mk...
gpl-3.0
-1,778,594,524,064,420,900
23.364486
93
0.384733
false
pshen/ansible
lib/ansible/module_utils/pure.py
71
3161
# -*- coding: utf-8 -*- # This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own lic...
gpl-3.0
-7,795,782,129,839,667,000
40.051948
137
0.726036
false
CompassionCH/bank-payment
account_payment_partner/models/account_invoice.py
1
5160
# -*- coding: utf-8 -*- # Copyright 2014-16 Akretion - Alexis de Lattre <alexis.delattre@akretion.com> # Copyright 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import models, fields, api class AccountInvoice(models.Model): _inherit =...
agpl-3.0
2,527,082,670,949,137,000
43.869565
79
0.590116
false
dharmabumstead/ansible
test/units/plugins/action/test_raw.py
44
3774
# (c) 2016, Saran Ahluwalia <ahlusar.ahluwalia@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) any...
gpl-3.0
-3,491,157,236,456,923,000
34.271028
122
0.670111
false
stevec7/ratking
ratking/engine.py
2
3052
import ast import ConfigParser import glob import grp import importlib import multiprocessing import os import sys from drop_privileges import drop_privileges from jobhandler import JobCtl from pwd import getpwnam class SchedCtl(object): def __init__(self, sched, config, logging): self.sched = sched ...
mit
-9,168,645,899,484,377,000
26.745455
101
0.598296
false
franek/weboob
modules/ing/pages/transfer.py
1
9640
# -*- coding: utf-8 -*- # Copyright(C) 2009-2011 Romain Bignon, Florent Fourcot # # 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 Lice...
agpl-3.0
6,485,394,124,487,427,000
44.687204
127
0.540664
false
FlintHill/SUAS-Competition
env/lib/python2.7/site-packages/setuptools/ssl_support.py
64
8492
import os import socket import atexit import re import functools from setuptools.extern.six.moves import urllib, http_client, map, filter from pkg_resources import ResolutionError, ExtractionError try: import ssl except ImportError: ssl = None __all__ = [ 'VerifyingHTTPSHandler', 'find_ca_bundle', 'is_a...
mit
-5,096,789,671,977,791,000
31.661538
82
0.596326
false
daonb/Open-Knesset
auxiliary/migrations/0013_auto__add_tagkeyphrase.py
14
7851
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'TagKeyphrase' db.create_table(u'auxiliary_tagkeyphrase', ...
bsd-3-clause
6,347,406,213,089,847,000
69.107143
195
0.552286
false
larsbutler/coveragepy
coverage/test_helpers.py
1
9946
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt """Mixin classes to help make good tests.""" import atexit import collections import os import random import shutil import sys import tempfile import textwrap fro...
apache-2.0
-7,562,683,615,410,326,000
33.061644
79
0.612709
false
jiaphuan/models
research/object_detection/models/faster_rcnn_inception_resnet_v2_feature_extractor.py
1
9271
# 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
-2,195,494,220,945,714,000
42.12093
80
0.637795
false
pfi/maf
maf_template.py
1
4169
#!/usr/bin/env python # coding: ISO8859-1 # # Copyright (c) 2013, Preferred Infrastructure, 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 retai...
bsd-2-clause
8,330,315,998,417,407,000
29.210145
119
0.633725
false
roninek/python101
games_str/pong_str/pong_str4.py
4
3983
#! /usr/bin/env python # -*- coding: utf-8 -*- import pygame, sys from pygame.locals import * # Przygotowanie zmiennych opisujących okno gry oraz obiekty gry i ich właściwości (paletki, piłeczka) # Inicjacja modułu i obiektów Pygame'a # inicjacja modułu pygame pygame.init() # liczba klatek na sekundę FPS = 30 # obi...
mit
-6,045,156,583,652,450,000
32.452991
101
0.703117
false
Inspq/ansible
test/units/executor/test_task_result.py
104
5583
# (c) 2016, James Cammarata <jimi@sngx.net> # # 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 version...
gpl-3.0
-8,862,854,582,317,598,000
39.165468
132
0.649113
false
olsaki/ansible-modules-core
system/authorized_key.py
55
15877
#!/usr/bin/python # -*- coding: utf-8 -*- """ Ansible module to add authorized_keys for ssh logins. (c) 2012, Brad Olson <brado@movedbylight.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 ...
gpl-3.0
-2,530,987,097,980,303,400
32.566596
114
0.601877
false
DuCorey/bokeh
tests/integration/annotations/test_title.py
6
1584
from __future__ import absolute_import from bokeh.io import save from bokeh.models import Plot, Range1d, LinearAxis, Circle, Column, ColumnDataSource import pytest pytestmark = pytest.mark.integration HEIGHT = 600 WIDTH = 600 @pytest.mark.screenshot def test_the_default_titles_settings_and_ensure_outside_any_axes(...
bsd-3-clause
2,372,366,653,181,085,000
32
104
0.643308
false
mzdaniel/oh-mainline
vendor/packages/twisted/twisted/test/test_modules.py
18
15268
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for twisted.python.modules, abstract access to imported or importable objects. """ import sys import itertools import zipfile import compileall import twisted from twisted.trial.unittest import TestCase from twisted.python import modu...
agpl-3.0
3,595,598,122,497,762,300
32.853659
83
0.606694
false
sjotterman/python_koans
python2/koans/about_tuples.py
73
2259
#!/usr/bin/env python # -*- coding: utf-8 -*- from runner.koan import * class AboutTuples(Koan): def test_creating_a_tuple(self): count_of_three = (1, 2, 5) self.assertEqual(__, count_of_three[2]) def test_tuples_are_immutable_so_item_assignment_is_not_possible(self): count_of_three ...
mit
-9,187,506,441,115,051,000
31.271429
75
0.556884
false
paolinux79/FTCryPTUploader
FTCryPTUploader/FtpCoord.py
1
1473
import threading class FtpCoord: shutdown = None lock = None stats = {} def __init__(self): self.shutdown = False self.lock = threading.Lock() def kill(self): print("raising shutdown") self.shutdown = True def need_to_stop(self): return self.shutdown ...
bsd-2-clause
5,517,717,484,509,087,000
28.48
87
0.468432
false
fgesora/odoo
openerp/addons/base/tests/test_mail_examples.py
302
57129
#!/usr/bin/env python # -*- coding: utf-8 -*- MISC_HTML_SOURCE = """ <font size="2" style="color: rgb(31, 31, 31); font-family: monospace; font-variant: normal; line-height: normal; ">test1</font> <div style="color: rgb(31, 31, 31); font-family: monospace; font-variant: normal; line-height: normal; font-size: 12px; fo...
agpl-3.0
8,448,386,689,245,686,000
47.574468
564
0.589855
false
jmighion/ansible
lib/ansible/modules/cloud/univention/udm_user.py
29
21233
#!/usr/bin/python # -*- coding: UTF-8 -*- # Copyright (c) 2016, Adfinis SyGroup AG # Tobias Rueetschi <tobias.ruetschi@adfinis-sygroup.ch> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ...
gpl-3.0
-7,788,114,976,434,128,000
34.625839
92
0.448453
false
XiaoxiaoLiu/morphology_analysis
bigneuron/reestimate_radius.py
1
1506
__author__ = 'xiaoxiaol' __author__ = 'xiaoxiaol' # run standardize swc to make sure swc files have one single root, and sorted, and has the valide type id ( 1~4) import matplotlib.pyplot as plt import seaborn as sb import os import os.path as path import numpy as np import pandas as pd import platform import sys imp...
gpl-3.0
2,000,955,272,724,070,000
26.381818
158
0.675963
false
siutanwong/scikit-learn
examples/text/document_clustering.py
230
8356
""" ======================================= Clustering text documents using k-means ======================================= This is an example showing how the scikit-learn can be used to cluster documents by topics using a bag-of-words approach. This example uses a scipy.sparse matrix to store the features instead of ...
bsd-3-clause
-7,751,988,632,583,375,000
36.809955
80
0.670656
false
COL-IU/XLSearch
xlsearch_train.py
1
5042
import sys import pickle import os import getopt from time import ctime import numpy as np usage = ''' USAGE: python xlsearch_train.py -l [path to xlsearch library] -p [parameter file] -o [output file]''' (pairs, args) = getopt.getopt(sys.argv[1:], 'l:p:...
mit
4,556,188,399,461,052,000
31.11465
79
0.685244
false
xin3liang/platform_external_chromium_org
tools/perf/page_sets/tough_texture_upload_cases.py
34
1457
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry.page import page as page_module from telemetry.page import page_set as page_set_module class ToughTextureUploadCasesPage(page_module.Page): ...
bsd-3-clause
-890,998,329,685,197,600
32.883721
112
0.717227
false
darvelo/chime
fabfile/fabconf.py
2
2774
# -*- coding: utf-8 -*- ''' -------------------------------------------------------------------------------------- project_conf.py -------------------------------------------------------------------------------------- Configuration settings that detail EC2 instances. Note that we are not using the built-in env from fa...
bsd-3-clause
438,997,109,505,511,040
36.486486
92
0.667988
false
heia-fr/sirano
sirano/plugins/actions/raw_payload.py
1
1377
# -*- coding: utf-8 -*- # # This file is a part of Sirano. # # Copyright (C) 2015 HES-SO // HEIA-FR # Copyright (C) 2015 Loic Gremaud <loic.gremaud@grelinfo.ch> # # 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 So...
gpl-2.0
-8,566,065,964,626,127,000
31.023256
81
0.67756
false
jdilallo/jdilallo-test
examples/dfp/v201311/custom_targeting_service/get_custom_targeting_values_by_statement.py
1
2247
#!/usr/bin/python # # 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 b...
apache-2.0
1,361,129,771,667,427,300
32.537313
80
0.691589
false
KousikaGanesh/purchaseandInventory
openerp/addons/crm/wizard/crm_phonecall_to_meeting.py
56
2730
# -*- 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
7,752,674,633,255,610,000
41.625
124
0.612903
false
gengliangwang/spark
python/pyspark/serializers.py
10
20586
# # 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 us...
apache-2.0
1,304,584,176,585,604,600
30.768519
100
0.625668
false
hujiajie/pa-chromium
chrome/test/functional/search_engines.py
79
3858
#!/usr/bin/env python # Copyright (c) 2011 The Chromium 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 re import pyauto_functional # Must be imported before pyauto import pyauto import test_utils class SearchEnginesTest(pya...
bsd-3-clause
1,029,202,799,083,367,600
34.072727
75
0.676516
false
gchp/django
django/contrib/staticfiles/management/commands/findstatic.py
463
1745
from __future__ import unicode_literals import os from django.contrib.staticfiles import finders from django.core.management.base import LabelCommand from django.utils.encoding import force_text class Command(LabelCommand): help = "Finds the absolute paths for the given static file(s)." label = 'static file...
bsd-3-clause
-5,458,890,167,682,293,000
37.777778
79
0.557593
false
PhilHarnish/forge
bin/process_clues.py
1
1840
"""Process http://www.otsys.com/clue/ DB for use with python.""" import collections import os import sqlite3 import sys # Add parent directory to path. sys.path.append(os.path.join( os.path.dirname(os.path.dirname(os.path.realpath(__file__))), 'src')) from data import crossword from data import data from puzz...
mit
377,060,723,532,881,600
23.533333
78
0.693478
false
40223108/w18
static/Brython3.1.1-20150328-091302/Lib/unittest/test/_test_warnings.py
858
2304
# helper module for test_runner.Test_TextTestRunner.test_warnings """ This module has a number of tests that raise different kinds of warnings. When the tests are run, the warnings are caught and their messages are printed to stdout. This module also accepts an arg that is then passed to unittest.main to affect the b...
gpl-3.0
6,196,802,471,668,009,000
30.561644
80
0.673177
false
40223142/cda11
static/Brython3.1.1-20150328-091302/Lib/multiprocessing/dummy/connection.py
707
3049
# # Analogue of `multiprocessing.connection` which uses queues instead of sockets # # multiprocessing/dummy/connection.py # # Copyright (c) 2006-2008, R Oudkerk # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditi...
gpl-3.0
-7,191,503,471,821,366,000
29.79798
79
0.677599
false
Sumith1896/sympy
sympy/utilities/runtests.py
4
78928
""" This is our testing framework. Goals: * it should be compatible with py.test and operate very similarly (or identically) * doesn't require any external dependencies * preferably all the functionality should be in this file only * no magic, just import the test file and execute the test functions, that's it * po...
bsd-3-clause
-6,213,852,699,316,213,000
35.779124
118
0.557635
false
40223137/2015abc
static/Brython3.1.0-20150301-090019/Lib/xml/etree/ElementPath.py
785
9477
# # ElementTree # $Id: ElementPath.py 3375 2008-02-13 08:05:08Z fredrik $ # # limited xpath support for element trees # # history: # 2003-05-23 fl created # 2003-05-28 fl added support for // etc # 2003-08-27 fl fixed parsing of periods in element names # 2007-09-10 fl new selection engine # 2007-09-12 fl fix...
gpl-3.0
-4,461,106,553,009,720,300
30.277228
79
0.551124
false
felipecorrea/python-pocket
examples/save_to_pocket.py
1
1208
#!/usr/bin/env python '''Add an Item to Pocket''' __author__ = 'Felipe Borges' import sys sys.path.append("..") import getopt import pocket USAGE = '''Usage: save_to_pocket [options] url This script adds an Item to Pocket. Options: -h --help: print this help --consumer_key : the Pocket API consumer ...
apache-2.0
-106,114,501,525,025,570
18.803279
75
0.639901
false
eneldoserrata/marcos_openerp
addons/report_aeroo/barcode/barcode.py
19
2368
############################################################################## # # Copyright (c) 2008-2011 Alistek Ltd (http://www.alistek.com) All Rights Reserved. # General contacts <info@alistek.com> # # WARNING: This program as such is intended to be used by professional # programmers who take th...
agpl-3.0
-5,927,766,222,914,648,000
37.193548
83
0.646537
false
lnfamous/Kernel_CyanogenMod11_Pico
tools/perf/scripts/python/netdev-times.py
11271
15048
# Display a process of packets and processed time. # It helps us to investigate networking or network device. # # options # tx: show only tx chart # rx: show only rx chart # dev=: show only thing related to specified device # debug: work with debug mode. It shows buffer status. import os import sys sys.path.append(os...
gpl-2.0
5,801,203,324,063,442,000
31.431034
78
0.645335
false
DanteOnline/free-art
venv/lib/python3.4/site-packages/django/db/backends/oracle/creation.py
160
17256
import sys import time from django.conf import settings from django.db.backends.base.creation import BaseDatabaseCreation from django.db.utils import DatabaseError from django.utils.functional import cached_property from django.utils.six.moves import input TEST_DATABASE_PREFIX = 'test_' PASSWORD = 'Im_a_lumberjack' ...
gpl-3.0
4,158,844,393,285,675,500
47.201117
114
0.581537
false
DavidLi2010/ramcloud
bindings/python/stresstest_bank.py
19
8020
#!/usr/bin/env python # Copyright (c) 2009-2010 Stanford University # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS"...
isc
-1,166,648,902,703,800,300
32.839662
79
0.543516
false
fengbaicanhe/intellij-community
python/helpers/profiler/thrift/TSerialization.py
36
1401
# # 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
507,019,977,667,869,300
35.868421
75
0.754461
false
Tesora-Release/tesora-trove
trove/guestagent/module/drivers/new_relic_license_driver.py
1
3407
# Copyright 2016 Tesora, 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 ...
apache-2.0
231,084,127,926,069,860
34.863158
78
0.614617
false
RomanHargrave/namebench
libnamebench/provider_extensions.py
174
1713
# Copyright 2009 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 ...
apache-2.0
-7,883,432,375,487,771,000
33.959184
75
0.757151
false
DrMattChristian/btrbk
contrib/crypt/kdf_pbkdf2.py
2
1919
#!/usr/bin/env python3 # # kdf_pbkdf2.py - (kdf_backend for btrbk) # # Copyright (c) 2017 Axel Burri # # 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 y...
gpl-3.0
3,912,002,943,555,209,000
30.983333
111
0.642001
false
lindycoder/netman
netman/adapters/switches/util.py
3
3299
# Copyright 2015 Internap. # # 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...
apache-2.0
-3,626,427,164,691,782,000
29.831776
99
0.588663
false
jiachenning/odoo
addons/portal/mail_mail.py
320
2625
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2011 OpenERP S.A (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
agpl-3.0
9,194,375,834,232,678,000
50.470588
166
0.564571
false
zhangqifan/findSomething
FindSomething/Pods/AVOSCloudCrashReporting/Breakpad/src/tools/gyp/test/actions/gyptest-all.py
243
3677
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies simple actions when using an explicit build target of 'all'. """ import glob import os import TestGyp test = TestGyp.TestGyp(...
mit
-5,555,688,820,869,340,000
35.04902
79
0.720152
false
openstack-ja/horizon
openstack_dashboard/openstack/common/notifier/log_notifier.py
19
1297
# Copyright 2011 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
4,902,825,120,520,859,000
34.054054
78
0.71781
false