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 |
|---|---|---|---|---|---|---|---|---|---|---|
gams/influxdump | influxdump/bin/influxdump.py | 1 | 6035 | # -*- coding: utf-8 -*-
import argparse
import getpass
import json
import sys
from influxdump.data import dump_data, load_file, load_folder
from influxdump.db import get_client
from influxdump.exceptions import TypecastError
CHUNKSIZE = 50000
def get_args():
parser = argparse.ArgumentParser(description='influx... | apache-2.0 | 4,460,932,903,549,420,500 | 31.978142 | 79 | 0.548467 | false |
Boussadia/weboob | modules/adecco/pages.py | 2 | 4199 | # -*- coding: utf-8 -*-
# Copyright(C) 2013 Bezleputh
#
# This file is part of weboob.
#
# weboob 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 opt... | agpl-3.0 | -2,828,853,580,874,409,500 | 45.622222 | 153 | 0.603194 | false |
xiangel/hue | desktop/core/src/desktop/migrations/0015_auto__add_unique_documentpermission_doc_perms.py | 20 | 9800 | # -*- 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 DocumentPermission
class Migration(SchemaMigration):
def forwards(self, orm):
# If t... | apache-2.0 | 4,881,376,183,573,856,000 | 68.503546 | 195 | 0.559082 | false |
fedspendingtransparency/data-act-broker-backend | tests/unit/dataactvalidator/test_a15_appropriations.py | 1 | 2167 | from dataactcore.models.stagingModels import Appropriation
from dataactcore.models.domainModels import SF133
from tests.unit.dataactvalidator.utils import number_of_errors, query_columns
_FILE = 'a15_appropriations'
def test_column_headers(database):
expected_subset = {'uniqueid_TAS', 'row_number', 'unobligated... | cc0-1.0 | -3,956,086,811,205,402,000 | 42.34 | 118 | 0.677896 | false |
piquadrat/django | tests/admin_views/models.py | 9 | 25125 | import datetime
import os
import tempfile
import uuid
from django.contrib.auth.models import User
from django.contrib.contenttypes.fields import (
GenericForeignKey, GenericRelation,
)
from django.contrib.contenttypes.models import ContentType
from django.core.exceptions import ValidationError
from django.core.fil... | bsd-3-clause | -4,959,838,720,506,171,000 | 24.787256 | 110 | 0.68136 | false |
SysTheron/adhocracy | src/adhocracy/config/environment.py | 2 | 4933 | """Pylons environment configuration"""
import os
import time
import sys
import traceback
from mako.lookup import TemplateLookup
from paste.deploy.converters import asbool
from pylons import tmpl_context as c
from pylons.error import handle_mako_error
from pylons.configuration import PylonsConfig
from sqlalchemy import... | agpl-3.0 | 815,127,858,238,675,700 | 35.007299 | 78 | 0.631462 | false |
albemala/almoviesrenamer | src/ui/main_window_view.py | 1 | 7172 | from PyQt5.QtGui import QWindow
from PyQt5.QtQml import QQmlApplicationEngine
from ui.movie_table_item import MovieTableItem
LOADING_PANEL_VISIBLE_PROPERTY = "loadingPanelVisible"
LOADING_PANEL_MOVIE_TITLE_PROPERTY = "loadingPanelMovieTitle"
MOVIES_TABLE_MODEL_PROPERTY = "moviesTableModel"
MOVIES_TABLE_CURRENT_ROW_P... | gpl-3.0 | 835,110,258,699,989,500 | 41.690476 | 118 | 0.714724 | false |
zbuc/mitmproxy | libmproxy/filt.py | 13 | 10005 | """
The following operators are understood:
~q Request
~s Response
Headers:
Patterns are matched against "name: value" strings. Field names are
all-lowercase.
~a Asset content-type in response. Asset content types are:
... | mit | 1,328,500,808,804,640,300 | 22.708531 | 84 | 0.522939 | false |
drayanaindra/shoop | shoop/default_tax/module.py | 4 | 2653 | # This file is part of Shoop.
#
# Copyright (c) 2012-2015, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
from django.utils.translation import ugettext_lazy as _
from shoop.core import taxing
from shoop.co... | agpl-3.0 | 397,524,856,882,960,450 | 36.366197 | 89 | 0.671315 | false |
alonisser/Open-Knesset | user/tests.py | 6 | 8945 | import datetime
import json
from django.test import TestCase
from django.core.urlresolvers import reverse
from django.contrib.auth.models import User
from actstream import action, follow, unfollow
from mks.models import Member, Knesset
from laws.models import Bill
from committees.models import Committee
from agendas.mo... | bsd-3-clause | 8,114,460,337,536,239,000 | 42.42233 | 94 | 0.537731 | false |
SinishaDjukic/Meshwork | BuildSystem/PlatformIO/platform/cosa/builder/frameworks/cosa.py | 1 | 5092 | """
PlatformIO Framework for Cosa
-----------------------------
This PlaformIO framework for Cosa is developed and maintained by Sinisha Djukic as part of the Meshwork project.
NOTE: This framework provides UNOFFICIAL support for Cosa and is not in any way associated with the Cosa project or its author Mikael Patel. I... | lgpl-2.1 | 5,114,894,481,302,135,000 | 30.627329 | 612 | 0.693637 | false |
theQRL/QRL | src/qrl/core/VoteStats.py | 1 | 11441 | from pyqrllib.pyqrllib import bin2hstr, QRLHelper
from qrl.generated import qrl_pb2
from qrl.core.misc import logger
from qrl.core.StateContainer import StateContainer
from qrl.core.PaginatedData import PaginatedData
from qrl.core.txs.multisig.MultiSigVote import MultiSigVote
from qrl.core.State import State
class V... | mit | -743,684,906,503,366,000 | 33.775076 | 109 | 0.577397 | false |
taktik/account-invoicing | __unported__/account_invoice_zero/__openerp__.py | 3 | 1960 | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Guewen Baconnier
# Copyright 2014 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pu... | agpl-3.0 | -991,330,407,363,221,000 | 36.692308 | 78 | 0.640816 | false |
drolland/Denis-GEGL | tests/python/test-gegl-node.py | 7 | 4465 | #!/usr/bin/env python
""" This file is part of GEGL
*
* GEGL 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 (at your option) any later version.
*
* GEGL is ... | lgpl-3.0 | -6,764,916,475,776,900,000 | 31.122302 | 80 | 0.645465 | false |
ryandougherty/mwa-capstone | MWA_Tools/build/matplotlib/lib/mpl_examples/pylab_examples/axes_props.py | 6 | 1238 | #!/usr/bin/env python
"""
You can control the axis tick and grid properties
"""
from pylab import *
t = arange(0.0, 2.0, 0.01)
s = sin(2*pi*t)
plot(t, s)
grid(True)
# MATLAB style
xticklines = getp(gca(), 'xticklines')
yticklines = getp(gca(), 'yticklines')
xgridlines = getp(gca(), 'xgridlines')
ygridlines = getp(gc... | gpl-2.0 | -8,360,840,264,019,771,000 | 18.967742 | 50 | 0.676898 | false |
alien4cloud/alien4cloud-cloudify3-provider | alien4cloud-cloudify3-provider/src/test/resources/outputs/blueprints/openstack/lamp/wrapper/Wordpress_PHP/wordpressConnectToPHPPHP/tosca.interfaces.relationship.Configure/pre_configure_source/_a4c_pre_configure_source.py | 1 | 15586 |
from cloudify import ctx
from cloudify.exceptions import NonRecoverableError
from cloudify.state import ctx_parameters as inputs
import subprocess
import os
import re
import sys
import time
import threading
import platform
from StringIO import StringIO
from cloudify_rest_client import CloudifyClient
from cloudify im... | apache-2.0 | -1,615,140,865,971,094,300 | 43.916427 | 232 | 0.661299 | false |
wwj718/edx-platform | cms/djangoapps/contentstore/views/tests/test_item.py | 8 | 101384 | """Tests for items views."""
import json
from datetime import datetime, timedelta
import ddt
from mock import patch, Mock, PropertyMock
from pytz import UTC
from pyquery import PyQuery
from webob import Response
from django.http import Http404
from django.test import TestCase
from django.test.client import RequestFac... | agpl-3.0 | -9,098,306,685,839,573,000 | 45.871937 | 133 | 0.645723 | false |
memphis-iis/GLUDB | gludb/data.py | 1 | 5085 | """gludb.data - "core" functionality.
If you're unsure what to use, you should look into
gludb.simple. This module is for those needing advanced functionality or
customization
"""
from abc import ABCMeta, abstractmethod
from .config import get_mapping
# pylama:ignore=E501
class DeleteNotSupported(Exception): # N... | apache-2.0 | -4,694,618,238,678,025,000 | 28.224138 | 104 | 0.65939 | false |
Moliholy/cvmfs | add-ons/tools/get_referenced_hashes.py | 11 | 1880 | #!/usr/bin/env python
import sys
import cvmfs
def usage():
print sys.argv[0] + " <local repo name | remote repo url> [root catalog]"
print "This script walks the catalogs and generates a list of all referenced content hashes."
# get referenced hashes from a single catalog (files, chunks, nested catalogs)
def... | bsd-3-clause | -7,449,870,017,551,299,000 | 34.471698 | 98 | 0.570213 | false |
taosx/trilulilu-downloader | trilulilu-downloader.py | 1 | 5941 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Python Trilulilu Downloader
Support for Video and Audio
Support for online view
Author: sharkyz of rstforums.com
'''
import re
from requests_futures .sessions import FuturesSession
from concurrent.futures import ThreadPoolExecutor
from bs4 import BeautifulSoup
impor... | gpl-3.0 | 6,029,159,800,586,936,000 | 41.134752 | 168 | 0.429557 | false |
bricesarver/pseudo-it | mask.py | 1 | 1327 | import sys
import subprocess
#as a stand-alone: [python3+] mask.py prefix iterations soft; soft is a 1 (true) or 0 (false)
def main():
subprocess.check_call('''grep "\./\." {}.allcalls.filtered.vcf | awk '{{OFS="\t"; if ($0 !~ /\#/); print $1, $2-1, $2}}' | bedtools merge -i - > nocalls.combined.bed'''.format(pre... | mit | -458,010,261,812,999,360 | 62.238095 | 209 | 0.657121 | false |
harmy/kbengine | kbe/res/scripts/common/Lib/test/test_inspect.py | 3 | 41988 | import re
import sys
import types
import unittest
import inspect
import linecache
import datetime
import collections
import os
import shutil
from os.path import normcase
from test.support import run_unittest, TESTFN, DirsOnSysPath
from test import inspect_fodder as mod
from test import inspect_fodder2 ... | lgpl-3.0 | 4,287,678,903,176,920,000 | 37.241121 | 88 | 0.570258 | false |
CloudServer/nova | nova/openstack/common/threadgroup.py | 10 | 4949 | # 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 agre... | apache-2.0 | -2,572,168,131,372,811,300 | 31.993333 | 79 | 0.601738 | false |
endlessm/chromium-browser | third_party/blink/renderer/build/scripts/in_generator.py | 2 | 4149 | # Copyright (C) 2013 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the ... | bsd-3-clause | 1,514,209,112,058,730,800 | 36.718182 | 87 | 0.646662 | false |
DavidNorman/tensorflow | tensorflow/tools/compatibility/tf_upgrade_v2.py | 2 | 100587 | # 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 | -6,810,997,088,229,367,000 | 38.322518 | 80 | 0.595763 | false |
Leoniela/nipype | nipype/utils/tests/test_misc.py | 9 | 2142 | # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
from nipype.testing import assert_equal, assert_true, assert_false
from nipype.utils.misc import (container_to_string, getsource,
create_function_from_source, str2bool, flatt... | bsd-3-clause | 2,997,545,867,567,757,000 | 28.75 | 78 | 0.598506 | false |
Belxjander/Kirito | SnowStorm/indra/lib/python/indra/ipc/siesta.py | 2 | 15584 | """\
@file siesta.py
@brief A tiny llsd based RESTful web services framework
$LicenseInfo:firstyear=2008&license=mit$
Copyright (c) 2008, Linden Research, Inc.
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... | gpl-3.0 | 1,837,857,754,948,852,700 | 32.299145 | 79 | 0.59298 | false |
jelmer/samba | buildtools/wafsamba/samba_install.py | 10 | 8530 | ###########################
# this handles the magic we need to do for installing
# with all the configure options that affect rpath and shared
# library use
import os
import Utils
from TaskGen import feature, before, after
from samba_utils import LIB_PATH, MODE_755, install_rpath, build_rpath
@feature('install_bin')... | gpl-3.0 | 3,296,691,539,095,780,000 | 34.840336 | 100 | 0.60973 | false |
reberhardt7/sofa | sofa/__init__.py | 1 | 2889 | import logging
log = logging.getLogger(__name__)
from structure import (
APIAttribute,
APIValidator,
APIResource,
APICollection,
APISession,
VirtualResourceRegistry,
VirtualResource,
resource_registry,
AuthContext,
)
from validators import (
NumericIdValidator,
StringIdV... | mit | 7,649,218,446,501,084,000 | 31.1 | 91 | 0.669782 | false |
vadimtk/chrome4sdp | tools/perf/page_sets/key_noop_cases.py | 9 | 2263 | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry.page import page as page_module
from telemetry.page import shared_page_state
from telemetry import story
class NoOpPage(page_module.Page):
... | bsd-3-clause | 4,583,632,569,536,024,000 | 36.098361 | 80 | 0.70791 | false |
MozillaSecurity/peach | Peach/Mutators/datatree.py | 3 | 4003 | # 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 Peach.mutator import *
from Peach.Engine.common import *
class DataTreeRemoveMutator(Mutator):
"""
Remove ... | mpl-2.0 | -7,462,667,516,743,321,000 | 27.592857 | 69 | 0.606545 | false |
HorriblePeople/CardMachine | WSotT_CardGen.py | 3 | 11603 | from PIL import Image, ImageFont, ImageDraw
import os, glob
from math import ceil
import ConfigParser
import PIL_Helper
class DeckConfiguration:
def __init__(self, configfilename="deck.cfg"):
Config = ConfigParser.ConfigParser()
Config.read(configfilename)
self.cardnum=0
#Global Deck Settings
settings = ... | mit | 7,997,580,099,266,031,000 | 26.432624 | 96 | 0.6806 | false |
ai-se/parGALE | epoal_src/Z3ModelWPTNoObjectives.py | 1 | 6469 | '''
Created on Jan 17, 2014
@author: ezulkosk
'''
from z3 import *
FeatureIndexMap = {}
FeatureVariable = []
FeatureIndexMap['web_portal'] = 0
web_portal = Bool('web_portal')
FeatureVariable.append(web_portal)
FeatureIndexMap['web_portal'] = 1
web_portal = Bool('web_portal')
FeatureVariable.append(web_portal)
Featu... | unlicense | -2,046,074,262,876,872,400 | 27.126087 | 55 | 0.735044 | false |
CalthorpeAnalytics/urbanfootprint | footprint/main/resources/pickled_dict_field.py | 1 | 2701 |
# UrbanFootprint v1.5
# Copyright (C) 2017 Calthorpe Analytics
#
# This file is part of UrbanFootprint version 1.5
#
# UrbanFootprint is distributed under the terms of the GNU General
# Public License version 3, as published by the Free Software Foundation. This
# code is distributed WITHOUT ANY WARRANTY, without impl... | gpl-3.0 | -7,542,301,172,931,074,000 | 34.539474 | 158 | 0.669382 | false |
kichkasch/fileextractor | imagegenerator/GeneratorCoreLinux.py | 1 | 13067 | """
Core for the ImageGenerator - Implementation for Linux.
The main idea for this implementation is to pass the request for imaging
to the Linux command C{dd}.
This module registers itself with the L{CoreManager} as a core.
FileExtractor is free software: you can redistribute it and/or modify
it under the terms of... | gpl-3.0 | -6,145,571,337,880,757,000 | 36.016997 | 122 | 0.57848 | false |
t794104/ansible | contrib/inventory/vagrant.py | 30 | 4064 | #!/usr/bin/env python
"""
Vagrant external inventory script. Automatically finds the IP of the booted vagrant vm(s), and
returns it under the host group 'vagrant'
Example Vagrant configuration using this script:
config.vm.provision :ansible do |ansible|
ansible.playbook = "./provision/your_playbook.yml"
... | gpl-3.0 | 3,344,007,663,330,796,000 | 30.022901 | 112 | 0.659203 | false |
saulshanabrook/pushgp.py | inspyred/ec/variators/mutators.py | 4 | 10044 | """
===============
:mod:`mutators`
===============
.. Copyright 2012 Inspired Intelligence Initiative
.. 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 Foundatio... | bsd-3-clause | 6,312,254,082,177,958,000 | 33.871429 | 94 | 0.635106 | false |
wakatime/wakatime | wakatime/heartbeat.py | 1 | 12605 | # -*- coding: utf-8 -*-
"""
wakatime.heartbeat
~~~~~~~~~~~~~~~~~~
:copyright: (c) 2017 Alan Hamlett.
:license: BSD, see LICENSE for more details.
"""
import os
import logging
import re
from subprocess import PIPE
from .compat import u, json, is_win, Popen
from .exceptions import SkipHeartbeat
from .p... | bsd-3-clause | 8,855,140,367,791,368,000 | 31.74026 | 102 | 0.527092 | false |
agaffney/ansible | test/lib/ansible_test/_internal/cloud/cs.py | 14 | 9685 | """CloudStack plugin for integration tests."""
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import json
import os
import re
import time
from . import (
CloudProvider,
CloudEnvironment,
CloudEnvironmentConfig,
)
from ..util import (
find_executable,
Appli... | gpl-3.0 | -6,335,387,217,628,617,000 | 31.391304 | 141 | 0.591843 | false |
UPB-FILS/SE | TD1/bonjour_files.py | 1 | 2101 | """
Le premier prgramme en Python
* utilisation des arguments de la lignne de commande
* les listes et la fonction map
* les threads
* le logger
@author Dragos STOICA
@version 0.4
@date 16.feb.2014
"""
import sys, threading, logging, os
class Bonjour(threading.Thread):
def __init__(self, personne):
threa... | apache-2.0 | -8,752,712,077,449,837,000 | 29.463768 | 74 | 0.562589 | false |
bugzPDX/airmozilla | airmozilla/main/migrations/0057_auto.py | 6 | 29537 | # -*- 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):
# Removing M2M table for field participants on 'Event'
db.delete_table('main_event_participants')
def ... | bsd-3-clause | 6,270,718,778,250,254,000 | 84.617391 | 209 | 0.550124 | false |
afandria/mojo | mojo/tools/mojob.py | 7 | 10907 | #!/usr/bin/env python
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""A simple script to make building/testing Mojo components easier."""
import argparse
from copy import deepcopy
import logging
from m... | bsd-3-clause | -4,215,046,015,450,439,700 | 33.298742 | 80 | 0.617768 | false |
thnee/ansible | lib/ansible/modules/cloud/docker/docker_stack.py | 10 | 10485 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (c) 2018 Dario Zanzico (git@dariozanzico.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 = {'status': ['pre... | gpl-3.0 | 3,972,492,489,725,335,600 | 32.498403 | 130 | 0.570243 | false |
charles-cooper/raiden | raiden/utils/__init__.py | 1 | 4637 | # -*- coding: utf-8 -*-
import os
import re
import sys
import string
import random
from coincurve import PrivateKey
from Crypto.Hash import keccak as keccaklib
from ethereum.utils import sha3
from ethereum.utils import remove_0x_head
import raiden
__all__ = (
'sha3',
'keccak_256',
'keccak',
'ishash',... | mit | 6,570,371,787,523,456,000 | 25.19774 | 82 | 0.671986 | false |
omnirom/android_external_chromium-org | tools/telemetry/telemetry/page/page_test_unittest.py | 33 | 6225 | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import json
import os
from telemetry import benchmark
from telemetry.core import exceptions
from telemetry.core import wpr_modes
from telemetry.page import ... | bsd-3-clause | -688,658,074,089,056,600 | 36.053571 | 79 | 0.706506 | false |
ioram7/keystone-federado-pgid2013 | build/sqlalchemy/lib/sqlalchemy/orm/persistence.py | 17 | 30463 | # orm/persistence.py
# Copyright (C) 2005-2012 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
"""private module containing functions used to emit INSERT, UPDATE
and DELETE state... | apache-2.0 | -1,124,312,332,332,324,600 | 38.105263 | 84 | 0.52119 | false |
sebdelsol/pyload | module/plugins/hoster/MyvideoDe.py | 1 | 1416 | # -*- coding: utf-8 -*-
import re
from module.plugins.Hoster import Hoster
from module.unescape import unescape
class MyvideoDe(Hoster):
__name__ = "MyvideoDe"
__type__ = "hoster"
__version__ = "0.9"
__pattern__ = r'http://(?:www\.)?myvideo\.de/watch/'
__description__ = """Myvideo.de hos... | gpl-3.0 | 5,561,081,885,100,587,000 | 27.897959 | 106 | 0.579096 | false |
domob1812/crowncoin | qa/rpc-tests/mempool_spendcoinbase.py | 10 | 2772 | #!/usr/bin/env python2
# Copyright (c) 2014 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test spending coinbase transactions.
# The coinbase transaction in block N can appear in block
# N+100... ... | mit | 7,674,461,438,736,598,000 | 39.173913 | 92 | 0.674242 | false |
decodio/l10n_hr | l10n_hr_vat/todo/report_base/reports_common.py | 1 | 4807 | # -*- coding: utf-8 -*-
import pytz
from datetime import datetime
from openerp.osv import osv, fields
def get_current_datetime():
#DB: Server mora biti na UTC time... ovo vraća točan local time za XML, fiskalizaciju isl...
zg = pytz.timezone('Europe/Zagreb')
return zg.normalize(pytz.utc.localize(datetime.u... | agpl-3.0 | 7,125,257,429,825,850,000 | 39.184874 | 242 | 0.608032 | false |
jendap/tensorflow | tensorflow/contrib/learn/python/learn/models.py | 42 | 16048 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -6,421,729,050,697,362,000 | 38.429975 | 93 | 0.657278 | false |
mamaddeveloper/teleadmin | tools/vote.py | 2 | 1778 | class VoteManager:
def __init__(self):
self.currentVote = None
def start(self, user, name):
if self.currentVote:
raise OngoingVoteException()
self.currentVote = Vote(name)
def vote(self, user, vote):
if not self.currentVote:
raise NoVoteException()
... | mit | 7,388,641,537,576,051,000 | 25.537313 | 80 | 0.603487 | false |
Frodox/buildbot | master/buildbot/test/regressions/test_bad_change_properties_rows.py | 10 | 2880 | # This file is part of Buildbot. Buildbot 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, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without eve... | gpl-2.0 | 6,025,616,173,382,561,000 | 35 | 79 | 0.633333 | false |
JioCloud/horizon | openstack_dashboard/dashboards/admin/metering/tabs.py | 13 | 2197 | # 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
# distributed under t... | apache-2.0 | -8,233,409,523,309,516,000 | 30.84058 | 75 | 0.65635 | false |
ConnorGBrewster/servo | tests/wpt/web-platform-tests/tools/third_party/pytest/src/_pytest/mark/__init__.py | 33 | 5165 | """ generic mechanism for marking and selecting python functions. """
from __future__ import absolute_import, division, print_function
from _pytest.config import UsageError
from .structures import (
ParameterSet,
EMPTY_PARAMETERSET_OPTION,
MARK_GEN,
Mark,
MarkInfo,
MarkDecorator,
MarkGenerat... | mpl-2.0 | 3,887,302,186,379,557,000 | 28.683908 | 89 | 0.62575 | false |
Jorge-Rodriguez/ansible | lib/ansible/modules/web_infrastructure/sophos_utm/utm_network_interface_address.py | 31 | 3834 | #!/usr/bin/python
# Copyright: (c) 2018, Juergen Wiebe <wiebe@e-spirit.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.1',
'statu... | gpl-3.0 | 6,171,150,039,739,485,000 | 27.191176 | 92 | 0.630151 | false |
jtallieu/dell-wsman-client-api-python | wsman/cache/ordereddict.py | 2 | 4542 | ## {{{ http://code.activestate.com/recipes/576693/ (r6)
"""
OrderedDict
@copyright: 2011
@author: Joseph Tallieu <joseph_tallieu@dell.com>
@organization: Dell Inc. - PG Validation
@license: GNU LGLP v2.1
"""
# This file is part of WSManAPI.
#
# WSManAPI is free software: you can redistribute it and/or modify
# ... | gpl-3.0 | 5,136,297,606,282,613,000 | 28.686275 | 80 | 0.547556 | false |
sergioSEa/Developed_scripts | fastq-stats.py | 1 | 8236 | #!/usr/bin/python
import argparse
from PIL import Image, ImageDraw, ImageFont, ImageOps
parser = argparse.ArgumentParser()
parser.add_argument('-fasq', action="store", dest = 'File', required = "True")
parser.add_argument('-out', action="store", dest = 'out', required = "True")
args = parser.parse_args()
reverse = "... | gpl-3.0 | 6,892,022,040,094,627,000 | 28.102473 | 164 | 0.631496 | false |
NaturalGIS/naturalgis_qgis | python/plugins/processing/algs/qgis/Delaunay.py | 15 | 5994 | # -*- coding: utf-8 -*-
"""
***************************************************************************
Delaunay.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
******************************... | gpl-2.0 | 3,523,150,725,151,763,000 | 36.229814 | 146 | 0.52636 | false |
4doemaster/enigma2 | lib/python/Screens/PasswordBox.py | 5 | 3705 | # [iq]
from Screen import Screen
from Screens.MessageBox import MessageBox
from Components.config import ConfigSubsection,ConfigInteger,getConfigListEntry, ConfigSelection, ConfigTextLeft, ConfigPassword, config
from Components.ConfigList import ConfigListScreen
from Components.ActionMap import ActionMap, NumberActionM... | gpl-2.0 | -7,666,159,819,359,619,000 | 39.271739 | 158 | 0.705533 | false |
x75/mavlink | pymavlink/examples/sigloss.py | 4 | 2131 | #!/usr/bin/env python
'''
show times when signal is lost
'''
import sys, time, os
# allow import from the parent directory, where mavlink.py is
sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), '..'))
from optparse import OptionParser
parser = OptionParser("sigloss.py [options]")
parser.a... | lgpl-3.0 | 1,039,134,100,863,837,800 | 33.370968 | 115 | 0.608165 | false |
wuqize/FluentPython | chapter2/_numetuple.py | 1 | 1681 | # -*- coding: utf-8 -*-
"""
Created on Sun May 07 14:01:20 2017
"""
"""
from collections import namedtuple
ll = namedtuple('ll',['x', 'y'])
ll
Out[50]: __main__.ll
ll._fields
Out[51]: ('x', 'y')
City = namedtuple('City', 'name country population coordinates')
tokyo = City('Tokyo', 'JP', 36.933, (35.689722, 139.... | lgpl-3.0 | -6,306,527,420,729,727,000 | 25.28125 | 128 | 0.570494 | false |
zakkum42/Bosch | src/01-features/split_date_columns.py | 1 | 1998 | import numpy as np
import pandas as pd
from datetime import datetime
from bosch_feature_list import numeric_fields, categoric_fields, date_fields, idList
from bosch_date_features import numeric_features_w_dates, date_features_w_numeric
chunksize = 100000
def binarize_for_features(fields_map, input_fname, output_fname1... | apache-2.0 | -4,293,318,501,645,923,000 | 37.423077 | 120 | 0.646146 | false |
atosorigin/ansible | lib/ansible/plugins/cache/__init__.py | 6 | 12844 | # (c) 2014, Michael DeHaan <michael.dehaan@gmail.com>
# (c) 2018, Ansible Project
#
# 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, o... | gpl-3.0 | 821,881,587,876,551,000 | 33.159574 | 156 | 0.587434 | false |
menpo/menpo | menpo/io/output/base.py | 2 | 19837 | import gzip
import warnings
from functools import partial
from pathlib import Path
from .extensions import landmark_types, image_types, pickle_types, video_types
from ..exceptions import OverwriteError
from ..utils import _norm_path, _possible_extensions_from_filepath, _normalize_extension
# an open file handle that ... | bsd-3-clause | 1,479,423,852,352,776,400 | 36.428302 | 88 | 0.634118 | false |
ceache/treadmill | lib/python/treadmill/sysinfo.py | 2 | 10919 | """Helper module to get system related information.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from collections import namedtuple
import io
import multiprocessing
import os
import platform
import socket
imp... | apache-2.0 | -6,205,952,866,836,848,000 | 27.287565 | 79 | 0.586592 | false |
ktsamis/repose | repose/connection.py | 2 | 11725 | import errno
import os
import select
import socket
import sys
import getpass
from traceback import format_exc
import logging
import paramiko
if not sys.warnoptions:
import warnings
warnings.simplefilter("ignore")
logger = logging.getLogger("repose.connection")
class CommandTimeout(Exception):
"""rem... | gpl-3.0 | -2,305,095,095,845,652,200 | 31.935393 | 87 | 0.532111 | false |
duncan-brown/pycbc | pycbc/fft/backend_cpu.py | 12 | 1283 | # Copyright (C) 2014 Josh Willis
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed... | gpl-3.0 | -2,760,232,491,197,314,600 | 31.075 | 71 | 0.685113 | false |
renard/ansible-modules-core | files/copy.py | 7 | 11951 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of... | gpl-3.0 | 7,187,783,210,496,133,000 | 36.700315 | 155 | 0.651912 | false |
stefan-caraiman/cloudbase-init | cloudbaseinit/tests/plugins/windows/test_winrmlistener.py | 1 | 7113 | # Copyright 2013 Cloudbase Solutions Srl
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | apache-2.0 | -434,534,336,273,615,700 | 43.180124 | 78 | 0.640799 | false |
elba7r/builder | frappe/integrations/doctype/dropbox_settings/dropbox_settings.py | 2 | 10584 | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
import os
from frappe import _
from frappe.utils.backups import new_backup
from frappe.utils.background_jobs import enqueue
from fra... | mit | 1,453,086,745,566,155,500 | 31.170213 | 127 | 0.713813 | false |
joshuaohana/StarTrekDeck | main.py | 1 | 2010 | #TODO is import os a thing?
import card_data
from Player import Player
from Deck import Deck
from Hand import Hand
from CardTypes.shipcard import shipcard
from Discardpile import Discardpile
Basicship= shipcard('Nick\'s Ship', 0, 0 ,0, 8)
NicksDeck = Deck('Nick\'s Badass Mothafuckin Deck',[card_data.cards['Ensign'], ... | gpl-3.0 | 8,055,695,909,640,823,000 | 44.704545 | 215 | 0.736318 | false |
daineseh/linkit-smart-7688-duo-example | servo_motor_FS90R/control_FS90R.py | 1 | 1129 | #!/usr/bin/env python
import serial
import sys
s = None
def setup():
global s
# open serial COM port to /dev/ttyS0, which maps to UART0(D0/D1)
# the baudrate is set to 57600 and should be the same as the one
# specified in the Arduino sketch uploaded to ATMega32U4.
s = serial.Serial("/dev/ttyS0",... | mit | -7,314,979,898,884,196,000 | 20.711538 | 68 | 0.571302 | false |
Andrew-McNab-UK/DIRAC | Core/Base/Client.py | 2 | 3300 | """ Base class for DIRAC Client """
__RCSID__ = "$Id$"
from DIRAC.Core.DISET.RPCClient import RPCClient
class Client( object ):
""" Simple class to redirect unknown actions directly to the server. Arguments
to the constructor are passed to the RPCClient constructor as they are.
Some... | gpl-3.0 | 7,096,099,077,450,960,000 | 32.333333 | 84 | 0.625455 | false |
glennhickey/hal | benchmarks/benchMark.py | 1 | 2163 | #!/usr/bin/env python3
#Copyright (C) 2012 by Glenn Hickey
# Copyright (C) 2012-2019 by UCSC Computational Genomics Lab
#
#Released under the MIT license, see LICENSE.txt
import argparse
import os
import sys
import traceback
import time
import random
import resource
import psutil
from sonLib.bioio import getTempDir... | mit | 5,595,900,775,344,440,000 | 30.347826 | 103 | 0.598243 | false |
ppries/tensorflow | tensorflow/contrib/bayesflow/python/kernel_tests/entropy_test.py | 12 | 12557 | # 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 | -4,692,664,063,794,712,000 | 36.261128 | 80 | 0.648244 | false |
RMMoreton/drawwrite | drawwritesite/drawwrite/admin.py | 1 | 1408 | """Configure the drawwrite admin page."""
from django.contrib import admin
from .models import Chain, DrawLink, Game, Player, WriteLink
def get_game_name_from_chain(chain):
"""Return the name of the game that chain belongs to."""
return chain.player.game.name
get_game_name_from_chain.short_description = 'Gam... | mit | 3,072,840,755,034,112,500 | 26.607843 | 60 | 0.677557 | false |
robbiet480/home-assistant | tests/components/cover/test_device_action.py | 5 | 15362 | """The tests for Cover device actions."""
import pytest
import homeassistant.components.automation as automation
from homeassistant.components.cover import DOMAIN
from homeassistant.const import CONF_PLATFORM
from homeassistant.helpers import device_registry
from homeassistant.setup import async_setup_component
from ... | apache-2.0 | 6,677,853,787,852,848,000 | 32.837004 | 87 | 0.55455 | false |
johndlong/walrus | walrus/search/porter.py | 4 | 12745 | """\
Original Copyright and Information
Porter Stemming Algorithm
This is the Porter stemming algorithm, ported to Python from the
version coded up in ANSI C by the author. It may be be regarded
as canonical, in that it follows the algorithm presented in
Porter, 1980, An algorithm for suffix stripping, Progra... | mit | 4,402,611,869,401,863,000 | 34.104816 | 78 | 0.468419 | false |
aospx-kitkat/platform_external_chromium_org | ppapi/generators/idl_propertynode.py | 40 | 5465 | #!/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.
""" Hierarchical property system for IDL AST """
import re
import sys
from idl_log import ErrOut, InfoOut, WarnOut
from idl_option... | bsd-3-clause | 2,883,256,284,417,654,000 | 26.741117 | 76 | 0.652333 | false |
jdilallo/jdilallo-test | examples/adwords/v201309/misc/get_all_images_and_videos.py | 1 | 2315 | #!/usr/bin/python
#
# 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 b... | apache-2.0 | 4,196,729,325,004,015,000 | 29.866667 | 80 | 0.633261 | false |
sharoonthomas/nereid | nereid/routing.py | 9 | 2610 | # -*- coding: utf-8 -*-
"""
The host matching URL Map seems to be matching hosts well but fails in
generating/building URLs when there are same endpoints.
This patch makes strict host matching to ensure nothing skips host
matching.
Also see: https://github.com/mitsuhiko/werkzeug/issues/488
:c... | gpl-3.0 | -8,672,897,463,554,729,000 | 35.25 | 76 | 0.61341 | false |
rubendura/django-rest-framework | tests/test_renderers.py | 53 | 17136 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import json
import re
from collections import MutableMapping
from django.conf.urls import include, url
from django.core.cache import cache
from django.db import models
from django.test import TestCase
from django.utils import six
from django.utils.transl... | bsd-2-clause | 8,635,560,888,795,971,000 | 35.221987 | 119 | 0.6376 | false |
Medigate/cutiuta-server | cutiuta-server/env/lib/python3.4/site-packages/django/core/cache/backends/memcached.py | 41 | 6954 | "Memcached cache backend"
import pickle
import time
from django.core.cache.backends.base import DEFAULT_TIMEOUT, BaseCache
from django.utils import six
from django.utils.encoding import force_str
from django.utils.functional import cached_property
class BaseMemcachedCache(BaseCache):
def __init__(self, server, ... | gpl-3.0 | -5,305,973,762,145,933,000 | 36.793478 | 108 | 0.605982 | false |
rghe/ansible | lib/ansible/modules/packaging/os/apt_repository.py | 19 | 19322 | #!/usr/bin/python
# encoding: utf-8
# Copyright: (c) 2012, Matt Wright <matt@nobien.net>
# Copyright: (c) 2013, Alexander Saltanov <asd@mokote.com>
# Copyright: (c) 2014, Rutger Spiertz <rutger@kumina.nl>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ imp... | gpl-3.0 | 4,007,677,621,501,388,300 | 34.130909 | 146 | 0.577321 | false |
mattcen/alloc | bin/alloccli/timesheets.py | 1 | 6113 | """alloccli subcommand for viewing a list of timesheets."""
from alloc import alloc
class timesheets(alloc):
"""Print a list of time sheets."""
# Setup the options that this cli can accept
ops = []
ops.append(('', 'help ', 'Show this help.'))
ops.append(('', 'csv=[WHEN] ', 'Return ... | agpl-3.0 | 2,668,750,069,352,206,000 | 39.217105 | 122 | 0.506462 | false |
Vaidyanath/tempest | tempest/api/image/v1/test_images.py | 4 | 11832 | # Copyright 2012 OpenStack Foundation
# 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 requ... | apache-2.0 | -8,566,382,824,186,845,000 | 41.714801 | 78 | 0.573614 | false |
mhnatiuk/phd_sociology_of_religion | scrapper/lib/python2.7/site-packages/scrapy/tests/test_crawl.py | 10 | 8408 | import json
import socket
import mock
from twisted.internet import defer
from twisted.trial.unittest import TestCase
from scrapy.utils.test import docrawl, get_testlog
from scrapy.tests.spiders import FollowAllSpider, DelaySpider, SimpleSpider, \
BrokenStartRequestsSpider, SingleRequestSpider, DuplicateStartRequest... | gpl-2.0 | -2,349,612,145,538,740,000 | 37.568807 | 103 | 0.639748 | false |
alisaifee/holmium.core | versioneer.py | 11 | 24303 | #! /usr/bin/python
"""versioneer.py
(like a rocketeer, but for versions)
* https://github.com/warner/python-versioneer
* Brian Warner
* License: Public Domain
* Version: 0.8+
This file helps distutils-based projects manage their version number by just
creating version-control tags.
For developers who work from a V... | mit | -6,332,344,183,225,210,000 | 37.57619 | 91 | 0.625314 | false |
Microsoft/PTVS | Python/Product/Miniconda/Miniconda3-x64/Lib/site-packages/win32com/client/gencache.py | 4 | 23679 | """Manages the cache of generated Python code.
Description
This file manages the cache of generated Python code. When run from the
command line, it also provides a number of options for managing that cache.
Implementation
Each typelib is generated into a filename of format "{guid}x{lcid}x{major}x{minor}.py"... | apache-2.0 | -7,204,068,276,579,343,000 | 33.218208 | 157 | 0.704633 | false |
jellis18/DNestPy | Level.py | 2 | 4211 | import numpy as np
class Level:
"""
Defines a Nested Sampling level
"""
def __init__(self, logX=0.0, logL=[-1E300, 0.0]):
"""
Construct a level. By default, logX = 0
and logL = [-1E300, 0.0]. i.e. the prior.
I use -1E300 for compatibility with the C++ version.
"""
self.logX, self.logL = logX, logL
se... | gpl-3.0 | -7,296,108,088,568,520,000 | 24.993827 | 107 | 0.64189 | false |
tedelhourani/ansible | lib/ansible/modules/messaging/rabbitmq_plugin.py | 85 | 4566 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013, Chatham Financial <oss@chathamfinancial.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'... | gpl-3.0 | 6,831,803,007,854,848,000 | 26.672727 | 92 | 0.599869 | false |
lpirl/ansible | lib/ansible/module_utils/eos.py | 7 | 8752 | #
# (c) 2015 Peter Sprygada, <psprygada@ansible.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any late... | gpl-3.0 | -1,457,779,457,341,224,000 | 31.058608 | 109 | 0.601348 | false |
iakovos-panourgias/fluidity | python/fluidity_ufl/ufl_fortran.py | 5 | 7167 |
import parse_ufl
detwei=("detwei", "detwei", "real, dimension(ngi), intent(in) :: detwei")
class fortran_module():
def __init__(self, filename):
"""Given a ufl file produce a fortran module implementing that
ufl. The module will have the name basename_module where basename is
filename wit... | lgpl-2.1 | -6,694,187,486,542,812,000 | 28.493827 | 83 | 0.550021 | false |
Unofficial-Extend-Project-Mirror/openfoam-extend-Breeder2.0-libraries-swak4Foam | Examples/FromPresentations/OFW8_landspeedersInCanyon/system/makeSlices.py | 4 | 2042 | nr=int(nrPlanes)
dx=(maxX-minX)/nr
planeTemplate="""
createsPlane%(nr)d
{
type createSampledSurface;
outputControl timeStep;
outputInterval 1;
surfaceName autoPlane%(nr)d;
surface {
type plane;
basePoint (%(x)f 0 0);
normalVector... | gpl-2.0 | -1,848,523,350,423,611,600 | 23.902439 | 91 | 0.542605 | false |
fspaolo/scikit-learn | examples/linear_model/plot_logistic.py | 8 | 1400 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
=========================================================
Logit function
=========================================================
Show in the plot is how the logistic regression would, in this
synthetic dataset, classify values as either 0 or 1,
i.e. class one or two, u... | bsd-3-clause | -8,901,926,055,947,480,000 | 20.538462 | 65 | 0.607857 | false |
dufferzafar/picard | picard/formats/vorbis.py | 3 | 11797 | # -*- coding: utf-8 -*-
#
# Picard, the next-generation MusicBrainz tagger
# Copyright (C) 2006 Lukáš Lalinský
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License... | gpl-2.0 | -363,768,341,288,845,440 | 35.177914 | 103 | 0.535696 | false |
NervanaSystems/coach | rl_coach/presets/CartPole_ACER.py | 1 | 2114 | from rl_coach.agents.acer_agent import ACERAgentParameters
from rl_coach.base_parameters import VisualizationParameters, PresetValidationParameters
from rl_coach.core_types import TrainingSteps, EnvironmentEpisodes, EnvironmentSteps
from rl_coach.environments.gym_environment import GymVectorEnvironment
from rl_coach.fi... | apache-2.0 | 285,189,701,800,660,000 | 42.142857 | 106 | 0.759224 | false |
wuzhy/autotest | server/source_kernel.py | 3 | 1971 | # Copyright 2007 Google Inc. Released under the GPL v2
"""
This module defines the SourceKernel class
SourceKernel: an linux kernel built from source
"""
from autotest_lib.server import kernel, autotest
class SourceKernel(kernel.Kernel):
"""
This class represents a linux kernel built from source.
... | gpl-2.0 | -214,378,712,727,944,500 | 27.157143 | 71 | 0.583968 | false |
yetu/ansible-deployment | library/initd.py | 2 | 7967 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# WARNING This code is still under development
#
__author__ = 'Adham Helal'
#TODO: escape $GREP_FOR argument. For now, make sure to escape any '-' symbols in GREP_FOR.
DOCUMENTATION = '''
---
'''
initd_string = '''#!/bin/bash
# export PS4='+(${BASH_SOURCE}:${LINENO}):... | mit | 8,668,241,455,763,653,000 | 30.868 | 158 | 0.582026 | false |
Skytim/nccuTEG | pybossa/api/task_run.py | 4 | 2652 | # -*- coding: utf8 -*-
# This file is part of PyBossa.
#
# Copyright (C) 2014 SF Isle of Man Limited
#
# PyBossa 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... | agpl-3.0 | -6,216,720,680,259,834,000 | 35.833333 | 77 | 0.682881 | 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.