repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
srm912/servo | refs/heads/master | components/script/dom/bindings/codegen/parser/tests/test_enum.py | 134 | import WebIDL
def WebIDLTest(parser, harness):
parser.parse("""
enum TestEnum {
"",
"foo",
"bar"
};
interface TestEnumInterface {
TestEnum doFoo(boolean arg);
readonly attribute TestEnum foo;
};
""")
results = parser.finish... |
ldong/vim_youcompleteme | refs/heads/master | third_party/requests/tasks.py | 8 | # -*- coding: utf-8 -*-
import requests
from invoke import run, task
@task
def test():
run('py.test', pty=True)
@task
def deps():
print('Vendoring urllib3...')
run('rm -fr requests/packages/urllib3')
run('git clone https://github.com/shazow/urllib3.git')
run('mv urllib3/urllib3 requests/packages... |
flaviogrossi/sockjs-cyclone | refs/heads/master | examples/stats/stats.py | 1 | import sys
from twisted.internet import reactor
from twisted.internet import task
from twisted.python import log
from cyclone.web import RequestHandler, Application
from sockjs.cyclone import SockJSConnection, SockJSRouter, proto
class IndexHandler(RequestHandler):
def get(self):
self.render('index.htm... |
glogiotatidis/bedrock | refs/heads/master | bedrock/grants/urls.py | 19 | # 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 django.conf.urls import url
from bedrock.redirects.util import redirect
from bedrock.mozorg.util import page
impor... |
chennan47/osf.io | refs/heads/develop | osf/migrations/0068_creator_modified_renames.py | 22 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-07-13 15:25
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):
dependencies = [
('osf', '0067_auto_20171121_... |
pforret/python-for-android | refs/heads/master | python-modules/twisted/twisted/test/test_finger.py | 60 | # Copyright (c) 2001-2009 Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests for L{twisted.protocols.finger}.
"""
from twisted.trial import unittest
from twisted.protocols import finger
from twisted.test.proto_helpers import StringTransport
class FingerTestCase(unittest.TestCase):
"""
Tests f... |
vivekkumac/auto-cert-kit | refs/heads/develop | autocertkit/test_generators.py | 1 | # Copyright (c) Citrix Systems 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 a... |
timokoola/lambdabot | refs/heads/master | requests/packages/urllib3/connection.py | 196 | from __future__ import absolute_import
import datetime
import os
import sys
import socket
from socket import error as SocketError, timeout as SocketTimeout
import warnings
from .packages import six
try: # Python 3
from http.client import HTTPConnection as _HTTPConnection
from http.client import HTTPException ... |
gangadharkadam/smrtfrappe | refs/heads/develop | frappe/core/doctype/defaultvalue/__init__.py | 2292 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
|
sungkim11/mhargadh | refs/heads/master | django/contrib/contenttypes/management.py | 315 | from django.contrib.contenttypes.models import ContentType
from django.db.models import get_apps, get_models, signals
from django.utils.encoding import smart_unicode
def update_contenttypes(app, created_models, verbosity=2, **kwargs):
"""
Creates content types for models in the given app, removing any model
... |
demarle/VTK | refs/heads/master | ThirdParty/ZopeInterface/zope/interface/tests/test_exceptions.py | 57 | ##############################################################################
#
# Copyright (c) 2010 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOF... |
bcl/anaconda | refs/heads/master | pyanaconda/ui/gui/spokes/lib/detailederror.py | 8 | # Detailed error dialog class
#
# Copyright (C) 2011-2012 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# the GNU General Public License v.2, or (at your option) any later version.
# This program is dist... |
xtopsoft/grpc | refs/heads/master | src/python/src/grpc/_cython/adapter_low_test.py | 7 | # Copyright 2015, 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... |
dkubiak789/OpenUpgrade | refs/heads/8.0 | addons/account/partner.py | 29 | # -*- 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... |
elover/python-django-blog | refs/heads/master | myblog/pygments/lexers/agile.py | 69 | # -*- coding: utf-8 -*-
"""
pygments.lexers.agile
~~~~~~~~~~~~~~~~~~~~~
Lexers for agile languages.
:copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import Lexer, RegexLexer, ExtendedRegexLexer, \
Le... |
michaelgallacher/intellij-community | refs/heads/master | python/testData/psi/DefaultTupleArguments.py | 83 | def comp_args((a, b)=(3, 4)):
return a, b
|
ArcherSys/ArcherSys | refs/heads/master | MCEDIT/pymclevel/mclevel.py | 7 | # -*- coding: utf-8 -*-
"""
MCLevel interfaces
Sample usage:
import mclevel
# Call mclevel.fromFile to identify and open any of these four file formats:
#
# Classic levels - gzipped serialized java objects. Returns an instance of MCJavalevel
# Indev levels - gzipped NBT data in a single file. Returns an MCIndevLev... |
catiabandeiras/StemFactory | refs/heads/master | webserver/lib/view/base_manager.py | 1 | # -*- coding: utf-8 -*-
import pystache
from lib.file import get_web_template, get_partial_template
class BaseViewManager(object):
formColumnLayout = 'col-xs-6 col-sm-3 col-md-2 col-lg-2'
def __init__(self):
#load stuff
self.pages = {}
self.partials = {}
self.load_templ... |
prakxys/flask | refs/heads/master | Work/Trivia - Module 5/env/Lib/site-packages/pip/_vendor/distlib/database.py | 360 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2013 The Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""PEP 376 implementation."""
from __future__ import unicode_literals
import base64
import codecs
import contextlib
import hashlib
import logging
import os
import posixpath
import sys
import z... |
Jelloeater/forgeLandWallGUI | refs/heads/master | wallGui/requests/packages/chardet/big5freq.py | 3132 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... |
rolandmansilla/microblog | refs/heads/master | flask/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/big5freq.py | 3132 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... |
fujunwei/chromium-crosswalk | refs/heads/master | chrome/common/extensions/docs/server2/timer.py | 122 | # Copyright 2013 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 time
class Timer(object):
'''A simple timer which starts when constructed and stops when Stop is called.
'''
def __init__(self):
self._st... |
msabramo/ansible | refs/heads/devel | examples/scripts/uptime.py | 58 | #!/usr/bin/env python
from collections import namedtuple
from ansible.parsing.dataloader import DataLoader
from ansible.vars import VariableManager
from ansible.inventory import Inventory
from ansible.playbook.play import Play
from ansible.executor.task_queue_manager import TaskQueueManager
from ansible.plugins.callbac... |
anthgur/servo | refs/heads/master | tests/wpt/web-platform-tests/mathml/tools/utils/misc.py | 23 | from __future__ import print_function
import os
import progressbar
try:
from urllib.request import urlopen
except ImportError:
from urllib2 import urlopen
MathMLAssociationCopyright = "Copyright (c) 2016 MathML Association"
def downloadWithProgressBar(url, outputDirectory="./", forceDownload=False):
base... |
JackDandy/SickGear | refs/heads/master | sickbeard/clients/download_station.py | 2 | #
# This file is part of SickGear.
#
# SickGear 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.
#
# SickGear is distributed in the hope... |
huzhengchuan/libvirt | refs/heads/master | src/util/virkeycode-mapgen.py | 48 | #!/usr/bin/python
"""
Generate the big keycodes table for virkeys.
It read keymaps.csv from stdin and put the generated code to stdout.
Please keep keymaps.csv be exactly the same as:
http://git.gnome.org/browse/gtk-vnc/plain/src/keymaps.csv.
If anything inconsistent happens, please change this file
instead of keymap... |
openstates/openstates.org | refs/heads/develop | people_admin/migrations/0006_alter_persondelta_data_changes.py | 1 | # Generated by Django 3.2 on 2021-05-05 16:42
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("people_admin", "0005_auto_20210401_1532"),
]
operations = [
migrations.AlterField(
model_name="persondelta",
name="dat... |
shlomif/PySolFC | refs/heads/master | pysollib/kivy/card.py | 1 | #!/usr/bin/env python
# -*- mode: python; coding: utf-8; -*-
# ---------------------------------------------------------------------------#
#
# Copyright (C) 1998-2003 Markus Franz Xaver Johannes Oberhumer
# Copyright (C) 2003 Mt. Hood Playing Card Co.
# Copyright (C) 2005-2009 Skomoroh
#
# This program is free softwar... |
timmerk/pygooglevoice | refs/heads/master | examples/voicemail.py | 39 | from googlevoice import Voice,util
voice = Voice()
voice.login()
for message in voice.voicemail().messages:
util.print_(message) |
mganeva/mantid | refs/heads/master | Framework/PythonInterface/plugins/algorithms/MuscatSofQW.py | 1 | # Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source
# & Institut Laue - Langevin
# SPDX - License - Identifier: GPL - 3.0 +
#pylint: disable=no-init,too-many-instance-at... |
PedroHLC/osdlyrics | refs/heads/master | players/http/validator.py | 2 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2011 Tiger Soldier
#
# This file is part of OSD Lyrics.
#
# OSD Lyrics 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 ... |
qistoph/thug | refs/heads/master | src/DOM/W3C/Events/EventListener.py | 1 | #!/usr/bin/env python
import logging
log = logging.getLogger("Thug")
# Introduced in DOM Level 2
class EventListener(object):
def __init__(self):
pass
def handleEvent(self, evt):
log.debug('handleEvent(%s)', evt)
|
mhbu50/erpnext | refs/heads/develop | erpnext/hr/doctype/expense_claim_detail/__init__.py | 37694 | from __future__ import unicode_literals
|
Processoriented/bootstrap | refs/heads/master | test-infra/s3_cache.py | 2166 | #!/usr/bin/env python2.7
# pylint: disable=C0301
from __future__ import absolute_import, unicode_literals, print_function, division
from sys import argv
from os import environ, stat, chdir, remove as _delete_file
from os.path import dirname, basename, abspath, realpath, expandvars
from hashlib import sha256
from subpr... |
frishberg/django | refs/heads/master | tests/forms_tests/widget_tests/test_checkboxselectmultiple.py | 7 | from django import forms
from django.forms import CheckboxSelectMultiple
from .base import WidgetTest
class CheckboxSelectMultipleTest(WidgetTest):
widget = CheckboxSelectMultiple
def test_render_value(self):
self.check_html(self.widget(choices=self.beatles), 'beatles', ['J'], html=(
"""... |
pdmccormick/betsy-director | refs/heads/master | betsy_director/flashwrite.py | 1 | import sys
import socket
import select
from time import sleep
from struct import Struct
from collections import namedtuple
from crc32 import crc32
from protocol import chunk, Protocol
FlashXmitProgress = namedtuple('FlashXmitProgress', 'num total offs block_len block_crc32')
class FlashWrite(object):
BLOCK_SIZE ... |
jason-weirather/Au-public | refs/heads/master | iron/utilities/filtered_gene_list_from_cufflinks_results.py | 2 | #!/usr/bin/python
import argparse, sys, re
def main():
parser = argparse.ArgumentParser(description="output a gene list based on some filtering criteria")
parser.add_argument('--min_fpkm',type=float,default=0,help="FLOAT minimum FPKM to report")
parser.add_argument('--length_filter',help="INT,INT i.e. 0,1000 whe... |
vlinhart/django-smsbrana | refs/heads/master | smsbrana/views.py | 1 | # -*- coding: utf-8 -*-
from datetime import datetime
from django.http import HttpResponse
from smsbrana import SmsConnect
from smsbrana import signals
from smsbrana.const import DELIVERY_STATUS_DELIVERED, DATETIME_FORMAT
from smsbrana.models import SentSms
def smsconnect_notification(request):
sc = SmsConnect()
... |
binkybear/AK-OnePone | refs/heads/cm-12.1 | tools/perf/scripts/python/futex-contention.py | 11261 | # futex contention
# (c) 2010, Arnaldo Carvalho de Melo <acme@redhat.com>
# Licensed under the terms of the GNU GPL License version 2
#
# Translation of:
#
# http://sourceware.org/systemtap/wiki/WSFutexContention
#
# to perf python scripting.
#
# Measures futex contention
import os, sys
sys.path.append(os.environ['PER... |
henrysher/aws-cloudinit | refs/heads/v0.7.2 | cloudinit/distros/amazon.py | 1 | # vi: ts=4 expandtab
#
# Copyright (C) 2012 Canonical Ltd.
# Copyright (C) 2012 Hewlett-Packard Development Company, L.P.
# Copyright (C) 2012 Yahoo! Inc.
# Copyright (C) 2014 Amazon.com, Inc. or its affiliates.
#
# Author: Scott Moser <scott.moser@canonical.com>
# Author: Juerg Haefliger <juerg.haefl... |
valentin-krasontovitsch/ansible | refs/heads/devel | lib/ansible/modules/system/lvg.py | 6 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2013, Alexander Bulimov <lazywolf0@gmail.com>
# Based on lvol module by Jeroen Hoekx <jeroen.hoekx@dsquare.be>
# 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... |
patrioticcow/MessagesForSkype | refs/heads/master | packages/win32/bundle/MessagesForSkype/modules/python/1.3.1-beta/Lib/idlelib/AutoCompleteWindow.py | 5 | """
An auto-completion window for IDLE, used by the AutoComplete extension
"""
from Tkinter import *
from MultiCall import MC_SHIFT
import AutoComplete
HIDE_VIRTUAL_EVENT_NAME = "<<autocompletewindow-hide>>"
HIDE_SEQUENCES = ("<FocusOut>", "<ButtonPress>")
KEYPRESS_VIRTUAL_EVENT_NAME = "<<autocompletewindow-keypress>>... |
precedenceguo/mxnet | refs/heads/master | example/python-howto/debug_conv.py | 44 | # 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... |
tynn/numpy | refs/heads/master | doc/source/conf.py | 4 | # -*- coding: utf-8 -*-
from __future__ import division, absolute_import, print_function
import sys, os, re
# Check Sphinx version
import sphinx
if sphinx.__version__ < "1.2.1":
raise RuntimeError("Sphinx 1.2.1 or newer required")
needs_sphinx = '1.0'
# ----------------------------------------------------------... |
baylee/django | refs/heads/master | tests/model_fields/test_manytomanyfield.py | 8 | from django.apps import apps
from django.db import models
from django.test import SimpleTestCase
from django.test.utils import isolate_apps
class ManyToManyFieldTests(SimpleTestCase):
@isolate_apps('model_fields')
def test_value_from_object_instance_without_pk(self):
class ManyToManyModel(models.Mode... |
HybridF5/jacket | refs/heads/master | jacket/tests/compute/functional/api_sample_tests/test_hide_server_addresses.py | 1 | # Copyright 2012 Nebula, Inc.
# Copyright 2013 IBM Corp.
#
# 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... |
cataliniordache/Human-Computer-Interaction-Project | refs/heads/master | RestfulServices/flask/lib/python2.7/site-packages/flask/testsuite/appctx.py | 558 | # -*- coding: utf-8 -*-
"""
flask.testsuite.appctx
~~~~~~~~~~~~~~~~~~~~~~
Tests the application context.
:copyright: (c) 2012 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import flask
import unittest
from flask.testsuite import FlaskTestCase
class AppContextTestCase(Flask... |
lintzc/gpdb | refs/heads/master | src/test/tinc/ext/suds/resolver.py | 206 | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... |
rohitwaghchaure/alec_frappe5_erpnext | refs/heads/develop | erpnext/hr/doctype/salary_slip_earning/__init__.py | 37694 | from __future__ import unicode_literals
|
EvgeniyBurdin/django_treensl | refs/heads/master | treensl/admin.py | 21 | #from django.contrib import admin
# Register your models here.
|
zzicewind/nova | refs/heads/master | nova/cmd/novnc.py | 65 | # Copyright (c) 2012 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 ... |
google-research/federated | refs/heads/master | reconstruction/shared/federated_trainer_utils.py | 1 | # 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 required by applicable law or agreed to in writing... |
oVirt/vdsm | refs/heads/master | lib/vdsm/network/link/bond/sysfs_options_mapper.py | 2 | # Copyright 2017 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the ... |
phifly/ptx | refs/heads/master | contrib/devtools/symbol-check.py | 172 | #!/usr/bin/python
# Copyright (c) 2014 Wladimir J. van der Laan
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
A script to check that the (Linux) executables produced by gitian only contain
allowed gcc, glibc and libstdc++ ver... |
MalloyPower/parsing-python | refs/heads/master | front-end/testsuite-python-lib/Python-2.7.2/Lib/plat-mac/lib-scriptpackages/SystemEvents/Power_Suite.py | 82 | """Suite Power Suite: Terms and Events for controlling System power
Level 1, version 1
Generated from /System/Library/CoreServices/System Events.app
AETE/AEUT resource version 1/0, language 0, script 0
"""
import aetools
import MacOS
_code = 'powr'
class Power_Suite_Events:
def restart(self, _object, _attribut... |
pengli09/Paddle | refs/heads/develop | v1_api_demo/model_zoo/resnet/load_feature.py | 13 | # Copyright (c) 2016 PaddlePaddle 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 applic... |
francbartoli/geonode | refs/heads/master | geonode/base/migrations/0047_resourcebase_attribution.py | 6 | # Generated by Django 2.2.16 on 2020-11-05 22:00
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('base', '0046_merge_20201016_0937'),
]
operations = [
migrations.AddField(
model_name='resourcebase',
name='attribut... |
universalcore/springboard | refs/heads/develop | springboard/tools/commands/cookiecutter/startapp/{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/application.py | 1 | from ConfigParser import ConfigParser
from pyramid.config import Configurator
import pkg_resources
def main(global_config, **settings):
cp = ConfigParser()
cp.readfp(pkg_resources.resource_stream('springboard', 'defaults.ini'))
defaults = dict(cp.items('springboard:pyramid'))
defaults.update(settin... |
IRI-Research/django | refs/heads/master | tests/model_inheritance_same_model_name/tests.py | 22 | from __future__ import unicode_literals
from django.test import TestCase
from model_inheritance.models import Title
class InheritanceSameModelNameTests(TestCase):
def setUp(self):
# The Title model has distinct accessors for both
# model_inheritance.Copy and model_inheritance_same_model_name.Co... |
MiKDev121374/Programming-Basics | refs/heads/master | Python/S0Fzl-12.py | 1 | def main():
n = int(input("Enter an integer: "))
if n >= 0:
for i in range(1, n + 1):
print(i)
else:
print("Integer must be positive.")
if __name__ == '__main__':
main()
|
openearth/delft3d-gt-server | refs/heads/develop | delft3dworker/migrations/0035_auto_20160527_1326.py | 1 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("delft3dworker", "0034_scene_shared"),
]
operations = [
migrations.AddField(
model_name="scene",
name... |
TurboTurtle/sos | refs/heads/master | sos/report/plugins/nginx.py | 4 | # This file is part of the sos project: https://github.com/sosreport/sos
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# version 2 of the GNU General Public License.
#
# See the LICENSE file in the source distribution ... |
p0psicles/SickRage | refs/heads/master | lib/requests/packages/urllib3/util/__init__.py | 1011 | # For backwards compatibility, provide imports that used to be here.
from .connection import is_connection_dropped
from .request import make_headers
from .response import is_fp_closed
from .ssl_ import (
SSLContext,
HAS_SNI,
assert_fingerprint,
resolve_cert_reqs,
resolve_ssl_version,
ssl_wrap_so... |
hehongliang/tensorflow | refs/heads/master | tensorflow/contrib/eager/python/examples/revnet/blocks.py | 27 | # Copyright 2018 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... |
hbrunn/bank-payment | refs/heads/8.0 | account_banking_sepa_direct_debit/models/res_company.py | 1 | # -*- coding: utf-8 -*-
# © 2013 Akretion (www.akretion.com)
# © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp import models, fields, api, exceptions, _
import logging
logger = logging.getLogger(__name__)
class ResCompany(models.Model... |
netzary/Kaline | refs/heads/master | ldapdb/backends/ldap/compiler.py | 2 | # -*- coding: utf-8 -*-
#
# django-ldapdb
# Copyright (c) 2009-2010, Bolloré telecom
# All rights reserved.
#
# See AUTHORS file for a full list of contributors.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# ... |
lancezlin/pyjs | refs/heads/master | pyjswidgets/pyjamas/ui/horizsplitpanel.ie6.py | 7 | """
Horizontal Split Panel: Left and Right layouts with a movable splitter.
/*
* Copyright 2008 Google Inc.
* Copyright 2009 Luke Kenneth Casson Leighton <lkcl@lkcl.net>
*
* Licensed under the Apache License, Version 2.0 (the "License") you may not
* use this file except in compliance with the License. You ma... |
bakhtout/odoo-educ | refs/heads/8.0 | addons/sale_crm/__init__.py | 353 | # -*- 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... |
angelapper/odoo | refs/heads/9.0 | addons/sale/tests/test_sale_to_invoice.py | 43 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from openerp.addons.mail.tests.common import TestMail
from openerp.tools import mute_logger
from datetime import datetime
class TestSale(TestMail):
@mute_logger('openerp.addons.base.ir.ir_model', 'openerp.osv.orm')... |
dcamposliz/youtube-dl | refs/heads/master | youtube_dl/extractor/tmz.py | 126 | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
class TMZIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?tmz\.com/videos/(?P<id>[^/]+)/?'
_TEST = {
'url': 'http://www.tmz.com/videos/0_okj015ty/',
'md5': '791204e3bf790b1426cb2db0706184c0',
... |
mtnman38/Aggregate | refs/heads/master | Executables/Aggregate 0.8.6 for Macintosh.app/Contents/Resources/lib/python2.7/requests/packages/__init__.py | 1849 | from __future__ import absolute_import
from . import urllib3
|
nikoonia/gem5v | refs/heads/master | src/arch/x86/isa/insts/simd128/floating_point/arithmetic/__init__.py | 91 | # Copyright (c) 2007 The Hewlett-Packard Development Company
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implemen... |
damdam-s/OCB | refs/heads/8.0 | addons/email_template/tests/test_ir_actions.py | 382 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2013-TODAY OpenERP S.A. <http://www.openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms... |
WildGenie/mtasa-blue | refs/heads/master | vendor/google-breakpad/src/third_party/protobuf/protobuf/python/google/protobuf/service_reflection.py | 601 | # Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# http://code.google.com/p/protobuf/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions o... |
murarivarma/candy_crush | refs/heads/gh-pages | node_modules/gulp-sass/node_modules/node-sass/node_modules/node-gyp/gyp/PRESUBMIT.py | 1369 | # 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.
"""Top-level presubmit script for GYP.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit API built... |
MediaSapiens/autonormix | refs/heads/master | django/views/generic/edit.py | 15 | from django.forms import models as model_forms
from django.core.exceptions import ImproperlyConfigured
from django.http import HttpResponseRedirect
from django.views.generic.base import TemplateResponseMixin, View
from django.views.generic.detail import (SingleObjectMixin,
SingleObjectTemplateRe... |
kubeflow/kfp-tekton-backend | refs/heads/master | components/deprecated/dataproc/analyze/src/analyze_run.py | 1 | # Copyright 2018 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 required by applicable law or agreed to in writing, ... |
fypyuhu/raw | refs/heads/master | vendor/psy/psysh/test/tools/gen_unvis_fixtures.py | 536 | #! /usr/bin/env python3
import sys
from os.path import abspath, expanduser, dirname, join
from itertools import chain
import json
import argparse
from vis import vis, unvis, VIS_WHITE
__dir__ = dirname(abspath(__file__))
OUTPUT_FILE = join(__dir__, '..', 'fixtures', 'unvis_fixtures.json')
# Add custom fixtures her... |
cfelton/alt.hdl | refs/heads/master | examples/ex2_mathadds/test_verilogs/test_mathadds.py | 2 |
# Need to verify each design is correct, it is easiest
# to verify each of the converted files (Verilog). By
# verifying the final result, the design, functionality,
# methodology, etc are all verified.
#
# Using Python testbenches because Python is a very flexible
# easy language (author knows well). No need for ... |
mkaluza/external_chromium_org | refs/heads/kk44 | third_party/closure_linter/closure_linter/common/position.py | 285 | #!/usr/bin/env python
#
# Copyright 2008 The Closure Linter 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
#... |
aredo/httpie | refs/heads/master | tests/test_auth.py | 42 | """HTTP authentication-related tests."""
import requests
import pytest
from utils import http, add_auth, HTTP_OK, TestEnvironment
import httpie.input
import httpie.cli
class TestAuth:
def test_basic_auth(self, httpbin):
r = http('--auth=user:password',
'GET', httpbin.url + '/basic-auth/u... |
whn09/tensorflow | refs/heads/master | tensorflow/python/client/timeline.py | 110 | # 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... |
JasonKessler/scattertext | refs/heads/master | scattertext/graphs/GraphStructure.py | 1 | import pkgutil
from scattertext.graphs.ComponentDiGraphHTMLRenderer import GraphRenderer
from scattertext.viz.BasicHTMLFromScatterplotStructure import D3URLs, ExternalJSUtilts, PackedDataUtils
GRAPH_VIZ_FILE_NAME = 'graph_plot.html'
class GraphStructure(object):
def __init__(self,
scatterplot_s... |
sebastienhupin/qxrad | refs/heads/master | qooxdoo/tool/pylib/argparser/argparse.py | 490 | # Author: Steven J. Bethard <steven.bethard@gmail.com>.
"""Command-line parsing library
This module is an optparse-inspired command-line parsing library that:
- handles both optional and positional arguments
- produces highly informative usage messages
- supports parsers that dispatch to sub-parsers
The... |
cgar/servo | refs/heads/master | tests/wpt/harness/wptrunner/update/state.py | 196 | # 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/.
import os
import cPickle as pickle
here = os.path.abspath(os.path.split(__file__)[0])
class State(object):
filenam... |
Jgarcia-IAS/SAT | refs/heads/master | openerp/addons-extra/odoo-pruebas/odoo-server/addons/hr_contract/base_action_rule.py | 389 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2013 OpenERP S.A. <http://www.openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of th... |
kenshay/ImageScripter | refs/heads/master | ProgramData/SystemFiles/Python/Lib/site-packages/IPython/core/magic.py | 8 | # encoding: utf-8
"""Magic functions for InteractiveShell.
"""
from __future__ import print_function
#-----------------------------------------------------------------------------
# Copyright (C) 2001 Janko Hauser <jhauser@zscout.de> and
# Copyright (C) 2001 Fernando Perez <fperez@colorado.edu>
# Copyright (C) 2008... |
Juniper/nova | refs/heads/master | nova/policies/floating_ip_pools.py | 6 | # Copyright 2016 Cloudbase Solutions Srl
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... |
qwertyjune/BethSaidaBible | refs/heads/master | venv/lib/python2.7/site-packages/django/contrib/auth/tests/test_signals.py | 63 | from django.contrib.auth import signals
from django.contrib.auth.models import User
from django.contrib.auth.tests.utils import skipIfCustomUser
from django.test import TestCase
from django.test.client import RequestFactory
from django.test import override_settings
@skipIfCustomUser
@override_settings(USE_TZ=False, P... |
beni55/django | refs/heads/master | django/core/files/images.py | 144 | """
Utility functions for handling images.
Requires Pillow as you might imagine.
"""
import zlib
from django.core.files import File
class ImageFile(File):
"""
A mixin for use alongside django.core.files.base.File, which provides
additional features for dealing with images.
"""
def _get_width(sel... |
n0m4dz/odoo | refs/heads/8.0 | addons/base_report_designer/base_report_designer.py | 314 | # -*- 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... |
jsharkey13/isaac-selenium-testing | refs/heads/master | isaactest/tests/filter_by_concept.py | 1 | import time
from ..utils.log import log, INFO, ERROR, PASS
from ..utils.isaac import clear_question_filter, get_hexagon_properties
from ..utils.i_selenium import assert_tab, image_div
from ..utils.i_selenium import wait_for_xpath_element
from ..tests import TestWithDependency
from selenium.common.exceptions import Time... |
lduarte1991/edx-platform | refs/heads/master | lms/djangoapps/teams/plugins.py | 24 | """
Definition of the course team feature.
"""
from django.utils.translation import ugettext_noop
from courseware.tabs import EnrolledTab
from . import is_feature_enabled
class TeamsTab(EnrolledTab):
"""
The representation of the course teams view type.
"""
type = "teams"
title = ugettext_noop(... |
cchristelis/inasafe | refs/heads/develop | safe/impact_reports/test/test_population_exposure_report_mixin.py | 2 | # coding=utf-8
"""
InaSAFE Disaster risk assessment tool developed by AusAid -
**Test for Building Exposure Report Mixin**
Contact : ole.moller.nielsen@gmail.com
.. note:: This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
... |
kmoocdev2/edx-platform | refs/heads/real_2019 | common/djangoapps/third_party_auth/allprovider.py | 1 | from social_core.backends.oauth import BaseOAuth2
from django.utils.http import urlencode
import json
class AllOAuth2(BaseOAuth2):
"""AllOAuth2 OAuth authentication backend"""
name = 'allprovider'
AUTHORIZATION_URL = 'http://all.kmooc.kr/o/authorize'
ACCESS_TOKEN_URL = 'http://all.kmooc.kr/o/token/'
... |
hellhovnd/django | refs/heads/master | django/contrib/gis/geometry/backend/geos.py | 315 | from django.contrib.gis.geos import (
GEOSGeometry as Geometry, GEOSException as GeometryException)
|
nkgilley/home-assistant | refs/heads/dev | homeassistant/components/ios/notify.py | 6 | """Support for iOS push notifications."""
import logging
import requests
from homeassistant.components import ios
from homeassistant.components.notify import (
ATTR_DATA,
ATTR_MESSAGE,
ATTR_TARGET,
ATTR_TITLE,
ATTR_TITLE_DEFAULT,
BaseNotificationService,
)
import homeassistant.util.dt as dt_ut... |
uberamd/NGECore2 | refs/heads/master | scripts/object/weapon/melee/polearm/crafted_saber/sword_lightsaber_polearm_gen4.py | 85615 | import sys
def setup(core, object):
return |
ProjectSWGCore/NGECore2 | refs/heads/master | scripts/object/tangible/furniture/tatooine/uber_must_mining_console_s02.py | 85615 | import sys
def setup(core, object):
return |
xjw1001001/IGCexpansion | refs/heads/master | test/Ancestral_reconstruction/excel.py | 1 | #!/usr/bin/env python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2005 Kiseliov Roman
# Write an XLS file with a single worksheet, containing
# a heading row and some rows of data.
import xlwt
import datetime
ezxf = xlwt.easyxf
def write_xls(file_name, sheet_name, headings, data, heading_xf, data_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.