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
fredwilliam/PMO
apps/hq/middleware/hq.py
3
2738
from __future__ import absolute_import from django.contrib.auth import authenticate from django.contrib.auth.models import User from hq.authentication import get_username_password from hq.utils import get_dates try: from threading import local except ImportError: from django.utils._threading_local import loca...
bsd-3-clause
-5,733,568,763,307,876,000
38.695652
75
0.643901
false
sebalix/OpenUpgrade
openerp/tools/float_utils.py
312
10296
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2011 OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GN...
agpl-3.0
-2,727,074,082,039,679,000
49.22439
98
0.650447
false
imk1/IMKTFBindingCode
getCellTypeSpecificDomainBoundaries.py
1
2787
import sys import argparse import gzip import math def parseArgument(): # Parse the input parser =\ argparse.ArgumentParser(description = "Get domain boundaries that are present in the 1st cell type but not in the 2nd") parser.add_argument("--cellTypeOneDomainsFileName", required=True, help='Domain boundaries ...
mit
8,918,017,699,157,882,000
44.688525
126
0.775386
false
guorendong/iridium-browser-ubuntu
native_client/pnacl/driver/shelltools.py
8
2070
#!/usr/bin/python # Copyright (c) 2012 The Native Client 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 driver_log import Log import types ###################################################################### # # Shell Utiliti...
bsd-3-clause
1,363,600,135,209,868,800
23.939759
73
0.511594
false
Drooids/odoo
addons/account_asset/wizard/account_asset_change_duration.py
258
5021
# -*- encoding: 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 t...
agpl-3.0
-3,193,045,290,903,390,700
43.830357
125
0.597889
false
if1live/pelican-plugins
extract_toc/extract_toc.py
28
1805
# -*- coding: utf-8 -*- """ Extract Table of Content ======================== A Pelican plugin to extract table of contents (ToC) from `article.content` and place it in its own `article.toc` variable for use in templates. """ from os import path from bs4 import BeautifulSoup from pelican import signals, readers, cont...
agpl-3.0
280,944,805,733,843,230
29.59322
106
0.643767
false
hujiajie/pa-chromium
chrome/test/functional/omnibox.py
65
15428
#!/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 glob import os import re import shutil import tempfile import urlparse import pyauto_functional # Must be imported before ...
bsd-3-clause
1,675,963,879,764,035,300
40.810298
80
0.694581
false
aaiyer/bugseverywhere
libbe/command/list.py
5
10809
# Copyright (C) 2005-2012 Aaron Bentley <abentley@panoramicfeedback.com> # Chris Ball <cjb@laptop.org> # Gianluca Montecchi <gian@grys.it> # Oleg Romanyshyn <oromanyshyn@panoramicfeedback.com> # Robert Lehmann <mail@robertle...
gpl-2.0
-3,966,256,480,652,344,000
41.892857
186
0.558794
false
alexforencich/python-ivi
ivi/tektronix/tektronixMSO5204B.py
1
1557
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2017 Alex Forencich 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 righ...
mit
3,777,026,336,843,986,400
36.97561
77
0.757225
false
simbha/mAngE-Gin
lib/Django 1.7/django/contrib/staticfiles/finders.py
106
9852
from collections import OrderedDict import os from django.apps import apps from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.files.storage import default_storage, Storage, FileSystemStorage from django.utils.functional import empty, LazyObject from django.utils.m...
mit
723,407,337,129,858,400
34.695652
103
0.587901
false
Kmayankkr/robocomp
tools/rcmonitor/someTest.py
5
1932
# -*- coding: utf-8 -*- # Copyright (C) 2010 by RoboLab - University of Extremadura # # This file is part of RoboComp # # RoboComp 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
6,752,904,597,666,087,000
32.310345
132
0.690994
false
binarytemple/ansible
plugins/inventory/rax.py
24
9460
#!/usr/bin/env python # (c) 2013, Jesse Keating <jesse.keating@rackspace.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 ...
gpl-3.0
-1,296,031,224,833,735,700
32.309859
94
0.621459
false
vmanoria/bluemix-hue-filebrowser
hue-3.8.1-bluemix/desktop/core/ext-py/Paste-2.0.1/paste/gzipper.py
50
3611
# (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org) # Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php # (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org) # Licensed under the MIT license: http://www.opensource.org/licens...
gpl-2.0
8,809,160,515,196,071,000
32.747664
84
0.629189
false
geertj/python-tdbus
examples/avahi.py
1
1381
#!/usr/bin/env python # # This file is part of python-tdbus. Python-tdbus is free software # available under the terms of the MIT license. See the file "LICENSE" that # was provided together with this source file for the licensing terms. # # Copyright (c) 2012 the python-tdbus authors. See the file "AUTHORS" for a # co...
mit
6,137,892,896,904,960,000
29.688889
85
0.708182
false
yajnab/android_kernel_samsung_msm7x27
tools/perf/scripts/python/sctop.py
895
1936
# system call top # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Periodically displays system-wide system call totals, broken down by # syscall. If a [comm] arg is specified, only syscalls called by # [comm] are displayed. If an [interval] arg is specified,...
gpl-2.0
-7,423,571,370,482,485,000
23.820513
75
0.654442
false
sajuptpm/manila
manila/tests/cmd/test_manage.py
2
15025
# Copyright 2015 Mirantis 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 a...
apache-2.0
-6,347,929,367,467,317,000
38.748677
79
0.6
false
Jc11235/Kekulean_Program
GUI_Version/Ubuntu_Version/DriverMethods.py
1
39406
from PerfectMatchingData import * from Face import * from Vertex import * from Graph import * from VertexList import * from Output import * from KekuleanMethods import * from Checkers import * from RequiredEdgeMethods import * from Tkinter import * from AppInformation import * from random import randint import time i...
gpl-2.0
-2,623,389,696,733,337,600
25.149303
232
0.68454
false
metacloud/python-novaclient
novaclient/v1_1/aggregates.py
15
3503
# Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
785,053,637,061,543,800
35.873684
79
0.611761
false
StratusLab/client
api/code/src/main/python/stratuslab/HttpClient.py
1
9858
# # Created as part of the StratusLab project (http://stratuslab.eu), # co-funded by the European Commission under the Grant Agreement # INFSO-RI-261552." # # Copyright (c) 2011, SixSq Sarl # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Lice...
apache-2.0
6,699,662,071,350,455,000
37.964427
117
0.589268
false
FireWRT/OpenWrt-Firefly-Libraries
staging_dir/host/lib/python3.4/lib2to3/fixes/fix_dict.py
24
3811
# Copyright 2007 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Fixer for dict methods. d.keys() -> list(d.keys()) d.items() -> list(d.items()) d.values() -> list(d.values()) d.iterkeys() -> iter(d.keys()) d.iteritems() -> iter(d.items()) d.itervalues() -> iter(d.values()) d.v...
gpl-2.0
1,508,504,386,872,051,500
34.616822
78
0.562582
false
frinksdev/mini4chan
konnichiwa/settings.py
1
2675
""" Django settings for konnichiwa project. Generated by 'django-admin startproject' using Django 1.8.3. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build p...
mit
-7,391,342,945,598,178,000
24.970874
71
0.689346
false
dianshen/python_day
day7/a/getfile.py
1
1625
#!/usr/bin/env python3 __author__ = 'DSOWASP' import socket import os import hashlib ip_port = ('127.0.0.1',9999) sk = socket.socket() sk.connect(ip_port) while True: cmd_input = input("cmd> ") # print("发送:%s"%cmd) cmd,fname = cmd_input.split() if os.path.exists(fname): ftell = os.path.gets...
apache-2.0
-9,071,279,650,714,440,000
24.52381
57
0.453018
false
Insoleet/aiohttp
aiohttp/web_exceptions.py
12
6892
from .web_reqrep import Response __all__ = ( 'HTTPException', 'HTTPError', 'HTTPRedirection', 'HTTPSuccessful', 'HTTPOk', 'HTTPCreated', 'HTTPAccepted', 'HTTPNonAuthoritativeInformation', 'HTTPNoContent', 'HTTPResetContent', 'HTTPPartialContent', 'HTTPMultipleChoices', ...
apache-2.0
6,278,832,781,174,916,000
22.522184
78
0.648578
false
jurajmajor/ltl3tela
Experiments/ltlcross_runner.py
1
23078
# -*- coding: utf-8 -*- import subprocess import sys import os.path import re import math import spot from IPython.display import SVG from datetime import datetime import pandas as pd from experiments_lib import hoa_to_spot, dot_to_svg, pretty_print def bogus_to_lcr(form): """Converts a formula as it is printed in...
gpl-3.0
497,926,085,071,383,360
35.515823
114
0.533928
false
gbowerman/azurerm
azurerm/resourcegroups.py
1
4056
'''resourcegroups.py - azurerm functions for Resource Groups.''' import json from .restfns import do_delete, do_get, do_post, do_put from .settings import get_rm_endpoint, RESOURCE_API def create_resource_group(access_token, subscription_id, rgname, location): '''Create a resource group in the specified location....
mit
1,837,027,315,200,992,000
33.666667
75
0.592949
false
samesense/tools
py/uniprotTxt.py
1
5230
"""Getting uniprot txt files for proteins parsing them loading parsed data.""" import os, time, sys import files from collections import defaultdict def parseProteinName(protein): with open(mkTxtFile(protein)) as f: for line in f: # DE RecName: Full=Fatty acid synthase; if l...
mit
-5,001,790,490,913,616,000
36.092199
111
0.57782
false
dragosbdi/p2pool
SOAPpy/SOAPBuilder.py
289
22852
""" ################################################################################ # Copyright (c) 2003, Pfizer # Copyright (c) 2001, Cayce Ullman. # Copyright (c) 2001, Brian Matthews. # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provid...
gpl-3.0
4,260,291,081,987,510,300
34.265432
102
0.498687
false
JonnyWong16/plexpy
lib/maxminddb/file.py
3
1988
"""For internal use only. It provides a slice-like file reader.""" import os try: # pylint: disable=no-name-in-module from multiprocessing import Lock except ImportError: from threading import Lock class FileBuffer(object): """A slice-able file reader""" def __init__(self, database): s...
gpl-3.0
6,269,692,394,049,382,000
29.121212
77
0.572435
false
dagwieers/ansible
lib/ansible/modules/packaging/os/svr4pkg.py
95
7684
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Boyd Adamson <boyd () boydadamson.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...
gpl-3.0
3,475,664,016,510,982,700
28.106061
147
0.624414
false
alexandrandronescu/autorobot
curs.py
1
2038
import sys import datetime import requests def check_arguments(argv): date1 = date2 = None today = datetime.datetime.now().date() if len(argv)==1: date1 = datetime.date(year=datetime.datetime.now().date().year, month=datetime.datetime.now().date().month, day=1) date2 = today try: if len(argv)>1: if argv...
gpl-2.0
-6,973,143,538,955,363,000
26.917808
130
0.685476
false
gaddman/ansible
lib/ansible/module_utils/vmware.py
3
42109
# -*- coding: utf-8 -*- # Copyright: (c) 2015, Joseph Callen <jcallen () csc.com> # Copyright: (c) 2018, 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 import atexit impo...
gpl-3.0
6,227,202,465,816,956,000
35.176117
138
0.581325
false
heke123/chromium-crosswalk
third_party/WebKit/Source/build/scripts/make_cssom_types.py
6
1588
#!/usr/bin/env python # Copyright 2016 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 sys import css_properties import in_generator from name_utilities import enum_for_css_keyword import template_expander class ...
bsd-3-clause
-2,059,179,192,311,746,600
30.137255
72
0.602645
false
srsman/odoo
openerp/osv/fields.py
45
75006
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 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
296,074,843,118,288,640
40.462687
228
0.562422
false
a-parhom/edx-platform
common/lib/capa/capa/tests/test_answer_pool.py
37
27075
""" Tests the logic of the "answer-pool" attribute, e.g. <choicegroup answer-pool="4"> """ import unittest import textwrap from capa.tests.helpers import test_capa_system, new_loncapa_problem from capa.responsetypes import LoncapaProblemError class CapaAnswerPoolTest(unittest.TestCase): """Capa Answer Pool Tes...
agpl-3.0
5,500,496,429,524,710,000
40.589862
138
0.527424
false
ahu-odoo/odoo
addons/account_voucher/report/__init__.py
378
1083
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
4,969,069,067,367,116,000
44.125
78
0.619575
false
leppa/home-assistant
homeassistant/components/auth/__init__.py
3
17184
"""Component to allow users to login and get tokens. # POST /auth/token This is an OAuth2 endpoint for granting tokens. We currently support the grant types "authorization_code" and "refresh_token". Because we follow the OAuth2 spec, data should be send in formatted as x-www-form-urlencoded. Examples will be in JSON ...
apache-2.0
-4,940,339,518,614,416,000
29.740608
87
0.611383
false
flask-admin/flask-admin
flask_admin/model/form.py
17
7221
import inspect import warnings from flask_admin.form import BaseForm, rules from flask_admin._compat import iteritems from wtforms.fields import HiddenField from wtforms.fields.core import UnboundField from wtforms.validators import InputRequired from .widgets import XEditableWidget def converts(*args): def _in...
bsd-3-clause
5,434,799,259,979,292,000
27.541502
110
0.560449
false
whitehorse-io/encarnia
pyenv/lib/python2.7/site-packages/twisted/words/protocols/jabber/sasl_mechanisms.py
13
8730
# -*- test-case-name: twisted.words.test.test_jabbersaslmechanisms -*- # # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Protocol agnostic implementations of SASL authentication mechanisms. """ from __future__ import absolute_import, division import binascii, random, time, os from hashlib...
mit
-7,009,249,901,378,975,000
28.795222
78
0.544101
false
ScradFTW/WhoSampledMyLib
WhoSampledScraper.py
1
6314
""" File: WhoSampledScraper.py Author: Brad Jobe Version: 0.0.1 Scrapes relevant HTML content from an artist's track page """ import sys import eyed3 import urllib2 from lxml import html import httplib import json class WhoSampledScraper: URL_WHOSAMPLED = "www.whosampled.com" HTTP_PROTO = "http://" HTTP_...
gpl-2.0
762,494,732,954,445,000
30.57
79
0.59376
false
brandsoulmates/incubator-airflow
tests/contrib/hooks/test_jira_hook.py
44
1616
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
apache-2.0
-8,556,632,761,569,997,000
30.686275
76
0.674505
false
andyvand/Arduino-1
arduino-core/src/processing/app/i18n/python/requests/packages/charade/chardistribution.py
168
9153
######################## 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...
lgpl-2.1
5,227,694,397,582,705,000
38.795652
79
0.626461
false
cloudera/hue
desktop/core/ext-py/SQLAlchemy-1.3.17/test/dialect/test_sqlite.py
2
82848
#!coding: utf-8 """SQLite-specific tests.""" import datetime import json import os from sqlalchemy import and_ from sqlalchemy import bindparam from sqlalchemy import CheckConstraint from sqlalchemy import Column from sqlalchemy import column from sqlalchemy import Computed from sqlalchemy import create_engine from s...
apache-2.0
-256,495,146,527,662,500
31.463166
79
0.48939
false
icereval/osf.io
addons/gitlab/models.py
1
14594
# -*- coding: utf-8 -*- import os import urlparse from django.db import models import markupsafe from addons.base import exceptions from addons.base.models import (BaseOAuthNodeSettings, BaseOAuthUserSettings, BaseStorageAddon) from addons.gitlab import utils from addons.gitlab.api imp...
apache-2.0
153,512,257,335,121,280
31.943567
119
0.550158
false
toabctl/osc
tests/test_revertfiles.py
15
3281
import osc.core import osc.oscerr import os from common import OscTestCase FIXTURES_DIR = os.path.join(os.getcwd(), 'revertfile_fixtures') def suite(): import unittest return unittest.makeSuite(TestRevertFiles) class TestRevertFiles(OscTestCase): def _get_fixtures_dir(self): return FIXTURES_DIR ...
gpl-2.0
6,173,838,704,352,916,000
32.824742
78
0.587626
false
theoryno3/pylearn2
pylearn2/utils/tests/test_video.py
44
2040
"""Tests for pylearn2.utils.video""" import numpy from theano.compat import six from pylearn2.compat import OrderedDict from pylearn2.utils.video import FrameLookup, spatiotemporal_cubes __author__ = "David Warde-Farley" __copyright__ = "Copyright 2011, David Warde-Farley / Universite de Montreal" __license__ = "BSD" ...
bsd-3-clause
-6,163,109,224,304,883,000
34.172414
78
0.617157
false
tiborsimko/zenodo
tests/unit/auditor/test_records.py
6
13412
# -*- coding: utf-8 -*- # # This file is part of Zenodo. # Copyright (C) 2016 CERN. # # Zenodo 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 v...
gpl-2.0
-510,509,355,662,428,600
33.30179
79
0.604682
false
drpngx/tensorflow
tensorflow/python/client/device_lib.py
42
1459
# 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
6,409,628,989,750,781,000
33.738095
80
0.706648
false
openstack/python-zaqarclient
zaqarclient/auth/__init__.py
1
1268
# Copyright (c) 2013 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 by applicable law or agreed to in writ...
apache-2.0
-6,660,981,345,585,998,000
29.190476
69
0.710568
false
palerdot/calibre
src/calibre/library/database2.py
4
164046
from __future__ import with_statement __license__ = 'GPL v3' __copyright__ = '2008, Kovid Goyal kovid@kovidgoyal.net' __docformat__ = 'restructuredtext en' ''' The database used to store ebook metadata ''' import os, sys, shutil, cStringIO, glob, time, functools, traceback, re, \ json, uuid, hashlib, copy, t...
gpl-3.0
-4,160,373,880,737,587,000
41.966475
149
0.526724
false
robovm/robovm-studio
python/helpers/profiler/thriftpy3/transport/TSSLSocket.py
44
8264
# # 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
-6,509,770,429,480,545,000
35.405286
79
0.630203
false
Deepak345/al-go-rithms
cryptography/steganography/python/steganography.py
3
4403
import getopt import math import os import struct import sys import wave def hide(sound_path, file_path, output_path, num_lsb): sound = wave.open(sound_path, "r") params = sound.getparams() num_channels = sound.getnchannels() sample_width = sound.getsampwidth() num_frames = sound.getnframes()...
mit
6,823,887,267,313,183,000
30.676259
76
0.551442
false
tashaxe/Red-DiscordBot
lib/youtube_dl/extractor/brightcove.py
2
30054
# coding: utf-8 from __future__ import unicode_literals import re import json from .common import InfoExtractor from ..compat import ( compat_etree_fromstring, compat_parse_qs, compat_str, compat_urllib_parse_urlparse, compat_urlparse, compat_xml_parse_error, compat_HTTPError, ) from ..uti...
gpl-3.0
2,646,579,848,236,509,700
42.674419
484
0.52739
false
horazont/aioxmpp
aioxmpp/ibr/service.py
1
5326
######################################################################## # File name: service.py # This file is part of: aioxmpp # # LICENSE # # This program 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 Foundati...
lgpl-3.0
-6,274,695,310,275,401,000
28.588889
79
0.619414
false
nakagami/reportlab
tests/test_pdfgen_links.py
1
6833
#Copyright ReportLab Europe Ltd. 2000-2012 #this test and associates functionality kinds donated by Ian Sparks. #see license.txt for license details """ Tests for internal links and destinations """ __version__='''$Id: test_pdfgen_links.py 3959 2012-09-27 14:39:39Z robin $''' from reportlab.lib.testutils import setOutD...
bsd-3-clause
5,419,041,058,837,564,000
35.345745
121
0.629153
false
anarchivist/pyflag
src/plugins/PreCanned/Basic.py
2
5709
""" These are PreCanned Reports. PreCanned Reports are the PyFlag equivalent of the google 'Im Feeling Lucky' feature - we basically just dump out some simple queries which are used to get you started. """ import pyflag.Reports as Reports import pyflag.conf config=pyflag.conf.ConfObject() import pyflag.Registry as Re...
gpl-2.0
-4,786,494,579,017,481,000
38.372414
148
0.606236
false
mozilla-services/data-pipeline
reports/stability-summary/utils.py
4
1274
import boto3 from gzip import GzipFile from cStringIO import StringIO import sys import csv class S3CompressedWriter(object): def __init__(self, bucket, path, mimetype='text/plain'): self.bucket = bucket self.path = path self.mimetype = mimetype self._buffer = None def __enter_...
mpl-2.0
427,980,651,294,834,200
29.333333
119
0.617739
false
bringsvor/account-financial-tools
__unported__/async_move_line_importer/model/move_line_importer.py
36
14197
# -*- coding: utf-8 -*- ############################################################################## # # Author: Nicolas Bessi # Copyright 2013 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # publi...
agpl-3.0
5,626,602,854,330,952,000
36.360526
80
0.513348
false
BrighterCommand/Brightside
brightside/dispatch.py
1
14030
""" File : dispatch.py Author : ian Created : 04-21-2017 Last Modified By : ian Last Modified On : 04-21-2017 *********************************************************************** The MIT License (MIT) Copyright © 2017 Ian Cooper <ian_hammond_cooper@yahoo.co.uk> Permission is hereby g...
mit
5,254,343,536,259,278,000
45.736667
132
0.669353
false
silly-wacky-3-town-toon/SOURCE-COD
Panda3D-1.10.0/direct/directscripts/extract_docs.py
8
10595
""" This script generates a pandadoc.hpp file representing the Python wrappers that can be parsed by doxygen to generate the Python documentation. You need to run this before invoking Doxyfile.python. It requires a valid makepanda installation with interrogatedb .in files in the lib/pandac/input directory. """ __all_...
apache-2.0
-3,074,245,126,152,500,000
34.434783
145
0.5916
false
wkoathp/glance
glance/db/sqlalchemy/migrate_repo/versions/022_image_member_index.py
17
3573
# Copyright 2013 Red Hat, 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
-5,340,895,149,612,231,000
36.21875
78
0.616289
false
bepitulaz/huntingdimana
env/Lib/site-packages/pip/_vendor/requests/packages/chardet/chardetect.py
1786
2504
#!/usr/bin/env python """ Script which takes one or more file paths and reports on their detected encodings Example:: % chardetect somefile someotherfile somefile: windows-1252 with confidence 0.5 someotherfile: ascii with confidence 1.0 If no paths are provided, it takes its input from stdin. """ from...
gpl-3.0
1,460,198,814,240,796,200
30.3
79
0.610224
false
citrix-openstack/build-ryu
ryu/tests/integrated/test_add_flow_v12_actions.py
5
15350
# Copyright (C) 2012 Nippon Telegraph and Telephone Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
apache-2.0
7,543,494,267,174,587,000
32.29718
69
0.589967
false
snnn/tensorflow
tensorflow/python/debug/cli/tensor_format.py
44
20447
# 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,937,003,642,828,927,000
34.934974
80
0.652516
false
postlund/home-assistant
homeassistant/components/google_travel_time/sensor.py
5
10356
"""Support for Google travel time sensors.""" from datetime import datetime, timedelta import logging import googlemaps import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ( ATTR_ATTRIBUTION, ATTR_LATITUDE, ATTR_LONGITUDE, CONF_API_KEY, ...
apache-2.0
6,775,675,279,985,126,000
30.099099
86
0.58314
false
40223123/raven
static/Brython3.1.1-20150328-091302/Lib/site-packages/pygame/constants.py
603
15297
#!/usr/bin/env python '''Constants defined by SDL, and needed in pygame. Note that many of the flags for SDL are not needed in pygame, and are not included here. These constants are generally accessed from the `pygame.locals` module. This module is automatically placed in the pygame namespace, but you will usually ...
gpl-3.0
-950,879,821,729,361,800
40.909589
78
0.525463
false
wrouesnel/ansible
lib/ansible/modules/network/cloudengine/ce_bfd_session.py
16
20563
#!/usr/bin/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 distribut...
gpl-3.0
-7,757,325,635,414,255,000
32.112721
117
0.569615
false
chrisseto/osf.io
osf/models/metaschema.py
10
2428
# -*- coding: utf-8 -*- from django.db import models import jsonschema from website.util import api_v2_url from osf.models.base import BaseModel, ObjectIDMixin from osf.utils.datetime_aware_jsonfield import DateTimeAwareJSONField from osf.exceptions import ValidationValueError from website.project.metadata.utils imp...
apache-2.0
5,339,462,156,627,602,000
30.128205
100
0.637974
false
AdamWill/python-fedora
doc/conf.py
5
5294
# -*- coding: utf-8 -*- # # Python Fedora Module documentation build configuration file, created by # sphinx-quickstart on Mon Jun 9 08:12:44 2008. # # This file is execfile()d with the current directory set to its containing # dir. # The contents of this file are pickled, so don't put values in the namespace # that ...
gpl-2.0
3,380,028,354,636,738,000
29.425287
79
0.714583
false
liukaijv/XlsxWriter
xlsxwriter/test/comparison/test_chart_font05.py
8
1869
############################################################################### # # 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
-4,101,676,926,928,358,400
25.323944
79
0.523274
false
namecoin/namecoin-core
test/get_previous_releases.py
25
9262
#!/usr/bin/env python3 # # Copyright (c) 2018-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Download or build previous releases. # Needs curl and tar to download a release, or the build depend...
mit
9,163,755,023,043,592,000
39.445415
112
0.655906
false
bussiere/pypyjs
website/demo/home/rfk/repos/pypy/lib-python/2.7/dumbdbm.py
251
8820
"""A dumb and slow but simple dbm clone. For database spam, spam.dir contains the index (a text file), spam.bak *may* contain a backup of the index (also a text file), while spam.dat contains the data (a binary file). XXX TO DO: - seems to contain a bug when updating... - reclaim free space (currently, space once o...
mit
4,915,030,171,117,929,000
34.28
78
0.59093
false
DEVELByte/incubator-airflow
airflow/contrib/sensors/gcs_sensor.py
4
2452
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
apache-2.0
-6,198,963,205,383,858,000
37.3125
110
0.670065
false
ga7g08/sympy
sympy/physics/vector/tests/test_output.py
117
2594
from sympy import S from sympy.physics.vector import Vector, ReferenceFrame, Dyadic from sympy.utilities.pytest import raises Vector.simp = True A = ReferenceFrame('A') def test_output_type(): A = ReferenceFrame('A') v = A.x + A.y d = v | v zerov = Vector(0) zerod = Dyadic(0) # dot products ...
bsd-3-clause
8,322,091,404,888,139,000
33.131579
63
0.642251
false
gangadharkadam/stfrappe
frappe/modules/utils.py
39
4119
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe, os import frappe.modules from frappe.utils import cstr from frappe.modules import export_doc, get_module_path, scrub def listfolders(path, only_name=0): """ ...
mit
-775,023,721,281,391,400
25.403846
90
0.655013
false
fhe-odoo/odoo
addons/purchase_requisition/wizard/bid_line_qty.py
374
1711
# -*- 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
-3,396,066,193,690,468,400
44.026316
115
0.628872
false
aronysidoro/django-angular
djangular/views/mixins.py
16
5168
# -*- coding: utf-8 -*- import json import warnings from django.core.serializers.json import DjangoJSONEncoder from django.http import HttpResponse, HttpResponseBadRequest, HttpResponseForbidden def allow_remote_invocation(func, method='auto'): """ All methods which shall be callable through a given Ajax 'act...
mit
754,901,389,400,723,200
44.734513
162
0.647059
false
Eddy0402/Environment
vim/ycmd/cpp/ycm/tests/gmock/test/gmock_test_utils.py
769
3684
#!/usr/bin/env python # # Copyright 2006, 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
-2,333,054,393,106,732,000
31.892857
79
0.739957
false
quanhua92/learning-notes
libs/wxpython/design/mvc.py
1
3804
import wx class ModelInterface(object): """"Defines an interface for a simple value generator model""" def __init__(self): super(ModelInterface, self).__init__() self.value = 0 self.observers = list() def Generate(self): """Interface method to be implemented by subclasses...
apache-2.0
7,011,881,947,008,723,000
25.234483
75
0.602261
false
richardotis/scipy
scipy/odr/models.py
113
4659
""" Collection of Model instances for use with the odrpack fitting package. """ from __future__ import division, print_function, absolute_import import numpy as np from scipy.odr.odrpack import Model __all__ = ['Model', 'exponential', 'multilinear', 'unilinear', 'quadratic', 'polynomial'] def _lin_fcn(B,...
bsd-3-clause
-1,072,080,834,890,045,700
24.320652
77
0.527366
false
SOKP/external_chromium_org
tools/telemetry/telemetry/value/summary.py
58
6381
# 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 collections import defaultdict from telemetry.value import failure from telemetry.value import merge_values from telemetry.value import skip class Su...
bsd-3-clause
7,461,314,517,576,428,000
38.147239
79
0.67889
false
ayseyo/oclapi
django-nonrel/ocl/mappings/tests.py
1
46964
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ import os from unittest import skip from urlparse import urlparse from django.contrib.auth.models import User from django.contrib.conten...
mpl-2.0
-7,807,986,652,242,528,000
39.451335
152
0.617366
false
ajose01/rethinkdb
test/rql_test/connections/http_support/werkzeug/contrib/iterio.py
147
10718
# -*- coding: utf-8 -*- r""" werkzeug.contrib.iterio ~~~~~~~~~~~~~~~~~~~~~~~ This module implements a :class:`IterIO` that converts an iterator into a stream object and the other way round. Converting streams into iterators requires the `greenlet`_ module. To convert an iterator into a stream...
agpl-3.0
-6,228,348,602,934,988,000
29.976879
78
0.564844
false
denny820909/builder
lib/python2.7/site-packages/python_dateutil-1.5-py2.7.egg/dateutil/tz.py
270
32741
""" Copyright (c) 2003-2007 Gustavo Niemeyer <gustavo@niemeyer.net> This module offers extensions to the standard python 2.3+ datetime module. """ __author__ = "Gustavo Niemeyer <gustavo@niemeyer.net>" __license__ = "PSF License" import datetime import struct import time import sys import os relativedelta = None pa...
mit
4,681,741,642,012,700,000
33.427971
77
0.491708
false
fuzeman/Catalytic
deluge/ui/console/commands/help.py
8
3063
# help.py # # Copyright (C) 2008-2009 Ido Abramovich <ido.deluge@gmail.com> # Copyright (C) 2009 Andrew Resch <andrewresch@gmail.com> # # Deluge is free software. # # You may redistribute it and/or modify it under the terms of the # GNU General Public License, as published by the Free Software # Foundation; either vers...
gpl-3.0
8,266,724,967,275,697,000
38.779221
105
0.652628
false
tcffisher/namebench
libnamebench/better_webbrowser.py
175
4191
#!/usr/bin/env python # 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...
apache-2.0
-7,149,999,936,689,766,000
30.238462
93
0.644953
false
aesteve/vertx-web
vertx-web/src/test/sockjs-protocol/ws4py/__init__.py
4
2689
# -*- 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 conditions and the following disclaimer. # * ...
apache-2.0
3,067,784,132,048,281,600
39.134328
90
0.716995
false
yyamano/RESTx
src/python/restxclient/restx_resource.py
2
5575
""" RESTx: Sane, simple and effective data publishing and integration. Copyright (C) 2010 MuleSoft Inc. http://www.mulesoft.com 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...
gpl-3.0
4,342,963,468,616,502,300
30.676136
137
0.575964
false
provaleks/o8
addons/report_webkit/__init__.py
382
1593
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2010 Camptocamp SA (http://www.camptocamp.com) # All Right Reserved # # Author : Nicolas Bessi (Camptocamp) # # WARNING: This program as such is intended to be used by professional # programmers who...
agpl-3.0
-7,497,249,088,537,903,000
37.853659
80
0.699309
false
openstack/vitrage
vitrage/evaluator/actions/priority_tools.py
1
1972
# Copyright 2016 - Nokia # # 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, sof...
apache-2.0
-6,377,092,506,443,881,000
31.866667
75
0.713489
false
jasonmccampbell/scipy-refactor
scipy/sparse/linalg/dsolve/linsolve.py
8
9161
from warnings import warn from numpy import asarray from scipy.sparse import isspmatrix_csc, isspmatrix_csr, isspmatrix, \ SparseEfficiencyWarning, csc_matrix import _superlu noScikit = False try: import scikits.umfpack as umfpack except ImportError: import umfpack noScikit = True isUmfpack = ha...
bsd-3-clause
-4,836,208,291,962,912,000
31.371025
82
0.606484
false
Skoda091/alfred-deepl
lib/urllib3/fields.py
288
5943
from __future__ import absolute_import import email.utils import mimetypes from .packages import six def guess_content_type(filename, default='application/octet-stream'): """ Guess the "Content-Type" of a file. :param filename: The filename to guess the "Content-Type" of using :mod:`mimetypes`. ...
mit
3,889,735,669,155,261,400
32.38764
88
0.589096
false
xidui/shadowsocks
shadowsocks/crypto/table.py
1044
8108
# !/usr/bin/env python # # Copyright 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 required by applicable law or...
apache-2.0
6,492,421,710,571,807,000
45.597701
79
0.546374
false
PennyQ/glue-3d-viewer
glue_vispy_viewers/extern/vispy/scene/cameras/turntable.py
20
5029
# -*- coding: utf-8 -*- # Copyright (c) 2015, Vispy Development Team. # Distributed under the (new) BSD License. See LICENSE.txt for more info. from __future__ import division import numpy as np from .perspective import Base3DRotationCamera class TurntableCamera(Base3DRotationCamera): """ 3D camera class that ...
bsd-2-clause
7,358,991,475,045,603,000
32.526667
79
0.583217
false
benesch/pip
pip/_vendor/requests/packages/urllib3/util/connection.py
365
4744
from __future__ import absolute_import import socket try: from select import poll, POLLIN except ImportError: # `poll` doesn't exist on OSX and other platforms poll = False try: from select import select except ImportError: # `select` doesn't exist on AppEngine. select = False def is...
mit
7,948,240,712,715,729,000
31.944444
82
0.636172
false
kevinlondon/httpie
httpie/output/formatters/xml.py
51
1959
from __future__ import absolute_import import re from xml.etree import ElementTree from httpie.plugins import FormatterPlugin DECLARATION_RE = re.compile('<\?xml[^\n]+?\?>', flags=re.I) DOCTYPE_RE = re.compile('<!DOCTYPE[^\n]+?>', flags=re.I) DEFAULT_INDENT = 4 def indent(elem, indent_text=' ' * DEFAULT_INDENT):...
bsd-3-clause
-6,741,550,168,998,341,000
31.114754
78
0.533435
false
tmenjo/cinder-2015.1.1
cinder/flow_utils.py
6
2961
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
apache-2.0
5,150,556,213,102,259,000
36.961538
79
0.645728
false
Maistho/CouchPotatoServer
couchpotato/core/media/_base/media/main.py
65
21493
from datetime import timedelta import time import traceback from string import ascii_lowercase from CodernityDB.database import RecordNotFound, RecordDeleted from couchpotato import tryInt, get_db from couchpotato.api import addApiView from couchpotato.core.event import fireEvent, fireEventAsync, addEvent from couchpo...
gpl-3.0
-9,063,155,015,253,226,000
35.803082
221
0.520821
false
TeamEOS/external_chromium_org_third_party_WebKit
Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/handshake/__init__.py
658
4406
# Copyright 2011, 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 f...
bsd-3-clause
3,617,459,003,068,414,000
39.054545
76
0.72197
false
openstack/python-magnumclient
magnumclient/common/utils.py
1
11677
# -*- coding: utf-8 -*- # # Copyright 2012 OpenStack LLC. # 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....
apache-2.0
7,353,442,693,384,339,000
36.306709
189
0.525649
false
bgxavier/nova
nova/objects/compute_node.py
8
15378
# 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 agreed...
apache-2.0
1,963,370,426,602,458,400
41.716667
79
0.600533
false