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 |
|---|---|---|---|---|---|---|---|---|---|---|
jpshort/odoo | comunity_modules/attachment_preview/model/ir_attachment.py | 4 | 2843 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2014 Therp BV (<http://therp.nl>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of ... | agpl-3.0 | 139,208,640,833,083,520 | 40.808824 | 79 | 0.553641 | false |
jamestwebber/scipy | scipy/optimize/_dual_annealing.py | 1 | 29742 | # Dual Annealing implementation.
# Copyright (c) 2018 Sylvain Gubian <sylvain.gubian@pmi.com>,
# Yang Xiang <yang.xiang@pmi.com>
# Author: Sylvain Gubian, Yang Xiang, PMP S.A.
"""
A Dual Annealing global optimization algorithm
"""
from __future__ import division, print_function, absolute_import
import numpy as np
fr... | bsd-3-clause | 1,399,627,725,223,141,400 | 42.166909 | 91 | 0.601405 | false |
xpansa/account-financial-tools | account_invoice_tax_required/__openerp__.py | 13 | 1253 | # -*- coding: utf-8 -*-
##############################################################################
#
# Author Vincent Renaville. 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
# publis... | agpl-3.0 | 8,236,022,747,232,913,000 | 39.419355 | 78 | 0.592179 | false |
sourcepole/kadas-albireo | python/plugins/processing/algs/qgis/FixedDistanceBuffer.py | 8 | 2865 | # -*- coding: utf-8 -*-
"""
***************************************************************************
FixedDistanceBuffer.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
*******************... | gpl-2.0 | -5,116,185,953,834,948,000 | 38.791667 | 80 | 0.572426 | false |
bq/bitbloq-offline | app/res/web2board/linux/platformio/builder/scripts/frameworks/energia.py | 5 | 2025 | # Copyright 2014-2015 Ivan Kravets <me@ikravets.com>
#
# 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 | -8,511,220,934,102,577,000 | 26.364865 | 79 | 0.693827 | false |
tudorvio/nova | nova/tests/unit/cells/test_cells_rpcapi.py | 20 | 32450 | # Copyright (c) 2012 Rackspace Hosting
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... | apache-2.0 | -384,949,060,984,185,300 | 41.697368 | 78 | 0.531772 | false |
tjhei/burnman_old2 | burnman/geotherm.py | 1 | 4203 | # BurnMan - a lower mantle toolkit
# Copyright (C) 2012, 2013, Heister, T., Unterborn, C., Rose, I. and Cottaar, S.
# Released under GPL v2 or later.
import numpy as np
import matplotlib.pyplot as pyplot
import scipy.integrate as integrate
import burnman
from tools import *
def watson_baxter(pressure):
"""
p... | gpl-2.0 | -6,482,715,697,707,091,000 | 33.45082 | 148 | 0.675708 | false |
rootio/rootio_web | alembic/versions/5e35694cdba_chng_default_dt.py | 1 | 1425 | """chng_default_dt
Revision ID: 5e35694cdba
Revises: 43b646fd9f17
Create Date: 2017-08-23 14:19:50.467309
"""
# revision identifiers, used by Alembic.
revision = '5e35694cdba'
down_revision = '43b646fd9f17'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
def upgrade():
... | agpl-3.0 | 8,971,753,639,186,360,000 | 38.583333 | 142 | 0.686316 | false |
valtandor/easybuild-framework | easybuild/toolchains/compiler/gcc.py | 4 | 4198 | ##
# Copyright 2012-2015 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en),
# the Hercules foundation (htt... | gpl-2.0 | 54,587,703,296,905,520 | 36.482143 | 112 | 0.661267 | false |
beraldoleal/entendaobrasil | api/camara/base.py | 1 | 1661 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2014 Beraldo Leal <beraldo@ime.usp.br>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License version
# 2 as published by the Free Software Foundation.
#
# vim: tabstop=4:softtabstop=... | gpl-2.0 | 8,964,178,856,227,553,000 | 29.181818 | 76 | 0.642771 | false |
BuildingLink/sentry | tests/sentry/digests/test_notifications.py | 6 | 3809 | from __future__ import absolute_import
from collections import (
OrderedDict,
defaultdict,
)
from exam import fixture
from six.moves import reduce
from sentry.digests import Record
from sentry.digests.notifications import (
Notification,
event_to_record,
rewrite_record,
group_records,
sort... | bsd-3-clause | -1,414,423,788,055,724,000 | 26.402878 | 106 | 0.513521 | false |
abdinoor/Watson | watson/grammar.py | 1 | 5178 |
class Constant(object):
'''
A token object that represents a string literal. The literal may have a / in it to
denote multiple values
'''
def __init__(self, name):
self.values = name.split("/")
def match(self, word):
'''
Returns whether or not the word matches this c... | mit | 9,154,911,169,913,797,000 | 27.607735 | 103 | 0.562766 | false |
gcd0318/python-evdev | evdev/uinput.py | 4 | 6982 | # encoding: utf-8
import os
import stat
import time
from evdev import _uinput
from evdev import ecodes, util, device
class UInputError(Exception):
pass
class UInput(object):
'''
A userland input device and that can inject input events into the
linux input subsystem.
'''
__slots__ = (
... | bsd-3-clause | -7,001,426,001,989,759,000 | 32.567308 | 91 | 0.549413 | false |
mgit-at/ansible | test/units/modules/network/f5/test_bigip_config.py | 21 | 3285 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2017 F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os
import json
import pytest
import sys
if sys.version_info < (2, ... | gpl-3.0 | -7,887,804,610,251,092,000 | 27.565217 | 91 | 0.641705 | false |
olifre/root | tutorials/pyroot/first.py | 28 | 1676 | ## \file
## \ingroup tutorial_pyroot
## \notebook
## My first PyROOT interactive session
##
## \macro_image
## \macro_code
##
## \author Wim Lavrijsen
from ROOT import TCanvas, TF1, TPaveLabel, TPad, TText
from ROOT import gROOT
nut = TCanvas( 'nut', 'FirstSession', 100, 10, 700, 900 )
nut.Range( 0, 0, 20, 24 )
nut.... | lgpl-2.1 | 310,565,348,949,317,100 | 27.40678 | 90 | 0.623508 | false |
bmya/odoo-infrastructure | infrastructure/models/server_hostname.py | 7 | 4232 | # -*- coding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in module root
# directory
##############################################################################
from openerp import models, fields, api, _
from op... | agpl-3.0 | 5,929,500,091,521,291,000 | 31.060606 | 78 | 0.526229 | false |
VirrageS/io-kawiarnie | caffe/cash/migrations/0008_auto_20160615_1957.py | 1 | 1422 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-06-15 17:57
from __future__ import unicode_literals
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('caffe', '0001_initial'),
('cash', '0007_auto_2016052... | mit | 2,469,195,989,864,711,700 | 32.857143 | 124 | 0.592827 | false |
tensorflow/neural-structured-learning | research/a2n/utils.py | 1 | 3047 | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 | -5,664,629,057,037,464,000 | 33.235955 | 78 | 0.67148 | false |
dennishuo/dataproc-initialization-actions | rapids/test_rapids.py | 1 | 1795 | import os
import unittest
from parameterized import parameterized
from integration_tests.dataproc_test_case import DataprocTestCase
class RapidsTestCase(DataprocTestCase):
COMPONENT = 'rapids'
INIT_ACTIONS = ['rapids/rapids.sh']
TEST_SCRIPT_FILE_NAME = 'verify_rapids.py'
def verify_instance(self, n... | apache-2.0 | -2,271,468,749,975,615,500 | 36.395833 | 77 | 0.577159 | false |
hephaestus9/Ironworks | modules_lib/xbmc/recently_added.py | 1 | 2688 | # -*- coding: utf-8 -*-
from flask import render_template
import jsonrpclib, ast, os
@app.route('/recently_added_episodes/<server_id>')
def recently_added_episodes(server_id):
return render_recently_added_episodes(server_id)
@app.route('/recently_added_movies/<server_id>')
def recently_added_movies(server_id):... | mit | 2,522,911,749,063,268,000 | 32.6 | 184 | 0.685268 | false |
gklyne/annalist | src/annalist_root/annalist/tests/entity_testlistdata.py | 1 | 14216 | """
Utility functions to support entity data testing
"""
from __future__ import unicode_literals
from __future__ import absolute_import, division, print_function
__author__ = "Graham Klyne (GK@ACM.ORG)"
__copyright__ = "Copyright 2014, G. Klyne"
__license__ = "MIT (http://opensource.org/licenses/MIT)"
imp... | mit | -1,469,320,164,280,331,500 | 37.215054 | 91 | 0.498382 | false |
gaste/dwasp | tests/wasp1/AllAnswerSets/checker_14__backtracking_model_checks___short_version.test.py | 3 | 3871 | input = """
a v b :- not c.
b :- d, not c.
e v a :- f.
g v d :- h.
i v g :- j.
e v a v k :- l.
l v e v a :- l, i.
j v not_i :- g.
c v m :- i.
h :- k.
n v i v e.
o v h.
o v p.
q v o v f.
q v n v c.
not_h v not_c.
g v r.
not_e :- not e.
not_a :- not a.
not_q :- not q.
not_b :- not b.
:- i, not_i.
:- c, not_c.
"""
outp... | apache-2.0 | 9,165,852,336,120,066,000 | 33.5625 | 53 | 0.451821 | false |
hozn/coilmq | coilmq/auth/__init__.py | 3 | 1193 | """
Authentication providers.
Because authentication providers are instantiated and configured in the application scope
(and not in the request handler), the authenticator implementations must be thread-safe.
"""
import abc
__authors__ = ['"Hans Lellelid" <hans@xmpl.org>']
__copyright__ = "Copyright 2009 Hans Lellelid... | apache-2.0 | 2,274,441,923,661,447,700 | 34.088235 | 89 | 0.728416 | false |
haxsaw/actuator | src/tests/config_tests.py | 1 | 39940 | #
# Copyright (c) 2014 Tom Carroll
#
# 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, dis... | mit | 2,926,311,277,934,066,700 | 34.251545 | 103 | 0.555133 | false |
rfinn/LCS | paper1code/LCSmeasuresnr24NSA.py | 1 | 6768 | #!/usr/bin/env python
"""
"""
from pylab import *
import os, pyfits,ds9
from LCSReadmasterBaseNSA import *
from scipy.interpolate import interp1d
import urllib, atpy
from pyraf import iraf
iraf.stsdas()
iraf.analysis()
iraf.isophote()
iraf.tables()
iraf.ttools()
iraf.digiphot()
#iraf.apphot()
iraf.daophot()
min_... | gpl-3.0 | -2,141,867,585,166,676,500 | 35.192513 | 206 | 0.585697 | false |
engdan77/edoAutoHomeMobile | garden/__init__.py | 9 | 35416 | '''
Graph
======
The :class:`Graph` widget is a widget for displaying plots. It supports
drawing multiple plot with different colors on the Graph. It also supports
a title, ticks, labeled ticks, grids and a log or linear representation on
both the x and y axis, independently.
To display a plot. First create a graph w... | mit | 1,045,187,973,886,983,200 | 38.57095 | 79 | 0.555399 | false |
ostash/qt-creator-i18n-uk | tests/system/suite_qtquick/tst_qtquick_creation/test.py | 7 | 2111 | source("../../shared/qtcreator.py")
workingDir = None
def main():
global workingDir
startApplication("qtcreator" + SettingsPath)
# using a temporary directory won't mess up an eventually exisiting
workingDir = tempDir()
projectName = createNewQtQuickApplication(workingDir, targets = QtQuickConstan... | lgpl-2.1 | 7,007,054,503,512,343,000 | 41.22 | 124 | 0.678351 | false |
Microsoft/PTVS | Python/Product/Miniconda/Miniconda3-x64/Lib/site-packages/win32com/client/__init__.py | 5 | 22594 | # This module exists to create the "best" dispatch object for a given
# object. If "makepy" support for a given object is detected, it is
# used, otherwise a dynamic dispatch object.
# Note that if the unknown dispatch object then returns a known
# dispatch object, the known class will be used. This contrasts
# with... | apache-2.0 | -1,377,030,094,880,480,300 | 40.305302 | 133 | 0.691954 | false |
arun6582/django | django/db/backends/utils.py | 24 | 7196 | import datetime
import decimal
import hashlib
import logging
import re
from time import time
from django.conf import settings
from django.utils.encoding import force_bytes
from django.utils.timezone import utc
logger = logging.getLogger('django.db.backends')
class CursorWrapper:
def __init__(self, cursor, db):
... | bsd-3-clause | -3,647,598,684,043,985,400 | 31.125 | 100 | 0.568232 | false |
bdfoster/blumate | tests/components/binary_sensor/test_template.py | 1 | 4116 | """The tests for the Template Binary sensor platform."""
import unittest
from unittest import mock
from blumate.const import EVENT_STATE_CHANGED, MATCH_ALL
from blumate.components.binary_sensor import template
from blumate.exceptions import TemplateError
from tests.common import get_test_home_assistant
class TestBi... | mit | 8,647,993,542,165,457,000 | 33.881356 | 79 | 0.531341 | false |
Eksmo/calibre | src/calibre/gui2/preferences/plugins.py | 1 | 17420 | #!/usr/bin/env python
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
__license__ = 'GPL v3'
__copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en'
import textwrap, os
from collections import OrderedDict
from PyQt4.Qt import (Qt, QModelIndex, QAbstractItemModel, QVarian... | gpl-3.0 | -5,514,348,601,313,937,000 | 39.511628 | 92 | 0.564868 | false |
wdm0006/Flask-Blogging | test/test_sqlastorage.py | 1 | 13493 | try:
from builtins import range
except ImportError:
pass
import unittest
import tempfile
import os
from flask_blogging.sqlastorage import SQLAStorage
from sqlalchemy import create_engine
from test import FlaskBloggingTestCase
import sqlalchemy as sqla
import time
try:
import _mysql
HAS_MYSQL = True
exce... | mit | 8,523,674,342,013,697,000 | 37.99711 | 79 | 0.547173 | false |
Abjad/abjad | abjad/indicators/StartTrillSpan.py | 1 | 7210 | import typing
from ..bundle import LilyPondFormatBundle
from ..overrides import TweakInterface
from ..pitch.intervals import NamedInterval
from ..pitch.pitches import NamedPitch
from ..storage import StorageFormatManager
class StartTrillSpan:
r"""
LilyPond ``\startTrillSpan`` command.
.. container:: ex... | gpl-3.0 | 3,452,362,261,971,732,000 | 26.003745 | 78 | 0.496533 | false |
klipstein/dojango | dojango/util/dojo_collector.py | 12 | 1196 | from threading import local
__all__ = ['activate', 'deactivate', 'get_collector', 'add_module']
_active = local()
def activate():
"""
Activates a global accessible object, where we can save information about
required dojo modules.
"""
class Collector:
used_dojo_modules = []
def a... | bsd-3-clause | -1,829,347,207,035,283,500 | 22.45098 | 77 | 0.60786 | false |
terrameijar/oppia | core/jobs_registry.py | 2 | 3538 | # coding: utf-8
#
# Copyright 2014 The Oppia 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 requi... | apache-2.0 | 2,811,917,874,789,958,700 | 42.679012 | 79 | 0.782928 | false |
spywhere/Terminality | tests/test_macro_parser.py | 1 | 14051 | import sublime
import unittest
from unittest.mock import patch, MagicMock
from Terminality.macro import Macro
def file_content(region):
contents = """
Hello, World!
This might be a long file
In which use to test something
Blah blah blah...
"""
return contents[region.begin():region.end()]
... | mit | -546,960,842,366,438,140 | 27.214859 | 68 | 0.436481 | false |
youprofit/scikit-image | skimage/io/tests/test_plugin_util.py | 35 | 2230 | from skimage.io._plugins.util import prepare_for_display, WindowManager
from skimage._shared._warnings import expected_warnings
from numpy.testing import *
import numpy as np
np.random.seed(0)
class TestPrepareForDisplay:
def test_basic(self):
with expected_warnings(['precision loss']):
prep... | bsd-3-clause | 4,026,512,516,071,056,000 | 28.342105 | 71 | 0.612108 | false |
rghe/ansible | test/runner/lib/cloud/cs.py | 4 | 8841 | """CloudStack plugin for integration tests."""
from __future__ import absolute_import, print_function
import json
import os
import re
import time
from lib.cloud import (
CloudProvider,
CloudEnvironment,
)
from lib.util import (
find_executable,
ApplicationError,
display,
SubprocessError,
... | gpl-3.0 | 7,607,066,938,655,173,000 | 30.916968 | 141 | 0.592354 | false |
SHTOOLS/SHTOOLS | pyshtools/shio/yilm_index_vector.py | 2 | 1502 | def YilmIndexVector(i, l, m):
"""
Compute the index of a 1D array of spherical harmonic coefficients
corresponding to i, l, and m.
Usage
-----
index = YilmIndexVector (i, l, m)
Returns
-------
index : integer
Index of a 1D array of spherical harmonic coefficients correspond... | bsd-3-clause | 7,922,310,537,229,932,000 | 33.930233 | 79 | 0.573236 | false |
ksachs/invenio | modules/websubmit/lib/functions/CaseEDS.py | 35 | 4620 | ## This file is part of Invenio.
## Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (at... | gpl-2.0 | 1,106,610,747,090,644,100 | 39.526316 | 78 | 0.610606 | false |
mithro/HDMI2USB-litex-firmware | targets/atlys/hdmi2usb.py | 1 | 2231 | from migen.fhdl.decorators import ClockDomainsRenamer
from litex.soc.integration.soc_core import mem_decoder
from litex.soc.interconnect import stream
from gateware.encoder import EncoderDMAReader, EncoderBuffer, Encoder
from gateware.streamer import USBStreamer
from targets.utils import csr_map_update
from targets.a... | bsd-2-clause | 2,761,800,389,207,639,000 | 36.183333 | 81 | 0.640072 | false |
Lingotek/client | tests/test_actions/test_download.py | 2 | 3533 | from tests.test_actions import *
from ltk.actions.download_action import *
from ltk.actions.clean_action import CleanAction
from ltk.actions.request_action import RequestAction
from ltk.actions.config_action import ConfigAction
from ltk.actions.pull_action import PullAction
from ltk.actions.rm_action import RmAction
fr... | mit | -8,816,043,668,277,424,000 | 36.585106 | 108 | 0.636003 | false |
dbbhattacharya/kitsune | kitsune/sumo/middleware.py | 17 | 7876 | import contextlib
import re
import urllib
from django.conf import settings
from django.core.urlresolvers import is_valid_path
from django.db.utils import DatabaseError
from django.http import HttpResponseRedirect, HttpResponsePermanentRedirect
from django.http import HttpResponseForbidden
from django.shortcuts import ... | bsd-3-clause | -4,682,056,368,905,304,000 | 34.96347 | 79 | 0.637887 | false |
mbooth101/spec2scl | spec2scl/bin.py | 2 | 4459 | """spec2scl entry point.
To be installed as /usr/bin/spec2scl.
"""
import argparse
import sys
from spec2scl.convertor import Convertor
from spec2scl.metapackage import Metapackage
from spec2scl.version import version
def get_parser():
"""Return an argument parser for CLIcommand."""
parser = argparse.Argume... | mit | -7,342,918,088,804,012,000 | 30.401408 | 89 | 0.592734 | false |
NeCTAR-RC/neutron | neutron/plugins/nec/extensions/packetfilter.py | 17 | 7755 | # Copyright 2012-2013 NEC Corporation.
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... | apache-2.0 | 1,969,084,743,495,518,000 | 37.20197 | 78 | 0.579626 | false |
tfroehlich82/EventGhost | eg/Classes/MessageReceiver.py | 2 | 4391 | # -*- coding: utf-8 -*-
#
# This file is part of EventGhost.
# Copyright © 2005-2020 EventGhost Project <http://www.eventghost.net/>
#
# EventGhost is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation, either versio... | gpl-2.0 | 632,442,106,804,209,300 | 31.761194 | 77 | 0.614123 | false |
adelina-t/nova | nova/objects/service.py | 8 | 9638 | # Copyright 2013 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | apache-2.0 | -6,605,676,994,764,515,000 | 39.158333 | 78 | 0.602511 | false |
lorensen/VTKExamples | src/Python/VisualizationAlgorithms/ExponentialCosine.py | 1 | 2270 | #!/usr/bin/env python
import math
import vtk
def main():
colors = vtk.vtkNamedColors()
# Create the RenderWindow, Renderer and Interactor.
#
ren = vtk.vtkRenderer()
renWin = vtk.vtkRenderWindow()
renWin.AddRenderer(ren)
iren = vtk.vtkRenderWindowInteractor()
iren.SetRenderWindow(re... | apache-2.0 | 8,300,699,698,438,049,000 | 24.222222 | 80 | 0.652863 | false |
tima/ansible | lib/ansible/executor/play_iterator.py | 20 | 26397 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# 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) an... | gpl-3.0 | 8,333,173,544,927,719,000 | 46.734177 | 149 | 0.561011 | false |
tchernomax/ansible | lib/ansible/modules/network/aci/aci_interface_policy_leaf_profile.py | 10 | 6845 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2017, Bruno Calogero <brunocalogero@hotmail.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_... | gpl-3.0 | 4,175,242,929,237,327,000 | 26.938776 | 141 | 0.621329 | false |
jvanbrug/netflix | tests/test_py_c_interface.py | 1 | 1455 | import ctypes
import numpy as np
import os
from utils import data_paths
def test_py_c_access_test_can_read_numpy_array_in_memory():
test_array = np.array(range(0, 100), dtype=np.int32)
library_file_name = 'test_py_c_interface.so'
library_file_path = os.path.join(data_paths.LIBRARY_DIR_PATH,
... | mit | 4,447,658,009,486,906,400 | 41.794118 | 75 | 0.642612 | false |
mmalorni/server-tools | __unported__/server_env_base_external_referentials/__openerp__.py | 17 | 1921 | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Guewen Baconnier
# Copyright 2011-2012 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
# ... | agpl-3.0 | 4,934,513,819,826,931,000 | 39.87234 | 107 | 0.646018 | false |
nileshk/url-shortener | settings.py | 2 | 3330 | # Django settings for urlweb project.
import os, logging
#from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS
logging.basicConfig(
level = logging.DEBUG,
format = '%(asctime)s %(levelname)s %(message)s',
)
logging.debug("Reading settings...")
PROJECT_PATH = os.path.abspath(os.path.dirname(__f... | mit | 4,012,834,744,008,253,000 | 31.330097 | 108 | 0.702102 | false |
apache/incubator-airflow | airflow/providers/postgres/operators/postgres.py | 7 | 2837 | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | apache-2.0 | -6,200,059,722,519,025,000 | 37.863014 | 94 | 0.692633 | false |
myarjunar/inasafe | safe/gui/gui_utilities.py | 1 | 1646 | # coding=utf-8
"""GUI utilities for the dock and the multi Exposure Tool."""
from PyQt4.QtCore import Qt
from qgis.core import QgsMapLayerRegistry
def layer_from_combo(combo):
"""Get the QgsMapLayer currently selected in a combo.
Obtain QgsMapLayer id from the userrole of the QtCombo and return it as a
... | gpl-3.0 | -9,182,464,517,506,760,000 | 30.056604 | 77 | 0.690158 | false |
mrquim/mrquimrepo | repo/plugin.video.neptune-1.2.2/resources/lib/modules/trailer.py | 5 | 4060 | # -*- coding: utf-8 -*-
'''
Neptune Rising Add-on
Copyright (C) 2016 Mr. blamo
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 op... | gpl-2.0 | 5,560,824,499,457,464,000 | 34 | 151 | 0.578325 | false |
navcoindev/navcoin-core | share/rpcuser/rpcuser.py | 1 | 1110 | #!/usr/bin/env python2
# Copyright (c) 2015 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import hashlib
import sys
import os
from random import SystemRandom
import base64
import hmac
if len(sys.a... | mit | -5,064,398,183,000,619,000 | 26.073171 | 79 | 0.723423 | false |
markflyhigh/incubator-beam | sdks/python/apache_beam/io/gcp/datastore/v1/datastoreio_test.py | 2 | 12245 | #
# 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 | -4,795,461,419,426,154,000 | 40.64966 | 80 | 0.679134 | false |
saintdragon2/python-3-lecture-2015 | civil-final/2nd_presentation/11조/pygame/tests/freetype_test.py | 4 | 58221 | import os
if os.environ.get('SDL_VIDEODRIVER') == 'dummy':
__tags__ = ('ignore', 'subprocess_ignore')
import sys
import ctypes
import weakref
import gc
if __name__ == '__main__':
pkg_dir = os.path.split(os.path.abspath(__file__))[0]
parent_dir, pkg_name = os.path.split(pkg_dir)
is_pygame_pkg = (pkg_nam... | mit | -7,316,808,656,908,135,000 | 39.375173 | 86 | 0.557496 | false |
jakereps/q2-feature-table | q2_feature_table/_group.py | 3 | 2250 | # ----------------------------------------------------------------------------
# Copyright (c) 2016-2021, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | bsd-3-clause | -8,976,922,658,558,983,000 | 34.15625 | 79 | 0.602667 | false |
neumerance/cloudloon2 | .venv/lib/python2.7/site-packages/neutronclient/openstack/common/jsonutils.py | 7 | 6184 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2011 Justin Santa Barbara
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
#... | apache-2.0 | 6,229,877,536,238,740,000 | 34.745665 | 79 | 0.642464 | false |
goace/personal-file-sharing-center | web/net.py | 6 | 6202 | """
Network Utilities
(from web.py)
"""
__all__ = [
"validipaddr", "validip6addr", "validipport", "validip", "validaddr",
"urlquote",
"httpdate", "parsehttpdate",
"htmlquote", "htmlunquote", "websafe",
]
import urllib, time
try: import datetime
except ImportError: pass
import re
import socket
def validip6ad... | gpl-2.0 | -3,697,521,482,745,772,000 | 24.211382 | 91 | 0.506611 | false |
dansok/algos | crypto.py | 1 | 1334 | def isCryptSolution(crypt, solution):
mapping = {}
for s in solution:
mapping.setdefault(s[0], s[1])
def decrypt(crypt):
if len(crypt) == 1:
return int(mapping[crypt]), True
dec = ''
is_valid = True... | gpl-3.0 | -2,452,991,700,870,470,700 | 25.68 | 56 | 0.344828 | false |
Ritsyy/fjord | fjord/base/tests/test_domain.py | 5 | 1541 | from fjord.base.domain import get_domain
from fjord.base.tests import TestCase
class TestGetDomain(TestCase):
def test_get_domain(self):
testdata = [
# URLs with good domains
(u'foo.example.com', u'example.com'),
(u'http://example.com/', u'example.com'),
(u'... | bsd-3-clause | -6,361,642,283,630,301,000 | 38.512821 | 75 | 0.508761 | false |
kevinlondon/youtube-dl | youtube_dl/extractor/vidme.py | 15 | 5043 | from __future__ import unicode_literals
from .common import InfoExtractor
from ..compat import compat_HTTPError
from ..utils import (
ExtractorError,
int_or_none,
float_or_none,
parse_iso8601,
)
class VidmeIE(InfoExtractor):
_VALID_URL = r'https?://vid\.me/(?:e/)?(?P<id>[\da-zA-Z]+)'
_TESTS =... | unlicense | 1,919,706,753,337,305,300 | 32.397351 | 96 | 0.482848 | false |
ostash/qt-creator-i18n-uk | src/libs/3rdparty/botan/doc/scripts/comba.py | 14 | 1673 | #!/usr/bin/python
import sys
def comba_indexes(N):
indexes = []
for i in xrange(0, 2*N):
x = []
for j in xrange(max(0, i-N+1), min(N, i+1)):
x += [(j,i-j)]
indexes += [sorted(x)]
return indexes
def comba_sqr_indexes(N):
indexes = []
for i in xrange(0, 2*N... | lgpl-2.1 | -4,192,430,556,457,710,000 | 24.738462 | 94 | 0.451883 | false |
zerodayz/citellus | tests/plugins-unit-tests/test_executable_bit.py | 1 | 1158 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2018, 2019, 2020 Pablo Iranzo Gómez <Pablo.Iranzo@gmail.com>
import os
import sys
from unittest import TestCase
sys.path.append(os.path.abspath(os.path.dirname(__file__) + "/" + "../"))
import citellusclient.shell as citellus
testplugins = os.path.join(... | gpl-3.0 | 901,884,395,680,482,400 | 32.057143 | 79 | 0.636128 | false |
davidzchen/tensorflow | tensorflow/python/ops/control_flow_grad.py | 8 | 9421 | # Copyright 2015 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 | 8,617,369,318,038,735,000 | 37.453061 | 80 | 0.696741 | false |
mdinacci/rtw | editor/src/gui/qt/plugins/assetsbrowserplugin.py | 1 | 1076 | # -*- coding: utf-8-*-
"""
Author: Marco Dinacci <dev@dinointeractive.com>
Copyright © 2008-2009
"""
from PyQt4 import QtGui, QtDesigner
from assetsbrowser import AssetsBrowser
class AssetBrowserPlugin(QtDesigner.QPyDesignerCustomWidgetPlugin):
def __init__(self, parent=None):
QtDesigner.QPyDesignerCustom... | mit | 1,578,893,334,417,715,700 | 21.87234 | 74 | 0.616744 | false |
aselle/tensorflow | tensorflow/contrib/autograph/operators/data_structures.py | 7 | 11328 | # 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 | -5,471,634,621,851,008,000 | 32.514793 | 80 | 0.680879 | false |
m-kuhn/QGIS | tests/src/python/test_qgsfieldmodel.py | 17 | 11940 | # -*- coding: utf-8 -*-
"""QGIS Unit tests for QgsFieldModel
.. note:: 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.
"""
__au... | gpl-2.0 | 272,726,115,616,627,330 | 44.572519 | 116 | 0.672864 | false |
awd4/spnss | dag.py | 1 | 1293 | import argparse
import logging
import time
import learn
import spnss.knobs as knobs
import spnss.ss as ss
def run(name, t, cp=None, verbosity=1):
level = {0:logging.ERROR, 1:logging.WARNING, 2:logging.INFO, 3:logging.DEBUG}[verbosity]
logging.basicConfig(level=level)
# learn SPN
if cp is not None: ... | mit | 2,819,069,031,912,137,700 | 27.108696 | 142 | 0.656613 | false |
maartenq/ansible | test/units/modules/network/f5/test_bigip_firewall_dos_profile.py | 10 | 3653 | # -*- coding: utf-8 -*-
#
# Copyright: (c) 2018, F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os
import json
import pytest
import sys
from nose.plugins.skip i... | gpl-3.0 | -8,748,369,577,308,399,000 | 32.209091 | 91 | 0.681905 | false |
Jorge-Rodriguez/ansible | lib/ansible/module_utils/common/process.py | 73 | 1504 | # Copyright (c) 2018, Ansible Project
# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os
from ansible.module_utils.common.file import is_executable
def get_bin_p... | gpl-3.0 | -2,400,948,177,671,686,700 | 33.976744 | 110 | 0.641622 | false |
laayis/yowsup | yowsup/layers/protocol_messages/protocolentities/message_text.py | 59 | 1450 | from yowsup.structs import ProtocolEntity, ProtocolTreeNode
from .message import MessageProtocolEntity
class TextMessageProtocolEntity(MessageProtocolEntity):
'''
<message t="{{TIME_STAMP}}" from="{{CONTACT_JID}}"
offline="{{OFFLINE}}" type="text" id="{{MESSAGE_ID}}" notify="{{NOTIFY_NAME}}">
... | gpl-3.0 | 8,283,155,729,518,271,000 | 36.179487 | 126 | 0.622759 | false |
DGrady/pandas | pandas/tests/scalar/test_timedelta.py | 3 | 27307 | """ test the scalar Timedelta """
import pytest
import numpy as np
from datetime import timedelta
import pandas as pd
import pandas.util.testing as tm
from pandas.core.tools.timedeltas import _coerce_scalar_to_timedelta_type as ct
from pandas import (Timedelta, TimedeltaIndex, timedelta_range, Series,
... | bsd-3-clause | -4,043,777,534,284,601,000 | 38.51809 | 79 | 0.519281 | false |
Transkribus/TranskribusDU | TranskribusDU/tasks/DU_Table/DU_ABPTableCutAnnotator.py | 1 | 41809 | # -*- coding: utf-8 -*-
"""
Find cuts of a page and annotate them based on the table separators
Copyright Naver Labs Europe 2018
JL Meunier
Developed for the EU project READ. The READ project has received funding
from the European Union's Horizon 2020 research and innovation prog... | bsd-3-clause | -3,160,245,046,557,847,000 | 37.892093 | 139 | 0.509388 | false |
bgruening/EDeN | eden/modifier/graph/vertex_attributes.py | 1 | 6758 | import numpy as np
def incident_edge_label(graph_list=None, output_attribute='type', separator='', level=1):
"""
level: int
level=1 considers all incident edges
level=2 considers all edges incident on the neighbors
"""
for g in graph_list:
# iterate over nodes
for n, d in g.nod... | gpl-3.0 | 317,744,340,928,956,700 | 41.2375 | 184 | 0.534922 | false |
betrisey/home-assistant | homeassistant/components/sensor/arduino.py | 25 | 2027 | """
Support for getting information from Arduino pins.
Only analog pins are supported.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.arduino/
"""
import logging
import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHE... | mit | -4,180,161,488,686,603,300 | 25.324675 | 76 | 0.671436 | false |
Komodo/dbexplorer_pgsql | platform/Linux_x86_64-gcc3/pylib27/psycopg2/extras.py | 5 | 23380 | """Miscellaneous goodies for psycopg2
This module is a generic place used to hold little helper functions
and classes untill a better place in the distribution is found.
"""
# psycopg/extras.py - miscellaneous extra goodies for psycopg
#
# Copyright (C) 2003-2010 Federico Di Gregorio <fog@debian.org>
#
# psycopg2 is ... | mpl-2.0 | -8,806,729,448,066,326,000 | 30.852861 | 93 | 0.59799 | false |
ericfrederich/graphviz | setup.py | 2 | 1298 | # setup.py
from setuptools import setup, find_packages
setup(
name='graphviz',
version='0.4.6.dev0',
author='Sebastian Bank',
author_email='sebastian.bank@uni-leipzig.de',
description='Simple Python interface for Graphviz',
keywords='graph visualization dot render',
license='MIT',
url=... | mit | -6,055,215,827,509,615,000 | 34.081081 | 75 | 0.602465 | false |
Lilywei123/tempest | tempest/stress/actions/volume_attach_verify.py | 4 | 9860 | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# di... | apache-2.0 | 4,774,138,606,945,633,000 | 43.017857 | 79 | 0.559939 | false |
wjchen84/rapprentice | rapprentice/plotting_openrave.py | 3 | 1313 | import numpy as np
def draw_grid(env, f, mins, maxes, xres = .1, yres = .1, zres = .04):
xmin, ymin, zmin = mins
xmax, ymax, zmax = maxes
nfine = 30
xcoarse = np.arange(xmin, xmax, xres)
ycoarse = np.arange(ymin, ymax, yres)
if zres == -1: zcoarse = [(zmin+zmax)/2.]
else: zcoarse = np... | bsd-2-clause | 6,836,653,840,091,025,000 | 26.354167 | 69 | 0.460777 | false |
dhermes/google-cloud-python | spanner/google/cloud/spanner_v1/session.py | 2 | 12382 | # Copyright 2016 Google LLC All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | apache-2.0 | 8,085,130,178,526,806,000 | 32.646739 | 123 | 0.620417 | false |
SyntaxVoid/PyFusionGUI | GUI/ClusteringWindow.py | 1 | 6495 | # tkinter
try: # Will work with python 3
import tkinter as tk
except ImportError: # Will work with python 2
import Tkinter as tk
from CONSTANTS import *
import subprocess
from Utilities import jtools as jt
class ClusteringWindow:
def __init__(self, master, slurm_start_time, jobid):
# This Tople... | gpl-3.0 | -1,442,307,806,015,061,500 | 50.96 | 112 | 0.598152 | false |
boto/boto3 | tests/functional/docs/test_s3.py | 1 | 1421 | # Copyright 2015 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://aws.amazon.com/apache2.0/
#
# or in the "license" file accompa... | apache-2.0 | -6,142,008,855,066,756,000 | 40.794118 | 73 | 0.684025 | false |
shiehinms/vminspector | util.py | 1 | 3436 | import sys
import requests
from time import time
from functools import wraps
from urlparse import urlparse
from os import unlink, makedirs
from os.path import isdir, exists
from optparse import OptionParser
from azure.storage import BlobService
VERSION = 'v1.0.0'
USAGE = 'usage: python %prog -u url -k account_key -p ... | apache-2.0 | 4,956,004,392,117,826,000 | 25.84375 | 77 | 0.578871 | false |
estin/pomp | tests/test_contrib_urllib.py | 1 | 2529 | import logging
from pomp.core.base import BaseCrawler, BaseMiddleware
from pomp.core.engine import Pomp
from pomp.contrib.urllibtools import UrllibDownloader
from pomp.contrib.urllibtools import UrllibAdapterMiddleware
from mockserver import HttpServer, make_sitemap
from tools import DummyCrawler
from tools import Req... | bsd-3-clause | 5,951,056,302,155,495,000 | 26.791209 | 78 | 0.601423 | false |
blitzmann/Pyfa | gui/fitCommands/guiChangeFighterQty.py | 2 | 1171 | import wx
import gui.mainFrame
from gui import globalEvents as GE
from .calc.fitChangeFighterQty import FitChangeFighterQty
from service.fit import Fit
from logbook import Logger
pyfalog = Logger(__name__)
class GuiChangeFighterQty(wx.Command):
def __init__(self, fitID, position, amount=1):
wx.Command.__i... | gpl-3.0 | 1,605,500,041,040,471,000 | 33.441176 | 73 | 0.657558 | false |
ashhher3/seaborn | seaborn/tests/test_categorical.py | 8 | 75157 | import numpy as np
import pandas as pd
import scipy
from scipy import stats
import matplotlib as mpl
import matplotlib.pyplot as plt
from distutils.version import LooseVersion
pandas_has_categoricals = LooseVersion(pd.__version__) >= "0.15"
import nose.tools as nt
import numpy.testing as npt
from numpy.testing.decora... | bsd-3-clause | 4,935,085,947,800,979,000 | 34.038228 | 79 | 0.542371 | false |
rajegannathan/grasp-lift-eeg-cat-dog-solution-updated | python-packages/mne-python-0.10/mne/io/array/array.py | 4 | 1708 | """Tools for creating Raw objects from numpy arrays"""
# Authors: Eric Larson <larson.eric.d@gmail.com>
#
# License: BSD (3-clause)
import numpy as np
from ..base import _BaseRaw
from ...utils import verbose, logger
class RawArray(_BaseRaw):
"""Raw object from numpy array
Parameters
----------
dat... | bsd-3-clause | -3,811,285,579,663,346,700 | 33.16 | 79 | 0.574356 | false |
Scopart/GitDiffHelper | git/cmd.py | 1 | 7200 | # cmd.py
# Copyright (C) 2008-2010 Michael Trier (mtrier@gmail.com) and contributors
#
# This module is part of GitPython and is released under
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
import os, sys
import subprocess
import re
from utils import *
from errors import GitCommandError
# Ena... | mit | 6,160,838,160,962,607,000 | 31.570136 | 93 | 0.54793 | false |
daisychainme/daisychain | daisychain/home/tests/tests.py | 1 | 3888 | from allauth.account.models import EmailAddress
from django.contrib.auth.models import User
from django.test import TestCase, RequestFactory
from django.test.client import Client
class TestLoginView(TestCase):
def create_user(self):
user = User.objects.create_user(username='Superuser')
user.set_pa... | mit | 7,070,913,126,363,421,000 | 34.669725 | 78 | 0.595422 | false |
LordDamionDevil/Lony | lib/youtube_dl/extractor/hitbox.py | 14 | 7055 | # coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
clean_html,
parse_iso8601,
float_or_none,
int_or_none,
compat_str,
determine_ext,
)
class HitboxIE(InfoExtractor):
IE_NAME = 'hitbox'
_VALID_URL = r'https?://(?:w... | gpl-3.0 | -7,631,029,817,710,119,000 | 33.247573 | 123 | 0.45854 | false |
dstftw/youtube-dl | youtube_dl/update.py | 7 | 6908 | from __future__ import unicode_literals
import io
import json
import traceback
import hashlib
import os
import subprocess
import sys
from zipimport import zipimporter
from .utils import encode_compat_str
from .version import __version__
def rsa_verify(message, signature, key):
from hashlib import sha256
as... | unlicense | -4,118,087,812,083,312,000 | 35.941176 | 289 | 0.6174 | false |
djkonro/coala | coalib/processes/BearRunning.py | 2 | 24068 | import queue
import traceback
from coalib.bears.BEAR_KIND import BEAR_KIND
from coalib.bears.GlobalBear import GlobalBear
from coalib.bears.LocalBear import LocalBear
from coalib.misc import Constants
from coalib.processes.communication.LogMessage import LOG_LEVEL, LogMessage
from coalib.processes.CONTROL_ELEMENT impo... | agpl-3.0 | 5,439,513,065,143,898,000 | 43 | 79 | 0.538641 | false |
8u1a/plaso | tests/formatters/file_system.py | 1 | 1752 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""Tests for the file system stat event formatter."""
import unittest
from plaso.formatters import file_system
from tests.formatters import test_lib
class FileStatEventFormatterTest(test_lib.EventFormatterTestCase):
"""Tests for the file system stat event formatter."""
... | apache-2.0 | 8,404,195,075,121,901,000 | 29.736842 | 71 | 0.734589 | false |
Emergya/icm-openedx-educamadrid-platform-basic | lms/djangoapps/discussion_api/api.py | 14 | 28661 | """
Discussion API internal interface
"""
from collections import defaultdict
from urllib import urlencode
from urlparse import urlunparse
from django.core.exceptions import ValidationError
from django.core.urlresolvers import reverse
from django.http import Http404
import itertools
from rest_framework.exceptions imp... | agpl-3.0 | 3,909,942,036,455,274,000 | 34.692403 | 117 | 0.650919 | false |
primiano/depot_tools | git_map_branches.py | 1 | 10238 | #!/usr/bin/env python
# Copyright 2014 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.
"""Provides a short mapping of all the branches in your local repo, organized
by their upstream ('tracking branch') layout.
Example:
o... | bsd-3-clause | -8,290,671,882,435,309,000 | 31.194969 | 80 | 0.63528 | false |
Cryptoc1/Veer | Memory.py | 1 | 1631 | #!/usr/bin/python
import pygtk; pygtk.require('2.0')
import gtk, cairo
import Veer
import re
class Graph:
def __init__(self):
self.DrawingArea = gtk.DrawingArea()
self.DrawingArea.set_app_paintable(True)
# self.DrawingArea.connect('expose-event', self.update)
Veer.sidebar.size_plu... | mit | -8,029,232,803,097,287,000 | 29.773585 | 121 | 0.58553 | 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.