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
carlgao/lenga
images/lenny64-peon/usr/share/python-support/python-boto/boto/mashups/iobject.py
1
3829
# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modi...
mit
1,570,360,777,822,867,200
35.122642
81
0.496735
false
Johnzero/OE7
openerp/tests/addons/test_exceptions/models.py
66
1289
# -*- coding: utf-8 -*- import openerp class m(openerp.osv.osv.Model): """ This model exposes a few methods that will raise the different exceptions that must be handled by the server (and its RPC layer) and the clients. """ _name = 'test.exceptions.model' def generate_except_osv(self,...
agpl-3.0
-2,888,763,919,281,270,000
38.060606
73
0.678045
false
PriceChild/ansible
lib/ansible/playbook/__init__.py
83
4214
# (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
8,616,186,036,846,378,000
37.66055
151
0.65757
false
hardikvasa/hadoop-mapreduce-examples-python
wikipedia-link-analysis-mapper.py
1
2412
#!/usr/bin/env python import sys #Finding 'Next Link' on a given web page def get_next_link(s): start_link = s.find("href=") if start_link == -1: #If no links are found then give an error! end_quote = 0 link = "no_links" return link, end_quote else: start_quote = s.find('...
mit
-4,714,606,465,048,378,000
34.470588
144
0.458955
false
nicholedwight/nichole-theme
node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/pygments/lexers/__init__.py
194
7698
# -*- coding: utf-8 -*- """ pygments.lexers ~~~~~~~~~~~~~~~ Pygments lexers. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import sys import types import fnmatch from os.path import basename from pygments.lexers._mapping import LEX...
mit
-8,878,389,779,602,692,000
31.075
78
0.606521
false
mancoast/CPythonPyc_test
fail/313_inspect_fodder2.py
179
1419
# line 1 def wrap(foo=None): def wrapper(func): return func return wrapper # line 7 def replace(func): def insteadfunc(): print('hello') return insteadfunc # line 13 @wrap() @wrap(wrap) def wrapped(): pass # line 19 @replace def gone(): pass # line 24 oll = lambda m: m # lin...
gpl-3.0
4,341,780,835,083,855,400
11.783784
34
0.574348
false
c0defreak/python-for-android
python3-alpha/python3-src/Lib/test/test_shelve.py
57
5834
import unittest import shelve import glob from test import support from collections import MutableMapping from test.test_dbm import dbm_iterator def L1(s): return s.decode("latin-1") class byteskeydict(MutableMapping): "Mapping that supports bytes keys" def __init__(self): self.d = {} def __...
apache-2.0
-462,987,647,590,080,800
26.63981
79
0.547325
false
CydarLtd/ansible
lib/ansible/modules/network/f5/bigip_facts.py
72
62015
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2013, Matt Hite <mhite@hotmail.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 Licens...
gpl-3.0
5,554,660,032,333,886,000
34.826112
152
0.669612
false
Endika/odoo
addons/pos_restaurant/__openerp__.py
311
2001
# -*- 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,351,212,885,976,346,600
34.732143
87
0.610695
false
foursquare/commons-old
src/python/twitter/common/process/process_handle.py
1
3405
from twitter.common.string import ScanfParser try: from twitter.common import log except ImportError: log = None class ProcessHandle(object): """ ProcessHandle interface. Methods that must be exposed by whatever process monitoring mechanism you use. """ def cpu_time(self): """ Total cpu ...
apache-2.0
-2,695,666,637,005,427,000
24.795455
88
0.637298
false
3nids/QGIS
tests/src/python/test_qgsvirtuallayertask.py
45
2761
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsVirtualLayerTask. .. 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 version. "...
gpl-2.0
-8,576,063,644,585,989,000
30.306818
143
0.665699
false
myyc/kleptes
kleptes/utils.py
1
1213
import re import fnmatch import pandas as pd # three days EXPIRE = 259200 def get_re(pattern): if type(pattern) == str: return re.compile(fnmatch.translate(pattern), flags=re.IGNORECASE) elif type(pattern) == list: return re.compile("|".join(fnmatch.translate(pattern)), ...
bsd-3-clause
5,641,726,763,178,444,000
28.585366
78
0.538335
false
poo12138/gem5-stable
tests/configs/memtest-ruby.py
9
4768
# Copyright (c) 2006-2007 The Regents of The University of Michigan # Copyright (c) 2010 Advanced Micro Devices, 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 co...
bsd-3-clause
6,916,875,054,849,422,000
34.58209
79
0.725671
false
safwanrahman/kitsune
kitsune/sumo/parser.py
3
13902
from os.path import basename from urlparse import urlparse, parse_qs from django.conf import settings from django.template.loader import render_to_string from django.utils.translation import ugettext_lazy as _lazy, ugettext as _ from wikimarkup.parser import Parser, ALLOWED_TAGS from kitsune.gallery.models import Im...
bsd-3-clause
-5,325,667,262,851,893,000
34.829897
89
0.593656
false
jsirois/commons
src/python/twitter/common/http/server.py
14
9449
# ================================================================================================== # Copyright 2011 Twitter, Inc. # -------------------------------------------------------------------------------------------------- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use thi...
apache-2.0
-5,641,198,486,026,316,000
33.111913
100
0.642925
false
JioCloud/python-cinderclient
cinderclient/v2/volume_backups.py
3
3500
# Copyright (C) 2013 Hewlett-Packard Development Company, L.P. # 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/LICEN...
apache-2.0
3,863,971,726,914,929,700
34.353535
78
0.612286
false
danielpalomino/gem5
src/arch/x86/isa/insts/x87/arithmetic/round.py
91
2152
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implemen...
bsd-3-clause
-1,137,598,383,774,321,300
52.8
72
0.794145
false
jgao54/airflow
airflow/contrib/sensors/cassandra_record_sensor.py
10
2616
# -*- 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
-2,203,097,266,985,969,200
41.885246
88
0.649465
false
sander76/home-assistant
tests/components/plant/test_init.py
5
7945
"""Unit tests for platform/plant.py.""" from datetime import datetime, timedelta import pytest from homeassistant.components import recorder import homeassistant.components.plant as plant from homeassistant.const import ( ATTR_UNIT_OF_MEASUREMENT, CONDUCTIVITY, LIGHT_LUX, STATE_OK, STATE_PROBLEM, ...
apache-2.0
66,090,326,809,871,010
32.523207
88
0.670107
false
MiltosD/CEF-ELRC
lib/python2.7/site-packages/dateutil/rrule.py
254
40402
""" Copyright (c) 2003-2010 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 itertools import datetime import calendar import thread import sys __all__ = ["...
bsd-3-clause
8,075,573,408,892,014,000
35.829535
78
0.441018
false
xybu/onedrived-dev
onedrived/od_models/webhook_notification.py
1
1902
""" webhook_notification.py Implementation of the datatypes used in OneDrive webhook notification, which is absent from official OneDrive Python SDK. :copyright: (c) Xiangyu Bu <xybu92@live.com> :license: MIT """ from .. import od_dateutils class WebhookNotification: """ https://dev.onedrive.com/resources/web...
mit
-463,664,225,693,993,400
26.171429
107
0.611462
false
pchauncey/ansible
lib/ansible/utils/shlex.py
267
1279
# (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
3,650,002,082,809,812,000
36.617647
70
0.723221
false
littlstar/chromium.src
content/test/gpu/page_sets/pixel_tests.py
8
1531
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry.page import page as page_module from telemetry.page import page_set as page_set_module class PixelTestsPage(page_module.Page): def __init_...
bsd-3-clause
-2,598,130,516,210,049,500
30.895833
79
0.667538
false
Acehaidrey/incubator-airflow
airflow/providers/google/cloud/hooks/spanner.py
8
16842
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
apache-2.0
-4,474,946,784,366,127,000
40.688119
106
0.634604
false
dhimmel/networkx
networkx/algorithms/tests/test_dominating.py
54
1348
from nose.tools import assert_equal, assert_true, assert_false, raises import networkx as nx def test_dominating_set(): G = nx.gnp_random_graph(100, 0.1) D = nx.dominating_set(G) assert_true(nx.is_dominating_set(G, D)) D = nx.dominating_set(G, start_with=0) assert_true(nx.is_dominating_set(G, D)) ...
bsd-3-clause
-6,188,709,717,742,941,000
31.878049
70
0.632047
false
mats116/ElasticBigQuery
boilerplate/external/wtforms/widgets/core.py
67
8340
from __future__ import unicode_literals from cgi import escape from wtforms.compat import text_type, string_types, iteritems __all__ = ( 'CheckboxInput', 'FileInput', 'HiddenInput', 'ListWidget', 'PasswordInput', 'RadioInput', 'Select', 'SubmitInput', 'TableWidget', 'TextArea', 'TextInput', 'Option' ) ...
lgpl-3.0
1,902,533,277,260,915,000
30.119403
133
0.607194
false
oandrew/home-assistant
homeassistant/components/sensor/gpsd.py
17
3323
""" Support for GPSD. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.gpsd/ """ import logging import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ( ATTR_LATITUDE, ATTR_LONGITUD...
mit
3,871,411,049,771,975,700
28.936937
74
0.647307
false
satsumas/prop
qtree.py
1
1595
""" A presentation layer for generating LaTeX Qtree output. """ import copy class Qtree(object): r""" A qtree is rendered as a root with some branches: ROOT / \ b1 b2 ... """ def __init__(self, root, branches=[]): """ @arg root: A string which is rendered as "ROOT" in t...
gpl-3.0
-3,044,048,850,495,132,700
23.166667
114
0.508464
false
zstars/weblabdeusto
server/src/test/unit/voodoo/test_mapper.py
2
10712
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2005 onwards University of Deusto # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # # This software consists of contributions made by many individuals, # list...
bsd-2-clause
5,450,862,786,891,106,000
26.966057
112
0.542153
false
clinton-hall/nzbToMedia
core/configuration.py
1
31372
# coding=utf-8 from __future__ import ( absolute_import, division, print_function, unicode_literals, ) import copy import os import shutil from itertools import chain import configobj from six import iteritems import core from core import logger class Section(configobj.Section, object): def is...
gpl-3.0
6,405,671,275,729,568,000
51.72605
155
0.514121
false
kidaa/bttext
menu.py
2
1342
import curses import textout from textout import btText import init import sys menuTitle = "/\\\\ Menue //\\" MENU_W = 55 def btExit(): init.quit() sys.exit() def btContinue(): pass menuList = [[str(btText("Continue")), btContinue], [str(btText("Quit")), btExit]] def drawMenu(menuWin, choic...
gpl-3.0
-5,658,269,793,648,252,000
23.851852
77
0.531297
false
mancoast/CPythonPyc_test
cpython/220_test_rfc822.py
3
7109
import rfc822 import sys import test_support import unittest try: from cStringIO import StringIO except ImportError: from StringIO import StringIO class MessageTestCase(unittest.TestCase): def create_message(self, msg): return rfc822.Message(StringIO(msg)) def test_get(self): msg = s...
gpl-3.0
8,565,799,358,025,396,000
34.193069
83
0.500774
false
kyleabeauchamp/fah-projects
code/setup_siegetank.py
1
1472
import base64 import os import gzip import siegetank system_name = "src" # Need a more secure way to store and load this. my_token = os.environ["SIEGETANK_TOKEN"] siegetank.login(my_token) RUNS_PATH = "/home/kyleb/src/choderalab/FAHNVT/%s/RUNS_NPT/RUN0/" % system_name opts = {'description': '%s NPT v2.0 In this pr...
gpl-2.0
6,737,872,478,654,668,000
36.74359
278
0.712636
false
zhoulingjun/django
tests/migrations/test_multidb.py
366
6909
import unittest from django.db import connection, migrations, models from django.db.migrations.state import ProjectState from django.test import override_settings from .test_operations import OperationTestBase try: import sqlparse except ImportError: sqlparse = None class AgnosticRouter(object): """ ...
bsd-3-clause
3,954,476,294,860,432,400
38.706897
114
0.65364
false
CEG-FYP-OpenStack/scheduler
nova/tests/unit/objects/test_virt_cpu_topology.py
94
1397
# 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
2,026,322,758,000,711,000
29.369565
78
0.670007
false
adityacs/ansible
lib/ansible/modules/network/ios/ios_vrf.py
12
11615
#!/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
-4,542,315,242,505,959,400
30.5625
87
0.615755
false
gregdek/ansible
lib/ansible/modules/network/f5/bigip_dns_zone.py
14
19409
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2018, F5 Networks Inc. # 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
-2,672,616,355,518,562,000
30.55935
102
0.599361
false
dhenrygithub/QGIS
python/plugins/processing/algs/qgis/RectanglesOvalsDiamondsFixed.py
2
8734
# -*- coding: utf-8 -*- """ *************************************************************************** RectanglesOvalsDiamondsFixed.py --------------------- Date : April 2016 Copyright : (C) 2016 by Alexander Bruy Email : alexander dot bruy at gmail dot co...
gpl-2.0
-1,428,433,036,978,362,000
41.604878
109
0.52038
false
aehernandez/HyperSpace
src/python/simple_server.py
1
4104
from asyncio import coroutine from random import randint from autobahn.asyncio.wamp import ApplicationSession, ApplicationRunner from autobahn.wamp.types import PublishOptions import asyncio from threading import Thread as Process # helpfer function to get the current time import time millis = lambda: int(round(time....
gpl-3.0
-7,781,333,583,104,019,000
33.487395
97
0.593567
false
wanglongqi/sympy
sympy/polys/polyfuncs.py
45
7823
"""High-level polynomials manipulation functions. """ from __future__ import print_function, division from sympy.polys.polytools import ( poly_from_expr, parallel_poly_from_expr, Poly) from sympy.polys.polyoptions import allowed_flags from sympy.polys.specialpolys import ( symmetric_poly, interpolating_poly)...
bsd-3-clause
-3,816,648,009,680,345,600
24.154341
78
0.522562
false
nuagenetworks/monolithe
monolithe/generators/lang/html/__init__.py
2
1817
# -*- coding: utf-8 -*- # # Copyright (c) 2015, Alcatel-Lucent 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 # no...
bsd-3-clause
4,738,950,472,709,294,000
55.78125
86
0.772702
false
tanmaykm/edx-platform
common/djangoapps/heartbeat/views.py
199
1440
from xmodule.modulestore.django import modulestore from dogapi import dog_stats_api from util.json_request import JsonResponse from django.db import connection from django.db.utils import DatabaseError from xmodule.exceptions import HeartbeatFailure @dog_stats_api.timed('edxapp.heartbeat') def heartbeat(request): ...
agpl-3.0
453,238,477,756,084,900
42.636364
110
0.735417
false
abhattad4/Digi-Menu
tests/generic_views/test_edit.py
7
19270
from __future__ import unicode_literals import warnings from django import forms from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import reverse from django.test import TestCase, ignore_warnings, override_settings from django.test.client import RequestFactory from django.utils.dep...
bsd-3-clause
5,681,551,002,099,737,000
44.023364
109
0.627348
false
ceb8/astroquery
astroquery/eso/tests/test_eso.py
2
3190
# Licensed under a 3-clause BSD style license - see LICENSE.rst import os from ...utils.testing_tools import MockResponse from ...eso import Eso DATA_DIR = os.path.join(os.path.dirname(__file__), 'data') def data_path(filename): return os.path.join(DATA_DIR, filename) DATA_FILES = {'GET': {'http://archive.eso...
bsd-3-clause
-406,680,061,219,885,400
32.229167
83
0.601881
false
douban/dpark
dpark/tracker.py
1
3549
from __future__ import absolute_import import socket import zmq import time from dpark.utils import spawn from dpark.utils.log import get_logger logger = get_logger(__name__) class TrackerMessage(object): pass class StopTrackerMessage(TrackerMessage): pass class SetValueMessage(TrackerMessage): def ...
bsd-3-clause
4,826,804,039,000,284,000
23.818182
68
0.540434
false
jazztpt/edx-platform
common/djangoapps/cors_csrf/views.py
100
2533
"""Views for enabling cross-domain requests. """ import logging import json from django.conf import settings from django.views.decorators.cache import cache_page from django.http import HttpResponseNotFound from edxmako.shortcuts import render_to_response from cors_csrf.models import XDomainProxyConfiguration log = l...
agpl-3.0
-3,882,984,223,998,796,300
34.180556
87
0.701934
false
hzlf/openbroadcast.org
website/tools/crispy_forms_extra/layout.py
2
3726
import itertools from django.conf import settings from django.utils.html import conditional_escape from crispy_forms.layout import LayoutObject, Div from crispy_forms.utils import render_field TEMPLATE_PACK = getattr(settings, "CRISPY_TEMPLATE_PACK", "bootstrap") class Row(Div): """ Layout object. It wraps...
gpl-3.0
8,791,349,595,175,512,000
28.338583
94
0.539989
false
ulikoehler/Translatron
Translatron/DocumentImport/PMC.py
1
8545
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from ctypes import c_bool import tarfile import functools import time from bs4 import BeautifulSoup, Comment, NavigableString from Translatron import DocumentDB from ansicolor import black, red from multiprocessing import Process, Queue __author__ = "Uli Köhler" __copyrig...
apache-2.0
-4,562,295,550,364,699,000
39.103286
127
0.62538
false
soltanmm/grpc
tools/run_tests/package_targets.py
2
5961
#!/usr/bin/env python2.7 # Copyright 2016, 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 lis...
bsd-3-clause
-6,375,277,807,041,498,000
31.396739
86
0.645194
false
monetate/sqlalchemy
test/orm/test_assorted_eager.py
3
37238
"""Exercises for eager loading. Derived from mailing list-reported problems and issue tracker issues. These are generally very old 0.1-era tests and at some point should be cleaned up and modernized. """ import datetime import sqlalchemy as sa from sqlalchemy import ForeignKey from sqlalchemy import Integer from sq...
mit
5,380,686,086,458,474,000
26.935484
81
0.478329
false
Antiun/odoo
addons/report_webkit/ir_report.py
382
3807
# -*- 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
-2,078,224,039,800,062,000
41.775281
115
0.618072
false
Gillu13/scipy
scipy/integrate/tests/test_integrate.py
55
22040
# Authors: Nils Wagner, Ed Schofield, Pauli Virtanen, John Travers """ Tests for numerical integration. """ from __future__ import division, print_function, absolute_import import numpy as np from numpy import (arange, zeros, array, dot, sqrt, cos, sin, eye, pi, exp, allclose) from scipy._lib.six i...
bsd-3-clause
-2,432,375,167,295,492,000
27.623377
79
0.517514
false
mlperf/training_results_v0.6
NVIDIA/benchmarks/minigo/implementations/tensorflow/minigo/go.py
3
19698
# Copyright 2018 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
-7,699,979,487,338,243,000
35.410351
136
0.572038
false
SteveHNH/ansible
lib/ansible/modules/cloud/openstack/os_user_role.py
19
6456
#!/usr/bin/python # Copyright (c) 2016 IBM # # 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, or # (at your option) any later version. # # This software is distrib...
gpl-3.0
-2,995,776,905,505,989,000
28.345455
84
0.606103
false
hanselke/erpnext-1
erpnext/controllers/trends.py
52
10972
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import getdate from frappe import _ def get_columns(filters, trans): validate_filters(filters) # get conditions for ...
agpl-3.0
-4,773,345,097,846,961,000
40.403774
137
0.651021
false
j0nathan33/CouchPotatoServer
couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/noco.py
8
3451
# encoding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( ExtractorError, unified_strdate, compat_str, ) class NocoIE(InfoExtractor): _VALID_URL = r'http://(?:(?:www\.)?noco\.tv/emission/|player\.noco\.tv/\?idvideo=)(?P<id>\d+)' ...
gpl-3.0
2,772,724,932,580,152,000
31.566038
101
0.50681
false
arjen75/ics-lge-kernel-msm7x27-chick
scripts/rt-tester/rt-tester.py
1094
5362
#!/usr/bin/python # # rt-mutex tester # # (C) 2006 Thomas Gleixner <tglx@linutronix.de> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # import os import sys import getopt import sh...
gpl-2.0
-1,076,204,268,462,995,800
23.153153
70
0.4931
false
lmazuel/azure-sdk-for-python
azure-batch/azure/batch/models/pool_enable_auto_scale_parameter.py
1
2432
# 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
19,574,977,377,429,890
50.744681
101
0.691201
false
biddisco/VTK
Examples/Modelling/Python/iceCream.py
42
3209
#!/usr/bin/env python # This example demonstrates how to use boolean combinations of implicit # functions to create a model of an ice cream cone. import vtk from vtk.util.colors import chocolate, mint # Create implicit function primitives. These have been carefully # placed to give the effect that we want. We are go...
bsd-3-clause
8,230,570,398,219,161,000
32.778947
72
0.797756
false
tlainevool/eatspection
data/test/sql/test_restaurant_storage.py
1
1208
import unittest import sqlite3 from data.db_creation.sql.restaurant_table_creator import RestaurantTableCreator from data.sql.restaurant_storage import RestaurantStorage from model.restaurant import Restaurant class TestRestaurantStorage(unittest.TestCase): def test_insert(self): conn = sqlite3.connect(...
mit
-1,368,013,360,033,927,200
30.789474
80
0.68543
false
abdesslem/CTF
models.py
2
1692
from flask_login import LoginManager, UserMixin, login_user, logout_user, current_user, login_required from werkzeug.security import generate_password_hash, check_password_hash import ctf class User(UserMixin, ctf.db.Model): __tablename__ = 'users' id = ctf.db.Column(ctf.db.Integer, primary_key=True) user...
mit
-2,522,082,746,328,095,000
36.6
102
0.671986
false
kennethgillen/ansible
lib/ansible/modules/system/pam_limits.py
27
9407
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Sebastien Rohaut <sebastien.rohaut@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 ...
gpl-3.0
2,106,161,059,254,063,600
29.150641
152
0.564367
false
qdubious/gitinspector
gitinspector/config.py
51
2939
# coding: utf-8 # # Copyright © 2013 Ejwa Software. All rights reserved. # # This file is part of gitinspector. # # gitinspector 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
-7,404,699,094,824,358,000
31.285714
86
0.707965
false
benoit-pierre/mcomix
mcomix/run.py
1
10893
import os import sys import optparse import signal if __name__ == '__main__': print >> sys.stderr, 'PROGRAM TERMINATED' print >> sys.stderr, 'Please do not run this script directly! Use mcomixstarter.py instead.' sys.exit(1) # These modules must not depend on GTK, pkg_resources, PIL, # or any other optio...
gpl-2.0
3,233,235,799,261,299,700
39.344444
102
0.611861
false
mahak/neutron
neutron/privileged/__init__.py
2
2057
# 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
6,366,701,652,925,159,000
31.140625
78
0.658726
false
girving/tensorflow
tensorflow/compiler/xla/python_api/types.py
32
4874
# 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
3,917,400,625,018,636,300
36.206107
79
0.641157
false
x111ong/odoo
addons/mass_mailing/wizard/mail_compose_message.py
308
3066
# -*- coding: utf-8 -*- from openerp.osv import osv, fields class MailComposeMessage(osv.TransientModel): """Add concept of mass mailing campaign to the mail.compose.message wizard """ _inherit = 'mail.compose.message' _columns = { 'mass_mailing_campaign_id': fields.many2one( 'ma...
agpl-3.0
-8,904,949,689,629,844,000
47.666667
132
0.537508
false
nkgilley/home-assistant
homeassistant/components/point/binary_sensor.py
6
4199
"""Support for Minut Point binary sensors.""" import logging from homeassistant.components.binary_sensor import DOMAIN, BinarySensorEntity from homeassistant.core import callback from homeassistant.helpers.dispatcher import async_dispatcher_connect from . import MinutPointEntity from .const import DOMAIN as POINT_DOM...
apache-2.0
2,099,998,685,352,348,000
33.418033
85
0.605859
false
exploreodoo/datStruct
odoo/addons/delivery/partner.py
383
1404
# -*- 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...
gpl-2.0
-3,467,257,176,574,875,000
36.945946
81
0.613248
false
yfried/ansible
lib/ansible/modules/packaging/os/apt.py
5
41284
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2012, Flowroute LLC # Written by Matthew Williams <matthew@flowroute.com> # Based on yum module written by Seth Vidal <skvidal at fedoraproject.org> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ ...
gpl-3.0
-3,064,797,345,723,659,000
36.259928
166
0.599361
false
skulbrane/theHarvester
discovery/jigsaw.py
23
1810
import string import httplib import sys import myparser import re # http://www.jigsaw.com/SearchAcrossCompanies.xhtml?opCode=refresh&rpage=4&mode=0&cnCountry=&order=0&orderby=0&cmName=accuvant&cnDead=false&cnExOwned=false&count=0&screenNameType=0&screenName=&omitScreenNameType=0&omitScreenName=&companyI...
gpl-2.0
8,071,374,779,891,091,000
32.518519
291
0.58674
false
tchernomax/ansible
lib/ansible/modules/network/cloudengine/ce_vxlan_arp.py
43
23695
#!/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,760,761,099,591,170,000
34.631579
106
0.564423
false
deschler/django-invitation
examples/invitation_project/settings.py
9
1139
import os ROOT_PATH = os.path.dirname(__file__) TEMPLATE_DEBUG = DEBUG = True MANAGERS = ADMINS = () DATABASE_ENGINE = 'sqlite3' DATABASE_NAME = os.path.join(ROOT_PATH, 'testdb.sqlite') TIME_ZONE = 'America/Chicago' LANGUAGE_CODE = 'en-us' SITE_ID = 1 USE_I18N = True MEDIA_ROOT = '' MEDIA_URL = '' ADMIN_MEDIA_PREFIX ...
bsd-3-clause
5,647,314,124,918,474,000
26.119048
67
0.708516
false
t794104/ansible
test/units/modules/network/cnos/test_cnos_vlan.py
34
7341
# (c) 2018 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 # (at your option) any later version. # # Ansible is dis...
gpl-3.0
824,720,680,502,605,200
34.293269
93
0.476638
false
madecoste/swarming
appengine/components/third_party/webtest/forms.py
5
18091
# -*- coding: utf-8 -*- """Helpers to fill and submit forms.""" import re from bs4 import BeautifulSoup from webtest.compat import OrderedDict from webtest import utils class NoValue(object): pass class Upload(object): """ A file to upload:: >>> Upload('filename.txt', 'data', 'application/oct...
apache-2.0
1,169,888,044,773,338,400
29.303183
81
0.530651
false
drewandersonnz/openshift-tools
openshift/installer/vendored/openshift-ansible-3.9.14-1/roles/openshift_health_checker/test/rpm_version_test.py
56
2120
import pytest import rpm_version expected_pkgs = { "spam": { "name": "spam", "version": "3.2.1", }, "eggs": { "name": "eggs", "version": "3.2.1", }, } @pytest.mark.parametrize('pkgs, expect_not_found', [ ( {}, ["spam", "eggs"], # none found ), ...
apache-2.0
-3,789,549,750,415,228,000
24.853659
80
0.463208
false
rsvip/Django
tests/defer_regress/models.py
104
2530
""" Regression tests for defer() / only() behavior. """ from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Item(models.Model): name = models.CharField(max_length=15) text = models.TextField(default="xyzzy") value = models.IntegerF...
bsd-3-clause
-7,968,890,323,187,302,000
22.867925
76
0.709091
false
lpatmo/actionify_the_news
open_connect/accounts/forms.py
1
8077
"""Forms for accounts app.""" # pylint: disable=no-init,no-self-use from django import forms from django.contrib.admin import widgets from django.contrib.auth.models import Group as AuthGroup from django.contrib.auth.models import Permission from django.core.exceptions import ObjectDoesNotExist, ValidationError from d...
mit
1,889,501,589,167,671,600
31.179283
79
0.617804
false
teamtuga4/teamtuga4ever.repository
plugin.video.pancas/resources/lib/resolvers/veehd.py
23
1650
# -*- coding: utf-8 -*- ''' Specto Add-on Copyright (C) 2015 lambda This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any l...
gpl-2.0
-6,774,160,881,720,890,000
32.673469
91
0.623636
false
Omicia/omicia_api_examples
python/ClinicalReportLaunchers/get_clinical_report.py
1
1764
"""Get a clinical report, either with extended information or not. Example usages: python get_clinical_report.py 1801 python get_clinical_report.py 1801 --e true """ import os import requests from requests.auth import HTTPBasicAuth import sys import simplejson as json import argparse # Load environment variables fo...
mit
-7,455,890,711,401,982,000
29.947368
83
0.706916
false
EDUlib/edx-platform
common/lib/xmodule/xmodule/course_module.py
1
63430
""" Django module container for classes and operations related to the "Course Module" content type """ import json import logging from datetime import datetime, timedelta from io import BytesIO import dateutil.parser import requests from django.conf import settings from django.core.validators import validate_email f...
agpl-3.0
2,391,367,830,114,978,300
38.299876
152
0.625524
false
rapidhere/open-hackathon
open-hackathon-client/src/client/user/__init__.py
24
1396
# -*- coding: utf-8 -*- # # ----------------------------------------------------------------------------------- # Copyright (c) Microsoft Open Technologies (Shanghai) Co. Ltd. All rights reserved. # # The MIT License (MIT) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this s...
mit
8,028,966,512,500,729,000
50.703704
85
0.66404
false
dev-burbrink/pydslice
pydslice/pydslice_debugger.py
1
1921
# pydslice_debugger.py # # Generic definitions for debuggers # # Copyright (C) 2016 Josh Burbrink <dev.burbrink@gmail.com> # # Debug level for printing DEBUG_PRINT_LEVEL_ALWAYS = 0 DEBUG_PRINT_LEVEL_ERROR = 1 DEBUG_PRINT_LEVEL_WARNING = 2 DEBUG_PRINT_LEVEL_INFO = 3 DEBUG_PRINT_LEVEL_VERBOSE = 4 debug_print_leve...
lgpl-3.0
-3,329,584,799,689,905,000
23.0125
66
0.665799
false
jkoelker/ryu
ryu/services/protocols/bgp/processor.py
10
17632
# Copyright (C) 2014 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
867,387,820,462,354,400
33.37037
79
0.646325
false
felliott/waterbutler
waterbutler/providers/owncloud/metadata.py
6
2005
from waterbutler.core import metadata class BaseOwnCloudMetadata(metadata.BaseMetadata): def __init__(self, href, folder, attributes=None): super(BaseOwnCloudMetadata, self).__init__(None) self.attributes = attributes or {} self._folder = folder self._href = href @property ...
apache-2.0
797,860,850,550,939,300
23.753086
80
0.646883
false
Greennut/ostproject
django/contrib/gis/gdal/geomtype.py
404
2967
from django.contrib.gis.gdal.error import OGRException #### OGRGeomType #### class OGRGeomType(object): "Encapulates OGR Geometry Types." wkb25bit = -2147483648 # Dictionary of acceptable OGRwkbGeometryType s and their string names. _types = {0 : 'Unknown', 1 : 'Point', 2 ...
bsd-3-clause
-2,462,721,071,313,192,000
33.905882
79
0.545332
false
nguy/PyDisdrometer
pydsd/aux_readers/read_2ds.py
3
4909
# -*- coding: utf-8 -*- import csv import datetime import itertools import numpy as np import numpy.ma as ma import scipy.optimize from pytmatrix.psd import GammaPSD from ..DropSizeDistribution import DropSizeDistribution from ..io import common def read_2ds(filename, campaign="acapex"): """Read a airborne 2DS...
lgpl-2.1
-9,098,578,180,517,143,000
28.932927
112
0.572825
false
flingone/frameworks_base_cmds_remoted
libs/boost/tools/build/test/searched_lib.py
6
5114
#!/usr/bin/python # Copyright 2003 Dave Abrahams # Copyright 2003, 2004, 2005, 2006 Vladimir Prus # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) # Test usage of searched-libs: one which are found via -l # switch to...
apache-2.0
-8,000,546,567,578,115,000
25.945355
81
0.649198
false
magic0704/neutron
neutron/tests/unit/db/test_l3_ha_db.py
2
23196
# Copyright (C) 2014 eNovance SAS <licensing@enovance.com> # # 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
-2,977,304,822,947,264,500
42.03525
79
0.591697
false
jimsimon/sky_engine
tools/linux/dump-static-initializers.py
83
8354
#!/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. """Dump functions called by static intializers in a Linux Release binary. Usage example: tools/linux/dump-static-intializers.py ...
bsd-3-clause
4,002,819,070,943,530,000
34.700855
80
0.651424
false
TRESCLOUD/odoopub
addons/website_event/models/event.py
45
5258
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
agpl-3.0
-2,661,502,856,299,208,700
42.098361
119
0.567136
false
eino-makitalo/mezzanine
mezzanine/blog/management/commands/import_rss.py
34
2878
from __future__ import unicode_literals from datetime import timedelta from optparse import make_option from time import timezone try: from urllib.request import urlopen from urllib.parse import urljoin except ImportError: from urllib import urlopen from urlparse import urljoin from django.core.manage...
bsd-2-clause
-4,426,785,809,485,929,500
36.376623
77
0.572967
false
Lujeni/ansible
lib/ansible/plugins/filter/gcp_kms_filters.py
21
3679
# (c) 2019, Eric Anderson <eric.sysmin@gmail.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Usage: # vars: # encrypted_myvar: "{{ var | b64encode | gcp_kms_encrypt(auth_kind='serviceaccount', # service_account_file='gcp_service_account_file', p...
gpl-3.0
-6,952,466,465,060,042,000
39.877778
99
0.632509
false
ESOedX/edx-platform
openedx/core/djangoapps/credentials/signals.py
1
6507
""" This file contains signal handlers for credentials-related functionality. """ from __future__ import absolute_import from logging import getLogger from django.contrib.sites.models import Site from course_modes.models import CourseMode from lms.djangoapps.certificates.models import CertificateStatuses, GeneratedC...
agpl-3.0
-4,952,859,006,700,233,000
39.166667
120
0.622253
false
krasin/qemu-counter
scripts/tracetool/backend/ftrace.py
92
1500
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Ftrace built-in backend. """ __author__ = "Eiichi Tsukata <eiichi.tsukata.xh@hitachi.com>" __copyright__ = "Copyright (C) 2013 Hitachi, Ltd." __license__ = "GPL version 2 or (at your option) any later version" __maintainer__ = "Stefan Hajnoczi" __email__ ...
gpl-2.0
-7,306,392,070,464,764,000
26.777778
80
0.466667
false
dfunckt/django
docs/conf.py
3
12624
# -*- coding: utf-8 -*- # # Django documentation build configuration file, created by # sphinx-quickstart on Thu Mar 27 09:06:53 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 aren't picklabl...
bsd-3-clause
7,693,732,863,765,040,000
32.308707
105
0.700412
false
vjmac15/Lyilis
lib/youtube_dl/extractor/giantbomb (VJ Washington's conflicted copy 2017-08-29).py
30
2928
from __future__ import unicode_literals import re import json from .common import InfoExtractor from ..utils import ( determine_ext, int_or_none, qualities, unescapeHTML, ) class GiantBombIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?giantbomb\.com/videos/(?P<display_id>[^/]+)/(?P<id>\d+-...
gpl-3.0
5,188,527,307,487,697,000
32.655172
98
0.52459
false
lahwaacz/qutebrowser
scripts/asciidoc2html.py
1
10901
#!/usr/bin/env python3 # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2017 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # This file is part of qutebrowser. # # qutebrowser is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as pub...
gpl-3.0
4,177,909,353,987,318,000
34.508143
78
0.545638
false
wenhuizhang/neutron
neutron/tests/unit/scheduler/test_l3_agent_scheduler.py
2
75328
# Copyright (c) 2013 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 ...
apache-2.0
-8,589,604,404,394,630,000
42.019989
79
0.550035
false
igordejanovic/textX
tests/functional/regressions/test_issue_80_object_processors.py
1
1738
from __future__ import unicode_literals from textx.metamodel import metamodel_from_str call_counter = 0 grammar1 = """ foo: 'foo' m_formula = Formula ; Formula: ( values=FormulaExpression values='+' ( values=FormulaExpression)* ) ; FormulaExpression: values=bar ; bar: m_id=/[a-f0-9]+/ ; """ grammar...
mit
3,894,718,877,138,706,400
17.294737
72
0.624281
false