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
nrc/servo
tests/wpt/css-tests/tools/wptserve/wptserve/server.py
136
17886
import BaseHTTPServer import errno import os import re import socket from SocketServer import ThreadingMixIn import ssl import sys import threading import time import traceback import types import urlparse import routes as default_routes from logger import get_logger from request import Server, Request from response i...
mpl-2.0
7,438,331,172,229,768,000
37.63067
106
0.581572
false
unnikrishnankgs/va
venv/lib/python3.5/site-packages/django/contrib/gis/db/backends/spatialite/introspection.py
391
3131
from django.contrib.gis.gdal import OGRGeomType from django.db.backends.sqlite3.introspection import ( DatabaseIntrospection, FlexibleFieldLookupDict, ) from django.utils import six class GeoFlexibleFieldLookupDict(FlexibleFieldLookupDict): """ Sublcass that includes updates the `base_data_types_reverse` ...
bsd-2-clause
7,422,754,476,030,991,000
42.486111
101
0.592143
false
dim0/ansible-commander
lib/main/views.py
1
22186
# Copyright (c) 2013 AnsibleWorks, Inc. # # This file is part of Ansible Commander # # Ansible Commander 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 op...
agpl-3.0
-2,246,083,647,887,031,600
34.27186
128
0.667809
false
kryztof/pit
smsread.py
1
4142
#!/usr/bin/python import subprocess import string import urllib.request import urllib.parse import xml.etree.ElementTree as ET from histelement import * from histelementcontainer import * from utils import * import pygame class SmsReader: def __init__(self,historycontainer): self.token = -1 self.smses = -1 ...
gpl-3.0
-9,061,730,590,596,433,000
32.674797
306
0.64703
false
jonathanslenders/asyncssh
asyncssh/ed25519.py
1
3294
# Copyright (c) 2015 by Ron Frederick <ronf@timeheart.net>. # All rights reserved. # # This program and the accompanying materials are made available under # the terms of the Eclipse Public License v1.0 which accompanies this # distribution and is available at: # # http://www.eclipse.org/legal/epl-v10.html # # Cont...
epl-1.0
-1,748,310,069,091,822,600
26.680672
78
0.623254
false
akhmadMizkat/odoo
addons/delivery/models/delivery_price_rule.py
33
2283
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from openerp import models, fields, api import openerp.addons.decimal_precision as dp class PriceRule(models.Model): _name = "delivery.price.rule" _description = "Delivery Price Rules" _order = 'sequence, l...
gpl-3.0
3,112,656,110,210,906,600
66.147059
209
0.635129
false
tysonholub/twilio-python
twilio/rest/sync/v1/service/sync_stream/__init__.py
1
16807
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base import deserialize from twilio.base import values from twilio.base.instance_context import InstanceContext from twilio.base.instance_resource import InstanceResource from twilio.base...
mit
-3,823,733,131,409,582,000
33.091278
103
0.613732
false
webgeodatavore/django
tests/utils_tests/test_timezone.py
149
7857
import copy import datetime import pickle import unittest from django.test import override_settings from django.utils import timezone try: import pytz except ImportError: pytz = None requires_pytz = unittest.skipIf(pytz is None, "this test requires pytz") if pytz is not None: CET = pytz.timezone("Europe...
bsd-3-clause
486,524,341,620,745,300
39.292308
107
0.639557
false
Yuudachimoe/HikariChun-RedBot
lib/youtube_dl/extractor/mofosex.py
39
2020
from __future__ import unicode_literals from ..utils import ( int_or_none, str_to_int, unified_strdate, ) from .keezmovies import KeezMoviesIE class MofosexIE(KeezMoviesIE): _VALID_URL = r'https?://(?:www\.)?mofosex\.com/videos/(?P<id>\d+)/(?P<display_id>[^/?#&.]+)\.html' _TESTS = [{ 'url...
gpl-3.0
4,712,997,220,525,150,000
35.071429
104
0.538119
false
DanielSBrown/osf.io
api/institutions/views.py
3
10565
from rest_framework import generics from rest_framework import permissions as drf_permissions from rest_framework import exceptions from rest_framework import status from rest_framework.response import Response from modularodm import Q from framework.auth.oauth_scopes import CoreScopes from website.models import Nod...
apache-2.0
9,198,308,477,165,221,000
31.608025
172
0.642972
false
buntyke/GPy
GPy/kern/_src/todo/eq_ode1.py
19
23502
# Copyright (c) 2013, GPy Authors, see AUTHORS.txt # Licensed under the BSD 3-clause license (see LICENSE.txt) from kernpart import Kernpart import numpy as np from GPy.util.linalg import mdot, pdinv from GPy.util.ln_diff_erfs import ln_diff_erfs import pdb from scipy import weave class Eq_ode1(Kernpart): """ ...
mit
-7,165,662,162,007,176,000
41.269784
331
0.519232
false
airtrick/zxing
cpp/scons/scons-local-2.0.0.final.0/SCons/Tool/dmd.py
34
8613
"""SCons.Tool.dmd Tool-specific initialization for the Digital Mars D compiler. (http://digitalmars.com/d) Coded by Andy Friesen (andy@ikagames.com) 15 November 2003 There are a number of problems with this script at this point in time. The one that irritates me the most is the Windows linker setup. The D linker do...
apache-2.0
-7,159,116,646,611,167,000
37.623318
120
0.594682
false
jerrylei98/Dailydos
tasks_utils.py
1
1150
import sqlite3 def get_full_sql(user): conn = sqlite3.connect("tasks.db") c = conn.cursor() temp = [] for row in c.execute('SELECT * FROM tasks where email = "' + user + '";'): temp.append(row) conn.close() return temp def get_tasks(user): temp = get_full_sql(user) ...
mit
4,925,463,963,597,789,000
27.04878
81
0.481739
false
Mokona/python-p4lib
test/functionnal/which.py
1
12209
#!/usr/bin/env python # Copyright (c) 2002-2005 ActiveState Corp. # See LICENSE.txt for license details. # Author: # Trent Mick (TrentM@ActiveState.com) # Home: # http://trentm.com/projects/which/ r"""Find the full path to commands. which(command, path=None, verbose=0, exts=None) Return the full path to the f...
mit
-1,544,010,348,674,507,300
35.774096
80
0.573511
false
jhayworth/config
.emacs.d/elpy/rpc-venv/local/lib/python2.7/site-packages/pip/_vendor/chardet/sjisprober.py
290
3774
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org 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 Reserved. # # Con...
gpl-3.0
-306,076,606,446,895,940
40.021739
78
0.610758
false
askhl/ase
ase/gui/colors.py
1
30815
# encoding: utf-8 """colors.py - select how to color the atoms in the GUI.""" import gtk from gettext import gettext as _ from ase.gui.widgets import pack, cancel_apply_ok, oops, help import ase from ase.data.colors import jmol_colors import numpy as np import colorsys named_colors = ('Green', 'Yellow', 'Blue', 'Red...
gpl-2.0
6,667,238,329,084,857,000
43.59479
101
0.52773
false
annarev/tensorflow
tensorflow/python/tpu/tpu_test_wrapper.py
17
7198
# 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
-644,584,886,397,572,200
35.170854
97
0.695471
false
KyleAMoore/KanjiNani
Android/.buildozer/android/platform/build/dists/KanjiNani/crystax_python/crystax_python/site-packages/kivy/modules/recorder.py
25
2481
''' Recorder module =============== .. versionadded:: 1.1.0 Create an instance of :class:`~kivy.input.recorder.Recorder`, attach to the class, and bind some keys to record / play sequences: - F6: play the last record in a loop - F7: read the latest recording - F8: record input events Configuration -----...
gpl-3.0
6,017,301,426,735,300,000
25.393617
79
0.627166
false
matthewfranglen/spark
python/pyspark/ml/linalg/__init__.py
20
39556
# # 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...
mit
2,397,872,639,111,391,000
32.72208
100
0.538983
false
mediatum/mediatum
core/styles.py
1
9708
""" mediatum - a multimedia content repository Copyright (C) 2010 Arne Seifert <seiferta@in.tum.de> 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 you...
gpl-3.0
-4,362,509,584,596,135,000
33.548043
121
0.6507
false
morissette/devopsdays-hackathon-2016
venv/lib/python2.7/site-packages/flask/__init__.py
425
1674
# -*- coding: utf-8 -*- """ flask ~~~~~ A microframework based on Werkzeug. It's extensively documented and follows best practice patterns. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ __version__ = '0.10.1' # utilities we import from Werkzeug and...
gpl-3.0
-884,513,562,456,264,400
32.48
77
0.746117
false
melon-li/openstack-dashboard
openstack_dashboard/dashboards/admin/routers/urls.py
66
1108
# Copyright 2012, Nachi Ueno, NTT MCL, 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 applic...
apache-2.0
2,319,593,263,173,849,000
32.575758
78
0.685018
false
ovnicraft/openerp-restaurant
mrp_repair/__openerp__.py
65
2540
# -*- 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
2,126,422,267,029,839,000
36.910448
78
0.574803
false
timokoola/finnkinotxt
botocore/vendored/requests/auth.py
413
6794
# -*- coding: utf-8 -*- """ requests.auth ~~~~~~~~~~~~~ This module contains the authentication handlers for Requests. """ import os import re import time import hashlib from base64 import b64encode from .compat import urlparse, str from .cookies import extract_cookies_to_jar from .utils import parse_dict_header, ...
apache-2.0
-4,908,858,549,906,108,000
31.04717
88
0.554607
false
bmander/dancecontraption
django/core/servers/basehttp.py
78
25168
""" BaseHTTPServer that implements the Python WSGI protocol (PEP 333, rev 1.21). Adapted from wsgiref.simple_server: http://svn.eby-sarna.com/wsgiref/ This is a simple server for use in testing or debugging Django apps. It hasn't been reviewed for security issues. Don't use it for production use. """ from BaseHTTPSe...
bsd-3-clause
412,680,474,295,284,740
35.16092
94
0.601756
false
xyzz/vcmi-build
project/jni/python/src/Lib/test/test_multibytecodec_support.py
55
12606
#!/usr/bin/env python # # test_multibytecodec_support.py # Common Unittest Routines for CJK codecs # import sys, codecs import unittest, re from test import test_support from StringIO import StringIO class TestBase: encoding = '' # codec name codec = None # codec tuple (with 4 elements) ...
lgpl-2.1
-5,319,612,920,944,440,000
36.076471
78
0.525623
false
Kast0rTr0y/ansible
lib/ansible/modules/database/vertica/vertica_role.py
20
8551
#!/usr/bin/python # -*- coding: utf-8 -*- # 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
2,456,785,646,038,927,400
32.402344
111
0.624956
false
tytso/compute-image-packages
gcimagebundle/gcimagebundlelib/fs_copy.py
5
5513
# Copyright 2013 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 agree...
apache-2.0
8,408,912,530,699,471,000
29.627778
83
0.669871
false
google-research/evoflow
evoflow/ops/dual_crossover.py
1
6303
# 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, ...
apache-2.0
-848,629,362,712,422,700
35.224138
78
0.614628
false
prusnak/bitcoin
qa/rpc-tests/nodehandling.py
11
3834
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test node handling.""" from test_framework.test_framework import BitcoinTestFramework from test_framew...
mit
7,675,043,728,942,519,000
46.925
136
0.607981
false
openafs-contrib/afspy
afs/util/CacheManagerUtil.py
1
2003
""" common cache-manager operations """ from afs.util.Executor import exec_wrapper import ParseCacheManagerUtil as PM from BaseUtil import BaseUtil class CacheManagerUtil(BaseUtil) : @exec_wrapper def flush_all(self, _cfg=None): """ Force the AFS Cache Manager to discard all data ...
bsd-2-clause
258,103,271,633,769,440
30.296875
96
0.577134
false
Edraak/edraak-platform
openedx/core/djangoapps/user_api/serializers.py
1
4358
""" Django REST Framework serializers for the User API application """ from django.contrib.auth.models import User from django.utils.timezone import now from rest_framework import serializers from lms.djangoapps.verify_student.models import SoftwareSecurePhotoVerification, SSOVerification, ManualVerification from .mo...
agpl-3.0
5,376,880,132,567,546,000
31.522388
117
0.682423
false
raptorjr/xbmc
tools/EventClients/Clients/Kodi Send/kodi-send.py
137
2576
#!/usr/bin/python # # XBMC Media Center # XBMC Send # Copyright (c) 2009 team-xbmc # # 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 la...
gpl-2.0
6,273,051,873,291,671,000
31.2
117
0.626165
false
arne-cl/pattern
examples/04-search/04-taxonomy.py
21
2576
import os, sys; sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "..")) from pattern.search import search, taxonomy, Classifier from pattern.en import parsetree # The search module includes a Taxonomy class # that can be used to define semantic word types. # For example, consider that you want to...
bsd-3-clause
-4,475,750,463,072,627,700
33.810811
87
0.734084
false
BabeNovelty/numpy
numpy/matrixlib/tests/test_defmatrix.py
130
14801
from __future__ import division, absolute_import, print_function import collections import numpy as np from numpy import matrix, asmatrix, bmat from numpy.testing import ( TestCase, run_module_suite, assert_, assert_equal, assert_almost_equal, assert_array_equal, assert_array_almost_equal, assert_raises ) fro...
bsd-3-clause
-982,530,936,337,568,400
31.964365
79
0.476792
false
lipis/hurry-app
main/lib/werkzeug/wrappers.py
298
76131
# -*- coding: utf-8 -*- """ werkzeug.wrappers ~~~~~~~~~~~~~~~~~ The wrappers are simple request and response objects which you can subclass to do whatever you want them to do. The request object contains the information transmitted by the client (webbrowser) and the response object contains al...
mit
-8,959,680,951,141,722,000
41.248058
86
0.632922
false
bdfoster/blumate
blumate/components/media_player/firetv.py
1
5532
""" Support for functionality to interact with FireTV devices. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/media_player.firetv/ """ import logging import requests from blumate.components.media_player import ( SUPPORT_NEXT_TRACK, SUPPORT_PAUSE, S...
mit
7,774,987,143,405,394,000
30.254237
77
0.584237
false
mckerrj/ansible
lib/ansible/playbook/become.py
63
4030
# (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,116,349,901,515,492,000
37.75
131
0.622829
false
VaneCloud/horizon
openstack_dashboard/dashboards/project/vpn/views.py
16
17540
# Copyright 2013, Mirantis 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 or agre...
apache-2.0
-3,615,785,928,309,226,000
39.508083
79
0.616534
false
0x46616c6b/ansible
lib/ansible/utils/module_docs_fragments/sros.py
40
2972
# # (c) 2015, Peter Sprygada <psprygada@ansible.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 late...
gpl-3.0
7,793,583,641,183,856,000
38.626667
83
0.70996
false
teltek/edx-platform
lms/djangoapps/bulk_email/tests/test_err_handling.py
4
17945
# -*- coding: utf-8 -*- """ Unit tests for handling email sending errors """ import json from itertools import cycle from smtplib import SMTPConnectError, SMTPDataError, SMTPServerDisconnected import ddt from celery.states import RETRY, SUCCESS from django.conf import settings from django.core.management import call_c...
agpl-3.0
-5,705,380,073,660,392,000
47.37027
117
0.64983
false
Learningtribes/edx-platform
cms/djangoapps/contentstore/views/tests/test_container_page.py
158
9232
""" Unit tests for the container page. """ import re import datetime from pytz import UTC from mock import patch, Mock from django.http import Http404 from django.test.client import RequestFactory from django.utils import http import contentstore.views.component as views from contentstore.views.tests.utils import Stu...
agpl-3.0
5,573,037,142,457,650,000
48.368984
115
0.645147
false
awkspace/ansible
test/integration/targets/setup_rpm_repo/files/create-repo.py
27
1369
#!/usr/bin/env python import sys from collections import namedtuple import rpmfluff RPM = namedtuple('RPM', ['name', 'version', 'release', 'epoch', 'recommends']) SPECS = [ RPM('foo', '1.0', '1', None, None), RPM('foo', '1.0', '2', '1', None), RPM('foo', '1.1', '1', '1', None), RPM('foo-bar', '1.0...
gpl-3.0
3,280,459,933,429,763,000
23.446429
102
0.549306
false
timwee/emacs-starter-kit-mr-flip-forked
vendor/rope/rope/refactor/change_signature.py
59
13280
import copy import rope.base.exceptions from rope.base import pyobjects, taskhandle, evaluate, worder, codeanalyze, utils from rope.base.change import ChangeContents, ChangeSet from rope.refactor import occurrences, functionutils class ChangeSignature(object): def __init__(self, project, resource, offset): ...
gpl-3.0
-2,235,266,998,422,630,100
37.830409
90
0.628313
false
lheadjh/MultimodalDeepLearning
ver_tensorflow/MM_RDN.py
1
8138
import tensorflow as tf import time import numpy as np import mdl_data import sys GPUNUM = sys.argv[1] FILEPATH = sys.argv[2] # Network Parameters learning_rate = 0.001 training_epochs = 20 batch_size = 32 display_step = 1 n_input_img = 4096 # YLI_MED image data input (data shape: 4096, fc7 layer output) n_hidden_1...
mit
4,356,958,475,522,413,000
41.831579
143
0.580118
false
Inspq/ansible
lib/ansible/modules/cloud/amazon/ec2_lc_find.py
27
7251
#!/usr/bin/python # encoding: utf-8 # (c) 2015, Jose Armesto <jose@armesto.net> # # This file is part of Ansible # # This module 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...
gpl-3.0
-724,435,630,799,785,600
30.526087
121
0.668597
false
sjsrey/pysal_core
pysal_core/io/IOHandlers/tests/test_arcgis_txt.py
2
2310
import unittest from ..arcgis_txt import ArcGISTextIO from ...FileIO import FileIO as psopen from .... import examples as pysal_examples import tempfile import os import warnings class test_ArcGISTextIO(unittest.TestCase): def setUp(self): self.test_file = test_file = pysal_examples.get_path('arcgis_txt.t...
bsd-3-clause
5,526,146,821,884,091,000
36.868852
129
0.609524
false
palladius/gcloud
packages/gsutil/boto/tests/unit/ec2/test_blockdevicemapping.py
10
4065
import mock import unittest from boto.ec2.blockdevicemapping import BlockDeviceType, BlockDeviceMapping class BlockDeviceTypeTests(unittest.TestCase): def setUp(self): self.block_device_type = BlockDeviceType() def check_that_attribute_has_been_set(self, name, value, attribute): self.block_de...
gpl-3.0
6,679,877,662,102,117,000
50.455696
92
0.651169
false
pgmillon/ansible
lib/ansible/modules/utilities/logic/async_wrapper.py
17
11406
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>, and others # 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 import json import...
gpl-3.0
-5,564,221,928,400,373,000
32.946429
120
0.572681
false
ride90/Booktype
lib/booktype/apps/themes/templatetags/themes.py
4
2019
import os from django import template from django.template.base import Template from django.conf import settings from ..utils import read_theme_info register = template.Library() @register.inclusion_tag('themes/list.html') def list_themes(): themes = [] for theme in os.listdir('{}/themes/'.format(settings...
agpl-3.0
2,597,111,593,812,577,000
34.421053
103
0.63051
false
rave-engine/rave
modules/sdl2/image.py
1
2325
""" Support for decoding image formats using SDL2_Image. """ import sdl2 import sdl2.ext import sdl2.sdlimage as sdl2image import rave.log import rave.events import rave.rendering import rave.resources from .common import fs_to_rwops ## Constants. FORMAT_NAMES = { sdl2image.IMG_INIT_JPG: 'JPEG', sdl2image...
bsd-2-clause
5,766,186,953,415,157,000
23.734043
123
0.64
false
robertmrk/json
doc/scripts/send_to_wandbox.py
13
3952
#! /usr/bin/env python # This script uploads a directory to Wandbox (http://melpon.org/wandbox), # which is an online compiler environment, and prints a permalink to the # uploaded code. We use this to provide a "Try it online" version of the # library to make the barrier to entry as low as possible. # # This script w...
mit
8,183,330,278,429,335,000
31.933333
80
0.629555
false
duqiao/django
tests/template_tests/filter_tests/test_join.py
362
2707
from django.template.defaultfilters import join from django.test import SimpleTestCase from django.utils.safestring import mark_safe from ..utils import setup class JoinTests(SimpleTestCase): @setup({'join01': '{{ a|join:", " }}'}) def test_join01(self): output = self.engine.render_to_string('join01...
bsd-3-clause
-3,270,942,013,611,398,000
38.808824
111
0.558182
false
qk4l/Flexget
flexget/plugins/list/sonarr_list.py
2
12588
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin from future.moves.urllib.parse import urlparse import json import logging from collections import MutableSet import requests from requests import RequestException from fl...
mit
-5,028,566,343,467,949,000
42.708333
120
0.564426
false
ctb/cvxpy
cvxpy/atoms/sum_squares.py
3
1060
""" Copyright 2013 Steven Diamond This file is part of CVXPY. CVXPY 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. CVXPY is distributed i...
gpl-3.0
4,354,399,535,047,573,000
28.444444
68
0.728302
false
Dipsomaniac/peewee
playhouse/tests/test_fields.py
1
25031
import decimal import sys from playhouse.tests.base import binary_construct from playhouse.tests.base import binary_types from playhouse.tests.base import database_class from playhouse.tests.base import ModelTestCase from playhouse.tests.base import PeeweeTestCase from playhouse.tests.base import test_db from playhous...
mit
-3,863,046,147,946,610,000
36.983308
129
0.575327
false
cloudera/hue
desktop/libs/indexer/src/indexer/api3.py
2
25066
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
apache-2.0
5,490,776,219,501,456,000
32.376831
135
0.627982
false
xuleiboy1234/autoTitle
tensorflow/tensorflow/python/training/sync_replicas_optimizer.py
21
20440
# 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...
mit
-6,671,076,421,537,229,000
41.057613
92
0.673973
false
tuxfux-hlp-notes/python-batches
archieves/batch-59/files/myvenv/lib/python2.7/site-packages/bs4/tests/test_html5lib.py
40
4908
"""Tests to ensure that the html5lib tree builder generates good trees.""" import warnings try: from bs4.builder import HTML5TreeBuilder HTML5LIB_PRESENT = True except ImportError, e: HTML5LIB_PRESENT = False from bs4.element import SoupStrainer from bs4.testing import ( HTML5TreeBuilderSmokeTest, ...
gpl-3.0
4,337,718,603,015,090,000
36.753846
120
0.592706
false
bk2204/urwid
urwid/vterm.py
7
50199
#!/usr/bin/python # # Urwid terminal emulation widget # Copyright (C) 2010 aszlig # Copyright (C) 2011 Ian Ward # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either #...
lgpl-2.1
6,376,640,285,197,280,000
30.063738
102
0.507042
false
hsharsha/depot_tools
third_party/logilab/common/ureports/__init__.py
92
6113
# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as publ...
bsd-3-clause
-504,883,267,061,044,540
34.540698
81
0.625879
false
theflofly/tensorflow
tensorflow/python/saved_model/saved_model_test.py
13
64354
# 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
-4,685,765,825,192,744,000
40.979126
80
0.652065
false
INNUENDOWEB/INNUca
src/SPAdes-3.10.1-Linux/share/spades/joblib3/pool.py
237
23894
"""Custom implementation of multiprocessing.Pool with custom pickler This module provides efficient ways of working with data stored in shared memory with numpy.memmap arrays without inducing any memory copy between the parent and child processes. This module should not be imported if multiprocessing is not available...
gpl-3.0
5,125,786,082,248,433,000
39.914384
79
0.638236
false
iansf/sky_engine
sky/engine/bindings/scripts/v8_interface.py
10
37056
# Copyright (C) 2013 Google Inc. All rights reserved. # coding=utf-8 # # 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 cond...
bsd-3-clause
7,076,869,308,599,565,000
40.688839
136
0.641841
false
2013Commons/hue
desktop/core/ext-py/guppy-0.1.10/guppy/heapy/AbstractAlgebra.py
37
22134
#._cv_part guppy.heapy.AbstractAlgebra class AA: def __mul__(self, other): return BOAPP('op', self, other) def __add__(self, other): return BOAPP('op2', self, other) def __eq__(self, other): return BOAPP('eq', self, other) class ANAME(AA): def __init__(self, name): self.name = name def __st...
apache-2.0
-9,202,449,624,984,824,000
25.86165
102
0.572468
false
Clinical-Genomics/scout
scout/parse/clinvar.py
1
7077
from scout.constants import CASEDATA_HEADER, CLINVAR_HEADER def set_submission_objects(form_fields): """Creates a list of submission objects (variant and case-data) from the clinvar submission form in blueprints/variants/clinvar.html. Args: form_fields(dict): it's the submission form dictionary. Key...
bsd-3-clause
-5,949,285,102,784,209,000
39.672414
160
0.643776
false
egroeper/exscript
tests/Exscript/util/ipv4Test.py
6
5830
import sys, unittest, re, os.path sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..', '..', 'src')) import Exscript.util.ipv4 class ipv4Test(unittest.TestCase): CORRELATE = Exscript.util.ipv4 def testIsIp(self): from Exscript.util.ipv4 import is_ip self.assert_(is_ip('0.0.0...
gpl-2.0
-6,117,024,372,295,993,000
43.846154
84
0.588336
false
j-carl/boto
tests/unit/provider/test_provider.py
79
17271
#!/usr/bin/env python from datetime import datetime, timedelta from tests.compat import mock, unittest import os from boto import provider from boto.compat import expanduser INSTANCE_CONFIG = { 'allowall': { u'AccessKeyId': u'iam_access_key', u'Code': u'Success', u'Expiration': u'2012-09...
mit
4,164,693,229,575,252,000
38.163265
82
0.574605
false
jkleckner/ansible
lib/ansible/utils/__init__.py
2
33093
# (c) 2012, 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) any lat...
gpl-3.0
7,386,212,359,328,656,000
33.507821
175
0.606714
false
plus1s/shadowsocks-py-mu
shadowsocks/common.py
1
9463
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2013-2015 clowwindy # # 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 requi...
apache-2.0
-8,311,106,795,231,677,000
29.824104
79
0.554264
false
acdha/django-inlines
tests/test_cases/test_forms.py
1
2649
from django import forms from django_inlines import registry from django_inlines.forms import InlineField from test_app.inlines import BasicInline from .test_common import InlinesTestCase __all__ = ('InlineFormTestCase',) class InlineForm(forms.Form): content = InlineField() class InlineFormTestCase(Inlines...
bsd-3-clause
8,158,168,632,421,033,000
29.102273
78
0.576821
false
tangp3/gpdb
gpMgmt/bin/gppylib/test/behave/mgmt_utils/steps/logger.py
19
4142
import os import glob from gppylib.test.behave_utils.utils import execute_sql_singleton master_data_dir = os.environ.get('MASTER_DATA_DIRECTORY') if master_data_dir is None: raise Exception('Please set MASTER_DATA_DIRECTORY in environment') def gp_fts_log_in_master_log_count(mdd): return gp_in_master_log_cou...
apache-2.0
-7,946,448,374,523,151,000
45.539326
190
0.700869
false
eljost/pysisyphus
tests/test_tsopt/test_augment_coordinates.py
1
1797
#!/usr/bin/env python3 import pytest from pysisyphus.calculators import Gaussian16 from pysisyphus.calculators.PySCF import PySCF from pysisyphus.helpers import geom_loader from pysisyphus.intcoords.augment_bonds import augment_bonds from pysisyphus.testing import using from pysisyphus.tsoptimizers.RSIRFOptimizer imp...
gpl-3.0
-2,627,943,169,444,563,000
22.96
84
0.621035
false
wolfchase/ardets
languages/ca.py
72
23910
# -*- coding: utf-8 -*- { '!langcode!': 'ca', '!langname!': 'Català', '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"actualizi" és una expressió opcional com "camp1=\'nou_valor\'". No es poden actualitzar o eliminar resultats de un JOIN', '%(nrows)s...
agpl-3.0
-9,117,458,141,969,799,000
47.123984
287
0.704228
false
lmazuel/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/__init__.py
5
4760
# 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
-2,408,470,291,235,816,400
53.090909
111
0.826471
false
rsmz/copyright
test/test_app.py
1
3137
import os import shlex import shutil import unittest from copyright import App, diffdir DATA_DIR = 'test/data' INPUT_DIR = os.path.join(DATA_DIR, 'input') TMP_DIR = os.path.join(DATA_DIR, 'tmp') TRUTH_DIR = os.path.join(DATA_DIR, 'truth') def datadir(suffix): return os.path.join(DATA_DIR, suffix) def inputdir(s...
gpl-3.0
4,959,677,255,177,370,000
28.59434
86
0.574115
false
PlayUAV/MissionPlanner
Lib/site-packages/numpy/matlib.py
90
9494
import numpy as np from numpy.matrixlib.defmatrix import matrix, asmatrix # need * as we're copying the numpy namespace from numpy import * __version__ = np.__version__ __all__ = np.__all__[:] # copy numpy namespace __all__ += ['rand', 'randn', 'repmat'] def empty(shape, dtype=None, order='C'): """ Return a ...
gpl-3.0
3,885,928,225,016,961,000
25.668539
78
0.548136
false
0x0FFF/gpdb
gpMgmt/bin/gpgenfsmap.py
21
8809
#!/usr/bin/env python # # Copyright (c) Greenplum Inc 2011. All Rights Reserved. ''' gpgenfsmap.py Generates a mapping of Servers, Filesystems, GPDB Filespaces and Storage Pools Options: -h, -?, --help Print this usage. -p --port Port to use to connect to DB. Defaults to $PGPORT -u --usernam...
apache-2.0
-7,523,166,970,313,452,000
30.801444
191
0.591214
false
ukanga/SickRage
lib/github/Authorization.py
72
7574
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # # Copyright 2012 Zearin <zearin@gonk.net> ...
gpl-3.0
7,462,027,532,667,574,000
40.845304
205
0.563507
false
BorgERP/borg-erp-6of3
l10n_coa/l10n_ve/__init__.py
975
1058
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify #...
agpl-3.0
-7,981,304,431,633,473,000
43.083333
78
0.606805
false
domob1812/crowncoin
share/qt/extract_strings_qt.py
4
1854
#!/usr/bin/python ''' Extract _("...") strings for translation and convert to Qt4 stringdefs so that they can be picked up by Qt linguist. ''' from subprocess import Popen, PIPE import glob import operator import os import sys OUT_CPP="qt/crownstrings.cpp" EMPTY=['""'] def parse_po(text): """ Parse 'po' forma...
mit
-1,577,936,703,969,365,500
22.769231
78
0.580906
false
pdufour/sqlalchemy
test/ext/test_automap.py
25
9295
from sqlalchemy.testing import fixtures from ..orm._fixtures import FixtureTest from sqlalchemy.ext.automap import automap_base from sqlalchemy.orm import relationship, interfaces, configure_mappers from sqlalchemy.ext.automap import generate_relationship from sqlalchemy.testing.mock import Mock from sqlalchemy import ...
mit
3,447,479,021,135,393,300
29.47541
78
0.588381
false
ModdedPA/android_external_chromium_org
tools/code_coverage/coverage_posix.py
24
48901
#!/usr/bin/env python # Copyright (c) 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. """Generate and process code coverage. TODO(jrg): rename this from coverage_posix.py to coverage_all.py! Written for and tested o...
bsd-3-clause
-8,956,306,287,541,675,000
37.626382
85
0.630682
false
w1ll1am23/home-assistant
tests/components/plex/test_device_handling.py
4
4613
"""Tests for handling the device registry.""" from homeassistant.components.media_player.const import DOMAIN as MP_DOMAIN from homeassistant.components.plex.const import DOMAIN async def test_cleanup_orphaned_devices(hass, entry, setup_plex_server): """Test cleaning up orphaned devices on startup.""" test_de...
apache-2.0
1,720,932,061,331,845,400
32.671533
178
0.651853
false
j0holo/library-management-system
app.py
1
2905
import os from flask import Flask, render_template, request from flask import redirect, url_for, flash from models import * app = Flask(__name__) app.config.from_object(__name__) app.config.update(dict( SECRET_KEY='development key', # USER='development', # PASSWORD='devpassword', # DATABASE='devdataba...
mit
5,563,933,589,229,781,000
30.923077
67
0.604475
false
pannal/Subliminal.bundle
Contents/Libraries/Shared/babelfish/converters/countryname.py
89
1077
# -*- coding: utf-8 -*- # # Copyright (c) 2013 the BabelFish authors. All rights reserved. # Use of this source code is governed by the 3-clause BSD license # that can be found in the LICENSE file. # from __future__ import unicode_literals from . import CountryReverseConverter, CaseInsensitiveDict from ..country import...
mit
-3,322,860,836,528,309,000
33.741935
65
0.675952
false
simpeg/simpegpf
simpegPF/MagAnalytics.py
1
9270
from scipy.constants import mu_0 from SimPEG import * from SimPEG.Utils import kron3, speye, sdiag import matplotlib.pyplot as plt def spheremodel(mesh, x0, y0, z0, r): """ Generate model indicies for sphere - (x0, y0, z0 ): is the center location of sphere - r: is the radius of the sphere...
mit
-3,600,238,555,182,845,000
32.345324
176
0.536462
false
tzewangdorje/SIPserv
Twisted-13.1.0/twisted/python/test/test_shellcomp.py
40
21795
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Test cases for twisted.python._shellcomp """ import sys from cStringIO import StringIO from twisted.trial import unittest from twisted.python import _shellcomp, usage, reflect from twisted.python.usage import Completions, Completer, Complete...
gpl-3.0
3,249,685,238,382,067,000
33.983949
79
0.580225
false
selboo/flask
flask/app.py
4
77447
# -*- coding: utf-8 -*- """ flask.app ~~~~~~~~~ This module implements the central WSGI application object. :copyright: (c) 2014 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import os import sys from threading import Lock from datetime import timedelta from itertools import...
bsd-3-clause
3,399,687,549,529,063,400
40.705439
87
0.610714
false
FRBs/FRB
frb/galaxies/defs.py
1
5973
""" Define allowed quantities for FRB galaxies Uncertainty is valid for any quantity with '_err' add-on, eg. W1_err Am also likely to add _flg for each as well """ ############################################################## # Redshift valid_z = [ 'z', # Preferred redshift, may derived from one of sev...
bsd-3-clause
235,458,209,254,382,900
30.109375
91
0.557174
false
pombredanne/moksha
moksha.wsgi/moksha/wsgi/middleware/middleware.py
2
13408
# This file is part of Moksha. # Copyright (C) 2008-2010 Red Hat, 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 b...
apache-2.0
5,438,465,302,729,183,000
40.639752
84
0.583085
false
rajatsingla28/electron
script/cpplint.py
7
2665
#!/usr/bin/env python import fnmatch import os import sys from lib.util import execute IGNORE_FILES = [ os.path.join('atom', 'browser', 'mac', 'atom_application.h'), os.path.join('atom', 'browser', 'mac', 'atom_application_delegate.h'), os.path.join('atom', 'browser', 'resources', 'win', 'resource.h'), os.pa...
mit
-6,434,344,421,986,235,000
38.191176
79
0.61576
false
tkurfurst/deep-learning
face_generation/Project 5 Submission - Face Generation/problem_unittests.py
159
6094
from copy import deepcopy from unittest import mock import tensorflow as tf def test_safe(func): """ Isolate tests """ def func_wrapper(*args): with tf.Graph().as_default(): result = func(*args) print('Tests Passed') return result return func_wrapper def _ass...
mit
-2,085,690,114,577,592,000
39.357616
106
0.649491
false
nikdoof/posmaster
posmaster/poscore/models/types.py
1
3205
from django.conf import settings from django.db import models class TypeCategory(models.Model): id = models.BigIntegerField('Type Category ID', primary_key=True) name = models.CharField('Type Category Name', max_length=200) class Meta: app_label = 'poscore' def __unicode__(self): ...
bsd-3-clause
1,949,149,812,083,210,200
31.383838
170
0.64337
false
alshedivat/tensorflow
tensorflow/python/data/experimental/kernel_tests/serialization/dataset_serialization_test_base.py
8
25450
# 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
1,122,318,445,096,203,500
35.777457
88
0.620472
false
Cadair/ginga
ginga/misc/tests/test_Callback.py
4
13315
# # Unit Tests for the Callbacks class # # Rajul Srivastava (rajul09@gmail.com) # import unittest import logging import numpy as np import ginga.misc.Callback as Callback class TestError(Exception): pass class TestCallbacks(unittest.TestCase): def setUp(self): pass def test_init(self): ...
bsd-3-clause
-6,372,071,660,071,805,000
28.787472
77
0.608487
false
jayansenaratne/aston
aston/trace/PyMS.py
3
3123
import numpy as np from pyms.GCMS.Class import GCMS_data, Scan, IonChromatogram class AstonPyMS(GCMS_data): """ Adapter to allow pyms routines to run on aston files. Note: initialization uses AstonFrame, not scan lists as in pyms. """ def __init__(self, data): self.data = data d...
gpl-3.0
-2,757,289,342,385,427,000
30.23
75
0.534422
false
FuturesFromYesterday/ardupilot
mk/PX4/Tools/genmsg/scripts/genmsg_check_deps.py
216
2999
#!/usr/bin/env python # Software License Agreement (BSD License) # # Copyright (c) 2014, Open Source Robotics Foundation, 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: # # * Redistribut...
gpl-3.0
-7,692,842,801,810,555,000
42.463768
129
0.751584
false
bboalimoe/ndn-cache-policy
docs/sphinx-contrib/napoleon/setup.py
1
1547
# -*- coding: utf-8 -*- # Copyright 2014 Rob Ruana # Licensed under the BSD License, see LICENSE file for details. """Sphinx "napoleon" extension.""" import sys from setuptools import setup, find_packages reqs = open('requirements.txt', 'r').read().strip().splitlines() reqs_test = open('requirements_test.txt', 'r')....
gpl-3.0
3,672,703,573,991,157,000
29.94
74
0.631545
false
caveman-dick/ansible
test/units/playbook/test_attribute.py
119
1823
# (c) 2015, Marius Gedminas <marius@gedmin.as> # # 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,532,477,629,778,790,000
32.759259
70
0.680746
false