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 |
|---|---|---|---|---|---|---|---|---|---|---|
pabigot/pyxb | tests/trac/test-trac-0181.py | 2 | 1998 | # -*- coding: utf-8 -*-
import logging
if __name__ == '__main__':
logging.basicConfig()
_log = logging.getLogger(__name__)
import pyxb.binding.generate
import pyxb.utils.domutils
from xml.dom import Node
import os.path
xsd='''<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XML... | apache-2.0 | -9,116,964,154,924,526,000 | 29.738462 | 64 | 0.611111 | false |
qiyuangong/leetcode | python/099_Recover_Binary_Search_Tree.py | 2 | 2329 | # Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution(object):
# def recoverTree(self, root):
# """
# :type root: TreeNode
# :rtype: void Do not return anything... | mit | -2,211,204,601,014,194,200 | 33.761194 | 123 | 0.490339 | false |
attritionorg/nessrest | setup.py | 3 | 2946 | '''
Build script for the nessrest module
'''
# Copyright (c) 2014-2015, Tenable Network Security, 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 ret... | bsd-3-clause | -1,643,282,323,444,939,800 | 45.03125 | 80 | 0.720978 | false |
qPCR4vir/evowarepy | evoware/fileutil.py | 1 | 7953 | ## evoware/py -- python modules for Evoware scripting
## Copyright 2014 Raik Gruenberg
##
## 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/... | apache-2.0 | -30,888,078,753,680,924 | 29.588462 | 81 | 0.574626 | false |
hellotomfan/v8-coroutine | deps/v8/tools/push-to-trunk/auto_push.py | 36 | 5466 | #!/usr/bin/env python
# Copyright 2013 the V8 project authors. 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... | gpl-2.0 | -6,222,276,143,869,037,000 | 33.1625 | 76 | 0.682217 | false |
shifter/grr | gui/api_plugins/artifact.py | 1 | 4572 | #!/usr/bin/env python
"""API renderers for accessing artifacts."""
from grr.gui import api_call_renderer_base
from grr.gui import api_value_renderers
from grr.lib import aff4
from grr.lib import artifact
from grr.lib import artifact_registry
from grr.lib import parsers
from grr.lib import rdfvalue
from grr.lib import... | apache-2.0 | -5,476,630,757,292,344,000 | 34.44186 | 80 | 0.687008 | false |
evildmp/Arkestra | vacancies_and_studentships/views.py | 2 | 5172 | import datetime
from django.utils.translation import ugettext as _
from django.shortcuts import render_to_response, get_object_or_404
from django.template import RequestContext
from django.http import Http404
from arkestra_utilities.views import ArkestraGenericView
from contacts_and_people.models import Entity
from ... | bsd-2-clause | 6,610,627,639,235,087,000 | 33.251656 | 114 | 0.66512 | false |
jolyonb/edx-platform | common/djangoapps/terrain/stubs/comments.py | 2 | 5708 | """
Stub implementation of cs_comments_service for acceptance tests
"""
from __future__ import absolute_import
import re
import six.moves.urllib.parse # pylint: disable=import-error
from .http import StubHttpRequestHandler, StubHttpService
class StubCommentsServiceHandler(StubHttpRequestHandler):
@property
... | agpl-3.0 | 2,863,648,932,884,572,700 | 38.365517 | 127 | 0.574632 | false |
caseyrollins/osf.io | osf_tests/test_files.py | 8 | 3323 | import pytest
from django.contrib.contenttypes.models import ContentType
from addons.osfstorage.models import NodeSettings
from addons.osfstorage import settings as osfstorage_settings
from osf.models import BaseFileNode, Folder, File
from osf_tests.factories import (
UserFactory,
ProjectFactory,
RegionFa... | apache-2.0 | 4,214,935,528,451,518,500 | 34.351064 | 124 | 0.682516 | false |
IntelLabs/hpat | sdc/distributed_api.py | 1 | 23019 | # *****************************************************************************
# Copyright (c) 2020, Intel Corporation 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 sou... | bsd-2-clause | -8,176,314,561,692,909,000 | 28.027743 | 119 | 0.623485 | false |
cgstudiomap/cgstudiomap | main/parts/product-attribute/product_sequence/models/__init__.py | 4 | 1065 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (c) 2015 Domatix (http://domatix.com)
# Angel Moya <angel.moya@domatix.com>
#
# This program is free software: you can redistri... | agpl-3.0 | -4,610,172,880,151,221,000 | 45.304348 | 78 | 0.599061 | false |
petrutlucian94/nova | nova/tests/unit/api/openstack/compute/test_server_actions.py | 3 | 51004 | # 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,847,969,642,705,192,700 | 37.934351 | 79 | 0.544644 | false |
veger/ansible | lib/ansible/modules/windows/win_chocolatey_config.py | 28 | 1677 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2018, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'}
DOCU... | gpl-3.0 | 8,094,782,639,069,273,000 | 26.95 | 92 | 0.673226 | false |
citrix-openstack-build/trove | trove/tests/unittests/guestagent/test_api.py | 2 | 13947 | # Copyright 2012 OpenStack Foundation
#
# 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 l... | apache-2.0 | 5,870,155,701,787,544,000 | 37.958101 | 79 | 0.607586 | false |
eharney/nova | nova/tests/scheduler/test_caching_scheduler.py | 12 | 6554 | # Copyright (c) 2014 Rackspace Hosting
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... | apache-2.0 | 6,606,672,940,516,586,000 | 33.135417 | 78 | 0.603448 | false |
GiggleLiu/nrg_mapping | nrgmap/tests/test_mp.py | 1 | 1221 | from numpy import *
from numpy.testing import dec,assert_,assert_raises,assert_almost_equal,assert_allclose
import gmpy2
import time,pdb,sys
from ..mplib import *
tocomplex=vectorize(gmpy2.mpc)
assert_mpclose=lambda x,y:assert_(abs(x-y).sum()<1e-10)
def test_conj():
print('Test conjugate.')
c1=tocomplex(1+2j... | mit | -8,404,902,727,140,415,000 | 26.75 | 87 | 0.588862 | false |
cmptrgeekken/evething | thing/models/publiccontract.py | 1 | 4026 | # ------------------------------------------------------------------------------
# Copyright (c) 2010-2013, EVEthing team
# 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... | bsd-2-clause | -2,238,725,556,423,410,200 | 42.76087 | 131 | 0.68157 | false |
bitcoinec/bitcoinec | qa/rpc-tests/test_framework/mininode.py | 18 | 55213 | #!/usr/bin/env python3
# Copyright (c) 2010 ArtForz -- public domain half-a-node
# Copyright (c) 2012 Jeff Garzik
# Copyright (c) 2010-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# mininode.p... | mit | -6,504,394,193,462,515,000 | 29.555064 | 262 | 0.573361 | false |
michaeljoseph/cookiecutter | cookiecutter/find.py | 1 | 1034 | # -*- coding: utf-8 -*-
"""Functions for finding Cookiecutter templates and other components."""
import logging
import os
from cookiecutter.exceptions import NonTemplatedInputDirException
logger = logging.getLogger(__name__)
def find_template(repo_dir):
"""Determine which child directory of `repo_dir` is the ... | bsd-3-clause | -4,415,473,042,776,241,000 | 29.411765 | 79 | 0.689555 | false |
dangra/scrapy-sci | setup.py | 1 | 1322 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
readme = open('README.rst').read()
history = open('HISTORY.rst').read().replace('.. :changelog:', '')
requirements = [
# TODO: put package requireme... | bsd-3-clause | -756,883,268,587,011,100 | 23.481481 | 69 | 0.626324 | false |
TiKeil/Master-thesis-LOD | python_files/tests/tests/MonteCarlo_Coefficient_4.py | 1 | 9096 | import os
import sys
import numpy as np
import scipy.sparse as sparse
import scipy.stats as stats
import random
import csv
import matplotlib.pyplot as plt
from visualize import drawCoefficient
from data import *
from gridlod import interp, coef, util, fem, world, linalg, femsolver
import pg_rand, femsolverCoarse, bu... | apache-2.0 | -2,205,497,332,147,814,400 | 31.841155 | 194 | 0.543865 | false |
proxysh/Safejumper-for-Desktop | buildlinux/env64/lib/python2.7/site-packages/twisted/cred/test/test_cred.py | 13 | 13589 | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests for L{twisted.cred}, now with 30% more starch.
"""
from __future__ import absolute_import, division
from zope.interface import implementer, Interface
from binascii import hexlify, unhexlify
from twisted.trial import unittest
from twi... | gpl-2.0 | 1,550,437,384,784,342,500 | 29.814059 | 79 | 0.609169 | false |
leezu/mxnet | tests/python/unittest/test_gluon_data.py | 3 | 23820 | # 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 | -8,165,386,192,729,708,000 | 38.568106 | 119 | 0.623426 | false |
jimallman/temporal-modelling | source/ResourceLibrary.py | 1 | 39272 | ##
## Copyright 2010 by the Rector and Visitors of the University of Virginia
##
## 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/LIC... | apache-2.0 | -8,110,495,114,696,879,000 | 44.420804 | 196 | 0.666327 | false |
scootergrisen/virtaal | virtaal/plugins/tm/models/tinytm.py | 4 | 5263 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2008-2011 Zuza Software Foundation
# Copyright 2014 F Wolff
#
# This file is part of Virtaal.
#
# 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 Fo... | gpl-2.0 | 1,360,874,650,982,526,700 | 33.175325 | 128 | 0.583698 | false |
olivierdalang/QGIS | tests/code_layout/doxygen_parser.py | 6 | 24239 | # -*- coding: utf-8 -*-
"""
***************************************************************************
mocked
---------------------
Date : May 2017
Copyright : (C) 2017 by Denis Rouzaud
Email : denis.rouzaud@gmail.com
**************************************... | gpl-2.0 | 2,371,958,975,442,173,000 | 37.658692 | 175 | 0.526136 | false |
rosarior/mayan | apps/checkouts/events.py | 2 | 1228 | from django.utils.translation import ugettext_lazy as _
HISTORY_DOCUMENT_CHECKED_OUT = {
'namespace': 'checkouts', 'name': 'document_checked_out',
'label': _(u'Document checked out'),
'summary': _(u'Document "%(document)s" checked out by %(fullname)s.'),
'expressions': {'fullname': 'user.get_full_name(... | gpl-3.0 | 8,579,461,176,201,736,000 | 42.857143 | 89 | 0.656352 | false |
Pointedstick/ReplicatorG | skein_engines/skeinforge-40/skeinforge_application/skeinforge_plugins/analyze_plugins/skeinlayer.py | 2 | 29183 | """
This page is in the table of contents.
Skeinlayer is a script to display each layer of a gcode file.
The skeinlayer manual page is at:
http://fabmetheus.crsndoo.com/wiki/index.php/Skeinforge_Skeinlayer
Skeinlayer is derived from Nophead's preview script. The extruded lines are in the resistor colors red, orange,... | gpl-2.0 | -7,832,921,377,551,226,000 | 50.198246 | 957 | 0.769283 | false |
libvirt/libvirt-test-API | libvirttestapi/repos/domain/domain_name.py | 1 | 1810 | # Copyright (C) 2010-2012 Red Hat, Inc.
# This work is licensed under the GNU GPLv2 or later.
# To test "virsh domname" command
from libvirttestapi.utils import process
required_params = ()
optional_params = {}
VIRSH_DOMNAME = "virsh domname"
VIRSH_IDS = "virsh --quiet list |awk '{print $1}'"
VIRSH_DOMS = "virsh --q... | gpl-2.0 | 2,441,313,483,463,076,400 | 25.617647 | 79 | 0.578453 | false |
javierrodriguezcuevas/git-cola | cola/models/prefs.py | 1 | 6045 | from __future__ import division, absolute_import, unicode_literals
import sys
from .. import core
from .. import hidpi
from .. import observable
from .. import utils
from ..cmd import Command
BACKGROUND_EDITOR = 'cola.backgroundeditor'
BLAME_VIEWER = 'cola.blameviewer'
BOLD_HEADERS = 'cola.boldheaders'
CHECKCONFLIC... | gpl-2.0 | -2,676,137,785,137,438,700 | 26.477273 | 76 | 0.67957 | false |
debugger06/MiroX | tv/osx/plat/frontends/widgets/drawingwidgets.py | 3 | 3025 | # Miro - an RSS based video player application
# Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011
# Participatory Culture Foundation
#
# 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; eithe... | gpl-2.0 | 4,768,326,888,688,978,000 | 44.149254 | 119 | 0.728264 | false |
openstack/neutron | neutron/objects/quota.py | 2 | 5331 | # Copyright (c) 2016 Intel 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
#
# Unless req... | apache-2.0 | 7,260,780,459,108,543,000 | 33.843137 | 78 | 0.633089 | false |
Gazzonyx/samba | third_party/waf/wafadmin/Task.py | 32 | 34311 | #!/usr/bin/env python
# encoding: utf-8
# Thomas Nagy, 2005-2008 (ita)
"""
Running tasks in parallel is a simple problem, but in practice it is more complicated:
* dependencies discovered during the build (dynamic task creation)
* dependencies discovered after files are compiled
* the amount of tasks and dependencies ... | gpl-3.0 | 2,687,789,399,678,374,400 | 27.616347 | 159 | 0.663228 | false |
rue89-tech/edx-analytics-dashboard | analytics_dashboard/courses/tests/test_views/test_engagement.py | 3 | 12401 | from ddt import ddt
import mock
from mock import patch, Mock
import httpretty
from django.test import TestCase
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext_lazy as _
import analyticsclient.constants.activity_type as AT
from courses.tests.factories import CourseEngagement... | agpl-3.0 | -7,601,700,950,755,360,000 | 42.975177 | 118 | 0.66535 | false |
realsobek/freeipa | ipatests/test_webui/test_pwpolicy.py | 5 | 1697 | # Authors:
# Petr Vobornik <pvoborni@redhat.com>
#
# Copyright (C) 2013 Red Hat
# see file 'COPYING' for use and warranty information
#
# 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 ... | gpl-3.0 | 3,548,179,279,743,340,500 | 28.77193 | 71 | 0.649381 | false |
infoxchange/lettuce | tests/unit/test_server.py | 17 | 1228 | # -*- coding: utf-8 -*-
# <Lettuce - Behaviour Driven Development for python>
# Copyright (C) <2010-2012> Gabriel Falcão <gabriel@nacaolivre.org>
#
# 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 Foundatio... | gpl-3.0 | -8,531,463,943,411,658,000 | 36.181818 | 71 | 0.737571 | false |
raccoongang/edx-platform | lms/djangoapps/instructor/enrollment_report.py | 24 | 3296 | """
Defines abstract class for the Enrollment Reports.
"""
import abc
import collections
import json
from django.contrib.auth.models import User
from student.models import UserProfile
class AbstractEnrollmentReportProvider(object):
"""
Abstract interface for Detailed Enrollment Report Provider
"""
... | agpl-3.0 | 1,205,670,733,924,950,300 | 31.633663 | 81 | 0.622573 | false |
yajiedesign/mxnet | python/mxnet/optimizer/utils.py | 9 | 1777 | # 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
# "License"... | apache-2.0 | 1,184,993,605,800,009,000 | 40.325581 | 89 | 0.691052 | false |
stefanv/aandete | app/lib/paste/debug/profile.py | 50 | 7607 | # (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
"""
Middleware that profiles the request and displays profiling
information at the bottom of each page.
"""
import sys
import os
import hotshot
impor... | bsd-3-clause | -7,894,136,446,469,683,000 | 32.364035 | 84 | 0.568424 | false |
dwavesystems/dimod | tests/test_polytruncatecomposite.py | 1 | 2368 | # Copyright 2019 D-Wave Systems 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... | apache-2.0 | -3,437,323,772,655,248,000 | 34.878788 | 95 | 0.660051 | false |
subodhchhabra/airflow | tests/contrib/operators/test_segment_track_event_operator.py | 42 | 2088 | # -*- 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 | -7,119,401,674,845,474,000 | 31.625 | 80 | 0.697318 | false |
ZuluPro/abdallah | abdallah/rest/viewsets.py | 1 | 1371 | from django.shortcuts import get_object_or_404
from rest_framework import viewsets
from rest_framework.decorators import detail_route
from rest_framework.response import Response
from abdallah.models import Project, Build, Job
from abdallah.rest import serializers
class ProjectViewSet(viewsets.ModelViewSet):
quer... | bsd-3-clause | 4,440,280,404,797,743,000 | 34.153846 | 81 | 0.718454 | false |
sonaht/ansible | lib/ansible/modules/network/nxos/nxos_vtp_version.py | 46 | 5735 | #!/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,200,573,338,479,495,700 | 26.309524 | 79 | 0.623888 | false |
bbc/kamaelia | Code/Python/Kamaelia/Kamaelia/Visualisation/PhysicsGraph/__init__.py | 3 | 3471 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1)
#
# (1) Kamaelia Contributors are listed in the AUTHORS file and at
# http://www.kamaelia.org/AUTHORS - please extend this file,
# not this notice.
#
# Licensed under the Apache License,... | apache-2.0 | 6,212,373,356,702,578,000 | 34.060606 | 79 | 0.581389 | false |
sajuptpm/magnum | magnum/common/pythonk8sclient/client/models/V1beta3_Lifecycle.py | 15 | 1913 | #!/usr/bin/env python
"""
Copyright 2015 Reverb Technologies, 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 require... | apache-2.0 | -1,163,022,930,754,847,200 | 34.425926 | 220 | 0.634083 | false |
arborworkflows/ArborWebApps | treeExplorer/service/listItemsInCollection.py | 5 | 1433 |
import json
import string
import requests
import tangelo
def run(collectionName=None):
# Create an empty response object.
response = {}
collectionNames = []
# look through the collections in girder. Return a list of collections that are in this local # Arbor instance
girderlocation = 'http://lo... | apache-2.0 | -5,685,020,270,118,348,000 | 30.152174 | 114 | 0.671319 | false |
cosim/zerorpc-python | tests/test_middleware_client.py | 102 | 12192 | # -*- coding: utf-8 -*-
# Open Source Initiative OSI - The MIT License (MIT):Licensing
#
# The MIT License (MIT)
# Copyright (c) 2012 DotCloud Inc (opensource@dotcloud.com)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Softwa... | mit | 5,091,339,135,524,437,000 | 31.686327 | 81 | 0.674459 | false |
akretion/connector | connector/checkpoint/checkpoint.py | 1 | 9460 | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Guewen Baconnier
# 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
# pu... | agpl-3.0 | 8,207,099,585,244,588,000 | 40.130435 | 85 | 0.518182 | false |
gg7/sentry | src/sentry/interfaces/exception.py | 12 | 11093 | """
sentry.interfaces.exception
~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
__all__ = ('Exception',)
from django.conf import settings
from sentry.interfaces.base impor... | bsd-3-clause | 4,577,838,370,213,464,000 | 29.226158 | 92 | 0.547913 | false |
agileblaze/OpenStackTwoFactorAuthentication | openstack_dashboard/dashboards/project/data_processing/data_sources/views.py | 18 | 2196 | # 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
# distributed under the... | apache-2.0 | -3,622,193,572,903,820,300 | 34.419355 | 77 | 0.732696 | false |
PHOTOX/fuase | ase/ase/data/tmgmjbp04n.py | 11 | 19755 | # Generated: 2012-01-11
# doi:10.1063/1.1788656 neutral dimers only
from numpy import array
data = {
'Sc': {'charges': None,
'database': 'TMGMJBP04N',
'magmoms': [1.0],
'name': 'Sc',
'positions': array([[ 0., 0., 0.]]),
'symbols': 'Sc'},
'Ti': {'charges':... | gpl-2.0 | 8,439,975,580,856,800,000 | 33.657895 | 49 | 0.274158 | false |
jupitercoin/jupitercoin-v1.1--diff-update- | qa/rpc-tests/test_framework/scrypt_auxpow.py | 2 | 3043 | #!/usr/bin/env python
# Copyright (c) 2014 Daniel Kraft
# Copyright (c) 2015 The Jupitercoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# General code for scrypt auxpow testing. This includes routines to
# so... | mit | -7,610,289,672,699,377,000 | 27.980952 | 76 | 0.681564 | false |
zuphilip/ocropy | ocrolib/extras/cairoextras.py | 9 | 2346 | import ctypes
import cairo
# from: http://cairographics.org/freetypepython/
class PycairoContext(ctypes.Structure):
_fields_ = [("PyObject_HEAD", ctypes.c_byte * object.__basicsize__),
("ctx", ctypes.c_void_p),
("base", ctypes.c_void_p)]
_initialized = False
def create_cairo_font_face_for_file(fi... | apache-2.0 | -3,221,845,798,708,706,300 | 38.1 | 107 | 0.657289 | false |
bhupennewalkar1337/erpnext | erpnext/config/projects.py | 3 | 1509 | from __future__ import unicode_literals
from frappe import _
def get_data():
return [
{
"label": _("Projects"),
"icon": "icon-star",
"items": [
{
"type": "doctype",
"name": "Project",
"description": _("Project master."),
},
{
"type": "doctype",
"name": "Task",
"des... | gpl-3.0 | -3,666,984,021,390,086,000 | 18.346154 | 59 | 0.479125 | false |
flaviovdf/tribeflow | tribeflow/sorting/tests/test_sort.py | 2 | 1369 | #-*- coding: utf8
from __future__ import division, print_function
from tribeflow.sorting.introsort import _sort
from numpy.testing import assert_equal
from numpy.testing import assert_array_equal
import numpy as np
def test__sort():
data = np.array([], dtype='d', order='C')
_sort(data)
assert_array_equa... | bsd-3-clause | 2,400,989,831,708,676,600 | 26.38 | 65 | 0.585829 | false |
adeshmukh/learntosolveit | languages/python/algorithm_spelling.py | 7 | 1031 | import re, collections
def words(text): return re.findall('[a-z]+', text.lower())
def train(features):
model = collections.defaultdict(lambda: 1)
for f in features:
model[f] += 1
return model
NWORDS = train(words(file('big.txt').read()))
alphabet = 'abcdefghijklmnopqrstuvwxyz'
def edits1(word):... | bsd-3-clause | -3,281,640,367,960,298,000 | 33.366667 | 85 | 0.636275 | false |
arruda/mediana_aa | tests/test_select_mediana.py | 1 | 1189 | # -*- coding: utf-8 -*-
import unittest
from mediana import select_mediana
class TestSelectMediana(unittest.TestCase):
def test_media_em_exemplo_5_elementos(self):
s = [1, 2, 4, 10, 13]
k = (len(s) + 1) / 2 #: 2
mediana = select_mediana(s, k)
self.assertEquals(mediana, 4)
... | mit | 1,922,591,476,289,863,200 | 25.422222 | 59 | 0.534903 | false |
DarthMaulware/EquationGroupLeaks | Leak #5 - Lost In Translation/windows/Resources/GRDO/Tools/i386/analyzeMFT.py | 1 | 32632 | #!/usr/bin/env python
noGUI = True
unicodeHack = True
import struct, sys, ctypes, re, time, unicodedata, csv, binascii, os, platform
from datetime import date, datetime, timedelta
from optparse import OptionParser
# Globals
SIAttributeSizeXP = 72
SIAttributeSizeNT = 48
if noGUI == False:
if pl... | unlicense | -5,490,572,374,061,385,000 | 31.566866 | 221 | 0.621445 | false |
HybridF5/tempest | tempest/api/compute/admin/test_aggregates.py | 6 | 10648 | # Copyright 2013 NEC 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
#
# Unless required... | apache-2.0 | -7,166,196,822,807,692,000 | 46.748879 | 78 | 0.646694 | false |
cjqian/incubator-airflow | airflow/contrib/operators/bigquery_check_operator.py | 18 | 4637 | # -*- 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,244,806,103,211,460,000 | 36.096 | 101 | 0.674143 | false |
MeteorAdminz/viper | viper/common/out.py | 4 | 3847 | # -*- coding: utf-8 -*-
# This file is part of Viper - https://github.com/viper-framework/viper
# See the file 'LICENSE' for copying permission.
try:
from terminaltables import AsciiTable
HAVE_TERMTAB = True
except:
HAVE_TERMTAB = False
import textwrap
from viper.common.colors import cyan, yellow, red, g... | bsd-3-clause | -7,368,233,565,094,316,000 | 35.638095 | 96 | 0.489212 | false |
fallen/artiq | artiq/py2llvm/values.py | 2 | 2852 | from types import SimpleNamespace
from copy import copy
import llvmlite_artiq.ir as ll
class VGeneric:
def __init__(self):
self.llvm_value = None
def new(self):
r = copy(self)
r.llvm_value = None
return r
def __repr__(self):
return "<" + self.__class__.__name__ +... | gpl-3.0 | -6,064,673,247,013,729,000 | 29.340426 | 79 | 0.54453 | false |
mvo5/snappy | tests/main/interfaces-network-status-classic/fake-portal-network-monitor.py | 7 | 2225 | #!/usr/bin/python3
import os
import sys
import dbus.service
import dbus.mainloop.glib
from gi.repository import GLib
BUS_NAME = "org.freedesktop.portal.Desktop"
OBJECT_PATH = "/org/freedesktop/portal/desktop"
NETWORK_MONITOR_IFACE = "org.freedesktop.portal.NetworkMonitor"
class Portal(dbus.service.Object):
de... | gpl-3.0 | -6,726,202,213,183,486,000 | 23.722222 | 87 | 0.624719 | false |
Azure/azure-sdk-for-python | sdk/anomalydetector/azure-ai-anomalydetector/azure/ai/anomalydetector/operations/_anomaly_detector_client_operations.py | 1 | 30070 | # 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 may ... | mit | 7,191,668,309,587,838,000 | 45.190476 | 133 | 0.637712 | false |
sudkannan/xen-hv | tools/xm-test/tests/cpupool/03_cpupool_domain.py | 36 | 2838 | #!/usr/bin/python
import sys
import re
import time
from XmTestLib import *
from pools import *
checkRequirements()
#
# create Pool-1 with 1 CPU and start a VM
#
createStdPool()
name = "TestDomPool-1"
domain = XmTestDomain(extraConfig={'pool' : 'Pool-1'}, name=name)
try:
domain.start(noConsole=True)
except Doma... | gpl-2.0 | 923,966,465,198,083,600 | 21.52381 | 68 | 0.647992 | false |
zycdragonball/tensorflow | tensorflow/contrib/distributions/python/kernel_tests/bijectors/affine_test.py | 8 | 32389 | # 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,728,507,977,068,099,000 | 37.330178 | 91 | 0.563586 | false |
yosshy/nova | nova/api/openstack/compute/keypairs.py | 13 | 11606 | # 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 | 6,601,792,388,540,520,000 | 36.43871 | 79 | 0.594434 | false |
SirAnthony/marvin-xmpp | modulemanager.py | 1 | 8878 |
import sys
import os
import imp
from traceback import format_exception
class Module:
def __init__(self, name, module, obj, functions):
self.name = name
self.module = module
self.object = obj
self.functions = functions
self.aliases = obj.aliases if hasattr(obj, 'aliases') e... | mit | 2,929,908,910,668,652,500 | 33.544747 | 109 | 0.49189 | false |
trac-ja/trac-ja | doc/utils/checkapidoc.py | 2 | 6270 | # -*- coding: utf-8 -*-
"""Trac API doc checker
Verify that all symbols belonging to modules already documented in the doc/api
Sphinx sources are referenced.
See http://trac.edgewall.org/wiki/TracDev/ApiDocs
"""
import fnmatch
import os
import re
import sys
excluded_docs = ['index.rst']
api_doc = 'doc/api'
def u... | bsd-3-clause | 5,669,423,724,046,707,000 | 35.666667 | 80 | 0.517544 | false |
rkq/cxxexp | third-party/src/boost_1_56_0/libs/python/test/properties.py | 46 | 1989 | # Copyright David Abrahams 2004. Distributed under the Boost
# Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
"""
This is test module for properties.
>>> r = properties.ret_type()
>>> r.i = 22.5
>>> r.i
22.5
>>> c = properties.crash_me()
>>> c.i... | mit | -3,873,994,857,562,851,000 | 17.764151 | 88 | 0.665661 | false |
AndrewPeelMV/Blender2.78c | 2.78/scripts/templates_py/operator_mesh_add.py | 3 | 3261 | import bpy
import bmesh
def add_box(width, height, depth):
"""
This function takes inputs and returns vertex and face arrays.
no actual mesh data creation is done here.
"""
verts = [(+1.0, +1.0, -1.0),
(+1.0, -1.0, -1.0),
(-1.0, -1.0, -1.0),
(-1.0, +1.0, -1.... | gpl-2.0 | -7,848,024,896,450,159,000 | 23.335821 | 75 | 0.481141 | false |
IDEALLab/domain_expansion_jmd_2017 | gpc.py | 1 | 2902 | """
Gaussian processes classification that computes the variance
Author(s): Wei Chen (wchen459@umd.edu)
References:
-----------
http://scikit-learn.org/stable/modules/generated/sklearn.gaussian_process.GaussianProcessClassifier
"""
import numpy as np
from scipy.linalg import solve
from scipy.special import erf
fro... | mit | -6,060,286,231,814,617,000 | 37.693333 | 99 | 0.604755 | false |
geotagx/pybossa | pybossa/sentinel/__init__.py | 1 | 1378 | # -*- coding: utf8 -*-
# This file is part of PyBossa.
#
# Copyright (C) 2015 SciFabric LTD.
#
# PyBossa is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your op... | agpl-3.0 | 2,157,146,855,135,474,000 | 37.277778 | 77 | 0.670537 | false |
clinicalml/gumbel-max-scm | pymdptoolbox/src/mdptoolbox/__init__.py | 6 | 3136 | # -*- coding: utf-8 -*-
"""Markov Decision Process (MDP) Toolbox
=====================================
The MDP toolbox provides classes and functions for the resolution of
descrete-time Markov Decision Processes.
Available modules
-----------------
:mod:`~mdptoolbox.example`
Examples of transition and reward mat... | mit | -3,355,570,655,434,036,000 | 37.243902 | 79 | 0.735013 | false |
cycomachead/info290 | project/code/analysis/reviews_rf.py | 1 | 3635 | from pandas import *
from sklearn.ensemble import RandomForestClassifier
import numpy as np
import random
STYLE = "American_Brown_Ale"
""" Performs cross validation on data using random forest
Returns the average score.
Percent is the percentage of data to use as validation,
this should be an integer, not... | bsd-2-clause | -3,980,155,234,674,164,000 | 28.795082 | 89 | 0.58762 | false |
jds2001/ocp-checkbox | plainbox/plainbox/impl/commands/crash.py | 2 | 2139 | # This file is part of Checkbox.
#
# Copyright 2013 Canonical Ltd.
# Written by:
# Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
#
# Checkbox 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 versio... | gpl-3.0 | 8,905,315,146,401,546,000 | 27.905405 | 70 | 0.624123 | false |
googlei18n/nototools | nototools/unicode_data.py | 3 | 57675 | #!/usr/bin/env python
# -*- coding: utf-8 -*-#
# Copyright 2014 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... | apache-2.0 | -2,052,905,957,902,834,400 | 32.051576 | 101 | 0.625488 | false |
amitdhiman000/dais | politics/urls.py | 1 | 1894 | """MyOffers URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-based views... | apache-2.0 | 4,509,953,720,459,622,000 | 56.424242 | 115 | 0.733369 | false |
zero-os/0-orchestrator | templates/zerotier/actions.py | 2 | 3468 | def _get_client(job, token):
from zeroos.orchestrator.sal.Node import Node
return Node.from_ays(job.service.parent, token).client
def _get_network(job, token):
client = _get_client(job, token)
for net in client.zerotier.list():
if net['id'] == job.service.model.data.nwid:
return ne... | apache-2.0 | -3,469,933,869,409,491,000 | 35.893617 | 105 | 0.658593 | false |
SMALLplayer/smallplayer-image-creator | storage/.xbmc/addons/plugin.audio.jazzradio.com/default.py | 1 | 18506 | ########################################
# JazzRadio.com XBMC plugin
# by Tim C. 'Bitcrusher' Steinmetz
# http://qualisoft.dk
# Github: https://github.com/Bitcrusher/Jazzradio-com-XBMC-plugin.git
# Git Read-only: git://github.com/Bitcrusher/Jazzradio-com-XBMC-plugin.git
#
# This Program is free software; y... | gpl-2.0 | 3,916,617,286,877,704,000 | 42.700483 | 242 | 0.681941 | false |
nickubels/qlinkplanner | qlinkplanner/settings.py | 1 | 4429 | """
Django settings for qlinkplanner project.
Generated by 'django-admin startproject' using Django 1.11.3.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""
impo... | mit | -2,883,870,867,445,334,000 | 24.900585 | 91 | 0.641002 | false |
testmana2/test | Helpviewer/WebPlugins/WebPluginInterface.py | 2 | 1760 | # -*- coding: utf-8 -*-
# Copyright (c) 2012 - 2015 Detlev Offenbach <detlev@die-offenbachs.de>
#
"""
Module implementing the web plug-in interface.
"""
from __future__ import unicode_literals
class WebPluginInterface(object):
"""
Class implementing the web plug-in interface.
"""
def metaPlugin(se... | gpl-3.0 | 712,451,422,128,389,100 | 29.877193 | 78 | 0.636932 | false |
GNOME/orca | test/keystrokes/firefox/object_nav_links_in_text.py | 1 | 7815 | #!/usr/bin/python
"""Test of object navigation."""
from macaroon.playback import *
import utils
sequence = MacroSequence()
#sequence.append(WaitForDocLoad())
sequence.append(PauseAction(5000))
# Work around some new quirk in Gecko that causes this test to fail if
# run via the test harness rather than manually.
se... | lgpl-2.1 | -7,822,783,101,107,612,000 | 36.037915 | 115 | 0.689827 | false |
tensorflow/models | official/nlp/bert/squad_evaluate_v1_1.py | 1 | 3724 | # Copyright 2021 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 | -89,582,168,707,521,360 | 34.132075 | 94 | 0.69522 | false |
sebastic/QGIS | python/plugins/db_manager/dlg_export_vector.py | 3 | 8136 | # -*- coding: utf-8 -*-
"""
/***************************************************************************
Name : DB Manager
Description : Database manager plugin for QGIS
Date : Oct 13, 2011
copyright : (C) 2011 by Giuseppe Sucameli
email : brush.tyler@... | gpl-2.0 | 1,475,234,151,142,240,000 | 38.495146 | 116 | 0.580261 | false |
DecipherOne/Troglodyte | Trog Build Dependencies/Python26/Lib/test/test_winreg.py | 2 | 9459 | # Test the windows specific win32reg module.
# Only win32reg functions not hit here: FlushKey, LoadKey and SaveKey
from _winreg import *
import os, sys
import unittest
from test import test_support
threading = test_support.import_module("threading")
from platform import machine
test_key_name = "SOFTWARE\\Python Regi... | mit | 5,052,397,931,946,083,000 | 39.596567 | 78 | 0.563485 | false |
Catnipz/Catnip-Cogs | avatarchange/avatarchange.py | 1 | 1594 | import discord
import json
import os
import asyncio
from discord.ext import commands
from .utils.dataIO import dataIO
class avatarchange:
"""Automatically change bot profile picture"""
def __init__(self, bot):
self.bot = bot
self.settings = dataIO.json_load('data/luna/settings.json')
@co... | gpl-3.0 | -520,928,650,877,356,700 | 23.523077 | 76 | 0.55458 | false |
lfaraone/ausctools | setup.py | 1 | 1100 | # Always prefer setuptools over distutils
from setuptools import setup, find_packages
setup(
name='ausctools',
version='0.1',
description='Tools for generating reports for English Wikipedia functionary activity',
url='https://github.com/lfaraone/ausctools',
author='Luke Faraone',
author_email=... | gpl-2.0 | 4,548,408,622,656,852,000 | 25.829268 | 90 | 0.590909 | false |
rg3/youtube-dl | youtube_dl/extractor/udemy.py | 2 | 19323 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..compat import (
compat_HTTPError,
compat_kwargs,
compat_str,
compat_urllib_request,
compat_urlparse,
)
from ..utils import (
determine_ext,
extract_attributes,
ExtractorError,
float_or_none,
... | unlicense | 7,266,053,584,633,176,000 | 39.424686 | 149 | 0.507478 | false |
odashi/chainer_examples | chainer-1.4/mt_s2s_attention.py | 1 | 13718 | #!/usr/bin/python3
import my_settings
import sys
import math
import numpy as np
from argparse import ArgumentParser
from chainer import functions, optimizers
import chainer.computational_graph as cg
import util.generators as gens
from util.functions import trace, fill_batch2
from util.model_file import ModelFile
fr... | mit | -8,451,619,857,469,180,000 | 37.642254 | 114 | 0.548331 | false |
skggm/skggm | examples/estimator_suite.py | 1 | 17686 | """
Suite of estimator comparisons
==============================
Compare inverse covariance estimators and model selection methods.
Derived from example in:
http://scikit-learn.org/stable/auto_examples/covariance/plot_sparse_cov.html
"""
import sys
import numpy as np
import tabulate
import time
from sklearn.grid_s... | mit | -4,417,101,670,352,049,000 | 33.142857 | 88 | 0.600249 | false |
pointhi/kicad-footprint-generator | KicadModTree/tests/datatypes/test_Vector2D.py | 1 | 5520 | # KicadModTree 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.
#
# KicadModTree is distributed in the hope that it will be useful,
# bu... | gpl-3.0 | 6,064,318,419,664,601,000 | 27.601036 | 85 | 0.571196 | false |
ypraveen/avi-heat | avi/heat/resources/action.py | 1 | 16612 | # GENERATED FILE - DO NOT EDIT THIS FILE UNLESS YOU ARE A WIZZARD
#pylint: skip-file
from heat.engine import properties
from heat.engine import constraints
from heat.engine import attributes
from heat.common.i18n import _
from avi.heat.avi_resource import AviResource
from avi.heat.avi_resource import AviNestedResource... | apache-2.0 | -3,698,605,126,283,690,500 | 27.251701 | 463 | 0.602215 | false |
Morgan-Stanley/treadmill | lib/python/treadmill/sproc/appmonitor.py | 2 | 10599 | """Syncronizes cell Zookeeper with LDAP data.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import collections
import itertools
import logging
import math
import time
import click
import six
from treadmill im... | apache-2.0 | -4,280,549,583,378,512,000 | 32.330189 | 79 | 0.55543 | false |
pantsbuild/pants | tests/python/pants_test/pantsd/service/test_pants_service.py | 4 | 1756 | # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import threading
import pytest
from pants.pantsd.service.pants_service import PantsService
class RunnableTestService(PantsService):
def run(self):
pass
@pytest.fixture
de... | apache-2.0 | -1,526,787,788,519,844,900 | 29.275862 | 94 | 0.722096 | false |
vineethtw/fusion | fusion/common/config.py | 1 | 5617 |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -5,267,703,576,715,912,000 | 31.097143 | 78 | 0.612961 | false |
esmoyon1/GeonodeV1 | geonode/base/__init__.py | 7 | 1280 | # -*- coding: utf-8 -*-
#########################################################################
#
# Copyright (C) 2016 OSGeo
#
# 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 ... | gpl-3.0 | 9,109,169,835,199,277,000 | 39 | 91 | 0.645313 | false |
HyperloopTeam/FullOpenMDAO | lib/python2.7/site-packages/zope.interface-3.6.1-py2.7-macosx-10.10-x86_64.egg/zope/interface/tests/odd.py | 50 | 3130 | ##############################################################################
#
# Copyright (c) 2003 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOF... | gpl-2.0 | 9,006,141,493,095,993,000 | 22.89313 | 78 | 0.50639 | false |
rahuldhote/odoo | openerp/http.py | 66 | 61060 | # -*- coding: utf-8 -*-
#----------------------------------------------------------
# OpenERP HTTP layer
#----------------------------------------------------------
import ast
import collections
import contextlib
import datetime
import errno
import functools
import getpass
import inspect
import logging
import mimetypes... | agpl-3.0 | 8,174,387,106,085,391,000 | 36.972637 | 178 | 0.581232 | false |
Densvin/RSSVK | vkfeed/utils.py | 1 | 3711 | '''Various utility functions.'''
from __future__ import unicode_literals
import calendar
import cgi
import datetime
import httplib
import logging
import os
import re
if not os.getenv('RSSvk_TESTS'):
import google.appengine.api.urlfetch as urlfetch
from google.appengine.ext.webapp import template
from vkfeed... | bsd-2-clause | -4,000,278,410,973,525,000 | 28.452381 | 96 | 0.582592 | 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.