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 |
|---|---|---|---|---|---|---|---|---|---|---|
wrouesnel/ansible | lib/ansible/plugins/callback/full_skip.py | 25 | 2290 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
# (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
... | gpl-3.0 | 5,615,647,055,135,321,000 | 30.805556 | 97 | 0.647162 | false |
Sergiojimenez/criticas_del_doctor_Mabuse | node_modules/gulp-sass/node_modules/node-sass/node_modules/node-gyp/gyp/PRESUBMIT.py | 1369 | 3662 | # Copyright (c) 2012 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.
"""Top-level presubmit script for GYP.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit API built... | mit | -6,909,142,546,696,017,000 | 25.729927 | 77 | 0.623157 | false |
jithinbp/pslab-desktop-apps | psl_res/GUI/Z_SCHOOL_LEVEL/A_voltage_fundamentals/K_LDR.py | 2 | 3951 | #!/usr/bin/python
"""
::
This experiment is used to study........
"""
from __future__ import print_function
from PSL_Apps.utilitiesClass import utilitiesClass
from PSL_Apps.templates import ui_template_graph_nofft as template_graph_nofft
import numpy as np
from PyQt4 import QtGui,QtCore
import pyqtgraph as p... | gpl-3.0 | -426,849,058,224,252,200 | 28.266667 | 169 | 0.703872 | false |
proxysh/Safejumper-for-Mac | buildlinux/env32/lib/python2.7/site-packages/Crypto/PublicKey/pubkey.py | 125 | 8221 | #
# pubkey.py : Internal functions for public key operations
#
# Part of the Python Cryptography Toolkit
#
# Written by Andrew Kuchling, Paul Swartz, and others
#
# ===================================================================
# The contents of this file are dedicated to the public domain. To
# the extent th... | gpl-2.0 | -7,466,906,361,580,820,000 | 33.254167 | 86 | 0.619389 | false |
eMerzh/Diamond-1 | src/diamond/handler/g_metric.py | 52 | 2760 | # coding=utf-8
"""
Emulate a gmetric client for usage with
[Ganglia Monitoring System](http://ganglia.sourceforge.net/)
"""
from Handler import Handler
import logging
try:
import gmetric
except ImportError:
gmetric = None
class GmetricHandler(Handler):
"""
Implements the abstract Handler class, send... | mit | -7,917,457,484,803,976,000 | 23.642857 | 76 | 0.514493 | false |
groschovskiy/lerigos_music | Server/API/lib/bson/min_key.py | 55 | 1324 | # Copyright 2010-2015 MongoDB, 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 writin... | apache-2.0 | 2,853,858,879,797,168,000 | 25.48 | 74 | 0.651057 | false |
sharadagarwal/autorest | AutoRest/Generators/Python/Python.Tests/AcceptanceTests/file_tests.py | 2 | 5671 | # --------------------------------------------------------------------------
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the ""Software""),... | mit | -714,810,147,437,002,200 | 36.8 | 84 | 0.621979 | false |
openshift/openshift-tools | openshift/installer/vendored/openshift-ansible-3.9.14-1/roles/lib_openshift/src/class/oc_edit.py | 21 | 3384 | # pylint: skip-file
# flake8: noqa
class Edit(OpenShiftCLI):
''' Class to wrap the oc command line tools
'''
# pylint: disable=too-many-arguments
def __init__(self,
kind,
namespace,
resource_name=None,
kubeconfig='/etc/origin/master/ad... | apache-2.0 | -8,052,438,944,740,666,000 | 32.50495 | 107 | 0.502955 | false |
FederatedAI/FATE | python/fate_test/fate_test/flow_test/flow_process.py | 1 | 17149 | import json
import os
import tarfile
import time
from contextlib import closing
from datetime import datetime
import requests
def get_dict_from_file(file_name):
with open(file_name, 'r', encoding='utf-8') as f:
json_info = json.load(f)
return json_info
class Base(object):
def __init__(self, ser... | apache-2.0 | -2,851,475,279,479,799,000 | 42.525381 | 126 | 0.580267 | false |
Lambdanaut/crits | crits/campaigns/forms.py | 15 | 2173 | from django import forms
from django.forms.widgets import HiddenInput
from crits.campaigns.campaign import Campaign
from crits.core.forms import add_bucketlist_to_form, add_ticket_to_form
from crits.core.handlers import get_item_names
class AddCampaignForm(forms.Form):
"""
Django form for adding a new Campaig... | mit | -8,334,712,032,930,798,000 | 33.492063 | 74 | 0.640129 | false |
monarch-initiative/monarch-app | tests/behave/steps/selenium-forms.py | 3 | 1359 | ####
#### Steps for operating on the various forms and their results.
####
from behave import *
###
### radio button click
###
@given('I click the "{id}" radio button')
def step_impl(context, id):
webelt = context.browser.find_element_by_id(id)
webelt.click()
###
### Submission.
###
## Submit analyze pheno... | bsd-3-clause | -3,846,750,432,897,417,700 | 25.134615 | 71 | 0.676233 | false |
yousrabk/mne-python | mne/viz/tests/test_misc.py | 17 | 4858 | # Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# Denis Engemann <denis.engemann@gmail.com>
# Martin Luessi <mluessi@nmr.mgh.harvard.edu>
# Eric Larson <larson.eric.d@gmail.com>
# Cathy Nangini <cnangini@gmail.com>
# Mainak Jas <mainak@neuro.hut.fi>
#... | bsd-3-clause | 8,473,609,485,165,179,000 | 34.985185 | 79 | 0.633388 | false |
350dotorg/Django | django/contrib/gis/db/models/fields.py | 400 | 11157 | from django.db.models.fields import Field
from django.db.models.sql.expressions import SQLEvaluator
from django.utils.translation import ugettext_lazy as _
from django.contrib.gis import forms
from django.contrib.gis.db.models.proxy import GeometryProxy
from django.contrib.gis.geometry.backend import Geometry, Geometry... | bsd-3-clause | -161,126,352,176,438,140 | 36.94898 | 117 | 0.626961 | false |
osgcc/ryzom | nel/tools/build_gamedata/processes/clodbank/3_install.py | 3 | 1753 | #!/usr/bin/python
#
# \file 3_install.py
# \brief Install clodbank
# \date 2009-03-10 13:13GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Install clodbank
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program i... | agpl-3.0 | 1,143,301,065,029,545,300 | 29.754386 | 75 | 0.72105 | false |
royc1/gpdb | gpMgmt/bin/gppylib/mainUtils.py | 19 | 22742 | # Line too long - pylint: disable=C0301
# Invalid name - pylint: disable=C0103
"""
mainUtils.py
------------
This file provides a rudimentary framework to support top-level option
parsing, initialization and cleanup logic common to multiple programs.
It also implements workarounds to make other modules we use like
... | apache-2.0 | -8,557,602,960,484,487,000 | 34.534375 | 122 | 0.608434 | false |
endlessm/chromium-browser | third_party/catapult/third_party/cloudstorage/cloudstorage/api_utils.py | 11 | 12009 | # Copyright 2013 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | bsd-3-clause | -4,413,525,626,268,419,000 | 31.991758 | 80 | 0.662586 | false |
kdani3/searx | searx/engines/bing_images.py | 3 | 2634 | """
Bing (Images)
@website https://www.bing.com/images
@provide-api yes (http://datamarket.azure.com/dataset/bing/search),
max. 5000 query/month
@using-api no (because of query limit)
@results HTML (using search portal)
@stable no (HTML can change)
@parse url, title, img_src
... | agpl-3.0 | -2,446,826,301,775,577,600 | 25.877551 | 78 | 0.563781 | false |
cjhak/b2share | invenio/modules/communities/signals.py | 14 | 3231 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2013, 2014 CERN.
#
# Invenio 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... | gpl-2.0 | 8,069,635,877,204,214,000 | 26.853448 | 74 | 0.749304 | false |
getstackd/stackd | vendor/boost-context/tools/build/v2/test/static_and_shared_library.py | 44 | 1094 | #!/usr/bin/python
# Copyright 2002, 2003 Dave Abrahams
# Copyright 2002, 2003, 2005 Vladimir Prus
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
import BoostBuild
t = BoostBuild.Tester(use_test_config=False)
t.write("jamr... | mit | -6,804,140,613,158,794,000 | 27.789474 | 81 | 0.699269 | false |
indhub/mxnet | tools/coreml/converter/_mxnet_converter.py | 41 | 8850 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 | -6,223,411,545,413,807,000 | 37.316017 | 181 | 0.652655 | false |
apache/incubator-singa | tool/opencl/clsrc_to_str.py | 3 | 3166 | #!/usr/bin/python
#
# 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
# "Lice... | apache-2.0 | 8,641,011,227,584,171,000 | 41.213333 | 80 | 0.664561 | false |
AndKe/MAVProxy | MAVProxy/modules/mavproxy_mmap/mmap_server.py | 6 | 1971 | import BaseHTTPServer
import json
import os.path
import thread
import urlparse
DOC_DIR = os.path.join(os.path.dirname(__file__), 'mmap_app')
class Server(BaseHTTPServer.HTTPServer):
def __init__(self, handler, address='', port=9999, module_state=None):
BaseHTTPServer.HTTPServer.__init__(self, (address, port), ... | gpl-3.0 | 6,527,972,530,615,412,000 | 29.796875 | 82 | 0.601218 | false |
udacity/deep-learning | language-translation/problem_unittests.py | 1 | 20559 | import numpy as np
import tensorflow as tf
from tensorflow.python.layers.core import Dense
import itertools
import collections
import helper
def _print_success_message():
print('Tests Passed')
def test_text_to_ids(text_to_ids):
test_source_text = 'new jersey is sometimes quiet during autumn , and it is snow... | mit | -374,803,904,249,020,350 | 48.753027 | 357 | 0.564726 | false |
runtimejs/runtime | deps/v8/tools/release/merge_to_branch.py | 13 | 10549 | #!/usr/bin/env python
# Copyright 2014 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... | apache-2.0 | 7,732,654,756,987,864,000 | 35.375862 | 79 | 0.635226 | false |
molobrakos/home-assistant | homeassistant/components/websocket_api/http.py | 5 | 6900 | """View to accept incoming websocket connection."""
import asyncio
from contextlib import suppress
from functools import partial
import json
import logging
from aiohttp import web, WSMsgType
import async_timeout
from homeassistant.const import EVENT_HOMEASSISTANT_STOP
from homeassistant.core import callback
from home... | apache-2.0 | -9,204,397,512,361,476,000 | 32.333333 | 79 | 0.572754 | false |
Renzo-Olivares/android_kk_kernel_htc_monarudo | Documentation/target/tcm_mod_builder.py | 4981 | 41422 | #!/usr/bin/python
# The TCM v4 multi-protocol fabric module generation script for drivers/target/$NEW_MOD
#
# Copyright (c) 2010 Rising Tide Systems
# Copyright (c) 2010 Linux-iSCSI.org
#
# Author: nab@kernel.org
#
import os, sys
import subprocess as sub
import string
import re
import optparse
tcm_dir = ""
fabric_ops... | gpl-2.0 | 2,773,450,650,529,025,500 | 37.930451 | 162 | 0.572498 | false |
CopeX/odoo | addons/account/report/account_analytic_entries_report.py | 306 | 3879 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 | -2,598,718,204,987,262,500 | 49.376623 | 103 | 0.575406 | false |
angad/libjingle-mac | scons-2.2.0/engine/SCons/Tool/ipkg.py | 14 | 2532 | """SCons.Tool.ipkg
Tool-specific initialization for ipkg.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
The ipkg tool calls the ipkg-build. Its only argument should be the
packages fake_root.
"""
#
# Copyrigh... | bsd-3-clause | -336,516,745,691,473,700 | 36.791045 | 107 | 0.685229 | false |
SebDieBln/QGIS | python/ext-libs/pytz/exceptions.py | 657 | 1333 | '''
Custom exceptions raised by pytz.
'''
__all__ = [
'UnknownTimeZoneError', 'InvalidTimeError', 'AmbiguousTimeError',
'NonExistentTimeError',
]
class UnknownTimeZoneError(KeyError):
'''Exception raised when pytz is passed an unknown timezone.
>>> isinstance(UnknownTimeZoneError(), LookupError)... | gpl-2.0 | -8,459,153,895,597,767,000 | 26.770833 | 78 | 0.726932 | false |
rajathkumarmp/BinPy | BinPy/algorithms/ExpressionConvert.py | 4 | 9668 | def makeCompatible(expr):
'''Used by convertExpression to convert logical operators to english words.'''
expr = expr.replace('~&', ' NAND ')
expr = expr.replace('~|', ' NOR ')
expr = expr.replace('~^', ' XNOR ')
expr = expr.replace('&', ' AND ')
expr = expr.replace('|', ' OR ')
expr = expr.r... | bsd-3-clause | 4,081,134,234,751,134,700 | 37.672 | 101 | 0.450248 | false |
AnishShah/tensorflow | tensorflow/python/data/util/nest.py | 17 | 17827 | # 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 | 5,682,351,320,448,373,000 | 36.530526 | 80 | 0.679082 | false |
zielmicha/pam_ssh | pam_ssh.py | 1 | 1482 | import os
import sys
import pwd
import socket
import json
auth_token = None
def rpc(name, args):
sock = socket.socket(socket.AF_UNIX)
sock.connect('/var/run/pam_ssh.sock')
f = sock.makefile('r+')
f.write(json.dumps([name, args]) + '\n')
f.flush()
resp = int(f.readline())
return resp
def p... | mit | -6,009,037,723,151,387,000 | 21.454545 | 66 | 0.620108 | false |
nkrishnaswami/census | uscensus/data/whooshindex.py | 1 | 3248 | from __future__ import print_function
from __future__ import unicode_literals
from collections import OrderedDict
from whoosh.analysis.filters import StopFilter
from whoosh.analysis import (KeywordAnalyzer, StandardAnalyzer)
from whoosh.filedb.filestore import FileStorage, RamStorage
from whoosh.fields import Schema, ... | apache-2.0 | 4,803,558,129,442,744,000 | 33.924731 | 73 | 0.615148 | false |
arpitprogressive/arpittest | apps/admin/migrations/0012_auto__add_field_subsector_career_guide.py | 1 | 13328 | # -*- 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 field 'SubSector.career_guide'
db.add_column(u'admin_subsector', 'career_guide',
... | bsd-3-clause | 589,842,523,671,612,700 | 79.295181 | 218 | 0.548995 | false |
okolisny/integration_tests | cfme/tests/cloud_infra_common/test_snapshots_rest.py | 1 | 4663 | # -*- coding: utf-8 -*-
import pytest
import fauxfactory
from cfme import test_requirements
from cfme.cloud.provider.openstack import OpenStackProvider
from cfme.common.vm import VM
from cfme.infrastructure.provider import InfraProvider
from cfme.infrastructure.provider.virtualcenter import VMwareProvider
from cfme.u... | gpl-2.0 | -3,708,382,020,540,596,700 | 30.506757 | 86 | 0.668883 | false |
geerlingguy/ansible-modules-extras | monitoring/bigpanda.py | 20 | 5211 | #!/usr/bin/python
DOCUMENTATION = '''
---
module: bigpanda
author: "Hagai Kariti (@hkariti)"
short_description: Notify BigPanda about deployments
version_added: "1.8"
description:
- Notify BigPanda when deployments start and end (successfully or not). Returns a deployment object containing all the parameters for f... | gpl-3.0 | -4,162,750,816,331,604,500 | 29.296512 | 157 | 0.634043 | false |
xuvw/viewfinder | backend/prod/babysitter.py | 13 | 1670 | #!/usr/bin/env python
#
# Copyright 2011 Viewfinder Inc. All Rights Reserved.
"""Babysitter server starts instances of servers defined in a deployment
template.
Each server instance is started, monitored, and restarted as
necessary. Log files for each server are archived to S3 as
appropriate, custom cloud watch metri... | apache-2.0 | 1,311,488,130,185,594,600 | 23.925373 | 72 | 0.714371 | false |
akarki15/mozillians | vendor-local/lib/python/tablib/packages/openpyxl3/writer/workbook.py | 116 | 10769 | # file openpyxl/writer/workbook.py
# Copyright (c) 2010 openpyxl
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy... | bsd-3-clause | -4,148,648,247,367,899,000 | 51.789216 | 168 | 0.653357 | false |
chrismeyersfsu/ansible-modules-core | network/nxos/nxos_vxlan_vtep.py | 27 | 17268 | #!/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 | -3,734,985,602,124,862,000 | 31.828897 | 110 | 0.577948 | false |
robotlinker/robotlinker_core | src/rosbridge_suite/rosbridge_server/src/tornado/curl_httpclient.py | 20 | 19862 | #!/usr/bin/env python
#
# Copyright 2009 Facebook
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | apache-2.0 | -1,064,162,552,540,069,000 | 40.639413 | 90 | 0.615296 | false |
jankeromnes/depot_tools | third_party/gsutil/oauth2_plugin/__init__.py | 51 | 1121 | # Copyright 2011 Google Inc. All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge,... | bsd-3-clause | 5,472,198,004,391,916,000 | 49.954545 | 74 | 0.769848 | false |
mcalmer/spacewalk | backend/common/rhn_pkg.py | 10 | 4128 | #
# Copyright (c) 2008--2016 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public License,
# version 2 (GPLv2). There is NO WARRANTY for this software, express or
# implied, including the implied warranties of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. You should have received a c... | gpl-2.0 | 2,157,320,165,874,124,800 | 29.352941 | 85 | 0.620155 | false |
SatoshiNXSimudrone/sl4a-damon-clone | python/src/Lib/distutils/tests/test_bdist_wininst.py | 47 | 1101 | """Tests for distutils.command.bdist_wininst."""
import unittest
import os
from distutils.dist import Distribution
from distutils.command.bdist_wininst import bdist_wininst
from distutils.tests import support
class BuildWinInstTestCase(support.TempdirManager,
unittest.TestCase):
def te... | apache-2.0 | -6,195,993,804,117,585,000 | 31.382353 | 67 | 0.656676 | false |
ah744/ScaffCC_RKQC | clang/tools/scan-view/Reporter.py | 65 | 8135 | """Methods for reporting bugs."""
import subprocess, sys, os
__all__ = ['ReportFailure', 'BugReport', 'getReporters']
#
class ReportFailure(Exception):
"""Generic exception for failures in bug reporting."""
def __init__(self, value):
self.value = value
# Collect information about a bug.
cl... | bsd-2-clause | -3,733,677,169,329,846,000 | 31.802419 | 105 | 0.579226 | false |
varlog00/Sigil | src/Resource_Files/plugin_launchers/python/sigil_gumboc_tags.py | 6 | 4774 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
from __future__ import unicode_literals
TagNames = [
"A",
"ABBR",
"ACRONYM",
"ADDRESS",
"ALTGLYPH",
"ALTGLYPHDEF",
"ALTGLYPHITEM",
"ANIMATE",
"ANIMATEC... | gpl-3.0 | -3,132,407,543,923,527,700 | 17.152091 | 48 | 0.346041 | false |
chamikaramj/beam | sdks/python/apache_beam/transforms/write_ptransform_test.py | 9 | 4178 | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | apache-2.0 | 8,816,244,651,456,138,000 | 32.15873 | 78 | 0.700096 | false |
rjsproxy/wagtail | wagtail/wagtailadmin/tests/test_widgets.py | 10 | 2561 | from django.test import TestCase
from django.contrib.contenttypes.models import ContentType
from wagtail.wagtailadmin import widgets
from wagtail.wagtailcore.models import Page
from wagtail.tests.testapp.models import SimplePage, EventPage
class TestAdminPageChooserWidget(TestCase):
def setUp(self):
sel... | bsd-3-clause | 4,118,165,669,624,323,000 | 39.015625 | 119 | 0.655213 | false |
imsparsh/python-for-android | python3-alpha/python3-src/Lib/importlib/test/extension/test_case_sensitivity.py | 50 | 1152 | import sys
from test import support
import unittest
from importlib import _bootstrap
from .. import util
from . import util as ext_util
@util.case_insensitive_tests
class ExtensionModuleCaseSensitivityTest(unittest.TestCase):
def find_module(self):
good_name = ext_util.NAME
bad_name = good_name.u... | apache-2.0 | -7,427,643,396,477,557,000 | 26.428571 | 77 | 0.634549 | false |
nathanielvarona/airflow | airflow/migrations/versions/4446e08588_dagrun_start_end.py | 8 | 1400 | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | apache-2.0 | 4,143,054,880,276,355,600 | 30.818182 | 83 | 0.737143 | false |
Dhivyap/ansible | test/units/modules/storage/netapp/test_na_ontap_vscan_scanner_pool.py | 38 | 6534 | # (c) 2018, NetApp, Inc
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
''' unit tests for Ansible module: na_ontap_vscan_scanner_pool '''
from __future__ import print_function
import json
import pytest
from units.compat import unittest
from units.compat.mock import patch... | gpl-3.0 | 4,656,287,166,837,647,000 | 35.502793 | 92 | 0.616927 | false |
ReachingOut/unisubs | bin/update-integration.py | 4 | 2255 | #!/usr/bin/env python
import optparse
import os
import sys
import subprocess
root_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
def optional_dir():
return os.path.join(root_dir, 'optional')
def repo_dir(repo_name):
return os.path.join(root_dir, repo_name)
def get_repo_names():
retur... | agpl-3.0 | -3,270,821,882,048,445,000 | 31.681159 | 77 | 0.621286 | false |
benschulz/servo | tests/wpt/web-platform-tests/tools/pywebsocket/src/test/testdata/handlers/sub/wrong_handshake_sig_wsh.py | 499 | 1859 | # Copyright 2009, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | mpl-2.0 | -4,693,898,114,739,469,000 | 40.311111 | 72 | 0.759548 | false |
tensorflow/agents | tf_agents/policies/random_tf_policy.py | 1 | 7986 | # coding=utf-8
# Copyright 2020 The TF-Agents Authors.
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | apache-2.0 | -3,484,737,187,316,047,400 | 41.705882 | 80 | 0.690834 | false |
jordiclariana/ansible | lib/ansible/module_utils/asa.py | 14 | 4321 | # This code is part of Ansible, but is an independent component.
# This particular file snippet, and this file snippet only, is BSD licensed.
# Modules you write using this snippet, which is embedded dynamically by Ansible
# still belong to the author of the module, and may assign their own license
# to the complete wo... | gpl-3.0 | 5,460,363,249,954,310,000 | 37.580357 | 92 | 0.65957 | false |
SciTools/mo_pack | lib/mo_pack/tests/test_wgdos.py | 3 | 3859 | # (C) British Crown Copyright 2015, Met Office
#
# This file is part of mo_pack.
#
# mo_pack is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation, either version 3 of the License, or
# (at your option) any la... | gpl-3.0 | 4,593,516,665,692,684,000 | 39.621053 | 79 | 0.63462 | false |
NewCell/Call-Text-v1 | jni/pjsip/sources/tests/cdash/cfg_site_sample.py | 107 | 1530 | #
# cfg_site_sample.py - Sample site configuration
#
# Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.com)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License... | gpl-3.0 | 5,001,404,778,936,304,000 | 29.6 | 77 | 0.728758 | false |
Yannig/ansible-modules-core | cloud/amazon/rds.py | 7 | 40737 | #!/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 distributed... | gpl-3.0 | -365,942,730,339,192,900 | 38.704678 | 322 | 0.633159 | false |
TNT-Samuel/Coding-Projects | DNS Server/Source - Copy/Lib/site-packages/toolz/curried/__init__.py | 7 | 2615 | """
Alternate namespace for toolz such that all functions are curried
Currying provides implicit partial evaluation of all functions
Example:
Get usually requires two arguments, an index and a collection
>>> from toolz.curried import get
>>> get(0, ('a', 'b'))
'a'
When we use it in higher order ... | gpl-3.0 | -417,565,616,808,393,100 | 25.15 | 78 | 0.712428 | false |
TeachAtTUM/edx-platform | cms/djangoapps/contentstore/management/commands/reindex_library.py | 18 | 2454 | """ Management command to update libraries' search index """
from __future__ import print_function
from textwrap import dedent
from django.core.management import BaseCommand, CommandError
from opaque_keys.edx.keys import CourseKey
from opaque_keys.edx.locator import LibraryLocator
from contentstore.courseware_index i... | agpl-3.0 | 4,093,019,509,368,758,300 | 36.753846 | 119 | 0.658517 | false |
CVML/scikit-learn | examples/model_selection/plot_underfitting_overfitting.py | 230 | 2649 | """
============================
Underfitting vs. Overfitting
============================
This example demonstrates the problems of underfitting and overfitting and
how we can use linear regression with polynomial features to approximate
nonlinear functions. The plot shows the function that we want to approximate,
wh... | bsd-3-clause | 3,725,141,006,832,607,700 | 37.955882 | 77 | 0.687807 | false |
danuzclaudes/robottelo | tests/foreman/ui/test_template.py | 3 | 10224 | # -*- encoding: utf-8 -*-
"""Test class for Template UI"""
from fauxfactory import gen_string
from nailgun import entities
from robottelo.constants import OS_TEMPLATE_DATA_FILE, SNIPPET_DATA_FILE
from robottelo.datafactory import generate_strings_list, invalid_values_list
from robottelo.decorators import run_only_on, t... | gpl-3.0 | -5,909,588,654,422,227,000 | 33.77551 | 79 | 0.550176 | false |
ClearCorp-dev/odoo | addons/project/company.py | 381 | 1529 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 | -4,455,920,305,487,872,000 | 41.472222 | 84 | 0.631131 | false |
JohnOrlando/gnuradio-bitshark | gr-atsc/src/python/atsc_utils.py | 16 | 2354 | #
# Copyright 2006 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio 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, or (at your option)
# any later version.
#... | gpl-3.0 | -5,531,725,058,651,774,000 | 30.810811 | 84 | 0.650807 | false |
saltstar/spark | python/pyspark/sql/streaming.py | 1 | 40553 | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | apache-2.0 | -8,217,027,726,388,523,000 | 43.514819 | 100 | 0.613937 | false |
demon-ru/iml-crm | addons/crm/report/crm_phonecall_report.py | 12 | 3947 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 | -2,845,947,178,146,741,000 | 43.348315 | 145 | 0.563466 | false |
wakatime/wakatime-unity | Editor/WakaTime/client/wakatime/packages/pygments_py2/pygments/lexers/igor.py | 72 | 16870 | # -*- coding: utf-8 -*-
"""
pygments.lexers.igor
~~~~~~~~~~~~~~~~~~~~
Lexers for Igor Pro.
:copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer, words
from pygments.token import Text, Commen... | cc0-1.0 | -4,939,505,347,875,956,000 | 59.46595 | 80 | 0.635744 | false |
multikatt/CouchPotatoServer | libs/html5lib/trie/datrie.py | 785 | 1166 | from __future__ import absolute_import, division, unicode_literals
from datrie import Trie as DATrie
from six import text_type
from ._base import Trie as ABCTrie
class Trie(ABCTrie):
def __init__(self, data):
chars = set()
for key in data.keys():
if not isinstance(key, text_type):
... | gpl-3.0 | -4,769,590,396,546,399,000 | 25.5 | 66 | 0.600343 | false |
Jorge-Rodriguez/ansible | lib/ansible/modules/system/osx_defaults.py | 9 | 13852 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2014, GeekChimp - Franck Nijhof <franck@geekchimp.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_vers... | gpl-3.0 | 4,307,342,835,637,381,600 | 32.059666 | 150 | 0.534724 | false |
jaredly/codetalker | tests/tokenize/ctokens.py | 1 | 2966 | #!/usr/bin/env python
from util import just_tokenize, make_tests, make_fails, TSTRING, STRING, SSTRING, ID, WHITE, NUMBER, INT, HEX, CCOMMENT, CMCOMMENT, PYCOMMENT, NEWLINE, ANY
def make_single(tok, *tests):
fn = just_tokenize(tok, WHITE)
return make_tests(globals(), tok.__name__, fn, tests)
def fail_single(... | mit | 7,849,862,772,122,954,000 | 17.772152 | 155 | 0.37087 | false |
benrudolph/commcare-hq | corehq/apps/telerivet/tasks.py | 2 | 1692 | from corehq.apps.telerivet.models import TelerivetBackend, IncomingRequest
from corehq.apps.sms.api import incoming as incoming_sms
from corehq.apps.sms.util import strip_plus
from corehq.apps.ivr.api import incoming as incoming_ivr
from celery.task import task
from dimagi.utils.logging import notify_exception
from dja... | bsd-3-clause | 6,432,596,914,690,855,000 | 36.6 | 87 | 0.689716 | false |
tipsybear/actors-simulation | tests/test_viz.py | 1 | 1179 | # test_viz
# Vizualization tests
#
# Author: Benjamin Bengfort <bengfort@cs.umd.edu>
# Created: Sun Dec 06 20:45:32 2015 -0500
#
# Copyright (C) 2015 University of Maryland
# For license information, see LICENSE.txt
#
# ID: test_viz.py [] benjamin@bengfort.com $
"""
Vizualization tests
"""
########################... | mit | -3,124,656,277,638,479,400 | 29.230769 | 83 | 0.509754 | false |
Zhaoyanzhang/-myflasky | venv/lib/python2.7/site-packages/sqlalchemy/sql/util.py | 31 | 24707 | # sql/util.py
# Copyright (C) 2005-2017 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
"""High level utilities which build upon other modules here.
"""
from .. import exc, u... | mit | -3,129,984,243,681,165,000 | 31.423885 | 78 | 0.57506 | false |
mskrzypkows/servo | tests/wpt/web-platform-tests/mixed-content/generic/expect.py | 92 | 4155 | import json, os, urllib, urlparse
def redirect(url, response):
response.add_required_headers = False
response.writer.write_status(301)
response.writer.write_header("access-control-allow-origin", "*")
response.writer.write_header("location", url)
response.writer.end_headers()
response.writer.wri... | mpl-2.0 | 6,159,997,418,781,841,000 | 39.735294 | 79 | 0.541757 | false |
tapanagupta/mi-instrument | mi/instrument/star_asimet/bulkmet/metbk_a/driver.py | 7 | 42844 | """
@package mi.instrument.star_asimet.bulkmet.metbk_a.driver
@file marine-integrations/mi/instrument/star_aismet/bulkmet/metbk_a/driver.py
@author Bill Bollenbacher
@brief Driver for the metbk_a
Release notes:
initial version
"""
import re
import time
from mi.core.log import get_logger
from mi.core.common import B... | bsd-2-clause | 8,993,199,238,074,514,000 | 40.475315 | 120 | 0.59747 | false |
ABaldwinHunter/django-clone-classic | django/test/html.py | 220 | 7928 | """
Comparing two html documents.
"""
from __future__ import unicode_literals
import re
from django.utils import six
from django.utils.encoding import force_text, python_2_unicode_compatible
from django.utils.html_parser import HTMLParseError, HTMLParser
WHITESPACE = re.compile('\s+')
def normalize_whitespace(str... | bsd-3-clause | -8,827,906,159,620,779,000 | 32.59322 | 80 | 0.558274 | false |
michael-dev2rights/ansible | lib/ansible/modules/network/nxos/nxos_bgp_af.py | 22 | 29498 | #!/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,644,856,589,476,007,000 | 35.238329 | 118 | 0.595905 | false |
piffey/ansible | test/units/modules/cloud/amazon/test_s3_bucket.py | 137 | 5360 | # (c) 2017 Red Hat Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is dis... | gpl-3.0 | 5,215,631,560,814,287,000 | 31.682927 | 123 | 0.546828 | false |
lcpt/xc | python_modules/rough_calculations/ng_min_dim_of_abutment_support.py | 1 | 3626 | # -*- coding: utf-8 -*-
__author__= "Luis C. Pérez Tato (LCPT)"
__copyright__= "Copyright 2016, LCPT"
__license__= "GPL"
__version__= "3.0"
__email__= "l.pereztato@gmail.com"
import sys
def getLg(soilClass):
'''
From a length greater than de distance "lg" the soil mouvement
can bi consideread as completely unc... | gpl-3.0 | 3,494,999,877,042,624,000 | 26.431818 | 72 | 0.628832 | false |
satra/prov | prov/model/test/testModel.py | 1 | 5770 | '''
Created on Jan 25, 2012
@author: Trung Dong Huynh
'''
import unittest
from prov.model import ProvBundle, ProvRecord, ProvExceptionCannotUnifyAttribute
import logging
import json
import examples
import os
logger = logging.getLogger(__name__)
class Test(unittest.TestCase):
def setUp(self):
... | mit | 8,338,226,368,946,939,000 | 39.510791 | 163 | 0.597054 | false |
ky822/scikit-learn | examples/decomposition/plot_kernel_pca.py | 353 | 2011 | """
==========
Kernel PCA
==========
This example shows that Kernel PCA is able to find a projection of the data
that makes data linearly separable.
"""
print(__doc__)
# Authors: Mathieu Blondel
# Andreas Mueller
# License: BSD 3 clause
import numpy as np
import matplotlib.pyplot as plt
from sklearn.decomp... | bsd-3-clause | -6,674,437,607,021,148,000 | 26.547945 | 76 | 0.668324 | false |
kickstandproject/ripcord | ripcord/cmd/manage.py | 1 | 2080 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (C) 2013 PolyBeacon, 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... | apache-2.0 | 5,014,066,116,016,644,000 | 28.295775 | 74 | 0.677404 | false |
jazcollins/models | im2txt/im2txt/inference_utils/caption_generator_test.py | 33 | 5787 | # 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,406,330,245,788,394,000 | 31.511236 | 80 | 0.607569 | false |
hsiegel/postsai-commitstop | permissions/configDb.py | 1 | 3248 | # The MIT License (MIT)
# Copyright (c) 2016-2017 HIS e. G.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modi... | mit | -1,189,038,373,649,532,700 | 40.641026 | 133 | 0.640702 | false |
NetDBNCKU/GAE-Conference-Web-App | django/contrib/auth/tests/management.py | 83 | 2529 | from StringIO import StringIO
from django.contrib.auth import models, management
from django.contrib.auth.management.commands import changepassword
from django.test import TestCase
class GetDefaultUsernameTestCase(TestCase):
def setUp(self):
self._getpass_getuser = management.get_system_username
de... | bsd-3-clause | 7,477,188,254,127,748,000 | 34.619718 | 123 | 0.66469 | false |
rsmoorthy/docker | tally/typekeys.py | 1 | 2917 | # Type keys and specify shift key up/down
import subprocess
import sys
import argparse
import time
import os
class TypeKeys:
def __init__(self, *args, **kwargs):
self.shift = False
self.name = 'Tally.ERP 9'
self.window = 0
if 'WID' in os.environ:
self.window = os.enviro... | mit | -6,232,246,684,279,853,000 | 34.573171 | 129 | 0.502571 | false |
yangdw/repo.python | src/annotation/Firefly/firefly/dbentrust/util.py | 8 | 6754 | #coding:utf8
'''
Created on 2013-5-8
@author: lan (www.9miao.com)
'''
from dbpool import dbpool
from MySQLdb.cursors import DictCursor
from numbers import Number
from twisted.python import log
def forEachPlusInsertProps(tablename,props):
assert type(props) == dict
pkeysstr = str(tuple(props.keys())).replace... | mit | -1,960,004,071,857,271,600 | 25.401606 | 83 | 0.570277 | false |
LinuxChristian/home-assistant | homeassistant/components/climate/eq3btsmart.py | 10 | 4870 | """
Support for eQ-3 Bluetooth Smart thermostats.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/climate.eq3btsmart/
"""
import logging
import voluptuous as vol
from homeassistant.components.climate import (
ClimateDevice, PLATFORM_SCHEMA, PRECISIO... | apache-2.0 | 7,478,260,268,917,543,000 | 28.161677 | 74 | 0.631211 | false |
dronly/python | shiyanlou/markup/markup.py | 1 | 2132 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys,re
from handlers import *
from util import *
from rules import *
import logging
logging.basicConfig(level=logging.INFO)
class Parser:
"""
解析器父类
"""
def __init__(self, handler):
self.handler = handler # 处理程序对象
self.rules = [] # 判... | apache-2.0 | 7,399,155,772,781,721,000 | 25.694444 | 87 | 0.542144 | false |
xouillet/sigal | tests/test_zip.py | 1 | 1645 | # -*- coding:utf-8 -*-
import os
import glob
import zipfile
from sigal.gallery import Gallery
from sigal.settings import read_settings
CURRENT_DIR = os.path.dirname(__file__)
SAMPLE_DIR = os.path.join(CURRENT_DIR, 'sample')
SAMPLE_SOURCE = os.path.join(SAMPLE_DIR, 'pictures', 'dir1')
def make_gallery(**kwargs):
... | mit | -4,184,395,364,319,796,000 | 28.909091 | 65 | 0.644985 | false |
dulems/hue | desktop/core/ext-py/Django-1.6.10/tests/utils_tests/test_checksums.py | 246 | 1098 | import unittest
from django.utils import checksums
class TestUtilsChecksums(unittest.TestCase):
def check_output(self, function, value, output=None):
"""
Check that function(value) equals output. If output is None,
check that function(value) equals value.
"""
if output is... | apache-2.0 | -3,065,785,802,145,620,500 | 36.862069 | 78 | 0.592896 | false |
mbiciunas/nix | test/cli_config/tag/test_tag_delete.py | 1 | 1334 | import pytest
from cli_config.tag import tag
from utility.nix_error import NixError
def test_tag_delete_no_tag(capsys):
with pytest.raises(SystemExit) as _excinfo:
tag.tag("nixconfig", ["delete"])
_out, _err = capsys.readouterr()
assert "2" in str(_excinfo.value), "Exception doesn't contain exp... | gpl-3.0 | 4,161,962,923,103,819,300 | 35.054054 | 104 | 0.668666 | false |
40223101/2015cd_midterm | static/Brython3.1.1-20150328-091302/Lib/pprint.py | 634 | 12757 | # Author: Fred L. Drake, Jr.
# fdrake@acm.org
#
# This is a simple little module I wrote to make life easier. I didn't
# see anything quite like it in the library, though I may have overlooked
# something. I wrote this when I was trying to read some heavily nested
# tuples with fairly non-desc... | gpl-3.0 | -263,709,992,797,487,000 | 33.478378 | 81 | 0.523791 | false |
blacktear23/django | django/contrib/humanize/templatetags/humanize.py | 274 | 3396 | from django.utils.translation import ungettext, ugettext as _
from django.utils.encoding import force_unicode
from django import template
from django.template import defaultfilters
from datetime import date
import re
register = template.Library()
def ordinal(value):
"""
Converts an integer to its ordinal as a... | bsd-3-clause | 1,788,655,249,878,772,200 | 32.294118 | 119 | 0.619258 | false |
prospwro/odoo | addons/l10n_in_hr_payroll/wizard/hr_salary_employee_bymonth.py | 374 | 2830 | #-*- coding:utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2011 OpenERP SA (<http://openerp.com>). All Rights Reserved
#
# This program is free software: you can redistribute it and/or modify
# it under th... | agpl-3.0 | -1,442,688,239,947,527,700 | 41.878788 | 138 | 0.601767 | false |
OpenCMISS-Bindings/ZincPythonTools | setup.py | 1 | 1174 | """
Zinc Python Tools
A collection of Qt widgets and utilities building on the Python bindings for the OpenCMISS-Zinc Visualisation Library.
"""
classifiers = """\
Development Status :: 5 - Production/Stable
Intended Audience :: Developers
Intended Audience :: Education
Intended Audience :: Science/Research
License :... | mpl-2.0 | -4,252,329,995,703,317,000 | 29.102564 | 118 | 0.717206 | false |
Sorsly/subtle | google-cloud-sdk/lib/googlecloudsdk/calliope/exceptions.py | 3 | 14638 | # Copyright 2013 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | mit | 7,098,045,688,062,629,000 | 34.702439 | 80 | 0.699617 | false |
gnip/support | Data Collector/Rules API/Python/AddRule.py | 3 | 1489 | #!/usr/bin/env python
import urllib2
import base64
import json
import xml
import sys
def post():
# Ensure that your stream format matches the rule format you intend to use (e.g. '.xml' or '.json')
# See below to edit the rule format used when adding and deleting rules (xml or json)
# Expected Enterprise Data Col... | mit | -900,697,633,826,165,200 | 26.574074 | 99 | 0.675621 | false |
shsingh/ansible | lib/ansible/modules/monitoring/zabbix/zabbix_screen.py | 9 | 18673 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013-2014, Epic Games, Inc.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | gpl-3.0 | -7,670,101,714,846,610,000 | 38.645435 | 140 | 0.542655 | false |
huahang/typhoon-blade | src/blade/load_build_files.py | 3 | 9983 | # Copyright (c) 2011 Tencent Inc.
# All rights reserved.
#
# Author: Huan Yu <huanyu@tencent.com>
# Feng Chen <phongchen@tencent.com>
# Yi Wang <yiwang@tencent.com>
# Chong Peng <michaelpeng@tencent.com>
# Date: October 20, 2011
"""
This is the CmdOptions module which parses the users'
inp... | bsd-3-clause | -4,328,048,820,123,596,000 | 33.663194 | 92 | 0.626665 | false |
AdrianGaudebert/socorro | webapp-django/crashstats/crashstats/utils.py | 4 | 12843 | import csv
import codecs
import cStringIO
import datetime
import isodate
import functools
import json
import re
from collections import OrderedDict
from django import http
from django.conf import settings
from . import models
class DateTimeEncoder(json.JSONEncoder):
def default(self, obj):
if isinstance... | mpl-2.0 | -3,472,060,438,278,238,000 | 34.576177 | 92 | 0.555166 | 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.