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 |
|---|---|---|---|---|---|---|---|---|---|---|
lavizhao/insummer | code/script/cal_rouge.py | 1 | 1665 | #!/usr/bin/python3
import os
ddir = "/home/lavi/project/insummer/duc/Rouge_scores/"
from pprint import pprint
def main(min_rouge1f):
total = []
count = 0
for fname in os.listdir(ddir):
fname = ddir+fname
f = open(fname)
count += 1
oner = {}
for line in f:
... | mit | -1,596,313,816,891,833,000 | 21.9 | 87 | 0.516532 | false |
stryder199/RyarkAssignments | Assignment2/web2py/scripts/contentparser.py | 2 | 4022 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import cStringIO
import re
import sys
import tarfile
import urllib
import xml.parsers.expat as expat
"""
Update script for contenttype.py module.
Usage: python contentupdate.py /path/to/contenttype.py
If no path is specified, script will look for contenttype.py in curre... | mit | 62,053,787,865,864,980 | 33.084746 | 212 | 0.582795 | false |
ronekko/chainer | chainer/functions/loss/sigmoid_cross_entropy.py | 2 | 5913 | import numpy
import chainer
from chainer.backends import cuda
from chainer import function_node
from chainer.functions.activation import sigmoid
from chainer import utils
from chainer.utils import type_check
class SigmoidCrossEntropy(function_node.FunctionNode):
"""Sigmoid activation followed by a sigmoid cross... | mit | 4,776,691,069,655,738,000 | 33.782353 | 77 | 0.560122 | false |
desirable-objects/hotwire-shell | hotwire/builtins/sechash.py | 4 | 2227 | # This file is part of the Hotwire Shell project API.
# Copyright (C) 2007 Colin Walters <walters@verbum.org>
# 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, includin... | gpl-2.0 | -7,527,450,221,668,916,000 | 41.826923 | 86 | 0.684329 | false |
bwhmather/verktyg | verktyg/testsuite/test_dispatch.py | 1 | 4486 | """
verktyg.testsuite.dispatch
~~~~~~~~~~~~~~~~~~~~~~~~~~
Tests for the core dispatcher.
:copyright: (c) 2014 by Ben Mather.
:license: BSD, see LICENSE for more details.
"""
import unittest
from verktyg.exceptions import NotImplemented, MethodNotAllowed, NotAcceptable
from verktyg.dispatch import... | bsd-3-clause | -4,829,780,922,076,107,000 | 29.310811 | 78 | 0.525858 | false |
tbenthompson/rupturotops | source/linear_viscoelastic/simple_elastic.py | 1 | 1904 | import numpy as np
from core.debug import _DEBUG
from matplotlib import pyplot as pyp
def elastic_stress(x, y, s, D, shear_modulus):
"""
Use the elastic half-space stress solution from Segall (2010)
"""
# TEST THIS!
factor = (s * shear_modulus) / (2 * np.pi)
main_term = -(y - D) / ((y - D) ** ... | lgpl-3.0 | 4,818,788,601,795,321,000 | 30.213115 | 68 | 0.544643 | false |
dongjoon-hyun/tensorflow | tensorflow/python/kernel_tests/self_adjoint_eig_op_test.py | 3 | 9513 | # 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,716,619,083,425,049,000 | 36.600791 | 80 | 0.618837 | false |
neumerance/cloudloon2 | .venv/lib/python2.7/site-packages/cmd2.py | 5 | 64971 | """Variant on standard library's cmd with extra features.
To use, simply import cmd2.Cmd instead of cmd.Cmd; use precisely as though you
were using the standard library's cmd, while enjoying the extra features.
Searchable command history (commands: "hi", "li", "run")
Load commands from file, save to file, edit comman... | apache-2.0 | 4,614,588,329,020,379,000 | 39.785311 | 239 | 0.552293 | false |
CargoSpace/CargoSpaceChallenge | contest/forms.py | 1 | 1081 | from django import forms
from contest.models import ContestSubmission, ProblemSet, ProblemInput
class ContestSubmissionForm(forms.ModelForm):
class Meta:
model = ContestSubmission
exclude = ["submitted_by","accepted"]
fields = [
"contest",
"problem",
"submission",#forms.FileField()
]
class Probl... | apache-2.0 | -6,713,205,025,555,224,000 | 21.081633 | 70 | 0.666975 | false |
dropbox/emmer | tests/test_conversation_manager.py | 1 | 2183 | import os
import sys
import unittest
sys.path.append(os.path.join(os.path.dirname(__file__), "../emmer"))
from conversation_table import ConversationTable
class StubConversation(object):
pass
class TestConversationTable(unittest.TestCase):
def test_add_get(self):
table = ConversationTable()
... | mit | -5,287,262,184,213,640,000 | 37.298246 | 75 | 0.639945 | false |
michath/MetaMonkey | js/src/config/expandlibs_gen.py | 7 | 1930 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
'''Given a list of object files and library names, prints a library
descriptor to standard output'''
from __future__ im... | mpl-2.0 | -1,199,564,518,024,695,300 | 37.6 | 92 | 0.629534 | false |
ohsu-computational-biology/server | tests/unit/test_response_generators.py | 1 | 7668 | """
Tests the backend response generators
"""
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import unittest
import ga4gh.backend as backend
import ga4gh.datamodel.reads as reads
import ga4gh.datamodel.variants as variants
import ga4gh.exceptions as excep... | apache-2.0 | 299,321,730,219,977,660 | 36.773399 | 78 | 0.699922 | false |
HomeRad/TorCleaner | tests/proxy/rfc2616/test_dateformat.py | 1 | 4662 | # -*- coding: iso-8859-1 -*-
# Copyright (C) 2005-2010 Bastian Kleineidam
"""
"""
import time
from .. import ProxyTest
from wc.http.date import get_date_rfc850, get_date_rfc1123, get_date_asctime
class test_dateformat_warn_rfc1123_rfc850(ProxyTest):
"""
Test deletion of Warning: header with rfc850 date and
... | gpl-2.0 | 2,906,512,642,459,607,600 | 28.694268 | 76 | 0.587516 | false |
AtteqCom/zsl | src/zsl/resource/resource_helper.py | 1 | 6542 | """
:mod:`zsl.resource.resource_helper`
-----------------------------------
.. moduleauthor:: Peter Morihladko
"""
from __future__ import absolute_import, division, print_function, unicode_literals
from builtins import *
from future.utils import viewitems, viewvalues
from sqlalchemy import and_, asc, desc, or_
from ... | mit | 3,730,029,478,048,246,000 | 27.077253 | 108 | 0.567869 | false |
by46/simplekit | simplekit/url/url.py | 1 | 1887 | import six
from six.moves import urllib
import util
from .path import Path
from .query import Query
__author__ = 'benjamin.c.yan'
SAFE_SEGMENT_CHARS = ":@-._~!$&'()*+,;="
DEFAULT_PORTS = {
'ftp': 21,
'ssh': 22,
'http': 80,
'https': 443,
}
class URL(object):
def __init__(self, url):
sel... | mit | 973,136,617,269,780,100 | 19.966667 | 86 | 0.550609 | false |
p-bro/potfit | tests/kim/test_kim_list_model_params.py | 3 | 1207 | import pytest
POTENTIAL_FILE_CONTENT = '''#F 5 1
#T ex_model_Ar_P_LJ
#C Ar
#E
KIM_PARAM cutoff
8.150000 8.150000 8.150000
KIM_PARAM epsilon
0.010400 0.010400 0.010400
KIM_PARAM sigma
3.400000 3.400000 3.400000
'''
def test_kim_model_params_dump_file(potfit):
potfit.create_param_file(kim_model_name='ex_model_Ar... | gpl-2.0 | 2,641,530,948,671,059,500 | 22.666667 | 95 | 0.684341 | false |
scottw13/BET-1 | bet/sensitivity/gradients.py | 1 | 23932 | # Copyright (C) 2014-2015 The BET Development Team
"""
This module contains functions for approximating gradient vectors of QoI maps.
All methods that cluster points around centers are written to return the samples
in the following order : CENTERS, FOLLOWED BY THE CLUSTER AROUND THE FIRST
CENTER, THEN THE CLUSTER AROU... | gpl-3.0 | 8,716,650,759,643,292,000 | 41.282686 | 182 | 0.648504 | false |
pscedu/slash2-stable | zfs-fuse/contrib/solaris/fixfiles.py | 1 | 1775 | #!/usr/bin/env python
import sys, os
from stat import *
def remove_comments(fin, fout):
sin = fin.read()
sout = ''
while 1:
# Here we are at the start of a line
i = sin.find('\n')
if i == -1:
# File ended
sout += sin
break
line = sin[:i]
ignore_cchar = False
if line.lstrip().startswith('#'... | isc | 2,800,599,929,985,834,500 | 17.882979 | 75 | 0.589296 | false |
robwebset/script.ebooks | resources/lib/mobi/lz77.py | 5 | 3054 | import struct
# ported directly from the PalmDoc Perl library
# http://kobesearch.cpan.org/htdocs/EBook-Tools/EBook/Tools/PalmDoc.pm.html
def uncompress_lz77(data):
length = len(data);
offset = 0; # Current offset into data
# char; # Character being examined
# ord; # Ordinal of $char
# lz77; ... | gpl-2.0 | 3,504,326,720,525,281,300 | 34.511628 | 95 | 0.611657 | false |
zenlambda/pip | tests/unit/test_cmdoptions.py | 40 | 1970 | import pip
from pip.basecommand import Command
from pip import cmdoptions
class SimpleCommand(Command):
name = 'fake'
summary = name
def __init__(self):
super(SimpleCommand, self).__init__()
self.cmd_opts.add_option(cmdoptions.no_use_wheel())
self.cmd_opts.add_option(cmdoptions.no... | mit | 8,077,742,803,930,349,000 | 30.774194 | 69 | 0.63198 | false |
yuxiaobu/nansat | mappers/mapper_generic.py | 1 | 11990 | # Name: mapper_generic.py
# Purpose: Generic Mapper for L3/L4 satellite or modeling data
# Authors: Asuka Yamakava, Anton Korosov, Morten Wergeland Hansen
# Licence: This file is part of NANSAT. You can redistribute it or modify
# under the terms of GNU General Public License, v.3
#... | gpl-3.0 | -2,212,177,753,891,639,300 | 46.019608 | 120 | 0.502002 | false |
pombredanne/zero-install | zeroinstall/__init__.py | 1 | 1476 | """
The Python implementation of the Zero Install injector is divided into four sub-packages:
- L{zeroinstall.injector} contains most of the interesting stuff for managing feeds, keys and downloads and for selecting versions
- L{zeroinstall.zerostore} contains low-level code for handling the implementation cache (wh... | lgpl-2.1 | -7,319,739,571,315,520,000 | 37.842105 | 131 | 0.752033 | false |
datalogics-robb/scons | test/site_scons/basic.py | 2 | 2127 | #!/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 | 230,234,978,400,440,640 | 29.826087 | 73 | 0.719793 | false |
yasserglez/tagfs | packages/tagfs/contrib/django/db/__init__.py | 8 | 3420 | import os
from django.conf import settings
from django.core import signals
from django.core.exceptions import ImproperlyConfigured
from django.utils.functional import curry
from django.utils.importlib import import_module
__all__ = ('backend', 'connection', 'DatabaseError', 'IntegrityError')
if not settings.DATABASE_... | mit | 3,173,112,652,308,821,500 | 40.707317 | 114 | 0.688012 | false |
arielalmendral/ert | python/python/ert_gui/ertwidgets/validationsupport.py | 3 | 3782 | from PyQt4.QtCore import Qt, QPoint, QObject, pyqtSignal
from PyQt4.QtGui import QWidget, QVBoxLayout, QSizePolicy, QFrame, QColor, QLabel
class ErrorPopup(QWidget):
error_template = ("<html>"
"<table style='background-color: #ffdfdf;'width='100%%'>"
"<tr><td style='fo... | gpl-3.0 | 8,552,073,589,198,036,000 | 33.381818 | 102 | 0.617663 | false |
Arable/evepod | lib/python2.7/site-packages/newrelic-2.12.0.10/newrelic/api/memcache_trace.py | 2 | 2454 | import sys
import types
import time
import newrelic.core.memcache_node
import newrelic.api.transaction
import newrelic.api.time_trace
import newrelic.api.object_wrapper
class MemcacheTrace(newrelic.api.time_trace.TimeTrace):
node = newrelic.core.memcache_node.MemcacheNode
def __init__(self, transaction, co... | apache-2.0 | 7,972,447,473,650,405,000 | 30.063291 | 74 | 0.622249 | false |
cwisecarver/osf.io | osf/models/__init__.py | 1 | 2134 | from osf.models.metaschema import MetaSchema # noqa
from osf.models.base import Guid, BlackListGuid # noqa
from osf.models.user import OSFUser # noqa
from osf.models.contributor import Contributor, RecentlyAddedContributor # noqa
from osf.models.session import Session # noqa
from osf.models.institution import Inst... | apache-2.0 | -5,058,507,975,873,217,000 | 59.971429 | 147 | 0.81209 | false |
lczub/TestLink-API-Python-client | example/Last7DaysTestCases.py | 1 | 2235 | #! /usr/bin/python
# -*- coding: UTF-8 -*-
# Copyright 2011-2019 Olivier Renault, James Stock, TestLink-API-Python-client developers
#
# 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
#
# ... | apache-2.0 | 583,941,020,991,559,800 | 41.169811 | 90 | 0.66085 | false |
iseppi/zookeepr | zk/model/proposal.py | 4 | 11472 | """The application's model objects"""
import sqlalchemy as sa
from meta import Base
from pylons.controllers.util import abort
from meta import Session
from person import Person
from person_proposal_map import person_proposal_map
from attachment import Attachment
from review import Review
from stream import Stream
... | gpl-2.0 | -2,526,908,764,949,024,000 | 35.303797 | 153 | 0.65734 | false |
vmax-feihu/hue | desktop/core/ext-py/lxml-3.3.6/src/lxml/sax.py | 24 | 8493 | """
SAX-based adapter to copy trees from/to the Python standard library.
Use the `ElementTreeContentHandler` class to build an ElementTree from
SAX events.
Use the `ElementTreeProducer` class or the `saxify()` function to fire
the SAX events of an ElementTree against a SAX ContentHandler.
See http://codespeak.net/lx... | apache-2.0 | -4,531,381,459,776,535,600 | 33.384615 | 79 | 0.580949 | false |
agiliq/nginx-python-buildpack | vendor/setuptools-2.1/tests/test_ez_setup.py | 10 | 1847 | import sys
import os
import tempfile
import unittest
import shutil
import copy
CURDIR = os.path.abspath(os.path.dirname(__file__))
TOPDIR = os.path.split(CURDIR)[0]
sys.path.insert(0, TOPDIR)
from ez_setup import (use_setuptools, _build_egg, _python_cmd, _do_download,
_install, DEFAULT_URL, DEFAULT_VERSION)
impor... | mit | 1,931,628,004,561,361,700 | 28.31746 | 77 | 0.619383 | false |
gablg1/PerfKitBenchmarker | perfkitbenchmarker/packages/openmpi.py | 4 | 1879 | # 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 agr... | apache-2.0 | -4,559,855,008,036,458,500 | 30.316667 | 80 | 0.685471 | false |
upconsulting/IsisCB | isiscb/zotero/tasks.py | 1 | 10839 | """
These functions are mostly related to transitioning data from the Zotero app
to the IsisData app.
TODO: many of these functions could use refactoring, or at least modularizing
for easier testing.
"""
from __future__ import unicode_literals
from django.db.models import Q
from isisdata.models import *
from zotero.... | mit | -1,027,604,526,228,755,100 | 35.867347 | 162 | 0.609927 | false |
willingc/oh-mainline | mysite/customs/migrations/0005_roundupbugtracker_csv_keyword.py | 17 | 4097 | # This file is part of OpenHatch.
# Copyright (C) 2009 OpenHatch, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later v... | agpl-3.0 | 2,410,658,205,368,940,500 | 54.364865 | 159 | 0.622163 | false |
dbarella/steganographic-image-processing | encoding.py | 1 | 3350 | """Script for encoding a payload into an image."""
import argparse
import pathlib
from PIL import Image, ImageMath
import utilities
def argument_parser() -> argparse.ArgumentParser:
"""Returns a configured argparser.ArgumentParser for this program."""
parser = argparse.ArgumentParser(
description='... | mit | -935,809,474,260,038,500 | 30.308411 | 80 | 0.605373 | false |
googleapis/googleapis-gen | google/cloud/notebooks/v1beta1/notebooks-v1beta1-py/google/cloud/notebooks_v1beta1/services/notebook_service/transports/grpc_asyncio.py | 1 | 34147 | # -*- coding: utf-8 -*-
# Copyright 2020 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | -3,841,256,649,743,030,300 | 44.108322 | 90 | 0.622456 | false |
analogue/mythbox | resources/lib/twisted/twisted/application/strports.py | 10 | 7839 | # -*- test-case-name: twisted.test.test_strports -*-
# Copyright (c) 2001-2010 Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Port description language
This module implements a description mini-language for ports, and provides
functions to parse it and to use it to directly construct appropriate
network... | gpl-2.0 | 8,508,588,329,813,402,000 | 38.195 | 89 | 0.657099 | false |
tmr232/Gooey | gooey/_tmp/widget_demo.py | 9 | 2979 | '''
Created on Dec 21, 2013
@author: Chris
'''
import sys
import hashlib
from time import time as _time, time
from time import sleep as _sleep
# from argparse import ArgumentParser
# import argparse
import argparse as ap
from argparse import ArgumentParser as AP
from gooey import Gooey
from gooey impor... | mit | 3,309,166,735,387,071,000 | 39.375 | 138 | 0.670695 | false |
Joergen/zamboni | mkt/carriers/tests.py | 4 | 2046 | import mock
from nose.tools import eq_
from test_utils import RequestFactory
from amo.tests import TestCase
from amo.urlresolvers import reverse, set_url_prefix
from . import get_carrier, set_carrier, context_processors
from .middleware import CarrierURLMiddleware
class TestCarrierURLs(TestCase):
def setUp(sel... | bsd-3-clause | 6,380,424,987,262,263,000 | 29.537313 | 59 | 0.626588 | false |
abstrakraft/rug | rug/project.py | 1 | 28881 | #!/usr/bin/env python
import os
import sys
import xml.dom.minidom
import config
import manifest
import git
import hierarchy
import output
class RugError(StandardError):
pass
class InvalidProjectError(RugError):
pass
RUG_DIR = '.rug'
#TODO: should this be configurable or in the manifest?
RUG_SHA_RIDER = 'refs/rug/... | gpl-3.0 | -1,158,218,370,191,547,100 | 32.082474 | 161 | 0.665836 | false |
jjmleiro/hue | desktop/core/src/desktop/migrations/0014_auto__add_unique_document_content_type_object_id.py | 8 | 10363 | # -*- coding: utf-8 -*-
import logging
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models, transaction
from desktop.models import Document
class Migration(SchemaMigration):
def forwards(self, orm):
# If there are d... | apache-2.0 | -6,683,750,418,178,323,000 | 65.429487 | 195 | 0.555438 | false |
vipul-sharma20/oh-mainline | vendor/packages/Django/django/contrib/auth/tests/hashers.py | 28 | 7337 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf.global_settings import PASSWORD_HASHERS as default_hashers
from django.contrib.auth.hashers import (is_password_usable,
check_password, make_password, PBKDF2PasswordHasher, load_hashers,
PBKDF2SHA1PasswordHasher, get_hasher, ident... | agpl-3.0 | 1,080,996,786,189,361,900 | 42.440476 | 87 | 0.666758 | false |
datascopeanalytics/chicago-new-business | src/figs.py | 1 | 1358 | import seaborn as sns
import matplotlib.pyplot as plt
class FlowOverTime(object):
def __init__(self, year_range, new_counts, old_counts):
diff_counts = [new + old for new, old in zip(new_counts, old_counts)]
sns.set(style="white", context="talk")
palette = sns.color_palette(palette='Set... | unlicense | -8,651,641,988,866,933,000 | 29.863636 | 118 | 0.607511 | false |
jonparrott/google-cloud-python | asset/noxfile.py | 2 | 3868 | # -*- coding: utf-8 -*-
#
# Copyright 2018 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... | apache-2.0 | 5,953,768,127,517,501,000 | 27.651852 | 80 | 0.619959 | false |
hospace/ToughRADIUS | toughradius/radiusd/plugins/acct_update_process.py | 4 | 1626 | #!/usr/bin/env python
#coding=utf-8
from twisted.python import log
from toughradius.radiusd.pyrad import packet
from toughradius.radiusd.settings import *
from toughradius.radiusd import utils
import logging
import datetime
def process(req=None,user=None,radiusd=None,**kwargs):
if not req.get_acct_status_type() ==... | agpl-3.0 | -4,266,075,051,683,850,000 | 36.837209 | 120 | 0.623616 | false |
dhomeier/astropy | astropy/io/fits/scripts/fitsdiff.py | 8 | 12904 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import argparse
import glob
import logging
import os
import sys
from astropy.io import fits
from astropy.io.fits.util import fill
from astropy import __version__
log = logging.getLogger('fitsdiff')
DESCRIPTION = """
Compare two FITS image files and re... | bsd-3-clause | 7,991,085,859,582,539,000 | 36.294798 | 80 | 0.618878 | false |
takeshineshiro/horizon | openstack_dashboard/dashboards/admin/volumes/volume_types/forms.py | 7 | 8730 | # 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
# d... | apache-2.0 | -3,924,998,294,218,275,300 | 41.378641 | 78 | 0.519015 | false |
tswast/google-cloud-python | container/google/cloud/container_v1beta1/__init__.py | 2 | 1033 | # -*- coding: utf-8 -*-
#
# 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... | apache-2.0 | 4,824,280,240,045,201,000 | 33.433333 | 74 | 0.758955 | false |
seibert-media/Highton | highton/models/party.py | 1 | 3481 | from highton.models import HightonModel
from highton.highton_constants import HightonConstants
from highton import fields
class Party(
HightonModel,
):
"""
:ivar id: fields.IntegerField(name=HightonConstants.ID)
:ivar author_id: fields.IntegerField(name=HightonConstants.AUTHOR_ID)
:ivar backgroun... | apache-2.0 | -3,361,866,450,321,599,500 | 55.145161 | 106 | 0.74921 | false |
mrev11/ccc3 | jt/jtpython/test-menu.py | 2 | 3806 | #! /usr/bin/env python
# _*_ coding: latin-1 _*_
from jtlib import *
from jtlib.jtalert import jtalert
def mkdialog():
dlg=jtdialog.new(6,20,20,80)
dlg.caption('Menü teszt')
dlg.layout="vbox"
dlg.layout="fix"
### Elsô pulldown (file)
menu=dlg.add(jtmenu.new())
menu.text="Fi... | lgpl-2.1 | -1,531,147,518,782,421,200 | 20.033149 | 68 | 0.623226 | false |
jhayworth/config | .emacs.d/elpy/rpc-venv/lib/python2.7/site-packages/setuptools/extern/__init__.py | 10 | 2514 | import sys
class VendorImporter:
"""
A PEP 302 meta path importer for finding optionally-vendored
or otherwise naturally-installed packages from root_name.
"""
def __init__(self, root_name, vendored_names=(), vendor_pkg=None):
self.root_name = root_name
self.vendored_names = set(v... | gpl-3.0 | -3,533,123,111,926,965,000 | 33.438356 | 78 | 0.558473 | false |
Grumbel/dirtool | tests/test_util.py | 1 | 1341 | # dirtool.py - diff tool for directories
# Copyright (C) 2017 Ingo Ruhnke <grumbel@gmail.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 3 of the License, or
# (at your opt... | gpl-3.0 | -4,314,944,913,284,218,400 | 29.477273 | 71 | 0.60701 | false |
adalke/rdkit | rdkit/Chem/MolDb/Loader_sa.py | 1 | 6074 | # $Id$
#
# Copyright (C) 2007-2009 Greg Landrum
# @@ All Rights Reserved @@
# This file is part of the RDKit.
# The contents are covered by the terms of the BSD license
# which is included in the file license.txt, found at the root
# of the RDKit source tree.
#
import sqlalchemy
from rdkit import Chem
from rdki... | bsd-3-clause | -278,411,356,040,623,140 | 28.062201 | 102 | 0.666118 | false |
aquaya/pipeline | application/models.py | 1 | 12596 | ''' mongoengine models
'''
from mongoengine import *
class User(Document):
''' some are admins some are not
'''
admin_rights = BooleanField(required=True)
api_id = StringField()
api_key = StringField()
email = EmailField(required=True, unique=True, max_length=254)
email_confirmation_code =... | mit | -8,808,990,847,646,030,000 | 33.043243 | 79 | 0.681724 | false |
TritonNetworking/themis_tritonsort | src/scripts/themis/metaprograms/utils/utils.py | 2 | 8889 | import os, sys, subprocess, shlex, json, re
from LogLineDescription import load_descriptions_from_file
LOGGREP_PATH = os.path.abspath(os.path.join(
os.path.dirname(__file__), os.pardir, os.pardir, os.pardir, os.pardir,
"loggrep", "loggrep"))
def match_queries_to_descriptions(queries, descriptions):
... | bsd-3-clause | 5,822,477,329,420,167,000 | 35.731405 | 86 | 0.602205 | false |
bigswitch/neutron | neutron/api/rpc/handlers/dvr_rpc.py | 9 | 5496 | # Copyright 2014, 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 | 6,510,722,061,339,239,000 | 37.166667 | 79 | 0.650109 | false |
niltonlk/nest-simulator | pynest/nest/tests/test_quantal_stp_synapse.py | 8 | 3798 | # -*- coding: utf-8 -*-
#
# test_quantal_stp_synapse.py
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST 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 th... | gpl-2.0 | -6,447,948,262,742,387,000 | 32.026087 | 110 | 0.630595 | false |
wilvk/ansible | lib/ansible/plugins/action/group_by.py | 54 | 1818 | # Copyright 2012, Jeroen Hoekx <jeroen@hoekx.be>
#
# 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 ve... | gpl-3.0 | 1,685,535,593,504,862,000 | 36.102041 | 84 | 0.673267 | false |
Spark001/LabelImg | libs/labelDialog.py | 1 | 3616 | try:
from PyQt5.QtGui import *
from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
except ImportError:
from PyQt4.QtGui import *
from PyQt4.QtCore import *
from lib import newIcon, labelValidator, newAction, addActions
from functools import partial
BB = QDialogButtonBox
class LabelDialog(QD... | mit | -1,995,101,432,184,391,400 | 35.16 | 80 | 0.592644 | false |
OceanOptics/FloatProcess | test_process.py | 1 | 1894 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author: nils
# @Date: 2016-03-10 16:02:19
# @Last Modified by: nils
# @Last Modified time: 2017-01-03 22:33:53
# MAIN_RT is a script that is intended to run on individual profiles
# the following processing is done:
# 1. load float configuration
# 2. impor... | gpl-3.0 | -3,536,137,749,781,354,500 | 25.305556 | 106 | 0.676346 | false |
GNOME/billreminder | src/gui/widgets/trayicon.py | 2 | 3562 | # -*- coding: utf-8 -*-
__all__ = ['NotifyIcon']
import sys
import os
import gtk
import time
try:
import appindicator
APPINDICATOR = True
except:
APPINDICATOR = False
from lib import common
from lib.utils import ContextMenu
class NotifyIcon:
""" This class creates the tray icon notification - GTK 2.... | gpl-3.0 | 5,821,658,813,228,889,000 | 30.245614 | 130 | 0.549972 | false |
seecr/seecr-test | test/mockservertest.py | 1 | 2939 | ## begin license ##
#
# "Seecr Test" provides test tools.
#
# Copyright (C) 2013, 2019-2021 Seecr (Seek You Too B.V.) https://seecr.nl
#
# This file is part of "Seecr Test"
#
# "Seecr Test" is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# t... | gpl-2.0 | 1,053,645,833,172,903,300 | 37.168831 | 109 | 0.684927 | false |
acarmel/CouchPotatoServer | couchpotato/core/plugins/browser.py | 32 | 3893 | import ctypes
import os
import string
import traceback
import time
from couchpotato import CPLog
from couchpotato.api import addApiView
from couchpotato.core.event import addEvent
from couchpotato.core.helpers.encoding import sp, ss, toUnicode
from couchpotato.core.helpers.variable import getUserDir
from couchpotato.c... | gpl-3.0 | -7,023,234,115,289,796,000 | 30.144 | 154 | 0.578731 | false |
nicolashainaux/mathmaker | tests/integration/mental_calculation/04_yellow1/test_04_yellow1_challenge.py | 1 | 1621 | # -*- coding: utf-8 -*-
# Mathmaker creates automatically maths exercises sheets
# with their answers
# Copyright 2006-2018 Nicolas Hainaux <nh.techn@gmail.com>
# This file is part of Mathmaker.
# Mathmaker is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License... | gpl-3.0 | 7,308,699,029,930,740,000 | 37.595238 | 76 | 0.634793 | false |
daira/tahoe-lafs-debian | src/allmydata/manhole.py | 5 | 10635 |
# this is adapted from my code in Buildbot -warner
import binascii, base64
from twisted.python import log
from twisted.application import service, strports
from twisted.cred import checkers, portal
from twisted.conch import manhole, telnet, manhole_ssh, checkers as conchc
from twisted.conch.insults import insults
f... | gpl-2.0 | 9,179,711,797,089,938,000 | 37.11828 | 79 | 0.63874 | false |
squall1988/lquant | test/test_v_state.py | 1 | 2168 | # coding=utf-8
__author__ = 'squall'
import pandas as pd
import numpy as np
import matplotlib.pylab as plt
import os
total = 0
total_event = 0
final_result = []
for roots, _, files in os.walk('d:/stock/new-data'):
for f in files:
file_path = os.path.join(roots, f)
try:
data = pd.read... | bsd-2-clause | 3,792,033,364,546,819,000 | 32.890625 | 104 | 0.4631 | false |
aniruddha-adhikary/fudging-automators | scrapers/result_checker-hsc.py | 1 | 2049 | #!/usr/bin/env python
# This script fetches (probably doesn't work anymore) results of
# HSC Exam, Bangaldesh.
import urllib2
from BeautifulSoup import BeautifulSoup
def get_html(exam, year, board, roll):
"""Get the result page HTML output directly.
get_html(exam, year, board, roll)"""
base_url = "http://www.ed... | mit | -914,201,017,888,720,000 | 25.973684 | 86 | 0.687164 | false |
cloudera/hue | desktop/core/ext-py/navoptapi-0.1.0/altuscli/__init__.py | 4 | 3220 | # Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Modifications made by Cloudera are:
# Copyright (c) 2016 Cloudera, 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. A cop... | apache-2.0 | -1,953,822,374,105,349,600 | 34.384615 | 80 | 0.643789 | false |
caoxudong/code_practice | leetcode/617_merge_two_binary_trees.py | 1 | 4569 | """
Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are not.
You need to merge them into a new binary tree. The merge rule is that if two nodes overlap, then sum node values up as the new value of the merged node. Otherwis... | mit | 165,613,983,425,408,200 | 33.353383 | 219 | 0.446487 | false |
home-assistant/home-assistant | homeassistant/helpers/trigger.py | 5 | 3391 | """Triggers."""
from __future__ import annotations
import asyncio
import logging
from types import MappingProxyType
from typing import Any, Callable
import voluptuous as vol
from homeassistant.const import CONF_PLATFORM
from homeassistant.core import CALLBACK_TYPE, HomeAssistant, callback
from homeassistant.exceptio... | apache-2.0 | 4,498,958,735,861,948,000 | 30.990566 | 87 | 0.657033 | false |
g2p/SimpleTAL | tests/TALTests/XMLTests/TALSingletonTests.py | 1 | 10765 | #!/usr/bin/python
""" Copyright (c) 2009 Colin Stewart (http://www.owlfish.com/)
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyr... | bsd-3-clause | 8,382,727,267,810,647,000 | 39.469925 | 204 | 0.672643 | false |
dellysunnymtech/bitbake | lib/toaster/orm/migrations/0008_auto__chg_field_variablehistory_operation__chg_field_recipe_descriptio.py | 6 | 16612 | # -*- 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):
# Changing field 'VariableHistory.operation'
db.alter_column(u'orm_varia... | gpl-2.0 | -3,423,948,738,375,569,400 | 72.831111 | 162 | 0.553937 | false |
BehavioralInsightsTeam/edx-platform | common/djangoapps/entitlements/admin.py | 13 | 3334 | """Admin forms for Course Entitlements"""
from django import forms
from django.contrib import admin
from opaque_keys import InvalidKeyError
from opaque_keys.edx.keys import CourseKey
from xmodule.modulestore.django import modulestore
from .models import CourseEntitlement, CourseEntitlementPolicy, CourseEntitlementSup... | agpl-3.0 | 7,709,993,555,587,085,000 | 35.637363 | 112 | 0.632573 | false |
kidaa30/spacewalk | backend/server/rhnServer/search_notify.py | 4 | 1394 | #
# Copyright (c) 2008--2015 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public License,
# version 2 (GPLv2). There is NO WARRANTY for this software, express or
# implied, including the implied warranties of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. You should have received a c... | gpl-2.0 | -5,595,695,197,977,589,000 | 33.85 | 90 | 0.674319 | false |
mlperf/training_results_v0.6 | Google/benchmarks/transformer/implementations/tpu-v3-2048-transformer/dataset_preproc/data_generators/wikisum/get_references_web.py | 7 | 3008 | # coding=utf-8
# Copyright 2018 The Tensor2Tensor Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | apache-2.0 | 9,147,517,682,418,317,000 | 34.388235 | 109 | 0.694481 | false |
Juniper/euca2ools | euca2ools/commands/ec2/revoke.py | 1 | 1696 | # Copyright 2009-2013 Eucalyptus Systems, Inc.
#
# Redistribution and use of this software 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 ... | bsd-2-clause | -4,472,226,785,310,921,700 | 44.837838 | 74 | 0.769458 | false |
adeboisanger/thumbor | tests/filters/test_watermark.py | 5 | 2616 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# thumbor imaging service
# https://github.com/thumbor/thumbor/wiki
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 globo.com timehome@corp.globo.com
from preggy import expect
from tests.base import FilterTestCase
cl... | mit | 1,533,809,273,229,052,200 | 44.894737 | 124 | 0.689602 | false |
jjgoings/McMurchie-Davidson | mmd/realtime.py | 1 | 7265 | from __future__ import division
from __future__ import print_function
import numpy as np
from scipy.linalg import expm
class RealTime(object):
"""Class for real-time routines"""
def __init__(self,mol,numsteps=1000,stepsize=0.1,field=0.0001,pulse=None):
self.mol = mol
self.field = field
... | bsd-3-clause | -2,012,891,293,625,211,100 | 38.05914 | 78 | 0.526497 | false |
tedder/ansible | lib/ansible/modules/network/nxos/nxos_facts.py | 9 | 33660 | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... | gpl-3.0 | -6,398,832,401,995,222,000 | 31.396535 | 116 | 0.555318 | false |
radiojam11/connectthedots | Devices/GatewayConnectedDevices/BtUSB_2_BtUART_Example/BtUSB_2_BtUART_Example.py | 16 | 5727 | '''
Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
The MIT License (MIT)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitati... | mit | 6,806,571,821,409,369,000 | 38.496552 | 246 | 0.607997 | false |
cloudcache/zstack-utility | zstacklib/zstacklib/utils/salt.py | 3 | 3851 | '''
@author: YYK
'''
import shell
import ssh
import os.path
import log
import subprocess
import lock
import time
import json
logger = log.get_logger(__name__)
class SaltError(Exception):
'''salt error'''
def prepare_salt_state(state_path, salt_state_path='/srv/salt'):
try:
... | apache-2.0 | 2,149,440,955,060,939,000 | 38.968085 | 413 | 0.586601 | false |
aweinstock314/aweinstock-programming-competition-solutions | upe_competition_2017_04_09/solutions/solve_dining.py | 1 | 1200 | #!/usr/bin/env python
foods = []
try:
while True:
tmp = raw_input().rstrip().split(':')
categories = tmp[1].split(',')
name, price = tmp[0].split(',')
price = float(price)
foods.append([name, price, set(categories)])
except EOFError:
pass
#print foods
all_flavors = set(... | agpl-3.0 | 2,157,975,292,861,958,700 | 25.666667 | 94 | 0.564167 | false |
lcnodc/codes | 09-revisao/practice_python/tic_tac_toe_draw.py | 1 | 3900 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Exercise 27: Tic Tac Toe Draw
This exercise is Part 3 of 4 of the Tic Tac Toe exercise series. The
other exercises are: Part 1, Part 2, and Part 4.
In a previous exercise we explored the idea of using a list of lists as
a “data structure” to store information about a ... | mit | 4,072,697,720,786,208,300 | 32.094017 | 78 | 0.662965 | false |
kenshay/ImageScript | ProgramData/SystemFiles/Python/Lib/site-packages/scipy/stats/tests/test_morestats.py | 7 | 55766 | # Author: Travis Oliphant, 2002
#
# Further enhancements and tests added by numerous SciPy developers.
#
from __future__ import division, print_function, absolute_import
import warnings
import numpy as np
from numpy.random import RandomState
from numpy.testing import (assert_array_equal,
assert_almost_equal, ass... | gpl-3.0 | 5,094,190,005,229,645,000 | 37.915562 | 92 | 0.56443 | false |
ucloud/uai-sdk | examples/tensorflow/train/crnn_chinese/code/local_utils/tensorboard_vis_summary.py | 2 | 2460 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Time : 18-2-28 下午4:49
# @Author : Luo Yao
# @Site : http://icode.baidu.com/repos/baidu/personal-code/Luoyao
# @File : tensorboard_vis_summary.py
# @IDE: PyCharm Community Edition
"""
实现一些tensorboard卷积神经网络可视化工具
"""
import tensorflow as tf
class CNNVisualizer(... | apache-2.0 | 1,608,053,443,314,635,300 | 30.921053 | 100 | 0.546991 | false |
mikewied/cbagent | cbagent/collectors/libstats/net.py | 1 | 1769 | from collections import defaultdict
from cbagent.collectors.libstats.remotestats import (RemoteStats,
multi_node_task,
single_node_task)
class NetStat(RemoteStats):
def __init__(self, *args, **kwargs):
... | apache-2.0 | -5,185,722,637,904,546,000 | 34.38 | 76 | 0.491238 | false |
engineer0x47/SCONS | build/lib/SCons/Tool/javah.py | 2 | 4613 | """SCons.Tool.javah
Tool-specific initialization for javah.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001 - 2014 The SCons Foundation
#
# Permission is hereby granted, free of charge... | mit | -8,302,697,187,911,299,000 | 32.671533 | 119 | 0.65077 | false |
anthgur/servo | tests/wpt/web-platform-tests/webdriver/tests/element_send_keys/scroll_into_view.py | 11 | 2790 | from tests.support.asserts import assert_success
from tests.support.fixtures import is_element_in_viewport
from tests.support.inline import inline
def send_keys_to_element(session, element, text):
return session.transport.send(
"POST",
"/session/{session_id}/element/{element_id}/value".format(
... | mpl-2.0 | 7,449,961,674,898,999,000 | 34.769231 | 85 | 0.67957 | false |
sk89q/Plumeria | plumeria/command/__init__.py | 1 | 1690 | import argparse
import logging
from functools import wraps
from plumeria.command.exception import *
from plumeria.command.manager import Command, Mapping, CommandManager, Context, CommandError
from plumeria.command.parse import Parser
from plumeria.event import bus
from plumeria.message import Response
from plumeria.t... | mit | -7,651,772,241,881,949,000 | 32.137255 | 98 | 0.689941 | false |
MikeStitt/simple-locating | test_pixels.py | 1 | 15468 | #!/usr/bin/python
#
# See https://github.com/MikeStitt/simple-locating/blob/master/license.txt for license.
import math
import cv2
import numpy as np
import scipy as Sci
import scipy.linalg
import where
pi = math.pi
debug_label = ''
debug_pos_err = ''
target_name = { where.UNKNOWN: 'UN', where.LOW: 'BT', where.MID_... | mit | 4,963,036,012,235,682,000 | 48.736334 | 142 | 0.400116 | false |
aam-at/tensorflow | tensorflow/python/keras/layers/einsum_dense.py | 5 | 13533 | # Copyright 2019 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,643,406,939,624,919,000 | 39.15727 | 80 | 0.640656 | false |
TathagataChakraborti/resource-conflicts | PLANROB-2015/py2.5/lib/python2.5/bsddb/dbtables.py | 6 | 25629 | #-----------------------------------------------------------------------
#
# Copyright (C) 2000, 2001 by Autonomous Zone Industries
# Copyright (C) 2002 Gregory P. Smith
#
# License: This is free software. You may use this software for any
# purpose including modification/redistribution, so long as
... | mit | -5,376,170,521,990,108,000 | 35.3017 | 135 | 0.534004 | false |
itsjeyd/edx-platform | common/test/acceptance/tests/lms/test_certificate_web_view.py | 10 | 9797 | """
Acceptance tests for the certificate web view feature.
"""
from common.test.acceptance.tests.helpers import UniqueCourseTest, EventsTestMixin, load_data_str, get_element_padding
from nose.plugins.attrib import attr
from common.test.acceptance.fixtures.course import CourseFixture, XBlockFixtureDesc, CourseUpdateDesc... | agpl-3.0 | -7,193,028,522,696,737,000 | 39.483471 | 118 | 0.631214 | false |
enthought/traitsgui | enthought/pyface/workbench/traits_ui_view.py | 1 | 3122 | """ A view whose content is provided by a traits UI. """
# Standard library imports.
import logging
# Enthought library imports.
from enthought.traits.api import Any, Instance, Str
from enthought.traits.ui.api import UI
# Local imports.
from view import View
# Logging.
logger = logging.getLogger(__name__)
class... | bsd-3-clause | 8,619,045,688,183,192,000 | 27.907407 | 79 | 0.483344 | false |
Intel-tensorflow/tensorflow | tensorflow/python/data/experimental/ops/cardinality.py | 14 | 4688 | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 5,984,968,972,292,914,000 | 39.068376 | 105 | 0.725683 | false |
erinspace/osf.io | osf_tests/test_handlers.py | 16 | 1470 | import pytest
from nose.tools import assert_raises
from framework.celery_tasks import handlers
from website.project.tasks import on_node_updated
class TestCeleryHandlers:
@pytest.fixture()
def queue(self):
return handlers.queue()
def test_get_task_from_queue_not_there(self):
task = hand... | apache-2.0 | -6,787,971,714,275,002,000 | 34 | 111 | 0.609524 | false |
stephane-martin/salt-debian-packaging | salt-2016.3.3/salt/fileserver/azurefs.py | 2 | 9454 | # -*- coding: utf-8 -*-
'''
The backend for serving files from the Azure blob storage service.
To enable, add ``azurefs`` to the :conf_master:`fileserver_backend` option in
the Master config file.
.. code-block:: yaml
fileserver_backend:
- azurefs
Each environment is configured as a storage container. The... | apache-2.0 | 7,943,245,060,333,341,000 | 28.54375 | 81 | 0.546541 | false |
ntuecon/server | pyenv/Lib/site-packages/win32/lib/win32cryptcon.py | 3 | 75734 | # Generated by h2py from WinCrypt.h
def GET_ALG_CLASS(x): return (x & (7 << 13))
def GET_ALG_TYPE(x): return (x & (15 << 9))
def GET_ALG_SID(x): return (x & (511))
ALG_CLASS_ANY = (0)
ALG_CLASS_SIGNATURE = (1 << 13)
ALG_CLASS_MSG_ENCRYPT = (2 << 13)
ALG_CLASS_DATA_ENCRYPT = (3 << 13)
ALG_CLASS_HASH = (4 <... | bsd-3-clause | 4,232,275,969,361,458,000 | 37.86 | 123 | 0.716006 | false |
MTgeophysics/mtpy | mtpy/gui/mt_file_editor.py | 1 | 44431 | # -*- coding: utf-8 -*-
"""
Created on Wed May 03 19:01:42 2017
@author: jrpeacock
"""
import sys
from PyQt5 import QtWidgets, QtGui, QtCore
import mtpy.core.mt as mt
# header label font
label_font = QtGui.QFont()
label_font.setBold = True
label_font.setPointSize (13)
class MTMainWindow(QtWidgets.QMainWindow):
... | gpl-3.0 | -8,543,354,390,399,336,000 | 38.742397 | 104 | 0.594472 | false |
inveniosoftware/invenio-communities | docs/conf.py | 1 | 10051 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2016-2021 CERN.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
from __future__ import print_function
import os
import sphinx.environment
# -- Gen... | mit | 3,272,960,207,693,876,700 | 30.606918 | 95 | 0.698935 | 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.