code
stringlengths
2
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int32
2
1.05M
from mopidy import listener class AudioListener(listener.Listener): """ Marker interface for recipients of events sent by the audio actor. Any Pykka actor that mixes in this class will receive calls to the methods defined here when the corresponding events happen in the core actor. This interfac...
kingosticks/mopidy
mopidy/audio/listener.py
Python
apache-2.0
3,210
# # 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...
Acehaidrey/incubator-airflow
tests/providers/amazon/aws/sensors/test_emr_containers.py
Python
apache-2.0
3,055
# Licensed to the StackStorm, Inc ('StackStorm') 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 use th...
dennybaa/st2
st2client/st2client/commands/policy.py
Python
apache-2.0
4,341
""" bbofuser FILE: __init__.py Created: 8/12/15 9:46 PM """ __author__ = 'Mark Scrimshire:@ekivemark'
ekivemark/BlueButtonDev
accounts/templates/accounts/messages/__init__.py
Python
apache-2.0
104
# -*- coding: utf-8 -*- # # This module (which must have the name queryfunc.py) is responsible # for converting incoming queries to a database query understood by # this particular node's database schema. # # This module must contain a function setupResults, taking a sql object # as its only argument. # # library im...
guyrixon/VAMDC-tutorials
source/tuition/build-a-node/spectroscopic/queryfunc.py
Python
bsd-2-clause
6,507
# The following script performs a database-level migration from # an old server (pre 8/1/2009) to a new server (post 8/1/2009). # # This script assumes it is running off an exact copy of the # OLD database, e.g. if a dumpscript was run and used to create # this database exactly. # # Many projects were renamed resultin...
icomms/wqmanager
utilities/data_migration/db_migration_aug_04_2009.py
Python
bsd-3-clause
7,661
from random import random from bokeh.layouts import row from bokeh.models import CustomJS, ColumnDataSource from bokeh.plotting import figure, output_file, show output_file("callback.html") x = [random() for x in range(500)] y = [random() for y in range(500)] s1 = ColumnDataSource(data=dict(x=x, y=y)) p1 = figure(p...
philippjfr/bokeh
sphinx/source/docs/user_guide/examples/interaction_callbacks_for_selections.py
Python
bsd-3-clause
1,054
from __future__ import unicode_literals import datetime import re import sys from unittest import skipIf import warnings from xml.dom.minidom import parseString try: import pytz except ImportError: pytz = None from django.core import serializers from django.core.urlresolvers import reverse from django.db.mod...
liavkoren/djangoDev
tests/timezones/tests.py
Python
bsd-3-clause
55,082
""" ====================================================================== Time-frequency on simulated data (Multitaper vs. Morlet vs. Stockwell) ====================================================================== This example demonstrates the different time-frequency estimation methods on simulated data. It shows ...
teonlamont/mne-python
examples/time_frequency/plot_time_frequency_simulated.py
Python
bsd-3-clause
8,402
""" =========================================================== A demo of K-Means clustering on the handwritten digits data =========================================================== In this example we compare the various initialization strategies for K-means in terms of runtime and quality of the results. As the gr...
manhhomienbienthuy/scikit-learn
examples/cluster/plot_kmeans_digits.py
Python
bsd-3-clause
6,808
# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 ''' Tests related to dicts. ''' import unittest import common class KeysTestCase(common.TestCase): ''' test that modules with the same name do not shadow eachother. ''' def test_dict(self): self.check('test_dict') if __name__ == '__main__...
mitar/pychecker
test/test_dict.py
Python
bsd-3-clause
343
from direct.directnotify.DirectNotifyGlobal import directNotify from direct.distributed.DistributedObjectAI import DistributedObjectAI from direct.task import Task from otp.distributed import OtpDoGlobals import random class NonRepeatableRandomSourceAI(DistributedObjectAI): notify = directNotify.newCategory('NonRe...
ksmit799/Toontown-Source
toontown/distributed/NonRepeatableRandomSourceAI.py
Python
mit
1,827
def encode(message, rails): pass def decode(encoded_message, rails): pass
smalley/python
exercises/rail-fence-cipher/rail_fence_cipher.py
Python
mit
84
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import numpy as np from hypothesis import given import hypothesis.strategies as st from caffe2.python import core from caffe2.python import workspace import caffe2.pyth...
ryfeus/lambda-packs
pytorch/source/caffe2/python/operator_test/weighted_sample_test.py
Python
mit
2,884
#!/usr/bin/env python # Copyright 2016 the V8 project 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 os import signal import subprocess import sys GCMOLE_PATH = os.path.dirname(os.path.abspath(__file__)) CLANG_BIN = os.path.jo...
MTASZTAKI/ApertusVR
plugins/languageAPI/jsAPI/3rdParty/nodejs/10.1.0/source/deps/v8/tools/gcmole/run-gcmole.py
Python
mit
924
import os.path import warnings __version__ = (0, 3, 7) def _get_git_revision(path): revision_file = os.path.join(path, 'refs', 'heads', 'master') if not os.path.exists(revision_file): return None fh = open(revision_file, 'r') try: return fh.read() finally: fh.close() def g...
hzlf/openbroadcast
website/djangoratings/__init__.py
Python
gpl-3.0
1,486
# # (c) 2017, Red Hat, Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is...
veger/ansible
lib/ansible/plugins/action/bigip_imish_config.py
Python
gpl-3.0
4,433
# Copyright (C) 2010-2014 GRNET S.A. # # 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 later version. # # This program is distributed i...
vinilios/synnefo
snf-cyclades-app/synnefo/api/faults.py
Python
gpl-3.0
1,435
#!/usr/bin/env python """ MAVProxy sailing dashboard """ from MAVProxy.modules.lib import multiproc import time class SailingDashboard(object): ''' A sailing dashboard for MAVProxy ''' def __init__(self, title="MAVProxy: Sailing Dashboard"): self.title = title # create a pipe for ...
tridge/MAVProxy
MAVProxy/modules/lib/wxsaildash.py
Python
gpl-3.0
2,264
######################################################################## # # (C) 2015, Brian Coca <bcoca@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...
benjixx/ansible
lib/ansible/galaxy/role.py
Python
gpl-3.0
12,494
# -*- coding: utf-8 -*- ############################################################################## # # Adapted by Nicolas Bessi. Copyright Camptocamp SA # Based on Florent Xicluna original code. Copyright Wingo SA # # This program is free software: you can redistribute it and/or modify # it under the te...
archetipo/server-tools
server_environment/system_info.py
Python
agpl-3.0
2,163
# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest from frappe.utils import today, add_days, getdate from erpnext.accounts.utils import get_fiscal_year from erpnext.accounts.report.financia...
indictranstech/erpnext
erpnext/accounts/doctype/subscription/test_subscription.py
Python
agpl-3.0
3,376
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tensorflow/tensorflow
tensorflow/tools/ci_build/linux/mkl/set-build-env.py
Python
apache-2.0
13,493
#!/usr/bin/env python # # Copyright 2014 Quantopian, 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 ...
erikness/AlephOne
scripts/run_algo.py
Python
apache-2.0
794
# # 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...
gemmellr/qpid-proton
tools/python/mllib/dom.py
Python
apache-2.0
7,614
# 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...
tensorflow/tensorflow
tensorflow/python/estimator/canned/parsing_utils.py
Python
apache-2.0
1,209
#!/usr/bin/env python # scapy.contrib.description = PPI # scapy.contrib.status = loads """ 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 you...
mytliulei/Scapy
scapy/contrib/gsm_um.py
Python
apache-2.0
449,096
# -*- coding: utf-8 -*- # # ufo2fdk documentation build configuration file, created by # sphinx-quickstart on Sun Jan 25 09:05:02 2009. # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't picklea...
anthrotype/ufo2fdk
documentation/source/conf.py
Python
mit
6,016
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2016 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in the h...
3v1n0/snapcraft
snapcraft/internal/states/_stage_state.py
Python
gpl-3.0
1,846
## pygame - Python Game Library ## Copyright (C) 2007 Marcus von Appen ## ## This library is free software; you can redistribute it and/or ## modify it under the terms of the GNU Library General Public ## License as published by the Free Software Foundation; either ## version 2 of the License, or (at ...
mark-me/Pi-Jukebox
venv/Lib/site-packages/pygame/surfarray.py
Python
agpl-3.0
10,257
""" This is the courseware context_processor module. This is meant to simplify the process of sending user preferences (espec. time_zone and pref-lang) to the templates without having to append every view file. """ from openedx.core.djangoapps.request_cache import get_cache from openedx.core.djangoapps.user_api.error...
BehavioralInsightsTeam/edx-platform
lms/djangoapps/courseware/context_processor.py
Python
agpl-3.0
1,626
'''Autogenerated by xml_generate script, do not edit!''' from OpenGL import platform as _p, arrays # Code generation uses this from OpenGL.raw.GL import _types as _cs # End users want this... from OpenGL.raw.GL._types import * from OpenGL.raw.GL import _errors from OpenGL.constant import Constant as _C import ctypes _...
stack-of-tasks/rbdlpy
tutorial/lib/python2.7/site-packages/OpenGL/raw/GL/ARB/shader_stencil_export.py
Python
lgpl-3.0
513
"""Config flow for MQTT.""" from collections import OrderedDict import logging import queue import voluptuous as vol from homeassistant import config_entries from homeassistant.const import ( CONF_HOST, CONF_PASSWORD, CONF_PAYLOAD, CONF_PORT, CONF_PROTOCOL, CONF_USERNAME, ) from .const import...
tboyce021/home-assistant
homeassistant/components/mqtt/config_flow.py
Python
apache-2.0
12,201
# # 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...
airbnb/airflow
tests/providers/google/cloud/operators/test_pubsub_system.py
Python
apache-2.0
1,462
# Copyright (c) 2012 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functionality ...
silkyar/570_Big_Little
src/mem/Bus.py
Python
bsd-3-clause
3,484
from __future__ import unicode_literals from django.apps import AppConfig from django.apps.registry import Apps, apps as global_apps from django.db import models from django.db.models.options import DEFAULT_NAMES, normalize_together from django.db.models.fields.related import do_pending_lookups from django.db.models.f...
domenicosolazzo/practice-django
venv/lib/python2.7/site-packages/django/db/migrations/state.py
Python
mit
14,253
import os import time interval = int(os.getenv("INTERVAL")) word = os.getenv("NAME") while 1: time.sleep(interval) print word
GolangDorks/gobox
example/test2.py
Python
mit
136
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe, unittest, json from frappe.test_runner import make_test_records_for_doctype from frappe.core.doctype.doctype.doctype import InvalidFieldNameError test_dependencies...
vqw/frappe
frappe/custom/doctype/customize_form/test_customize_form.py
Python
mit
6,711
"""Add a field for user salts Revision ID: 590a0265a5f Revises: 41a80a9e472 Create Date: 2015-05-03 10:36:23.196312 """ # revision identifiers, used by Alembic. revision = '590a0265a5f' down_revision = '41a80a9e472' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by A...
jhesketh/zookeepr
alembic/versions/590a0265a5f_.py
Python
gpl-2.0
636
# Performance test for running # # 1. Regular TriaxialTest with 3 independent dispatchers (geom, phys, constitutive law) # 2. TriaxialTest with InteractionLoop (common loop and functor cache) # # Run the test like this: # # yade-trunk-opt-multi -j1 triax-perf.table triax-perf.py # # The -j1 ensures that only 1 job w...
bcharlas/mytrunk
scripts/checks-and-tests/triax-perf/triax-perf.py
Python
gpl-2.0
856
import http_server from SOAPpy.SOAP import * Fault = faultType import string, sys Config = SOAPConfig(debug=1) class soap_handler: def __init__(self, encoding='UTF-8', config=Config, namespace=None): self.namespace = namespace self.objmap = {} self.funcmap ...
intip/da-apps
plugins/da_centrallogin/modules/soappy/contrib/soap_handler.py
Python
gpl-2.0
8,099
import sys import numpy as np import torch # torch.nn.modules useful for defining a MLIAPPY model. from lammps.mliap.pytorch import TorchWrapper, IgnoreElems # Read coefficients coeffs = np.genfromtxt("Ta06A.mliap.model",skip_header=6) # Write coefficients to a pytorch linear model bias = coeffs[0] weights = coeffs[...
jeremiahyan/lammps
examples/mliap/convert_mliap_Ta06A.py
Python
gpl-2.0
874
from django.conf.urls import patterns, url urlpatterns = patterns('nodeshot.ui.default.views', url(r'^$', 'index', name='index'), # noqa )
sephiroth6/nodeshot
nodeshot/ui/default/urls.py
Python
gpl-3.0
146
{ 'name': 'Base Kanban', 'category': 'Hidden', 'description': """ Odoo Web kanban view. ======================== """, 'version': '2.0', 'depends': ['web'], 'data' : [ 'views/web_kanban.xml', ], 'qweb' : [ 'static/src/xml/*.xml', ], 'auto_install': True }
ghandiosm/Test
addons/web_kanban/__openerp__.py
Python
gpl-3.0
312
import ocl as cam import camvtk import time import vtk import datetime if __name__ == "__main__": myscreen = camvtk.VTKScreen() myscreen.setAmbient(20,20,20) myscreen.camera.SetPosition(20, 30, 50) myscreen.camera.SetFocalPoint(5, 5, 0) stl = camvtk.STLSurf(filename="stl/demo.stl") ...
tectronics/opencamlib
scripts/kdtree_movie2.py
Python
gpl-3.0
5,564
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2015 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # This file is part of qutebrowser. # # qutebrowser 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 So...
Kingdread/qutebrowser
scripts/setupcommon.py
Python
gpl-3.0
4,251
"""Consolidate account sync status columns Revision ID: 4f57260602c9 Revises: 5143154fb1a2 Create Date: 2014-07-17 06:07:08.339740 """ # revision identifiers, used by Alembic. revision = '4f57260602c9' down_revision = '4b4c5579c083' from alembic import op import sqlalchemy as sa from bson import json_util def upg...
nylas/sync-engine
migrations/versions/057_consolidate_account_sync_status_columns.py
Python
agpl-3.0
1,396
# -*- coding: utf-8 -*- # © 2015 Antiun Ingenieria S.L. - Antonio Espinosa # © 2015 Antiun Ingenieria S.L. - Jairo Llopis # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import models, api import logging logger = logging.getLogger(__name__) class NutsImport(models.TransientModel): ...
RamonGuiuGou/l10n-spain
l10n_es_location_nuts/wizard/nuts_import.py
Python
agpl-3.0
4,129
# -*- 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...
addition-it-solutions/project-all
addons/procurement/wizard/schedulers_all.py
Python
agpl-3.0
3,388
class C(object): def method(self): pass def global_func(c): c.method() c = C() global_func(c)
Microsoft/PTVS
Python/Tests/GlassTests/PythonTests/Python/StepOut/py_mod.py
Python
apache-2.0
113
# 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...
lukeiwanski/tensorflow
tensorflow/compiler/xla/python_api/xla_literal.py
Python
apache-2.0
3,881
# Copyright 2015 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 a...
sachinpro/sachinpro.github.io
tensorflow/python/platform/resource_loader_test.py
Python
apache-2.0
1,122
from AnyQt.QtWidgets import QAction, QToolButton from .. import test from ..toolgrid import ToolGrid class TestToolGrid(test.QAppTestCase): def test_tool_grid(self): w = ToolGrid() w.show() self.app.processEvents() def buttonsOrderedVisual(): # Process layout events ...
cheral/orange3
Orange/canvas/gui/tests/test_toolgrid.py
Python
bsd-2-clause
2,931
#======================================================================= # BitStruct.py #======================================================================= from __future__ import print_function from Bits import Bits #======================================================================= # MetaBitStruct #======...
Abhinav117/pymtl
pymtl/datatypes/BitStruct.py
Python
bsd-3-clause
7,460
# stdlib import os from random import random, randrange import subprocess import sys import time import unittest import urllib as url # 3p from nose.plugins.attrib import attr # project # needed because of the subprocess calls sys.path.append(os.getcwd()) from ddagent import Application from util import Watchdog @a...
huhongbo/dd-agent
tests/core/test_watchdog.py
Python
bsd-3-clause
4,224
# Copyright (c) 2013 Paul Tagliamonte <paultag@debian.org> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modif...
gilch/hy
hy/models/complex.py
Python
mit
1,510
""" JPEG picture parser. Information: - APP14 documents http://partners.adobe.com/public/developer/en/ps/sdk/5116.DCT_Filter.pdf http://java.sun.com/j2se/1.5.0/docs/api/javax/imageio/metadata/doc-files/jpeg_metadata.html#color - APP12: http://search.cpan.org/~exiftool/Image-ExifTool/lib/Image/ExifTool/TagNames....
pwnieexpress/raspberry_pwn
src/pentest/metagoofil/hachoir_parser/image/jpeg.py
Python
gpl-3.0
14,287
# Copyright (c) 2014 Roger Light <roger@atchoo.org> # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 # and Eclipse Distribution License v1.0 which accompany this distribution. # # The Eclipse Public License is available at # ...
MrBramme/Mqtt-Hyperion-Remote
modules/paho/mqtt/publish.py
Python
mit
9,169
# encoding: UTF-8 import time from eventEngine import * from vtConstant import * ######################################################################## class VtGateway(object): """交易接口""" #---------------------------------------------------------------------- def __init__(self, eventEngine, gatewayN...
akeyong/vnpy
vn.tutorial/tick2trade/vn.trader_t2t/vtGateway.py
Python
mit
16,962
from django.contrib import admin from socialregistration.contrib.github.models import GithubProfile admin.site.register(GithubProfile)
lgapontes/django-socialregistration
socialregistration/contrib/github/admin.py
Python
mit
136
#!/usr/bin/env python # # file-torture.py - Simple torture test for file notificatins in Nautilus # Copyright (C) 2006 Federico Mena-Quintero # # 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; ei...
mssurajkaiga/nautilus-3.8.1
test/file-torture.py
Python
gpl-2.0
6,455
from tests.unit import unittest from tests.unit import AWSMockServiceTestCase from boto.vpc import VPCConnection, DhcpOptions class TestDescribeDhcpOptions(AWSMockServiceTestCase): connection_class = VPCConnection def default_body(self): return """ <DescribeDhcpOptionsResponse xmlns="ht...
harshilasu/LinkurApp
y/google-cloud-sdk/platform/gsutil/third_party/boto/tests/unit/vpc/test_dhcpoptions.py
Python
gpl-3.0
8,763
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('downloads', '0001_initial'), ] operations = [ migrations.AlterField( model_name='release', name='con...
lebronhkh/pythondotorg
downloads/migrations/0002_auto_20150416_1853.py
Python
apache-2.0
599
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
apache/incubator-airflow
airflow/migrations/versions/13eb55f81627_for_compatibility.py
Python
apache-2.0
1,136
"""0MQ Constants.""" # Copyright (c) PyZMQ Developers. # Distributed under the terms of the Modified BSD License. from zmq.backend import constants from zmq.utils.constant_names import ( base_names, switched_sockopt_names, int_sockopt_names, int64_sockopt_names, bytes_sockopt_names, fd_sockopt...
swn1/pyzmq
zmq/sugar/constants.py
Python
bsd-3-clause
2,355
#!/usr/bin/python # -*- coding: utf-8 -*- """ Ansible module to manage A10 Networks slb virtual server objects (c) 2014, Mischa Peters <mpeters@a10networks.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 publish...
lekum/ansible-modules-extras
network/a10/a10_virtual_server.py
Python
gpl-3.0
10,358
from gen import * ########## # shared # ########## flow_var[0] = """ (declare-fun tau () Real) (declare-fun x1 () Real) (declare-fun x2 () Real) (declare-fun x3 () Real) """ flow_dec[0] = """ (define-ode flow_1 ((= d/dt[x1] (* 0.015 (- 100 (+ (* (- 1 0.03) x1) (* 0.01 x2) (* 0.02 x3))))) (= d/dt...
fran-penedo/dreal
benchmarks/network/thermostat/thermostat-triple-ind.py
Python
gpl-3.0
6,756
import unittest from captcha import fields, forms, models, widgets class TestCase(unittest.TestCase): def test_something(self): raise NotImplementedError('Test not implemented. Bad developer!')
ckprice/bedrock
vendor-local/src/django-recaptcha/captcha/tests.py
Python
mpl-2.0
209
#!/usr/bin/env python # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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. ...
phenoxim/cinder
cinder/cmd/api.py
Python
apache-2.0
1,845
#! /usr/bin/env python2 """ mbed SDK Copyright (c) 2011-2013 ARM Limited 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...
nabilbendafi/mbed
workspace_tools/build.py
Python
apache-2.0
10,294
# Copyright (c) 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 # # Unles...
tylertian/Openstack
openstack F/python-novaclient/novaclient/v1_1/__init__.py
Python
apache-2.0
693
# Joint copyright: # - Copyright 2012,2013 Wikimedia Foundation # - Copyright 2012,2013 Antoine "hashar" Musso # - Copyright 2013 Arnaud Fabre # # 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 ...
dataxu/jenkins-job-builder
tests/general/test_general.py
Python
apache-2.0
973
from bokeh.core.properties import value from bokeh.io import show, output_file from bokeh.models import ColumnDataSource from bokeh.plotting import figure from bokeh.transform import dodge output_file("dodged_bars.html") fruits = ['Apples', 'Pears', 'Nectarines', 'Plums', 'Grapes', 'Strawberries'] years = ['2015', '2...
dennisobrien/bokeh
sphinx/source/docs/user_guide/examples/categorical_bar_dodged.py
Python
bsd-3-clause
1,196
""" Support for SCSGate switches. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/switch.scsgate/ """ import logging import homeassistant.components.scsgate as scsgate from homeassistant.components.switch import SwitchDevice from homeassistant.const impo...
mikaelboman/home-assistant
homeassistant/components/switch/scsgate.py
Python
mit
5,534
#!/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...
kvar/ansible
lib/ansible/modules/network/fortios/fortios_system_pppoe_interface.py
Python
gpl-3.0
13,917
""" Overrides for Docker-based devstack. """ from .devstack import * # pylint: disable=wildcard-import, unused-wildcard-import # Docker does not support the syslog socket at /dev/log. Rely on the console. LOGGING['handlers']['local'] = LOGGING['handlers']['tracking'] = { 'class': 'logging.NullHandler', } LOGGIN...
BehavioralInsightsTeam/edx-platform
cms/envs/devstack_docker.py
Python
agpl-3.0
858
from __future__ import (absolute_import, division, print_function, unicode_literals) import numpy as np from .geom import geom class geom_text(geom): DEFAULT_AES = {'alpha': None, 'angle': 0, 'color': 'black', 'family': None, 'fontface': 1, 'hjust': None, 'size': 12, 'vju...
kmather73/ggplot
ggplot/geoms/geom_text.py
Python
bsd-2-clause
2,616
# Copyright (c) 2013, Ricardo Andrade # Licensed under the BSD 3-clause license (see LICENSE.txt) import numpy as np from ..core import SparseGP from .. import likelihoods from .. import kern from ..likelihoods import likelihood from ..inference.latent_function_inference import expectation_propagation_dtc class Spar...
ptonner/GPy
GPy/models/sparse_gp_classification.py
Python
bsd-3-clause
1,855
#!/usr/bin/env python """ ================ sMRI: FSReconAll ================ This script, smri_fsreconall.py, demonstrates the ability to use the create_reconall_workflow function to create a workflow and then run it on a set of subjects and then make an average subject:: python smri_fsreconall.py For an example...
BrainIntensive/OnlineBrainIntensive
resources/nipype/nipype/examples/smri_fsreconall.py
Python
mit
2,537
# (C) British Crown Copyright 2014 - 2015, Met Office # # This file is part of Iris. # # Iris 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 l...
mo-g/iris
lib/iris/tests/unit/fileformats/grib/load_convert/test_generating_process.py
Python
gpl-3.0
2,101
# 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...
FNST-OpenStack/horizon
openstack_dashboard/contrib/sahara/content/data_processing/data_sources/views.py
Python
apache-2.0
3,628
# Enable Python coverage for subprocesses. See: # http://nedbatchelder.com/code/coverage/subprocess.html try: import coverage coverage.process_startup() except ImportError: pass
kellinm/anaconda
tests/usercustomize.py
Python
gpl-2.0
191
# coding=utf-8 from __future__ import absolute_import __author__ = "Gina Häußge <osd@foosel.net>" __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html' __copyright__ = "Copyright (C) 2015 The OctoPrint Project - Released under terms of the AGPLv3 License" import octoprint.plugin imp...
jneves/OctoPrint
src/octoprint/plugins/pluginmanager/__init__.py
Python
agpl-3.0
23,854
# 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. import sys import unittest from telemetry import decorators from telemetry.internal.platform.profiler import vtune_profiler from telemetry.testing import op...
hujiajie/chromium-crosswalk
tools/telemetry/telemetry/internal/platform/profiler/vtune_profiler_unittest.py
Python
bsd-3-clause
3,671
"""Build wheels/sdists by installing build deps to a temporary environment. """ import os import logging from pip._vendor import pytoml import shutil from subprocess import check_call import sys from sysconfig import get_paths from tempfile import mkdtemp from .wrappers import Pep517HookCaller log = logging.getLogge...
Karosuo/Linux_tools
xls_handlers/xls_sum_venv/lib/python3.6/site-packages/pip/_vendor/pep517/envbuild.py
Python
gpl-3.0
5,763
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings import oauth2client.django_orm class Migration(migrations.Migration): dependencies = [ ('auth', '0006_require_contenttypes_0002'), migrations.swappable_depend...
rakshit-agrawal/crowdsource-platform
crowdsourcing/migrations/0001_initial.py
Python
mit
30,183
from __future__ import unicode_literals from frappe import _ def get_data(): return [ { "label": _("Documents"), "icon": "icon-star", "items": [ { "type": "doctype", "name": "Web Page", "description": _("Content web page."), }, { "type": "doctype", "name": "Blog Post", ...
mbauskar/tele-frappe
frappe/config/website.py
Python
mit
2,031
# Configuration file for jointcal from lsst.meas.algorithms import LoadIndexedReferenceObjectsTask # Select external catalogs for Astrometry config.astrometryRefObjLoader.retarget(LoadIndexedReferenceObjectsTask) config.astrometryRefObjLoader.ref_dataset_name='pan-starrs' config.astrometryRefObjLoader.filterMap = { ...
DarkEnergyScienceCollaboration/ReprocessingTaskForce
config/w_2017_40/jointcalConfig.py
Python
gpl-2.0
1,208
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ USAGE: %(program)s SIZE_OF_JOBS_QUEUE Dispatcher process which orchestrates distributed LSI computations. Run this \ script onl...
duyet-website/api.duyet.net
lib/gensim/models/lsi_dispatcher.py
Python
mit
7,220
#!/usr/bin/python from TestHandler import TestHandler Test = TestHandler() test = Test # noinspection PyUnresolvedReferences import solution test.dispatch_asserts()
bionikspoon/Codewars-Challenges
python/skeleton/main.py
Python
mit
168
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, William L Thomson Jr # (c) 2013, Yap Sok Ann # Written by Yap Sok Ann <sokann@gmail.com> # Modified by William L. Thomson Jr. <wlt@o-sinc.com> # Based on apt module written by Matthew Williams <matthew@flowroute.com> # # GNU General Public License v3.0+ (see COPYIN...
thaim/ansible
lib/ansible/modules/packaging/os/portage.py
Python
mit
14,711
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Maciej Delmanowski <drybjed@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 th...
haad/ansible-modules-extras
cloud/misc/virt_net.py
Python
gpl-3.0
18,818
import os import re import unittest from collections import OrderedDict from coalib.settings.Setting import ( Setting, path, path_list, url, typed_dict, typed_list, typed_ordered_dict, glob, glob_list) from coalib.parsing.Globbing import glob_escape class SettingTest(unittest.TestCase): def test_constru...
MattAllmendinger/coala
tests/settings/SettingTest.py
Python
agpl-3.0
3,666
# Copyright: Damien Elmes <anki@ichi2.net> # -*- coding: utf-8 -*- # License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html import time, re, traceback from aqt.qt import * from anki.sync import httpCon from aqt.utils import showWarning from anki.hooks import addHook, remHook import aqt.sync # mon...
Arthaey/anki
aqt/downloader.py
Python
agpl-3.0
2,861
""" NOTE: this API is WIP and has not yet been approved. Do not use this API without talking to Christina or Andy. For more information, see: https://openedx.atlassian.net/wiki/display/TNL/User+API """ from django.db import transaction from rest_framework.views import APIView from rest_framework.response import Respon...
Emergya/icm-openedx-educamadrid-platform-basic
openedx/core/djangoapps/user_api/accounts/views.py
Python
agpl-3.0
8,229
# -*- coding: utf-8 -*- """Tests for tracking middleware.""" import ddt from django.contrib.auth.models import User from django.contrib.sessions.middleware import SessionMiddleware from django.test import TestCase from django.test.client import RequestFactory from django.test.utils import override_settings from mock im...
ahmedaljazzar/edx-platform
common/djangoapps/track/tests/test_middleware.py
Python
agpl-3.0
7,908
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2005, 2006 Zuza Software Foundation # # This file is part of translate. # # translate 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 ...
bluemini/kuma
vendor/packages/translate/tools/porestructure.py
Python
mpl-2.0
5,556
class APIField: def __init__(self, name, serializer=None): self.name = name self.serializer = serializer def __hash__(self): return hash(self.name) def __repr__(self): return '<APIField {}>'.format(self.name)
zerolab/wagtail
wagtail/api/conf.py
Python
bsd-3-clause
256
# ================================================================================================== # Copyright 2015 Twitter, Inc. # -------------------------------------------------------------------------------------------------- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use thi...
rgs1/zktraffic
zktraffic/zab/__init__.py
Python
apache-2.0
914
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models class ReportProjectTaskUser(models.Model): _inherit = "report.project.task.user" hours_planned = fields.Float('Planned Hours', readonly=True) hours_effective = fields.Float(...
ddico/odoo
addons/hr_timesheet/report/project_report.py
Python
agpl-3.0
1,036