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 |
|---|---|---|---|---|---|---|---|---|---|---|
tswast/google-cloud-python | bigquery/tests/unit/test_job.py | 1 | 231908 | # Copyright 2015 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, s... | apache-2.0 | 138,922,366,413,799,300 | 37.439914 | 88 | 0.595753 | false |
TechBK/horizon-dev | openstack_dashboard/dashboards/project/networks/subnets/workflows.py | 21 | 8306 | # Copyright 2013 NEC 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 applicable law or ag... | apache-2.0 | -5,335,300,023,427,638,000 | 38.741627 | 79 | 0.606911 | false |
onitake/ansible | lib/ansible/modules/cloud/webfaction/webfaction_db.py | 51 | 5879 | #!/usr/bin/python
#
# (c) Quentin Stafford-Fraser 2015, with contributions gratefully acknowledged from:
# * Andy Baker
# * Federico Tarantini
#
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#
# Create a webfaction database using Ansible and the Webfaction API
fro... | gpl-3.0 | 2,960,691,505,174,868,500 | 29.46114 | 149 | 0.597891 | false |
zodiac/incubator-airflow | tests/ti_deps/deps/not_in_retry_period_dep.py | 20 | 2129 | # -*- 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 | -7,459,091,823,848,786,000 | 33.901639 | 84 | 0.659934 | false |
jgoclawski/django | django/template/context_processors.py | 204 | 2465 | """
A set of request processors that return dictionaries to be merged into a
template context. Each function takes the request object as its only parameter
and returns a dictionary to add to the context.
These are referenced from the 'context_processors' option of the configuration
of a DjangoTemplates backend and use... | bsd-3-clause | 4,816,719,311,212,450,000 | 28.345238 | 83 | 0.696146 | false |
MahmoudAbdelRahman/GH_CPython | GrasshopperSyntax/plane.py | 1 | 14477 |
def DistanceToPlane(plane, point):
"""Returns the distance from a 3D point to a plane
Parameters:
plane (plane): the plane
point (point): List of 3 numbers or Point3d
Returns:
number: The distance if successful, otherwise None
Example:
import rhinoscriptsyntax as rs
... | bsd-2-clause | 5,389,491,601,893,352,000 | 30.977221 | 144 | 0.617669 | false |
googlemaps/property-finder | realty/admin.py | 1 | 1926 | # Copyright 2017 Google 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 wr... | apache-2.0 | 5,176,836,865,523,160,000 | 37.52 | 86 | 0.668744 | false |
gabrielfalcao/lettuce | tests/integration/lib/Django-1.2.5/tests/regressiontests/forms/localflavor/fi.py | 40 | 16282 | from django.contrib.localflavor.fi.forms import (FIZipCodeField,
FISocialSecurityNumber, FIMunicipalitySelect)
from utils import LocalFlavorTestCase
class FILocalFlavorTests(LocalFlavorTestCase):
def test_FIMunicipalitySelect(self):
f = FIMunicipalitySelect()
out = u'''<select name="municipal... | gpl-3.0 | -4,820,930,674,090,563,000 | 41.623037 | 74 | 0.74868 | false |
nvoron23/hue | desktop/core/ext-py/guppy-0.1.10/guppy/etc/tkcursors.py | 37 | 1607 | #._cv_part guppy.etc.tkcursors
# A Tk window that shows what cursor shapes are available.
# Moving the mouse over the cursor name shows the cursor in that shape.
from Tkinter import *
def tkcursors(master=None):
if master is None:
root = Tk()
else:
root = master
for i, cursor in enumerate((
'X_cursor'... | apache-2.0 | 5,385,016,561,133,023,000 | 14.160377 | 71 | 0.612943 | false |
crunchmail/munch-core | src/munch/apps/tracking/tests.py | 1 | 14581 | import logging
from unittest.mock import patch
from datetime import timedelta
from django.conf import settings
from django.test import TestCase
from django.test.utils import override_settings
from libfaketime import fake_time
from munch.apps.campaigns.models import Mail
from munch.apps.campaigns.models import MailSt... | agpl-3.0 | -1,162,552,144,688,727,000 | 37.070496 | 79 | 0.622042 | false |
Alwnikrotikz/pyglet | contrib/layout/layout/Plex/Lexicons.py | 32 | 6217 | #=======================================================================
#
# Python Lexical Analyser
#
# Lexical Analyser Specification
#
#=======================================================================
import types
import Actions
import DFA
import Errors
import Machines
import Regexps
# debug_flags for ... | bsd-3-clause | 8,773,662,145,555,675,000 | 31.380208 | 84 | 0.632299 | false |
wlamond/scikit-learn | examples/manifold/plot_manifold_sphere.py | 89 | 5055 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
=============================================
Manifold Learning methods on a severed sphere
=============================================
An application of the different :ref:`manifold` techniques
on a spherical data-set. Here one can see the use of
dimensionality reducti... | bsd-3-clause | 3,544,805,065,045,538,000 | 32.476821 | 83 | 0.684866 | false |
epiphany27/NewsBlur | apps/rss_feeds/migrations/0064_active_subs_index.py | 18 | 6286 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding index on 'Feed', fields ['active_subscribers']
db.create_index('feeds', ['active_subscribers'])
... | mit | -2,246,664,541,516,609,000 | 77.5875 | 151 | 0.561247 | false |
ppwwyyxx/tensorflow | tensorflow/lite/python/convert.py | 3 | 21556 | # Lint as: python2, python3
# 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
#
... | apache-2.0 | 1,465,387,221,843,521,500 | 41.600791 | 80 | 0.684867 | false |
CubicERP/odoo | addons/base_vat/base_vat.py | 1 | 13148 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2012 OpenERP SA (<http://openerp.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the... | agpl-3.0 | -1,648,178,791,841,932,300 | 39.201835 | 214 | 0.542827 | false |
savoirfairelinux/OpenUpgrade | openerp/openupgrade/openupgrade_70.py | 21 | 2572 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2013 Sylvain LE GAL
# (C) 2013 Therp BV
#
# This program is free software: you can redistribute it and/or modify
# it unde... | agpl-3.0 | -2,016,738,265,434,729,200 | 39.1875 | 79 | 0.633748 | false |
sputnick-dev/weboob | modules/bp/browser.py | 4 | 7905 | # -*- coding: utf-8 -*-
# Copyright(C) 2010-2011 Nicolas Duhamel
#
# This file is part of weboob.
#
# weboob is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at yo... | agpl-3.0 | 2,830,149,643,567,244,300 | 43.162011 | 224 | 0.6253 | false |
riaqn/imdb-report | sql2json.py | 1 | 1092 | import sqlite3
db = sqlite3.connect('im.db');
db.row_factory = sqlite3.Row
cur = db.execute('select * from movie;');
movies = [];
import json
convert = {};
import csv
with open('convert.csv', newline='') as csvfile:
spamreader = csv.reader(csvfile)
for row in spamreader:
convert[int(row[0])] = float(r... | mit | -6,303,563,875,847,457,000 | 25 | 87 | 0.56044 | false |
fnordahl/nova | nova/tests/functional/api_sample_tests/test_networks_associate.py | 17 | 3190 | # Copyright 2012 Nebula, Inc.
# Copyright 2014 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... | apache-2.0 | 7,424,371,483,269,622,000 | 38.875 | 78 | 0.621317 | false |
yantrabuddhi/opencog | opencog/python/test_atomspace/opencog/cogserver.py | 34 | 1174 | __author__ = 'Keyvan'
class MindAgent(object):
def run(self, atomspace):
pass
class Request(object):
def __init__(self):
pass
def run(self, args=[], atomspace=None):
self.send("This is the default python request.")
def send(self, msg):
print str(msg)... | agpl-3.0 | 4,523,640,291,264,021,500 | 21.52 | 81 | 0.586882 | false |
jhjguxin/PyCDC | Karrigell-2.3.5/modules/mod_ks.py | 1 | 2530 | import os, sys
import tokenize
from k_script import BaseScript, ParseError, HTTP_ERROR
from k_encodings import k_encoding
import urllib
class Error:
def __init__(self,msg,errorLine):
self.msg = msg
self.errorLine = errorLine
class Script(BaseScript):
"""Karrigell Service"""
def __init__(... | gpl-3.0 | -5,013,327,187,290,095,000 | 38.53125 | 76 | 0.600791 | false |
madelynfreed/rlundo | venv/lib/python2.7/site-packages/IPython/core/compilerop.py | 30 | 5904 | """Compiler tools with improved interactive support.
Provides compilation machinery similar to codeop, but with caching support so
we can provide interactive tracebacks.
Authors
-------
* Robert Kern
* Fernando Perez
* Thomas Kluyver
"""
# Note: though it might be more natural to name this module 'compiler', that
# ... | gpl-3.0 | -1,490,018,779,382,278,400 | 40 | 79 | 0.574695 | false |
louishust/mysql5.6.14_tokudb | storage/tokudb/mysql-test/suite/tokudb/t/change_column_all.py | 68 | 7599 | import sys
import random
import string
import re
class Field:
def __init__(self, name, is_nullible):
self.name = name
self.is_nullible = is_nullible
class Field_int(Field):
sizes = [ 1, 2, 3, 4, 8 ]
types = [ "TINYINT", "SMALLINT", "MEDIUMINT", "INT", "BIGINT" ]
uint_ranges = [ (0,(1<<... | gpl-2.0 | -7,785,184,999,656,359,000 | 33.384615 | 137 | 0.562179 | false |
jobiols/server-tools | auth_brute_force/__openerp__.py | 16 | 1632 | # -*- encoding: utf-8 -*-
##############################################################################
#
# Tracks Authentication Attempts and Prevents Brute-force Attacks module
# Copyright (C) 2015-Today GRAP (http://www.grap.coop)
# @author Sylvain LE GAL (https://twitter.com/legalsylvain)
#
# This prog... | agpl-3.0 | -2,436,473,512,728,500,700 | 37.857143 | 78 | 0.588848 | false |
marrocamp/Veil-Framework-Veil-Evasion | modules/payloads/powershell/meterpreter/rev_tcp.py | 6 | 2877 | """
Custom-written pure powershell meterpreter/reverse_tcp stager.
Module @harmj0y
"""
from modules.common import helpers
class Payload:
def __init__(self):
# required options
self.description = "pure windows/meterpreter/reverse_tcp stager, no shellcode"
self.rating = "Excellent"
... | gpl-3.0 | -769,675,081,892,578,000 | 54.326923 | 400 | 0.640598 | false |
julien78910/CouchPotatoServer | couchpotato/core/media/_base/providers/nzb/nzbindex.py | 16 | 4682 | import re
import time
from bs4 import BeautifulSoup
from couchpotato.core.helpers.encoding import toUnicode
from couchpotato.core.helpers.rss import RSS
from couchpotato.core.helpers.variable import tryInt
from couchpotato.core.logger import CPLog
from couchpotato.core.event import fireEvent
from couchpotato.core.medi... | gpl-3.0 | -4,539,235,040,448,542,700 | 36.15873 | 319 | 0.552542 | false |
cactusbin/nyt | matplotlib/examples/event_handling/trifinder_event_demo.py | 7 | 1771 | """
Example showing the use of a TriFinder object. As the mouse is moved over the
triangulation, the triangle under the cursor is highlighted and the index of
the triangle is displayed in the plot title.
"""
import matplotlib.pyplot as plt
from matplotlib.tri import Triangulation
from matplotlib.patches import Polygon... | unlicense | 2,470,792,156,038,795,000 | 29.016949 | 78 | 0.697911 | false |
raghavrv/scikit-learn | sklearn/cluster/spectral.py | 11 | 19173 | # -*- coding: utf-8 -*-
"""Algorithms for spectral clustering"""
# Author: Gael Varoquaux gael.varoquaux@normalesup.org
# Brian Cheung
# Wei LI <kuantkid@gmail.com>
# License: BSD 3 clause
import warnings
import numpy as np
from ..base import BaseEstimator, ClusterMixin
from ..utils import check_rand... | bsd-3-clause | -1,502,731,008,517,976,800 | 39.449367 | 95 | 0.640797 | false |
samrocketman/proxytester | src/proxytester.py | 1 | 7739 | #!/usr/bin/env python
'''
Created Dec 1, 2009
Main driver for application
Author: Sam Gleske
'''
import socket,sys,os.path,eventlet,binascii,urllib2,re
from lib import *
from time import sleep
from time import ctime
from sys import exit
proxyRegEx=re.compile("([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3... | mit | -3,129,901,063,766,209,000 | 31.116183 | 130 | 0.600336 | false |
yceruto/merchant | billing/utils/credit_card.py | 1 | 3828 | import re
import datetime
class InvalidCard(Exception):
pass
class CardNotSupported(Exception):
pass
class CreditCard(object):
# The regexp attribute should be overriden by the subclasses.
# Attribute value should be a regexp instance
regexp = None
# Has to be set by the user after calling... | bsd-3-clause | 8,788,309,780,209,723,000 | 26.539568 | 86 | 0.609195 | false |
GLolol/Cinnamon | files/usr/lib/cinnamon-menu-editor/cme/util.py | 21 | 6349 | # -*- coding: utf-8 -*-
# Alacarte Menu Editor - Simple fd.o Compliant Menu Editor
# Copyright (C) 2006 Travis Watkins
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either... | gpl-2.0 | -6,618,693,762,015,735,000 | 34.469274 | 134 | 0.647661 | false |
cloudera/hue | desktop/core/ext-py/django-webpack-loader-1.0.0/setup.py | 2 | 1637 | import os
import re
from setuptools import setup
def rel(*parts):
'''returns the relative path to a file wrt to the current directory'''
return os.path.abspath(os.path.join(os.path.dirname(__file__), *parts))
README = open('README.md', 'r').read()
with open(rel('webpack_loader', '__init__.py')) as handler:... | apache-2.0 | 7,905,206,106,447,290,000 | 33.104167 | 103 | 0.644472 | false |
Kraxi/YTplaylist | venv/Lib/site-packages/werkzeug/formparser.py | 295 | 21205 | # -*- coding: utf-8 -*-
"""
werkzeug.formparser
~~~~~~~~~~~~~~~~~~~
This module implements the form parsing. It supports url-encoded forms
as well as non-nested multipart uploads.
:copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more deta... | gpl-2.0 | 8,595,600,975,834,678,000 | 39.544933 | 81 | 0.578071 | false |
openpolis/open_municipio | open_municipio/acts/migrations/0015_auto__add_field_transition_institution.py | 1 | 44499 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Transition.institution'
db.add_column(u'acts_transition',... | agpl-3.0 | -7,407,727,820,434,630,000 | 87.293651 | 295 | 0.554282 | false |
rxl194/18-327-wavelets-filter-banks | tools/kompresni.py | 2 | 8583 | ## kompresni.py
## This is an example of using Wavelets to decompose an image
## using Python libraries numpy, scipy, PyWavelets
##
##
## main reference that inspired me was this webpage:
## http://kastnerkyle.github.io/blog/2014/04/17/wavelets/
##
##
################################################################... | mit | -6,579,723,285,549,418,000 | 48.327586 | 131 | 0.589304 | false |
romulocollopy/quokka | quokka/core/admin/fields.py | 10 | 2973 | # coding: utf-8
import random
import sys
from werkzeug.datastructures import FileStorage
from flask import current_app
from flask.ext.admin import form
from flask.ext.admin.form.upload import ImageUploadInput
from flask.ext.admin._compat import urljoin
from quokka.core.models import SubContent, SubContentPurpose
from... | mit | 3,724,367,631,232,377,300 | 30.294737 | 75 | 0.590986 | false |
catchmrbharath/servo | tests/wpt/web-platform-tests/service-workers/service-worker/resources/update-recovery-worker.py | 143 | 1067 | def main(request, response):
# Set mode to 'init' for initial fetch.
mode = 'init'
if 'update-recovery-mode' in request.cookies:
mode = request.cookies['update-recovery-mode'].value
# no-cache itself to ensure the user agent finds a new version for each update.
headers = [('Cache-Control', ... | mpl-2.0 | -1,601,018,331,695,177,200 | 41.68 | 99 | 0.64105 | false |
cespare/pastedown | vendor/pygments/pygments/lexers/functional.py | 3 | 108971 | # -*- coding: utf-8 -*-
"""
pygments.lexers.functional
~~~~~~~~~~~~~~~~~~~~~~~~~~
Lexers for functional languages.
:copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import Lexer, RegexLexer, bygroups, incl... | mit | -7,405,808,076,877,769,000 | 40.958414 | 89 | 0.491144 | false |
quickresolve/accel.ai | flask-aws/lib/python2.7/site-packages/sqlalchemy/sql/schema.py | 22 | 134852 | # sql/schema.py
# Copyright (C) 2005-2014 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""The schema module provides the building blocks for database metadata.
Each element... | mit | 5,444,710,164,677,128,000 | 37.573227 | 82 | 0.595742 | false |
scottferg/web-console | django/contrib/contenttypes/management.py | 12 | 2518 | from django.contrib.contenttypes.models import ContentType
from django.db.models import get_apps, get_models, signals
from django.utils.encoding import smart_unicode
def update_contenttypes(app, created_models, verbosity=2, **kwargs):
"""
Creates content types for models in the given app, removing any mo... | bsd-3-clause | -7,418,456,419,652,447,000 | 39.966667 | 112 | 0.605242 | false |
instana/python-sensor | instana/log.py | 1 | 2320 | # (c) Copyright IBM Corp. 2021
# (c) Copyright Instana Inc. 2016
from __future__ import print_function
import os
import sys
import logging
logger = None
def get_standard_logger():
"""
Retrieves and configures a standard logger for the Instana package
@return: Logger
"""
standard_logger = loggin... | mit | 4,836,429,472,126,459,000 | 23.421053 | 89 | 0.618966 | false |
dims/cinder | cinder/tests/unit/volume/drivers/emc/scaleio/test_create_volume.py | 12 | 4916 | # Copyright (c) 2013 - 2015 EMC Corporation.
# 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
#
# Unle... | apache-2.0 | 1,280,964,772,167,215,900 | 41.747826 | 78 | 0.618389 | false |
coblo/isccbench | iscc_bench/shortid/shortid.py | 1 | 3461 | # -*- coding: utf-8 -*-
import math
import os
from loguru import logger as log
import varint
import iscc
from iscc_bench.shortid import bech32
from iscc_bench.shortid.utils import (
iscc_decode,
HEAD_SID_PU,
HEAD_SID_CB,
b58i_encode,
b58i_decode,
)
def short_id(code: str, chain: bytes = HEAD_SID_P... | bsd-2-clause | -2,776,552,550,259,388,400 | 31.046296 | 83 | 0.587402 | false |
you21979/phantomjs | src/qt/qtwebkit/Tools/Scripts/webkitpy/to_be_moved/update_webgl_conformance_tests_unittest.py | 120 | 4192 | # Copyright (C) 2010 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the ... | bsd-3-clause | 2,351,676,351,294,147,600 | 42.216495 | 96 | 0.663168 | false |
pvital/patchew | mod.py | 2 | 10304 | #!/usr/bin/env python3
#
# Copyright 2016 Red Hat, Inc.
#
# Authors:
# Fam Zheng <famz@redhat.com>
#
# This work is licensed under the MIT License. Please see the LICENSE file or
# http://opensource.org/licenses/MIT.
import imp
import os
import sys
from django.conf import settings
from django.template import Temp... | mit | 3,300,003,103,122,031,600 | 28.609195 | 119 | 0.550272 | false |
jzoldak/edx-platform | common/djangoapps/third_party_auth/api/permissions.py | 96 | 1032 | """
Third party auth API related permissions
"""
from rest_framework import permissions
from third_party_auth.models import ProviderApiPermissions
class ThirdPartyAuthProviderApiPermission(permissions.BasePermission):
"""
Allow someone to access the view if they have valid OAuth client credential.
"""
... | agpl-3.0 | -7,822,586,772,532,650,000 | 32.290323 | 111 | 0.679264 | false |
ujenmr/ansible | lib/ansible/modules/cloud/azure/azure_rm_devtestlab.py | 16 | 9586 | #!/usr/bin/python
#
# Copyright (c) 2019 Zim Kalinowski, <zikalino@microsoft.com>
#
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | gpl-3.0 | -260,386,688,138,049,060 | 32.753521 | 136 | 0.56353 | false |
ptisserand/ansible | lib/ansible/modules/system/getent.py | 104 | 3914 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2014, Brian Coca <brian.coca+dev@gmail.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_versi... | gpl-3.0 | -1,761,655,463,999,585,300 | 25.093333 | 160 | 0.612417 | false |
dav1x/ansible | lib/ansible/modules/network/ordnance/ordnance_config.py | 22 | 12932 | #!/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 | 6,652,885,260,996,036,000 | 32.853403 | 81 | 0.643829 | false |
faust64/ansible | lib/ansible/modules/cloud/cloudstack/cs_zone.py | 48 | 11349 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2016, René Moser <mail@renemoser.net>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Lice... | gpl-3.0 | -6,227,352,951,012,005,000 | 26.948276 | 97 | 0.604565 | false |
forseti-security/forseti-security | tests/services/test_models.py | 1 | 9825 | # Copyright 2017 The Forseti Security 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 ap... | apache-2.0 | -5,045,692,619,322,537,000 | 23.022005 | 75 | 0.341272 | false |
auready/django | tests/template_tests/filter_tests/test_urlize.py | 65 | 15405 | from django.template.defaultfilters import urlize
from django.test import SimpleTestCase
from django.utils.functional import lazy
from django.utils.safestring import mark_safe
from ..utils import setup
class UrlizeTests(SimpleTestCase):
@setup({'urlize01': '{% autoescape off %}{{ a|urlize }} {{ b|urlize }}{% en... | bsd-3-clause | -1,878,669,360,171,994,400 | 40.230563 | 119 | 0.554717 | false |
snapcore/snapcraft | tests/unit/plugins/v1/test_dotnet.py | 2 | 9340 | # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-
#
# Copyright (C) 2017-2018-2020 Canonical Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distribute... | gpl-3.0 | -8,770,064,228,465,114,000 | 35.061776 | 183 | 0.542398 | false |
VeNoMouS/Sick-Beard | lib/cherrypy/lib/cpstats.py | 2 | 22932 | """CPStats, a package for collecting and reporting on program statistics.
Overview
========
Statistics about program operation are an invaluable monitoring and debugging
tool. Unfortunately, the gathering and reporting of these critical values is
usually ad-hoc. This package aims to add a centralized place for gather... | gpl-3.0 | -2,364,278,798,268,268,500 | 32.234783 | 79 | 0.567678 | false |
jlmurphy3rd/code-outhouse | PythonIngest/src/root/nested/BeautifulSoup-lib.py | 59 | 79378 | """Beautiful Soup
Elixir and Tonic
"The Screen-Scraper's Friend"
http://www.crummy.com/software/BeautifulSoup/
Beautiful Soup parses a (possibly invalid) XML or HTML document into a
tree representation. It provides methods and Pythonic idioms that make
it easy to navigate, search, and modify the tree.
A well-formed X... | mit | 4,674,602,431,440,423,000 | 38.452286 | 186 | 0.57046 | false |
halberom/ansible | lib/ansible/modules/storage/netapp/netapp_e_storagepool.py | 45 | 39823 | #!/usr/bin/python
# (c) 2016, NetApp, 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.... | gpl-3.0 | 6,876,397,068,223,462,000 | 43.845721 | 256 | 0.541145 | false |
huchoi/edx-platform | common/lib/xmodule/xmodule/tests/rendering/core.py | 55 | 3311 | """
This module is indended to provide a pluggable way to add assertions about
the rendered content of XBlocks.
For each view on the XBlock, this module defines a @singledispatch function
that can be used to test the contents of the rendered html.
The functions are of the form:
@singledispatch
def assert_stu... | agpl-3.0 | 2,050,074,222,170,986,000 | 28.04386 | 77 | 0.676231 | false |
adam-iris/mailman | src/mailman/mta/decorating.py | 2 | 1704 | # Copyright (C) 2009-2014 by the Free Software Foundation, Inc.
#
# This file is part of GNU Mailman.
#
# GNU Mailman 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 | 777,479,777,896,430,300 | 30.555556 | 78 | 0.713615 | false |
h4r5h1t/django-hauthy | tests/sitemaps_tests/urls/http.py | 13 | 4302 | from datetime import date, datetime
from django.conf.urls import url
from django.conf.urls.i18n import i18n_patterns
from django.contrib.sitemaps import (
FlatPageSitemap, GenericSitemap, Sitemap, views,
)
from django.http import HttpResponse
from django.utils import timezone
from django.views.decorators.cache imp... | bsd-3-clause | -4,030,026,616,842,821,600 | 28.465753 | 87 | 0.657601 | false |
apporc/nova | nova/tests/unit/scheduler/filters/test_aggregate_instance_extra_specs_filters.py | 16 | 4167 | # 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,733,126,853,550,380,500 | 41.958763 | 78 | 0.636429 | false |
astuanax/django-postman | setup.py | 1 | 1250 | from setuptools import find_packages, setup
setup(
name='django-postman',
version=__import__('postman').__version__,
description='User-to-User messaging system for Django, with gateway to AnonymousUser,' \
' moderation and thread management, user & exchange filters, inbox/sent/archives/trash folder... | bsd-3-clause | -2,800,200,421,901,872,600 | 36.878788 | 106 | 0.6368 | false |
vivaxy/algorithms | python/problems/bulb_switcher_ii.py | 1 | 2150 | """
https://leetcode.com/problems/bulb-switcher-ii/
https://leetcode.com/submissions/detail/140962396/
"""
class Solution1:
def flipLights(self, n, m):
"""
:type n: int
:type m: int
:rtype: int
"""
def flipEvery(x, index):
return not x
def flip... | mit | 3,522,674,654,318,811,000 | 21.87234 | 73 | 0.448372 | false |
kevin-teddy/gajim | src/common/crypto.py | 2 | 2816 | # common crypto functions (mostly specific to XEP-0116, but useful elsewhere)
# -*- coding:utf-8 -*-
## src/common/crypto.py
##
## Copyright (C) 2007 Brendan Taylor <whateley AT gmail.com>
##
## This file is part of Gajim.
##
## Gajim is free software; you can redistribute it and/or modify
## it under the terms of the ... | gpl-3.0 | 8,298,317,022,157,613,000 | 25.317757 | 82 | 0.692827 | false |
garethsaxby/python_koans | python3/koans/about_monkey_patching.py | 13 | 1355 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Related to AboutOpenClasses in the Ruby Koans
#
from runner.koan import *
class AboutMonkeyPatching(Koan):
class Dog:
def bark(self):
return "WOOF"
def test_as_defined_dogs_do_bark(self):
fido = self.Dog()
self.assertEqual... | mit | -8,038,791,236,111,564,000 | 27.229167 | 75 | 0.492989 | false |
GuessWhoSamFoo/pandas | pandas/tests/util/test_validate_kwargs.py | 2 | 2040 | # -*- coding: utf-8 -*-
from collections import OrderedDict
import pytest
from pandas.util._validators import validate_bool_kwarg, validate_kwargs
_fname = "func"
def test_bad_kwarg():
good_arg = "f"
bad_arg = good_arg + "o"
compat_args = OrderedDict()
compat_args[good_arg] = "foo"
compat_args... | bsd-3-clause | -3,633,018,876,583,707,000 | 27.333333 | 73 | 0.617647 | false |
edx/edx-platform | openedx/core/djangoapps/catalog/management/commands/tests/test_create_catalog_integrations.py | 4 | 3596 | """
Test cases for catalog_integrations command.
"""
import pytest
from django.core.management import call_command, CommandError
from openedx.core.djangolib.testing.utils import CacheIsolationTestCase
from openedx.core.djangoapps.catalog.models import CatalogIntegration
from openedx.core.djangoapps.catalog.tests.mixi... | agpl-3.0 | -7,247,130,454,972,361,000 | 34.60396 | 96 | 0.649333 | false |
dol-sen/gentoolkit | pym/gentoolkit/eshowkw/keywords_header.py | 2 | 3622 | # vim:fileencoding=utf-8
# Copyright 2001-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
__all__ = ['keywords_header']
from portage import settings as ports
from portage.output import colorize
from gentoolkit.eshowkw.display_pretty import colorize_string
from gentoolkit.esho... | gpl-2.0 | 4,076,065,365,989,080,600 | 34.165049 | 93 | 0.70127 | false |
quoclieu/codebrew17-starving | env/lib/python3.5/site-packages/Crypto/Cipher/_mode_ccm.py | 4 | 22663 | # ===================================================================
#
# Copyright (c) 2014, Legrandin <helderijs@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributio... | mit | -4,995,305,239,537,132,000 | 35.553226 | 105 | 0.568813 | false |
FFMG/myoddweb.piger | monitor/api/python/Python-3.7.2/Lib/pipes.py | 172 | 8916 | """Conversion pipeline templates.
The problem:
------------
Suppose you have some data that you want to convert to another format,
such as from GIF image format to PPM image format. Maybe the
conversion involves several steps (e.g. piping it through compress or
uuencode). Some of the conversion steps may require th... | gpl-2.0 | -8,899,004,975,729,792,000 | 35.097166 | 77 | 0.583558 | false |
selste/micropython | py/makecompresseddata.py | 14 | 6800 | from __future__ import print_function
import collections
import re
import sys
import gzip
import zlib
_COMPRESSED_MARKER = 0xFF
def check_non_ascii(msg):
for c in msg:
if ord(c) >= 0x80:
print(
'Unable to generate compressed data: message "{}" contains a non-ascii character... | mit | 4,113,653,400,138,348,500 | 32.170732 | 118 | 0.561471 | false |
GbalsaC/bitnamiP | common/djangoapps/track/backends/django.py | 102 | 2282 | """
Event tracker backend that saves events to a Django database.
"""
# TODO: this module is very specific to the event schema, and is only
# brought here for legacy support. It should be updated when the
# schema changes or eventually deprecated.
from __future__ import absolute_import
import logging
from django.d... | agpl-3.0 | 2,454,939,927,934,910,000 | 26.493976 | 74 | 0.631464 | false |
mmahut/openshift-ansible | roles/lib_openshift/src/ansible/oc_pvc.py | 60 | 1107 | # pylint: skip-file
# flake8: noqa
#pylint: disable=too-many-branches
def main():
'''
ansible oc module for pvc
'''
module = AnsibleModule(
argument_spec=dict(
kubeconfig=dict(default='/etc/origin/master/admin.kubeconfig', type='str'),
state=dict(default='present', type... | apache-2.0 | -1,118,731,015,792,699,900 | 30.628571 | 87 | 0.583559 | false |
Lektorium-LLC/edx-platform | lms/djangoapps/certificates/management/commands/create_fake_cert.py | 5 | 3521 | """Utility for testing certificate display.
This command will create a fake certificate for a user
in a course. The certificate will display on the student's
dashboard, but no PDF will be generated.
Example usage:
$ ./manage.py lms create_fake_cert test_user edX/DemoX/Demo_Course --mode honor --grade 0.89
"""
... | agpl-3.0 | 2,287,613,749,433,814,500 | 30.720721 | 110 | 0.570009 | false |
DavidLP/home-assistant | homeassistant/components/velbus/climate.py | 6 | 1975 | """Support for Velbus thermostat."""
import logging
from homeassistant.components.climate import ClimateDevice
from homeassistant.components.climate.const import (
STATE_HEAT, SUPPORT_TARGET_TEMPERATURE)
from homeassistant.const import ATTR_TEMPERATURE, TEMP_CELSIUS, TEMP_FAHRENHEIT
from . import DOMAIN as VELBUS... | apache-2.0 | -2,551,971,266,583,777,000 | 28.462687 | 79 | 0.665147 | false |
binhex/moviegrabber | lib/site-packages/cherrypy/test/test_json.py | 42 | 2541 | import cherrypy
from cherrypy.test import helper
from cherrypy._cpcompat import json
class JsonTest(helper.CPWebCase):
def setup_server():
class Root(object):
def plain(self):
return 'hello'
plain.exposed = True
def json_string(self):
re... | gpl-3.0 | 2,220,701,461,686,869,800 | 31.164557 | 77 | 0.512397 | false |
bpsinc-native/src_tools_gyp | test/rules-rebuild/gyptest-all.py | 351 | 1662 | #!/usr/bin/env python
# Copyright (c) 2009 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies that a rule that generates multiple outputs rebuilds
correctly when the inputs change.
"""
import TestGyp
test = TestGyp.Test... | bsd-3-clause | -5,668,963,839,542,867,000 | 22.742857 | 73 | 0.700361 | false |
yosukesuzuki/calendar-app | project/kay/management/utils.py | 5 | 1772 | # -*- coding: utf-8 -*-
"""
Kay framework.
:Copyright: (c) 2009 Takashi Matsuo <tmatsuo@candit.jp> All rights reserved.
:license: BSD, see LICENSE for more details.
"""
import sys
import getpass
from google.appengine.ext.remote_api import remote_api_stub
import kay.app
from kay.misc import get_appid
def print_sta... | mit | -4,620,853,305,758,428,000 | 22.945946 | 79 | 0.621896 | false |
tarequeh/django-modular-blog | fragments/constants.py | 2 | 1514 | """
Values that are used throughout the app
"""
FRAGMENT_TYPE_PLAINTEXT = 'plaintext'
FRAGMENT_TYPE_HTML = 'html'
FRAGMENT_TYPE_MARKDOWN = 'markdown'
FRAGMENT_TYPE_IMAGE = 'image'
FRAGMENT_TYPE_CODE = 'code'
FRAGMENT_TYPE_EMBED = 'embed'
FRAGMENT_TYPE_CHOICES = (
(FRAGMENT_TYPE_PLAINTEXT, 'Plaintext'),
(FRAGM... | mit | 3,666,318,944,187,720,700 | 24.661017 | 45 | 0.67041 | false |
DavidTingley/ephys-processing-pipeline | installation/klustaviewa-0.3.0/build/lib.linux-x86_64-2.7/klustaviewa/views/treemodel.py | 2 | 7148 | from qtools import QtGui, QtCore
from collections import OrderedDict
# Generic classes
# ---------------
class TreeItem(object):
def __init__(self, parent=None, data=None):
"""data is an OrderedDict"""
self.parent_item = parent
self.index = QtCore.QModelIndex()
self.childr... | gpl-3.0 | 7,667,130,454,191,773,000 | 30.352941 | 81 | 0.529659 | false |
Bismarrck/tensorflow | tensorflow/python/data/experimental/kernel_tests/parallel_interleave_test.py | 10 | 28891 | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -2,488,620,465,211,361,300 | 37.624332 | 80 | 0.62767 | false |
dd00/commandergenius | project/jni/python/src/Lib/test/profilee.py | 398 | 3041 | """
Input for test_profile.py and test_cprofile.py.
IMPORTANT: This stuff is touchy. If you modify anything above the
test class you'll have to regenerate the stats by running the two
test files.
*ALL* NUMBERS in the expected output are relevant. If you change
the formatting of pstats, please don't just regenerate t... | lgpl-2.1 | -7,511,095,279,869,876,000 | 25.443478 | 71 | 0.521868 | false |
tech-server/gondul | templating/templating.py | 1 | 3215 | #!/usr/bin/python3
import argparse
import traceback
import sys
import netaddr
import requests
from flask import Flask, request
from jinja2 import Environment, FileSystemLoader, TemplateNotFound
endpoints = "read/networks read/oplog read/snmp read/switches-management public/distro-tree public/config public/dhcp publ... | gpl-2.0 | 3,676,972,519,399,916,000 | 35.123596 | 194 | 0.694557 | false |
diogovk/ansible | contrib/inventory/zabbix.py | 119 | 3956 | #!/usr/bin/env python
# (c) 2013, Greg Buehler
#
# 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 ve... | gpl-3.0 | 2,952,615,354,131,639,000 | 28.969697 | 111 | 0.590243 | false |
BackupTheBerlios/cuon-svn | cuon_client/cuon/Misc/cuon_dialog.py | 5 | 1297 | import gtk
import pygtk
class cuon_dialog:
def __init__(self):
# Dialog - Flags
# DIALOG_MODAL - make the dialog modal
# DIALOG_DESTROY_WITH_PARENT - destroy dialog when its parent is destroyed
# DIALOG_NO_SEPARATOR - omit the separator between the vbox and the action_area
... | gpl-3.0 | -5,902,455,205,186,129,000 | 29.162791 | 134 | 0.546646 | false |
markwal/OctoPrint | src/octoprint/plugins/softwareupdate/scripts/update-octoprint.py | 30 | 6010 | #!/bin/env python
from __future__ import absolute_import
__author__ = "Gina Haeussge <osd@foosel.net>"
__license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'
__copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License"
import errno
import su... | agpl-3.0 | -4,969,219,207,114,753,000 | 32.388889 | 135 | 0.670882 | false |
shubhamgupta2021/atomic | Atomic/config.py | 4 | 1724 | import os
try:
import ConfigParser as configparser
except ImportError: # py3 compat
import configparser
class PulpConfig(object):
"""
pulp configuration:
1. look in ~/.pulp/admin.conf
configuration contents:
[server]
host = <pulp-server-hostname.example.com>
verify_ssl = false
... | lgpl-2.1 | -7,806,542,358,198,854,000 | 30.345455 | 73 | 0.580626 | false |
fanquake/bitcoin | test/functional/wallet_labels.py | 6 | 8597 | #!/usr/bin/env python3
# Copyright (c) 2016-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.
"""Test label RPCs.
RPCs tested are:
- getaddressesbylabel
- listaddressgroupings
- setlabel
... | mit | 8,419,955,927,524,706,000 | 40.65534 | 115 | 0.624985 | false |
zerkrx/zerkbox | lib/pip/vcs/git.py | 340 | 11197 | from __future__ import absolute_import
import logging
import tempfile
import os.path
from pip.compat import samefile
from pip.exceptions import BadCommand
from pip._vendor.six.moves.urllib import parse as urllib_parse
from pip._vendor.six.moves.urllib import request as urllib_request
from pip._vendor.packaging.versio... | gpl-3.0 | -4,837,903,107,983,278,000 | 36.323333 | 78 | 0.548361 | false |
cedi4155476/QGIS | python/plugins/processing/algs/qgis/LinesIntersection.py | 10 | 5061 | # -*- coding: utf-8 -*-
"""
***************************************************************************
LinesIntersection.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
*********************... | gpl-2.0 | 4,363,250,323,978,554,000 | 37.930769 | 112 | 0.521834 | false |
chemlab/chemlab | chemlab/mviewer/api/display.py | 6 | 4689 | from chemlab.mviewer.representations import BallAndStickRepresentation
from chemlab.graphics.qttrajectory import format_time
from .core import *
from chemlab.db import CirDB
from chemlab.io import datafile
from chemlab.core import System
import numpy as np
db = CirDB()
def display_system(system, autozoom=True):
... | gpl-3.0 | 4,413,858,954,767,922,000 | 27.077844 | 98 | 0.654084 | false |
mateor/pants | tests/python/pants_test/engine/test_isolated_process.py | 2 | 10203 | # coding=utf-8
# Copyright 2016 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import os
import uni... | apache-2.0 | 8,786,083,197,161,860,000 | 39.812 | 120 | 0.65569 | false |
afrolov1/nova | nova/api/openstack/compute/plugins/v3/deferred_delete.py | 17 | 3215 | # Copyright 2011 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | apache-2.0 | -1,631,757,796,909,532,000 | 37.27381 | 79 | 0.641991 | false |
Ex-Mente/auxi.0 | auxi/tools/materialphysicalproperties/coals.py | 1 | 5954 | #!/usr/bin/env python3
"""
This module provides physical property data sets and models for coals and
cokes.
"""
from sys import modules
from os.path import realpath, dirname, join
from math import exp
from auxi.tools.materialphysicalproperties.core import Model
from auxi.tools.chemistry.stoichiometry import molar_mas... | lgpl-3.0 | -7,165,856,873,230,337,000 | 29.849741 | 80 | 0.531743 | false |
vijayanandnandam/youtube-dl | test/test_socks.py | 50 | 3500 | #!/usr/bin/env python
# coding: utf-8
from __future__ import unicode_literals
# Allow direct execution
import os
import sys
import unittest
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import random
import subprocess
from test.helper import (
FakeYDL,
get_params,
)
from you... | unlicense | -3,523,048,103,559,725,600 | 28.661017 | 82 | 0.582286 | false |
zlfben/gem5 | src/arch/x86/isa/insts/general_purpose/data_transfer/move.py | 40 | 9122 | # Copyright (c) 2007-2008 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 imp... | bsd-3-clause | -4,121,948,492,811,436,500 | 23.196286 | 72 | 0.659614 | false |
adw0rd/lettuce | tests/integration/lib/Django-1.3/django/contrib/auth/tests/tokens.py | 227 | 3416 | from datetime import date, timedelta
from django.conf import settings
from django.contrib.auth.models import User, AnonymousUser
from django.contrib.auth.tokens import PasswordResetTokenGenerator
from django.test import TestCase
class TokenGeneratorTest(TestCase):
def test_make_token(self):
"""
... | gpl-3.0 | -8,299,538,691,191,677,000 | 39.188235 | 98 | 0.615632 | false |
narurien/ganeti-ceph | test/py/ganeti.storage.drbd_unittest.py | 1 | 17356 | #!/usr/bin/python
#
# Copyright (C) 2006, 2007, 2010, 2012, 2013 Google Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later v... | gpl-2.0 | -1,559,398,141,126,441,500 | 37.654788 | 80 | 0.623761 | false |
wkschwartz/django | tests/utils_tests/test_archive.py | 1 | 3026 | import os
import stat
import sys
import tempfile
import unittest
from django.core.exceptions import SuspiciousOperation
from django.test import SimpleTestCase
from django.utils import archive
class TestArchive(unittest.TestCase):
def setUp(self):
self.testdir = os.path.join(os.path.dirname(__file__), 'a... | bsd-3-clause | 887,308,862,571,063,600 | 43.5 | 92 | 0.607072 | false |
StevenSLXie/tinyble | build/lib/tinyble/query.py | 2 | 14812 | """
Contains the querying interface.
Starting with :class:`~tinydb.queries.Query` you can construct complex
queries:
>>> ((where('f1') == 5) & (where('f2') != 2)) | where('s').matches(r'^\w+$')
(('f1' == 5) and ('f2' != 2)) or ('s' ~= ^\w+$ )
Queries are executed by using the ``__call__``:
>>> q = where('val') == 5
>>>... | mit | -3,362,778,440,087,676,000 | 25.981785 | 78 | 0.494802 | false |
wwf5067/statsmodels | statsmodels/graphics/dotplots.py | 31 | 18190 | import numpy as np
from statsmodels.compat import range
from . import utils
def dot_plot(points, intervals=None, lines=None, sections=None,
styles=None, marker_props=None, line_props=None,
split_names=None, section_order=None, line_order=None,
stacked=False, styles_order=None, s... | bsd-3-clause | 977,895,476,451,395,200 | 35.971545 | 74 | 0.53414 | false |
Subsets and Splits
Gradio Code Samples
Limits the results to entries containing the word 'gradio' in the repo_name, content, or path, providing a filtered subset of the dataset.