code
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
226
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
#!/usr/bin/env python # # This file is part of Scalable COncurrent Operations in Python (SCOOP). # # SCOOP 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 Licens...
IGITUGraz/scoop
scoop/broker/brokerzmq.py
Python
lgpl-3.0
15,234
# Copyright Iris contributors # # This file is part of Iris and is released under the LGPL license. # See COPYING and COPYING.LESSER in the root of the repository for full # licensing details. """ Unit tests for the `iris.aux_factory.OceanSg2Factory` class. """ # Import iris.tests first so that some things can be ini...
pp-mo/iris
lib/iris/tests/unit/aux_factory/test_OceanSg2Factory.py
Python
lgpl-3.0
9,616
import sys from resources.datatables import Options def setup(core, object): object.setAttachment('radial_filename', 'object/conversation') object.setAttachment('conversationFile', 'respec') object.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) object.setStfFilename('mob/creature_names') object.set...
ProjectSWGCore/NGECore2
scripts/object/mobile/respec_seller_f_1.py
Python
lgpl-3.0
352
# -*- coding: utf-8 -*- __author__ = 'k' import re import scrapy from bs4 import BeautifulSoup import logging from thepaper.items import NewsItem import json logger = logging.getLogger("NbdSpider") from thepaper.settings import * from thepaper.util import judge_news_crawl import time class DonewsSpider(scrapy.spiders...
yinzishao/NewsScrapy
thepaper/thepaper/spiders/donews_spider.py
Python
lgpl-3.0
3,445
import os import io import time import base64 import hashlib import aiohttpretty from http import client from urllib import parse from unittest import mock import pytest from waterbutler.core import (streams, metadata, exceptions) from waterbutler.providers....
rdhyee/waterbutler
tests/providers/s3/test_provider.py
Python
apache-2.0
33,061
# coding: utf-8 """ Copyright 2015 SmartBear Software 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...
jianajavier/pnc-cli
pnc_cli/swagger_client/models/product_singleton.py
Python
apache-2.0
2,857
# Copyright (C) 2013 eNovance SAS <licensing@enovance.com> # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
MaximNevrov/neutron
neutron/tests/unit/services/metering/drivers/test_iptables.py
Python
apache-2.0
21,614
''' The idea is that we record the commands sent to the debugger and reproduce them from this script (so, this works as the client, which spawns the debugger as a separate process and communicates to it as if it was run from the outside) Note that it's a python script but it'll spawn a process to r...
hinesmr/mica
util/pydevd/pysrc/tests_python/test_debugger.py
Python
apache-2.0
33,317
# # 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 the ...
openstack/heat-translator
translator/hot/tosca/tosca_network_network.py
Python
apache-2.0
4,835
""" get_links.py - get all the links The path is NB -> TER -> NEO4J. """ import requests from base64 import b64encode url = "http://localhost:8088/api/v1/links" headers = { 'Content-Type': 'application/json', 'Authorization': 'Basic %s' % b64encode(b"kilda:kilda").decode("ascii") } # # This models one of the...
nikitamarchenko/open-kilda
services/topology-engine-rest/app/app/tests/get_links.py
Python
apache-2.0
694
import calendar import time import random from marionette_test import MarionetteTestCase class CookieTest(MarionetteTestCase): def setUp(self): MarionetteTestCase.setUp(self) test_url = self.marionette.absolute_url('test.html') self.marionette.navigate(test_url) self.COOKIE_A = {"...
sergecodd/FireFox-OS
B2G/gecko/testing/marionette/client/marionette/tests/unit/test_cookies.py
Python
apache-2.0
3,426
# -*- 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...
googleads/google-ads-python
google/ads/googleads/v9/services/services/conversion_value_rule_set_service/transports/__init__.py
Python
apache-2.0
1,117
# # 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 # ...
pratikmallya/heat
heat/engine/lifecycle_plugin.py
Python
apache-2.0
2,141
def copy_files(src, target_node, parent=None, name=None): """Copy the files from src to the target node :param Folder src: The source to copy children from :param Node target_node: The node to copy files to :param Folder parent: The parent of to attach the clone of src to, if applicable """ ass...
pattisdr/osf.io
website/files/utils.py
Python
apache-2.0
1,720
# Copyright 2017 Mycroft AI 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 writin...
forslund/mycroft-core
mycroft/util/log.py
Python
apache-2.0
4,287
# Copyright 2017 Battelle Energy Alliance, 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 agreed t...
idaholab/raven
tests/framework/aliasSystemTests/externalModel/lorentzAttractor.py
Python
apache-2.0
1,994
""" The *_font_gradient.pdf files have 16 slides that contain a different sized text: * the first slide contains 1/1 sized text - the text is as high as the page * the second slide contains 1/2 sized text - the text is twice smaller than the page * ... * the 16th slide contains 1/16 sized text - t...
enkidulan/slidelint
src/slidelint/tests/checkers/font_size/TestCheckerFontSize.py
Python
apache-2.0
13,339
from gym.spaces import Space from typing import Optional from ray.rllib.utils.exploration.gaussian_noise import GaussianNoise from ray.rllib.utils.schedules import ConstantSchedule class PerWorkerGaussianNoise(GaussianNoise): """A per-worker Gaussian noise class for distributed algorithms. Sets the `scale` ...
richardliaw/ray
rllib/utils/exploration/per_worker_gaussian_noise.py
Python
apache-2.0
1,807
# # Location-related classes for simplification of GPS traces. # Author: James P. Biagioni (jbiagi1@uic.edu) # Company: University of Illinois at Chicago # Created: 5/16/11 # import os class Location: def __init__(self, id, latitude, longitude, time): self.id = id self.latitude = latitude ...
Vanuan/gpx_to_road_map
converters/location.py
Python
apache-2.0
4,821
"""Start/stop/manage workers.""" from __future__ import absolute_import, unicode_literals import errno import os import shlex import signal import sys from collections import OrderedDict, defaultdict from functools import partial from subprocess import Popen from time import sleep from kombu.utils.encoding import fro...
kawamon/hue
desktop/core/ext-py/celery-4.2.1/celery/apps/multi.py
Python
apache-2.0
15,740
# coding=utf-8 # Copyright 2012 Hewlett-Packard Development Company, L.P. # Copyright (c) 2012 NTT DOCOMO, INC. # Copyright 2014 International Business Machines Corporation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance ...
redhat-openstack/ironic
ironic/tests/drivers/test_ipmitool.py
Python
apache-2.0
85,048
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # no...
rackerlabs/horizon
openstack_dashboard/dashboards/project/access_and_security/keypairs/views.py
Python
apache-2.0
3,100
#!/usr/bin/env python # -*- coding: utf-8 -*- # File: ls-checkpoint.py import numpy as np import pprint import sys import six import tensorflow as tf from tensorpack.tfutils.varmanip import get_checkpoint_path if __name__ == '__main__': fpath = sys.argv[1] if fpath.endswith('.npy'): params = np.load...
google-research/ssl_detection
third_party/tensorpack/scripts/ls-checkpoint.py
Python
apache-2.0
723
################################################################################ # Copyright (c) 2015-2018 Skymind, Inc. # # This program and the accompanying materials are made available under the # terms of the Apache License, Version 2.0 which is available at # https://www.apache.org/licenses/LICENSE-2.0. # # Unless...
deeplearning4j/deeplearning4j
jumpy/jumpy/spark/fast_impl.py
Python
apache-2.0
4,802
# =============================================================================== # Copyright 2014 Jake Ross # # 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...
USGSDenverPychron/pychron
pychron/core/ui/qt/keybinding_editor.py
Python
apache-2.0
4,794
# 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...
AsimmHirani/ISpyPi
tensorflow/contrib/tensorflow-master/tensorflow/contrib/distributions/python/kernel_tests/mixture_test.py
Python
apache-2.0
24,371
# 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...
xzturn/tensorflow
tensorflow/python/keras/layers/merge_test.py
Python
apache-2.0
14,295
# Copyright 2021 The gRPC Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
grpc/grpc
src/python/grpcio_admin/grpc_version.py
Python
apache-2.0
703
#!/usr/bin/env python2.6 # -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2008,2009,2010,2011,2013 Contributor # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # Y...
stdweird/aquilon
tests/broker/test_del_disk.py
Python
apache-2.0
2,362
from django import forms from rango.models import Page, Category, UserProfile class CategoryForm(forms.ModelForm): name = forms.CharField(max_length=128, help_text="Please enter the category name.") views = forms.IntegerField(widget=forms.HiddenInput(), initial=0) likes = forms.IntegerField(widget=forms.Hi...
leifos/tango_with_django_19
code/tango_with_django_project/rango/forms.py
Python
apache-2.0
2,036
import logging # Note: do not introduce unnecessary library dependencies here, e.g. gym. # This file is imported from the tune module in order to register RLlib agents. from ray.rllib.env.base_env import BaseEnv from ray.rllib.env.external_env import ExternalEnv from ray.rllib.env.multi_agent_env import MultiAgentEnv ...
richardliaw/ray
rllib/__init__.py
Python
apache-2.0
2,272
"""The tests for the Template select platform.""" import pytest from homeassistant import setup from homeassistant.components.input_select import ( ATTR_OPTION as INPUT_SELECT_ATTR_OPTION, ATTR_OPTIONS as INPUT_SELECT_ATTR_OPTIONS, DOMAIN as INPUT_SELECT_DOMAIN, SERVICE_SELECT_OPTION as INPUT_SELECT_SE...
sander76/home-assistant
tests/components/template/test_select.py
Python
apache-2.0
8,099
# -*- coding: utf-8 -*- # # python-keystoneclient documentation build configuration file, created by # sphinx-quickstart on Sun Dec 6 14:19:25 2009. # # This file is execfile()d with the current directory set to its containing # dir. # # Note that not all possible configuration values are present in this # autogenerat...
darren-wang/ksc
doc/source/conf.py
Python
apache-2.0
7,828
#!/usr/bin/python # # Copyright 2013 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...
caioserra/apiAdwords
examples/adspygoogle/adwords/v201309/reporting/get_report_fields.py
Python
apache-2.0
1,806
import unittest, random, sys, time, re, getpass sys.path.extend(['.','..','py']) import h2o, h2o_cmd, h2o_hosts, h2o_browse as h2b, h2o_import as h2i, h2o_glm, h2o_util import h2o_print as h2p, h2o_gbm # details: # we want to seed a random dictionary for our enums # string.ascii_uppercase string.printable string.lette...
janezhango/BigDataMachineLearning
py/testdir_single_jvm/test_exec2_enums_rand_cut.py
Python
apache-2.0
11,650
# Copyright 2020 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...
mahak/neutron
neutron/privileged/agent/linux/__init__.py
Python
apache-2.0
1,208
''' New Integration Test for VM vga mode. @author: quarkonics ''' import zstackwoodpecker.test_lib as test_lib import zstackwoodpecker.operations.config_operations as conf_ops import zstackwoodpecker.test_util as test_util test_stub = test_lib.lib_get_test_stub() _config_ = { 'timeout' : 360, ...
zstackorg/zstack-woodpecker
integrationtest/vm/basic/vga/test_vm_vga.py
Python
apache-2.0
1,174
""" The `ModelSerializer` and `HyperlinkedModelSerializer` classes are essentially shortcuts for automatically creating serializers based on a given model class. These tests deal with ensuring that we correctly map the model fields onto an appropriate set of serializer fields for each case. """ from __future__ import ...
atombrella/django-rest-framework
tests/test_model_serializer.py
Python
bsd-2-clause
43,267
import claripy import logging import time from ... import sim_options as o l = logging.getLogger("angr.engines.vex.dirty") ##################### # Dirty calls ##################### # they return retval, constraints # Reference: # http://www-inteng.fnal.gov/Integrated_Eng/GoodwinDocs/pdf/Sys%20docs/PowerPC/PowerP...
tyb0807/angr
angr/engines/vex/dirty.py
Python
bsd-2-clause
14,622
class TranslationDictionary(object): """ TranslationDictionary """ def __init__(self, dictionaries=None, default=None): self.dictionaries = dictionaries or { 'pt': ('portuguese', _('Portuguese')), 'en': ('english', _('English')), 'es': ('spanish', _('Spanish...
dvdmgl/django-pg-fts
pg_fts/utils.py
Python
bsd-2-clause
1,343
# # This file is part of pyasn1 software. # # Copyright (c) 2005-2020, Ilya Etingof <etingof@gmail.com> # License: http://snmplabs.com/pyasn1/license.html # import sys from pyasn1 import debug from pyasn1 import error from pyasn1.codec.ber import eoo from pyasn1.compat.integer import to_bytes from pyasn1.compat.octets...
etingof/pyasn1
pyasn1/codec/ber/encoder.py
Python
bsd-2-clause
28,322
#!/usr/bin/env python import memcache from saml2 import time_util from saml2.cache import ToOld, CacheError # The assumption is that any subject may consist of data # gathered from several different sources, all with their own # timeout time. def _key(prefix, name): return "%s_%s" % (prefix, name) ...
BetterWorks/pysaml2
src/saml2/mcache.py
Python
bsd-2-clause
7,249
""" Copyright (c) 2011, 2012, Regents of the University of California 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 l...
SoftwareDefinedBuildings/smap
python/smap/smapconf.py
Python
bsd-2-clause
3,347
from sharpy.product import CheddarProduct # Get a product instance to work with product = CheddarProduct( username = CHEDDAR_USERNAME, password = CHEDDAR_PASSWORD, product_code = CHEDDAR_PRODUCT, ) # Get the customer from Cheddar Getter customers = product.get_customers()
smartfile/sharpy
docs/examples/customer_fetch/all_customers.py
Python
bsd-3-clause
286
# -*- coding: utf-8 -*- from __future__ import unicode_literals import django from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("msgs", "0011_auto_20160222_1422")] operations = [ migrations.CreateModel( name="Labelling", fields=...
praekelt/casepro
casepro/msgs/migrations/0012_message_labels.py
Python
bsd-3-clause
1,203
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2009-2011, Nicolas Clairon # 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 abov...
MobicoTIC/MongoLite
mongolite/mongo_exceptions.py
Python
bsd-3-clause
2,399
import logging from flask import Flask from flask_appbuilder import AppBuilder, SQLA """ Logging configuration """ logging.basicConfig(format="%(asctime)s:%(levelname)s:%(name)s:%(message)s") logging.getLogger().setLevel(logging.DEBUG) app = Flask(__name__) app.config.from_object("config") db = SQLA(app) appbuilde...
dpgaspar/Flask-AppBuilder
examples/simpleform/app/__init__.py
Python
bsd-3-clause
382
# -*- coding: utf-8 -*- """ celery.contrib.rdb ================== Remote debugger for Celery tasks running in multiprocessing pool workers. Inspired by http://snippets.dzone.com/posts/show/7248 **Usage** .. code-block:: python from celery.contrib import rdb from celery.task import task @task def ad...
ask/celery
celery/contrib/rdb.py
Python
bsd-3-clause
4,702
from lib.common import helpers class Module: def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'Invoke-FileFinder', 'Author': ['@harmj0y'], 'Description': ('Finds sensitive files on the domain.'), 'Background' : True, 'OutputExt...
binaryAccess/Empire
lib/modules/collection/file_finder.py
Python
bsd-3-clause
6,095
"""config_test.py - test config module RMM, 25 may 2019 This test suite checks the functionality of the config module """ from math import pi, log10 import matplotlib.pyplot as plt from matplotlib.testing.decorators import cleanup as mplcleanup import numpy as np import pytest import control as ct @pytest.mark.u...
python-control/python-control
control/tests/config_test.py
Python
bsd-3-clause
12,736
""" Accessors for related objects. When a field defines a relation between two models, each model class provides an attribute to access related instances of the other model class (unless the reverse accessor has been disabled with related_name='+'). Accessors are implemented as descriptors in order to customize acces...
sadaf2605/django
django/db/models/fields/related_descriptors.py
Python
bsd-3-clause
49,686
#encoding: utf-8 from __future__ import unicode_literals TITLE_TO_SLUG = { 'איגוד הביטקוין': 'bitcoin-org-il', 'אליאב': 'eliav', '* בדיקות פרודקשיין *': 'production-test', 'בי״ס עמית': 'amit', 'הבר קיימא': 'barkayma', 'הסדנא לידע ציבורי': 'hasadna', 'הפורום לממשל פתוח': 'open-government', 'התנועה לאיכות השלטון...
nonZero/OpenCommunity
src/communities/legacy_mapping.py
Python
bsd-3-clause
574
"""DAG tests""" from rever.dag import find_path from rever.activity import Activity def test_empty(): path, _ = find_path({}, set()) assert [] == path def test_single(): path, _ = find_path({'a': Activity()}, {'a'}) assert ['a'] == path def test_two_unrelated(): dag = {'a': Activity(), 'b': Ac...
ergs/rever
tests/test_dag.py
Python
bsd-3-clause
4,047
import math def add(vec_a, vec_b): return [vec_a[0]+vec_b[0], vec_a[1]+vec_b[1]] def sub(vec_a, vec_b): return [vec_a[0]-vec_b[0], vec_a[1]-vec_b[1]] def mul(vec, sca): return [vec[0]*sca, vec[1]*sca] def inner(vec_a, vec_b): return vec_a[0]*vec_b[0]+vec_a[1]*vec_b[1] def abs(vec): return math....
JacquesLucke/still-lambda
vec2.py
Python
bsd-3-clause
470
from __future__ import absolute_import from sentry.api.base import DocSection from sentry.api.bases.project import ProjectEndpoint from sentry.api.exceptions import ResourceDoesNotExist from sentry.api.serializers import serialize from sentry.models import TagKey, TagKeyStatus, TagValue class ProjectTagKeyValuesEndp...
hongliang5623/sentry
src/sentry/api/endpoints/project_tagkey_values.py
Python
bsd-3-clause
1,277
from euclid import Vector3 from ..util.vectors import tuple_of_ints class Collision(object): ''' detects if any objects in the world collide ''' def __init__(self, world): world.item_added += self.world_add_item world.item_removed += self.world_remove_item self...
tartley/pyweek11-cube
source/model/collision.py
Python
bsd-3-clause
1,781
complexe = importeur.salle.creer_etendue("complexe") complexe.origine = (20, 20) obstacle = importeur.salle.obstacles["falaise"] coords = [ (20, 20), (21, 20), (22, 20), (23, 20), (24, 20), (25, 20), (20, 21), (20, 22), (20, 23), (20, 24), (20, 25), (19, 25), (19, 26...
vlegoff/tsunami
src/test/boostrap/salle/etendue/complexe.py
Python
bsd-3-clause
772
#!/usr/bin/env python import logging import unittest import os import environment import utils import tablet shard_0_master = tablet.Tablet() shard_0_replica1 = tablet.Tablet() shard_0_replica2 = tablet.Tablet() shard_0_rdonly = tablet.Tablet() shard_0_backup = tablet.Tablet() shard_1_master = tablet.Tablet() shard_...
SDHM/vitess
test/schema.py
Python
bsd-3-clause
9,880
#!/usr/bin/python # # Urwid main loop code # Copyright (C) 2004-2012 Ian Ward # Copyright (C) 2008 Walter Mundt # Copyright (C) 2009 Andrew Psaltis # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by ...
DarkPurpleShadow/ConnectFour
urwid/main_loop.py
Python
bsd-3-clause
41,354
# -*- coding:utf-8 -*- from __future__ import unicode_literals import logging import warnings from admin_scripts.tests import AdminScriptTestCase from django.conf import settings from django.core import mail from django.core.files.temp import NamedTemporaryFile from django.db import connection from django.test impor...
jscn/django
tests/logging_tests/tests.py
Python
bsd-3-clause
18,252
# $Id: body.py 5618 2008-07-28 08:37:32Z strank $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ Directives for additional body elements. See `docutils.parsers.rst.directives` for API details. """ __docformat__ = 'reStructuredText' impor...
rimbalinux/MSISDNArea
docutils/parsers/rst/directives/body.py
Python
bsd-3-clause
5,963
# Generated by Django 1.11.21 on 2019-06-13 17:49 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [("teryt", "0001_initial"), ("cases", "0034_auto_20180104_0436")] operations = [ migrations.AddField( model_na...
watchdogpolska/poradnia.siecobywatelska.pl
poradnia/cases/migrations/0035_case_jst.py
Python
bsd-3-clause
635
report_info = """User-agent: * Disallow: /search Disallow: /sdch Disallow: /groups Disallow: /images Disallow: /admin Disallow: /catalogs Allow: /catalogs/about Allow: /catalogs/p?""" report_unknown = """User-agent: * Allow: /"""
owtf/ptp
tests/tools/robots/robots_reports.py
Python
bsd-3-clause
232
""" Created on May 17, 2012 @author: nmvdewie """ import unittest import rmgpy.qm.qmtp as qm import os import rmgpy.qm.qmverifier as verif import rmgpy.molecule as mol class Test(unittest.TestCase): def testVerifierDoesNotExist(self): molecule = mol.Molecule() name = 'UMRZSTCPUPJPOJ-UHFFFAOYSA' ...
faribas/RMG-Py
unittest/qm/qmverifierTest.py
Python
mit
1,393
#-*- encoding:utf-8 -*- ''' Created on Dec 1, 2014 @author: letian ''' import networkx as nx from Segmentation import Segmentation import numpy as np import math class TextRank4Sentence(object): def __init__(self, stop_words_file = None, delimiters='?!;?!。;…\n'): ''' `stop_words_file`:默认值为None...
MSC19950601/TextRank4ZH
textrank4zh/TextRank4Sentence.py
Python
mit
6,656
""" Example loading all specs from JSON template """ from flask import Flask, jsonify from flasgger import Swagger app = Flask(__name__) app.config['SWAGGER'] = { 'title': 'Colors API', 'uiversion': 2 } swag = Swagger(app, template_file='colors_template.json') @app.route('/colors/<palette>/') def colors(pal...
pcu4dros/pandora-core
workspace/lib/python3.5/site-packages/examples/colors_template_json.py
Python
mit
874
#http://www.minecraftwiki.net/wiki/Data_values blockids = { 0 :"air", 1 :"stone", 2 :"grass", 3 :"dirt", 4 :"cobblestone", 5 :"wood", 6 :"sapling", 7 :"bedrock", 8 :"water", 9 :"stationary water", 10 :"lava", 11 :"stationary lava", 12 :"sand", 13 :"gravel", 14 :"gold ore", 15 :"iron ore", 16 :"coal ore...
twoolie/Minecraft-Tools
src/minecraft/items.py
Python
mit
6,762
# -*- coding: utf-8 -*- # Copyright (c) 2012 Fabian Barkhau <fabian.barkhau@gmail.com> # License: MIT (see LICENSE.TXT file) from django.conf.urls import patterns, include, url from apps.common.urls import arg_id, arg_slug, arg_username L = arg_id("link_id") U = arg_username("username") urlpatt...
F483/bikesurf.org
apps/account/urls.py
Python
mit
928
# pylint: disable=R0201,E0711 """This is the __init__ module for the plugins. It contains the base class for all plugings """ import logging import importlib _LOG = logging.getLogger(__name__) class SoCoPlugin(object): """ The base class for SoCo plugins """ def __init__(self, soco): cls = self....
xxdede/SoCo
soco/plugins/__init__.py
Python
mit
1,031
#!/usr/bin/env python import sys import os import datetime import argparse import blessings import simplejson import biokbase.Transform.Client import biokbase.Transform.script_utils import biokbase.Transform.drivers import biokbase.userandjobstate.client import biokbase.workspace.client if __name__ == "__main__":...
kbase/transform
t/demo/bin/convert_test.py
Python
mit
7,352
# -*- coding: utf-8 -*- """Module to daemonize the current process on Unix.""" # # (C) Pywikibot team, 2007-2015 # # Distributed under the terms of the MIT license. # from __future__ import absolute_import, unicode_literals __version__ = '$Id$' import codecs import os import sys is_daemon = False def daemonize(cl...
darthbhyrava/pywikibot-local
pywikibot/daemonize.py
Python
mit
2,017
import logging import click import click_log from flask.cli import with_appcontext from ..account import github from . import tasks from .models import Project logger = logging.getLogger(__name__) click_log.basic_config(logger) @click.command("projects") @click_log.simple_verbosity_option(logger) @with_appcontext ...
jazzband/site
jazzband/projects/commands.py
Python
mit
1,877
from .fields import JSONField, JSONCharField # noqa
bradjasper/django-jsonfield
jsonfield/__init__.py
Python
mit
53
# -*- coding: utf-8 -*- # # Copyright (C) 2017 European Synchrotron Radiation Facility, Grenoble, France # # Principal author: Wout De Nolf (wout.de_nolf@esrf.eu) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software")...
woutdenolf/wdncrunch
wdncrunch/tests/__init__.py
Python
mit
1,226
# Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
Sorsly/subtle
google-cloud-sdk/lib/surface/compute/instances/add_tags.py
Python
mit
2,551
from __future__ import print_function, unicode_literals, absolute_import class Event(object): '''Represent events from the console.''' def __init__(self, console, input): pass def __repr__(self): '''Display an event for debugging.''' if self.type in ['KeyPress', 'KeyRelease']: ...
Universal-Model-Converter/UMC3.0a
data/Python/x86/Lib/site-packages/pyreadline/console/event.py
Python
mit
1,207
from image_registration.fft_tools import zoom import numpy as np import pytest import itertools def gaussian(x): return np.exp(-x**2/2.) @pytest.mark.parametrize(('imsize','upsample_factor'), list(itertools.product(range(20,27),range(1,25)))) def test_plot_tests(imsize, upsample_factor,doplot=False): """ ...
dattalab/d_code
imaging/alignment/image_registration/image_registration/fft_tools/tests/test_upsample_1d.py
Python
mit
2,642
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations # alter table cbh_chembl_model_extension_project rename to cbh_core_model_project; # ALTER TABLE # cbh_chembl=# alter table cbh_chembl_model_extension_customfieldconfig rename to cbh_core_model_customfieldconfig;...
strets123/cbh_chembl_model_extension
cbh_chembl_model_extension/migrations/0024_auto_20150806_0115.py
Python
mit
2,083
# -*- coding: utf-8 -*- import sys, xbmc, xbmcaddon sys.argv[0] = 'plugin.video.filmix.net.dev'#PLUGIN_ID import os, xbmcup.app, xbmcup.system, xbmcup.db, xbmcup.gui from core.defines import * from core.auth import Auth import core.cover # log = open(xbmcup.system.fs('sandbox://myprog.log').decode('utf-8'), "a") #...
rvlad1987/repository.rvlad1987.xbmc-addons
source/plugin.video.filmix.net.dev/settings.py
Python
gpl-2.0
1,473
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
Debian/openjfx
modules/web/src/main/native/Tools/Scripts/webkitpy/layout_tests/models/test_failures_unittest.py
Python
gpl-2.0
3,135
""" Module simplifying manipulation of XML described at http://libvirt.org/formatdomain.html """ import logging from autotest.client.shared import error from virttest import xml_utils from virttest.libvirt_xml import base, accessors, xcepts from virttest.libvirt_xml.devices import librarian class VMXMLDevices(list):...
autotest/virt-test
virttest/libvirt_xml/vm_xml.py
Python
gpl-2.0
84,182
# This file is part of Invenio. # Copyright (C) 2007, 2008, 2009, 2010, 2011 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later v...
CERNDocumentServer/invenio
modules/webstyle/lib/webdoc_webinterface.py
Python
gpl-2.0
9,639
# -*- coding: utf-8 -*- # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain is not available, # everyone is granted a worldwide, perpetual, royalty-free, # non-exclusive license to e...
Haynie-Research-and-Development/jarvis
deps/lib/python3.4/site-packages/Cryptodome/Hash/SHA224.py
Python
gpl-2.0
6,132
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2011, 2012, 2013, 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, or (a...
Lilykos/invenio
invenio/ext/sqlalchemy/__init__.py
Python
gpl-2.0
7,906
""" spells.py Python recipes to solve frequently requested tasks with Stimfit. You can find a complete description of these functions in the Stimfit online documentation (http://www.stimfit.org/doc/sphinx/index.html) Check "The Stimfit Book of Spells" for details. Authors: Jose Guzman, Alois Schloegl and Christoph S...
JoseGuzman/stimfit
src/stimfit/py/spells.py
Python
gpl-2.0
18,106
# Orca # # Copyright 2005-2008 Sun Microsystems Inc. # # This library 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 2.1 of the License, or (at your option) any later version. # # This...
ruibarreira/linuxtrail
usr/lib/python3/dist-packages/orca/scripts/apps/liferea/script.py
Python
gpl-3.0
5,941
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from frappe.model.document import Document class ProductionPlanSalesOrder(Document): pass
mhbu50/erpnext
erpnext/manufacturing/doctype/production_plan_sales_order/production_plan_sales_order.py
Python
gpl-3.0
222
# Copyright (C) 2008 Valmantas Paliksa <walmis at balticum-tv dot lt> # # Licensed under the GNU General Public License Version 3 # # 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...
namili/blueman
blueman/gui/MessageArea.py
Python
gpl-3.0
5,072
from bs4 import BeautifulSoup from collections import defaultdict import arrow, os, re, requests ENTSOE_ENDPOINT = 'https://transparency.entsoe.eu/api' ENTSOE_PARAMETER_DESC = { 'B01': 'Biomass', 'B02': 'Fossil Brown coal/Lignite', 'B03': 'Fossil Coal-derived gas', 'B04': 'Fossil Gas', 'B05': 'Foss...
Pantkowsky/electricitymap
feeder/parsers/ENTSOE.py
Python
gpl-3.0
15,636
import numpy import matplotlib.pyplot as plot arrow_style_list = ('<->', '<-', '->', 'wedge', 'fancy', 'simple') ax1 = plot.axes() ax1.axes.get_xaxis().set_visible(False) ax1.axes.get_yaxis().set_visible(False) plot.scatter([0] * len(arrow_style_list), range(len(arrow_style_list)), c = 'k') plot.scatter([-.1, 2], [-...
moonbury/notebooks
github/MatplotlibCookbook/Chapter 3/20.py
Python
gpl-3.0
680
# (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 the License, or # (at your option) any lat...
fossilet/ansible
lib/ansible/module_utils/facts.py
Python
gpl-3.0
132,636
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # RawSpeed documentation build configuration file, created by # sphinx-quickstart on Mon Aug 14 18:30:09 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # a...
aferrero2707/PhotoFlow
src/external/rawspeed/docs/conf.py
Python
gpl-3.0
3,214
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('changeset', '0001_initial'), ] operations = [ migrations.AlterField( model_name='changeset', name='r...
batpad/osmcha-django
osmchadjango/changeset/migrations/0002_auto_20150804_0119.py
Python
gpl-3.0
448
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
albertosalmeronunefa/tuconsejocomunal
addons/l10n_ve_dpt/models/l10n_ve_dpt.py
Python
gpl-3.0
2,432
#!/usr/bin/env python # (c) 2012, Jan-Piet Mens <jpmens () gmail.com> # (c) 2012-2014, Michael DeHaan <michael@ansible.com> and others # (c) 2017 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...
cryptobanana/ansible
docs/bin/plugin_formatter.py
Python
gpl-3.0
26,677
#!/usr/bin/env python # encoding: utf-8 # Thomas Nagy, 2005-2010 (ita) """ Classes related to the build phase (build, clean, install, step, etc) The inheritance tree is the following: """ import os, sys, errno, re, shutil, stat try: import cPickle except ImportError: import pickle as cPickle from waflib import Ru...
zhumingliang1209/Ardupilot
ardupilot/modules/waf/waflib/Build.py
Python
gpl-3.0
37,831
# coding=utf-8 """ InaSAFE Disaster risk assessment tool by AusAid -**InaSAFE Wizard** This module provides: Keyword Wizard Step: Classification Selector Contact : ole.moller.nielsen@gmail.com .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Pu...
Samweli/inasafe
safe/gui/tools/wizard/step_kw25_classification.py
Python
gpl-3.0
6,796
#!/usr/bin/env python # # Copyright 2005-2007,2009,2011 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (a...
n4hy/gnuradio
gr-uhd/examples/usrp_wfm_rcv.py
Python
gpl-3.0
11,057
# # Newfies-Dialer License # http://www.newfies-dialer.org # # 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/. # # Copyright (C) 2011-2014 Star2Billing S.L. # # The Initia...
gale320/newfies-dialer
newfies/dialer_cdr/tasks.py
Python
mpl-2.0
26,987
import datetime import re import requests from django.conf import settings from django.utils.timezone import make_aware, utc from raven.contrib.django.raven_compat.models import client as sentry_client def get_articles_data(count=8): payload = { 'consumer_key': settings.POCKET_CONSUMER_KEY, 'acce...
sgarrity/bedrock
bedrock/pocketfeed/api.py
Python
mpl-2.0
1,744