repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
SimonSapin/servo | refs/heads/master | tests/wpt/web-platform-tests/tools/third_party/pytest/testing/test_nodes.py | 30 | import pytest
from _pytest import nodes
@pytest.mark.parametrize(
"baseid, nodeid, expected",
(
("", "", True),
("", "foo", True),
("", "foo/bar", True),
("", "foo/bar::TestBaz::()", True),
("foo", "food", False),
("foo/bar::TestBaz::()", "foo/bar", False),
... |
maropu/spark | refs/heads/master | examples/src/main/python/ml/vector_indexer_example.py | 27 | #
# 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... |
uTest/Androguard | refs/heads/master | androguard/core/bytecodes/libdvm/__init__.py | 12133432 | |
laurentgo/pants | refs/heads/master | src/python/pants/pantsd/__init__.py | 12133432 | |
bckwltn/SickRage | refs/heads/master | sickbeard/config.py | 1 | # Author: Nic Wolfe <nic@wolfeden.ca>
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of SickRage.
#
# SickRage 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,... |
SCgeeker/OpenSesame | refs/heads/master | libqtopensesame/runners/external_runner.py | 2 | #-*- coding:utf-8 -*-
"""
This file is part of OpenSesame.
OpenSesame 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.
OpenSesame is distri... |
nesdis/djongo | refs/heads/master | tests/django_tests/tests/v21/tests/gis_tests/geoadmin/urls.py | 573 | from django.conf.urls import include, url
from django.contrib import admin
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
]
|
aperigault/ansible | refs/heads/devel | test/units/modules/network/dellos10/test_dellos10_facts.py | 56 | # (c) 2016 Red Hat Inc.
#
# (c) 2017 Dell EMC.
#
# 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 vers... |
robinro/ansible-modules-core | refs/heads/devel | cloud/openstack/os_floating_ip.py | 12 | #!/usr/bin/python
# Copyright (c) 2015 Hewlett-Packard Development Company, L.P.
# Author: Davide Guerri <davide.guerri@hp.com>
#
# This module is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 ... |
dblodgett-usgs/OWSLib | refs/heads/master | tests/utils.py | 16 | from __future__ import (absolute_import, division, print_function)
import logging
import os
import sys
from owslib.etree import etree, ElementType
try: # Python 3
from urllib.parse import urlparse
except ImportError: # Python 2
from urlparse import urlparse
def setup_logging(loglevel='I... |
martinlunde/RealBack | refs/heads/dev | realback_api/apps.py | 1 | from django.apps import AppConfig
class RealbackApiConfig(AppConfig):
name = 'realback_api'
verbose_name = "RealBack backend API"
|
langerhans/dogecoin | refs/heads/1.9-dev | share/qt/make_spinner.py | 563 | #!/usr/bin/env python
# W.J. van der Laan, 2011
# Make spinning 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.png'
TMPDIR='../../src/qt/res/movies/'
TMPNAME='spinner-%03i.png'
NUMFRAMES=35
FRAMERA... |
worldsproject/tellme-cat | refs/heads/master | manage.py | 1 | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "followup.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
|
zubair-arbi/edx-platform | refs/heads/master | common/lib/capa/capa/tests/test_html_render.py | 11 | import unittest
from lxml import etree
import os
import textwrap
import mock
from .response_xml_factory import StringResponseXMLFactory, CustomResponseXMLFactory
from . import test_capa_system, new_loncapa_problem
class CapaHtmlRenderTest(unittest.TestCase):
def setUp(self):
super(CapaHtmlRenderTest, s... |
DhiaEddineSaidi/python-social-auth | refs/heads/master | social/backends/slack.py | 68 | """
Slack OAuth2 backend, docs at:
http://psa.matiasaguirre.net/docs/backends/slack.html
https://api.slack.com/docs/oauth
"""
import re
from social.backends.oauth import BaseOAuth2
class SlackOAuth2(BaseOAuth2):
"""Slack OAuth authentication backend"""
name = 'slack'
AUTHORIZATION_URL = 'https://... |
googlefonts/fontbakery | refs/heads/main | Lib/fontbakery/profiles/kern.py | 1 | from fontbakery.callable import check
from fontbakery.status import FAIL, INFO, PASS, WARN
from fontbakery.message import Message
# used to inform get_module_profile whether and how to create a profile
from fontbakery.fonts_profile import profile_factory # NOQA pylint: disable=unused-import
@check(
id = 'com.googl... |
nrc/rustc-perf | refs/heads/master | collector/benchmarks/script-servo/components/script/dom/bindings/codegen/parser/tests/test_error_colno.py | 261 | import WebIDL
def WebIDLTest(parser, harness):
# Check that error messages put the '^' in the right place.
threw = False
input = 'interface ?'
try:
parser.parse(input)
results = parser.finish()
except WebIDL.WebIDLError, e:
threw = True
lines = str(e).split('\n')
... |
caktus/smsdemo | refs/heads/master | smsgroups/tests/__init__.py | 12133432 | |
andela-ooshodi/codango-debug | refs/heads/master | codango/comments/tests/__init__.py | 12133432 | |
takeshineshiro/django | refs/heads/master | tests/null_fk/__init__.py | 12133432 | |
ptmr3/i717-7005_ICS_Kernel | refs/heads/master | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py | 12980 | # SchedGui.py - Python extension for perf script, basic GUI code for
# traces drawing and overview.
#
# Copyright (C) 2010 by Frederic Weisbecker <fweisbec@gmail.com>
#
# This software is distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
... |
cjlee112/socraticqs2 | refs/heads/master | mysite/mysite/tests/test_helpers.py | 1 | import pytest
from django.core.files.base import ContentFile
import base64
from mysite.helpers import base64_to_file
BASE64_GIF_IMAGE = 'R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7'
@pytest.mark.parametrize('base64,expected', [
(
'data:image/gif;base64,{}'.format(BASE64_GIF_IMAGE),
... |
Helica-core/OjSubmiter | refs/heads/master | spider.py | 1 | # -*- coding: utf-8 -*-
#
#---------------------------------------------------
# 爬虫:hustoj_spider
# 作者: helica
# 日期: 2015-8-12
# 语言: py2
#
#
#---------------------------------------------------
import urllib
import urllib2
import re
import cookielib
global cookie
cookie = cookielib.CookieJar()
def login():
... |
vipul-sharma20/oh-mainline | refs/heads/master | vendor/packages/beautifulsoup4/bs4/builder/__init__.py | 447 | from collections import defaultdict
import itertools
import sys
from bs4.element import (
CharsetMetaAttributeValue,
ContentMetaAttributeValue,
whitespace_re
)
__all__ = [
'HTMLTreeBuilder',
'SAXTreeBuilder',
'TreeBuilder',
'TreeBuilderRegistry',
]
# Some useful features for a Tree... |
mfraezz/osf.io | refs/heads/develop | framework/utils.py | 18 | from __future__ import absolute_import
import re
import pytz
import time
from datetime import datetime
from django.utils import timezone
from werkzeug.utils import secure_filename as werkzeug_secure_filename
def iso8601format(dt):
"""Given a datetime object, return an associated ISO-8601 string"""
return dt.s... |
Mozta/pagina-diagnostijuego | refs/heads/master | venv/lib/python2.7/site-packages/django/utils/baseconv.py | 650 | # Copyright (c) 2010 Guilherme Gondim. All rights reserved.
# Copyright (c) 2009 Simon Willison. All rights reserved.
# Copyright (c) 2002 Drew Perttula. All rights reserved.
#
# License:
# Python Software Foundation License version 2
#
# See the file "LICENSE" for terms & conditions for usage, and a DISCLAIMER OF
# ... |
rohitw1991/smartfrappe | refs/heads/develop | frappe/model/sync.py | 31 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
"""
Sync's doctype and docfields from txt files to database
perms will get synced only if none exist
"""
import frappe
import os, sys
from frappe.modules.import_file import i... |
lscalfi/imogolite | refs/heads/master | 2-Isotherms/0-UnitCell/create.py | 1 | from chemfiles import Trajectory, UnitCell, Atom, Topology, Frame, Selection
name = "nt12.opt"
a = 24.2
# Read the frame
frame = Trajectory(name+".xyz").read()
# Set the topology
topo = Trajectory("topology.pdb").read()
frame.set_topology(topo.topology())
# Get the positions
positions = frame.positions()
# Set the... |
supersven/intellij-community | refs/heads/master | python/testData/mover/moveOut.py | 83 | while condition1:
pass
if condition:
test<caret>1()
else:
test2() |
deployed/django | refs/heads/master | django/conf/app_template/__init__.py | 12133432 | |
oinopion/django | refs/heads/master | django/contrib/messages/middleware.py | 1220 | from django.conf import settings
from django.contrib.messages.storage import default_storage
class MessageMiddleware(object):
"""
Middleware that handles temporary messages.
"""
def process_request(self, request):
request._messages = default_storage(request)
def process_response(self, re... |
ilmir-k/website-addons | refs/heads/8.0 | website_files/controllers/website_files.py | 1 | # -*- coding: utf-8 -*-
import re
import json
from openerp import http
from openerp.http import request
from openerp.addons.website.controllers.main import Website
import logging
_logger = logging.getLogger(__name__)
class WebsiteFile(Website):
def _find_website_filename(self, filename):
name = ext = '... |
sio2project/oioioi | refs/heads/master | oioioi/teams/utils.py | 1 | from oioioi.base.permissions import make_request_condition, not_anonymous
from oioioi.contests.utils import is_contest_admin
from oioioi.teams.models import Team, TeamMembership, TeamsConfig
@make_request_condition
def teams_enabled(request):
try:
return request.contest.teamsconfig.enabled
except Team... |
jvalleroy/plinth-debian | refs/heads/master | plinth/modules/jsxc/__init__.py | 2 | #
# This file is part of Plinth.
#
# 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 distribute... |
indictranstech/osmosis-frappe | refs/heads/develop | frappe/email/doctype/email_alert/test_email_alert.py | 3 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe, frappe.utils, frappe.utils.scheduler
import unittest
test_records = frappe.get_test_records('Email Alert')
class TestEmailAlert(unittest.TestCase):
def setUp(self):
frappe.... |
levkar/odoo | refs/heads/10.0 | addons/point_of_sale/models/res_config.py | 24 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models
class PosConfiguration(models.TransientModel):
_inherit = 'res.config.settings'
_name = 'pos.config.settings'
module_pos_restaurant = fields.Selection([
(0, "Point of... |
bitcraft/firmata_aio | refs/heads/master | firmata_aio/protocol/factory.py | 1 | """
Provide Factory class to generate and parse packet data
"""
from .commands import nibble_commands, byte_commands, sysex_commands
from .commands import command_names, command_lookup
class UnhandledPacketType(Exception):
pass
class Container(dict):
"""
A generic container of attributes.
Containers... |
daenamkim/ansible | refs/heads/devel | lib/ansible/plugins/action/aireos_config.py | 52 | #
# (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... |
Clarity-89/clarityv2 | refs/heads/master | src/clarityv2/blog/migrations/__init__.py | 12133432 | |
synergeticsedx/deployment-wipro | refs/heads/oxa/master.fic | common/djangoapps/student/__init__.py | 12133432 | |
janbrohl/HashCrypto | refs/heads/master | tests/__init__.py | 12133432 | |
NeCTAR-RC/neutron | refs/heads/master | neutron/plugins/hyperv/agent/__init__.py | 12133432 | |
t0mk/ansible | refs/heads/devel | lib/ansible/utils/path.py | 79 | # (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... |
swcarpentry/amy | refs/heads/develop | amy/workshops/util.py | 1 | # coding: utf-8
from collections import namedtuple, defaultdict
import csv
import datetime
from functools import wraps
from hashlib import sha1
from itertools import chain
import logging
import re
from typing import Optional, Union, Tuple
import requests
import yaml
from django.contrib.auth.decorators import (
use... |
dustinlarimer/collab-pad | refs/heads/master | src/node_modules/npm/node_modules/node-gyp/gyp/test/actions-multiple/gyptest-all.py | 345 | #!/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 two actions can be attached to the same input files.
"""
import sys
import TestGyp
test = TestGyp.TestGyp()
test.run_gyp('a... |
andete/madparts | refs/heads/master | main/__init__.py | 12133432 | |
bop/foundation | refs/heads/master | lib/python2.7/site-packages/django/conf/locale/pt/__init__.py | 12133432 | |
masterdon/Veil-Evasion | refs/heads/master | modules/payloads/auxiliary/__init__.py | 12133432 | |
sberbank-ai/holdem-challenge | refs/heads/master | PyPokerEngine/examples/__init__.py | 12133432 | |
anselmobd/fo2 | refs/heads/master | src/produto/__init__.py | 12133432 | |
creative-quant/financial-data-utils | refs/heads/master | tests/earnings/__init__.py | 12133432 | |
ds-hwang/chromium-crosswalk | refs/heads/master | third_party/cython/src/Cython/Utility/__init__.py | 12133432 | |
mstriemer/olympia | refs/heads/master | src/olympia/amo/cron.py | 3 | import itertools
from datetime import datetime, timedelta
from subprocess import Popen, PIPE
from django.conf import settings
from django.db import connection
import cronjobs
import commonware.log
import waffle
from olympia import amo
from olympia.amo.utils import chunked
from olympia.amo.helpers import user_media_p... |
pytest-dev/pytest | refs/heads/main | src/_pytest/mark/structures.py | 2 | import collections.abc
import inspect
import warnings
from typing import Any
from typing import Callable
from typing import Collection
from typing import Iterable
from typing import Iterator
from typing import List
from typing import Mapping
from typing import MutableMapping
from typing import NamedTuple
from typing im... |
xq262144/hue | refs/heads/master | desktop/core/ext-py/boto-2.46.1/boto/ec2/cloudwatch/dimension.py | 152 | # Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modi... |
emschorsch/scrapy | refs/heads/master | scrapy/contrib/downloadermiddleware/downloadtimeout.py | 7 | """
Download timeout middleware
See documentation in docs/topics/downloader-middleware.rst
"""
from scrapy.utils.python import WeakKeyCache
class DownloadTimeoutMiddleware(object):
def __init__(self, timeout=180):
self._cache = WeakKeyCache(self._download_timeout)
self._timeout = timeout
@c... |
ita1024/samba | refs/heads/master | third_party/pep8/testsuite/E40.py | 44 | #: E401
import os, sys
#: Okay
import os
import sys
from subprocess import Popen, PIPE
from myclass import MyClass
from foo.bar.yourclass import YourClass
import myclass
import foo.bar.yourclass
#: E402
__all__ = ['abc']
import foo
#: Okay
try:
import foo
except:
pass
else:
print('imported foo')
finally... |
js0701/chromium-crosswalk | refs/heads/master | tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/http_to_direct_fallback.py | 31 | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry.page import page as page_module
from telemetry import story
class HTTPToDirectFallbackPage(page_module.Page):
"""Page that tests falling b... |
cousteaulecommandant/youtube-dl | refs/heads/master | test/test_unicode_literals.py | 168 | from __future__ import unicode_literals
# Allow direct execution
import os
import sys
import unittest
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import io
import re
rootDir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
IGNORED_FILES = [
'setup.py', # http://... |
MackZxh/OCA-Choice | refs/heads/8.0 | website/website_logo/migrations/8.0.2.0.0/post-migration.py | 13 | # -*- coding: utf-8 -*-
# License AGPL-3: Antiun Ingenieria S.L. - Antonio Espinosa
# See README.rst file on addon root folder for more details
def migrate(cr, version):
# Copy res.company.website_logo_to_be_delete to
# first website.logo to that company
cr.execute("""
SELECT c.id, c.website_log... |
Isendir/brython | refs/heads/master | www/src/Lib/test/test_json/test_decode.py | 28 | import decimal
from io import StringIO
from collections import OrderedDict
from test.test_json import PyTest, CTest
class TestDecode:
def test_decimal(self):
rval = self.loads('1.1', parse_float=decimal.Decimal)
self.assertTrue(isinstance(rval, decimal.Decimal))
self.assertEqual(rval, deci... |
hexxter/home-assistant | refs/heads/dev | homeassistant/components/sensor/twitch.py | 6 | """
Support for the Twitch stream status.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.twitch/
"""
import logging
import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.helpers.entity import Ent... |
saurabh6790/omnitech-app | refs/heads/master | stock/doctype/item/templates/generators/__init__.py | 12133432 | |
kamyu104/django | refs/heads/master | tests/inline_formsets/__init__.py | 12133432 | |
qsnake/gpaw | refs/heads/master | gpaw/response/__init__.py | 12133432 | |
Maccimo/intellij-community | refs/heads/master | python/testData/refactoring/move/oldStyleRelativeImport/before/src/pkg/subpkg/c.py | 12133432 | |
AllisonWang/incubator-airflow | refs/heads/master | airflow/api/auth/backend/__init__.py | 1049 | # -*- coding: utf-8 -*-
#
# 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
... |
S-YOU/grumpy | refs/heads/master | third_party/stdlib/contextlib.py | 7 | """Utilities for with-statement contexts. See PEP 343."""
import sys
# from functools import wraps
import functools
wraps = functools.wraps
# from warnings import warn
import warnings
warn = warnings.warn
__all__ = ["contextmanager", "nested", "closing"]
class GeneratorContextManager(object):
"""Helper for @co... |
CLAV88/FEWD | refs/heads/master | node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py | 1355 | # Copyright (c) 2013 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.
"""cmake output module
This module is under development and should be considered experimental.
This module produces cmake (2.8.8+) input as its output. One CMake... |
75651/kbengine_cloud | refs/heads/master | kbe/src/lib/python/Lib/test/test_json/test_float.py | 126 | import math
from test.test_json import PyTest, CTest
class TestFloat:
def test_floats(self):
for num in [1617161771.7650001, math.pi, math.pi**100, math.pi**-100, 3.1]:
self.assertEqual(float(self.dumps(num)), num)
self.assertEqual(self.loads(self.dumps(num)), num)
def test_in... |
huntxu/fuel-web | refs/heads/master | nailgun/nailgun/test/unit/test_attributes_generators.py | 3 | # -*- coding: utf-8 -*-
# Copyright 2014 Mirantis, 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 requir... |
zhilts/pymockito | refs/heads/master | mockito_test/demo_test.py | 2 | # Copyright (c) 2008-2013 Szczepan Faber, Serhiy Oplakanets, Herr Kaste
#
# 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
... |
UrLab/beta402 | refs/heads/master | www/serializers.py | 1 | from rest_framework import serializers
from actstream.models import Action
from users.serializers import SmallUserSerializer
from documents.models import Document
from catalog.models import Course
from telepathy.models import Message, Thread
class PolymorphicSerializer(serializers.ModelSerializer):
obj_type = s... |
codeforkansascity/address-api | refs/heads/master | BDD/jasmine/lib/jasmine-core/core.py | 163 | import pkg_resources
try:
from collections import OrderedDict
except ImportError:
from ordereddict import OrderedDict
class Core(object):
@classmethod
def js_package(cls):
return __package__
@classmethod
def css_package(cls):
return __package__
@classmethod
def image_... |
hzj123/56th | refs/heads/master | pombola/core/tests/test_templatetags.py | 4 | # coding=UTF-8
from django.test import TestCase
from ..templatetags.breadcrumbs import breadcrumbs, path_element_overrides
from ..templatetags.active_class import active_class
class BreadcrumbTest(TestCase):
def test_breadcrumbs(self):
"""Check that the breadcrumbs are generated as expected"""
... |
GoSteven/Diary | refs/heads/master | django/bin/django-admin.py | 15 | #!/usr/bin/env python
from django.core import management
if __name__ == "__main__":
management.execute_from_command_line()
|
DeepVisionTeam/TensorFlowBook | refs/heads/master | rnn/chatbot/seq2seq_conversation_model/tokenizer.py | 2 | # coding=utf8
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import glob
import re
import sys
from tensorflow.python.platform import gfile
from settings import VOCAB_DICT_FILE
_PAD = "_PAD"
_GO = "_GO"
_EOS = "_EOS"
_UNK = "_UNK"
_START_VOCAB = [_PAD, _G... |
gregdek/ansible | refs/heads/devel | test/units/modules/network/onyx/test_onyx_linkagg.py | 68 | #
# Copyright: 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.mock import patch
from ansible.modules.network.onyx impor... |
riteshshrv/django | refs/heads/master | tests/view_tests/app0/__init__.py | 12133432 | |
brunobord/django-chartjs | refs/heads/master | chartjs/views/__init__.py | 12133432 | |
MalloyPower/parsing-python | refs/heads/master | front-end/testsuite-python-lib/Python-2.5/Lib/plat-mac/Audio_mac.py | 8 | QSIZE = 100000
error='Audio_mac.error'
class Play_Audio_mac:
def __init__(self, qsize=QSIZE):
self._chan = None
self._qsize = qsize
self._outrate = 22254
self._sampwidth = 1
self._nchannels = 1
self._gc = []
self._usercallback = None
def __del__(self):
... |
lexrupy/gmate-editor | refs/heads/master | GMATE/plugins/gotofile/__init__.py | 1 | # -*- coding: utf-8 -*-
# GMate - Plugin Based Programmer's Text Editor
# Copyright © 2008-2009 Alexandre da Silva
#
# This file is part of Gmate.
#
# See LICENTE.TXT for licence information
# Based on snap-open v1.1.5
import gtk, gtk.glade
import os, os.path, gobject
import i18n as i
from GMATE.gmate_plugin import G... |
MrTheodor/pyh5md | refs/heads/master | pyh5md/box.py | 2 | # -*- coding: utf-8 -*-
# Copyright 2014 Pierre de Buyl
#
# This file is part of pyh5md
#
# pyh5md is free software and is licensed under the modified BSD license (see
# LICENSE file).
import numpy as np
import h5py
from pyh5md.base import VL_STR, TimeData, FixedData, is_h5md
from pyh5md.utils import create_compact_d... |
mikel-egana-aranguren/SADI-Galaxy-Docker | refs/heads/master | galaxy-dist/lib/galaxy/model/migrate/versions/0091_add_tool_version_tables.py | 1 | """
Migration script to create the tool_version and tool_version_association tables and drop the tool_id_guid_map table.
"""
from sqlalchemy import *
from sqlalchemy.orm import *
from migrate import *
from migrate.changeset import *
import datetime
now = datetime.datetime.utcnow
# Need our custom types, but don't imp... |
buenrostrolab/proatac | refs/heads/master | tests/test_cli.py | 1 | import pytest
from click.testing import CliRunner
from parkour import cli
import md5
def file_checksums_equal(file1, file2):
with open(file1) as f:
checksum1 = md5.new(f.read()).digest()
with open(file2) as f:
checksum2 = md5.new(f.read()).digest()
return checksum1==checksum2
def test_t... |
takeshineshiro/neutron | refs/heads/master | neutron/plugins/brocade/db/models.py | 63 | # Copyright 2013 Brocade Communications System, 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
#
#... |
pilou-/ansible | refs/heads/devel | lib/ansible/modules/cloud/azure/azure_rm_resourcegroup_facts.py | 11 | #!/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
ANS... |
lzxz1234/nutz | refs/heads/master | tools/py/nutzwiki.py | 20 | # define the variable
wiki_src = "";
wiki_src_en = "";
tmp = "";
wiki_dest = "";
# copy wiki file to source
# copy en-wiki file to source
# copy images / css / html / xml to en-wiki
# parse the index.xml in en-wiki, and change its title
# process the zdoc for wiki-target
# process the zdoc for en-... |
kool79/intellij-community | refs/heads/master | python/testData/reparse/SimilarDecorators.py | 79 | @decorator('a')
def foo():
pass
@decorator('b')
de<caret>
|
YuanYouYuan/FreeCAD | refs/heads/master | src/Mod/Part/TestPartGui.py | 27 | # (c) Juergen Riegel (FreeCAD@juergen-riegel.net) 2011 LGPL *
# *
# This file is part of the FreeCAD CAx development system. *
# *
# This pro... |
dulems/hue | refs/heads/master | desktop/core/ext-py/Mako-0.8.1/test/test_template.py | 36 | # -*- coding: utf-8 -*-
from mako.template import Template, ModuleTemplate
from mako.lookup import TemplateLookup
from mako.ext.preprocessors import convert_comments
from mako import exceptions, runtime
from mako import compat
from mako import util
import os
from test.util import flatten_result, result_lines
from mako... |
pyq881120/the-backdoor-factory | refs/heads/master | intel/WinIntelPE64.py | 3 | ''''
Copyright (c) 2013-2015, Joshua Pitts
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and ... |
pymedusa/Medusa | refs/heads/master | ext/github/ContentFile.py | 2 | # -*- coding: utf-8 -*-
############################ Copyrights and license ############################
# #
# Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> #
# Copyright 2012 Zearin <zearin@gonk.net> ... |
googleapis/googleapis-gen | refs/heads/master | google/cloud/functions/v1/functions-v1-py/scripts/fixup_functions_v1_keywords.py | 2 | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# 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 requi... |
rkoshak/sensorReporter | refs/heads/main | mqtt/__init__.py | 12133432 | |
nwiizo/workspace_2017 | refs/heads/master | ansible-modules-core/network/dellos6/__init__.py | 12133432 | |
Strassengezwitscher/Strassengezwitscher | refs/heads/develop | crowdgezwitscher/users/tests/__init__.py | 12133432 | |
tartavull/google-cloud-python | refs/heads/master | core/tests/unit/test_client.py | 2 | # Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
amanzi/ats-dev | refs/heads/master | tools/visit_ats/visit_ats/visit_colormaps.py | 2 | import visit as v
common_colors = dict(w=(255,255,255,255),
k=(0,0,0,255),
r=(255,0,0,255),
g=(0,255,0,255),
b=(0,0,255,255)
)
_added_temps = []
def createTemperaturesColorMap(Tmin, Tmax, zero=0., name="temperatu... |
TomWerner/HawkeyeChallenge | refs/heads/master | minos/migrations/0001_initial.py | 42 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-01-27 21:54
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Greetin... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.