repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
gj1292/Plexus
refs/heads/master
graph.py
1
__author__ = "gjoshi" class Graph(object): def __init__(self): self.no_of_nodes = 0 self.no_of_edges = 0 self.nodes = [] self.edges = [] self.adj = {} def add_node(self, node): self.nodes.append(node) self.adj[node] = [] def add_nodes_from(self, li...
LeoTestard/rust
refs/heads/master
src/etc/extract-tests.py
1
# xfail-license # Script for extracting compilable fragments from markdown # documentation. See prep.js for a description of the format # recognized by this tool. Expects a directory fragments/ to exist # under the current directory, and writes the fragments in there as # individual .rs files. import sys, re if len(...
MechCoder/scikit-learn
refs/heads/master
examples/mixture/plot_gmm_pdf.py
140
""" ========================================= Density Estimation for a Gaussian mixture ========================================= Plot the density estimation of a mixture of two Gaussians. Data is generated from two Gaussians with different centers and covariance matrices. """ import numpy as np import matplotlib.pyp...
TTimo/es_core
refs/heads/master
site_scons/site_init.py
2
# scons imports this module at startup. see http://www.scons.org/doc/production/HTML/scons-user/x3822.html import os, platform ( system, node, release, version, machine, processor ) = platform.uname() from SCons.Script import * def _DoAssembleBundle( target, source, env ): topdir = os.getcwd() try: p...
Toure/Iridium
refs/heads/master
iridium/test/validation/sanity.py
1
import pytest from test import nova_tests class SanityTest(object): """ Sanity test will run through the basic test and output the result in a xunit file with the help of py.test. :return: xunit test result. """ pass
robovm/robovm-studio
refs/heads/master
python/testData/resolve/callee/ClassCall.py
83
class A: def foo(self): a = A() A.f<caret>oo(a)
nharraud/b2share
refs/heads/master
invenio/ext/session/model.py
16
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2011, 2012, 2013, 2014, 2015 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (a...
stefanw/froide
refs/heads/master
manage.py
7
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "froide.settings") os.environ.setdefault("DJANGO_CONFIGURATION", "Dev") from configurations.management import execute_from_command_line execute_from_command_line(sys.argv)
rhattersley/iris-grib
refs/heads/master
lib/iris/fileformats/grib/message.py
7
# (C) British Crown Copyright 2014 - 2016, 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...
abadger/ansible
refs/heads/devel
test/units/template/test_templar.py
55
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
tgbugs/pyontutils
refs/heads/master
ilxutils/ilxutils/interlex_sql.py
1
from pathlib import Path import pandas as pd from sqlalchemy import create_engine, inspect, Table, Column from collections import defaultdict from ilxutils.tools import light_degrade, open_pickle, create_pickle import os #ELASTIC = 'https://5f86098ac2b28a982cebf64e82db4ea2.us-west-2.aws.found.io:9243/interlex/term/' TE...
dguerri/ansible-modules-core
refs/heads/devel
cloud/rackspace/rax_files_objects.py
99
#!/usr/bin/python # (c) 2013, Paul Durivage <paul.durivage@rackspace.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 # (a...
mnahm5/django-estore
refs/heads/master
Lib/site-packages/cffi/verifier.py
56
# # DEPRECATED: implementation for ffi.verify() # import sys, os, binascii, shutil, io from . import __version_verifier_modules__ from . import ffiplatform if sys.version_info >= (3, 3): import importlib.machinery def _extension_suffixes(): return importlib.machinery.EXTENSION_SUFFIXES[:] else: imp...
Alexpux/MSYS2-pacman
refs/heads/master
test/pacman/tests/remove031.py
23
self.description = "Remove a package in HoldPkg" p1 = pmpkg("foopkg") self.addpkg2db("local", p1) self.option["HoldPkg"] = ["???pkg"] self.args = "-R %s" % p1.name self.addrule("PACMAN_RETCODE=1") self.addrule("PKG_EXIST=foopkg")
emilroz/openmicroscopy
refs/heads/develop
components/tools/OmeroPy/src/omero/util/ROI_utils.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # # #------------------------------------------------------------------------------ # Copyright (C) 2006-2009 University of Dundee. All rights reserved. # # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Pub...
allenlavoie/tensorflow
refs/heads/master
tensorflow/contrib/image/python/kernel_tests/distort_image_ops_test.py
31
# 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...
OpenPymeMx/OCB
refs/heads/7.0
addons/sale_margin/__init__.py
441
############################################################################## # # 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 Public L...
NathanW2/QGIS
refs/heads/master
tests/src/python/test_qgspostgresdomain.py
17
# -*- coding: utf-8 -*- """QGIS Unit tests for Postgres domains. .. note:: 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. """ ...
sosguns2002/interactive-mining
refs/heads/master
interactive-mining-3rdparty-madis/madis/src/lib/chardet/langgreekmodel.py
235
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
jepi776/study
refs/heads/master
node_modules/node-gyp/gyp/pylib/gyp/simple_copy.py
1869
# Copyright 2014 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. """A clone of the default copy.deepcopy that doesn't handle cyclic structures or complex types except for dicts and lists. This is because gyp copies so large structur...
montyly/manticore
refs/heads/master
scripts/extract_syscalls.py
2
#!/usr/bin/env python3 """ Generate syscall tables from the Linux source. Used to generate manticore/platforms/linux_syscalls.py. This fetches the tables from kernel.org. Usage: ./extract_syscalls.py [--linux_version linux_version] linux_syscalls.py """ import argparse import os import re import subprocess im...
encukou/cython
refs/heads/master
Demos/benchmarks/richards.py
23
# based on a Java version: # Based on original version written in BCPL by Dr Martin Richards # in 1981 at Cambridge University Computer Laboratory, England # and a C++ version derived from a Smalltalk version written by # L Peter Deutsch. # Java version: Copyright (C) 1995 Sun Microsystems, Inc. # Translation fr...
ltilve/ChromiumGStreamerBackend
refs/heads/master
tools/symsrc/pefile.py
187
# -*- coding: Latin-1 -*- """pefile, Portable Executable reader module All the PE file basic structures are available with their default names as attributes of the instance returned. Processed elements such as the import table are made available with lowercase names, to differentiate them from the upper case basic s...
ns950/calibre
refs/heads/master
src/calibre/ebooks/pdf/reflow.py
14
#!/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 sys, os from lxml import etree class Font(object): def __init__(self, ...
ehashman/oh-mainline
refs/heads/master
vendor/packages/scrapy/scrapy/utils/testproc.py
19
import sys import os from twisted.internet import reactor, defer, protocol class ProcessTest(object): command = None prefix = [sys.executable, '-m', 'scrapy.cmdline'] cwd = os.getcwd() # trial chdirs to temp dir def execute(self, args, check_code=True, settings='missing'): env = os.environ.c...
adragomir/dcos-commons
refs/heads/master
frameworks/kafka/tests/test_shakedown_basics.py
1
import pytest import sdk_install as install import sdk_tasks as tasks import sdk_spin as spin import sdk_cmd as command import sdk_utils as utils import dcos import dcos.config import dcos.http from tests.test_utils import ( DEFAULT_PARTITION_COUNT, DEFAULT_REPLICATION_FACTOR, PACKAGE_NAME, SERVICE_NA...
nelmiux/CarnotKE
refs/heads/master
jyhton/lib-python/2.7/email/__init__.py
262
# Copyright (C) 2001-2006 Python Software Foundation # Author: Barry Warsaw # Contact: email-sig@python.org """A package for parsing, handling, and generating email messages.""" __version__ = '4.0.3' __all__ = [ # Old names 'base64MIME', 'Charset', 'Encoders', 'Errors', 'Generator', 'Head...
hoosteeno/bedrock
refs/heads/master
bedrock/base/waffle_config.py
6
from time import time from everett.manager import ( ConfigDictEnv, ConfigEnvFileEnv, ConfigManager, ConfigOSEnv, ) from bedrock.base.models import get_config_dict class ConfigDBEnv(ConfigDictEnv): def __init__(self): # have to use this directly since settings aren't yet setup # w...
Datera/cinder
refs/heads/datera_queens_backport
cinder/volume/drivers/netapp/dataontap/nfs_base.py
1
# Copyright (c) 2012 NetApp, Inc. All rights reserved. # Copyright (c) 2014 Ben Swartzlander. All rights reserved. # Copyright (c) 2014 Navneet Singh. All rights reserved. # Copyright (c) 2014 Clinton Knight. All rights reserved. # Copyright (c) 2014 Alex Meade. All rights reserved. # Copyright (c) 2014 Bob Callaw...
weiqiangdragonite/blog_tmp
refs/heads/master
python/flask/microblog/db_repository/versions/002_migration.py
2
from sqlalchemy import * from migrate import * from migrate.changeset import schema pre_meta = MetaData() post_meta = MetaData() user = Table('user', pre_meta, Column('id', INTEGER, primary_key=True, nullable=False), Column('nickname', VARCHAR(length=64)), Column('email', VARCHAR(length=120)), Column(...
zhangpf/vbox
refs/heads/master
src/VBox/Devices/EFI/Firmware/BaseTools/Source/Python/UPT/BuildVersion.py
11
## @file # # This file is for build version number auto generation # # Copyright (c) 2011, Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials are licensed and made available # under the terms and conditions of the BSD License which accompanies this # distribution. The full tex...
DanieSchro3/Daniel
refs/heads/master
py/openage/convert/gamedata/sound.py
46
from .. import dataformat from struct import Struct, unpack_from from ..util import dbg, zstr from .empiresdat import endianness class SoundItem(dataformat.Exportable): name_struct = "sound_item" name_struct_file = "sound" struct_description = "one possible file for a sound." data_format = ...
google/prog-edu-assistant
refs/heads/main
python/utils.py
1
"""utility libraries for prog-edu-assistant.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from IPython.core import ultratb # pylint: disable=too-few-public-methods class TbFormatter: '''TbFormatter formats tracebacks of exceptions using IPython ...
wdv4758h/ZipPy
refs/heads/master
edu.uci.python.benchmark/src/benchmarks/sympy/sympy/printing/python.py
118
# -*- coding: utf-8 -*- from __future__ import print_function, division import keyword as kw import sympy from .repr import ReprPrinter from .str import StrPrinter # A list of classes that should be printed using StrPrinter STRPRINT = ("Add", "Infinity", "Integer", "Mul", "NegativeInfinity", "Pow", "Zero...
rice-solar-physics/ebtelPlusPlus
refs/heads/master
tests/conftest.py
1
import pytest def pytest_addoption(parser): parser.addoption( "--ebtel_idl_path", action="store", default=None, help="Path to EBTEL IDL code" ) @pytest.fixture def ebtel_idl_path(request): return request.config.getoption("--ebtel_idl_path")
karimbahgat/Pipy
refs/heads/master
pipy/pip/_vendor/requests/packages/chardet/euctwfreq.py
3132
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
supergentle/migueltutorial
refs/heads/master
flask/lib/python2.7/site-packages/itsdangerous.py
626
# -*- coding: utf-8 -*- """ itsdangerous ~~~~~~~~~~~~ A module that implements various functions to deal with untrusted sources. Mainly useful for web applications. :copyright: (c) 2014 by Armin Ronacher and the Django Software Foundation. :license: BSD, see LICENSE for more details. """ imp...
sahilTakiar/spark
refs/heads/master
examples/src/main/python/ml/multilayer_perceptron_classification.py
123
# # 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 us...
iw3hxn/LibrERP
refs/heads/master
account_financial_report_webkit/wizard/partner_balance_wizard.py
1
# -*- encoding: utf-8 -*- ############################################################################## # # Author: Guewen Baconnier # Copyright Camptocamp SA 2011 # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # ...
hasadna/django
refs/heads/master
django/conf/project_template/manage.py
1070
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
olt/mapproxy
refs/heads/master
mapproxy/image/merge.py
8
# This file is part of the MapProxy project. # Copyright (C) 2010-2016 Omniscale <http://omniscale.de> # # 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/LI...
amir-qayyum-khan/lore
refs/heads/master
learningresources/migrations/0009_allow_blank_description.py
2
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations # pylint: skip-file class Migration(migrations.Migration): dependencies = [ ('learningresources', '0008_remove_staticasset_learning_resources'), ] operations = [ migrations.AlterFiel...
flavio-casacurta/Nat2Py
refs/heads/master
Adabas/demo/Emptel/string25.py
1
import re as _re class _multimap: """Helper class for combining multiple mappings. Used by .{safe_,}substitute() to combine the mapping and keyword arguments. """ def __init__(self, primary, secondary): self._primary = primary self._secondary = secondary def __getitem__(self, ...
thaim/ansible
refs/heads/fix-broken-link
lib/ansible/modules/cloud/vmware/vmware_host_active_directory.py
21
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Christian Kotte <christian.kotte@gmx.de> # # 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 = { 'met...
jacobian-archive/openstack.compute
refs/heads/master
tests/utils.py
3
from nose.tools import ok_ def fail(msg): raise AssertionError(msg) def assert_in(thing, seq, msg=None): msg = msg or "'%s' not found in %s" % (thing, seq) ok_(thing in seq, msg) def assert_not_in(thing, seq, msg=None): msg = msg or "unexpected '%s' found in %s" % (thing, seq) ok_(thing not i...
aristanetworks/neutron
refs/heads/master
neutron/plugins/ml2/drivers/freescale/config.py
48
# Copyright (c) 2014 Freescale Semiconductor # # 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 ...
jjwright55/code_fragments
refs/heads/master
frags/python/slice/ChannelXML.py
1
#!/tps/bin/python import string from xml.sax import saxutils from xml.sax import make_parser from xml.sax.handler import feature_namespaces def normalize(text): return string.join(string.split(text), ' ') def countTuple(tupe): c = 0 for x in tupe: c += 1 return c class Channel: def __init...
a-doumoulakis/tensorflow
refs/heads/master
tensorflow/contrib/losses/python/losses/loss_ops.py
20
# 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...
spatialaudio/sweep
refs/heads/master
lin_sweep_kaiser_window_script2/lin_sweep_kaiser_window_script2.py
2
#!/usr/bin/env python3 """The influence of windowing of lin sweep signals when using a Kaiser Window by fixing beta (=7) and fade_in (=0). fstart = 1 Hz fstop = 22050 Hz Deconvolution: Windowed """ import sys sys.path.append('..') import measurement_chain import plotting import calculation import gener...
AKSW/LODStats
refs/heads/master
lodstats/stats/Entities.py
2
""" Copyright 2013 AKSW Research Group http://aksw.org This file is part of LODStats. LODStats 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 versi...
MiiBond/three.js
refs/heads/master
utils/exporters/fbx/modules/win/Python26_x86/FbxCommon.py
21
from fbx import * import sys def InitializeSdkObjects(): # The first thing to do is to create the FBX SDK manager which is the # object allocator for almost all the classes in the SDK. lSdkManager = KFbxSdkManager.Create() if not lSdkManager: sys.exit(0) # Create an IOSe...
OmarIthawi/edx-platform
refs/heads/master
common/djangoapps/student/migrations/0019_create_approved_demographic_fields_fall_2012.py
188
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting field 'UserProfile.occupation' db.delete_column('auth_userprofile', 'occupation') # Dele...
xiandiancloud/edxplaltfom-xusong
refs/heads/master
common/djangoapps/student/tests/test_authz.py
61
""" Tests authz.py """ import mock from django.test import TestCase from django.contrib.auth.models import User, AnonymousUser from django.core.exceptions import PermissionDenied from student.roles import CourseInstructorRole, CourseStaffRole, CourseCreatorRole from student.tests.factories import AdminFactory from st...
allotria/intellij-community
refs/heads/master
python/testData/addImport/localFromImport.after.py
76
def func(): for _ range(10): from package.module import foo foo # <ref>
AndKe/MAVProxy
refs/heads/master
MAVProxy/modules/mavproxy_checklist.py
5
#!/usr/bin/env python ''' Checklist module Stephen Dade July 2014 ''' import math, sys, os, time from MAVProxy.modules.lib import mp_checklist from MAVProxy.modules.lib import mp_module from pymavlink import mavutil class ChecklistModule(mp_module.MPModule): def __init__(self, mpstate): super(ChecklistMod...
lumig242/Hue-Integration-with-CDAP
refs/heads/pull3
desktop/core/ext-py/boto-2.38.0/boto/manage/test_manage.py
153
from boto.manage.server import Server from boto.manage.volume import Volume import time print('--> Creating New Volume') volume = Volume.create() print(volume) print('--> Creating New Server') server_list = Server.create() server = server_list[0] print(server) print('----> Waiting for Server to start up') while serv...
Kast0rTr0y/ansible
refs/heads/devel
lib/ansible/modules/network/nxos/nxos_snmp_community.py
11
#!/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...
cambid/clcms
refs/heads/master
bin/clcms_create_galleries.py
1
#!/usr/bin/env python # # This script will create clcms compatible gallery pages for the current directory # # The images in the current directory must be of the form: # <nr>.<title>.<extension> # # Prerequisites: ImageMagick (for the convert tool) # TODO: implement this with pixbuf? # # The default input directory...
CoderDojoLX/appinventor-sources
refs/heads/master
appinventor/rendezvous/bottle.py
158
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Bottle is a fast and simple micro-framework for small web applications. It offers request dispatching (Routes) with url parameter support, templates, a built-in HTTP Server and adapters for many third party WSGI/HTTP-server and template engines - all in a single file an...
jk1/intellij-community
refs/heads/master
python/testData/mover/commentOut_afterDown.py
83
if True: a = 1 else: a = 2 #comment <caret>
AWhetter/gyp
refs/heads/master
test/win/gyptest-cl-pdbname-override.py
266
#!/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. """ Make sure pdb is named as expected (shared between .cc files). """ import TestGyp import sys if sys.platform == 'win32': test = Tes...
BeyondTheClouds/nova
refs/heads/disco/mitaka
nova/scheduler/filters/type_filter.py
17
# Copyright (c) 2012 The Cloudscaling Group, 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 # # ...
MalloyPower/parsing-python
refs/heads/master
front-end/testsuite-python-lib/Python-2.3/Lib/plat-mac/Carbon/CarbonEvt.py
82
from _CarbonEvt import *
ypwalter/evennia
refs/heads/master
evennia/server/profiling/memplot.py
4
""" Script that saves memory and idmapper data over time. Data will be saved to game/logs/memoryusage.log. Note that the script will append to this file if it already exists. Call this module directly to plot the log (requires matplotlib and numpy). """ import os, sys import time #TODO! #sys.path.insert(0, os.path.di...
ClockWorkCoin/Code
refs/heads/master
share/qt/make_spinner.py
4415
#!/usr/bin/env python # W.J. van der Laan, 2011 # Make spinning .mng animation from a .png # Requires imagemagick 6.7+ from __future__ import division from os import path from PIL import Image from subprocess import Popen SRC='img/reload_scaled.png' DST='../../src/qt/res/movies/update_spinner.mng' TMPDIR='/tmp' TMPNAM...
MTASZTAKI/ApertusVR
refs/heads/0.9
plugins/physics/bulletPhysics/3rdParty/bullet3/examples/pybullet/gym/pybullet_envs/examples/testEnv.py
4
import os import inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(os.path.dirname(currentdir)) os.sys.path.insert(0, parentdir) import pybullet_envs import gym import argparse import pybullet as p def test(args): count = 0 env = gym.make(ar...
pap/rethinkdb
refs/heads/next
test/rql_test/connections/http_support/werkzeug/testsuite/contrib/__init__.py
145
# -*- coding: utf-8 -*- """ werkzeug.testsuite.contrib ~~~~~~~~~~~~~~~~~~~~~~~~~~ Tests the contrib modules. :copyright: (c) 2014 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import unittest from werkzeug.testsuite import iter_suites def suite(): suite = unittest.TestS...
aasiutin/electrum
refs/heads/master
lib/tests/test_simple_config.py
5
import ast import sys import os import unittest import tempfile import shutil import json from StringIO import StringIO from lib.simple_config import (SimpleConfig, read_system_config, read_user_config) class Test_SimpleConfig(unittest.TestCase): def setUp(self): super(Tes...
lightwang1/beets
refs/heads/master
beetsplug/fuzzy.py
24
# This file is part of beets. # Copyright 2015, Philippe Mongeau. # # 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...
zhenzhai/edx-platform
refs/heads/master
common/test/acceptance/pages/lms/find_courses.py
110
""" Find courses page (main page of the LMS). """ from bok_choy.page_object import PageObject from . import BASE_URL class FindCoursesPage(PageObject): """ Find courses page (main page of the LMS). """ url = BASE_URL def is_browser_on_page(self): return "edX" in self.browser.title ...
rajul/mne-python
refs/heads/master
examples/datasets/plot_brainstorm_data.py
8
""" ============================ Brainstorm tutorial datasets ============================ Here we compute the evoked from raw for the Brainstorm tutorial dataset. For comparison, see: http://neuroimage.usc.edu/brainstorm/Tutorials/MedianNerveCtf References ---------- .. [1] Tadel F, Baillet S, Mosher JC, Pantazis D,...
flake123p/ProjectH
refs/heads/master
Python/_Basics_/A01_CreateEXE/test.py
2
import urllib.request headStr = "http://image.slidesharecdn.com/cc2500-130410225125-phpapp01/95/cc2500-" tailStr = "-1024.jpg?cb=1365661093" for i in range(1, 43): #Input String linkStr = headStr + str(i) + tailStr #Output String if i < 10: outputFileStr = "00" + str(i) + ".png" elif i < 100: outputFileSt...
archf/ansible
refs/heads/devel
lib/ansible/modules/cloud/vmware/vmware_vsan_cluster.py
47
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Russell Teague <rteague2 () csc.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1',...
mne-tools/mne-tools.github.io
refs/heads/main
0.11/_downloads/plot_raw_objects.py
15
""" .. _tut_raw_objects The :class:`Raw <mne.io.RawFIF>` data structure: continuous data ================================================================ """ from __future__ import print_function import mne import os.path as op from matplotlib import pyplot as plt ###################################################...
ovnicraft/edx-platform
refs/heads/master
common/test/acceptance/pages/studio/__init__.py
232
import os # Get the URL of the instance under test BASE_URL = os.environ.get('test_url', 'http://localhost:8031')
gkawamoto/yowsup
refs/heads/master
yowsup/layers/axolotl/protocolentities/iq_keys_get_result.py
48
from yowsup.layers.protocol_iq.protocolentities import ResultIqProtocolEntity from yowsup.structs import ProtocolTreeNode from axolotl.state.prekeybundle import PreKeyBundle from axolotl.identitykey import IdentityKey from axolotl.ecc.curve import Curve from axolotl.ecc.djbec import DjbECPublicKey import binascii impor...
yaolinz/rethinkdb
refs/heads/next
external/v8_3.30.33.16/build/gyp/test/intermediate_dir/gyptest-intermediate-dir.py
243
#!/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 targets have independent INTERMEDIATE_DIRs. """ import TestGyp test = TestGyp.TestGyp() test.run_gyp('test.gyp', chdir=...
tsabi/Odoo-tsabi-fixes
refs/heads/master
addons/account_analytic_plans/report/crossovered_analytic.py
321
# -*- 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...
huran2014/huran.github.io
refs/heads/master
wot_gateway/usr/lib/python2.7/timeit.py
99
#! /usr/bin/env python """Tool for measuring execution time of small code snippets. This module avoids a number of common traps for measuring execution times. See also Tim Peters' introduction to the Algorithms chapter in the Python Cookbook, published by O'Reilly. Library usage: see the Timer class. Command line ...
aewallin/opencamlib
refs/heads/master
examples/python/drop-cutter/batchdropcutter_mtrush.py
1
import ocl import pyocl import camvtk import time import vtk import datetime import math if __name__ == "__main__": print(ocl.version()) myscreen = camvtk.VTKScreen() #stl = camvtk.STLSurf("../stl/gnu_tux_mod.stl") stl = camvtk.STLSurf("../stl/mount_rush.stl") #stl = camvtk.STLSurf("../stl/...
vmora/QGIS
refs/heads/master
python/plugins/processing/algs/grass7/ext/r_resamp_filter.py
12
# -*- coding: utf-8 -*- """ *************************************************************************** r_resamp_filter.py ------------------ Date : February 2016 Copyright : (C) 2016 by Médéric Ribreux Email : medspx at medspx dot fr **********************...
costadorione/purestream
refs/heads/master
servers/dailymotion.py
1
# -*- coding: utf-8 -*- # --------------------------------------------------------------------------------------------------------------------- # streamondemand - XBMC Plugin # Conector para dailymotion # http://www.mimediacenter.info/foro/viewforum.php?f=36 # -----------------------------------------------------------...
camilonova/django
refs/heads/master
tests/template_tests/filter_tests/test_iriencode.py
133
from django.template.defaultfilters import iriencode, urlencode from django.test import SimpleTestCase from django.utils.safestring import mark_safe from ..utils import setup class IriencodeTests(SimpleTestCase): """ Ensure iriencode keeps safe strings. """ @setup({'iriencode01': '{{ url|iriencode }...
iglpdc/nipype
refs/heads/master
nipype/interfaces/semtools/filtering/tests/test_auto_TextureFromNoiseImageFilter.py
12
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from .....testing import assert_equal from ..featuredetection import TextureFromNoiseImageFilter def test_TextureFromNoiseImageFilter_inputs(): input_map = dict(args=dict(argstr='%s', ), environ=dict(nohash=True, usedefault=True, ), ignore_...
anhstudios/swganh
refs/heads/develop
data/scripts/templates/object/tangible/mission/quest_item/shared_jatrian_lytus_q3_needed.py
2
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/mission/quest_item/shared_jatrian_lytus_q3_needed.iff" result.attri...
MerleLK/StudentSystem
refs/heads/master
student/models.py
1
from django.db import models from teacher.models import CourseInfo # Create your models here. # 学生信息表 class StudentMessage(models.Model): id = models.BigIntegerField(primary_key=True) name = models.CharField(max_length=30) age = models.IntegerField() sex = models.CharField(max_length=10, default='MAN...
resmo/ansible
refs/heads/devel
lib/ansible/module_utils/network/fortios/argspec/facts/facts.py
20
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 License, or # (at you...
vFense/vFenseAgent-nix
refs/heads/development
agent/deps/mac/Python-2.7.5/lib/python2.7/plat-mac/lib-scriptpackages/Netscape/Standard_Suite.py
82
"""Suite Standard Suite: Common terms for most applications Level 1, version 1 Generated from /Volumes/Sap/Applications (Mac OS 9)/Netscape Communicator\xe2\x84\xa2 Folder/Netscape Communicator\xe2\x84\xa2 AETE/AEUT resource version 1/0, language 0, script 0 """ import aetools import MacOS _code = 'CoRe' from StdSu...
ojengwa/odoo
refs/heads/8.0
addons/l10n_br/__init__.py
430
# -*- encoding: utf-8 -*- ############################################################################### # # # Copyright (C) 2009 Renato Lima - Akretion # # ...
lucidmotifs/auto-aoc
refs/heads/master
.venv/lib/python3.5/site-packages/pip/_vendor/requests/cookies.py
355
# -*- coding: utf-8 -*- """ requests.cookies ~~~~~~~~~~~~~~~~ Compatibility code to be able to use `cookielib.CookieJar` with requests. requests.utils imports from here, so be careful with imports. """ import copy import time import calendar import collections from .compat import cookielib, urlparse, urlunparse, Mo...
damdam-s/OpenUpgrade
refs/heads/8.0
addons/web_api/__openerp__.py
384
{ 'name': 'OpenERP Web API', 'category': 'Hidden', 'description': """ Openerp Web API. ================ """, 'version': '2.0', 'depends': ['web'], 'installable': True, 'auto_install': False, }
eayunstack/rally
refs/heads/product
tests/unit/verification/test_json2html.py
6
# 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...
t0in4/django
refs/heads/master
tests/indexes/tests.py
321
from unittest import skipUnless from django.db import connection from django.test import TestCase from .models import Article, ArticleTranslation, IndexTogetherSingleList class SchemaIndexesTests(TestCase): """ Test index handling by the db.backends.schema infrastructure. """ def test_index_name_ha...
cloud9UG/odoo
refs/heads/8.0
addons/mail/wizard/__init__.py
438
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-Today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
skg-net/ansible
refs/heads/devel
lib/ansible/modules/cloud/azure/azure_rm_networkinterface_facts.py
10
#!/usr/bin/python # # Copyright (c) 2016 Matt Davis, <mdavis@ansible.com> # Chris Houseknecht, <house@redhat.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 ANSI...
guessit-io/guessit
refs/heads/develop
guessit/yamlutils.py
2
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Options """ from collections import OrderedDict import babelfish import yaml # pylint:disable=wrong-import-order from .rules.common.quantity import BitRate, FrameRate, Size class OrderedDictYAMLLoader(yaml.SafeLoader): """ A YAML loader that loads mappings...
gkc1000/pyscf
refs/heads/master
pyscf/cc/test/test_gccsd_t.py
2
#!/usr/bin/env python # Copyright 2014-2018 The PySCF Developers. 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 # # U...
luuhfelix/ProjetoFilmes
refs/heads/master
backend/appengine/routes/comentario/admin/home.py
2
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from config.template_middleware import TemplateResponse from tekton import router from gaecookie.decorator import no_csrf from course_app import facade from routes.trailers.admin import new, edit def delete(_handler, course_id): faca...
pheanex/ansible-modules-core
refs/heads/devel
cloud/amazon/ec2_metric_alarm.py
61
#!/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 distributed...
alexhenrie/poedit
refs/heads/master
deps/boost/tools/build/test/space_in_path.py
6
#!/usr/bin/python # Copyright 2012 Steven Watanabe # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) # Test that paths containing spaces are handled correctly by actions. import BoostBuild import os t = BoostBuild.Tester(us...