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 |
|---|---|---|---|---|---|---|---|---|---|---|
xisisu/RT-Xen | tools/python/logging/logging-0.4.9.2/test/log_test5.py | 42 | 1795 | #!/usr/bin/env python
#
# Copyright 2001-2002 by Vinay Sajip. All Rights Reserved.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted,
# provided that the above copyright notice appear in all copies and that
# both that copyright n... | gpl-2.0 | -5,454,648,638,592,503,000 | 39.818182 | 83 | 0.750975 | false |
simongoffin/website_version | addons/purchase_requisition/wizard/purchase_requisition_partner.py | 373 | 2320 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 | 3,601,369,103,104,782,300 | 46.346939 | 123 | 0.634483 | false |
menardorama/ReadyNAS-Add-ons | headphones-1.0.0/files/apps/headphones/lib/unidecode/x1d4.py | 248 | 3839 | data = (
'A', # 0x00
'B', # 0x01
'C', # 0x02
'D', # 0x03
'E', # 0x04
'F', # 0x05
'G', # 0x06
'H', # 0x07
'I', # 0x08
'J', # 0x09
'K', # 0x0a
'L', # 0x0b
'M', # 0x0c
'N', # 0x0d
'O', # 0x0e
'P', # 0x0f
'Q', # 0x10
'R', # 0x11
'S', # 0x12
'T', # 0x13
'U', # 0... | gpl-2.0 | 7,056,980,064,985,956,000 | 13.879845 | 14 | 0.331336 | false |
panchenji/Ryu_modified | ryu/controller/tunnels.py | 50 | 6952 | # Copyright (C) 2012 Nippon Telegraph and Telephone Corporation.
# Copyright (C) 2012 Isaku Yamahata <yamahata at private email ne jp>
#
# 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
#
# h... | apache-2.0 | -6,309,003,264,394,401,000 | 33.587065 | 79 | 0.634638 | false |
jeffninghan/tracker | OCR_test/ocr_test.py | 1 | 1285 | import numpy as np
import cv2
from matplotlib import pyplot as plt
# test algorithm to recognize digits using kNN
# source: http://docs.opencv.org/trunk/doc/py_tutorials/py_ml/py_knn/py_knn_opencv/py_knn_opencv.html
img = cv2.imread('../data/digits.png')
gray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
# Now we split the... | mit | -2,021,972,136,132,399,600 | 33.756757 | 101 | 0.729961 | false |
be-cloud-be/horizon-addons | web/web_search_alphabetic/__init__.py | 2 | 1129 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2011-2014 Serpent Consulting Services (<http://www.serpentcs.com>)
#
# This program is f... | agpl-3.0 | -7,513,829,421,170,871,000 | 48.086957 | 85 | 0.620903 | false |
darkleons/BE | addons/crm/res_partner.py | 47 | 4790 | # -*- 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 | -9,089,930,205,144,933,000 | 47.877551 | 139 | 0.587265 | false |
viewdy/phantomjs2 | src/qt/qtwebkit/Tools/Scripts/webkitpy/style/checkers/watchlist.py | 134 | 2280 | # Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the ... | bsd-3-clause | 6,808,277,061,204,682,000 | 43.705882 | 77 | 0.726754 | false |
polojacky/ehfpi | ehf/filebrowser/management/commands/fb_version_remove.py | 13 | 5220 | # coding: utf-8
# PYTHON IMPORTS
import os
import re
# DJANGO IMPORTS
from django.core.management.base import BaseCommand, CommandError
from django.conf import settings
from django.utils.six.moves import input
# FILEBROWSER IMPORTS
from filebrowser.settings import EXTENSION_LIST, EXCLUDE, DIRECTORY, VERSIONS, EXTENS... | apache-2.0 | -1,748,148,750,258,710,800 | 37.955224 | 124 | 0.563218 | false |
wildtetris/python-social-auth | social/tests/backends/test_stocktwits.py | 91 | 1658 | import json
from social.tests.backends.oauth import OAuth2Test
class StocktwitsOAuth2Test(OAuth2Test):
backend_path = 'social.backends.stocktwits.StocktwitsOAuth2'
user_data_url = 'https://api.stocktwits.com/api/2/account/verify.json'
expected_username = 'foobar'
access_token_body = json.dumps({
... | bsd-3-clause | 1,666,466,641,908,245,500 | 29.703704 | 75 | 0.520507 | false |
young-geng/leet_code | problems/200_number-of-islands/main.py | 1 | 2271 | # https://leetcode.com/problems/number-of-islands/
class Solution(object):
def numIslands(self, grid):
"""
:type grid: List[List[str]]
:rtype: int
"""
if len(grid) == 0: return 0
cols,rows = len(grid), len(grid[0])
def dfs(i, j):
"""
he... | mit | 1,489,147,805,406,517,500 | 30.985915 | 76 | 0.432409 | false |
onponomarev/ganeti | lib/build/sphinx_ext.py | 3 | 18231 | #
#
# Copyright (C) 2011, 2012, 2013 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:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of con... | bsd-2-clause | 7,446,492,175,958,281,000 | 27.090909 | 80 | 0.651582 | false |
anryko/ansible | lib/ansible/modules/network/netvisor/pn_port_config.py | 38 | 12285 | #!/usr/bin/python
# Copyright: (c) 2018, Pluribus Networks
# 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',
'status': ['... | gpl-3.0 | 2,141,048,966,767,813,000 | 31.075718 | 92 | 0.591127 | false |
UOMx/edx-platform | lms/djangoapps/instructor/views/instructor_dashboard.py | 3 | 30702 | """
Instructor Dashboard Views
"""
import logging
import datetime
from opaque_keys import InvalidKeyError
from opaque_keys.edx.keys import CourseKey
import uuid
import pytz
from django.contrib.auth.decorators import login_required
from django.views.decorators.http import require_POST
from django.utils.translation imp... | agpl-3.0 | -2,959,132,528,388,407,000 | 45.659574 | 128 | 0.669077 | false |
agentxan/plugin.video.emby | resources/lib/mutagen/easyid3.py | 38 | 15099 | # -*- coding: utf-8 -*-
# Copyright (C) 2006 Joe Wreschnig
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of version 2 of the GNU General Public License as
# published by the Free Software Foundation.
"""Easier access to ID3 tags.
EasyID3 is a wrapper around mutagen.id... | gpl-2.0 | 6,081,326,306,571,183,000 | 27.275281 | 78 | 0.592026 | false |
AICP/external_chromium_org | tools/deep_memory_profiler/subcommands/upload.py | 123 | 2545 | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
import os
import subprocess
import tempfile
import zipfile
from lib.subcommand import SubCommand
from lib.symbol import SymbolDataSources
L... | bsd-3-clause | 6,664,372,673,349,126,000 | 31.21519 | 77 | 0.649902 | false |
Endika/OpenUpgrade | addons/sale_journal/__openerp__.py | 262 | 2637 | # -*- 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 | 9,167,711,087,034,690,000 | 40.203125 | 120 | 0.566932 | false |
boomsbloom/dtm-fmri | DTM/for_gensim/lib/python2.7/site-packages/matplotlib/sphinxext/plot_directive.py | 1 | 28321 | """
A directive for including a matplotlib plot in a Sphinx document.
By default, in HTML output, `plot` will include a .png file with a
link to a high-res .png and .pdf. In LaTeX output, it will include a
.pdf.
The source code for the plot may be included in one of three ways:
1. **A path to a source file** as t... | mit | 4,961,335,879,209,633,000 | 32.046674 | 81 | 0.565234 | false |
vpelletier/neoppod | neo/storage/app.py | 1 | 13647 | #
# Copyright (C) 2006-2016 Nexedi SA
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed... | gpl-2.0 | -997,196,639,005,123,000 | 35.103175 | 79 | 0.591119 | false |
sq5bpf/osmo-tetra-sq5bpf | src/demod/python-3.6/usrp1-tetra_demod.py | 9 | 5194 | #!/usr/bin/env python
import sys
import math
from gnuradio import gr, gru, audio, eng_notation, blks2, optfir
from gnuradio import usrp
from gnuradio.eng_option import eng_option
from optparse import OptionParser
try:
import cqpsk
except:
from tetra_demod import cqpsk
# applies frequency translation, resampl... | agpl-3.0 | -417,426,617,710,753,860 | 38.052632 | 121 | 0.585868 | false |
sontek/rethinkdb | external/v8_3.30.33.16/tools/push-to-trunk/chromium_roll.py | 40 | 4767 | #!/usr/bin/env python
# Copyright 2014 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import argparse
import os
import sys
from common_includes import *
class Preparation(Step):
MESSAGE = "Preparation."
def RunS... | agpl-3.0 | 6,378,737,579,575,633,000 | 29.754839 | 77 | 0.618209 | false |
JonathanBennett/marathon-metric-forwarder | node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py | 1407 | 47697 | # 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.
"""
This module helps emulate Visual Studio 2008 behavior on top of other
build systems, primarily ninja.
"""
import os
import re
import subprocess
import sys
fr... | mit | 2,190,254,302,342,393,600 | 42.879485 | 80 | 0.657379 | false |
wileeam/airflow | airflow/migrations/versions/cf5dc11e79ad_drop_user_and_chart.py | 7 | 3768 | # 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 | -4,182,711,032,820,492,000 | 37.060606 | 107 | 0.667728 | false |
etnestad/xcsoar | tools/gdb.py | 25 | 7308 | #
# XCSoar Glide Computer - http://www.xcsoar.org/
# Copyright (C) 2000-2012 The XCSoar Project
# A detailed list of copyright holders can be found in the file "AUTHORS".
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published ... | gpl-2.0 | -1,475,593,326,829,678,800 | 29.198347 | 78 | 0.601669 | false |
natetrue/ReplicatorG | skein_engines/skeinforge-31/fabmetheus_utilities/geometry/geometry_tools/path.py | 2 | 6168 | """
Face of a triangle mesh.
"""
from __future__ import absolute_import
#Init has to be imported first because it has code to workaround the python bug where relative imports don't work if the module is imported as a main module.
import __init__
from fabmetheus_utilities.geometry.geometry_tools import dictionary
fro... | gpl-2.0 | -2,472,274,397,435,233,000 | 33.077348 | 159 | 0.778534 | false |
xzovy/cryptographer.py | cryptochatter-server.py | 1 | 2340 | # chat_server.py
import sys, socket, select
HOST = ''
SOCKET_LIST = []
RECV_BUFFER = 4096
PORT = 443
def chat_server():
server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server_socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
server_socket.bind((HOST, PORT))
server_soc... | gpl-2.0 | 8,741,897,854,056,861,000 | 30.2 | 82 | 0.522222 | false |
lrr-tum/mmbwmon | vendor/fast-lib/vendor/mosquitto-1.4.12/test/lib/03-publish-c2b-qos2-disconnect.py | 10 | 3012 | #!/usr/bin/env python
# Test whether a client sends a correct PUBLISH to a topic with QoS 2 and responds to a disconnect.
import inspect
import os
import socket
import sys
# From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder
cmd_subfolder = os.path.realpath(os.path.abspath(os.path.jo... | gpl-3.0 | 3,230,275,059,592,758,300 | 32.466667 | 129 | 0.614542 | false |
j340m3/python-msquaredc | docs/conf.py | 1 | 1313 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.coverage',
'sphinx.ext.doctest',
'sphinx.ext.extlinks',
'sphinx.ext.ifconfig',
'sphinx.ext.napoleon',
'sphinx.ext.todo',
'sphinx.ext.... | bsd-2-clause | -6,366,636,002,596,574,000 | 24.25 | 75 | 0.654989 | false |
realsaiko/odoo | addons/base_import_module/controllers/main.py | 354 | 1518 | # -*- coding: utf-8 -*-
import functools
import openerp
from openerp.http import Controller, route, request, Response
def webservice(f):
@functools.wraps(f)
def wrap(*args, **kw):
try:
return f(*args, **kw)
except Exception, e:
return Response(response=str(e), status=500... | agpl-3.0 | -302,733,171,776,546,200 | 36.95 | 142 | 0.6278 | false |
t0mk/ansible | lib/ansible/modules/network/lenovo/cnos_backup.py | 3 | 11204 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2017 Lenovo, 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
# ... | gpl-3.0 | -9,018,001,414,475,193,000 | 37.768166 | 138 | 0.661549 | false |
iemejia/beam | sdks/python/apache_beam/examples/complete/juliaset/juliaset/juliaset.py | 5 | 4390 | #
# 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 | -6,608,805,568,544,762,000 | 33.031008 | 99 | 0.663781 | false |
jinlmsft/kubernetes | hack/verify-flags-underscore.py | 169 | 9059 | #!/usr/bin/env python
# Copyright 2015 The Kubernetes 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | apache-2.0 | 6,769,780,855,738,991,000 | 35.381526 | 184 | 0.58693 | false |
jazkarta/edx-platform-for-isc | common/lib/xmodule/xmodule/modulestore/tests/test_contentstore.py | 87 | 8284 | """
Test contentstore.mongo functionality
"""
import logging
from uuid import uuid4
import unittest
import mimetypes
from tempfile import mkdtemp
import path
import shutil
from opaque_keys.edx.locator import CourseLocator, AssetLocator
from opaque_keys.edx.keys import AssetKey
from xmodule.tests import DATA_DIR
from ... | agpl-3.0 | 2,429,265,326,443,457,500 | 38.260664 | 118 | 0.635563 | false |
markhamstra/spark | python/pyspark/sql/column.py | 28 | 25024 | #
# 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 | -3,007,225,937,365,343,000 | 34.047619 | 100 | 0.55163 | false |
ivoire/DataTag | DataTag/config.py | 1 | 5663 | # -*- coding: utf-8 -*-
# vim: set ts=4
# Copyright 2015 Rémi Duraffort
# This file is part of DataTag.
#
# DataTag 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
#... | agpl-3.0 | 16,048,968,638,121,734 | 35.063694 | 90 | 0.513599 | false |
dmarteau/QGIS | python/plugins/processing/algs/gdal/sieve.py | 15 | 5672 | # -*- coding: utf-8 -*-
"""
***************************************************************************
sieve.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
*********************************... | gpl-2.0 | 3,877,685,800,800,242,700 | 41.328358 | 123 | 0.530148 | false |
stefanhenneking/mxnet | python/mxnet/executor_manager.py | 38 | 17449 | # 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 | 97,544,107,653,947,900 | 38.566893 | 106 | 0.586165 | false |
jayceyxc/hue | desktop/core/ext-py/Django-1.6.10/tests/datetimes/tests.py | 49 | 3213 | from __future__ import absolute_import
import datetime
try:
import pytz
except ImportError:
pytz = None
from django.test import TestCase
from django.test.utils import override_settings
from django.utils import timezone
from django.utils.unittest import skipIf
from .models import Article, Comment, Category
... | apache-2.0 | -7,972,315,571,877,068,000 | 31.13 | 75 | 0.540305 | false |
2ndQuadrant/ansible | lib/ansible/modules/cloud/google/gcp_container_cluster_facts.py | 5 | 17700 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2017 Google
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
#
... | gpl-3.0 | -7,183,793,086,362,560,000 | 38.420935 | 139 | 0.61678 | false |
0x726d77/storm | storm-client/src/py/storm/DistributedRPC.py | 22 | 9644 | #!/usr/bin/env 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
# "... | apache-2.0 | -5,960,140,756,515,216,000 | 30.009646 | 188 | 0.656574 | false |
hfp/tensorflow-xsmm | tensorflow/contrib/eager/python/examples/l2hmc/l2hmc.py | 29 | 12269 | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 5,763,348,305,343,312,000 | 33.954416 | 80 | 0.641128 | false |
ymero/tornado | tornado/__init__.py | 75 | 1130 | #!/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 | -443,777,591,858,728,260 | 37.965517 | 80 | 0.755752 | false |
sureshsundriyal/pysqlitebkup | pysqlitebkup.py | 1 | 4083 | #! /usr/bin/env python
import ctypes
from ctypes.util import find_library
__author__ = 'Suresh Sundriyal'
__license__ = 'CC0 - No rights reserved.'
__version__ = '0.0.1'
__credits__ = [ 'Joongi Kim: https://gist.github.com/achimnol/3021995',
'sqlite3.org: http://www.sqlite.org/backup.html' ]
SQLITE_O... | cc0-1.0 | 1,257,139,710,233,133,300 | 29.244444 | 75 | 0.572128 | false |
PeterFaiman/ruby-grpc-minimal | src/python/grpcio_tests/tests/testing/_server_application.py | 12 | 2824 | # Copyright 2017 gRPC 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | apache-2.0 | -6,401,218,065,028,231,000 | 41.787879 | 77 | 0.674575 | false |
PantherHackers/PantherBot | scripts/rage.py | 1 | 1230 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import upsidedown
import sys
from response import Response
from pb_logging import PBLogger
logger = PBLogger("Rage")
# flips text using upsidedown module and has a donger for emohasis
def run(response, args=[]):
response_obj = Response(sys.modules[__name__])
toFli... | mpl-2.0 | -8,448,291,754,435,529,000 | 27.880952 | 118 | 0.641914 | false |
andreabedini/PyTables | tables/exceptions.py | 5 | 11309 | # -*- coding: utf-8 -*-
########################################################################
#
# License: BSD
# Created: December 17, 2004
# Author: Francesc Alted - faltet@pytables.com
#
# $Id$
#
########################################################################
"""Declare exceptions and warnings that are... | bsd-3-clause | 6,151,312,810,610,433,000 | 28.071979 | 82 | 0.643824 | false |
hlin117/statsmodels | examples/python/regression_plots.py | 33 | 9585 |
## Regression Plots
from __future__ import print_function
from statsmodels.compat import lzip
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import statsmodels.api as sm
from statsmodels.formula.api import ols
### Duncan's Prestige Dataset
#### Load the Data
# We can use a utility function... | bsd-3-clause | -5,553,750,183,334,910,000 | 40.314655 | 407 | 0.71445 | false |
Jmainguy/ansible-modules-core | utilities/logic/include_vars.py | 28 | 1982 | # -*- mode: python -*-
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Publ... | gpl-3.0 | 8,759,559,806,021,761,000 | 33.77193 | 181 | 0.702321 | false |
alekz112/statsmodels | statsmodels/tsa/statespace/model.py | 6 | 3282 | """
State Space Model
Author: Chad Fulton
License: Simplified-BSD
"""
from __future__ import division, absolute_import, print_function
import numpy as np
from .representation import Representation
from .kalman_filter import KalmanFilter
import statsmodels.tsa.base.tsa_model as tsbase
class Model(KalmanFilter, Repr... | bsd-3-clause | -7,109,958,000,179,251,000 | 38.542169 | 79 | 0.659659 | false |
mindw/numpy | numpy/distutils/command/build_scripts.py | 264 | 1731 | """ Modified version of build_scripts that handles building scripts from functions.
"""
from __future__ import division, absolute_import, print_function
from distutils.command.build_scripts import build_scripts as old_build_scripts
from numpy.distutils import log
from numpy.distutils.misc_util import is_string
class... | bsd-3-clause | 7,410,106,554,834,120,000 | 32.941176 | 83 | 0.608319 | false |
benhc123/p2pool | p2pool/test/test_p2p.py | 269 | 2724 | import random
from twisted.internet import defer, endpoints, protocol, reactor
from twisted.trial import unittest
from p2pool import networks, p2p
from p2pool.bitcoin import data as bitcoin_data
from p2pool.util import deferral
class Test(unittest.TestCase):
@defer.inlineCallbacks
def test_sharereq(self):
... | gpl-3.0 | 9,192,467,397,528,439,000 | 33.481013 | 130 | 0.459618 | false |
sengupta/spritzbot | spritzbot/processor.py | 1 | 2789 | import os
import re
import imp
import json
class TweetProcessor:
plugins = {}
commands = {}
base_path = os.path.dirname(os.path.realpath(__file__))
plugin_path = os.path.join(base_path, "plugins")
def __init__(self):
self.load_plugins()
def load_plugins(self):
"""Loads plu... | bsd-2-clause | 4,119,529,581,569,513,500 | 37.736111 | 94 | 0.512011 | false |
Azure/azure-sdk-for-python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_03_01/aio/operations/_peer_express_route_circuit_connections_operations.py | 1 | 9352 | # 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 | 3,648,150,955,429,748,700 | 48.744681 | 231 | 0.655368 | false |
aringh/odl | odl/discr/partition.py | 1 | 51284 | # Copyright 2014-2017 The ODL contributors
#
# This file is part of ODL.
#
# This Source Code Form is subject to the terms of the Mozilla Public License,
# v. 2.0. If a copy of the MPL was not distributed with this file, You can
# obtain one at https://mozilla.org/MPL/2.0/.
"""Partitons of interval products based on ... | mpl-2.0 | -1,534,553,825,121,315,600 | 34.962132 | 79 | 0.526462 | false |
ahmed-mahran/hue | desktop/core/ext-py/markdown/markdown/odict.py | 143 | 5157 | class OrderedDict(dict):
"""
A dictionary that keeps its keys in the order in which they're inserted.
Copied from Django's SortedDict with some modifications.
"""
def __new__(cls, *args, **kwargs):
instance = super(OrderedDict, cls).__new__(cls, *args, **kwargs)
instance.keyOrd... | apache-2.0 | 4,285,468,236,173,810,700 | 30.833333 | 79 | 0.536746 | false |
techhat/libcloud | libcloud/test/common/test_openstack_identity.py | 8 | 33173 | # 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 use ... | apache-2.0 | -7,635,700,592,050,106,000 | 42.763852 | 117 | 0.562476 | false |
mozilla/relman-auto-nag | auto_nag/round_robin.py | 2 | 6925 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
import json
from random import randint
from dateutil.relativedelta import relativedelta
from libmozdata import utils as... | bsd-3-clause | 6,921,480,445,484,708,000 | 34.152284 | 88 | 0.563177 | false |
mszewczy/odoo | addons/event/wizard/__init__.py | 435 | 1067 | # -*- 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 | -8,410,107,059,147,258,000 | 43.458333 | 78 | 0.615745 | false |
overtherain/scriptfile | software/googleAppEngine/lib/jinja2/jinja2/nodes.py | 122 | 28750 | # -*- coding: utf-8 -*-
"""
jinja2.nodes
~~~~~~~~~~~~
This module implements additional nodes derived from the ast base node.
It also provides some node tree helper functions like `in_lineno` and
`get_nodes` used by the parser and translator in order to normalize
python and jinja nodes.
:... | mit | 6,947,535,176,784,818,000 | 30.593407 | 81 | 0.600243 | false |
xianggong/m2c_unit_test | test/operator/remainder_char8char8/compile.py | 1861 | 4430 | #!/usr/bin/python
import os
import subprocess
import re
def runCommand(command):
p = subprocess.Popen(command,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
p.wait()
return iter(p.stdout.readline, b'')
def dumpRunCommand(command,... | gpl-2.0 | -1,353,948,927,176,512,500 | 31.335766 | 70 | 0.476749 | false |
chenss/ChatRoom | 14.5 已经能运行(虽然有很多Warning)的Django-nonrel框架/django/core/files/uploadhandler.py | 136 | 7193 | """
Base file upload handler classes, and the built-in concrete subclasses
"""
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.core.files.uploadedfile import TemporaryUplo... | gpl-2.0 | 3,383,330,258,041,220,600 | 31.844749 | 135 | 0.62255 | false |
SUNY-Albany-CCI/INF_202_Survey | languages/fr.py | 13 | 7668 | # coding: utf8
{
'!langcode!': 'fr',
'!langname!': 'Français',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" est une expression optionnelle comme "champ1=\'nouvellevaleur\'". Vous ne pouvez mettre à jour ou supprimer les résultats d\'un JOI... | apache-2.0 | -2,101,414,199,977,031,400 | 40 | 291 | 0.688728 | false |
etkirsch/scikit-learn | examples/model_selection/grid_search_text_feature_extraction.py | 253 | 4158 | """
==========================================================
Sample pipeline for text feature extraction and evaluation
==========================================================
The dataset used in this example is the 20 newsgroups dataset which will be
automatically downloaded and then cached and reused for the do... | bsd-3-clause | 8,051,028,704,210,998,000 | 31.232558 | 79 | 0.635883 | false |
maxamillion/anaconda | pyanaconda/ui/gui/spokes/advstorage/iscsi.py | 3 | 19069 | # iSCSI configuration dialog
#
# Copyright (C) 2013 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# the GNU General Public License v.2, or (at your option) any later version.
# This program is distribute... | gpl-2.0 | -1,157,520,728,938,784,000 | 41.094923 | 111 | 0.609314 | false |
gaperez64/acacia4aiger | source/acacia_plus/library_linker.py | 1 | 16085 | # This file is part of Acacia+, a tool for synthesis of reactive systems using antichain-based techniques
# Copyright (C) 2011-2013 UMONS-ULB
#
# 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; ei... | gpl-3.0 | -3,374,374,108,684,247,000 | 34.274123 | 129 | 0.673858 | false |
mbucas/python-route53 | doc_src/conf.py | 4 | 8017 | # -*- coding: utf-8 -*-
#
# python-route53 documentation build configuration file, created by
# sphinx-quickstart on Sun Nov 4 21:03:55 2012.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
... | mit | -6,281,519,880,234,041,000 | 31.589431 | 107 | 0.706249 | false |
karthiks1995/dejavu | dejavu/fingerprint.py | 15 | 5828 | import numpy as np
import matplotlib.mlab as mlab
import matplotlib.pyplot as plt
from scipy.ndimage.filters import maximum_filter
from scipy.ndimage.morphology import (generate_binary_structure,
iterate_structure, binary_erosion)
import hashlib
from operator import itemgetter
IDX... | mit | 5,121,042,317,973,186,000 | 36.6 | 148 | 0.590254 | false |
mdkent/percona-xtrabackup | test/kewpie/percona_tests/xtrabackup_disabled/ib_slave_test.py | 42 | 7074 | #! /usr/bin/env python
# -*- mode: python; indent-tabs-mode: nil; -*-
# vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
#
# Copyright (C) 2011 Patrick Crews
#
#
# 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 Softwar... | gpl-2.0 | -2,056,828,870,813,397,000 | 39.890173 | 90 | 0.55598 | false |
Callek/build-relengapi | relengapi/blueprints/slaveloan/tasks.py | 1 | 12195 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import random
import socket
from furl import furl
import bzrest
import requests
from requests import RequestException... | mpl-2.0 | -3,238,224,967,578,969,600 | 35.079882 | 96 | 0.609348 | false |
kaiweifan/neutron | neutron/plugins/nec/drivers/__init__.py | 9 | 1528 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 2012 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.or... | apache-2.0 | 8,547,695,502,460,841,000 | 38.179487 | 78 | 0.714005 | false |
zhjunlang/kbengine | kbe/src/lib/python/Lib/tkinter/test/runtktests.py | 71 | 2271 | """
Use this module to get and run all tk tests.
tkinter tests should live in a package inside the directory where this file
lives, like test_tkinter.
Extensions also should live in packages following the same rule as above.
"""
import os
import sys
import unittest
import importlib
import test.support
this_dir_path ... | lgpl-3.0 | -1,675,436,790,387,805,000 | 30.985915 | 78 | 0.590048 | false |
lepisma/gaze | src/helper.py | 1 | 3299 | """
Helper functions
"""
import numpy as np
def xgrad(gray_image):
"""
Returns the X gradient of grayscale image,
imitating MatLab's gradient function
Parameters
----------
gray_image : numpy.ndarray
Grayscale image
Returns
-------
numpy.ndarray
X gradient of imag... | mit | -5,288,348,261,107,824,000 | 22.733813 | 86 | 0.574113 | false |
vinhlh/bite-project | deps/gdata-python-client/src/gdata/exif/__init__.py | 253 | 6981 | # -*-*- encoding: utf-8 -*-*-
#
# This is gdata.photos.exif, implementing the exif namespace in gdata
#
# $Id: __init__.py 81 2007-10-03 14:41:42Z havard.gulldahl $
#
# Copyright 2007 Håvard Gulldahl
# Portions copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not... | apache-2.0 | 7,752,702,114,392,744,000 | 31.16129 | 132 | 0.706835 | false |
SteveXiSong/UW-Madison-ECE757-S15-MulticastSnooping | src/cpu/kvm/X86KvmCPU.py | 54 | 2012 | # Copyright (c) 2013 Andreas Sandberg
# 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 fol... | bsd-3-clause | 3,008,131,704,492,663,300 | 41.808511 | 78 | 0.759443 | false |
liberorbis/libernext | apps/frappe/frappe/widgets/form/meta.py | 25 | 5903 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
# metadata
from __future__ import unicode_literals
import frappe, os
from frappe.model.meta import Meta
from frappe.modules import scrub, get_module_path, load_doctype_module
from frappe.model.workflow import get_wo... | gpl-2.0 | 8,176,465,747,321,302,000 | 31.977654 | 91 | 0.667457 | false |
ashemedai/ansible | lib/ansible/modules/packaging/os/pkg5.py | 42 | 5050 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright 2014 Peter Oliver <ansible@mavit.org.uk>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your o... | gpl-3.0 | 6,713,490,162,843,288,000 | 27.370787 | 151 | 0.566535 | false |
douglaswei/stock | fxcm/prepare/parse.py | 1 | 2352 | # coding=utf-8
import struct
import time
import os, sys
def parse_hst_csv(src_path, des_path, time_from=None, time_to=None):
content = open(src_path, 'rb').read()
# 读取头文件结构信息
# 基础版本
print "basic verison: %i" % struct.unpack("i", content[0:4])[0]
# 版本信息
print "versoin: %s" % "".join(struct.unpack("64c"... | gpl-2.0 | -3,818,980,083,436,185,600 | 30.746479 | 118 | 0.602484 | false |
elit3ge/SickRage | lib/github/AuthenticatedUser.py | 70 | 46818 | # -*- coding: utf-8 -*-
# ########################## Copyrights and license ############################
# #
# Copyright 2012 Steve English <steve.english@navetas.com> #
# Copyright 2012 Vincent Jacques <vincent@vincent-ja... | gpl-3.0 | 9,208,537,430,826,643,000 | 39.430052 | 348 | 0.608698 | false |
fritsvanveen/QGIS | python/plugins/processing/algs/gdal/contour.py | 5 | 3823 | # -*- coding: utf-8 -*-
"""
***************************************************************************
contour.py
---------------------
Date : September 2013
Copyright : (C) 2013 by Alexander Bruy
Email : alexander bruy at gmail dot com
*******************... | gpl-2.0 | -7,472,972,583,677,670,000 | 37.616162 | 117 | 0.551138 | false |
jofomah/rules | testpy/waltzdb.py | 1 | 50347 | from durable.lang import *
import math
import datetime
import json
_fact_count = 0
def create_and_post(host, fact):
global _fact_count
fact['id'] = _fact_count
fact['sid'] = 1
host.post('waltzdb', fact)
_fact_count += 1
def create_and_assert(host, fact):
global _fact_count
fact['id'] = _fa... | mit | -7,531,070,431,205,708,000 | 59.440576 | 160 | 0.491708 | false |
Leila20/django | tests/check_framework/test_security.py | 17 | 19560 | from django.conf import settings
from django.core.checks.security import base, csrf, sessions
from django.core.checks.utils import patch_middleware_message
from django.test import SimpleTestCase
from django.test.utils import override_settings
class CheckSessionCookieSecureTest(SimpleTestCase):
@property
def f... | bsd-3-clause | -1,502,807,203,643,040,000 | 33.43662 | 96 | 0.661145 | false |
kittiu/sale-workflow | sale_payment_term_interest/model/account_payment_term.py | 31 | 4714 | # -*- coding: utf-8 -*-
#
#
# Authors: Guewen Baconnier
# Copyright 2015 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
# published by the Free Software Foundation, either version 3 of the
# Licens... | agpl-3.0 | -2,768,558,756,939,886,000 | 38.613445 | 78 | 0.587187 | false |
jmehnle/ansible | lib/ansible/modules/cloud/ovirt/ovirt_networks.py | 15 | 9604 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2016 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
#... | gpl-3.0 | -3,979,436,862,328,987,000 | 34.439114 | 120 | 0.590275 | false |
rjpower/spark | python/pyspark/files.py | 5 | 1885 | #
# 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 | 5,243,843,828,526,700,000 | 33.272727 | 80 | 0.693369 | false |
srsman/odoo | addons/account_payment/account_move_line.py | 241 | 4455 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 | 3,742,568,957,336,944,600 | 41.028302 | 102 | 0.562963 | false |
Andrei-Stepanov/avocado-vt | virttest/libvirt_xml/devices/interface.py | 12 | 9271 | """
interface device support class(es)
http://libvirt.org/formatdomain.html#elementsNICS
http://libvirt.org/formatnwfilter.html#nwfconceptsvars
"""
from virttest.libvirt_xml import accessors, xcepts
from virttest.libvirt_xml.devices import base, librarian
class Interface(base.TypedDeviceBase):
__slots__ = ('so... | gpl-2.0 | 2,023,565,438,006,017,800 | 40.950226 | 83 | 0.461115 | false |
Natim/sentry | src/sentry/migrations/0051_auto__del_pendingprojectmember__del_unique_pendingprojectmember_projec.py | 36 | 21164 | # encoding: 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):
# Removing unique constraint on 'PendingProjectMember', fields ['project', 'email']
db.delete_unique('sentry_pendi... | bsd-3-clause | -8,439,509,003,606,770,000 | 78.265918 | 167 | 0.565158 | false |
haarcuba/testix | test/test_argumentexpectations.py | 1 | 3090 | import hypothesis
import hypothesis.strategies as strategies
import pytest
from testix import fake
from testix import scenario
from testix import testixexception
from testix import argumentexpectations
class TestArgumentExpectations:
@hypothesis.given(A=strategies.integers(),B=strategies.integers())
def test_a... | mit | 1,450,891,443,894,828,800 | 48.83871 | 145 | 0.637217 | false |
kirti3192/spoken-website | cms/admin.py | 2 | 2857 | from django.template.defaultfilters import slugify
from django.contrib import admin
from cms.models import *
from django.conf import settings
from PIL import Image
import glob, os
from cms.forms import *
class SubNavInline(admin.TabularInline):
model = SubNav
extra = 0
class NavAdmin(admin.ModelAdmin):
li... | gpl-3.0 | -2,728,689,829,492,137,500 | 34.271605 | 112 | 0.633182 | false |
izelnakri/moses | node_modules/gulp-sass/node_modules/node-sass/node_modules/node-gyp/gyp/buildbot/buildbot_run.py | 270 | 8338 | #!/usr/bin/env python
# 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.
"""Argument-less script to select what to run on the buildbots."""
import filecmp
import os
import shutil
import subprocess
import sys
i... | mit | -5,988,519,446,608,699,000 | 32.219124 | 117 | 0.630727 | false |
somic/paasta | tests/cli/test_cmds_get_latest_deployment.py | 1 | 1863 | # Copyright 2015-2016 Yelp 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 | -266,696,243,005,262,700 | 36.26 | 91 | 0.689748 | false |
sunyihuan326/DeltaLab | shuwei_fengge/practice_one/model/tt.py | 1 | 3958 | # coding:utf-8
'''
Created on 2017/12/8.
@author: chk01
'''
import scipy.io as scio
# data = scio.loadmat(file)
# from sklearn.model_selection import train_test_split
#
# print(data['X'].shape)
# print(data['Y'].shape)
# X_train, X_test, Y_train, Y_test = train_test_split(data['X'], data['Y'], test_size=0.2)
# print(... | mit | -5,570,555,896,047,293,000 | 30.919355 | 115 | 0.629358 | false |
huanchenz/STX-h-store | third_party/python/boto/ec2/autoscale/policy.py | 24 | 5549 | # Copyright (c) 2009-2010 Reza Lotun http://reza.lotun.name/
# Copyright (c) 2011 Jann Kleen
#
# 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 limitat... | gpl-3.0 | 3,114,703,872,488,029,000 | 34.8 | 149 | 0.623356 | false |
ebar0n/django | django/contrib/postgres/validators.py | 87 | 2675 | from django.core.exceptions import ValidationError
from django.core.validators import (
MaxLengthValidator, MaxValueValidator, MinLengthValidator,
MinValueValidator,
)
from django.utils.deconstruct import deconstructible
from django.utils.translation import gettext_lazy as _, ngettext_lazy
class ArrayMaxLengt... | bsd-3-clause | 3,792,180,124,299,452,000 | 34.197368 | 97 | 0.613084 | false |
Hasimir/brython | www/src/Lib/test/test_sched.py | 23 | 6660 | #!/usr/bin/env python
import queue
import sched
import time
import unittest
from test import support
try:
import threading
except ImportError:
threading = None
TIMEOUT = 10
class Timer:
def __init__(self):
self._cond = threading.Condition()
self._time = 0
self._stop = 0
def ... | bsd-3-clause | 6,685,348,758,801,012,000 | 31.647059 | 80 | 0.555856 | false |
t794104/ansible | test/units/modules/network/junos/test_junos_command.py | 68 | 6199 | # (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 | 6,169,681,198,293,533,000 | 40.326667 | 106 | 0.661236 | false |
laayis/yowsup | yowsup/demos/echoclient/layer.py | 60 | 1646 | from yowsup.layers.interface import YowInterfaceLayer, ProtocolEntityCallback
class EchoLayer(YowInterfaceLayer):
@ProtocolEntityCallback("message")
def onMessage(self, messageProtocolEntity):
if messageProtocolEntity.getType() == 'text':
self.onTextMessage(messa... | gpl-3.0 | 2,313,680,449,194,412,500 | 46.028571 | 168 | 0.702309 | false |
dgarros/ansible | lib/ansible/modules/cloud/cloudstack/cs_portforward.py | 51 | 14301 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2015, René Moser <mail@renemoser.net>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Lice... | gpl-3.0 | -3,636,840,072,768,961,500 | 31.795872 | 116 | 0.618645 | false |
Sarah-Alsinan/muypicky | lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py | 320 | 103230 | # coding: utf-8
"""
Package resource API
--------------------
A resource is a logical file contained within a package, or a logical
subdirectory thereof. The package resource API expects resource names
to have their path parts separated with ``/``, *not* whatever the local
path separator is. Do not use os.path opera... | mit | 7,756,767,067,461,531,000 | 32.823067 | 91 | 0.59819 | false |
lumig242/Hue-Integration-with-CDAP | desktop/core/ext-py/Django-1.6.10/tests/one_to_one_regress/tests.py | 107 | 8452 | from __future__ import absolute_import
from django.test import TestCase
from .models import Place, Restaurant, Bar, Favorites, Target, UndergroundBar
class OneToOneRegressionTests(TestCase):
def setUp(self):
self.p1 = Place(name='Demon Dogs', address='944 W. Fullerton')
self.p1.save()
s... | apache-2.0 | -6,940,051,416,413,765,000 | 33.639344 | 85 | 0.609915 | 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.