repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
sfu-fas/coursys | refs/heads/master | oldcode/planning/views/delete_intention.py | 1 | from planning.models import TeachingIntention
from .edit_intention import edit_intention
from courselib.auth import requires_instructor
from coredata.models import Person, Semester
from django.http import HttpResponseRedirect
from django.contrib import messages
from django.core.urlresolvers import reverse
from django.... |
jrobeson/platformio | refs/heads/develop | platformio/platforms/timsp430.py | 9 | # Copyright (C) Ivan Kravets <me@ikravets.com>
# See LICENSE for details.
from platformio.platforms.base import BasePlatform
class Timsp430Platform(BasePlatform):
"""
MSP430 microcontrollers (MCUs) from Texas Instruments (TI)
are 16-bit, RISC-based, mixed-signal processors designed for ultra-low
pow... |
Yuudachimoe/HikariChun-RedBot | refs/heads/master | lib/youtube_dl/extractor/gazeta.py | 64 | # coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
class GazetaIE(InfoExtractor):
_VALID_URL = r'(?P<url>https?://(?:www\.)?gazeta\.ru/(?:[^/]+/)?video/(?:main/)*(?:\d{4}/\d{2}/\d{2}/)?(?P<id>[A-Za-z0-9-_.]+)\.s?html)'
_TESTS = [{
'url': 'http://www.g... |
PoOyaKhandel/Emulated-Bellman-Ford-Algorithm | refs/heads/master | Router4.py | 4 | """
Emulated Bellman-Ford Algorithm
PoOya Khandel, Mohammad Hossein Tavakoli Bina
"""
from BellmanFord import BFA
import msvcrt
import re
import timeit
from time import sleep
elapsedTime = 0
start = 0
whichPort = {}
adrToName = {}
routerCount = 0
hit = None
routerName = input("Welcome to Emulated B... |
emsrc/daeso-dutch | refs/heads/master | bin/alpino_server.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
simple server providing access to the Alpino parser for Dutch through XML-RPC
"""
__author__ = 'Erwin Marsi <e.marsi@gmail.com>'
__version__ = "0.9"
from sys import exit
from daeso.utils.cli import DaesoArgParser
from daeso_nl.alpino.server import start_server, DEF... |
dagwieers/ansible | refs/heads/devel | test/units/modules/source_control/test_bitbucket_pipeline_known_host.py | 12 | from ansible.module_utils.source_control.bitbucket import BitbucketHelper
from ansible.modules.source_control.bitbucket import bitbucket_pipeline_known_host
from units.compat import unittest
from units.compat.mock import patch
from units.modules.utils import AnsibleExitJson, ModuleTestCase, set_module_args
class Test... |
Distrotech/libreoffice | refs/heads/distrotech-libreoffice-4.4.3.2 | wizards/com/sun/star/wizards/web/BackgroundsDialog.py | 3 | #
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# This file incorporates work covered by the following license noti... |
Denisolt/Tensorflow_Chat_Bot | refs/heads/master | local/lib/python2.7/site-packages/tensorflow/contrib/seq2seq/python/ops/loss.py | 21 | # 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... |
ajpaulson/shadowsocks | refs/heads/master | tests/graceful_server.py | 977 | #!/usr/bin/python
import socket
if __name__ == '__main__':
s = socket.socket()
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
s.bind(('127.0.0.1', 8001))
s.listen(1024)
c = None
while True:
c = s.accept()
|
Konubinix/weboob | refs/heads/master | modules/redmine/module.py | 7 | # -*- coding: utf-8 -*-
# Copyright(C) 2010-2011 Romain Bignon
#
# This file is part of weboob.
#
# weboob 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... |
jtyr/ansible-modules-core | refs/heads/devel | cloud/azure/azure.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 distributed... |
vkondula/pytest_jira | refs/heads/master | tests/test_jira.py | 1 | import os
CONFTEST = """
import pytest
FAKE_ISSUES = {
"ORG-1412": {"status": "closed"},
"ORG-1382": {"status": "open"},
"ORG-1510": {
"components": set(["com1", "com2"]),
"versions": set(),
"fixed_versions": set(),
"status": "open",
},
"ORG-1511": {
"comp... |
carlos-ferras/Sequence-ToolKit | refs/heads/master | model/singlenton.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
class _Singleton(type):
"""A metaclass that creates a Singleton base class when called."""
_instances = {}
def __call__(cls, *args, **kwargs):
if cls not in cls._instances:
cls._instances[cls] = s... |
vlinhd11/vlinhd11-android-scripting | refs/heads/master | python/src/Demo/tkinter/matt/window-creation-w-location.py | 47 | from Tkinter import *
import sys
##sys.path.append("/users/mjc4y/projects/python/tkinter/utils")
##from TkinterUtils import *
# this shows how to create a new window with a button in it that
# can create new windows
class QuitButton(Button):
def __init__(self, master, *args, **kwargs):
if not kwargs.has... |
krzysztof/invenio-openaire | refs/heads/master | invenio_openaire/cli.py | 1 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2016 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... |
davidfischer/readthedocs.org | refs/heads/master | readthedocs/api/__init__.py | 12133432 | |
sigmavirus24/glance | refs/heads/master | glance/tests/unit/api/middleware/__init__.py | 12133432 | |
Lektorium-LLC/edx-platform | refs/heads/master | openedx/core/djangoapps/embargo/__init__.py | 12133432 | |
gradel/mezzanine | refs/heads/master | mezzanine/bin/management/__init__.py | 12133432 | |
gengue/django | refs/heads/master | django/core/checks/security/__init__.py | 12133432 | |
geektophe/shinken | refs/heads/master | test/test_no_host_template.py | 18 | #!/usr/bin/env python
# Copyright (C) 2009-2014:
# Gabes Jean, naparuba@gmail.com
# Gerhard Lausser, Gerhard.Lausser@consol.de
#
# This file is part of Shinken.
#
# Shinken 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 F... |
cmaughan/imgui | refs/heads/master | zep/m3rdparty/sdl/src/joystick/sort_controllers.py | 23 | #!/usr/bin/env python
#
# Script to sort the game controller database entries in SDL_gamecontroller.c
import re
filename = "SDL_gamecontrollerdb.h"
input = open(filename)
output = open(filename + ".new", "w")
parsing_controllers = False
controllers = []
controller_guids = {}
split_pattern = re.compile(r'([^"]*")([^,... |
punchagan/zulip | refs/heads/master | zerver/migrations/0124_stream_enable_notifications.py | 5 | # Generated by Django 1.11.6 on 2017-11-29 01:38
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("zerver", "0123_userprofile_make_realm_email_pair_unique"),
]
operations = [
migrations.AddField(
model_name="subscription",
... |
Sendoushi/servo | refs/heads/master | tests/wpt/web-platform-tests/tools/pytest/bench/bench_argcomplete.py | 226 |
# 10000 iterations, just for relative comparison
# 2.7.5 3.3.2
# FilesCompleter 75.1109 69.2116
# FastFilesCompleter 0.7383 1.0760
if __name__ == '__main__':
import sys
import timeit
from argcomplete.completers import FilesCompleter
from _pytest._argcomplete im... |
zhimin711/nova | refs/heads/master | nova/api/openstack/compute/schemas/user_data.py | 88 | # Copyright 2014 NEC Corporation. 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 ... |
gorjuce/odoo | refs/heads/8.0 | addons/website_report/controllers/__init__.py | 7372 | import main
|
slohse/ansible | refs/heads/devel | test/integration/targets/module_utils/library/test_override.py | 263 | #!/usr/bin/python
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.facts import data
results = {"data": data}
AnsibleModule(argument_spec=dict()).exit_json(**results)
|
colinbrislawn/scikit-bio | refs/heads/master | skbio/io/format/tests/__init__.py | 160 | # ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# --------------------------------------------... |
rapidhere/rpbtman_autosign | refs/heads/master | pytz/zoneinfo/Europe/Gibraltar.py | 9 | '''tzinfo timezone information for Europe/Gibraltar.'''
from pytz.tzinfo import DstTzInfo
from pytz.tzinfo import memorized_datetime as d
from pytz.tzinfo import memorized_ttinfo as i
class Gibraltar(DstTzInfo):
'''Europe/Gibraltar timezone definition. See datetime.tzinfo for details'''
zone = 'Europe/Gibralt... |
markeTIC/OCB | refs/heads/8.0 | addons/l10n_in/__openerp__.py | 260 | # -*- 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... |
haad/ansible | refs/heads/devel | lib/ansible/modules/cloud/openstack/os_router.py | 18 | #!/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': ['preview'],... |
MechanisM/musicdb | refs/heads/master | contrib/django/contrib/webdesign/lorem_ipsum.py | 439 | """
Utility functions for generating "lorem ipsum" Latin text.
"""
import random
COMMON_P = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo con... |
wndias/bc.repository | refs/heads/master | script.module.urlresolver/lib/urlresolver/plugins/gorillavid.py | 1 | """
urlresolver XBMC Addon
Copyright (C) 2011 t0mm0
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.
... |
davidsamu/seal | refs/heads/master | seal/util/kernels.py | 1 | # -*- coding: utf-8 -*-
"""
Functions to create kernels for firing rate estimation.
@author: David Samu
"""
import warnings
import numpy as np
import pandas as pd
from quantities import ms
from elephant.kernels import GaussianKernel, RectangularKernel
# Constants.
kstep = 10 * ms
# %% Functions to create kernel... |
18padx08/PPTex | refs/heads/master | PPTexEnv_x86_64/lib/python2.7/site-packages/sympy/polys/tests/test_groebnertools.py | 24 | """Tests for Groebner bases. """
from sympy.polys.groebnertools import (
groebner, sig, sig_key, sig_cmp,
lbp, lbp_cmp, lbp_key, critical_pair,
cp_cmp, cp_key, is_rewritable_or_comparable,
Sign, Polyn, Num, s_poly, f5_reduce,
groebner_lcm, groebner_gcd,
)
from sympy.polys.fglmtools import _represe... |
nvgreensocs/qemu-sc | refs/heads/master | scripts/tracetool/backend/dtrace.py | 16 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
DTrace/SystemTAP backend.
"""
__author__ = "Lluís Vilanova <vilanova@ac.upc.edu>"
__copyright__ = "Copyright 2012, Lluís Vilanova <vilanova@ac.upc.edu>"
__license__ = "GPL version 2 or (at your option) any later version"
__maintainer__ = "Stefan Hajnoczi"
__e... |
ElasticBox/elastickube | refs/heads/master | src/tests/api/actions/__init__.py | 13 | """
Copyright 2016 ElasticBox 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 to in ... |
Teino1978-Corp/Teino1978-Corp-light_.gitignore | refs/heads/master | light_random_messages_tests.py | 24123 | from django.test import TestCase
# Create your tests here.
|
foglamp/FogLAMP | refs/heads/develop | tests/unit/python/foglamp/services/core/interest_registry/test_interest_registry.py | 1 | # -*- coding: utf-8 -*-
import pytest
from unittest.mock import MagicMock
from unittest.mock import patch
from foglamp.common.configuration_manager import ConfigurationManager
from foglamp.services.core.interest_registry.interest_registry import InterestRegistry
from foglamp.services.core.interest_registry.interest_re... |
charris/numpy | refs/heads/dependabot/pip/mypy-0.910 | numpy/f2py/tests/test_return_real.py | 17 | import platform
import pytest
from numpy import array
from numpy.testing import assert_, assert_raises
from . import util
class TestReturnReal(util.F2PyTest):
def check_function(self, t, tname):
if tname in ['t0', 't4', 's0', 's4']:
err = 1e-5
else:
err = 0.0
asse... |
Nashenas88/servo | refs/heads/master | python/mach_bootstrap.py | 8 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from __future__ import print_function, unicode_literals
import os
import platform
import subprocess
import sys
from dis... |
brunobergher/dotfiles | refs/heads/master | sublime/pygments/all/pygments/lexers/_scilab_builtins.py | 48 | # -*- coding: utf-8 -*-
"""
pygments.lexers._scilab_builtins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Builtin list for the ScilabLexer.
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
# Autogenerated
commands_kw = (
'abort',
'apropos... |
cpaulik/scipy | refs/heads/master | scipy/special/setup.py | 77 | #!/usr/bin/env python
from __future__ import division, print_function, absolute_import
import os
import sys
from os.path import join
from distutils.sysconfig import get_python_inc
import numpy
from numpy.distutils.misc_util import get_numpy_include_dirs
try:
from numpy.distutils.misc_util import get_info
except ... |
Gehn/JustAChatBot | refs/heads/master | sleekxmpp/clientxmpp.py | 1 | # -*- coding: utf-8 -*-
"""
sleekxmpp.clientxmpp
~~~~~~~~~~~~~~~~~~~~
This module provides XMPP functionality that
is specific to client connections.
Part of SleekXMPP: The Sleek XMPP Library
:copyright: (c) 2011 Nathanael C. Fritz
:license: MIT, see LICENSE for more details
"""
from __f... |
spitfire88/upm | refs/heads/master | examples/python/le910.py | 7 | #!/usr/bin/python
# Author: Jon Trulson <jtrulson@ics.com>
# Copyright (c) 2017 Intel Corporation.
#
# 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 l... |
amdtkdev/amdtk | refs/heads/master | amdtk/densities/normal_gamma.py | 1 |
"""
Implementation of a Normal-Gamma density prior.
Copyright (C) 2017, Lucas Ondel
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 t... |
wiki-ai/revscoring | refs/heads/master | revscoring/languages/romanian.py | 2 | from .features import Dictionary, RegexMatches, Stemmed, Stopwords
name = "romanian"
try:
import enchant
dictionary = enchant.Dict("ro")
except enchant.errors.DictNotFoundError:
raise ImportError("No enchant-compatible dictionary found for 'ro'. " +
"Consider installing 'aspell-ro'.... |
kipe/enocean | refs/heads/master | enocean/protocol/constants.py | 1 | # -*- encoding: utf-8 -*-
from __future__ import print_function, unicode_literals, division, absolute_import
from enum import IntEnum
# EnOceanSerialProtocol3.pdf / 12
class PACKET(IntEnum):
RESERVED = 0x00
# RADIO == RADIO_ERP1
# Kept for backwards compatibility reasons, for example custom packet
# g... |
weijia/django-sheet | refs/heads/master | django_sheet/default_settings.py | 25 | __author__ = 'weijia'
|
wandec/grr | refs/heads/master | gui/api_aff4_object_renderers_test.py | 4 | #!/usr/bin/env python
"""This modules contains tests for RESTful API renderers."""
# pylint: disable=unused-import,g-bad-import-order
from grr.lib import server_plugins
# pylint: enable=unused-import,g-bad-import-order
from grr.gui import api_aff4_object_renderers
from grr.lib import aff4
from grr.lib import flags... |
anaruse/chainer | refs/heads/master | tests/chainer_tests/links_tests/connection_tests/test_deconvolution_nd.py | 3 | import unittest
import numpy
import chainer
from chainer.backends import cuda
from chainer import gradient_check
from chainer import initializers
from chainer.links.connection import deconvolution_nd
from chainer import testing
from chainer.testing import attr
from chainer.testing import condition
from chainer.testin... |
kwagyeman/openmv | refs/heads/master | scripts/examples/OpenMV/26-April-Tags/find_apriltags_w_lens_zoom.py | 3 | # AprilTags Example
#
# This example shows the power of the OpenMV Cam to detect April Tags
# on the OpenMV Cam M7. The M4 versions cannot detect April Tags.
import sensor, image, time, math
sensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.VGA) # we run out of memory if the resolution is... |
datascienceatgt/module-two | refs/heads/master | node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py | 1835 | # 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.
"""New implementation of Visual Studio project generation."""
import os
import random
import gyp.common
# hashlib is supplied as of Python 2.5 as the replacemen... |
iver333/phantomjs | refs/heads/master | src/breakpad/src/tools/gyp/test/hello/gyptest-regyp.py | 158 | #!/usr/bin/env python
# Copyright (c) 2009 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 Makefiles get rebuilt when a source gyp file changes.
"""
import TestGyp
# Regenerating build files when a gyp file chan... |
saumishr/django | refs/heads/master | tests/regressiontests/context_processors/__init__.py | 12133432 | |
wong-github/OMOOC2py | refs/heads/master | _src/om2py1w/1wex0/__init__.py | 12133432 | |
nealtodd/django | refs/heads/master | django/conf/locale/sr/__init__.py | 12133432 | |
mefly2012/platform | refs/heads/master | bin/base/for_hbase/__init__.py | 12133432 | |
SantosDevelopers/sborganicos | refs/heads/master | venv/lib/python3.5/site-packages/django/contrib/gis/db/backends/__init__.py | 12133432 | |
psawaya/Mental-Ginger | refs/heads/master | djangoappengine/management/__init__.py | 12133432 | |
CodeYellowBV/django-binder | refs/heads/master | tests/test_reverse_fk_type_validation.py | 1 | import json
from django.test import TestCase, Client
from django.contrib.auth.models import User
from django.db.models import Max
from binder.json import jsonloads
from .compare import assert_json, MAYBE, ANY, EXTRA
from .testapp.models import Animal
class TestReverseFKValidationErrors(TestCase):
def setUp(self)... |
Maximilian-Reuter/SickRage-1 | refs/heads/master | lib/sqlalchemy/dialects/firebird/base.py | 78 | # firebird/base.py
# Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""
.. dialect:: firebird
:name: Firebird
Firebird Dialects
-----------------
... |
agx/linux-wpan-next | refs/heads/rpi-6lowpan | scripts/gdb/vmlinux-gdb.py | 593 | #
# gdb helper commands and functions for Linux kernel debugging
#
# loader module
#
# Copyright (c) Siemens AG, 2012, 2013
#
# Authors:
# Jan Kiszka <jan.kiszka@siemens.com>
#
# This work is licensed under the terms of the GNU GPL version 2.
#
import os
sys.path.insert(0, os.path.dirname(__file__) + "/scripts/gdb"... |
newerthcom/savagerebirth | refs/heads/master | libs/python-2.72/Lib/test/test_grammar.py | 14 | # Python test set -- part 1, grammar.
# This just tests whether the parser accepts them all.
from test.test_support import run_unittest, check_syntax_error, \
check_py3k_warnings
import unittest
import sys
# testing import *
from sys import *
class TokenTests(unittest.TestCase):
de... |
mgogoulos/libcloud | refs/heads/trunk | libcloud/dns/drivers/cloudflare.py | 22 | # 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 use ... |
chrisdunelm/grpc | refs/heads/master | src/python/grpcio_tests/tests/protoc_plugin/_python_plugin_test.py | 13 | # 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 or agreed to in writing... |
yqm/sl4a | refs/heads/master | python/src/Demo/scripts/eqfix.py | 43 | #! /usr/bin/env python
# Fix Python source files to use the new equality test operator, i.e.,
# if x = y: ...
# is changed to
# if x == y: ...
# The script correctly tokenizes the Python program to reliably
# distinguish between assignments and equality tests.
#
# Command line arguments are files or direct... |
Soya93/Extract-Refactoring | refs/heads/master | python/testData/codeInsight/controlflow/setcomprehension.py | 83 | { x for x in (1, 2) } = 5 |
markovmodel/adaptivemd | refs/heads/master | adaptivemd/bundle.py | 2 | ##############################################################################
# adaptiveMD: A Python Framework to Run Adaptive Molecular Dynamics (MD)
# Simulations on HPC Resources
# Copyright 2017 FU Berlin and the Authors
#
# Authors: Jan-Hendrik Prinz
# John Ossyra
# Contributors:
#
# `adaptiv... |
hybrideagle/django | refs/heads/master | tests/nested_foreign_keys/tests.py | 207 | from __future__ import unicode_literals
from django.test import TestCase
from .models import (
Event, Movie, Package, PackageNullFK, Person, Screening, ScreeningNullFK,
)
# These are tests for #16715. The basic scheme is always the same: 3 models with
# 2 relations. The first relation may be null, while the sec... |
openhatch/oh-mainline | refs/heads/master | vendor/packages/docutils/docutils/readers/doctree.py | 246 | # $Id: doctree.py 4564 2006-05-21 20:44:42Z wiemann $
# Author: Martin Blais <blais@furius.ca>
# Copyright: This module has been placed in the public domain.
"""Reader for existing document trees."""
from docutils import readers, utils, transforms
class Reader(readers.ReReader):
"""
Adapt the Reader API fo... |
stephenslab/dsc2 | refs/heads/master | src/hdf5io.py | 1 | # Copyright (c) 2014, Amit Group;
# All rights reserved.
# Copyright (c) 2016 - 2018 Gao Wang
# 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, th... |
camptocamp/c2c-rd-addons | refs/heads/8.0 | sale_order_picking/__openerp__.py | 4 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2010-2012 ChriCar Beteiligungs- und Beratungs- GmbH (<http://www.camptocamp.at>)
#
# Thi... |
erdc-cm/air-water-vv | refs/heads/master | 3d/Directional_Wave_Current_interaction/45DEG_R1/changeName.py | 10 | import os
import sys
#Listing files and storing them to list
files = os.listdir(".")
#Interactively asking for old and new name
oldname = raw_input("Give old name:")
newname = raw_input("Give new name: ")
for ff in files:
#Checking only python files
if ".py" in ff:
#Reading python file and storing
fi... |
Nuclearfossil/ATF | refs/heads/master | Test/FunctionalTests/CircuitEditorTestScripts/DeleteLayers.py | 10 | #Copyright (c) 2014 Sony Computer Entertainment America LLC. See License.txt.
import sys
sys.path.append("./CommonTestScripts")
import System
import Test
import CircuitEditorUtil
doc = atfDocService.OpenNewDocument(editor)
CircuitEditorUtil.SetGlobals(schemaLoader, Schema)
modules = []
connections = []
print "Addin... |
iamsarin/geonode | refs/heads/master | geonode/contrib/favorite/models.py | 24 | from django.conf import settings
from django.contrib.auth import get_user_model
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic
from django.db import models
from geonode.documents.models import Document
from geonode.layers.models import Layer
from geonode.maps... |
pigeonflight/strider-plone | refs/heads/master | docker/appengine/lib/django-1.3/tests/regressiontests/model_forms_regress/__init__.py | 12133432 | |
gannetson/django | refs/heads/master | django/conf/locale/sv/__init__.py | 12133432 | |
thjashin/tensorflow | refs/heads/master | tensorflow/contrib/copy_graph/python/util/copy_elements.py | 45 | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
pmarques/ansible | refs/heads/devel | test/units/plugins/strategy/test_linear.py | 58 | # Copyright (c) 2018 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from units.compat import unittest
from units.compat.mock import patc... |
jackjansen/cerbero | refs/heads/master | cerbero/packages/debian.py | 19 | # cerbero - a multi-platform build system for Open Source software
# Copyright (C) 2012 Collabora Ltd. <http://www.collabora.co.uk/>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; eit... |
purpleCowOnWheels/entityResolution | refs/heads/master | EntityResolution.py | 1 | from LibEntityResolution import *
from ClassEntityResolution import *
data = {
'A': { 'CMSID': [ 'a1', 'b1', 'c1', 'd1', 'e1' ],
'ciqid': [ 'a2', 'b2', 'c2', 'd2', 'e2' ],
'gvkey': [ 'a3', 'b3', 'c3', 'd3', 'e3' ],
'valA1': [ 'a4', 'b4', 'c4', 'd4', 'e4' ],
'valA... |
vinay-pad/commit_service | refs/heads/master | src/commitments/migrations/0002_commitment_user.py | 1 | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2017-02-27 00:44
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('commitme... |
40423144/2017springcd_hw | refs/heads/gh-pages | data/py/script1.py | 22 | import sys
import time
import traceback
import javascript
from browser import document as doc, window, alert
has_ace = True
try:
editor = window.ace.edit("editor")
session = editor.getSession()
session.setMode("ace/mode/python")
editor.setOptions({
'enableLiveAutocompletion': True,
'enableS... |
snyderr/robotframework | refs/heads/Robotframework_SkipExecution | utest/utils/test_timestampcache.py | 9 | import time
import unittest
from robot.utils.asserts import assert_equal
from robot.utils.robottime import TimestampCache
class FakeTimestampCache(TimestampCache):
def __init__(self, epoch):
TimestampCache.__init__(self)
self.epoch = epoch + self.timezone_correction()
def _get_epoch(self):
... |
gskachkov/phantomjs | refs/heads/master | src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/steps/haslanded_unittest.py | 124 | # Copyright (C) 2009 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... |
Jgarcia-IAS/SITE | refs/heads/master | addons/stock/partner.py | 375 | # -*- 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... |
tangfeixiong/nova | refs/heads/stable/juno | nova/db/sqlalchemy/migrate_repo/versions/253_add_pci_requests_to_instance_extra_table.py | 81 | # 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... |
tareqalayan/ansible | refs/heads/devel | lib/ansible/plugins/netconf/default.py | 79 | #
# (c) 2017 Red Hat Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is d... |
ojii/django-cms | refs/heads/develop | cms/tests/docs.py | 2 | # -*- coding: utf-8 -*-
from __future__ import with_statement
from cms.test_utils.compat import skipIf
from cms.test_utils.testcases import CMSTestCase
from cms.test_utils.util.context_managers import TemporaryDirectory
from sphinx.application import Sphinx
import cms
import os
import socket
from cms.utils.compat.strin... |
arshvin/scripts | refs/heads/master | nagios/check-oozie-coordinators.py | 1 | #!/usr/bin/env python
import sys
import json
import urllib2
import datetime
def loadRunningCoordsData(oozieHost):
coords_data_json = urllib2.urlopen(
"http://{0}:11000/oozie/v1/jobs?filter=status%3DRUNNING&jobtype=coordinator&len=1000".format(oozieHost)).read()
return json.loads(coords_data_json)['coo... |
Sparker0i/fosswebsite | refs/heads/master | achievements/migrations/__init__.py | 12133432 | |
steveb/tablib | refs/heads/develop | tablib/packages/openpyxl3/writer/drawings.py | 116 | # coding=UTF-8
'''
Copyright (c) 2010 openpyxl
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, modify, merge, publ... |
40223137/w17w17 | refs/heads/master | static/Brython3.1.0-20150301-090019/Lib/browser/websocket.py | 618 | from browser import window
import javascript
WebSocket = javascript.JSConstructor(window.WebSocket) |
wilvk/ansible | refs/heads/devel | lib/ansible/modules/windows/win_regmerge.py | 14 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2015, Jon Hawkesworth (@jhawkesworth) <figs@unity.demon.co.uk>
#
# 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, eith... |
eamonnfaherty/docker-python-falcon-example | refs/heads/master | src/things.py | 1 | import falcon
class ThingsResource:
def on_get(self, req, resp):
resp.status = falcon.HTTP_200
resp.body = ('\nhello world\n\n')
app = falcon.API()
things = ThingsResource()
app.add_route('/things', things)
|
rahul67/hue | refs/heads/master | desktop/core/ext-py/pysaml2-2.4.0/src/saml2/extension/shibmd.py | 34 | #!/usr/bin/env python
#
# Generated Sun Mar 20 18:06:44 2011 by parse_xsd.py version 0.4.
#
import saml2
from saml2 import SamlBase
import xmldsig as ds
NAMESPACE = 'urn:mace:shibboleth:metadata:1.0'
class Scope(SamlBase):
"""The urn:mace:shibboleth:metadata:1.0:Scope element """
c_tag = 'Scope'
c_na... |
procamora/Wiki-Personal | refs/heads/master | pelican-plugins/liquid_tags/vimeo.py | 25 | """
Vimeo Tag
---------
This implements a Liquid-style vimeo tag for Pelican,
based on the youtube tag which is in turn based on
the jekyll / octopress youtube tag [1]_
Syntax
------
{% vimeo id [width height] %}
Example
-------
{% vimeo 10739054 640 480 %}
Output
------
<span style="width:640px; height:480px;">
... |
tom111/Binomials | refs/heads/master | cellular.py | 1 | def is_cellular (I):
"""
This function test whether a given binomial ideal is cellular. In
the affirmative case it output the largest subset of variables
such that I is cellular. In the negative case a variable which is
a zerodivisor but not nilpotent is found.
EXAMPLE
R = QQ['a,b,c,d']
... |
daltonmaag/robofab | refs/heads/master | Docs/Examples/talks/session6_11.py | 7 | # robothon06
# show OpenType naming records
# in the fontlab API
from robofab.world import CurrentFont
f = CurrentFont()
fn = f.naked()
for r in fn.fontnames:
print r.nid, r.pid, r.eid, r.lid, r.name
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.