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
# -*- 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...
jmesteve/saas3
openerp/addons/mrp/wizard/mrp_product_produce.py
Python
agpl-3.0
3,258
#!/usr/bin/python # Copyright (c) PLUMgrid, Inc. # Licensed under the Apache License, Version 2.0 (the "License") from bcc import BPF from pyroute2 import IPRoute ipr = IPRoute() text = """ int hello(struct __sk_buff *skb) { return 1; } """ try: b = BPF(text=text, debug=0) fn = b.load_func("hello", BPF.SC...
romain-intel/bcc
examples/networking/simple_tc.py
Python
apache-2.0
846
# Copyright 2015 The Bazel Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
abergmeier-dsfishlabs/bazel
tools/android/merge_manifests.py
Python
apache-2.0
15,264
#!/usr/bin/python # # Retrieve information on an existing VPC. # # import module snippets from ansible.module_utils.basic import * from ansible.module_utils.ec2 import * import boto.vpc def main(): argument_spec = ec2_argument_spec() argument_spec.update(dict( resource_tags=dict(type='dict', require...
rackn/container-networking-ansible
test/common/library/ec2_vpc_facts.py
Python
apache-2.0
1,587
from lib.base import BaseJiraAction __all__ = [ 'TransitionJiraIssueAction' ] class TransitionJiraIssueAction(BaseJiraAction): def run(self, issue_key, transition): result = self._client.transition_issue(issue_key, transition) return result
armab/st2contrib
packs/jira/actions/transition_issue.py
Python
apache-2.0
269
from mod_pywebsocket import handshake from mod_pywebsocket.handshake.hybi import compute_accept def web_socket_do_extra_handshake(request): msg = 'HTTP/1.1 101 Switching Protocols\r\n' msg += 'Upgrade: websocket\r\n' msg += 'Connection: Upgrade\r\n' msg += 'Sec-WebSocket-Accept: %s\r\n' % compute_acce...
leighpauls/k2cro4
content/test/data/layout_tests/LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-more-protocol-header_wsh.py
Python
bsd-3-clause
712
from datetime import time from django.forms import TimeInput from django.utils import translation from .base import WidgetTest class TimeInputTest(WidgetTest): widget = TimeInput() def test_render_none(self): self.check_html(self.widget, 'time', None, html='<input type="text" name="time">') de...
ar4s/django
tests/forms_tests/widget_tests/test_timeinput.py
Python
bsd-3-clause
1,641
from os import path from PyQt4 import QtGui from debug import logger import widgets class RetranslateMixin(object): def retranslateUi(self): defaults = QtGui.QWidget() widgets.load(self.__class__.__name__.lower() + '.ui', defaults) for attr, value in defaults.__dict__.iteritems(): ...
timothyparez/PyBitmessage
src/bitmessageqt/retranslateui.py
Python
mit
900
#!/usr/bin/python # # Copyright (C) 2006, 2007, 2010, 2011 Google 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 2 of the License, or # (at your option) any later version...
sarahn/ganeti
test/py/ganeti.utils.io_unittest.py
Python
gpl-2.0
36,321
#!/usr/bin/env python """ Copyright (c) 2006-2013 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ import re from lib.core.settings import WAF_ATTACK_VECTORS __product__ = "KS-WAF (Knownsec)" def detect(get_page): retval = False for vector in WAF_ATTACK_VECTORS:...
golismero/golismero
tools/sqlmap/waf/knownsec.py
Python
gpl-2.0
511
try: from setuptools import setup except: from distutils.core import setup setup( name='t', version='1.2.0', author='Steve Losh', author_email='steve@stevelosh.com', url='http://bitbucket.org/sjl/t', py_modules=['t'], entry_points={ 'console_scripts': [ 't = t:_m...
mayl/dotfiles
t/setup.py
Python
gpl-3.0
346
from __future__ import absolute_import from time import sleep from django.core.urlresolvers import reverse from django.test import TestCase from nodeshot.core.base.tests import user_fixtures from nodeshot.core.nodes.models import Node from nodeshot.ui.default import settings as local_settings from selenium import we...
PabloCastellano/nodeshot
nodeshot/ui/default/tests/selenium.py
Python
gpl-3.0
50,260
""" # b43 debugging library # # Copyright (C) 2008-2010 Michael Buesch <m@bues.ch> # # 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 hope t...
FabianKnapp/nexmon
buildtools/b43/debug/libb43.py
Python
gpl-3.0
19,793
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.internet.posixbase} and supporting code. """ from __future__ import division, absolute_import from twisted.trial.unittest import TestCase from twisted.internet.defer import Deferred from twisted.internet.posixbase import ...
Architektor/PySnip
venv/lib/python2.7/site-packages/twisted/internet/test/test_posixbase.py
Python
gpl-3.0
9,553
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
snnn/tensorflow
tensorflow/python/data/experimental/kernel_tests/serialization/dataset_serialization_test_base.py
Python
apache-2.0
25,450
from django import forms from django.core.exceptions import ImproperlyConfigured from payment import signals from payment.forms import SimplePayShipForm from payment.modules.purchaseorder.models import PurchaseOrder from satchmo_utils import app_enabled from signals_ahoy import signals class PurchaseorderPayShipForm(S...
russellmayhew/satchmo
satchmo/apps/payment/modules/purchaseorder/forms.py
Python
bsd-3-clause
1,253
# pylint: disable=missing-docstring def func(): """Test that a variable defined in a finally clause does not trigger a false positive""" try: variable = 1 yield variable finally: variable = 2 yield variable
ruchee/vimrc
vimfiles/bundle/vim-python/submodules/pylint/tests/functional/u/use/used_before_assignment_488.py
Python
mit
251
#!/usr/bin/python try: import koji except: import brew as koji import os import string import sys from optparse import OptionParser import ConfigParser config = ConfigParser.RawConfigParser() config.read(["tito.props", "rel-eng/tito.props"]) usage = "usage: %prog [options] <tag to check>" parser = OptionPars...
moio/spacewalk
rel-eng/koji-missing-builds.py
Python
gpl-2.0
2,946
# -*- coding: utf-8 -*- """ jinja.constants ~~~~~~~~~~~~~~~ Various constants. :copyright: 2007 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ #: list of lorem ipsum words used by the lipsum() helper function LOREM_IPSUM_WORDS = u'''\ a ac accumsan ad adipiscing aenean aliqu...
pam-bot/SMSBeds
lib/jinja/constants.py
Python
gpl-2.0
1,622
#!/usr/bin/env python from sciwonc.dataflow.DataStoreClient import DataStoreClient import ConfigDB_SessionCompute_3 import pprint # connector and config client = DataStoreClient("mongodb", ConfigDB_SessionCompute_3) config = ConfigDB_SessionCompute_3 # according to config dataList = client.getData() # return an array...
elainenaomi/sciwonc-dataflow-examples
dissertation2017/Experiment 2/instances/11_2_wikiflow_1sh_1s_annot/sessioncompute_3/SessionCompute_3.py
Python
gpl-3.0
2,784
# -*- coding: utf-8 -*- # # This file is part of NINJA-IDE (http://ninja-ide.org). # # NINJA-IDE 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 # any later version. # # NIN...
maxolasersquad/ninja-ide
ninja_ide/core/__init__.py
Python
gpl-3.0
712
"Base Cache class." from django.core.exceptions import ImproperlyConfigured class InvalidCacheBackendError(ImproperlyConfigured): pass class BaseCache(object): def __init__(self, params): timeout = params.get('timeout', 300) try: timeout = int(timeout) except (ValueError, ...
thomazs/geraldo
site/newsite/django_1_0/django/core/cache/backends/base.py
Python
lgpl-3.0
2,316
# 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 u...
szha/mxnet
python/mxnet/gluon/contrib/data/vision/transforms/bbox/utils.py
Python
apache-2.0
16,043
# 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 u...
Gilbert88/mesos
src/python/cli_new/lib/cli/util.py
Python
apache-2.0
13,337
# Django settings for {{ project_name }} project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 'NAME': '',...
rebost/django
django/conf/project_template/project_name/settings.py
Python
bsd-3-clause
5,206
from django.contrib.auth.models import AbstractUser from django.db.models import CharField from django.urls import reverse from django.utils.translation import ugettext_lazy as _ class User(AbstractUser): # First Name and Last Name do not cover name patterns # around the globe. name = CharField(_("Name o...
mistalaba/cookiecutter-django
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/models.py
Python
bsd-3-clause
466
# -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """Parallel workflow execution via IPython controller """ from __future__ import print_function, division, unicode_literals, absolute_import from future import standard_library stan...
carolFrohlich/nipype
nipype/pipeline/plugins/ipython.py
Python
bsd-3-clause
4,707
# Copyright (C) 2010 Google Inc. All rights reserved. # Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Szeged # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of so...
chromium/chromium
third_party/blink/tools/blinkpy/web_tests/controllers/manager_unittest.py
Python
bsd-3-clause
10,253
d = {1:'Z','y':88} assert d.__class__ == dict assert isinstance(d,dict) assert str(d)=="{1: 'Z', 'y': 88}" x = dict([['a',1],['r',2],['bg',3],['Z',4]]) y = dict(zip(['a','r','Z','bg'],[1,2,4,3])) z = {'bg':3,'Z':4,'a':1,'r':2} assert x==y assert x==z assert y==z assert x['a']==1 assert x.get('a')==1 assert x.get('uio...
amrdraz/brython
www/tests/test_dict.py
Python
bsd-3-clause
593
from __future__ import absolute_import, division, print_function import os from bcolz import ctable, carray import numpy as np from toolz import keyfilter import datashape from datashape import discover import shutil from ..numpy_dtype import dshape_to_numpy from ..append import append from ..convert import convert, o...
ContinuumIO/odo
odo/backends/bcolz.py
Python
bsd-3-clause
3,424
# Copyright 2021 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 .rule_base import RuleBase from .rule_store import RuleStore from .validator import Validator
scheib/chromium
third_party/blink/renderer/bindings/scripts/validator/framework/__init__.py
Python
bsd-3-clause
262
# -*- coding: utf-8 -*- # # Copyright 2010-2014 The pygit2 contributors # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 2, # as published by the Free Software Foundation. # # In addition to the permissions in the GNU General Public Li...
Techcable/pygit2
test/test_treebuilder.py
Python
gpl-2.0
2,526
#!/usr/bin/python # Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # Copyright (c) 2013, Benno Joy <benno@ansible.com> # # This module 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 vers...
jtyr/ansible-modules-core
cloud/openstack/os_object.py
Python
gpl-3.0
4,163
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import flt from erpnext.stock.utils import get_buying_amount, get_sales_bom_buying_amount def execute(filters=None):...
suyashphadtare/vestasi-erp-1
erpnext/erpnext/accounts/report/gross_profit/gross_profit.py
Python
agpl-3.0
4,692
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
kevin-coder/tensorflow-fork
tensorflow/python/data/experimental/ops/indexed_dataset_ops.py
Python
apache-2.0
4,824
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that app bundles are built correctly. """ from __future__ import print_function import TestGyp import TestMac import os impo...
ibc/MediaSoup
worker/deps/gyp/test/mac/gyptest-app-assets-catalog.py
Python
isc
4,164
"""SCons.Tool.icl Tool-specific initialization for the Intel C/C++ compiler. Supports Linux and Windows compilers, v7 and up. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 200...
aubreyrjones/libesp
scons_local/scons-local-2.3.0/SCons/Tool/intelc.py
Python
mit
23,079
''' This module was created to get information available in the interpreter, such as libraries, paths, etc. what is what: sys.builtin_module_names: contains the builtin modules embeeded in python (rigth now, we specify all manually). sys.prefix: A string giving the site-specific directory prefix where the platform ind...
dannyperry571/theapprentice
script.module.pydevd/lib/interpreterInfo.py
Python
gpl-2.0
8,047
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
adityacs/ansible
lib/ansible/modules/network/nxos/nxos_vtp_password.py
Python
gpl-3.0
7,998
#=============================================================================== # Copyright 2007 Matt Chaput # # 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/li...
archatas/whoosh
whoosh/store.py
Python
apache-2.0
1,132
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Cumulus Networks <ce-ceng@cumulusnetworks.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_versio...
noroutine/ansible
lib/ansible/modules/network/cumulus/_cl_bond.py
Python
gpl-3.0
15,451
# -*- 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...
stgraber/snapcraft
snapcraft/internal/states/__init__.py
Python
gpl-3.0
947
# 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. import unittest from telemetry.internal.results import story_run from telemetry.story import shared_state from telemetry.story import story_set from telemet...
XiaosongWei/chromium-crosswalk
tools/telemetry/telemetry/internal/results/story_run_unittest.py
Python
bsd-3-clause
2,653
#!/usr/bin/env python """ Install.py tool to do a generic build of a library soft linked to by many of the lib/Install.py files used to automate the steps described in the corresponding lib/README """ from __future__ import print_function import sys, os, subprocess from argparse import ArgumentParser sys.path.append...
akohlmey/lammps
lib/mesont/Install.py
Python
gpl-2.0
3,025
#!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import with_statement __license__ = 'GPL v3' __copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' import copy, zipfile from PyQt5.Qt import QAbstractItemModel, Qt, QColor, QFont, QI...
ashang/calibre
src/calibre/web/feeds/recipes/model.py
Python
gpl-3.0
14,130
#!/usr/bin/env python2 # vim:fileencoding=utf-8 from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>' from functools import partial from lxml import etree from html5lib.constant...
ashang/calibre
src/calibre/ebooks/oeb/polish/tests/parsing.py
Python
gpl-3.0
9,879
from typing import Dict class Parent: def overridable_method(self, param: str) -> Dict[str, str]: pass class Child(Parent): def overridable_method(self, param: str) -> Dict[str, str]:
smmribeiro/intellij-community
python/testData/completion/superMethodWithAnnotation.after.py
Python
apache-2.0
202
# MySQL Connector/Python - MySQL driver written in Python. # Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. # MySQL Connector/Python is licensed under the terms of the GPLv2 # <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most # MySQL Connectors. There are special exceptio...
gelab/mainr
tests/test_pooling.py
Python
gpl-2.0
14,346
# -*- coding: utf-8 -*- ''' qgscompositionchecker.py - check rendering of Qgscomposition against an expected image -------------------------------------- Date : 31 Juli 2012 Copyright : (C) 2012 by Dr. Horst Düster / Dr. Marco Hugentobler email : horst.duester@sourcepole...
AsgerPetersen/QGIS
tests/src/python/qgscompositionchecker.py
Python
gpl-2.0
2,531
import ddt from django.test.utils import override_settings from mock import MagicMock, patch from openedx.core.djangoapps.zendesk_proxy.utils import create_zendesk_ticket from openedx.core.lib.api.test_utils import ApiTestCase @ddt.ddt @override_settings( ZENDESK_URL="https://www.superrealurlsthataredefinitelyno...
ahmedaljazzar/edx-platform
openedx/core/djangoapps/zendesk_proxy/tests/test_utils.py
Python
agpl-3.0
2,179
"""Tests of email marketing signal handlers.""" import logging import ddt from django.test import TestCase from mock import patch from student.tests.factories import UserFactory from openedx.features.enterprise_support.tests.factories import EnterpriseCustomerFactory, EnterpriseCustomerUserFactory log = logging.getLo...
BehavioralInsightsTeam/edx-platform
openedx/features/enterprise_support/tests/test_signals.py
Python
agpl-3.0
1,328
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'UnsubscribeToken.modified_date' db.alter_column(u'prof...
nirmeshk/oh-mainline
mysite/profile/migrations/0097_auto__chg_field_unsubscribetoken_modified_date__del_field_citation_dis.py
Python
agpl-3.0
17,952
# Copyright 2014 Cisco Systems, 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 requir...
vbannai/neutron
neutron/db/migration/alembic_migrations/versions/24c7ea5160d7_cisco_csr_vpnaas.py
Python
apache-2.0
2,012
# -*- coding: utf-8 -*- # # 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 (a...
jmacmahon/invenio
modules/bibformat/lib/elements/bfe_year.py
Python
gpl-2.0
1,262
import asyncio import enum import logging import concurrent.futures logger = logging.getLogger("cloudbot") @enum.unique class EventType(enum.Enum): message = 0 action = 1 # TODO: Do we actually want to have a 'notice' event type? Should the NOTICE command be a 'message' type? notice = 2 join = 3 ...
jkramarz/zuombot
cloudbot/event.py
Python
gpl-3.0
15,299
from forms import Form from django.core.exceptions import ValidationError from django.utils.encoding import StrAndUnicode from django.utils.safestring import mark_safe from django.utils.translation import ugettext as _ from fields import IntegerField, BooleanField from widgets import Media, HiddenInput from util import...
MediaSapiens/autonormix
django/forms/formsets.py
Python
bsd-3-clause
14,683
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2013 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...
Lilykos/invenio
invenio/testsuite/test_utils_pagination.py
Python
gpl-2.0
2,174
# -*- coding: utf-8 -*- # Copyright (c) 2014-2016 Marcello Salvati # # 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. # ...
sechacking/MITMf
core/banners.py
Python
gpl-3.0
4,693
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
elkingtonmcb/nupic
src/regions/PictureSensorExplorers/center.py
Python
agpl-3.0
1,953
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # Copyright (C) 2016 Onestein (<http://www.onestein.eu>).
hip-odoo/odoo
addons/l10n_nl/__init__.py
Python
agpl-3.0
158
from sys import oar, baz oar
msunardi/PTVS
Python/Tests/TestData/RemoveImport/FromImport1.py
Python
apache-2.0
31
# 任務一: task1.py # 各班修課成員分組 # 分組的目的在讓修課的學員可以有組員可以討論問題, 可以分工合作, 可以互相砥礪, 或者.... # 分組的方法至少有兩種: 自己找組員, 或者由程式指定組員 # 當各組組員確定後, 為了要強迫讓分組組員能夠分散座位 (目的在強制組員間以網路系統內容進行協同) # 希望各組先依照學號以數值遞增排序, 學號序最小者為各組組員, 而各組組序, 則由各組組長在組間遞增再排序 # 學號排序最小者為第一組, 然後依遞增序確定組序. # 一旦各組組長確定後, 且各組組序確定後, 就由計算機程式依照電腦輔助設計室的座位, 採用電腦排各組員的固定座位 # 請問, 分別採用類比與數位方法進行分組...
s40523127/2017springwcm_g4
course/task1.py
Python
agpl-3.0
902
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for implementations of L{IReactorTime}. """ __metaclass__ = type from twisted.internet.test.reactormixins import ReactorBuilder class TimeTestsBuilder(ReactorBuilder): """ Builder for defining tests relating to L{IReactorTime...
waseem18/oh-mainline
vendor/packages/twisted/twisted/internet/test/test_time.py
Python
agpl-3.0
615
def gen(): yield 10 async def run(): {i async for i in <warning descr="Expected 'collections.AsyncIterable', got 'Generator[int, Any, None]' instead">gen()</warning>} [i async for i in <warning descr="Expected 'collections.AsyncIterable', got 'Generator[int, Any, None]' instead">gen()</warning>] {i: i *...
asedunov/intellij-community
python/testData/inspections/PyTypeCheckerInspection/AsyncComprehensionsOverGenerator.py
Python
apache-2.0
1,062
#!/usr/bin/python # Copyright: Ansible Project # 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', 'status': ['stableinterf...
noroutine/ansible
lib/ansible/modules/cloud/amazon/s3_lifecycle.py
Python
gpl-3.0
15,265
h1hoft = TimeSeries.fetch_open_data('H1', 'Sep 14 2015 09:50:29', 'Sep 14 2015 09:51:01') ax = plot.gca() ax.plot(h1hoft) plot.refresh()
gwpy/gwpy.github.io
docs/v0.5/timeseries/plot-4.py
Python
gpl-3.0
137
""" An example that defines two apps, one with a single hbox and one with hboxes in vboxes in hboxes. For performance testing """ import time import flexx from flexx import ui class MyApp1(ui.App): def init(self): with ui.VBox() as self.l1: ui.Button(text='Box A', flex=0) ...
almarklein/flexx
examples/ui/box_performance.py
Python
bsd-2-clause
4,634
# Authors: Fabian Pedregosa <fabian@fseoane.net> # Alexandre Gramfort <alexandre.gramfort@inria.fr> # Nelle Varoquaux <nelle.varoquaux@gmail.com> # License: BSD 3 clause import numpy as np from scipy import interpolate from scipy.stats import spearmanr from .base import BaseEstimator, TransformerMixi...
mbayon/TFG-MachineLearning
venv/lib/python3.6/site-packages/sklearn/isotonic.py
Python
mit
14,061
############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Publ...
Jgarcia-IAS/Fidelizacion_odoo
openerp/addons/auth_ldap/users_ldap.py
Python
agpl-3.0
10,747
# 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.core import exceptions from telemetry.internal.actions import media_action from telemetry.internal.actions import page_action class LoadMedi...
js0701/chromium-crosswalk
tools/telemetry/telemetry/internal/actions/load_media.py
Python
bsd-3-clause
1,508
from __future__ import unicode_literals from django.db.models.signals import pre_save, post_save from django.test import TestCase from .models import Person, Employee, ProxyEmployee, Profile, Account class UpdateOnlyFieldsTests(TestCase): def test_update_fields_basic(self): s = Person.objects.create(nam...
webostin/django-btc
tests/update_only_fields/tests.py
Python
bsd-3-clause
9,780
# # Copyright 2010-2012 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 (at your option) # any later version...
courtarro/gnuradio
gr-utils/python/modtool/gr-newmod/docs/doxygen/swig_doc.py
Python
gpl-3.0
11,634
from __future__ import division from sympy import (Abs, Catalan, cos, Derivative, E, EulerGamma, exp, factorial, factorial2, Function, GoldenRatio, I, Integer, Integral, Interval, Lambda, Limit, Matrix, nan, O, oo, pi, Rational, Float, Rel, S, sin, SparseMatrix, sqrt, summation, Sum, Symbol, symbols, Wild,...
grevutiu-gabriel/sympy
sympy/printing/tests/test_str.py
Python
bsd-3-clause
22,751
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: Ansible Project # 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', ...
e-gob/plataforma-kioscos-autoatencion
scripts/ansible-play/.venv/lib/python2.7/site-packages/ansible/modules/monitoring/bigpanda.py
Python
bsd-3-clause
5,763
#!/usr/bin/env python import os import sys if __name__ == "__main__": PROJECT_ROOT = os.path.realpath(os.path.dirname(__file__)) sys.path.insert(0, os.path.join(PROJECT_ROOT, os.pardir)) os.environ.setdefault("DJANGO_SETTINGS_MODULE", "demo.settings") from django.core.management import execute_from_c...
vincent-fei/django-xadmin
demo_app/manage.py
Python
bsd-3-clause
373
from datetime import tzinfo, timedelta, datetime ZERO = timedelta(0) HOUR = timedelta(hours=1) # A UTC class. class UTC(tzinfo): """UTC""" def utcoffset(self, dt): return ZERO def tzname(self, dt): return "UTC" def dst(self, dt): return ZERO utc = UTC() # A class building...
MicroTrustRepos/microkernel
src/l4/pkg/python/contrib/Doc/includes/tzinfo-examples.py
Python
gpl-2.0
5,063
# # Copyright 2018 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. # # Ansibl...
alxgu/ansible
lib/ansible/plugins/action/netconf.py
Python
gpl-3.0
3,577
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from . import note
ddico/odoo
addons/note/controllers/__init__.py
Python
agpl-3.0
118
#!/usr/bin/env python ''' simple templating system for mavlink generator Copyright Andrew Tridgell 2011 Released under GNU GPL version 3 or later ''' from mavparse import MAVParseError class MAVTemplate(object): '''simple templating system''' def __init__(self, start_var_token="...
kd0aij/matrixpilot_old
Tools/MAVLink/mavlink/pymavlink/generator/mavtemplate.py
Python
gpl-3.0
5,130
#!/usr/bin/python """ Copyright 2014 Cisco Systems, 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...
charlesporter/incubator-metron
metron-platform/metron-data-management/src/main/scripts/Whois_CSV_to_JSON.py
Python
apache-2.0
8,130
def do_something(): for i in range(100): print(i)
jkorell/PTVS
Python/Tests/TestData/DebuggerProject/A/module1.py
Python
apache-2.0
67
"""Compressed Sparse Row matrix format""" from __future__ import division, print_function, absolute_import __docformat__ = "restructuredtext en" __all__ = ['csr_matrix', 'isspmatrix_csr'] import numpy as np from scipy._lib.six import xrange from ._sparsetools import csr_tocsc, csr_tobsr, csr_count_blocks, \ ...
valexandersaulys/airbnb_kaggle_contest
venv/lib/python3.4/site-packages/scipy/sparse/csr.py
Python
gpl-2.0
14,549
"""MiniAEFrame - A minimal AppleEvent Application framework. There are two classes: AEServer -- a mixin class offering nice AE handling. MiniApplication -- a very minimal alternative to FrameWork.py, only suitable for the simplest of AppleEvent servers. """ from warnings import warnpy3k warnpy3k("In 3...
teeple/pns_server
work/install/Python-2.7.4/Lib/plat-mac/MiniAEFrame.py
Python
gpl-2.0
6,519
# template.py # Copyright (C) 2006, 2007, 2008 Michael Bayer mike_mp@zzzcomputing.com # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """provides the Template class, a facade for parsing, generating and executing template strings, as well as t...
appcelerator/titanium_mobile_tooling
thirdparty/mako/template.py
Python
apache-2.0
12,077
# 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 u...
scalingdata/Impala
thirdparty/hive-1.2.1.2.3.0.0-2557/lib/py/thrift/reflection/__init__.py
Python
apache-2.0
807
"""Random variable generators. integers -------- uniform within range sequences --------- pick random element pick random sample generate random permutation distributions on the real line: ------------------------------ uniform ...
DmitryADP/diff_qc750
vendor/nvidia/tegra/3rdparty/python-support-files/src/Lib/random.py
Python
gpl-2.0
31,938
""" Utility methods common to Studio and the LMS. """ from bok_choy.promise import EmptyPromise from ...tests.helpers import disable_animations def wait_for_notification(page): """ Waits for the "mini-notification" to appear and disappear on the given page (subclass of PageObject). """ def _is_saving(...
simbs/edx-platform
common/test/acceptance/pages/common/utils.py
Python
agpl-3.0
2,910
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import import re import sys from pkg_resources import compatible_platforms, get_supported_platform class Platform(object): class UnknownPlatformError(...
cliffyg/heron
third_party/pex/pex/platforms.py
Python
apache-2.0
2,387
"""JOSE Base64. `JOSE Base64`_ is defined as: - URL-safe Base64 - padding stripped .. _`JOSE Base64`: https://tools.ietf.org/html/draft-ietf-jose-json-web-signature-37#appendix-C .. Do NOT try to call this module "base64", as it will "shadow" the standard library. """ import base64 import six def b6...
nohona/cron-crm
usr/local/certbot/acme/acme/jose/b64.py
Python
gpl-3.0
1,523
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class AboutUsSettings(Document): def on_update(self): from fra...
indautgrp/frappe
frappe/website/doctype/about_us_settings/about_us_settings.py
Python
mit
468
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, serge van Ginderachter <serge@vanginderachter.be> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either vers...
amir343/ansible-modules-extras
network/f5/bigip_monitor_tcp.py
Python
gpl-3.0
16,428
from datetime import datetime def foo(p): """Foo :param datetime p: a datetime <ref> """
asedunov/intellij-community
python/testData/resolve/ReferenceInDocstring.py
Python
apache-2.0
114
"""Routines related to PyPI, indexes""" from __future__ import absolute_import import logging import cgi from collections import namedtuple import itertools import sys import os import re import mimetypes import posixpath import warnings from pip._vendor.six.moves.urllib import parse as urllib_parse from pip._vendor....
zwChan/VATEC
~/eb-virt/Lib/site-packages/pip/index.py
Python
apache-2.0
37,235
import bench def test(num): for i in iter(range(num//10000)): l = [0] * 1000 l2 = tuple(l) bench.run(test)
trezor/micropython
tests/internal_bench/from_iter-3-tuple_bound.py
Python
mit
129
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Bar', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False,...
nesdis/djongo
tests/django_tests/tests/v22/tests/admin_scripts/app_waiting_migration/migrations/0001_initial.py
Python
agpl-3.0
434
# -*- coding: utf-8 -*- from openerp.osv import orm, fields def selection_fn(obj, cr, uid, context=None): return list(enumerate(["Corge", "Grault", "Wheee", "Moog"])) def function_fn(model, cr, uid, ids, field_name, arg, context): return dict((id, 3) for id in ids) def function_fn_write(model, cr, uid, id, f...
diogocs1/comps
web/openerp/addons/test_impex/models.py
Python
apache-2.0
5,891
from __future__ import absolute_import import logging try: # Python 3 from urllib.parse import urljoin except ImportError: from urlparse import urljoin from ._collections import RecentlyUsedContainer from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool from .connectionpool import port_by_schem...
zwChan/VATEC
~/eb-virt/Lib/site-packages/pip/_vendor/requests/packages/urllib3/poolmanager.py
Python
apache-2.0
9,614
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # # Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved. # # This program is free software: you can redistribute it and/or modify # it u...
diogocs1/comps
web/addons/l10n_be_coda/__init__.py
Python
apache-2.0
1,105
from django.core.management.base import BaseCommand, CommandError from xmodule.contentstore.utils import restore_asset_from_trashcan class Command(BaseCommand): help = '''Restore a deleted asset from the trashcan back to it's original course''' def handle(self, *args, **options): if len(args) != 1 an...
htzy/bigfour
cms/djangoapps/contentstore/management/commands/restore_asset_from_trashcan.py
Python
agpl-3.0
480
""" :class:`~xblock.field_data.FieldData` subclasses used by the LMS """ from xblock.field_data import ReadOnlyFieldData, SplitFieldData from xblock.fields import Scope class LmsFieldData(SplitFieldData): """ A :class:`~xblock.field_data.FieldData` that reads all UserScope.ONE and UserScope.ALL fields fr...
angelapper/edx-platform
lms/djangoapps/lms_xblock/field_data.py
Python
agpl-3.0
1,403