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
# Copyright (C) 2013 Claudio "nex" Guarnieri (@botherder) # # 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 pro...
0x00ach/zer0m0n
signatures/network_irc.py
Python
gpl-3.0
1,128
"""Deprecated import support. Auto-generated by import_shims/generate_shims.sh.""" # pylint: disable=redefined-builtin,wrong-import-position,wildcard-import,useless-suppression,line-too-long from import_shims.warn import warn_deprecated_import warn_deprecated_import('course_action_state.tests.test_rerun_manager', 'co...
eduNEXT/edunext-platform
import_shims/studio/course_action_state/tests/test_rerun_manager.py
Python
agpl-3.0
461
# Copyright 2008-2015 Canonical # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distributed...
zhsso/ubunto-one
src/backends/db/schemas/txlog/patch_4.py
Python
agpl-3.0
1,421
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import loggi...
sivakuna-aap/superdesk
server/apps/ldap/commands.py
Python
agpl-3.0
2,913
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RTriebeard(RPackage): """triebeard: 'Radix' Trees in 'Rcpp'""" homepage = "https://gi...
LLNL/spack
var/spack/repos/builtin/packages/r-triebeard/package.py
Python
lgpl-2.1
652
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyEpydoc(PythonPackage): """Epydoc is a tool for generating API documentation documentatio...
LLNL/spack
var/spack/repos/builtin/packages/py-epydoc/package.py
Python
lgpl-2.1
516
# coding: utf-8 from __future__ import unicode_literals import hashlib import math import random import time import uuid from .common import InfoExtractor from ..compat import compat_urllib_parse from ..utils import ExtractorError class IqiyiIE(InfoExtractor): IE_NAME = 'iqiyi' IE_DESC = '爱奇艺' _VALID_U...
atomic83/youtube-dl
youtube_dl/extractor/iqiyi.py
Python
unlicense
9,558
"""Support for WeMo switches.""" import asyncio import logging from datetime import datetime, timedelta import requests import async_timeout from homeassistant.components.switch import SwitchDevice from homeassistant.exceptions import PlatformNotReady from homeassistant.util import convert from homeassistant.const im...
MartinHjelmare/home-assistant
homeassistant/components/wemo/switch.py
Python
apache-2.0
8,674
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License, Ve...
sparkslabs/kamaelia_
Sketches/MPS/BugReports/FixTests/Kamaelia/Kamaelia/Apps/Games4Kids/BasicSprite.py
Python
apache-2.0
3,562
#!/usr/bin/env python3 # Copyright 2015 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 ...
ctiller/grpc
tools/run_tests/lb_interop_tests/gen_build_yaml.py
Python
apache-2.0
12,124
# 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 # d...
olivierlemasle/murano
murano/common/i18n.py
Python
apache-2.0
1,149
import pytest import aiohttp from aiohttp import web @pytest.mark.run_loop async def test_client_ws_async_for(loop, create_server): items = ['q1', 'q2', 'q3'] async def handler(request): ws = web.WebSocketResponse() await ws.prepare(request) for i in items: ws.send_str(i)...
jashandeep-sohi/aiohttp
tests/test_py35/test_client_websocket_35.py
Python
apache-2.0
1,892
"""Test Agent DVR integration.""" from unittest.mock import AsyncMock, patch from agent import AgentError from homeassistant.components.agent_dvr.const import DOMAIN from homeassistant.config_entries import ConfigEntryState from homeassistant.core import HomeAssistant from . import CONF_DATA, create_entry from test...
jawilson/home-assistant
tests/components/agent_dvr/test_init.py
Python
apache-2.0
1,876
''' Copyright 2017 Dell Inc. or its subsidiaries. All Rights Reserved. Author(s): George Paulos This script tests minimum payload base case of the RackHD API 2.0 OS bootstrap workflows using NFS mount or local repo method. This routine runs OS bootstrap jobs simultaneously on multiple nodes. For 12 tests to run, 12 n...
uppalk1/RackHD
test/tests/bootstrap/test_api20_os_bootstrap_parallel_local.py
Python
apache-2.0
14,582
# Copyright (c) Metaswitch Networks 2015. All rights reserved. import logging from calico.felix.actor import Actor, actor_message from calico.felix.futils import IPV4, IPV6 from calico.felix.ipsets import Ipset, FELIX_PFX _log = logging.getLogger(__name__) ALL_POOLS_SET_NAME = FELIX_PFX + "all-ipam-pools" MASQ_POOL...
alexhersh/calico
calico/felix/masq.py
Python
apache-2.0
4,208
# Copyright 2016 Intel Corporation # Copyright 2015 Hewlett Packard Development Company, LP # Copyright 2015 Universidade Federal de Campina Grande # # 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 t...
SauloAislan/ironic
ironic/conf/oneview.py
Python
apache-2.0
2,255
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2012-2014 Alex Forencich 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...
elopezga/ErrorRate
ivi/agilent/agilentDSA91204A.py
Python
mit
1,632
''' FFmpeg video abstraction ======================== .. versionadded:: 1.0.8 This abstraction requires ffmpeg python extensions. We have made a special extension that is used for the android platform but can also be used on x86 platforms. The project is available at:: http://github.com/tito/ffmpeg-android The ...
Cheaterman/kivy
kivy/core/video/video_ffmpeg.py
Python
mit
2,694
def test(): for i in xrange(int(5e3)): t = [] for j in xrange(int(1e4)): #t[j] = 'x' t.append('x') t = ''.join(t) test()
svaarala/duktape
tests/perf/test-string-array-concat.py
Python
mit
174
# Frame-filter commands. # Copyright (C) 2013-2019 Free Software Foundation, 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 License, or # (at your option) any late...
OpenSmalltalk/vm
processors/ARM/gdb-8.3.1/gdb/python/lib/gdb/command/frame_filters.py
Python
mit
16,256
#!/usr/bin/env python3 # encoding: utf-8 """ This parser uses the --preprocess option of wesnoth so a working wesnoth executable must be available at runtime if the WML to parse contains preprocessing directives. Pure WML can be parsed as is. For example: wml = "" [unit] id=elve name=Elve ...
spixi/wesnoth
data/tools/wesnoth/wmlparser3.py
Python
gpl-2.0
27,879
#!/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...
simonwydooghe/ansible
lib/ansible/modules/network/fortios/fortios_firewall_ssl_server.py
Python
gpl-3.0
15,241
# encoding: utf-8 import datetime from south.db import db from south.v2 import DataMigration from django.db import models from django.contrib.auth.models import User from account.models import Account class Migration(DataMigration): def forwards(self, orm): # we need to associate each user to an account o...
GISPPU/GrenadaLandInformation
geonode/people/migrations/0003_link_users_to_account.py
Python
gpl-3.0
10,196
"""Support for ZHA covers.""" from __future__ import annotations import asyncio import functools import logging from zigpy.zcl.foundation import Status from homeassistant.components.cover import ( ATTR_CURRENT_POSITION, ATTR_POSITION, DEVICE_CLASS_DAMPER, DEVICE_CLASS_SHADE, DOMAIN, CoverEnti...
lukas-hetzenecker/home-assistant
homeassistant/components/zha/cover.py
Python
apache-2.0
10,222
#!/usr/bin/env python3 # 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 "Lic...
welikecloud/bigtop
bigtop-packages/src/charm/mahout/layer-mahout/tests/01-mahout-test.py
Python
apache-2.0
2,393
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012, Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
tylertian/Openstack
openstack F/nova/nova/tests/cert/test_rpcapi.py
Python
apache-2.0
3,147
# -*- coding: utf-8 -*- # Copyright 2011 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 require...
fishjord/gsutil
gslib/commands/rm.py
Python
apache-2.0
15,054
#!/usr/bin/env python ''' Interact with Trello API as a CLI or Sopel IRC bot module ''' import argparse from datetime import date from email.mime.text import MIMEText import json import os import re import smtplib import sys # sopel is only for IRC bot installation. Not required for CLI try: import sopel.module ...
appuio/ansible-role-openshift-zabbix-monitoring
vendor/openshift-tools/openshift_tools/ircbot/trello/trello.py
Python
apache-2.0
16,279
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc from grpc.framework.common import cardinality from grpc.framework.interfaces.face import utilities as face_utilities import google.cloud.proto.logging.v2.logging_metrics_pb2 as google_dot_cloud_dot_proto_dot_logging_dot_v2_dot_logging__m...
eoogbe/api-client-staging
generated/python/proto-google-cloud-logging-v2/google/cloud/proto/logging/v2/logging_metrics_pb2_grpc.py
Python
bsd-3-clause
5,957
''' Test idlelib.debugger. Coverage: 19% ''' from idlelib import debugger from test.support import requires requires('gui') import unittest from tkinter import Tk class NameSpaceTest(unittest.TestCase): @classmethod def setUpClass(cls): cls.root = Tk() cls.root.withdraw() @classmethod ...
yotchang4s/cafebabepy
src/main/python/idlelib/idle_test/test_debugger.py
Python
bsd-3-clause
533
#!/usr/bin/env python '''Test RGBA load using the platform decoder (QuickTime, Quartz, GDI+ or Gdk). You should see the rgba.png image on a checkboard background. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import unittest import base_load import sys if sys.platform == 'linux2': ...
mpasternak/pyglet-fix-issue-518-522
tests/image/PLATFORM_RGBA_LOAD.py
Python
bsd-3-clause
963
#!/usr/bin/python # # Copyright 2016 Red Hat | Ansible # # 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 la...
ColOfAbRiX/ansible
lib/ansible/modules/cloud/docker/docker_image.py
Python
gpl-3.0
21,614
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Cloudbase Solutions Srl # 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.ap...
ntt-sic/nova
nova/tests/virt/hyperv/test_vmutils.py
Python
apache-2.0
2,546
# Copyright 2011 OpenStack LLC # 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...
nii-cloud/dodai-compute
nova/db/sqlalchemy/migrate_repo/versions/007_add_ipv6_to_fixed_ips.py
Python
apache-2.0
2,067
#!/usr/bin/env python """ Copyright (c) 2004-Present Pivotal Software, Inc. This program and the accompanying materials are made available under the terms of the 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...
edespino/gpdb
src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/basebackup/test_xlog_cleanup.py
Python
apache-2.0
4,635
"""Test inter-conversion of different polynomial classes. This tests the convert and cast methods of all the polynomial classes. """ import operator as op from numbers import Number import pytest import numpy as np from numpy.polynomial import ( Polynomial, Legendre, Chebyshev, Laguerre, Hermite, HermiteE) from ...
anntzer/numpy
numpy/polynomial/tests/test_classes.py
Python
bsd-3-clause
18,331
from django.conf.global_settings import PASSWORD_HASHERS from django.contrib.auth import get_user_model from django.contrib.auth.hashers import get_hasher from django.contrib.auth.models import ( AbstractUser, Group, Permission, User, UserManager, ) from django.contrib.contenttypes.models import ContentType from dj...
vincepandolfo/django
tests/auth_tests/test_models.py
Python
bsd-3-clause
10,053
# encoding: UTF-8 from eventEngine import * # 默认空值 EMPTY_STRING = '' EMPTY_UNICODE = u'' EMPTY_INT = 0 EMPTY_FLOAT = 0.0 # 方向常量 DIRECTION_NONE = u'无方向' DIRECTION_LONG = u'多' DIRECTION_SHORT = u'空' DIRECTION_UNKNOWN = u'未知' DIRECTION_NET = u'净' # 开平常量 OFFSET_NONE = u'无开平' OFFSET_OPEN = u'开仓' OFFSET_CLOSE = u'平仓' OFF...
drongh/vnpy
vn.trader/gateway.py
Python
mit
14,192
""" Internal subroutines for e.g. aborting execution with an error message, or performing indenting on multiline output. """ import sys import textwrap def abort(msg): """ Abort execution, print ``msg`` to stderr and exit with error status (1.) This function currently makes use of `sys.exit`_, which rais...
apavlo/h-store
third_party/python/fabric/utils.py
Python
gpl-3.0
4,636
import unittest, time, sys, random, math, getpass sys.path.extend(['.','..','../..','py']) import h2o, h2o_cmd, h2o_import as h2i, h2o_util, h2o_browse as h2b, h2o_print as h2p import h2o_summ DO_TRY_SCIPY = False if getpass.getuser()=='kevin' or getpass.getuser()=='jenkins': DO_TRY_SCIPY = True DO_MEDIAN = True ...
rowhit/h2o-2
py/testdir_single_jvm/test_summary2_unifiles.py
Python
apache-2.0
10,223
### # Copyright (c) 2002-2005, Jeremiah Fincher # 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 co...
buildbot/supybot
test/test_ircmsgs.py
Python
bsd-3-clause
10,535
# Copyright 2017 The Sonnet Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
mumuwoyou/vnpy-master
sonnet/python/modules/spatial_transformer.py
Python
mit
23,304
####################################################################### # # Author: Gabi Roeger # Modified by: Silvia Richter (silvia.richter@nicta.com.au) # (C) Copyright 2008: Gabi Roeger and NICTA # # This file is part of LAMA. # # LAMA is free software; you can redistribute it and/or # modify it under the terms of ...
PlanTool/plantool
wrappingPlanners/Deterministic/LAMA/seq-sat-lama/lama/translate/pddl/f_expression.py
Python
gpl-2.0
5,321
import os from flask import Flask, render_template_string, request from flask_mail import Mail from flask_sqlalchemy import SQLAlchemy from flask_user import login_required, SQLAlchemyAdapter, UserManager, UserMixin from flask_user import roles_required # Use a Class-based config to avoid needing a 2nd file # os.gete...
jamescarignan/Flask-User
example_apps/user_auth_app.py
Python
bsd-2-clause
6,986
"""distutils.cygwinccompiler Provides the CygwinCCompiler class, a subclass of UnixCCompiler that handles the Cygwin port of the GNU C compiler to Windows. It also contains the Mingw32CCompiler class which handles the mingw32 port of GCC (same as cygwin in no-cygwin mode). """ # problems: # # * if you use a msvc com...
xyuanmu/XX-Net
python3.8.2/Lib/distutils/cygwinccompiler.py
Python
bsd-2-clause
16,478
# # This file is part of pyasn1 software. # # Copyright (c) 2005-2017, Ilya Etingof <etingof@gmail.com> # License: http://pyasn1.sf.net/license.html # from pyasn1.type import univ from pyasn1.codec.cer import decoder __all__ = ['decode'] class BitStringDecoder(decoder.BitStringDecoder): supportConstructedForm = ...
saurabhbajaj207/CarpeDiem
venv/Lib/site-packages/pyasn1/codec/der/decoder.py
Python
mit
2,169
# SPDX-License-Identifier: GPL-2.0 # Copyright (c) 2015 Stephen Warren # Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved. import pytest import u_boot_utils @pytest.mark.buildconfigspec('cmd_memory') def test_md(u_boot_console): """Test that md reads memory as expected, and that memory can be modi...
Digilent/u-boot-digilent
test/py/tests/test_md.py
Python
gpl-2.0
1,426
# -*- coding: utf-8 -*- import sys import json import binascii import xbmc from lib.yd_private_libs import util, servicecontrol, jsonqueue sys.path.insert(0, util.MODULE_PATH) import YDStreamExtractor # noqa E402 import threading # noqa E402 class Service(xbmc.Monitor): def __init__(self): self.download...
mrquim/mrquimrepo
script.module.youtube.dl/service.py
Python
gpl-2.0
2,091
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This sphinx extension builds off of `sphinx.ext.autosummary` to clean up some issues it presents in the Astropy docs. The main issue this fixes is the summary tables getting cut off before the end of the sentence in some cases. Note: Sphinx 1.2 appea...
Jerryzcn/Mmani
doc/sphinxext/numpy_ext/astropyautosummary.py
Python
bsd-2-clause
3,983
""" Python Character Mapping Codec cp437 generated from 'VENDORS/MICSFT/PC/CP437.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,input,errors='strict...
Microvellum/Fluid-Designer
win64-vc/2.78/python/lib/encodings/cp437.py
Python
gpl-3.0
34,564
# (c)2016 Andrew Zenk <azenk@umn.edu> # # 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. # # ...
roadmapper/ansible
test/units/plugins/lookup/test_lastpass.py
Python
gpl-3.0
6,829
""" Tests for course_info """ from django.test.utils import override_settings from django.core.urlresolvers import reverse from rest_framework.test import APITestCase from xmodule.modulestore.tests.factories import CourseFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from courseware.test...
c0710204/edx-platform
lms/djangoapps/mobile_api/course_info/tests.py
Python
agpl-3.0
1,679
def main(): with open('file.txt'): print(42)
smmribeiro/intellij-community
python/testData/quickFixes/PyRemoveUnusedLocalQuickFixTest/withOneTarget_after.py
Python
apache-2.0
56
# Copyright 2016 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 writing...
quizlet/grpc
src/python/grpcio/grpc/_auth.py
Python
apache-2.0
2,543
# 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 agreed ...
jdanbrown/pydatalab
google/datalab/bigquery/commands/__init__.py
Python
apache-2.0
679
"""Tables, Widgets, and Groups! An example of tables and most of the included widgets. """ import pygame from pygame.locals import * # the following line is not needed if pgu is installed import sys; sys.path.insert(0, "..") from pgu import gui # Load an alternate theme to show how it is done. You can also # speci...
danstoner/python_experiments
pgu/examples/gui5.py
Python
gpl-2.0
1,996
# simple __init__.py from .pidSVG import *
ptosco/rdkit
rdkit/sping/SVG/__init__.py
Python
bsd-3-clause
44
#!/usr/bin/env python # # asn2wrs.py # ASN.1 to Wireshark dissector compiler # Copyright 2004 Tomas Kukosa # # 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 # ...
weinrank/wireshark
tools/asn2wrs.py
Python
gpl-2.0
308,942
#!/usr/bin/python # Generate GLib GInterfaces from the Telepathy specification. # The master copy of this program is in the telepathy-glib repository - # please make any changes there. # # Copyright (C) 2006, 2007 Collabora Limited # # This library is free software; you can redistribute it and/or # modify it under the...
JGulic/empathy
tools/glib-gtypes-generator.py
Python
gpl-2.0
12,522
# -*- coding: utf-8 -*- import json from odoo import fields def monkey_patch(cls): """ Return a method decorator to monkey-patch the given class. """ def decorate(func): name = func.__name__ func.super = getattr(cls, name, None) setattr(cls, name, func) return func return...
Aravinthu/odoo
addons/base_sparse_field/models/fields.py
Python
agpl-3.0
2,668
#!/usr/bin/env python # Copyright 2015 Netflix, 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 requ...
Netflix/sleepy-puppy
manage.py
Python
apache-2.0
7,364
# encoding: utf-8 from django.core.management.base import NoArgsCommand from optparse import make_option from video.management.commands.sub_commands.AddVideo import AddVideo class Command(NoArgsCommand): option_list = NoArgsCommand.option_list + ( make_option('--video-link',action='store',dest='video-lin...
noamelf/Open-Knesset
video/management/commands/add_video.py
Python
bsd-3-clause
1,246
#!/usr/bin/env python # File created on 20 Feb 2013 from __future__ import division __author__ = "Greg Caporaso" __copyright__ = "Copyright 2011, The QIIME project" __credits__ = ["Greg Caporaso", "Kyle Bittinger", "Justin Kuczynski", "Jai Ram Rideout"] __license__ = "GPL" __version__ = "1.9.1-dev" __ma...
adamrp/qiime
qiime/workflow/upstream.py
Python
gpl-2.0
19,937
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2016 Martine Lenders <mail@martine-lenders.eu> # # Distributed under terms of the MIT license. from __future__ import print_function import os import sys import random import subprocess import time import types import pexpect DEFAULT_TIM...
BytesGalore/RIOT
tests/lwip/tests/01-run.py
Python
lgpl-2.1
11,453
# 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...
tornadozou/tensorflow
tensorflow/python/keras/applications/__init__.py
Python
apache-2.0
1,675
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE...
ntt-sic/neutron
neutron/db/migration/alembic_migrations/versions/53bbd27ec841_extra_dhcp_opts_supp.py
Python
apache-2.0
2,051
# 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...
Mistobaan/tensorflow
tensorflow/contrib/distributions/python/ops/half_normal.py
Python
apache-2.0
5,678
import sys, copy from itertools import * import benchbase from benchbase import (with_attributes, with_text, onlylib, serialized, children, nochange) ############################################################ # Benchmarks ############################################################ class Ben...
mhnatiuk/phd_sociology_of_religion
scrapper/build/lxml/benchmark/bench_objectify.py
Python
gpl-2.0
3,322
# Copyright 2013, Big Switch Networks, 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...
wangxiangyu/horizon
openstack_dashboard/dashboards/project/firewalls/forms.py
Python
apache-2.0
16,187
# -*- coding: utf-8 -*- # Tests for the contrib/localflavor/ CZ Form Fields tests = r""" # CZPostalCodeField ######################################################### >>> from django.contrib.localflavor.cz.forms import CZPostalCodeField >>> f = CZPostalCodeField() >>> f.clean('84545x') Traceback (most recent call las...
Smarsh/django
tests/regressiontests/forms/localflavor/cz.py
Python
bsd-3-clause
4,319
"""passlib.ext.django.models -- monkeypatch django hashing framework""" #============================================================================= # imports #============================================================================= # core import logging; log = logging.getLogger(__name__) from warnings import wa...
charukiewicz/beer-manager
venv/lib/python3.4/site-packages/passlib/ext/django/models.py
Python
mit
12,558
# coding=utf-8 """ The NetworkCollector class collects metrics on network interface usage using /proc/net/dev. #### Dependencies * /proc/net/dev """ import diamond.collector from diamond.collector import str_to_bool import diamond.convertor import os import re try: import psutil except ImportError: psuti...
dcsquared13/Diamond
src/collectors/network/network.py
Python
mit
4,536
# Copyright 2015 Abhijit Menon-Sen <ams@2ndQuadrant.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 ...
tux-00/ansible
test/units/inventory/test_inventory.py
Python
gpl-3.0
5,504
import unittest from scrapy.contrib.downloadermiddleware.redirect import RedirectMiddleware from scrapy.spider import BaseSpider from scrapy.exceptions import IgnoreRequest from scrapy.http import Request, Response, HtmlResponse, Headers class RedirectMiddlewareTest(unittest.TestCase): def setUp(self): s...
mzdaniel/oh-mainline
vendor/packages/scrapy/scrapy/tests/test_downloadermiddleware_redirect.py
Python
agpl-3.0
7,244
import unittest class StringProcessingTestBase(unittest.TestCase): # The backslash character. Needed since there are limitations when # using backslashes at the end of raw-strings in front of the # terminating " or '. bs = "\\" # Basic test strings all StringProcessing functions should test. ...
yland/coala
tests/parsing/StringProcessing/StringProcessingTestBase.py
Python
agpl-3.0
5,848
# Copyright (c) 2018 Cisco and/or its affiliates. # # 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 v...
Jorge-Rodriguez/ansible
test/units/modules/network/ftd/test_ftd_configuration.py
Python
gpl-3.0
5,145
# -*- coding: utf-8 -*- # Copyright (C) 2006-2010 Søren Roug, European Environment Agency # # 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 you...
ashang/calibre
src/odf/opendocument.py
Python
gpl-3.0
26,274
# (c) 2014 Michael DeHaan, <michael@ansible.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ve...
andmos/ansible
lib/ansible/playbook/role/metadata.py
Python
gpl-3.0
4,362
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This progra...
WALR/taiga-back
taiga/events/backends/base.py
Python
agpl-3.0
1,894
#! /usr/bin/env python # -*- mode: python; indent-tabs-mode: nil; -*- # vim:expandtab:shiftwidth=2:tabstop=2:smarttab: # # Copyright (C) 2010,2011 Patrick Crews # # 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 Soft...
kraziegent/mysql-5.6
xtrabackup/test/kewpie/lib/server_mgmt/drizzled.py
Python
gpl-2.0
9,584
# 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 frappe import _ from frappe.model.document import Document class CForm(Document): def validate(self...
suyashphadtare/sajil-final-erp
erpnext/erpnext/accounts/doctype/c_form/c_form.py
Python
agpl-3.0
2,694
# encoding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( float_or_none, parse_age_limit, ) class TvigleIE(InfoExtractor): IE_NAME = 'tvigle' IE_DESC = 'Интернет-телевидение Tvigle.ru' _VALID_URL = r'http://(?:www\.)?tvigle\.ru/(?:[^/]+/)+(?...
0x7678/youtube-dl
youtube_dl/extractor/tvigle.py
Python
unlicense
2,889
import mock import pytest import yaml import inspect import collections from ansible.module_utils.six import string_types from ansible.modules.cloud.openstack import os_server class AnsibleFail(Exception): pass class AnsibleExit(Exception): pass def params_from_doc(func): '''This function extracts th...
britcey/ansible
test/units/modules/cloud/openstack/test_os_server.py
Python
gpl-3.0
6,519
# Authors: Emmanuelle Gouillart <emmanuelle.gouillart@normalesup.org> # Gael Varoquaux <gael.varoquaux@normalesup.org> # License: BSD 3 clause import numpy as np import scipy as sp from scipy import ndimage from nose.tools import assert_equal, assert_true from numpy.testing import assert_raises from sklearn...
toastedcornflakes/scikit-learn
sklearn/feature_extraction/tests/test_image.py
Python
bsd-3-clause
11,187
type='TrueType' name='Calligrapher-Regular' desc={'Ascent':899,'Descent':-234,'CapHeight':731,'Flags':32,'FontBBox':'[-50 -234 1328 899]','ItalicAngle':0,'StemV':70,'MissingWidth':800} up=-200 ut=20 cw={ '\x00':800,'\x01':800,'\x02':800,'\x03':800,'\x04':800,'\x05':800,'\x06':800,'\x07':800,'\x08':800,'\t':800,'\n':8...
sesuncedu/bitcurator
tools/py3fpdf/attic/font/calligra.py
Python
gpl-3.0
2,763
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Functions to load the test cases ("koans") that make up the Path to Enlightenment. ''' import io import unittest # The path to enlightenment starts with the following: KOANS_FILENAME = 'koans.txt' def filter_koan_names(lines): ''' Strips leading and traili...
haroldtreen/python_koans
runner/path_to_enlightenment.py
Python
mit
1,482
#!/usr/bin/python # # Copyright (c) 2017 Zim Kalinowski, <zikalino@microsoft.com> # Copyright (c) 2019 Matti Ranta, (@techknowlogick) # # 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 AN...
ilpianista/ansible
test/support/integration/plugins/modules/azure_rm_mariadbdatabase_info.py
Python
gpl-3.0
6,304
# -*- encoding: utf-8 -*- ############################################################################## # # Daniel Campos (danielcampos@avanzosc.es) Date: 07/10/2014 # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as publi...
InakiZabala/odoomrp-wip
product_pricelist_import/__init__.py
Python
agpl-3.0
966
#!/usr/bin/python # Copyright (c) 2015 VMware, Inc. All Rights Reserved. # # 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 ...
muffl0n/ansible-modules-extras
cloud/vmware/vca_fw.py
Python
gpl-3.0
14,207
import copy from mongoengine.errors import InvalidQueryError from mongoengine.queryset import transform __all__ = ('Q',) class QNodeVisitor(object): """Base visitor class for visiting Q-object nodes in a query tree. """ def visit_combination(self, combination): """Called by QCombination objects...
elioth010/lugama
venv/lib/python2.7/site-packages/mongoengine/queryset/visitor.py
Python
gpl-2.0
4,434
"""Constants for the Bluesound HiFi wireless speakers and audio integrations component.""" DOMAIN = "bluesound" SERVICE_CLEAR_TIMER = "clear_sleep_timer" SERVICE_JOIN = "join" SERVICE_SET_TIMER = "set_sleep_timer" SERVICE_UNJOIN = "unjoin"
nkgilley/home-assistant
homeassistant/components/bluesound/const.py
Python
apache-2.0
240
# 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...
wangyum/tensorflow
tensorflow/python/debug/lib/stepper_test.py
Python
apache-2.0
45,190
#============================================================================ # This library is free software; you can redistribute it and/or # modify it under the terms of version 2.1 of the GNU Lesser General Public # License as published by the Free Software Foundation. # # This library is distributed in the hope th...
flexiant/xen
tools/python/xen/util/xmlrpcclient.py
Python
gpl-2.0
4,533
# Copyright (c) 2009 NHN 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 follow...
gleicher27/Tardigrade
moose/framework/contrib/nsiqcppstyle/nsiqcppstyle_rulemanager.py
Python
lgpl-2.1
10,691
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
ViaSat/luigi
luigi/format.py
Python
apache-2.0
14,652
# # (C) Copyright 2008 Jelmer Vernooij <jelmer@samba.org> # (C) Copyright 2011 Jacek Konieczny <jajcus@jajcus.net> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License Version # 2.1 as published by the Free Software Foundation. # # This p...
pforret/python-for-android
python3-alpha/python-libs/pyxmpp2/sasl/gssapi.py
Python
apache-2.0
3,008
""" Some scripts define objects that we want to import via yaml files that we pass to the script, so this directory must be a python module, rather than just a directory full of scripts. """
fyffyt/pylearn2
pylearn2/scripts/__init__.py
Python
bsd-3-clause
191
# -*- 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...
diogocs1/comps
web/addons/sale_journal/__openerp__.py
Python
apache-2.0
2,681
# # Copyright 2013 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. # #...
riveridea/gnuradio
gr-utils/python/modtool/code_generator.py
Python
gpl-3.0
2,485
# -*- test-case-name: twisted.web.test.test_httpauth -*- # Copyright (c) 2009 Twisted Matrix Laboratories. # See LICENSE for details. """ Implementation of RFC2617: HTTP Digest Authentication @see: U{http://www.faqs.org/rfcs/rfc2617.html} """ from zope.interface import implements from twisted.cred import credentials...
jxta/cc
vendor/Twisted-10.0.0/twisted/web/_auth/digest.py
Python
apache-2.0
1,700