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 |
|---|---|---|---|---|---|---|---|---|---|---|
ahelsing/geni-tools | acceptance_tests/AM_API/am_api_accept.py | 3 | 99929 | #!/usr/bin/env python
#----------------------------------------------------------------------
# Copyright (c) 2011-2016 Raytheon BBN Technologies
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and/or hardware specification (the "Work") to
# deal in the Work without ... | mit | -7,831,690,230,716,289,000 | 48.25037 | 223 | 0.530006 | false |
mnahm5/django-estore | Lib/site-packages/botocore/auth.py | 10 | 30167 | # Copyright (c) 2012-2013 Mitch Garnaat http://garnaat.org/
# Copyright 2012-2014 Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# http... | mit | -5,734,012,043,471,924,000 | 39.276368 | 79 | 0.598535 | false |
afaheem88/rally | tests/unit/plugins/openstack/scenarios/nova/test_keypairs.py | 3 | 2647 | # Copyright 2015: Hewlett-Packard Development Company, L.P.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-... | apache-2.0 | -1,300,582,119,746,660,600 | 41.015873 | 78 | 0.706838 | false |
vadimtk/chrome4sdp | tools/perf/benchmarks/blink_perf.py | 2 | 9383 | # 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 os
from core import perf_benchmark
from telemetry import benchmark
from telemetry.core import util
from telemetry import page as page_module
from te... | bsd-3-clause | -6,009,538,731,825,986,000 | 28.599369 | 79 | 0.692529 | false |
bat-serjo/vivisect | vivisect/symboliks/effects.py | 3 | 10340 | from vivisect.symboliks.common import *
from vivisect.const import *
class SymbolikEffect:
'''
A single symbolik effect...
'''
efftype = None
def __init__(self, va):
self.va = va
def __ne__(self, other):
return not self.__eq__(other)
def __eq__(self, other):
rais... | apache-2.0 | -6,356,564,422,235,189,000 | 29.77381 | 99 | 0.584913 | false |
msabramo/ansible | lib/ansible/modules/network/exoscale/exo_dns_domain.py | 19 | 7822 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2016, René Moser <mail@renemoser.net>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Lice... | gpl-3.0 | 1,366,381,809,594,901,000 | 28.847328 | 136 | 0.599872 | false |
ioam/holoviews | holoviews/plotting/bokeh/widgets.py | 2 | 13098 | from __future__ import absolute_import, division, unicode_literals
import math
import json
from functools import partial
import param
import numpy as np
from bokeh.models.widgets import Select, Slider, AutocompleteInput, TextInput, Div
from bokeh.layouts import widgetbox, row, column
from ...core import Store, NdMap... | bsd-3-clause | -3,393,963,150,211,641,300 | 39.425926 | 100 | 0.554665 | false |
12AngryMen/votca-scripts | Gaussian/Gaussian_parse_polar.py | 2 | 2005 | #!/usr/bin/env python
import numpy as np;
import sys;
import string;
import numpy.linalg as lg
import argparse as ap
atb=1.88971616463
parser=ap.ArgumentParser(description="Parse polarisation from Gaussian logfile")
parser.add_argument("-f","--logfile", help="Gaussian logfile")
args=parser.parse_args()
inputfile=args... | apache-2.0 | 8,311,410,481,011,289,000 | 31.868852 | 227 | 0.616958 | false |
bqbn/addons-server | src/olympia/files/tests/test_admin.py | 7 | 6253 | from django.conf import settings
from django.utils.encoding import force_text
from django.utils.http import urlquote
from olympia import amo
from olympia.amo.tests import TestCase, addon_factory, user_factory
from olympia.amo.urlresolvers import reverse
from olympia.amo.templatetags.jinja_helpers import user_media_url... | bsd-3-clause | 7,140,272,846,186,667,000 | 38.828025 | 77 | 0.635695 | false |
jendap/tensorflow | tensorflow/contrib/distributions/python/ops/bijectors/exp.py | 35 | 2304 | # 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 | -6,543,152,111,951,369,000 | 30.561644 | 81 | 0.634549 | false |
MSMBA/msmba-workflow | msmba-workflow/srclib/wax/keys.py | 1 | 1024 | # keys.py
# changed namespace to correspond to modern wxPython standard
import wx
class keys:
enter = wx.WXK_RETURN
# 'return' is not valid; reserved word
alt = wx.WXK_ALT
control = ctrl = wx.WXK_CONTROL
shift = wx.WXK_SHIFT
f1 = F1 = wx.WXK_F1
f2 = F2 = wx.WXK_F2
f3 = F3 = wx.WXK_F3... | gpl-2.0 | 5,691,071,905,741,790,000 | 21.755556 | 62 | 0.579102 | false |
adamcharnock/lightbus | lightbus/schema/hints_to_schema.py | 1 | 11380 | import inspect
import itertools
import logging
from decimal import Decimal
from typing import Union, Any, Tuple, Sequence, Mapping, Callable, TYPE_CHECKING, get_type_hints
import datetime
from enum import Enum
from uuid import UUID
from lightbus.utilities.deforming import deform_to_bus
from lightbus.utilities.type_ch... | apache-2.0 | -449,054,117,141,520,200 | 35.242038 | 100 | 0.628207 | false |
rembo10/headphones | headphones/torrentfinished.py | 2 | 1875 | # This file is part of Headphones.
#
# Headphones 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.
#
# Headphones is distributed i... | gpl-3.0 | -8,113,715,028,112,055,000 | 37.265306 | 93 | 0.693867 | false |
keedio/hue | apps/spark/src/spark/management/commands/spark_setup.py | 13 | 1853 | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | apache-2.0 | 1,080,703,943,961,180,500 | 35.333333 | 115 | 0.746897 | false |
all-of-us/raw-data-repository | rdr_service/lib_fhir/fhirclient_1_0_6/models/goal_tests.py | 1 | 2454 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 1.0.2.7202 on 2016-06-23.
# 2016, SMART Health IT.
import io
import json
import os
import unittest
from . import goal
class GoalTests(unittest.TestCase):
def instantiate_from(self, filename):
datadir = os.environ.get('FHIR_UNITTEST... | bsd-3-clause | 8,307,514,991,731,425,000 | 45.301887 | 114 | 0.680929 | false |
tao12345666333/app-turbo | turbo/test/session_test.py | 1 | 2845 | #-*- coding:utf-8 -*-
from __future__ import absolute_import, division, print_function, with_statement
import sys
import signal
import random
import time
import logging
import requests
import multiprocessing
import time
import os
from turbo import app
from turbo.conf import app_config
from turbo import register
from... | apache-2.0 | 1,230,623,037,491,181,800 | 24.176991 | 86 | 0.635501 | false |
mlabru/ptracks | model/items/prf_new.py | 1 | 22610 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
-------------------------------------------------------------------------------------------------
prf_new
mantém as informações sobre uma performance
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public Lice... | gpl-3.0 | 5,512,480,471,343,773,000 | 29.568895 | 100 | 0.470478 | false |
mganeva/mantid | Framework/PythonInterface/test/python/plugins/algorithms/DSFinterpTest.py | 1 | 3491 | # Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source
# & Institut Laue - Langevin
# SPDX - License - Identifier: GPL - 3.0 +
from __future__ import (absolute_import, divi... | gpl-3.0 | 7,564,681,494,534,985,000 | 42.098765 | 156 | 0.712403 | false |
glenoverby/dttsp | src/hilbert.py | 1 | 1291 | #!/usr/bin/env python
# import sys
# import pygsl as gsl
# import pygsl.fft as fft
# import pygsl.spline as spline
# import pygsl.wavelet as wvlt
# import math as M
import numpy as N
# import scipy as S
class HilbertTransformer():
def __init__(self):
self.x = N.zeros(4)
self.y = N.zeros(6)
... | gpl-3.0 | 5,195,912,376,729,306,000 | 22.907407 | 57 | 0.4756 | false |
mbonani/aseba | docs/en/conf.py | 2 | 5547 | # -*- coding: utf-8 -*-
#
# Aseba documentation build configuration file, created by
# sphinx-quickstart on Mon Jan 22 09:18:32 2018.
#
# 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.
#
# All... | lgpl-3.0 | -5,698,298,639,159,001,000 | 30.310734 | 107 | 0.682786 | false |
darjus-amzn/boto | tests/integration/kinesis/test_kinesis.py | 99 | 4404 | # Copyright (c) 2013 Amazon.com, Inc. or its affiliates.
# 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 right... | mit | 7,765,363,286,644,490,000 | 36.965517 | 80 | 0.63624 | false |
deepmind/interval-bound-propagation | interval_bound_propagation/tests/fastlin_test.py | 1 | 5231 | # coding=utf-8
# Copyright 2019 The Interval Bound Propagation 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 ... | apache-2.0 | -5,935,420,673,119,800,000 | 36.633094 | 77 | 0.640222 | false |
repotvsupertuga/tvsupertuga.repository | plugin.program.iarl/resources/lib/xbmcswift2b/urls.py | 6 | 7155 | '''
resources.lib.xbmcswift2b.urls
---------------
This module contains URLRule class for dealing with url patterns.
:copyright: (c) 2012 by Jonathan Beluch
:license: GPLv3, see LICENSE for more details.
'''
import re
from urllib import urlencode, unquote_plus, quote_plus
from resources.lib.xbmcsw... | gpl-2.0 | -8,243,630,127,264,361,000 | 35.881443 | 79 | 0.584207 | false |
sergio-incaser/bank-payment | account_payment_purchase/__openerp__.py | 7 | 1663 | # -*- encoding: utf-8 -*-
##############################################################################
#
# Account Payment Purchase module for OpenERP
# Copyright (C) 2014 Akretion (http://www.akretion.com).
# @author Alexis de Lattre <alexis.delattre@akretion.com>
#
# This program is free software: you c... | agpl-3.0 | -5,324,744,288,383,624,000 | 37.674419 | 78 | 0.591702 | false |
pleaseproject/python-for-android | python3-alpha/python3-src/Lib/test/test_tcl.py | 56 | 4631 | #!/usr/bin/env python3
import unittest
import sys
import os
from test import support
# Skip this test if the _tkinter module wasn't built.
_tkinter = support.import_module('_tkinter')
from tkinter import Tcl
from _tkinter import TclError
class TkinterTest(unittest.TestCase):
def testFlattenLen(self):
... | apache-2.0 | -2,794,734,596,588,961,000 | 27.94375 | 80 | 0.584971 | false |
fujunwei/chromium-crosswalk | tools/telemetry/telemetry/internal/actions/loop_unittest.py | 9 | 2384 | # 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.
from telemetry.core import exceptions
from telemetry import decorators
from telemetry.internal.actions import loop
from telemetry.unittest_util import tab_te... | bsd-3-clause | -4,799,589,346,450,010,000 | 44.846154 | 79 | 0.716023 | false |
obinsanni/spark-ml-streaming | python/mlstreaming/kmeans.py | 6 | 4265 | import time
from numpy import asarray, array, vstack, hstack, size, random, argsort, ones, argmin, sin, cos, pi
from scipy.spatial.distance import cdist
from sklearn.datasets import make_blobs
from mlstreaming.base import StreamingDemo
from mlstreaming.util import loadrecent
class StreamingKMeans(StreamingDemo):
... | apache-2.0 | -1,365,536,949,624,013,800 | 34.541667 | 108 | 0.518406 | false |
openpolis/open_municipio | fabfile.sample/__init__.py | 1 | 7037 | ## -*- mode: python -*-
"""
Fabric script (a.k.a. "fabfile") to automate the deployment process
of an instance of the OpenMunicipio web application.
Deployment on both staging & production machine(s) is supported:
* To deploy on the staging server(s), run the shell command ``fab staging deploy``
* To deploy on the p... | agpl-3.0 | -1,353,222,295,285,051,400 | 35.087179 | 111 | 0.647577 | false |
sestrella/ansible | lib/ansible/modules/cloud/google/gcp_compute_region_disk.py | 13 | 24501 | #!/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 | -1,067,020,519,367,375,200 | 35.459821 | 156 | 0.667483 | false |
scarcry/snm-mezzanine | mezzanine/pages/migrations/0007_auto__chg_field_page_slug__chg_field_page_title.py | 13 | 5481 | # 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):
# Changing field 'Page.slug'
db.alter_column('pages_page', 'slug', self.gf('django.db.models.fields.CharFi... | bsd-2-clause | -391,271,760,766,838,300 | 63.482353 | 165 | 0.553549 | false |
ennoborg/gramps | gramps/gui/widgets/fanchart.py | 2 | 78577 | #
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2001-2007 Donald N. Allingham, Martin Hawlisch
# Copyright (C) 2009 Douglas S. Blank
# Copyright (C) 2012 Benny Malengier
# Copyright (C) 2013 Vassilii Khachaturov
#
# This program is free software; you can redistribute it and/or modify
# it under the... | gpl-2.0 | -5,047,792,050,914,593,000 | 40.421719 | 151 | 0.560838 | false |
amyvmiwei/kbengine | kbe/res/scripts/common/Lib/test/test_memoryio.py | 72 | 28747 | """Unit tests for memory-based file-like objects.
StringIO -- for unicode strings
BytesIO -- for bytes
"""
import unittest
from test import support
import io
import _pyio as pyio
import pickle
class MemorySeekTestMixin:
def testInit(self):
buf = self.buftype("1234567890")
bytesIo = self.ioclass(... | lgpl-3.0 | 286,928,946,953,924,000 | 35.667092 | 82 | 0.597141 | false |
bkeroack/elita | elita/util/__init__.py | 1 | 3592 | __author__ = 'bkeroack'
from types import FunctionType
import functools
import logging
import collections
import type_check
def log_wrapper(func):
@functools.wraps(func)
def log(*args, **kwargs):
logging.debug("CALLING: {} (args: {}, kwargs: {}".format(func.__name__, args, kwargs))
ret = func... | apache-2.0 | 2,348,633,151,828,624,000 | 27.967742 | 103 | 0.566258 | false |
ratoaq2/Flexget | flexget/ui/plugins/archive/archive.py | 5 | 2292 | from __future__ import unicode_literals, division, absolute_import
import logging
from flexget.ui.webui import db_session, app
from flask import request, render_template, flash, Blueprint
from flexget.plugin import DependencyError
try:
from flexget.plugins.generic.archive import ArchiveEntry, search
except ImportE... | mit | -1,616,043,014,959,299,000 | 33.208955 | 106 | 0.652705 | false |
yyt030/pyzmq | examples/security/ioloop-ironhouse.py | 6 | 3994 | #!/usr/bin/env python
'''
Ironhouse extends Stonehouse with client public key authentication.
This is the strongest security model we have today, protecting against every
attack we know about, except end-point attacks (where an attacker plants
spyware on a machine to capture data before it's encrypted, or after it's
... | bsd-3-clause | 3,872,686,394,676,103,700 | 33.431034 | 125 | 0.696044 | false |
ABaldwinHunter/curio-clone | curio/io.py | 2 | 14366 | # curio/io.py
#
# I/O wrapper objects.
#
# Copyright (C) 2015
# David Beazley (Dabeaz LLC)
# All rights reserved.
#
# Let's talk about design for a moment...
#
# Curio is primarily concerned with the scheduling of tasks. In
# particular, the kernel does not actually perform any I/O. It merely
# blocks tasks that need... | bsd-3-clause | -8,318,253,843,021,334,000 | 33.042654 | 98 | 0.584505 | false |
joshblum/django-with-audit | tests/regressiontests/localflavor/sk/tests.py | 33 | 4337 | from django.contrib.localflavor.sk.forms import (SKRegionSelect,
SKPostalCodeField, SKDistrictSelect)
from django.test import SimpleTestCase
class SKLocalFlavorTests(SimpleTestCase):
def test_SKRegionSelect(self):
f = SKRegionSelect()
out = u'''<select name="regions">
<option value="BB">Bansk... | bsd-3-clause | 898,904,477,558,966,700 | 36.387931 | 78 | 0.707863 | false |
levibostian/myBlanky | googleAppEngine/google/appengine/datastore/datastore_stats_generator.py | 8 | 23814 | #!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | mit | 536,907,847,770,355,300 | 36.209375 | 80 | 0.557571 | false |
noroutine/ansible | lib/ansible/modules/network/aci/aci_l3out_route_tag_policy.py | 4 | 4341 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# 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': ['preview'],
... | gpl-3.0 | 5,909,000,334,209,281,000 | 28.732877 | 146 | 0.619903 | false |
aeph6Ee0/youtube-dl | youtube_dl/extractor/liveleak.py | 12 | 6919 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import int_or_none
class LiveLeakIE(InfoExtractor):
_VALID_URL = r'https?://(?:\w+\.)?liveleak\.com/view\?(?:.*?)i=(?P<id>[\w_]+)(?:.*)'
_TESTS = [{
'url': 'http://www.liveleak.com/view?i=757_1364311680'... | unlicense | -5,289,045,387,734,993,000 | 39.940828 | 223 | 0.535048 | false |
18mr/call-congress | call_server/political_data/countries/eu.py | 3 | 1449 | from . import DataProvider, CampaignType
from ..geocode import Geocoder, LocationError
from ...campaign.constants import (LOCATION_POSTAL, LOCATION_ADDRESS, LOCATION_LATLON)
import logging
log = logging.getLogger(__name__)
class EUCampaignType(CampaignType):
pass
class EUCampaignType_Custom(EUCampaignType):
... | agpl-3.0 | 221,441,955,621,147,300 | 24.875 | 86 | 0.692892 | false |
perimosocordiae/scipy | scipy/stats/mstats_basic.py | 4 | 100254 | """
An extension of scipy.stats.stats to support masked arrays
"""
# Original author (2007): Pierre GF Gerard-Marchant
__all__ = ['argstoarray',
'count_tied_groups',
'describe',
'f_oneway', 'find_repeats','friedmanchisquare',
'kendalltau','kendalltau_seasonal','kruskal','k... | bsd-3-clause | 9,009,525,621,301,111,000 | 31.267139 | 115 | 0.581363 | false |
fuzeman/Catalytic | deluge/plugins/extractor/extractor/gtkui.py | 3 | 3757 | #
# gtkui.py
#
# Copyright (C) 2009 Andrew Resch <andrewresch@gmail.com>
#
# Basic plugin template created by:
# Copyright (C) 2008 Martijn Voncken <mvoncken@gmail.com>
# Copyright (C) 2007-2009 Andrew Resch <andrewresch@gmail.com>
#
# Deluge is free software.
#
# You may redistribute it and/or modify it under the term... | gpl-3.0 | -1,470,855,038,128,670,000 | 38.547368 | 104 | 0.682193 | false |
birryree/servo | tests/wpt/web-platform-tests/webdriver/navigation.py | 24 | 3062 | import json
import pytest
import types
import urllib
import webdriver
def inline(doc):
return "data:text/html;charset=utf-8,%s" % urllib.quote(doc)
alert_doc = inline("<script>window.alert()</script>")
frame_doc = inline("<p>frame")
one_frame_doc = inline("<iframe src='%s'></iframe>" % frame_doc)
two_frames_do... | mpl-2.0 | 3,792,426,568,487,999,500 | 27.091743 | 69 | 0.693011 | false |
bluepeppers/dectest | dectest/suite.py | 1 | 10200 | """
The main test suite class, :class:`TestSuite` is found in this module.
"""
import functools
import logging
import sys
from . import config as mconfig
class TestSuite():
"""
This is the main test suite class. It should be asigned to a variable at
import time, and can then be used to reference decorato... | lgpl-3.0 | -6,682,651,335,274,926,000 | 29.909091 | 80 | 0.509314 | false |
mitchcapper/mythbox | resources/src/mythbox/mythtv/db.py | 1 | 35714 | #
# MythBox for XBMC - http://mythbox.googlecode.com
# Copyright (C) 2013 analogue@yahoo.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, or (at yo... | gpl-2.0 | 2,445,853,762,637,724,700 | 33.275432 | 235 | 0.500308 | false |
r888888888/models | attention_ocr/python/inception_preprocessing.py | 12 | 13658 | # 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 | 6,927,626,292,403,566,000 | 42.35873 | 113 | 0.665324 | false |
nefarioustim/parker | parker/parsedpage.py | 1 | 2077 | # -*- coding: utf-8 -*-
"""ParsedPage object for Parker."""
import re
class ParsedPage(object):
"""A ParsedPage."""
def __init__(self, page, parsed):
"""Constructor."""
self.page = page
self.original = page.content
self.parsed = parsed
def __repr__(self):
"""Ret... | gpl-3.0 | 2,504,927,921,253,335,600 | 26.693333 | 77 | 0.546461 | false |
endlessm/chromium-browser | third_party/pywebsocket3/src/mod_pywebsocket/request_handler.py | 5 | 12201 | # Copyright 2020, 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... | bsd-3-clause | -3,030,778,480,460,051,000 | 37.247649 | 79 | 0.647324 | false |
rsouza/pypln.web | pypln/web/core/tests/views/test_auth_token.py | 4 | 1564 | # -*- coding:utf-8 -*-
#
# Copyright 2012 NAMD-EMAP-FGV
#
# This file is part of PyPLN. You can get more information at: http://pypln.org/.
#
# PyPLN 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 vers... | gpl-3.0 | -8,832,061,720,658,029,000 | 36.238095 | 81 | 0.719949 | false |
popeye123/ytcc | ytcc/database.py | 1 | 6150 | # ytcc - The YouTube channel checker
# Copyright (C) 2019 Wolfgang Popp
#
# This file is part of ytcc.
#
# ytcc 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 | -219,221,117,723,217,280 | 35.826347 | 99 | 0.646341 | false |
placrosse/ImpalaToGo | tests/query_test/test_tpcds_queries.py | 3 | 4065 | #!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
# Functional tests running the TPC-DS workload
#
import logging
import pytest
from tests.common.test_vector import *
from tests.common.impala_test_suite import *
class TestTpcdsQuery(ImpalaTestSuite):
@classmethod
def get_workload(self)... | apache-2.0 | -7,602,916,329,451,986,000 | 30.511628 | 88 | 0.684625 | false |
mdpiper/topoflow | topoflow/utils/outlets.py | 2 | 8375 |
# Copyright (c) 2014, Scott D. Peckham
# September 2014
#------------------------------------------------------------------------
# Note: Wrote this on 9/19/14 to eliminate a cyclic dependency between
# BMI_base.py and basins.py. basins.py inherits from BMI_base.py
# and BMI_base.py has initialize_basin_... | mit | 7,722,501,380,031,204,000 | 36.725225 | 84 | 0.450627 | false |
celibertojr/Kbsim | Bots/original/MAS.py | 1 | 3837 |
"""
Orbiterbot
Orbiterbot is a somewhat basic demo bot, demonstrating the
challenges in Kilobot motion control. Orbiterbot strives to
orbit the bots that it sees, i.e., move at a constant
distance in relation to them. Orbiterbot works best with
few bots and either in a LINE or a small PILED form.
Orbiterbot implem... | gpl-3.0 | 6,139,681,880,174,727,000 | 23.596154 | 63 | 0.449831 | false |
andrewyoung1991/scons | test/Fortran/USE-MODULE-CASEINSENS.py | 2 | 1985 | #!/usr/bin/env python
#
# __COPYRIGHT__
#
# 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, publish,
... | mit | -4,869,491,471,624,016,000 | 28.626866 | 76 | 0.723929 | false |
mongodb/mongo-python-driver | test/qcheck.py | 2 | 7213 | # Copyright 2009-present 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 wri... | apache-2.0 | 9,088,701,023,615,842,000 | 28.683128 | 79 | 0.590739 | false |
xwu/swift | utils/swift_build_support/swift_build_support/products/cmark.py | 2 | 3764 | # swift_build_support/products/cmark.py -------------------------*- python -*-
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See https://swift.org/LICENSE.tx... | apache-2.0 | -7,533,352,132,496,101,000 | 32.90991 | 84 | 0.610786 | false |
whitepages/nova | nova/tests/unit/virt/vmwareapi/test_vm_util.py | 5 | 67896 | # Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
# Copyright 2013 Canonical Corp.
# 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
#
# htt... | apache-2.0 | -3,131,956,815,160,664,600 | 43.994036 | 79 | 0.595087 | false |
mscuthbert/abjad | abjad/tools/quantizationtools/test/test_quantizationtools_ParallelJobHandler___call__.py | 2 | 2932 | # -*- encoding: utf-8 -*-
import pytest
from abjad import *
from abjad.tools.abctools import AbjadObject
pytest.skip()
class Job(AbjadObject):
### INITIALIZER ###
def __init__(self, number):
self.number = number
### SPECIAL METHODS ###
def __call__(self):
self.result = [x for x in ... | gpl-3.0 | -8,890,897,502,070,720,000 | 31.955056 | 91 | 0.598568 | false |
randynobx/ansible | lib/ansible/modules/storage/netapp/na_cdot_user_role.py | 69 | 7317 | #!/usr/bin/python
# (c) 2017, NetApp, Inc
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.... | gpl-3.0 | -3,823,253,731,855,171,600 | 30.269231 | 96 | 0.558972 | false |
borges2003xx/gui2py | gui/tools/propeditor.py | 13 | 11978 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"Visual Property Editor (using wx PropertyGrid) of gui2py's components"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart"
__license__ = "LGPL 3.0"
# some parts where inspired or borrowed from wxFormBuilders & wxPython... | lgpl-3.0 | -3,794,994,782,484,283,000 | 41.02807 | 87 | 0.479128 | false |
kevinloken/SpaceGame | cocos2d/build/android-build.py | 16 | 10113 | #!/usr/bin/python
# android-build.py
# Build android
import sys
import os, os.path
import shutil
from optparse import OptionParser
CPP_SAMPLES = ['cpp-empty-test', 'cpp-tests']
LUA_SAMPLES = ['lua-empty-test', 'lua-tests']
ALL_SAMPLES = CPP_SAMPLES + LUA_SAMPLES
def get_num_of_cpu():
''' The build process can be... | mit | -7,224,623,448,749,480,000 | 36.455556 | 178 | 0.62652 | false |
Miiha/FilmAnalyzerKit | analyzer/script_parser.py | 1 | 8323 | #!/usr/bin/python
# coding: utf-8
# Thumps up for Adrien Luxey for providing the basis for the script parser
import re
import urllib.request
from pprint import pprint
from bs4 import BeautifulSoup, Tag, UnicodeDammit
from analyzer.script_entity import ScriptEntity
BLOCK_TYPES = ['character', 'speech', 'stage direct... | mit | 8,962,012,427,952,330,000 | 27.7 | 109 | 0.651688 | false |
SuYiling/chrome_depot_tools | upload_to_google_storage.py | 8 | 9371 | #!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Uploads files to Google Storage content addressed."""
import hashlib
import optparse
import os
import Queue
import re
import st... | bsd-3-clause | 2,507,045,588,945,568,000 | 34.767176 | 79 | 0.630242 | false |
mvpgomes/shopit-app | shopit_app/settings.py | 1 | 3320 | """
Django settings for gettingstarted project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ... | mit | -1,680,009,963,341,683,000 | 24.538462 | 73 | 0.708735 | false |
windskyer/k_nova | paxes_nova/virt/ibmpowervm/vif/common/exception.py | 1 | 8291 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# =================================================================
# =================================================================
from nova import exception
from paxes_nova import _
class IBMPowerVMInvalidHostConfig(exception.NovaException):
msg_fmt = _("Invali... | apache-2.0 | 4,515,412,128,977,048,000 | 40.663317 | 79 | 0.66337 | false |
ocanosoup/BuzzWordTrading | got/manager/TweetManager.py | 1 | 4075 | import urllib,urllib2,json,re,datetime,sys,cookielib
from .. import models
from pyquery import PyQuery
class TweetManager:
def __init__(self):
pass
@staticmethod
def getTweets(tweetCriteria, receiveBuffer = None, bufferLength = 100):
refreshCursor = ''
results = []
resultsAux = []
cookieJar = cooki... | mit | 4,992,910,821,774,390,000 | 31.862903 | 214 | 0.668712 | false |
buguen/pylayers | pylayers/location/geometric/constraints/tdoa.py | 1 | 11847 | # -*- coding:Utf-8 -*-
#####################################################################
#This file is part of RGPA.
#Foobar 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, ... | lgpl-3.0 | -5,037,019,738,145,777,000 | 32 | 144 | 0.493289 | false |
stasiek/robotframework | src/robot/running/usererrorhandler.py | 5 | 1698 | # Copyright 2008-2015 Nokia Solutions and Networks
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | apache-2.0 | 5,967,264,526,082,272,000 | 30.444444 | 81 | 0.68669 | false |
harveywwu/vnpy | beta/spreadtrading/stEngine.py | 4 | 21385 | # encoding: UTF-8
import json
import traceback
import shelve
import parser
import re
from vnpy.event import Event
from vnpy.trader.vtFunction import getJsonPath, getTempPath
from vnpy.trader.vtEvent import (EVENT_TICK, EVENT_TRADE, EVENT_POSITION,
EVENT_TIMER, EVENT_ORDER)
from vnpy.... | mit | 5,144,270,004,908,006,000 | 33.807496 | 89 | 0.462973 | false |
luispedro/jug | jug/tests/test_subcommand_api.py | 1 | 3503 | # -*- coding: utf-8 -*-
import os
import tempfile
import shutil
from io import StringIO
from jug.subcommands import cmdapi, SubCommand
from jug.options import parse
CMD = "hello-cmd"
MSG = "Hello world"
class HelloCommand(SubCommand):
"This should be visible"
name = "hello-cmd"
def run(self, *args, **... | mit | 6,150,630,182,557,904,000 | 24.948148 | 96 | 0.617471 | false |
jdc0589/troposphere | examples/OpsWorksSnippet.py | 33 | 4789 | # Converted from AWS OpsWorks Snippets located at:
# http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/quickref-opsworks.html
from troposphere import GetAZs, Join
from troposphere import Parameter, Ref, Template
from troposphere.elasticloadbalancing import LoadBalancer, HealthCheck
from troposphere.opswork... | bsd-2-clause | 80,115,980,387,956,260 | 24.886486 | 86 | 0.630403 | false |
konsP/synnefo | snf-astakos-app/astakos/im/migrations/0050_project_logs.py | 10 | 26461 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
NORMAL = 1
SUSPENDED = 10
TERMINATED = 100
class Migration(DataMigration):
def forwards(self, orm):
logs = []
suspended = orm.Project.objects.filter(state=SUSPENDED)
... | gpl-3.0 | -8,728,805,736,547,627,000 | 80.922601 | 219 | 0.549375 | false |
chp1084/raft | core/web/HeadlessWebPage.py | 11 | 2368 | #
# Implements a web page that has no user interaction
#
# Author: Gregory Fleischer (gfleischer@gmail.com)
#
# Copyright (c) 2011 RAFT Team
#
# This file is part of RAFT.
#
# RAFT 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 S... | gpl-3.0 | 8,379,230,694,211,682,000 | 36 | 104 | 0.707348 | false |
jaddison/ansible-modules-core | cloud/openstack/os_server.py | 2 | 15059 | #!/usr/bin/python
# coding: utf-8 -*-
# Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
# Copyright (c) 2013, Benno Joy <benno@ansible.com>
# Copyright (c) 2013, John Dewey <john@dewey.ws>
#
# This module is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Publi... | gpl-3.0 | 8,975,305,114,635,106,000 | 32.024123 | 97 | 0.60502 | false |
aequitas/home-assistant | homeassistant/components/ads/__init__.py | 2 | 9717 | """Support for Automation Device Specification (ADS)."""
import threading
import struct
import logging
import ctypes
from collections import namedtuple
import asyncio
import async_timeout
import voluptuous as vol
from homeassistant.const import (
CONF_DEVICE, CONF_IP_ADDRESS, CONF_PORT, EVENT_HOMEASSISTANT_STOP)
... | apache-2.0 | 8,721,155,345,039,397,000 | 31.827703 | 79 | 0.604713 | false |
tjguk/active_directory | active_directory.py | 1 | 45616 | # -*- coding: UTF-8 -*-
"""active_directory - a lightweight wrapper around COM support
for Microsoft's Active Directory
Active Directory is Microsoft's answer to LDAP, the industry-standard
directory service holding information about users, computers and
other resources in a tree structure, arranged by departme... | mit | -7,225,097,889,504,868,000 | 32.741813 | 121 | 0.613864 | false |
renzobautista/harambe | src/pyutil/corpus/patb/patbIntegrated.py | 4 | 7318 | # coding=UTF-8
'''
Handles the 'integrated' file format in the Penn Arabic Treebank. Written with reference to Part 3, v. 3.2.
Currently handles word-level information (tags, etc.) but not parses.
@author: Nathan Schneider (nschneid)
@since: 2010-06-22
'''
# Strive towards Python 3 compatibility
from __future__ impo... | gpl-3.0 | -8,900,256,055,603,863,000 | 41.284884 | 135 | 0.590815 | false |
zmsp/AIY-data-center-assistant | checkpoints/check_audio.py | 2 | 3957 | #!/usr/bin/env python3
# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | 4,900,490,422,745,662,000 | 26.866197 | 79 | 0.637352 | false |
sephalon/python-ivi | ivi/agilent/agilentDSOX93204A.py | 7 | 1691 | """
Python Interchangeable Virtual Instrument Library
Copyright (c) 2012-2014 Alex Forencich
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... | mit | 5,313,673,296,740,461,000 | 37.431818 | 86 | 0.737433 | false |
XTAv2/Enigma2 | lib/python/Plugins/SystemPlugins/VideoTune/VideoFinetune.py | 39 | 10747 | from Screens.Screen import Screen
from Components.Sources.CanvasSource import CanvasSource
from Components.ActionMap import ActionMap, NumberActionMap
from Tools.Directories import fileExists
from enigma import gFont, getDesktop, gMainDC, eSize, RT_HALIGN_RIGHT, RT_WRAP
def RGB(r,g,b):
return (r<<16)|(g<<8)|b
class ... | gpl-2.0 | -98,158,980,604,753,060 | 29.793696 | 165 | 0.612636 | false |
GirlsCodePy/girlscode-coursebuilder | modules/analytics/student_answers.py | 3 | 14543 | # Copyright 2014 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | gpl-3.0 | -3,296,108,856,855,251,500 | 41.153623 | 79 | 0.59802 | false |
sidd5sci/game-of-life | level1/gameOfLife.py | 1 | 5197 | import pygame,random,time
from physics import *
class creature(physics):
def __init__(self,pos,type='herbivore'):
super(creature,self).__init__(pos)
self.body = list()
self.health = 0.0
self.dna = list()
self.sensors = list()
self.state = 1
self.eggcycle = 0
self.gender = 0 # femal... | gpl-3.0 | 402,008,017,445,051,260 | 24.600985 | 85 | 0.53935 | false |
LoRexxar/Cobra-W | rules/php/CVI_1006.py | 1 | 1128 | # -*- coding: utf-8 -*-
"""
CVI-1006
~~~~
Sqli
:author: LoRexxar <LoRexxar@gmail.com>
:homepage: https://github.com/LoRexxar/cobra
:license: MIT, see LICENSE for more details.
:copyright: Copyright (c) 2017 LoRexxar. All rights reserved
"""
from cobra.file import file_grep
class ... | mit | 5,562,146,498,712,588,000 | 23.888889 | 253 | 0.598214 | false |
rlr/kitsune | kitsune/log_settings.py | 16 | 2434 | import logging
from django.conf import settings
from django.utils.log import dictConfig
config = {
'version': 1,
'disable_existing_loggers': True,
'root': {
'level': logging.ERROR,
'handlers': ['sentry'],
},
'formatters': {
'default': {
'format': '{0}: %(asctim... | bsd-3-clause | 125,666,190,443,743,680 | 28.325301 | 78 | 0.516845 | false |
dhananjayapte/zerorpc-python | zerorpc/channel.py | 55 | 9259 | # -*- coding: utf-8 -*-
# Open Source Initiative OSI - The MIT License (MIT):Licensing
#
# The MIT License (MIT)
# Copyright (c) 2012 DotCloud Inc (opensource@dotcloud.com)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Softwa... | mit | 812,583,336,741,772,500 | 32.425993 | 81 | 0.595421 | false |
DistrictDataLabs/partisan-discourse | corpus/serializers.py | 1 | 3614 | # corpus.serializers
# API serializers for corpus models and API interaction.
#
# Author: Benjamin Bengfort <bbengfort@districtdatalabs.com>
# Created: Mon Jul 18 09:30:17 2016 -0400
#
# Copyright (C) 2016 District Data Labs
# For license information, see LICENSE.txt
#
# ID: serializers.py [63935bc] benjamin@bengfor... | apache-2.0 | -8,383,569,969,590,026,000 | 31.558559 | 77 | 0.550083 | false |
heke123/chromium-crosswalk | third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/bot_test_expectations.py | 3 | 13505 | # Copyright (C) 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:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the ... | bsd-3-clause | -7,903,344,962,598,063,000 | 43.718543 | 144 | 0.651685 | false |
francisco-sanchez-molina/epubcheck | src/tools/CompareResults.py | 11 | 9424 | #!c:\python27\python
import os
import sys
import optparse
import json
import Dictionary
def compareResults(oldJson, newJson):
#
# initialize the differences structure and local copies of the publication metadata and the manifest for comparison
#
jsonDelta = {}
jsonDelta["summary"] = {}
jsonDelt... | mit | -3,529,110,712,158,283,300 | 46.125 | 225 | 0.57587 | false |
ahmetdaglarbas/e-commerce | oscar/apps/voucher/south_migrations/0003_auto__del_field_voucher_end_date__del_field_voucher_start_date__add_fi.py | 8 | 29473 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
from oscar.core.compat import AUTH_USER_MODEL, AUTH_USER_MODEL_NAME
class Migration(SchemaMigration):
no_dry_run = True
def forwards(self, orm):
db.delete_column('voucher... | bsd-3-clause | -477,845,585,386,637,400 | 86.201183 | 224 | 0.558613 | false |
nash-x/hws | nova/virt/xenapi/volumeops.py | 13 | 9480 | # Copyright (c) 2010 Citrix Systems, Inc.
# Copyright (c) 2013 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE... | apache-2.0 | -2,453,383,443,129,189,000 | 41.511211 | 79 | 0.578481 | false |
chuckchen/spark | examples/src/main/python/sql/streaming/structured_kafka_wordcount.py | 27 | 3172 | #
# 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,042,165,745,358,744,600 | 35.045455 | 94 | 0.686633 | false |
owlabs/incubator-airflow | airflow/hooks/S3_hook.py | 1 | 21908 | # -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | apache-2.0 | 1,483,173,333,321,454 | 36.642612 | 108 | 0.562626 | false |
tcoppi/scrappy | modules/wallet/wallet.py | 2 | 1524 | import decimal
from ..module import Module
from ..dbmodel import DBModel
from ..utility.user.user import get_account
from ..utility.user.wallet import Wallet
class wallet(Module):
models = [Wallet]
def __init__(self, scrap):
super(wallet, self).__init__(scrap)
scrap.register_event("fact", "m... | mit | -3,634,649,062,845,205,500 | 31.425532 | 132 | 0.647638 | false |
OriHoch/Open-Knesset | lobbyists/migrations/0001_initial.py | 14 | 22818 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'LobbyistHistory'
db.create_table(u'lobbyists_lobbyisthist... | bsd-3-clause | -8,471,705,199,564,426,000 | 79.348592 | 202 | 0.571084 | false |
campbe13/openhatch | vendor/packages/gdata/tests/gdata_tests/apps/emailsettings/data_test.py | 16 | 6786 | #!/usr/bin/python
#
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | agpl-3.0 | 6,857,692,623,414,436,000 | 27.512605 | 79 | 0.734601 | false |
jinesh-patel/netmiko | netmiko/avaya/avaya_ers_ssh.py | 3 | 1288 | '''
Netmiko support for Avaya Ethernet Routing Switch
'''
from __future__ import print_function
from __future__ import unicode_literals
from netmiko.ssh_connection import SSHConnection
from netmiko.netmiko_globals import MAX_BUFFER
import time
# Avaya presents Enter Ctrl-Y to begin.
CTRL_Y = '\x19'
class AvayaErsSSH(... | mit | 1,881,018,196,789,199,600 | 31.2 | 74 | 0.567547 | false |
suhe/odoo | addons/website_crm_partner_assign/controllers/main.py | 14 | 8144 | # -*- coding: utf-8 -*-
import werkzeug
from openerp import SUPERUSER_ID
from openerp.addons.web import http
from openerp.addons.web.http import request
from openerp.addons.website.models.website import slug, unslug
from openerp.addons.website_partner.controllers.main import WebsitePartnerPage
from openerp.tools.transl... | gpl-3.0 | -168,435,272,592,398,700 | 48.357576 | 175 | 0.602652 | false |
weberwang/WeRoBot | werobot/config.py | 2 | 1083 | # -*- coding: utf-8 -*-
import imp
class ConfigAttribute(object):
"""
让一个属性指向一个配置
"""
def __init__(self, name):
self.__name__ = name
def __get__(self, obj, type=None):
if obj is None:
return self
rv = obj.config[self.__name__]
return rv
def __set... | mit | -5,221,786,407,613,180,000 | 21.477273 | 75 | 0.502528 | false |
simonwydooghe/ansible | lib/ansible/modules/cloud/vultr/vultr_account_info.py | 14 | 3400 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2019, René Moser <mail@renemoser.net>
# 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':... | gpl-3.0 | -6,304,356,472,830,202,000 | 24.742424 | 99 | 0.647145 | 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.