repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
peerster/CouchPotatoServer
refs/heads/master
libs/rsa/transform.py
216
# -*- coding: utf-8 -*- # # Copyright 2011 Sybren A. Stüvel <sybren@stuvel.eu> # # 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 # # Unl...
gwiedeman/eadmachine
refs/heads/master
source/SpreadsheettoEAD/SpreadsheettoEAD-old.py
1
import xml.etree.cElementTree as ET from func.prettyprint import prettyprint import func.globals import wx from func.messages import error from xml.dom import minidom import os.path def SpreadsheettoEAD(input_xml, template_xml): ET.register_namespace('dc','http://purl.org/DC/elements/1.0/') input_file = ET.Eleme...
broferek/ansible
refs/heads/devel
test/units/modules/network/f5/test_bigip_gtm_monitor_https.py
38
# -*- coding: utf-8 -*- # # Copyright: (c) 2017, F5 Networks Inc. # 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 import os import json import pytest import sys if sys.version_info < (2...
garrettkatz/copct
refs/heads/master
baxter_corpus/demo_replace_red_with_green_1.py
2
demo = ( ( ( ("workspace", "Workspace"), ("table", "Block"), ("dock-case", "DockCase"), ("dock-case_1", "Block"), ("dock-body", "DockDrawer"), ("dock-body_2", "DockFrontPanel"), ("dock-body_2_1", "Prism"), ("dock-body_2_2", "Block"), ("dock-body_2_3", "Block"), ("dock-body_4", "DockHandle"), ("do...
hynekcer/django
refs/heads/master
django/db/migrations/operations/base.py
356
from __future__ import unicode_literals from django.db import router class Operation(object): """ Base class for migration operations. It's responsible for both mutating the in-memory model state (see db/migrations/state.py) to represent what it performs, as well as actually performing it agains...
sushi-irc/nigiri
refs/heads/master
typecheck.py
1
# coding: UTF-8 """ Copyright (c) 2009 Marian Tietz 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 a...
apache/airflow
refs/heads/main
airflow/providers/salesforce/hooks/tableau.py
2
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
jambolo/bitcoin
refs/heads/master
test/functional/rpc_blockchain.py
5
#!/usr/bin/env python3 # Copyright (c) 2014-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test RPCs related to blockchainstate. Test the following RPCs: - getblockchaininfo - gettxouts...
jumping/Diamond
refs/heads/master
src/collectors/puppetdb/test/testpuppetdb.py
31
#!/usr/bin/python # coding=utf-8 ########################################################################## from test import CollectorTestCase from test import get_collector_config from test import unittest from puppetdb import PuppetDBCollector #######################################################################...
django-nonrel/django
refs/heads/nonrel-1.6
django/core/management/commands/check.py
119
from __future__ import unicode_literals import warnings from django.core.checks.compatibility.base import check_compatibility from django.core.management.base import NoArgsCommand class Command(NoArgsCommand): help = "Checks your configuration's compatibility with this version " + \ "of Django." ...
darknight-007/Firmware
refs/heads/master
Tools/usb_serialload.py
16
import serial, time port = serial.Serial('/dev/ttyACM0', baudrate=57600, timeout=2) data = '01234567890123456789012345678901234567890123456789' #data = 'hellohello' outLine = 'echo %s\n' % data port.write('\n\n\n') port.write('free\n') line = port.readline(80) while line != '': print(line) line = port.readl...
yesudeep/mils-secure
refs/heads/master
app/console/app/pygments/scanner.py
27
# -*- coding: utf-8 -*- """ pygments.scanner ~~~~~~~~~~~~~~~~ This library implements a regex based scanner. Some languages like Pascal are easy to parse but have some keywords that depend on the context. Because of this it's impossible to lex that just by using a regular expression lexer like ...
hornn/interviews
refs/heads/pairing_sizeunit_AT120115
tools/bin/ext/simplejson/tests/test_float.py
26
def test_floats(): import simplejson for num in [1617161771.7650001]: assert simplejson.dumps(num) == repr(num)
proxysh/Safejumper-for-Mac
refs/heads/master
buildlinux/env32/lib/python2.7/site-packages/packaging/specifiers.py
1107
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import abc import functools import itertools import re from ._compat impo...
iamaleksey/cassandra-dtest
refs/heads/master
udtencoding_test.py
8
import time import logging from tools.assertions import assert_invalid from dtest import Tester, create_ks logger = logging.getLogger(__name__) class TestUDTEncoding(Tester): def test_udt(self): """ Test (somewhat indirectly) that user queries involving UDT's are properly encoded (due to driver not rec...
superfluidity/RDCL3D
refs/heads/master
code/toscaparser/elements/artifacttype.py
2
# 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...
krzychb/rtd-test-bed
refs/heads/master
components/nghttp/nghttp2/doc/_exts/sphinxcontrib/rubydomain.py
4
# -*- coding: utf-8 -*- """ sphinx.domains.ruby ~~~~~~~~~~~~~~~~~~~ The Ruby domain. :copyright: Copyright 2010 by SHIBUKAWA Yoshiki :license: BSD, see LICENSE for details. """ import re from docutils import nodes from docutils.parsers.rst import directives from sphinx import addnodes from sphi...
jagguli/intellij-community
refs/heads/master
python/testData/codeInsight/smartEnter/spaceInsertedAfterHashSignInComment_after.py
79
# foo # <caret> pass
faywong/FFPlayer
refs/heads/trunk
project/jni/python/src/Lib/plat-riscos/rourl2path.py
66
"""riscos specific module for conversion between pathnames and URLs. Based on macurl2path. Do not import directly, use urllib instead.""" import string import urllib __all__ = ["url2pathname","pathname2url"] __slash_dot = string.maketrans("/.", "./") def url2pathname(url): """OS-specific conversion from a relat...
chouseknecht/ansible
refs/heads/devel
lib/ansible/modules/system/modprobe.py
52
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2013, David Stygstra <david.stygstra@gmail.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_v...
abusse/cinder
refs/heads/master
cinder/db/sqlalchemy/migrate_repo/versions/002_quota_class.py
5
# Copyright 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
google/grr
refs/heads/master
grr/core/grr_response_core/config/gui.py
1
#!/usr/bin/env python """Configuration parameters for the admin UI.""" from grr_response_core.lib import config_lib from grr_response_core.lib.rdfvalues import config as rdf_config # The Admin UI web application. config_lib.DEFINE_integer("AdminUI.port", 8000, "port to listen on") config_lib.DEFINE_integer( "Ad...
diorcety/intellij-community
refs/heads/master
python/lib/Lib/repr.py
417
"""Redo the builtin repr() (representation) but with limits on most sizes.""" __all__ = ["Repr","repr"] import __builtin__ from itertools import islice class Repr: def __init__(self): self.maxlevel = 6 self.maxtuple = 6 self.maxlist = 6 self.maxarray = 5 self.maxdict = 4 ...
waigani/GoSublime
refs/heads/master
gstest.py
12
from gosubl import gs from gosubl import mg9 import os import re import sublime import sublime_plugin DOMAIN = 'GsTest' TEST_PAT = re.compile(r'^((Test|Example|Benchmark)\w*)') class GsTestCommand(sublime_plugin.WindowCommand): def is_enabled(self): return gs.is_go_source_view(self.window.active_view()) def run...
guijomatos/SickRage
refs/heads/master
sickbeard/providers/animenzb.py
7
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard 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 Lice...
aaronelliotross/django-tastypie
refs/heads/master
tests/core/tests/resource_urls.py
13
from django.conf.urls import include, url from django.contrib.auth.models import User from tastypie import fields from tastypie.resources import ModelResource from core.models import Note, Subject from core.tests.api import Api class SubjectResource(ModelResource): class Meta: resource_name = 'subjects' ...
miguelparaiso/OdooAccessible
refs/heads/master
addons/account/wizard/account_vat.py
378
# -*- 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...
hesseltuinhof/mxnet
refs/heads/master
tests/python/unittest/common.py
8
import sys, os curr_path = os.path.dirname(os.path.abspath(os.path.expanduser(__file__))) sys.path.append(os.path.join(curr_path, '../common/')) sys.path.insert(0, os.path.join(curr_path, '../../../python')) import models import get_data def assertRaises(expected_exception, func, *args, **kwargs): try: f...
SUSE/azure-sdk-for-python
refs/heads/master
azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/custom_image_properties_custom.py
2
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
matrixise/odoo
refs/heads/8.0
addons/account_cancel/__openerp__.py
52
# -*- 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...
ChanderG/scipy
refs/heads/master
scipy/io/harwell_boeing/_fortran_format_parser.py
127
""" Preliminary module to handle fortran formats for IO. Does not use this outside scipy.sparse io for now, until the API is deemed reasonable. The *Format classes handle conversion between fortran and python format, and FortranFormatParser can create *Format instances from raw fortran format strings (e.g. '(3I4)', '(...
GLMeece/namebench
refs/heads/master
nb_third_party/dns/rdtypes/ANY/PTR.py
248
# Copyright (C) 2003-2007, 2009, 2010 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED ...
thaim/ansible
refs/heads/fix-broken-link
lib/ansible/modules/cloud/google/gcp_spanner_instance.py
3
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
CHT5/program-y
refs/heads/master
src/programy/processors/post/formatnumbers.py
3
""" Copyright (c) 2016 Keith Sterling 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, publish, distribute,...
miracode/django_tdd
refs/heads/master
lists/tests.py
1
from django.test import TestCase from django.core.urlresolvers import resolve from django.http import HttpRequest from django.template.loader import render_to_string from lists.views import home_page from lists.models import Item, List class HomePageTest(TestCase): def test_root_url_resolves_to_home_page_view(s...
yakky/django
refs/heads/master
tests/migrations/test_migrations_conflict/0002_conflicting_second.py
429
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("migrations", "0001_initial")] operations = [ migrations.CreateModel( "Something", [ ("id", model...
gcd0318/django
refs/heads/master
tests/migrations/test_migrations_conflict/0002_conflicting_second.py
429
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("migrations", "0001_initial")] operations = [ migrations.CreateModel( "Something", [ ("id", model...
azjps/bokeh
refs/heads/master
examples/app/weather/main.py
3
from os.path import join, dirname import datetime import pandas as pd from scipy.signal import savgol_filter from bokeh.io import curdoc from bokeh.layouts import row, column from bokeh.models import ColumnDataSource, DataRange1d, Select from bokeh.palettes import Blues4 from bokeh.plotting import figure STATISTICS ...
Azure/azure-sdk-for-python
refs/heads/sync-eng/common-js-nightly-docs-2-1768-ForTestPipeline
sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2019_06_01_preview/aio/_configuration.py
1
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
jigneshphipl/omaha
refs/heads/master
plugins/update/generate_plugin_idls.py
67
#!/usr/bin/python2.4 # # Copyright 2007-2009 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 ...
globality-corp/microcosm
refs/heads/develop
microcosm/profile.py
1
""" Factory loading profiling """ from time import time class NoopProfiler: def __call__(self, key: str) -> 'NoopProfiler': return self def __enter__(self): pass def __exit__(self, *args, **kargs): pass class TimingProfiler: def __init__(self): self.times = dict(...
jerryz1982/neutron
refs/heads/master
neutron/plugins/ml2/plugin.py
3
# Copyright (c) 2013 OpenStack Foundation # 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 ...
juschaef/purchase-workflow
refs/heads/8.0
purchase_delivery_address/__openerp__.py
9
# -*- coding: utf-8 -*- # Author: Leonardo Pistone # Copyright 2014 Camptocamp SA # # 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...
simongoffin/my_odoo_tutorial
refs/heads/master
addons/website_event_track/models/event.py
26
# -*- 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...
ChenJunor/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/django/contrib/gis/db/backends/mysql/operations.py
116
from django.db.backends.mysql.base import DatabaseOperations from django.contrib.gis.db.backends.adapter import WKTAdapter from django.contrib.gis.db.backends.base import BaseSpatialOperations class MySQLOperations(DatabaseOperations, BaseSpatialOperations): compiler_module = 'django.contrib.gis.db.backends.mys...
bowlofstew/changes
refs/heads/master
tests/changes/api/test_user_index.py
4
from changes.testutils import APITestCase class UserListTest(APITestCase): path = '/api/0/users/' def test_simple(self): user_1 = self.create_user(email='foo@example.com', is_admin=True) user_2 = self.create_user(email='bar@example.com', is_admin=False) resp = self.client.get(self.pa...
RyanHope/AutobahnPython
refs/heads/master
autobahn/websocket/compress_deflate.py
15
############################################################################### # # The MIT License (MIT) # # Copyright (c) Tavendo GmbH # # 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 with...
roscoeZA/GeoGigSync
refs/heads/master
src/test/treetest.py
1
import unittest import os import time from geogigpy.tree import Tree from geogigpy import geogig from testrepo import testRepo class GeogigTreeTest(unittest.TestCase): repo = testRepo() def getTempPath(self): return os.path.join(os.path.dirname(__file__), "temp", str(time.time())).replace('\\...
gylian/headphones
refs/heads/master
lib/unidecode/x07c.py
252
data = ( 'Ze ', # 0x00 'Xi ', # 0x01 'Guo ', # 0x02 'Yi ', # 0x03 'Hu ', # 0x04 'Chan ', # 0x05 'Kou ', # 0x06 'Cu ', # 0x07 'Ping ', # 0x08 'Chou ', # 0x09 'Ji ', # 0x0a 'Gui ', # 0x0b 'Su ', # 0x0c 'Lou ', # 0x0d 'Zha ', # 0x0e 'Lu ', # 0x0f 'Nian ', # 0x10 'Suo ', ...
ravibhure/ansible
refs/heads/devel
lib/ansible/modules/storage/netapp/netapp_e_hostgroup.py
45
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, NetApp, Inc # 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', 'sta...
arthurSena/processors
refs/heads/master
tests/fixtures/api/files.py
2
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import pytest import uuid @pytest.fixture def file_fixture(conn): sha1 = uuid.uuid1().hex file_record = { 'id': uuid.uuid1().hex...
Evervolv/android_kernel_grouper
refs/heads/kitkat
scripts/rt-tester/rt-tester.py
11005
#!/usr/bin/python # # rt-mutex tester # # (C) 2006 Thomas Gleixner <tglx@linutronix.de> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # import os import sys import getopt import sh...
heke123/chromium-crosswalk
refs/heads/master
testing/scripts/webview_licenses.py
65
#!/usr/bin/env python # Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import json import os import sys import common def main_run(args): with common.temporary_file() as tempfile_path: rc = common...
CentOS-PaaS-SIG/linch-pin
refs/heads/develop
linchpin/provision/roles/azure/molecule/delegated/tests/test_null.py
48
# Without at least a file here, tests in the additional directory will not # get picked up. If you add actual tests to this directory, then you can # safely eliminate this file. Otherwise, it exists only to cause the tests in # shared/tests to be discovered. # # Most tests should be written in the shared/tests director...
thomasbarillot/DAQ
refs/heads/master
eTOF/ADQAPI_python/ADQ214_example.py
1
from ctypes import * ADQAPI = cdll.LoadLibrary("ADQAPI.dll") ADQAPI.CreateADQControlUnit.restype = c_void_p ADQAPI.ADQ214_GetRevision.restype = c_void_p ADQAPI.ADQControlUnit_FindDevices.argtypes = [c_void_p] print('ADQ214 Python example') # Creating control unit adq_cu = c_void_p(ADQAPI.CreateADQControlUn...
drjeep/django
refs/heads/master
tests/model_fields/__init__.py
12133432
mjirayu/sit_academy
refs/heads/master
common/djangoapps/course_modes/migrations/__init__.py
12133432
edxzw/edx-platform
refs/heads/master
lms/djangoapps/courseware/management/commands/tests/__init__.py
12133432
EmadMokhtar/Django
refs/heads/master
tests/gis_tests/geoapp/test_serializers.py
102
import json from django.contrib.gis.geos import LinearRing, Point, Polygon from django.core import serializers from django.test import TestCase from .models import City, MultiFields, PennsylvaniaCity class GeoJSONSerializerTests(TestCase): fixtures = ['initial'] def test_builtin_serializers(self): ...
linked67/p2pool-kryptonite
refs/heads/master
p2pool/work.py
4
from __future__ import division import base64 import random import re import sys import time from twisted.internet import defer from twisted.python import log import bitcoin.getwork as bitcoin_getwork, bitcoin.data as bitcoin_data from bitcoin import helper, script, worker_interface from util import forest, jsonrpc,...
knabar/openmicroscopy
refs/heads/develop
components/tools/OmeroPy/src/omero/plugins/group.py
4
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Group administration plugin Copyright 2009-2015 Glencoe Software, Inc. All rights reserved. Use is subject to license terms supplied in LICENSE.txt """ import sys from omero.cli import UserGroupControl, CLI, ExceptionHandler, admin_only from omero.model.enu...
miek/libsigrokdecode
refs/heads/xn297
decoders/i2cdemux/pd.py
13
## ## This file is part of the libsigrokdecode project. ## ## Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de> ## ## 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 Li...
h2oai/h2o-3
refs/heads/master
h2o-py/tests/testdir_apis/Data_Manipulation/pyunit_h2oH2OFrame_entropy.py
2
from __future__ import print_function import sys sys.path.insert(1,"../../../") import h2o from tests import pyunit_utils from h2o.utils.typechecks import assert_is_type from h2o.frame import H2OFrame def h2o_H2OFrame_entropy(): """ Python API test: h2o.frame.H2OFrame.entropy() copied from pyunit_entropy....
Nolan330/CS292
refs/heads/master
mavlink/share/pyshared/pymavlink/mavlinkv10.py
28
''' MAVLink protocol implementation (auto-generated by mavgen.py) Generated from: ardupilotmega.xml,common.xml Note: this file has been auto-generated. DO NOT EDIT ''' import struct, array, mavutil, time WIRE_PROTOCOL_VERSION = "1.0" class MAVLink_header(object): '''MAVLink message header''' def __init__(s...
citrix-openstack-build/horizon
refs/heads/master
openstack_dashboard/dashboards/router/nexus1000v/tables.py
10
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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...
domenicosolazzo/practice-django
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 # ...
zalf-lsa/util
refs/heads/master
soil/soil_io3.py
1
# 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/. */ # Authors: # Michael Berg-Mohnicke <michael.berg@zalf.de> # # Maintainers: # Currently maintained by the authors. # #...
louyihua/edx-platform
refs/heads/master
lms/djangoapps/discussion/tests/test_views.py
2
import json import logging import ddt from django.core.urlresolvers import reverse from django.http import Http404 from django.test.client import Client, RequestFactory from django.test.utils import override_settings from django.utils import translation from lms.lib.comment_client.utils import CommentClientPaginatedRe...
voer-platform/vp.repo
refs/heads/master
vpr/haystack/exceptions.py
12
from __future__ import unicode_literals class HaystackError(Exception): """A generic exception for all others to extend.""" pass class SearchBackendError(HaystackError): """Raised when a backend can not be found.""" pass class SearchFieldError(HaystackError): """Raised when a field encounters an...
int19h/PTVS
refs/heads/master
Python/Product/Miniconda/Miniconda3-x64/Lib/mailcap.py
30
"""Mailcap file handling. See RFC 1524.""" import os import warnings __all__ = ["getcaps","findmatch"] def lineno_sort_key(entry): # Sort in ascending order, with unspecified entries at the end if 'lineno' in entry: return 0, entry['lineno'] else: return 1, 0 # Part 1: top-level inter...
jack51706/CuckooSploit
refs/heads/master
tests/objects_tests.py
7
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import os import tempfile import copy from nose.tools import assert_equal, raises, assert_not_equal from lib.cuckoo.common.objects import Dictionary, ...
krisys/django
refs/heads/master
django/contrib/messages/storage/session.py
478
import json from django.contrib.messages.storage.base import BaseStorage from django.contrib.messages.storage.cookie import ( MessageDecoder, MessageEncoder, ) from django.utils import six class SessionStorage(BaseStorage): """ Stores messages in the session (that is, django.contrib.sessions). """ ...
jelly/calibre
refs/heads/master
src/calibre/ebooks/pdf/render/gradients.py
2
#!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:fdm=marker:ai from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>' __docformat__ = 'restructuredtext en' ...
wltribble/frost
refs/heads/master
frost/jobs/tests.py
1
import datetime from django.test import TestCase from django.utils import timezone from django.urls import reverse from django.db import IntegrityError from processes.models import Process from .models import Job, Field # def create_job(job_id, completed): # return Job.objects.create(job_id=job_id, completed=c...
mnunberg/couchbase-python-client
refs/heads/master
txcouchbase/tests/test_ops.py
1
# Copyright 2013, Couchbase, Inc. # All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
kangkot/arangodb
refs/heads/devel
3rdParty/V8-4.3.61/third_party/python_26/Lib/site-packages/pythonwin/pywin/framework/intpyapp.py
17
# intpyapp.py - Interactive Python application class # import win32con import win32api import win32ui import __main__ import sys import string import app import traceback from pywin.mfc import window, afxres, dialog import commctrl import dbgcommands lastLocateFileName = ".py" # used in the "File/Locate" dialog... #...
Sonicbids/django
refs/heads/master
django/core/cache/backends/dummy.py
28
"Dummy cache backend" from django.core.cache.backends.base import BaseCache, DEFAULT_TIMEOUT class DummyCache(BaseCache): def __init__(self, host, *args, **kwargs): BaseCache.__init__(self, *args, **kwargs) def add(self, key, value, timeout=DEFAULT_TIMEOUT, version=None): key = self.make_key...
drawks/ansible
refs/heads/devel
test/sanity/code-smell/no-smart-quotes.py
29
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import re import sys def main(): skip = set([ 'docs/docsite/rst/dev_guide/testing/sanity/no-smart-quotes.rst', 'test/integration/targets/lookup_properties/lookup-8859-15.ini', 'test/integration/targets/template/files/encoding_1252_ut...
AutorestCI/azure-sdk-for-python
refs/heads/master
azure-mgmt-network/azure/mgmt/network/v2015_06_15/models/application_gateway.py
1
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
GenericStudent/home-assistant
refs/heads/dev
homeassistant/components/smartthings/fan.py
14
"""Support for fans through the SmartThings cloud API.""" from typing import Optional, Sequence from pysmartthings import Capability from homeassistant.components.fan import ( SPEED_HIGH, SPEED_LOW, SPEED_MEDIUM, SPEED_OFF, SUPPORT_SET_SPEED, FanEntity, ) from . import SmartThingsEntity from ...
cosmiclattes/TPBviz
refs/heads/master
torrent/lib/python2.7/site-packages/django/core/management/validation.py
107
import collections import sys from django.conf import settings from django.core.management.color import color_style from django.utils.encoding import force_str from django.utils.itercompat import is_iterable from django.utils import six class ModelErrorCollection: def __init__(self, outfile=sys.stdout): ...
grantvk/aima-python
refs/heads/master
submissions/Hess/myBayes.py
15
import traceback from submissions.Hess import cars class DataFrame: data = [] feature_names = [] target = [] target_names = [] guzzle = DataFrame() guzzle.target = [] guzzle.data = [] guzzle = cars.get_cars() def guzzleTarget(string): if (info['Fuel Information']['City mph'] < 14): retur...
jasonbot/django
refs/heads/master
django/contrib/contenttypes/migrations/0001_initial.py
585
# -*- coding: utf-8 -*- from __future__ import unicode_literals import django.contrib.contenttypes.models from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='ContentType', fields=...
dosarudaniel/coala-bears
refs/heads/master
bears/scala/__init__.py
12133432
elopio/snapcraft
refs/heads/master
tests/unit/store/__init__.py
12133432
mozilla/inventory
refs/heads/master
vendor-local/src/django-extensions/build/lib/django_extensions/tests/urls.py
12133432
fernandezcuesta/ansible
refs/heads/devel
test/units/parsing/yaml/__init__.py
12133432
dnlm92/chokoretto
refs/heads/master
main/lib/unidecode/x028.py
253
data = ( ' ', # 0x00 'a', # 0x01 '1', # 0x02 'b', # 0x03 '\'', # 0x04 'k', # 0x05 '2', # 0x06 'l', # 0x07 '@', # 0x08 'c', # 0x09 'i', # 0x0a 'f', # 0x0b '/', # 0x0c 'm', # 0x0d 's', # 0x0e 'p', # 0x0f '"', # 0x10 'e', # 0x11 '3', # 0x12 'h', # 0x13 '9', # ...
petermat/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/port/gtk_unittest.py
117
# Copyright (C) 2011 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...
newyork167/volatility
refs/heads/master
volatility/plugins/overlays/windows/crash_vtypes.py
58
# Volatility # Copyright (c) 2008-2013 Volatility Foundation # # This file is part of Volatility. # # Volatility is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License Version 2 as # published by the Free Software Foundation. You may not use, modify or # distribu...
lcgong/alchemy
refs/heads/master
asyncetcd/test/conftest.py
2
import logging # class ContextFilter(logging.Filter): # def __init__(self, trim_amount): # self.trim_amount = trim_amount # def filter(self, record): # import traceback # record.stack = ''.join( # str(row) for row in traceback.format_stack()[:-self.trim_amount] # ) ...
huguesv/PTVS
refs/heads/master
Python/Product/Miniconda/Miniconda3-x64/Lib/site-packages/pip/_vendor/chardet/big5prober.py
291
######################## 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...
guyuanlin/try-talk
refs/heads/master
fb_accounts/__init__.py
12133432
ampax/edx-platform-backup
refs/heads/live
lms/envs/cms/__init__.py
12133432
tesidroni/mp
refs/heads/master
Lib/email/mime/image.py
573
# Copyright (C) 2001-2006 Python Software Foundation # Author: Barry Warsaw # Contact: email-sig@python.org """Class representing image/* type MIME documents.""" __all__ = ['MIMEImage'] import imghdr from email import encoders from email.mime.nonmultipart import MIMENonMultipart class MIMEImage(MIMENonMultipart...
ccellis/WHACK2016
refs/heads/master
flask/lib/python2.7/site-packages/pbr/tests/test_packaging.py
21
# Copyright (c) 2013 New Dream Network, LLC (DreamHost) # # 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...
mnunberg/yobot
refs/heads/master
py/entrypoints/win32/__init__.py
3
import common
ryfeus/lambda-packs
refs/heads/master
Tensorflow_OpenCV_Nightly/source/tensorflow/python/framework/graph_io.py
62
# 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...
sunils34/buffer-django-nonrel
refs/heads/master
tests/regressiontests/forms/tests/models.py
50
# -*- coding: utf-8 -*- import datetime from django.core.files.uploadedfile import SimpleUploadedFile from django.forms import Form, ModelForm, FileField, ModelChoiceField from django.test import TestCase from regressiontests.forms.models import ChoiceModel, ChoiceOptionModel, ChoiceFieldModel, FileModel, Group, Bounda...
seecr/seecr-test
refs/heads/master
seecr/test/io.py
1
## begin license ## # # "Seecr Test" provides test tools. # # Copyright (C) 2012-2013, 2017, 2019-2021 Seecr (Seek You Too B.V.) https://seecr.nl # # This file is part of "Seecr Test" # # "Seecr Test" is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as publi...