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
stefanv/aandete
app/lib/pygments/lexers/foxpro.py
31
26236
# -*- coding: utf-8 -*- """ pygments.lexers.foxpro ~~~~~~~~~~~~~~~~~~~~~~ Simple lexer for Microsoft Visual FoxPro source code. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer from pygm...
bsd-3-clause
3,681,358,831,545,326,600
60.299065
80
0.657532
false
petewarden/tensorflow
tensorflow/python/keras/saving/saved_model/network_serialization.py
4
1287
# Copyright 2019 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
5,023,852,967,389,024,000
40.516129
80
0.736597
false
progagtudo/matemate
run.py
1
1059
import flask import flask_restless import flask_sqlalchemy # Create the Flask application and the Flask-SQLAlchemy object. app = flask.Flask(__name__) app.config['DEBUG'] = True app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////tmp/test.db' app.config['SQLALCHEMY_ECHO'] = True db = flask_sqlalchemy.SQLAlchemy(app) ...
lgpl-3.0
-5,255,877,658,450,682,000
32.125
70
0.758263
false
llhe/tensorflow
tensorflow/python/kernel_tests/sparse_ops_test.py
4
36785
# 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/LICENSE-2.0 # # Unless required by applica...
apache-2.0
3,261,441,521,153,007,600
40.285073
80
0.613321
false
jiajie999/zerorpc-python
tests/testutils.py
18
2046
# -*- coding: utf-8 -*- # Open Source Initiative OSI - The MIT License (MIT):Licensing # # The MIT License (MIT) # Copyright (c) 2015 François-Xavier Bourlet (bombela+zerorpc@gmail.com) # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files...
mit
-1,733,621,430,362,443,000
33.083333
81
0.704156
false
mobify/apns-client
apnsclient/backends/dummy.py
18
4969
# Copyright 2014 Sardar Yumatov # # 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,...
apache-2.0
-719,266,313,900,510,000
32.802721
110
0.617629
false
porcobosso/spark-ec2
lib/boto-2.34.0/boto/iam/connection.py
12
57215
# Copyright (c) 2010-2011 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010-2011, Eucalyptus Systems, Inc. # # 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, includin...
apache-2.0
4,319,725,515,738,276,000
36.008409
115
0.602534
false
pgmillon/ansible
lib/ansible/modules/cloud/amazon/aws_codepipeline.py
3
11141
#!/usr/bin/python # Copyright: Ansible Project # 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 ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
gpl-3.0
4,978,949,890,051,202,000
35.408497
140
0.613141
false
seize-the-dave/XlsxWriter
xlsxwriter/test/comparison/test_default_row01.py
8
1091
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org # from ..excel_comparsion_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): """...
bsd-2-clause
-8,866,184,887,471,732,000
23.795455
79
0.584785
false
vcoin-project/v
qa/rpc-tests/invalidblockrequest.py
21
4204
#!/usr/bin/env python2 # # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # from test_framework.test_framework import ComparisonTestFramework from test_framework.util import * from test_framework.comptool import TestManager, Te...
mit
-889,387,906,283,025,200
34.931624
98
0.637726
false
dlacombejr/deepy
deepy/utils/train_logger.py
3
1113
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import datetime import logging as loggers import deepy logging = loggers.getLogger(__name__) class TrainLogger(object): def __init__(self): self.log_pool = [] def load(self, model_path): log_path = self._log_path(model_path) if ...
mit
-6,519,365,662,935,692,000
29.944444
76
0.572327
false
awemulya/fieldsight-kobocat
onadata/apps/userrole/models.py
1
7498
from datetime import datetime from django.core.urlresolvers import reverse from fcm.utils import get_device_model from django.contrib.auth.models import Group from django.core.exceptions import ValidationError from django.contrib.contenttypes.fields import GenericRelation from django.db import models from django.db.mo...
bsd-2-clause
6,713,981,366,634,069,000
41.845714
182
0.646572
false
GoogleCloudPlatform/appengine-mapreduce
python/test/mapreduce/records_test.py
15
16355
#!/usr/bin/env python """Tests for records.py.""" from __future__ import with_statement import array import unittest from mapreduce.third_party import crc32c from mapreduce import records class StringWriter(object): """records.FileWriter compliant writer to string.""" def __init__(self): self.data = '' ...
apache-2.0
-7,727,090,820,038,227,000
27.946903
80
0.543993
false
lukasjuhrich/pycroft
tests/model/test_traffic.py
1
3884
from pycroft.model import session from pycroft.model.traffic import TrafficVolume, pmacct_traffic_egress, \ pmacct_traffic_ingress from tests import FactoryDataTestBase from tests.factories import UserWithHostFactory class PMAcctViewTest(FactoryDataTestBase): ip = '141.30.228.39' bad_ip = '141.30.228.1' ...
apache-2.0
3,266,412,488,524,906,000
40.319149
99
0.603502
false
joequant/fabric
bddtests/steps/bdd_grpc_util.py
6
6608
# 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
149,429,192,532,958,750
41.089172
189
0.71368
false
Lujeni/ansible
lib/ansible/modules/cloud/azure/azure_rm_postgresqlfirewallrule.py
25
9925
#!/usr/bin/python # # Copyright (c) 2017 Zim Kalinowski, <zikalino@microsoft.com> # # 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 ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
-7,364,744,044,119,348,000
35.090909
153
0.570076
false
orcasgit/blender
tagging/views.py
30
2118
""" Tagging related views. """ from django.http import Http404 from django.utils.translation import ugettext as _ from django.views.generic.list_detail import object_list from tagging.models import Tag, TaggedItem from tagging.utils import get_tag, get_queryset_and_model def tagged_object_list(request, queryset_or_mo...
bsd-3-clause
7,873,885,772,614,170,000
39.730769
100
0.659112
false
GaZ3ll3/numpy
numpy/distutils/fcompiler/compaq.py
102
4145
#http://www.compaq.com/fortran/docs/ from __future__ import division, absolute_import, print_function import os import sys from numpy.distutils.fcompiler import FCompiler from numpy.distutils.compat import get_exception from distutils.errors import DistutilsPlatformError compilers = ['CompaqFCompiler'] if os.name !...
bsd-3-clause
-3,231,093,029,414,588,400
31.382813
82
0.55971
false
gangadhar-kadam/verve_live_frappe
frappe/email/doctype/email_account/test_email_account.py
4
3903
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt import frappe, os import unittest, email test_records = frappe.get_test_records('Email Account') from frappe.core.doctype.communication.communication import make from frappe.desk.form.load import get_attachments from frappe.utils....
mit
8,308,307,753,075,027,000
38.826531
98
0.719959
false
MemeticParadigm/TensorFlow
tensorflow/python/client/graph_util.py
5
3864
"""Helpers to manipulate a tensor graph in python. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow.python.platform from tensorflow.core.framework import graph_pb2 from tensorflow.python.framework import device as pydev from tensorflow...
apache-2.0
2,082,666,477,441,444,900
26.211268
80
0.652174
false
40223139/LEGOg7-39
static/Brython3.1.3-20150514-095342/Lib/_random.py
85
3370
from browser import window, alert def _randint(a, b): return int(window.Math.random()*(b-a+1)+a) def _rand_with_seed(x, rand_obj): x = window.Math.sin(rand_obj._state) * 10000 # Adding 1 is not reliable because of current integer implementation # If rand_obj._state is not a "safe integer" in the r...
agpl-3.0
2,035,711,148,055,721,000
32.7
79
0.613056
false
ryfeus/lambda-packs
Sklearn_scipy_numpy/source/click/termui.py
202
21008
import os import sys import struct from ._compat import raw_input, text_type, string_types, \ isatty, strip_ansi, get_winterm_size, DEFAULT_COLUMNS, WIN from .utils import echo from .exceptions import Abort, UsageError from .types import convert_type from .globals import resolve_color_default # The prompt funct...
mit
-5,280,598,943,793,130,000
37.975881
79
0.621906
false
abenzbiria/clients_odoo
addons/edi/models/res_partner.py
437
4243
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2011-2012 OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of t...
agpl-3.0
-4,027,520,717,300,105,000
44.623656
120
0.555739
false
puremourning/ycmd-1
ycmd/tests/java/signature_help_test.py
3
5767
# Copyright (C) 2020 ycmd contributors # # This file is part of ycmd. # # ycmd 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. # # ycmd...
gpl-3.0
3,883,802,659,180,761,600
30.513661
79
0.533726
false
imosquera/spinnaker
google/stackdriver_monitoring/spectator_client.py
2
4027
# pylint: disable=missing-docstring import json import logging import urllib2 class SpectatorClient(object): """Helper class for pulling data from Spectator servers.""" SERVICE_PORT_MAP = { 'clouddriver': 7002, 'echo': 8089, 'fiat': 7003, 'front50': 8080, 'gate': 8084, 'igor': 8088, ...
apache-2.0
4,925,514,204,833,845,000
29.976923
86
0.622548
false
kmoocdev2/edx-platform
lms/djangoapps/commerce/api/v0/tests/test_views.py
8
12479
""" Commerce API v0 view tests. """ import itertools import json from datetime import datetime, timedelta from uuid import uuid4 import ddt import mock import pytz from django.conf import settings from django.urls import reverse, reverse_lazy from django.test import TestCase from django.test.utils import override_sett...
agpl-3.0
-4,852,997,338,296,832,000
38.742038
115
0.65502
false
meredith-digops/ansible
test/compile/compile.py
126
2655
#!/usr/bin/env python """Python syntax checker with lint friendly output.""" import os import parser import re import sys def main(): paths, verbose, skip_patterns = parse_options() paths = filter_paths(paths, skip_patterns) check(paths, verbose) def parse_options(): paths = [] skip_patterns = ...
gpl-3.0
5,297,633,750,708,272,000
21.692308
99
0.505461
false
ryfeus/lambda-packs
Tensorflow/source/tensorflow/python/estimator/canned/parsing_utils.py
52
13199
# 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...
mit
-3,058,568,479,670,034,400
43.143813
92
0.673839
false
elainenaomi/sciwonc-dataflow-examples
dissertation2017/Experiment 2/instances/10_0_wikiflow_1sh_1s_annot/longestsession_1/LongestSession_1.py
11
2031
#!/usr/bin/env python from sciwonc.dataflow.DataStoreClient import DataStoreClient import ConfigDB_Longest_1 import pprint import datetime # connector and config client = DataStoreClient("mongodb", ConfigDB_Longest_1) config = ConfigDB_Longest_1 # according to config dataList = client.getData() # return an array of d...
gpl-3.0
3,353,771,947,461,796,400
35.267857
107
0.583456
false
saada/ansible
plugins/inventory/vbox.py
111
3090
#!/usr/bin/env python # 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. # # Ansible is distr...
gpl-3.0
-5,368,389,723,752,923,000
26.105263
118
0.52589
false
stuartarchibald/numba
numba/core/datamodel/testing.py
7
5346
from llvmlite import ir from llvmlite import binding as ll from numba.core import datamodel import unittest class DataModelTester(unittest.TestCase): """ Test the implementation of a DataModel for a frontend type. """ fe_type = NotImplemented def setUp(self): self.module = ir.Module() ...
bsd-2-clause
6,638,824,878,000,366,000
34.64
73
0.603816
false
thaim/ansible
lib/ansible/modules/cloud/amazon/ecs_taskdefinition_info.py
10
12376
#!/usr/bin/python # Copyright: Ansible Project # 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 ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
mit
3,864,445,306,965,647,000
35.833333
127
0.588154
false
sid88in/incubator-airflow
tests/contrib/hooks/test_wasb_hook.py
2
8348
# -*- coding: utf-8 -*- # # 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 #...
apache-2.0
-6,432,348,980,032,509,000
40.326733
78
0.644106
false
lukfor/mkdocs
mkdocs/nav.py
1
11362
# coding: utf-8 """ Deals with generating the site-wide navigation. This consists of building a set of interlinked page and header objects. """ from __future__ import unicode_literals import datetime import logging import os from mkdocs import utils, exceptions log = logging.getLogger(__name__) def filename_to_t...
bsd-2-clause
-4,355,323,085,159,609,300
31.649425
100
0.601655
false
vmx/git-repo
command.py
9
6933
# # Copyright (C) 2008 The Android Open Source Project # # 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 la...
apache-2.0
-8,799,944,373,189,894,000
29.950893
78
0.660464
false
Sing-Li/go-buildpack
builds/runtimes/python-2.7.6/lib/python2.7/test/audiotests.py
8
7577
from test.test_support import findfile, TESTFN, unlink import unittest import array import io import pickle import sys import base64 def fromhex(s): return base64.b16decode(s.replace(' ', '')) def byteswap2(data): a = array.array('h', data) a.byteswap() return a.tostring() def byteswap3(data): ba...
mit
8,685,747,571,990,128,000
33.756881
79
0.595882
false
justincassidy/scikit-learn
examples/text/document_classification_20newsgroups.py
222
10500
""" ====================================================== Classification of text documents using sparse features ====================================================== This is an example showing how scikit-learn can be used to classify documents by topics using a bag-of-words approach. This example uses a scipy.spars...
bsd-3-clause
4,985,882,016,453,350,000
32.546326
79
0.636571
false
sebastic/QGIS
python/plugins/processing/gui/NumberInputDialog.py
3
6379
# -*- coding: utf-8 -*- """ *************************************************************************** NumberInputDialog.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *********************...
gpl-2.0
-3,088,224,351,273,792,000
41.245033
82
0.548989
false
stargaser/astropy
astropy/table/row.py
2
6611
# Licensed under a 3-clause BSD style license - see LICENSE.rst import collections from collections import OrderedDict from operator import index as operator_index import numpy as np class Row: """A class to represent one row of a Table object. A Row object is returned when a Table object is indexed with a...
bsd-3-clause
3,923,843,377,606,951,000
32.388889
91
0.570867
false
Distrotech/scons
build/scons/engine/SCons/Tool/g77.py
2
2497
"""engine.SCons.Tool.g77 Tool-specific initialization for g77. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 T...
mit
-8,700,621,766,474,539,000
33.205479
113
0.709652
false
kurli/blink-crosswalk
Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py
22
48279
# Copyright (C) 2010 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 conditions and the ...
bsd-3-clause
-6,669,238,839,340,218,000
52.112211
171
0.6688
false
OpenWhere/scrapy
tests/test_link.py
68
2014
import unittest import warnings from scrapy.link import Link class LinkTest(unittest.TestCase): def _assert_same_links(self, link1, link2): self.assertEqual(link1, link2) self.assertEqual(hash(link1), hash(link2)) def _assert_different_links(self, link1, link2): self.assertNotEqual(l...
bsd-3-clause
-7,181,686,440,240,643,000
38.490196
95
0.616683
false
Clear-ICT/odoo-addons
sale_new_so/models/sale.py
1
3044
# -*- coding:utf-8 -*- # # # Copyright (C) 2015 Clear ICT Solutions <info@clearict.com>. # All Rights Reserved. # # 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 ver...
agpl-3.0
-4,770,236,714,235,546,000
35.238095
78
0.600526
false
GREO/GNU-Radio
gnuradio-examples/python/audio/audio_copy.py
17
2378
#!/usr/bin/env python # # Copyright 2004,2005,2007 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at you...
gpl-3.0
-136,976,479,586,492,590
36.15625
83
0.636249
false
c-wilson/klustaviewa
klustaviewa/views/tests/test_projectionview.py
2
1598
"""Unit tests for projection view.""" # ----------------------------------------------------------------------------- # Imports # ----------------------------------------------------------------------------- import os import numpy as np import numpy.random as rnd import pandas as pd from kwiklib.dataio import Kluste...
bsd-3-clause
-2,284,534,170,699,542,500
34.533333
79
0.525031
false
petewarden/tensorflow
tensorflow/python/tools/api/generator/output_init_files_test.py
11
7064
# 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
-6,464,697,086,580,574,000
35.791667
79
0.670583
false
timbr-io/juno-magic
juno_magic/client.py
2
12780
"""Implements a fully blocking kernel client. Useful for test suites and blocking terminal interfaces. """ # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. from __future__ import print_function from functools import partial from getpass import getpass try: from ...
mit
8,010,506,310,489,818,000
36.810651
115
0.577621
false
cchurch/ansible
lib/ansible/modules/cloud/ovirt/ovirt_cluster_facts.py
55
3498
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016 Red Hat, 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 #...
gpl-3.0
-5,610,883,525,838,995,000
30.513514
142
0.652373
false
mozilla/kuma
kuma/scrape/tests/test_fixture.py
1
4594
import pytest from constance import config from django.contrib.auth.models import Group, Permission from django.contrib.contenttypes.models import ContentType from kuma.users.models import User, UserBan from ..fixture import FixtureLoader def test_empty_fixtures(): """A empty specification is OK, does nothin...
mpl-2.0
865,680,730,144,521,200
27.012195
73
0.569656
false
fras2560/InducedSubgraph
inducer/test/testDcolor.py
1
5492
''' @author: Dallas Fraser @date: 2019-08-10 @summary: Tests for the dcolor class and methods ''' from inducer.dcolor import Dcolor, combine_color_clique, convert_combo,\ add_list from inducer.helper import make_diamond, make_claw, make_cycle, join import networkx as nx import unittest class TestDcolor(unittest.T...
mit
3,181,095,062,548,355,000
30.382857
72
0.495812
false
mavit/ansible-modules-extras
windows/win_dotnet_ngen.py
138
1769
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Peter Mounce <public@neverrunwithscissors.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...
gpl-3.0
286,553,574,238,457,380
39.204545
137
0.737705
false
devendermishrajio/nova
nova/db/sqlalchemy/migrate_repo/versions/233_add_stats_in_compute_nodes.py
81
1460
# Copyright (c) 2014 Rackspace Hosting # 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
69,031,639,893,176,720
36.435897
78
0.700685
false
Orav/kbengine
kbe/src/lib/python/Lib/ssl.py
2
35365
# Wrapper module for _ssl, providing some additional facilities # implemented in Python. Written by Bill Janssen. """This module provides some more Pythonic support for SSL. Object types: SSLSocket -- subtype of socket.socket which does SSL over the socket Exceptions: SSLError -- exception raised f...
lgpl-3.0
7,161,321,372,844,950,000
35.42328
116
0.591574
false
lcy-seso/Paddle
python/paddle/fluid/tests/unittests/test_multiclass_nms_op.py
4
7851
# Copyright (c) 2018 PaddlePaddle 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 applicabl...
apache-2.0
-7,486,048,843,457,367,000
33.738938
80
0.575213
false
windskyer/nova
nova/tests/unit/virt/test_images.py
67
1681
# Copyright 2013 IBM Corp. # # 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 agree...
gpl-2.0
976,863,591,508,187,000
36.355556
78
0.651993
false
googlearchive/appengine-guestbook-namespaces-python
appengine_config.py
4
2515
# Copyright 2010 Google Inc. All Rights Reserved. """ Manages the namespace for the application. This file presents ways an ISV (Independent Software Vendor) might use namespaces to distribute the guestbook application to different corporate clients. The original guestbook.py is left unchanged. Our namespace choosing...
apache-2.0
-4,273,115,852,928,157,000
33.452055
80
0.748708
false
schumi2004/NOT_UPDATED_Sick-Beard-Dutch
lib/imdb/parser/http/searchCharacterParser.py
67
2793
""" parser.http.searchCharacterParser module (imdb package). This module provides the HTMLSearchCharacterParser class (and the search_character_parser instance), used to parse the results of a search for a given character. E.g., when searching for the name "Jesse James", the parsed page would be: http://akas.imdb....
gpl-3.0
2,617,192,915,209,953,000
39.478261
80
0.648765
false
magicgoose/yowsup
yowsup/layers/protocol_groups/protocolentities/notification_groups_subject.py
61
2304
from yowsup.structs import ProtocolEntity, ProtocolTreeNode from yowsup.layers.protocol_notifications.protocolentities import NotificationProtocolEntity from .notification_groups import GroupsNotificationProtocolEntity class SubjectGroupsNotificationProtocolEntity(GroupsNotificationProtocolEntity): ''' <notif...
gpl-3.0
-6,807,944,199,099,682,000
40.890909
134
0.686632
false
Xeralux/tensorflow
tensorflow/python/framework/ops_test.py
1
111343
# 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/LICENSE-2.0 # # Unless required by applica...
apache-2.0
8,753,938,792,502,141,000
36.654041
80
0.622518
false
mikesligo/pieproxy
ref/old-interesting.py
1
3541
#!/usr/bin/python import socket # Import socket module from struct import * class Packet: ''' Custom packet class. Attributes created on initialisation: IP ============ - version - ihl - ttl - protocol - s_addr - d_addr TCP ============ - so...
gpl-3.0
-9,117,187,804,109,135,000
29.008475
242
0.550692
false
bblacey/FreeCAD-MacOS-CI
src/Mod/Path/PathScripts/PathDrilling.py
2
22812
# -*- coding: utf-8 -*- # *************************************************************************** # * * # * Copyright (c) 2014 Yorik van Havre <yorik@uncreated.net> * # * ...
lgpl-2.1
9,090,199,985,165,073,000
41.401487
201
0.558434
false
Eigenlabs/EigenD
pi/toggle.py
3
2384
# # Copyright 2009 Eigenlabs Ltd. http://www.eigenlabs.com # # This file is part of EigenD. # # EigenD 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) a...
gpl-3.0
42,396,363,281,707,520
34.058824
131
0.639262
false
ptisserand/portage
pym/portage/sync/controller.py
1
9315
# Copyright 2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 from __future__ import print_function import sys import logging import grp import pwd import portage from portage import os from portage.progress import ProgressBar #from portage.emaint.defaults import DEFAULT_OPTI...
gpl-2.0
-1,829,660,378,251,909,000
28.855769
88
0.670102
false
NaturalGIS/naturalgis_qgis
tests/src/python/test_qgsnetworkcontentfetcher.py
45
4528
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsNetworkContentFetcher .. note:: 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 later versio...
gpl-2.0
-3,012,497,278,261,324,300
31.811594
135
0.663207
false
Mariusz1970/enigma2
lib/python/Components/Sources/FrontendInfo.py
35
1642
from enigma import iPlayableService from Source import Source from Components.PerServiceDisplay import PerServiceBase class FrontendInfo(Source, PerServiceBase): def __init__(self, service_source = None, frontend_source = None, navcore = None): self.navcore = None Source.__init__(self) if navcore: PerService...
gpl-2.0
-1,721,709,056,194,566,000
28.854545
83
0.730816
false
offbye/paparazzi
sw/tools/parrot/ardrone2.py
25
22475
#!/usr/bin/env python # # Copyright (C) 2012-2014 The Paparazzi Team # # This file is part of Paparazzi. # # Paparazzi 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, or (at your option) # an...
gpl-2.0
-8,424,742,152,048,010,000
46.616525
160
0.663048
false
onceuponatimeforever/oh-mainline
vendor/packages/sqlparse/tests/test_grouping.py
16
13177
# -*- coding: utf-8 -*- import pytest import sqlparse from sqlparse import sql from sqlparse import tokens as T from tests.utils import TestCaseBase class TestGrouping(TestCaseBase): def test_parenthesis(self): s = 'select (select (x3) x2) and (y2) bar' parsed = sqlparse.parse(s)[0] se...
agpl-3.0
-7,812,441,854,960,827,000
39.669753
79
0.621462
false
undoware/neutron-drive
google_appengine/lib/django_1_2/tests/modeltests/validation/test_unique.py
38
6508
import unittest import datetime from django.conf import settings from django.core.exceptions import ValidationError from django.db import connection from models import CustomPKModel, UniqueTogetherModel, UniqueFieldsModel, UniqueForDateModel, ModelToValidate, Post, FlexibleDatePost class GetUniqueCheckTests(unittest....
bsd-3-clause
-5,054,439,932,243,143,000
40.452229
133
0.615089
false
olapaola/olapaola-android-scripting
python/src/Lib/plat-mac/macerrors.py
33
116661
# -coding=latin1- from warnings import warnpy3k warnpy3k("In 3.x, the macerrors module is removed.", stacklevel=2) svTempDisable = -32768 #svTempDisable svDisabled = -32640 #Reserve range -32640 to -32768 for Apple temp disables. fontNotOutlineErr = -32615 #bitmap font passed to routine that does outlin...
apache-2.0
-7,301,004,341,066,004,000
61.822294
161
0.751734
false
taknevski/tensorflow-xsmm
tensorflow/contrib/distributions/python/ops/distribution_util.py
16
29861
# Copyright 2016 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
7,071,179,960,165,183,000
38.342556
80
0.643247
false
shanez/django-moneyclip
moneyclip/moneyclip.py
1
1919
from django.db import models from .machine import CacheMachine class PickleFieldCache(models.Model): class Meta: abstract = True _cached_fields = [] class CachedForeignKey(models.ForeignKey): def contribute_to_class(self, cls, name): super(CachedForeignKey, self).contribute_to_class(cls...
gpl-3.0
2,360,526,584,993,053,000
31.525424
132
0.595623
false
peak6/st2
st2common/st2common/util/ip_utils.py
10
3535
# 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 use ...
apache-2.0
6,160,589,944,384,229,000
28.705882
89
0.626591
false
atuljain/odoo
addons/account_analytic_analysis/__openerp__.py
62
2311
# -*- 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
-8,771,699,976,334,362,000
44.313725
167
0.612722
false
forgottenlabs/wklejorg
_files/apps/wklej-0.1.5.py
2
2966
#!/usr/bin/env python """ Simple wklej.org paste script license: GPLv2 version 0.1.4 thanks ch4os for help """ from optparse import OptionParser import commands import sys import xmlrpclib syntaxes = [ 'text', 'apache', 'actionscript', 'actionscript3', 'bash', 'bat', 'bbcode', 'befuge', 'boo', 'brainfuck', 'c-o...
mit
3,665,507,739,614,362,600
32.325843
138
0.613958
false
mantidproject/mantid
qt/applications/workbench/workbench/plugins/test/test_exception_handler.py
3
1875
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2019 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source, # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + impo...
gpl-3.0
-2,833,073,661,589,208,000
38.893617
96
0.740267
false
inodb/cbioportal
core/src/main/scripts/importer/cbioportal_common.py
2
34127
#! /usr/bin/env python # ------------------------------------------------------------------------------ # Common components used by various cbioportal scripts. # ------------------------------------------------------------------------------ import os import sys import csv import logging.handlers from collections imp...
agpl-3.0
-500,938,298,764,521,200
41.65875
166
0.602543
false
sauloal/cufflinksviewer
venvwin/Lib/encodings/cp1251.py
93
13924
""" Python Character Mapping Codec cp1251 generated from 'MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1251.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def d...
mit
8,063,189,481,236,601,000
43.355049
119
0.541008
false
txje/compatible-intervals
util.py
1
1475
# ideally, find the maximum total 1:1 overlap between the two sets of intervals # in reality, use only those overlapping regions which are the maximum overlap for both intervals # I think it is currently O(n) in the number of intervals on one side since intervals may only overlap two others, # ... so it is at most dou...
mit
-7,518,443,618,457,072,000
46.580645
141
0.56339
false
IronLanguages/ironpython3
Src/StdLib/Lib/test/test_tcl.py
4
27564
import unittest import re import subprocess import sys import os from test import support # Skip this test if the _tkinter module wasn't built. _tkinter = support.import_module('_tkinter') # Make sure tkinter._fix runs to set up the environment tkinter = support.import_fresh_module('tkinter') from tkinter import Tcl...
apache-2.0
-6,406,922,515,536,840,000
38.774892
85
0.531998
false
BlastPy/django-ckeditor
ckeditor/management/commands/generateckeditorthumbnails.py
8
1375
import os from django.conf import settings from django.core.management.base import NoArgsCommand from ckeditor.views import get_image_files from ckeditor.utils import get_thumb_filename from ckeditor.image_processing import get_backend class Command(NoArgsCommand): """ Creates thumbnail files for the CKEdit...
bsd-3-clause
-1,986,187,886,650,936,000
35.184211
94
0.626909
false
aldian/tensorflow
tensorflow/contrib/data/python/kernel_tests/scan_dataset_op_test.py
15
5707
# 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
9,082,323,989,938,420,000
39.190141
87
0.664272
false
denisshockwave/image_processing_ocr_server
venv/lib/python2.7/site-packages/wtforms/csrf/session.py
193
3056
""" A provided CSRF implementation which puts CSRF data in a session. This can be used fairly comfortably with many `request.session` type objects, including the Werkzeug/Flask session store, Django sessions, and potentially other similar objects which use a dict-like API for storing session keys. The basic concept i...
gpl-3.0
7,901,743,781,581,828,000
33.727273
91
0.656086
false
blockstack/blockstack-server
integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_atlas_mesh.py
1
6210
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Blockstack ~~~~~ copyright: (c) 2014-2015 by Halfmoon Labs, Inc. copyright: (c) 2016 by Blockstack.org This file is part of Blockstack Blockstack is free software: you can redistribute it and/or modify it under the terms of the GNU General...
gpl-3.0
-5,991,662,009,985,262,000
33.5
172
0.655556
false
i-rabot/tractogithub
tracformatter/trac/core.py
1
8449
# -*- coding: utf-8 -*- # # Copyright (C) 2003-2011 Edgewall Software # Copyright (C) 2003-2004 Jonas Borgström <jonas@edgewall.com> # Copyright (C) 2004-2005 Christopher Lenz <cmlenz@gmx.de> # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received ...
bsd-3-clause
319,935,377,589,569,540
33.944681
79
0.596188
false
boompieman/iim_project
project_python2/lib/python2.7/site-packages/nltk/toolbox.py
3
18532
# coding: utf-8 # Natural Language Toolkit: Toolbox Reader # # Copyright (C) 2001-2015 NLTK Project # Author: Greg Aumann <greg_aumann@sil.org> # URL: <http://nltk.org> # For license information, see LICENSE.TXT """ Module for reading, writing and manipulating Toolbox databases and settings files. """ from...
gpl-3.0
6,100,669,499,440,119,000
35.287726
107
0.557846
false
tokuhirom/ycmd
cpp/ycm/tests/gmock/scripts/gmock_doctor.py
89
24090
#!/usr/bin/env python # # Copyright 2008, 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...
gpl-3.0
8,591,389,398,553,246,000
36.640625
80
0.595807
false
nickleefly/youtube-dl
youtube_dl/extractor/regiotv.py
99
2261
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( sanitized_Request, xpath_text, xpath_with_ns, ) class RegioTVIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?regio-tv\.de/video/(?P<id>[0-9]+)' _TESTS = [{ 'url': 'http://...
unlicense
2,737,479,464,195,948,500
35.419355
346
0.563773
false
PalRist/SmartMirror
OLD/modules/tools/WeatherFunctions.py
1
1212
import requests import json import feedparser import datetime as dt # class Weather(): weather_api_token = '05e9697d6d051b6c5073f673544b5418' # create account at https://darksky.net/dev/ weather_latg = 'nb' # see https://darksky.net/dev/docs/forecast for full list of latguage parameters values weather_unit = 'si' # ...
mit
-5,390,000,078,434,922,000
39.433333
190
0.693894
false
woodymit/millstone_accidental_source
genome_designer/main/xhr_handlers.py
1
45292
""" Methods that handle Ajax requests from the frontend. This module was created in response to views.py getting quite big, and so a reasonable separation point is to separate page actions from Ajax actions. """ import copy import csv import json import os from StringIO import StringIO import tempfile from django.co...
mit
-6,919,216,524,811,964,000
35.146848
109
0.656981
false
charbeljc/OCB
addons/resource/faces/timescale.py
263
3899
############################################################################ # Copyright (C) 2005 by Reithinger GmbH # mreithinger@web.de # # This file is part of faces. # # faces is free software; you can redistribute it and/or modify # ...
agpl-3.0
-1,893,447,423,805,934,300
32.904348
80
0.56476
false
DanLipsitt/flask-sockjs
flask_sockjs/__init__.py
2
1632
# -*- coding: utf-8 -*- from observable import Observable from flask import Blueprint, url_for from twisted.web.resource import Resource from txsockjs.utils import broadcast from txsockjs.factory import SockJSResource from .endpoint import Endpoint, EndpointProtocol, EndpointFactory class SockJS(Observable): def...
mit
4,063,069,912,594,632,700
34.478261
118
0.639093
false
robbiet480/home-assistant
homeassistant/components/pushbullet/sensor.py
16
3912
"""Pushbullet platform for sensor component.""" import logging import threading from pushbullet import InvalidKeyError, Listener, PushBullet import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import CONF_API_KEY, CONF_MONITORED_CONDITIONS import homeassistant...
apache-2.0
2,796,264,272,770,827,000
28.862595
84
0.637526
false
MattRijk/django-ecomsite
lib/python2.7/site-packages/django/http/utils.py
134
1501
""" Functions that modify an HTTP request or response in some way. """ # This group of functions are run as part of the response handling, after # everything else, including all response middleware. Think of them as # "compulsory response middleware". Be careful about what goes here, because # it's a little fiddly to ...
cc0-1.0
1,392,825,984,670,328,300
35.609756
79
0.682878
false
chengdh/openerp-ktv
openerp/addons/l10n_es/__openerp__.py
8
2396
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2008-2010 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved. # Jordi Esteve <jesteve@zikzakmedia.com> # $Id$...
agpl-3.0
-2,386,641,082,002,430,000
37.031746
91
0.607262
false
joongh/robotframework
utest/result/test_configurer.py
6
11532
from itertools import chain import unittest from robot.utils.asserts import assert_equal, assert_raises_with_msg, assert_true from robot.errors import DataError from robot.result import Keyword, TestCase, TestSuite from robot.result.configurer import SuiteConfigurer SETUP = Keyword.SETUP_TYPE TEARDOWN = Keyword.TEAR...
apache-2.0
-8,633,156,628,632,460,000
42.847909
104
0.610128
false
kevinschoonover/cs2001-cpl
homework/2017-fs-1b-hw04-ksyh3/test/test_view_inator.py
1
3578
"""Tests for view_inator route.""" import json import random from http import HTTPStatus from urllib.parse import urlparse from utils import from_datetime def test_login_required(app): """Redirect to login if we're not logged in.""" rv = app.get("/view/uuid-goes-here/") assert rv.status_code == HTTPStat...
gpl-3.0
-3,031,298,755,026,364,000
33.403846
78
0.660704
false
saurabh6790/med_new_app
stock/doctype/serial_no/serial_no.py
20
12215
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import webnotes from webnotes.utils import cint, getdate, cstr, flt, add_days import datetime from webnotes import _, ValidationError from controll...
agpl-3.0
-8,750,289,272,920,492,000
39.44702
317
0.682276
false
rodrigc/buildbot
master/buildbot/test/unit/data/test_builds.py
5
14436
# This file is part of Buildbot. Buildbot 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. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
gpl-2.0
-4,666,890,255,923,018,000
40.843478
99
0.601829
false
ttm/percolation
percolation/measures/text/overall.py
1
3269
import percolation as P __doc__ = "functions for analysis of text by isolated functionalities \ or analysis and rendering roadmaps" def measureAll(authors_messages, sectorialized_agents): """Overall text analysis routine, uses all resources Uses: P.text.aux.textFromAuthors() P.text.aux.tex...
gpl-3.0
7,193,997,542,360,534,000
68.510638
153
0.727885
false
arnif/CouchPotatoServer
libs/sqlalchemy/orm/session.py
15
73776
# orm/session.py # Copyright (C) 2005-2012 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Provides the Session class and related utilities.""" import weakref from itertools ...
gpl-3.0
4,727,543,555,351,882,000
37.465068
100
0.602093
false