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 |
|---|---|---|---|---|---|---|---|---|---|---|
hkernbach/arangodb | utils/generateMimetypes.py | 7 | 5690 | import csv, sys, os.path, re
# wrap text after x characters
def wrap(string, width=80, ind1=0, ind2=0, prefix=''):
string = prefix + ind1 * " " + string
newstring = ""
string = string.replace("\n", " ")
while len(string) > width:
marker = width - 1
while not string[marker].isspace():
marker = ma... | apache-2.0 | 6,517,194,593,476,660,000 | 28.790576 | 98 | 0.462566 | false |
CiscoSystems/nova | nova/tests/console/test_rpcapi.py | 32 | 2839 | # Copyright 2012, Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | apache-2.0 | 4,160,911,469,931,397,000 | 36.355263 | 78 | 0.634731 | false |
pongad/api-client-staging | generated/python/proto-google-cloud-logging-v2/google/cloud/proto/logging/v2/logging_config_pb2_grpc.py | 7 | 6663 | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
from grpc.framework.common import cardinality
from grpc.framework.interfaces.face import utilities as face_utilities
import google.cloud.proto.logging.v2.logging_config_pb2 as google_dot_cloud_dot_proto_dot_logging_dot_v2_dot_logging__co... | bsd-3-clause | -5,180,625,488,711,537,000 | 49.862595 | 137 | 0.731652 | false |
total-impact/total-impact-core | extras/db_housekeeping/postgres_mirror.py | 2 | 12478 | import couchdb, os, logging, sys, collections
from pprint import pprint
import time, datetime, json
import requests
from couch_paginator import CouchPaginator
from totalimpact import dao
import psycopg2
# run in heroku by a) commiting, b) pushing to heroku, and c) running
# heroku run python extras/db_housekeeping/po... | mit | 7,727,598,140,778,121,000 | 33.75766 | 204 | 0.603302 | false |
kambysese/mne-python | tutorials/time-freq/plot_ssvep.py | 10 | 27044 | """
.. _tut-ssvep:
==========================================================
Frequency-tagging: Basic analysis of an SSVEP/vSSR dataset
==========================================================
In this tutorial we compute the frequency spectrum and quantify signal-to-noise
ratio (SNR) at a target frequency in EEG d... | bsd-3-clause | -6,765,559,744,100,278,000 | 39.060741 | 79 | 0.650864 | false |
eviljeff/zamboni | mkt/api/tests/__init__.py | 13 | 1031 | import json
from mkt.site.tests import TestCase
class BaseAPI(TestCase):
"""
A base test case useful for API testing.
"""
def _allowed_verbs(self, url, allowed):
"""
Will run through all the verbs except the ones specified in allowed
and ensure that hitting those produces a 4... | bsd-3-clause | 790,494,003,812,005,000 | 31.21875 | 77 | 0.516974 | false |
puttarajubr/commcare-hq | corehq/apps/analytics/signals.py | 1 | 2227 | from corehq.apps.accounting.utils import ensure_domain_instance
from .tasks import identify
from django.dispatch import receiver
from corehq.apps.users.models import WebUser
from corehq.apps.accounting.models import (
ProBonoStatus,
SoftwarePlanEdition,
Subscription,
)
from corehq.apps.accounting.signals ... | bsd-3-clause | 4,323,780,360,677,824,000 | 33.796875 | 92 | 0.710822 | false |
noba3/KoTos | addons/plugin.video.phstreams/resources/lib/resolvers/watch1080.py | 2 | 1918 | # -*- coding: utf-8 -*-
'''
Genesis Add-on
Copyright (C) 2015 lambda
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 option) any ... | gpl-2.0 | 5,616,269,246,902,563,000 | 31.508475 | 89 | 0.632951 | false |
suqinhuang/tp-qemu | generic/tests/mac_change.py | 7 | 7673 | import re
import logging
from autotest.client.shared import error
from virttest import utils_misc
from virttest import utils_net
from virttest import utils_test
def check_guest_mac(mac, vm, device_id=None):
error.context("Check mac address via monitor", logging.info)
network_info = vm.monitor.info("network"... | gpl-2.0 | 2,176,835,660,123,757,800 | 44.946108 | 81 | 0.531865 | false |
wildchildyn/autism-website | yanni_env/lib/python3.6/site-packages/sqlalchemy/orm/events.py | 19 | 84902 | # orm/events.py
# Copyright (C) 2005-2017 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""ORM event interfaces.
"""
from .. import event, exc, util
from .base import _mappe... | gpl-3.0 | 3,308,734,277,579,368,000 | 37.821216 | 84 | 0.63346 | false |
manuzhang/beam | sdks/python/apache_beam/io/gcp/tests/bigquery_matcher.py | 9 | 3665 | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | apache-2.0 | 8,325,236,582,272,551,000 | 32.318182 | 74 | 0.717599 | false |
valentin-krasontovitsch/ansible | lib/ansible/modules/network/fortios/fortios_webfilter_ips_urlfilter_setting6.py | 7 | 7676 | #!/usr/bin/python
from __future__ import (absolute_import, division, print_function)
# Copyright 2018 Fortinet, Inc.
#
# 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 Lic... | gpl-3.0 | 8,758,649,768,380,794,000 | 28.29771 | 155 | 0.62741 | false |
Lamisator/rublogin | rublogin.py | 1 | 3930 | #!/usr/bin/python3
import requests, getpass, socket, platform, subprocess, time, os, sys, getopt
verb = 0
loginid = ""
pw = ""
def get_ip_address():
dbgmsg("Trying to obtain our current IP-Address...")
try:
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.connect(("134.147.64.8", 80))
dbgmsg("Success!"... | gpl-2.0 | 2,143,439,340,035,754,200 | 26.676056 | 330 | 0.647583 | false |
maheshp/novatest | nova/api/openstack/compute/contrib/security_groups.py | 1 | 24133 | # Copyright 2011 OpenStack Foundation
# Copyright 2012 Justin Santa Barbara
# 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/l... | apache-2.0 | -1,266,732,917,822,452,700 | 37.245642 | 79 | 0.590395 | false |
Knio/miru | examples/cube00.py | 1 | 1080 | """
Demo loading a Cube and assigning a texture.
"""
from pyglet.graphics import Batch
from pyglet import clock
from pyglet.image import load as load_image
from pyglet import app
from miru.core import Object
from miru.context import context
from miru.ext.geom import Cube, get_vlist
from miru.ui import Window
from miru... | mit | 1,801,096,251,414,991,400 | 21.978723 | 52 | 0.746296 | false |
kateBy/df_rus_linux | rebuild_cache.py | 1 | 1058 | #!/usr/bin/python3.4
if __name__ != '__main__':
exit()
from extract_strings import *
import find_xref
from time import time
print("Ищем строки в исходном файле")
words = extract_strings('Dwarf_Fortress')
all_data = open("Dwarf_Fortress", 'rb').read()
#Предел поиска строк
MAX_TO_FIND = len(all_data) #FIXME дл... | mit | 5,157,827,789,537,581,000 | 19.214286 | 74 | 0.705536 | false |
geobricks/magic_web | magic_web/__init__.py | 1 | 1186 | from flask import Flask
from flask.ext.cors import CORS
from importlib import import_module
from pgeo.error.custom_exceptions import PGeoException
from flask import jsonify
from flask import render_template
from config.settings import modules
# Initialize the Flask app
app = Flask(__name__)
# Initialize CORS filter... | gpl-2.0 | -5,573,446,203,206,300,000 | 21.396226 | 67 | 0.710793 | false |
weka511/bioinformatics | dij.py | 1 | 2107 | # Copyright (C) 2019 Greenweaves Software Limited
#
# This 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.
#
# This s... | gpl-3.0 | -8,501,222,803,260,093,000 | 38.037037 | 106 | 0.588514 | false |
ucb-sts/sts | tests/unit/log_parsing/superlog_parser_test.py | 2 | 1898 | #!/usr/bin/env python
#
# Copyright 2011-2013 Colin Scott
#
# 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 | 7,488,244,927,765,582,000 | 34.811321 | 115 | 0.649104 | false |
jathanism/trigger | trigger/utils/importlib.py | 13 | 2346 | # -*- coding: utf-8 -*-
"""
Utils to import modules.
Taken verbatim from ``django.utils.importlib`` in Django 1.4.
"""
import os
import sys
# Exports
__all__ = ('import_module', 'import_module_from_path')
# Functions
def _resolve_name(name, package, level):
"""Return the absolute name of the module to be imp... | bsd-3-clause | 4,422,137,457,110,509,000 | 28.696203 | 79 | 0.620205 | false |
tobegit3hub/keystone_docker | keystone/tests/unit/test_token_bind.py | 14 | 7942 | # Copyright 2013 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | apache-2.0 | 4,816,819,909,145,048,000 | 39.111111 | 77 | 0.506799 | false |
rjeschmi/easybuild-easyblocks | easybuild/easyblocks/generic/cmakemake.py | 3 | 4277 | ##
# Copyright 2009-2013 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 | 7,201,343,697,509,725,000 | 40.125 | 118 | 0.656301 | false |
gfyoung/pandas | pandas/tests/series/methods/test_argsort.py | 3 | 2248 | import numpy as np
import pytest
from pandas import Series, Timestamp, isna
import pandas._testing as tm
class TestSeriesArgsort:
def _check_accum_op(self, name, ser, check_dtype=True):
func = getattr(np, name)
tm.assert_numpy_array_equal(
func(ser).values, func(np.array(ser)), check_... | bsd-3-clause | 2,934,937,973,536,457,000 | 34.68254 | 79 | 0.621886 | false |
ogoodman/icegrid-starter | doc/source/generate_sources.py | 1 | 2454 | """Provides ``generateSources`` which generates a simple tree of contents pages."""
import os
INDEX_RST = """\
.. %s documentation master file
Welcome to %s's documentation
=================================
Contents:
.. toctree::
:maxdepth: 2
%s
Indices and tables
==================
* :ref:`genindex`
* :ref:`... | mit | 609,997,641,139,304,600 | 22.825243 | 83 | 0.53749 | false |
soybean217/lora-python | GServer/frequency_plan/__init__.py | 1 | 1534 | from abc import ABC, abstractmethod, abstractproperty, abstractclassmethod, abstractstaticmethod
from enum import Enum
class FrequencyPlan(Enum):
EU863_870 = 'EU863_870'
EU433 = 'EU433'
CN470_510 = 'CN470_510'
MT433 = 'MT433'
CP500 = 'CP500'
CNICG470 = 'CNICG470'
@staticmethod
def ass... | mit | -7,143,824,432,248,667,000 | 21.246377 | 96 | 0.698827 | false |
Adman/pynameday | pynameday/austria.py | 1 | 7172 | # -*- coding: utf-8 -*-
from pynameday.core import NamedayMixin
class Austria(NamedayMixin):
"""Austrian namedays"""
NAMEDAYS = (
# january
('Neujahr', 'Basilius', 'Genoveva', 'Angela', 'Emilie',
'Heilige 3 Könige', 'Raimund v. P.', 'Severin, Erhard',
'Julian, Eberhard', 'Gre... | mit | -1,165,950,710,893,416,200 | 54.851563 | 79 | 0.549028 | false |
melund/python-prompt-toolkit | prompt_toolkit/renderer.py | 13 | 19226 | """
Renders the command line on the console.
(Redraws parts of the input line that were changed.)
"""
from __future__ import unicode_literals
from prompt_toolkit.filters import to_cli_filter
from prompt_toolkit.layout.mouse_handlers import MouseHandlers
from prompt_toolkit.layout.screen import Point, Screen, WritePosi... | bsd-3-clause | -6,831,280,797,240,471,000 | 35.551331 | 111 | 0.621918 | false |
dneg/cortex | test/IECoreRI/PTCParticleReader.py | 12 | 3742 | ##########################################################################
#
# Copyright (c) 2007-2009, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redis... | bsd-3-clause | 5,119,297,769,649,362,000 | 41.044944 | 147 | 0.699893 | false |
NickRuiz/wikitrans-pootle | local_apps/wt_translation/forms.py | 1 | 1913 | from django import forms
from django.forms.formsets import formset_factory
from django.db.models import Q
from wt_translation.models import MachineTranslator, LanguagePair, ServerlandHost, TranslationRequest
from pootle_language.models import Language
#class MachineTranslatorSelectorForm(forms.Form):
# """
# A ... | gpl-2.0 | -5,019,332,645,198,896,000 | 46.85 | 134 | 0.612128 | false |
idkwim/pysmt | pysmt/shortcuts.py | 1 | 19187 | #
# This file is part of pySMT.
#
# Copyright 2014 Andrea Micheli and Marco Gario
#
# 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
... | apache-2.0 | -1,244,767,525,166,926,600 | 34.465804 | 79 | 0.655548 | false |
MrLpk/nba | P.py | 1 | 2242 | #coding=utf-8
import os
import json
from extlibs.MTool import MTool
class P(object):
"""docstring for P"""
def __init__(self):
self.a = 0
self.b = 0
self.f = 0
self.p = 0
self.s = 0
self.r = 0
self.t = 0
self.path = 'db/wu.db'
def count_playoffs(self, items):
_score = 0
_hscore = 0
_lscore =... | agpl-3.0 | -1,887,281,974,756,119,600 | 18.672566 | 141 | 0.506751 | false |
ioreshnikov/wells | ztqho_.py | 1 | 3665 | #!/usr/bin/env python3
import argparse
import scipy
import scipy.interpolate as interpolate
import scipy.sparse as sparse
import scipy.optimize as optimize
import wells.util as util
parser = argparse.ArgumentParser()
parser.add_argument("--delta",
help="Detuning between the pump and the resona... | mit | -1,293,314,591,098,960,400 | 25.948529 | 71 | 0.562074 | false |
violine1101/MCEdit-Unified | albow/utils.py | 9 | 1500 | from pygame import Surface
from pygame.locals import SRCALPHA
def frame_rect(surface, color, rect, thick=1):
o = 1
surface.fill(color, (rect.left + o, rect.top, rect.width - o - o, thick))
surface.fill(color, (rect.left + o, rect.bottom - thick, rect.width - o - o, thick))
surface.fill(color, (rect.le... | isc | 7,692,801,639,705,441,000 | 29.612245 | 88 | 0.618 | false |
googleapis/python-datalabeling | google/cloud/datalabeling_v1beta1/__init__.py | 1 | 12514 | # -*- 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 | 1,552,084,165,026,922,800 | 41.564626 | 76 | 0.823238 | false |
systers/mailman | src/mailman/model/member.py | 7 | 7113 | # Copyright (C) 2007-2015 by the Free Software Foundation, Inc.
#
# This file is part of GNU Mailman.
#
# GNU Mailman 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 you... | gpl-3.0 | -6,929,159,021,274,875,000 | 33.529126 | 78 | 0.642204 | false |
machinecoin-project/machinecoin | test/functional/p2p_sendheaders.py | 2 | 26496 | #!/usr/bin/env python3
# Copyright (c) 2014-2018 The Machinecoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test behavior of headers messages to announce blocks.
Setup:
- Two nodes:
- node0 is the nod... | mit | 6,390,755,988,870,320,000 | 42.504105 | 130 | 0.612139 | false |
holgerBerger/go_ludalo | top/topgui.py | 1 | 23689 | #!/usr/bin/env python
# IDEEN
# job anklichbar im bereich der ersten schriftzeile -> fenster mit jobs details wie
# aggregierte werte und zeitlicher verlauf, anzahl genutzter OSTs
import sys, time
from PySide import QtCore, QtGui
import top
INTERVAL=10
FONTSIZE=11 # FIXME some places need check for ... | gpl-2.0 | 9,095,556,538,172,107,000 | 35.00152 | 150 | 0.536452 | false |
blackrain-audio/supercollider | external_libraries/simplejson-2.3.2/__init__.py | 44 | 18618 | r"""JSON (JavaScript Object Notation) <http://json.org> is a subset of
JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data
interchange format.
:mod:`simplejson` exposes an API familiar to users of the standard library
:mod:`marshal` and :mod:`pickle` modules. It is the externally maintained
version of ... | gpl-3.0 | -2,998,556,551,591,209,500 | 38.95279 | 79 | 0.653078 | false |
archf/ansible | lib/ansible/modules/system/filesystem.py | 16 | 8834 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013, Alexander Bulimov <lazywolf0@gmail.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_version': '1.... | gpl-3.0 | 3,855,467,766,178,922,500 | 32.589354 | 134 | 0.546525 | false |
texta-tk/texta | grammar_builder/migrations/0001_initial.py | 1 | 2532 | # Generated by Django 2.0.4 on 2019-01-10 11:23
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('permission_admin', '0001_initial'),
migrations.swappable_depend... | gpl-3.0 | 1,643,911,842,151,949,600 | 44.214286 | 155 | 0.579779 | false |
valum-framework/FrameworkBenchmarks | toolset/benchmark/benchmarker.py | 1 | 47579 | from setup.linux import setup_util
from benchmark import framework_test
from benchmark.test_types import *
from utils import header
from utils import gather_tests
from utils import gather_frameworks
from utils import verify_database_connections
import os
import uuid
import shutil
import stat
import json
import reques... | bsd-3-clause | 2,604,231,988,045,656,000 | 43.424837 | 242 | 0.471511 | false |
nkgilley/home-assistant | homeassistant/components/roomba/config_flow.py | 7 | 3831 | """Config flow to configure roomba component."""
import logging
from roomba import Roomba
import voluptuous as vol
from homeassistant import config_entries, core
from homeassistant.const import CONF_HOST, CONF_PASSWORD
from homeassistant.core import callback
from . import CannotConnect, async_connect_or_timeout, asy... | apache-2.0 | 4,751,508,098,243,531,000 | 29.648 | 86 | 0.592274 | false |
soulmachine/scikit-learn | sklearn/neighbors/tests/test_nearest_centroid.py | 23 | 3120 | """
Testing for the nearest centroid module.
"""
import numpy as np
from scipy import sparse as sp
from numpy.testing import assert_array_equal
from numpy.testing import assert_equal
from sklearn.neighbors import NearestCentroid
from sklearn import datasets
from sklearn.metrics.pairwise import pairwise_distances
# t... | bsd-3-clause | 1,796,872,590,107,335,400 | 29.291262 | 75 | 0.638462 | false |
job/exscript | tests/Exscript/util/fileTest.py | 6 | 2964 | import sys, unittest, re, os.path
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..', '..', 'src'))
import base64
import Exscript.util.file
from tempfile import NamedTemporaryFile
account_pool = [('user1', 'password1'),
('user2', 'password2'),
('user3', 'password3'),... | gpl-2.0 | -4,539,002,868,833,348,000 | 38 | 84 | 0.612011 | false |
cosm0s/graphite-web | webapp/graphite/render/functions.py | 1 | 123892 | #Copyright 2008 Orbitz WorldWide
#
#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, so... | apache-2.0 | -7,750,885,775,172,380,000 | 31.096373 | 245 | 0.697333 | false |
google-code/android-scripting | python/src/Demo/tix/samples/BtnBox.py | 37 | 1612 | # -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id: BtnBox.py 36560 2004-07-18 06:16:08Z tim_one $
#
# Tix Demostration Program
#
# This sample program is structured in such a way so that it can be
# executed from the Tix demo program "tixwidgets.py": it must have a
# procedure calle... | apache-2.0 | 4,084,287,208,904,159,000 | 35.636364 | 112 | 0.663151 | false |
girving/tensorflow | tensorflow/python/training/slot_creator.py | 12 | 7957 | # 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 | 205,240,561,059,555,040 | 40.659686 | 80 | 0.700892 | false |
resmo/ansible | lib/ansible/modules/network/fortios/fortios_endpoint_control_settings.py | 13 | 13991 | #!/usr/bin/python
from __future__ import (absolute_import, division, print_function)
# Copyright 2019 Fortinet, Inc.
#
# 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 Lic... | gpl-3.0 | 9,029,896,582,002,123,000 | 34.691327 | 133 | 0.588092 | false |
davidecaminati/Domotics-Raspberry | Hardware/Socket_to_MCP27013_con_i2c/utility/i2c_inputs_address_24.py | 1 | 1049 | import smbus
import time
#bus = smbus.SMBus(0) # Rev 1 Pi uses 0
bus = smbus.SMBus(1) # Rev 2 Pi uses 1
DEVICE = 0x24 # Device address (A0-A2)
IODIRA = 0x00 # Pin direction register
IODIRB = 0x01 # Pin direction register
OLATA = 0x14 # Register for outputs
OLATB = 0x15 # Register for outputs
GPIOA = 0x12 # Regist... | lgpl-3.0 | 2,571,518,470,000,461,000 | 24.585366 | 45 | 0.691134 | false |
titilambert/alignak | test/test_dependencies.py | 2 | 14216 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2015-2015: Alignak team, see AUTHORS.txt file for contributors
#
# This file is part of Alignak.
#
# Alignak 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 So... | agpl-3.0 | -3,730,806,960,310,747,600 | 47.186441 | 130 | 0.615758 | false |
Anonymouslemming/ansible | lib/ansible/modules/windows/win_template.py | 21 | 4837 | # this is a virtual module that is entirely implemented server side
# 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 op... | gpl-3.0 | -7,437,082,120,364,231,000 | 40.698276 | 131 | 0.692578 | false |
xcyan/models | object_detection/matchers/bipartite_matcher.py | 21 | 2176 | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 561,302,654,544,859,260 | 40.056604 | 80 | 0.699449 | false |
unreal666/outwiker | src/test/actions/test_htmlactions.py | 2 | 7738 | # -*- coding: utf-8 -*-
import unittest
from outwiker.pages.html.htmlpage import HtmlPageFactory
from test.basetestcases import BaseOutWikerGUIMixin
from outwiker.actions.polyactionsid import *
class HtmlActionsTest(unittest.TestCase, BaseOutWikerGUIMixin):
"""
Тесты действий для HTML-страницы
"""
d... | gpl-3.0 | 1,667,000,238,484,813,800 | 33.685714 | 91 | 0.599945 | false |
mozilla/bztools | auto_nag/scripts/tracking.py | 1 | 4049 | # 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/.
from auto_nag import utils
from auto_nag.bzcleaner import BzCleaner
from auto_nag.nag_me import Nag
class Tracking(BzC... | bsd-3-clause | -7,715,408,698,369,393,000 | 30.88189 | 90 | 0.559891 | false |
kwentz10/Photosynthesis_Optimization_Modeling | uncertain_params_all.py | 1 | 5737 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Thu Jul 20 12:08:50 2017
@author: Katherine
"""
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Wed May 24 09:04:31 2017
@author: Katherine
Draw parameter values from uniform distribution
"""
import numpy as np
def monte_carlo(chl_mean, c... | mit | 7,917,404,251,319,288,000 | 38.565517 | 147 | 0.622625 | false |
qedi-r/home-assistant | homeassistant/components/websocket_api/http.py | 2 | 7181 | """View to accept incoming websocket connection."""
import asyncio
from contextlib import suppress
import logging
from typing import Optional
from aiohttp import web, WSMsgType
import async_timeout
from homeassistant.const import EVENT_HOMEASSISTANT_STOP
from homeassistant.core import callback
from homeassistant.comp... | apache-2.0 | 8,870,288,057,287,233,000 | 30.774336 | 88 | 0.56176 | false |
sunlightlabs/tcamp | tcamp/reg/migrations/0007_auto.py | 1 | 12144 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding index on 'Ticket', fields ['email']
db.create_index(u'reg_ticket', ['email'])
def backwards(s... | bsd-3-clause | -563,507,370,118,593,860 | 78.379085 | 187 | 0.548748 | false |
timuralp/glacier-tests | glaciertests/test_glacier.py | 2 | 3998 | from boto.glacier.exceptions import UnexpectedHTTPResponseError as GlacierError
import json
import nose
from nose.tools import eq_
from nose.tools import ok_
import dateutil.parser
from glaciertests.util import Util
from glaciertests.util import GlacierTestsConfig
def test_vault_list_all():
conn = GlacierTestsC... | mit | -1,349,212,336,169,829,600 | 31.504065 | 79 | 0.670335 | false |
cedadev/ndg_xacml | ndg/xacml/utils/factory.py | 2 | 4928 | """
Class Factory
NERC DataGrid project
"""
__author__ = "Philip Kershaw"
__date__ = "15/02/10"
__copyright__ = "(C) 2010 Science and Technology Facilities Council"
__license__ = "BSD - see LICENSE file in top-level directory"
__contact__ = "Philip.Kershaw@stfc.ac.uk"
__revision__ = '$Id$'
import traceback
import logg... | bsd-3-clause | -9,119,949,805,445,766,000 | 36.333333 | 78 | 0.608969 | false |
sergio-teruel/bank-payment | __unported__/bank_statement_instant_voucher/model/account_voucher_instant.py | 13 | 13555 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2012 - 2013 Therp BV (<http://therp.nl>).
#
# This program is free software: you can redistribute it and/or modify
# it under the te... | agpl-3.0 | -8,139,579,470,698,536,000 | 41.492163 | 78 | 0.516857 | false |
BrunoCaimar/ArcREST | src/arcrest/common/geometry.py | 6 | 23140 | from __future__ import absolute_import
from __future__ import print_function
import json
try:
import arcpy
arcpyFound = True
except:
arcpyFound = False
import types
from .._abstract import abstract
#----------------------------------------------------------------------
def _date_handler(obj):
if isins... | apache-2.0 | 2,313,178,454,659,710,500 | 35.5 | 79 | 0.413656 | false |
crypt3lx2k/Imageboard-Image-Scraper | iwi/web/WebCache.py | 3 | 6171 | import socket
import threading
import time
import zlib
import httplib
import urllib2
import urlparse
try:
import cPickle as pickle
except ImportError:
import pickle
from . import UniformRetryStrategy
import logging
logger = logging.getLogger(__name__)
logger.addHandler(logging.NullHandler())
__all__ = ['W... | mit | -3,845,465,332,784,672,000 | 27.437788 | 96 | 0.573327 | false |
AAROC/invenio | invenio/legacy/miscutil/dbdump.py | 6 | 16241 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2009, 2010, 2011, 2012, 2014, 2015 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,... | gpl-2.0 | 5,608,615,535,621,905,000 | 39.806533 | 154 | 0.595899 | false |
mezz64/home-assistant | homeassistant/components/alarmdecoder/const.py | 15 | 1442 | """Constants for the AlarmDecoder component."""
CONF_ALT_NIGHT_MODE = "alt_night_mode"
CONF_AUTO_BYPASS = "auto_bypass"
CONF_CODE_ARM_REQUIRED = "code_arm_required"
CONF_DEVICE_BAUD = "device_baudrate"
CONF_DEVICE_PATH = "device_path"
CONF_RELAY_ADDR = "zone_relayaddr"
CONF_RELAY_CHAN = "zone_relaychan"
CONF_ZONE_LOOP... | apache-2.0 | 7,394,525,429,119,247,000 | 28.428571 | 54 | 0.744105 | false |
numenta/htmresearch | htmresearch/frameworks/union_temporal_pooling/activation/excite_functions/excite_functions_all.py | 9 | 3762 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2016, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... | agpl-3.0 | 4,409,350,432,068,811,300 | 30.613445 | 86 | 0.652578 | false |
ApoorvaJ/BlenderSFM | osmpmvs/__init__.py | 1 | 4313 | import logging
import sys, os, getopt, tempfile, subprocess, shutil
# service function: get path of an executable (.exe suffix is added if we are on Windows)
def getExecPath(dir, fileName):
if sys.platform == "win32": fileName = "%s.exe" % fileName
return os.path.join(dir, fileName)
distrPath = os.path.di... | gpl-3.0 | 3,143,918,996,373,519,400 | 34.941667 | 93 | 0.632275 | false |
littlstar/chromium.src | ppapi/generators/idl_c_proto.py | 15 | 24493 | #!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
""" Generator for C style prototypes and definitions """
import glob
import os
import sys
from idl_log import ErrOut, InfoOut, Wa... | bsd-3-clause | -3,180,145,218,188,916,700 | 30.121982 | 79 | 0.580697 | false |
willprice/arduino-sphere-project | scripts/example_direction_finder/temboo/Library/Foursquare/Users/Badges.py | 5 | 3462 | # -*- coding: utf-8 -*-
###############################################################################
#
# Badges
# Returns badges for a given user.
#
# Python versions 2.6, 2.7, 3.x
#
# Copyright 2014, Temboo Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except ... | gpl-2.0 | 5,529,902,878,224,082,000 | 36.630435 | 171 | 0.667244 | false |
ganga-devs/ganga | ganga/GangaTest/Lib/TestRobot/ProxyChecker.py | 1 | 1115 | #Check for grid proxy
from GangaRobot.Framework.Action import IAction
from GangaCore.Utility.logging import getLogger
from GangaCore.Utility.Config import getConfig
import os, datetime, time
from GangaRobot.Framework.exceptions import *
#from GangaCore.GPIDev.Credentials_old.GridProxy import GridProxy
from GangaCore.GP... | gpl-2.0 | -7,439,472,121,618,250,000 | 31.794118 | 167 | 0.685202 | false |
saurabh6790/trufil_lib | core/doctype/profile/test_profile.py | 34 | 3620 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
import webnotes, unittest
from webnotes.model.utils import delete_doc, LinkExistsError
class TestProfile(unittest.TestCase):
def test_delete(self):
self.assertRaises(LinkExistsError, delete_doc, "Role", "_Test R... | mit | 8,994,529,740,686,218,000 | 34.851485 | 114 | 0.648066 | false |
mozilla-services/tecken | tecken/download/forms.py | 1 | 2855 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, you can obtain one at http://mozilla.org/MPL/2.0/.
import datetime
import re
import dateutil
from django import forms
from django.utils import timezone
class DownloadF... | mpl-2.0 | -133,640,022,271,394,500 | 32.988095 | 77 | 0.577233 | false |
etaos/etaos | kernel/python/lib/cpu.py | 1 | 4278 | #
# ETA/OS - CPU class
# Copyright (C) 2017 Michel Megens <dev@michelmegens.net>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (... | lgpl-3.0 | -47,768,275,232,880,920 | 19.567308 | 77 | 0.649603 | false |
dstroppa/openstack-smartos-nova-grizzly | nova/tests/api/openstack/compute/contrib/test_admin_actions.py | 2 | 15194 | # Copyright 2011 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | apache-2.0 | 1,699,468,721,495,718,400 | 34.171296 | 78 | 0.55206 | false |
jinq0123/grpc_cb_core | conanfile.py | 1 | 1244 | from conans import ConanFile, CMake
class GrpccbConan(ConanFile):
name = "grpc_cb_core"
version = "0.2"
license = "Apache-2.0"
url = "https://github.com/jinq0123/grpc_cb_core"
description = "C++ gRPC core library with callback interface."
settings = "os", "compiler", "build_type", "arch"
op... | apache-2.0 | 4,314,942,800,006,423,000 | 36.69697 | 92 | 0.610129 | false |
roman-v-l/AIND | AIND-Planning/aimacode/probability.py | 2 | 22703 | """Probability models. (Chapter 13-15)
"""
from .utils import (
product, argmax, element_wise_product, matrix_multiplication,
vector_to_diagonal, vector_add, scalar_vector_product, inverse_matrix,
weighted_sample_with_replacement, isclose, probability, normalize
)
from .logic import extend
import random
f... | mit | -369,382,309,511,127,800 | 33.661069 | 98 | 0.560587 | false |
kylewm/feverdream | silopub/twitter.py | 2 | 12917 | import html
import os
import re
import requests
import sys
import tempfile
import urllib.parse
from flask import Blueprint, current_app, redirect, url_for, request, flash
from flask import session
from requests_oauthlib import OAuth1Session, OAuth1
from silopub import util
from silopub.ext import db
from silopub.model... | bsd-2-clause | -8,404,616,224,606,275,000 | 35.905714 | 129 | 0.609662 | false |
jarekwg/pyxero | xero/constants.py | 3 | 2057 | XERO_BASE_URL = "https://api.xero.com"
REQUEST_TOKEN_URL = "/oauth/RequestToken"
AUTHORIZE_URL = "/oauth/Authorize"
ACCESS_TOKEN_URL = "/oauth/AccessToken"
XERO_API_URL = "/api.xro/2.0"
XERO_FILES_URL = "/files.xro/1.0"
XERO_PAYROLL_URL = "/payroll.xro/1.0"
XERO_PROJECTS_URL = "/projects.xro/2.0"
XERO_OAUTH2_AUTHORIZ... | bsd-3-clause | -6,868,531,020,613,917,000 | 31.650794 | 79 | 0.707827 | false |
Visgean/django-autocomplete-light | autocomplete_light/tests/test_fields.py | 2 | 5744 | from __future__ import unicode_literals
import pytest
import autocomplete_light.shortcuts as autocomplete_light
from django import forms
from django.contrib.contenttypes.models import ContentType
from django.test import TestCase
from ..example_apps.basic.models import GfkModel
from ..example_apps.security_test.model... | mit | -4,094,766,424,217,917,400 | 33.190476 | 81 | 0.685411 | false |
Kaezon/allianceauth | allianceauth/services/modules/teamspeak3/manager.py | 2 | 12647 | import logging
from django.conf import settings
from .util.ts3 import TS3Server, TeamspeakError
from .models import TSgroup
logger = logging.getLogger(__name__)
class Teamspeak3Manager:
def __init__(self):
self._server = None
@property
def server(self):
if self._server is not None and ... | gpl-2.0 | 2,354,705,907,607,022,000 | 44.822464 | 118 | 0.558868 | false |
hvandenb/splunk-elasticsearch | search-elasticsearch/bin/splunklib/searchcommands/__init__.py | 7 | 8457 | # Copyright 2011-2014 Splunk, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"): you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | apache-2.0 | 5,980,244,803,440,918,000 | 36.586667 | 115 | 0.65165 | false |
conejoninja/plugin.video.pelisalacarta | servers/filesmonster.py | 16 | 1297 | # -*- coding: utf-8 -*-
#------------------------------------------------------------
# pelisalacarta - XBMC Plugin
# Conector para uploaz
# http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/
#------------------------------------------------------------
import urlparse,urllib2,urllib,re
import os
from core import... | gpl-3.0 | -86,957,100,224,683,800 | 31.4 | 91 | 0.583333 | false |
xuleiboy1234/autoTitle | tensorflow/tensorflow/python/ops/nn_fused_batchnorm_test.py | 4 | 10503 | # 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... | mit | 8,295,654,404,085,367,000 | 38.484962 | 80 | 0.588022 | false |
dekom/threepress-bookworm-read-only | bookworm/gdata/tests/gdata_tests/calendar_test.py | 41 | 39080 | #!/usr/bin/python
#
# Copyright (C) 2006 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | bsd-3-clause | 366,560,241,756,866,240 | 42.134658 | 88 | 0.688383 | false |
ekcs/congress | congress/tests/test_utils.py | 1 | 1179 | # Copyright (c) 2014 VMware
#
# 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, so... | apache-2.0 | -5,578,140,871,274,983,000 | 34.727273 | 69 | 0.715013 | false |
yeti-platform/yeti | plugins/import_methods/pdf.py | 1 | 1151 | from io import StringIO
from pdfminer.converter import TextConverter
from pdfminer.layout import LAParams
from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter
from pdfminer.pdfpage import PDFPage
from core.investigation import ImportMethod
class ImportPDF(ImportMethod):
default_values = {
... | apache-2.0 | 3,848,743,023,659,732,500 | 27.073171 | 83 | 0.648132 | false |
mpimenov/omim | tools/python/testserver.py | 4 | 6611 | """
This is a simple web-server that does very few things. It is necessary for
the downloader tests.
Here is the logic behind the initialization:
Because several instances of the test can run simultaneously on the Build
machine, we have to take this into account and not start another server if
one is already runn... | apache-2.0 | -27,296,083,577,853,324 | 29.325688 | 103 | 0.643322 | false |
KarimAllah/celery | celery/tests/test_task/test_task_control.py | 18 | 4711 | from __future__ import absolute_import
from __future__ import with_statement
from functools import wraps
from kombu.pidbox import Mailbox
from celery.app import app_or_default
from celery.task import control
from celery.task import PingTask
from celery.utils import uuid
from celery.tests.utils import unittest
clas... | bsd-3-clause | -670,010,542,523,870,300 | 26.549708 | 70 | 0.603057 | false |
daevaorn/kombu | kombu/utils/eventio.py | 1 | 10324 | """
kombu.utils.eventio
===================
Evented IO support for multiple platforms.
"""
from __future__ import absolute_import
import errno
import math
import select as __select__
import socket
from numbers import Integral
from kombu.syn import detect_environment
from . import fileno
__all__ = ['poll']
_sele... | bsd-3-clause | 987,859,090,038,365,000 | 29.635015 | 79 | 0.527993 | false |
maciekcc/tensorflow | tensorflow/python/estimator/canned/head.py | 12 | 32941 | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -3,889,266,735,990,661,000 | 41.124041 | 108 | 0.64488 | false |
andressanchezanillo/WIMOS_ | Software/Desktop/Wimos Desktop/src/NetworkThreads.py | 1 | 24548 | from random import randint
from datetime import datetime
from PyQt4 import QtCore, QtGui
from NetworkList import QNetworkList
from serial.tools import list_ports
import numpy
import threading, Queue
import serial
import sys
import os
import re
import threading
import time
class QNetworkThreads(QtGui.QWidget):
si... | gpl-3.0 | -1,014,202,317,485,580,000 | 33.623413 | 147 | 0.45906 | false |
qevo/py_file_helper | tests/manage.py | 1 | 9930 | """Tests for the file_helper.manage module"""
import os, sys, unittest, inspect
from re import IGNORECASE
from BaseTest import BaseTestWrapper
class FindFileTestCase(BaseTestWrapper.BaseTest):
"""manage.find_file() test cases"""
def test_this_file(self):
"""Test if this same file can be found by sea... | mit | 8,706,795,702,596,856,000 | 27.782609 | 110 | 0.506848 | false |
icea-dev/atn-sim-ng | atn/gui/dlg_traf_ui.py | 1 | 2923 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'dlg_traf.ui'
#
# Created: Thu Apr 6 11:31:12 2017
# by: PyQt4 UI code generator 4.10.4
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except Attri... | gpl-3.0 | 2,851,538,455,398,838,300 | 42.626866 | 102 | 0.697571 | false |
patrickm/chromium.src | tools/lsan/PRESUBMIT.py | 12 | 1214 | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details on the presubmit API built into gcl.
"""
import re
def Che... | bsd-3-clause | 6,166,048,921,853,432,000 | 28.609756 | 75 | 0.663921 | false |
prajwalkman/PokemonGo-Map | pogom/search.py | 1 | 3957 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import logging
import time
from pgoapi import PGoApi
from pgoapi.utilities import f2i, get_cellid
from . import config
from .models import parse_map
log = logging.getLogger(__name__)
TIMESTAMP = '\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\... | agpl-3.0 | -7,033,355,135,374,107,000 | 34.648649 | 131 | 0.580743 | false |
chorizon/cromosoma | dbadmin.py | 1 | 10384 | #!/usr/bin/python3
import argparse
import os,traceback
import sys, inspect
import shutil
from datetime import date
from pathlib import Path
from colorama import init, Fore, Back, Style
from importlib import import_module, reload
from cromosoma.webmodel import WebModel
#from models import books
def start():
... | gpl-2.0 | 1,003,856,121,308,283,500 | 29.721893 | 244 | 0.454931 | false |
juliakreutzer/bandit-neuralmonkey | neuralmonkey/encoders/cnn_encoder.py | 1 | 14231 | """CNN for image processing."""
from typing import cast, Callable, List, Tuple, Set, Union
from typeguard import check_argument_types
import numpy as np
import tensorflow as tf
from neuralmonkey.dataset import Dataset
from neuralmonkey.decorators import tensor
from neuralmonkey.model.model_part import ModelPart, Fee... | bsd-3-clause | -7,925,772,018,403,166,000 | 37.882514 | 79 | 0.594898 | false |
pauloricardomg/cassandra-dtest | transient_replication_test.py | 3 | 26647 | import re
import logging
import types
from struct import pack
from uuid import UUID
from cassandra import ConsistencyLevel, InvalidRequest
from cassandra.query import SimpleStatement
from cassandra.protocol import ConfigurationException
from ccmlib.node import Node
from dtest import Tester
from tools.jmxutils import ... | apache-2.0 | 6,229,363,424,580,439,000 | 39.682443 | 184 | 0.600518 | false |
sirex/Misago | misago/core/errorpages.py | 8 | 1974 | from django.http import JsonResponse
from django.shortcuts import render
from django.utils.translation import ugettext as _
from misago.core.utils import is_request_to_misago
from misago.admin.views.errorpages import admin_error_page, admin_csrf_failure
def _ajax_error(code=406, message=None):
return JsonRespons... | gpl-2.0 | -5,229,900,041,804,731,000 | 28.029412 | 78 | 0.662107 | false |
codefisher/djangopress | djangopress/accounts/menus.py | 1 | 1165 | from djangopress.menus.menu import register
from django.template import Template, RequestContext
from django.urls import reverse
class LoginRender(object):
def __init__(self):
self._members = Template("""
<li><a href="{% url 'accounts-profile' %}">Members</a>
<ul>
... | mit | -5,298,869,993,011,078,000 | 43.846154 | 125 | 0.551073 | false |
AlphaSmartDog/DeepLearningNotes | Note-6 A3CNet/Note-6.2.1 代码阅读顺序/sonnet/python/modules/util_test.py | 6 | 27677 | # Copyright 2017 The Sonnet 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 applicable l... | mit | 1,781,703,247,022,419,500 | 36.758527 | 80 | 0.610073 | 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.