repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
xindus40223115/2015cd_midterm | refs/heads/master | static/Brython3.1.0-20150301-090019/Lib/http/__init__.py | 1383 | # This directory is a Python package.
|
FireBladeNooT/Medusa_1_6 | refs/heads/master | lib/requests/packages/urllib3/contrib/ntlmpool.py | 514 | """
NTLM authenticating pool, contributed by erikcederstran
Issue #10, see: http://code.google.com/p/urllib3/issues/detail?id=10
"""
from __future__ import absolute_import
try:
from http.client import HTTPSConnection
except ImportError:
from httplib import HTTPSConnection
from logging import getLogger
from nt... |
o3project/odenos | refs/heads/develop | src/test/python/org/o3project/odenos/remoteobject/manager/system/test_component_connection.py | 6 | # -*- coding:utf-8 -*-
# Copyright 2015 NEC Corporation. #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License... |
andhit-r/opnsynid-accounting-report | refs/heads/8.0 | opnsynid_accounting_report_configuration_page/__init__.py | 1 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2015 Andhitia Rama. All rights reserved.
# @author Andhitia Rama
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Pu... |
adambrenecki/django | refs/heads/master | tests/model_regress/models.py | 134 | # coding: utf-8
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
CHOICES = (
(1, 'first'),
(2, 'second'),
)
@python_2_unicode_compatible
class Article(models.Model):
headline = models.CharField(max_length=100, default='Default headline')
pub_date = models.Da... |
wackymaster/QTClock | refs/heads/master | Libraries/numpy/distutils/fcompiler/pg.py | 167 | # http://www.pgroup.com
from __future__ import division, absolute_import, print_function
from numpy.distutils.fcompiler import FCompiler
from sys import platform
compilers = ['PGroupFCompiler']
class PGroupFCompiler(FCompiler):
compiler_type = 'pg'
description = 'Portland Group Fortran Compiler'
version... |
zstackorg/zstack-woodpecker | refs/heads/master | integrationtest/vm/virtualrouter/ipsec/test_create_ipsec_resource_stack.py | 2 | #coding:utf-8
'''
New Integration Test for zstack cloudformation.
Create an IPsec by resource stack.
@author: chenyuan.xu
'''
import zstackwoodpecker.test_util as test_util
import zstackwoodpecker.operations.resource_stack as resource_stack_ops
import zstackwoodpecker.operations.resource_operations as res_ops
import... |
ST-Data-Mining/crater | refs/heads/master | wei/tuner.py | 1 | from __future__ import division
import random, pdb
from main import *
from base import *
import collections
# from file import *
from start import *
class DeBase(object):
def __init__(i):
global The
i.np = Settings.de.np
i.fa = Settings.de.f
i.cr = Settings.de.cr
i.repeats = Settings.de.repeat... |
StoDevX/cs251-toolkit | refs/heads/master | cs251tk/toolkit/test_args.py | 1 | import datetime
from .args import (
build_argparser,
get_students_from_args,
get_assignments_from_args,
compute_stogit_url,
)
def args(arglist):
return vars(build_argparser().parse_args(args=arglist))
students = {
'my': ['rives'],
'section-a': ['student-a'],
'section-b': ['student-b'... |
Mixser/django | refs/heads/master | django/db/backends/mysql/introspection.py | 363 | from collections import namedtuple
from MySQLdb.constants import FIELD_TYPE
from django.db.backends.base.introspection import (
BaseDatabaseIntrospection, FieldInfo, TableInfo,
)
from django.utils.datastructures import OrderedSet
from django.utils.encoding import force_text
FieldInfo = namedtuple('FieldInfo', Fi... |
ingadhoc/odoo-addons | refs/heads/8.0 | project_related_projects/report/__init__.py | 34 | # -*- coding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in module root
# directory
##############################################################################
# vim:expandtab:smartindent:tabstop=4:softtab... |
ros-industrial/robotiq | refs/heads/kinetic-devel | robotiq_2f_gripper_control/nodes/Robotiq2FGripperSimpleController.py | 1 | #!/usr/bin/env python
# Software License Agreement (BSD License)
#
# Copyright (c) 2012, Robotiq, 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... |
kinverarity1/bruges | refs/heads/master | docs/conf.py | 3 | # -*- coding: utf-8 -*-
#
# bruges documentation build configuration file, created by
# sphinx-quickstart on Thu Dec 12 16:14:28 2013.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# Al... |
aldian/tensorflow | refs/heads/master | tensorflow/tools/graph_transforms/python/transform_graph_test.py | 169 | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
nzavagli/UnrealPy | refs/heads/master | UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/numpy-1.9.2/numpy/lib/tests/test_polynomial.py | 32 | from __future__ import division, absolute_import, print_function
'''
>>> p = np.poly1d([1.,2,3])
>>> p
poly1d([ 1., 2., 3.])
>>> print(p)
2
1 x + 2 x + 3
>>> q = np.poly1d([3.,2,1])
>>> q
poly1d([ 3., 2., 1.])
>>> print(q)
2
3 x + 2 x + 1
>>> print(np.poly1d([1.89999+2j, -3j, -5.12345678, 2+1j]))
... |
franky88/emperioanimesta | refs/heads/master | env/Lib/site-packages/pip/_vendor/requests/packages/urllib3/contrib/ntlmpool.py | 514 | """
NTLM authenticating pool, contributed by erikcederstran
Issue #10, see: http://code.google.com/p/urllib3/issues/detail?id=10
"""
from __future__ import absolute_import
try:
from http.client import HTTPSConnection
except ImportError:
from httplib import HTTPSConnection
from logging import getLogger
from nt... |
treasure-data/digdag | refs/heads/master | digdag-standards/src/main/resources/digdag/standards/py/runner.py | 1 | import sys
import os
import json
import types
import inspect
import collections
import traceback
command = sys.argv[1]
in_file = sys.argv[2]
out_file = sys.argv[3]
with open(in_file) as f:
in_data = json.load(f)
params = in_data['params']
# fake digdag_env module already imported
digdag_env_mod = sys.modules... |
oculusstorystudio/kraken | refs/heads/develop_OSS | Python/kraken/ui/HAppkit_Editors/core/__init__.py | 2 |
#
# Copyright 2015 Horde Software Inc. All rights reserved.
#
|
NextINpact/LaPresseLibreSDK | refs/heads/master | python_django/sdk_lpl/models/VerificationModel.py | 1 | class VerificationModel(object):
def __init__(self, password, mail, code):
self.Password = password
self.Mail = mail
self.CodeUtilisateur = code
|
weiawe/django | refs/heads/master | django/core/mail/backends/smtp.py | 477 | """SMTP email backend class."""
import smtplib
import ssl
import threading
from django.conf import settings
from django.core.mail.backends.base import BaseEmailBackend
from django.core.mail.message import sanitize_address
from django.core.mail.utils import DNS_NAME
class EmailBackend(BaseEmailBackend):
"""
A... |
gregcaporaso/sketchbook | refs/heads/master | 2014.04-sortmerna-tax/assign-taxonomy-sortmerna.py | 1 | #!/usr/bin/env python
# File created on 11 Apr 2014
from __future__ import division
__author__ = "Greg Caporaso"
__copyright__ = "Copyright 2014, The QIIME Project"
__credits__ = ["Greg Caporaso"]
__license__ = "GPL"
__version__ = "1.8.0-dev"
__maintainer__ = "Greg Caporaso"
__email__ = "gregcaporaso@gmail.com"
from ... |
bitland/p2pool | refs/heads/master | wstools/Namespaces.py | 292 | # Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISC... |
Datera/cinder | refs/heads/datera_queens_backport | cinder/tests/unit/test_cmd.py | 1 | # 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... |
constanthatz/django_tutorial | refs/heads/master | mysite/polls/models.py | 1 | import datetime
from django.db import models
from django.utils import timezone
class Question(models.Model):
question_text = models.CharField(max_length=200)
pub_date = models.DateTimeField('date published')
def __unicode__(self): # __unicode__ on Python 2
return unicode(self.questio... |
xingrz/android_kernel_pifoundation_bcm2710 | refs/heads/mkn-mr1 | tools/perf/scripts/python/netdev-times.py | 1544 | # Display a process of packets and processed time.
# It helps us to investigate networking or network device.
#
# options
# tx: show only tx chart
# rx: show only rx chart
# dev=: show only thing related to specified device
# debug: work with debug mode. It shows buffer status.
import os
import sys
sys.path.append(os... |
manazhao/tf_recsys | refs/heads/r1.0 | tensorflow/contrib/tensor_forest/client/__init__.py | 164 | # 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... |
flibbertigibbet/open-transit-indicators | refs/heads/develop | python/django/transit_indicators/migrations/0041_auto_20141104_1737.py | 2 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('transit_indicators', '0040_migrate_version_data'),
]
operations = [
migrations.AddField(
model_name='otiindicato... |
0-wiz-0/audacity | refs/heads/master | lib-src/lv2/lv2/plugins/eg-amp.lv2/waflib/Node.py | 196 | #! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
import os,re,sys,shutil
from waflib import Utils,Errors
exclude_regs='''
**/*~
**/#*#
**/.#*
**/%*%
**/._*
**/CVS
**/CVS/**
**/.cvsignore
**/SCCS
**/SCCS/**
**/vssver.scc
**/.... |
hfreitas92/portfolio | refs/heads/master | node_modules/node-sass/node_modules/node-gyp/gyp/setup.py | 2462 | #!/usr/bin/env python
# Copyright (c) 2009 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from setuptools import setup
setup(
name='gyp',
version='0.1',
description='Generate Your Projects',
author='Chromium Authors',
a... |
docker/compose | refs/heads/master | compose/cli/main.py | 2 | import contextlib
import functools
import json
import logging
import pipes
import re
import subprocess
import sys
from distutils.spawn import find_executable
from inspect import getdoc
from operator import attrgetter
import docker.errors
import docker.utils
from . import errors
from . import signals
from .. import __... |
emanuelschuetze/OpenSlides | refs/heads/master | openslides/users/urls.py | 2 | from django.conf.urls import url
from . import views
urlpatterns = [
# Auth
url(r"^login/$", views.UserLoginView.as_view(), name="user_login"),
url(r"^logout/$", views.UserLogoutView.as_view(), name="user_logout"),
url(r"^whoami/$", views.WhoAmIView.as_view(), name="user_whoami"),
url(r"^setpassw... |
andymckay/django | refs/heads/master | django/contrib/gis/db/backends/base.py | 79 | """
Base/mixin classes for the spatial backend database operations and the
`SpatialRefSys` model the backend.
"""
import re
from django.contrib.gis import gdal
class BaseSpatialOperations(object):
"""
This module holds the base `BaseSpatialBackend` object, which is
instantiated by each spatial database bac... |
behzadnouri/scipy | refs/heads/master | scipy/special/tests/test_precompute_utils.py | 17 | from __future__ import division, print_function, absolute_import
from scipy._lib.six import with_metaclass
from numpy.testing import dec
from scipy.special._testutils import MissingModule, check_version, DecoratorMeta
from scipy.special._mptestutils import mp_assert_allclose
from scipy.special._precompute.utils import... |
vegetableman/phantomjs | refs/heads/master | src/qt/qtwebkit/Tools/Scripts/webkitpy/style/checkers/watchlist_unittest.py | 124 | # Copyright (C) 2010 Apple Inc. All rights reserved.
# 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 ... |
PaulStoffregen/Arduino-1.6.5-Teensyduino | refs/heads/master | arduino-core/src/processing/app/i18n/python/requests/packages/charade/constants.py | 3007 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All R... |
dutradda/myreco | refs/heads/master | tests/integration/engine_objects/test_engine_objects_integration.py | 1 | # MIT License
# Copyright (c) 2016 Diogo Dutra <dutradda@gmail.com>
# 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, co... |
bloer/bgexplorer | refs/heads/master | docs/conf.py | 1 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# bgexplorer documentation build configuration file, created by
# sphinx-quickstart on Thu Oct 19 09:19:30 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
#... |
marty331/jakesclock | refs/heads/master | flask/lib/python2.7/site-packages/setuptools/command/register.py | 986 | import distutils.command.register as orig
class register(orig.register):
__doc__ = orig.register.__doc__
def run(self):
# Make sure that we are using valid current name/version info
self.run_command('egg_info')
orig.register.run(self)
|
SaptakS/open-event-orga-server | refs/heads/master | migrations/versions/79e54124b415_.py | 10 | """empty message
Revision ID: 79e54124b415
Revises: affad812c947
Create Date: 2016-08-29 12:08:14.717319
"""
# revision identifiers, used by Alembic.
revision = '79e54124b415'
down_revision = 'affad812c947'
from alembic import op
import sqlalchemy as sa
import sqlalchemy_utils
def upgrade():
### commands auto... |
nion-software/nionswift | refs/heads/master | nion/swift/model/DocumentModel.py | 1 | from __future__ import annotations
# standard libraries
import abc
import asyncio
import collections
import contextlib
import copy
import datetime
import functools
import gettext
import threading
import time
import typing
import uuid
import weakref
# local libraries
from nion.data import DataAndMetadata
from nion.swi... |
goodwinnk/intellij-community | refs/heads/master | python/helpers/py2only/docutils/parsers/rst/languages/zh_tw.py | 128 | # -*- coding: utf-8 -*-
# $Id: zh_tw.py 7119 2011-09-02 13:00:23Z milde $
# Author: David Goodger <goodger@python.org>
# Copyright: This module has been placed in the public domain.
# New language mappings are welcome. Before doing a new translation, please
# read <http://docutils.sf.net/docs/howto/i18n.html>. Two f... |
lubosz/cerbero | refs/heads/archlinux | cerbero/commands/fetch.py | 12 | # cerbero - a multi-platform build system for Open Source software
# Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; eit... |
nvoron23/socialite | refs/heads/master | jython/Lib/test/test_fnmatch.py | 98 | """Test cases for the fnmatch module."""
from test import test_support
import unittest
from fnmatch import fnmatch, fnmatchcase
class FnmatchTestCase(unittest.TestCase):
def check_match(self, filename, pattern, should_match=1):
if should_match:
self.assert_(fnmatch(filename, pattern),
... |
googleads/google-ads-python | refs/heads/master | google/ads/googleads/v8/resources/types/click_view.py | 1 | # -*- 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 required by applicable law or... |
gilcierweb/simple-realtime-message | refs/heads/master | public/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/utf8/tests/generate-test-data.py | 1788 | #!/usr/bin/env python
import re
import json
# https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
# http://stackoverflow.com/a/13436167/96656
def unisymbol(codePoint):
if codePoint >= 0x0000 and codePoint <= 0xFFFF:
return unichr(codePoint)
elif codePoint >= 0x010000 and codePoint <= 0x10FFFF:
... |
ushatil/wellness-tracker | refs/heads/master | ws/wellspring/services/vest_service.py | 1 | import logging
from wellspring.models import VestSection, VestSubSection
LOGGER = logging.getLogger(__name__)
VEST_SECTIONS = {
"EQUILIBRIUM" : ["SCHOOL", "SELF", "HOME", "WORK"],
"SUPPORT" : ["PROFESSIONALS", "FAMILY", "FRIENDS", "COLLEAGUES"],
"LIFESTYLE" ... |
gogobook/wagtail | refs/heads/master | wagtail/contrib/wagtailapi/filters.py | 20 | from django.conf import settings
from rest_framework.filters import BaseFilterBackend
from taggit.managers import _TaggableManager
from wagtail.wagtailcore.models import Page
from wagtail.wagtailsearch.backends import get_search_backend
from .utils import BadRequestError, pages_for_site
class FieldsFilter(BaseFil... |
waynecoulson/TV-Show-Downloader | refs/heads/master | lib/tvdb_api/tvdb_ui.py | 6 | #!/usr/bin/env python
#encoding:utf-8
#author:dbr/Ben
#project:tvdb_api
#repository:http://github.com/dbr/tvdb_api
#license:unlicense (http://unlicense.org/)
"""Contains included user interfaces for Tvdb show selection.
A UI is a callback. A class, it's __init__ function takes two arguments:
- config, which is the T... |
solashirai/edx-platform | refs/heads/master | lms/djangoapps/teams/management/commands/tests/test_reindex_course_team.py | 33 | """ Tests for course_team reindex command """
import ddt
import mock
from mock import patch
from django.core.management import call_command, CommandError
from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase
from opaque_keys.edx.keys import CourseKey
from ....tests.factories import CourseTeamFac... |
SivagnanamCiena/mock-s3 | refs/heads/master | tests/create.py | 1 | #!/usr/bin/env python
import boto
from boto.s3.key import Key
OrdinaryCallingFormat = boto.config.get('s3', 'calling_format', 'boto.s3.connection.OrdinaryCallingFormat')
s3 = boto.connect_s3(host='localhost', port=10001, calling_format=OrdinaryCallingFormat, is_secure=False)
b = s3.create_bucket('mocking')
kwrite = ... |
pdufour/sqlalchemy | refs/heads/master | test/orm/test_rel_fn.py | 27 | from sqlalchemy.testing import assert_raises_message, eq_, \
AssertsCompiledSQL, is_
from sqlalchemy.testing import fixtures
from sqlalchemy.orm import relationships, foreign, remote
from sqlalchemy import MetaData, Table, Column, ForeignKey, Integer, \
select, ForeignKeyConstraint, exc, func, and_, String, Boo... |
BoyGau/linux | refs/heads/master | tools/perf/scripts/python/export-to-postgresql.py | 617 | # export-to-postgresql.py: export perf data to a postgresql database
# Copyright (c) 2014, Intel Corporation.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# Thi... |
camradal/ansible | refs/heads/devel | lib/ansible/modules/network/f5/bigip_sys_global.py | 32 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2016 F5 Networks 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
# ... |
techdragon/Js2Py | refs/heads/master | js2py/legecy_translators/__init__.py | 135 | __author__ = 'Piotrek'
|
ConnorGBrewster/servo | refs/heads/master | tests/wpt/web-platform-tests/tools/third_party/py/doc/conf.py | 218 | # -*- coding: utf-8 -*-
#
# py documentation build configuration file, created by
# sphinx-quickstart on Thu Oct 21 08:30:10 2010.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All conf... |
hyperized/ansible | refs/heads/devel | lib/ansible/modules/cloud/docker/docker_host_info.py | 10 | #!/usr/bin/python
#
# (c) 2019 Piotr Wojciechowski <piotr@it-playground.pl>
# 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',
... |
Klaudit/phantomjs | refs/heads/master | src/qt/qtwebkit/Tools/Scripts/webkitpy/style/checkers/watchlist_unittest.py | 124 | # Copyright (C) 2010 Apple Inc. All rights reserved.
# 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 ... |
umeier/pynmea | refs/heads/master | examples/simple_app.py | 7 | from pynmea.streamer import NMEAStream
data_file = '../tests/test_data/test_data.gps'
with open(data_file, 'r') as data_file_fd:
nmea_stream = NMEAStream(stream_obj=data_file_fd)
next_data = nmea_stream.get_objects()
nmea_objects = []
while next_data:
nmea_objects += next_data
next_dat... |
pap/nupic | refs/heads/master | src/nupic/frameworks/opf/clamodel.py | 19 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... |
glensc/node-gyp | refs/heads/master | gyp/test/mac/gyptest-xcode-env-order.py | 86 | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies that dependent Xcode settings are processed correctly.
"""
import TestGyp
import sys
if sys.platform == 'darwin':
test = T... |
mahendra-r/edx-platform | refs/heads/master | openedx/core/djangoapps/profile_images/views.py | 50 | """
This module implements the upload and remove endpoints of the profile image api.
"""
from contextlib import closing
import datetime
import logging
from django.utils.translation import ugettext as _
from django.utils.timezone import utc
from rest_framework import permissions, status
from rest_framework.parsers impo... |
ProfessionalIT/professionalit-webiste | refs/heads/master | sdk/google_appengine/lib/django-1.5/django/contrib/localflavor/gb/forms.py | 110 | """
GB-specific Form helpers
"""
from __future__ import absolute_import, unicode_literals
import re
from django.contrib.localflavor.gb.gb_regions import GB_NATIONS_CHOICES, GB_REGION_CHOICES
from django.forms.fields import CharField, Select
from django.forms import ValidationError
from django.utils.translation impor... |
JioCloud/nova | refs/heads/master | nova/tests/unit/objects/test_fixed_ip.py | 46 | # Copyright 2014 Red Hat, 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 a... |
pavlenko-volodymyr/codingmood | refs/heads/master | codemood/commits/migrations/0010_auto__add_field_commit_messages.py | 2 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Commit.messages'
db.add_column(u'commits_commit', 'messages',
self.gf(... |
thaumos/ansible-modules-extras | refs/heads/devel | cloud/cloudstack/cs_snapshot_policy.py | 41 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2016, René Moser <mail@renemoser.net>
#
# 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 Lice... |
tomfotherby/ansible-modules-core | refs/heads/devel | network/basics/slurp.py | 134 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2012, 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... |
mikewiebe-ansible/ansible | refs/heads/devel | lib/ansible/modules/cloud/digital_ocean/digital_ocean_sshkey_info.py | 21 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'status': ['preview'],
'... |
del680202/MachineLearning-memo | refs/heads/master | src/pla/pla-example.py | 1 | #!/usr/bin/env python
# encoding: utf-8
import matplotlib.pyplot as plt
import numpy as np
#網路上找的dataset 可以線性分割
dataset = np.array([
((1, -0.4, 0.3), -1),
((1, -0.3, -0.1), -1),
((1, -0.2, 0.4), -1),
((1, -0.1, 0.1), -1),
((1, 0.9, -0.5), 1),
((1, 0.7, -0.9), 1),
((1, 0.8, 0.2), 1),
((1, 0.4, -0.6), 1)])
#判斷有沒有分類錯誤... |
jasonkying/pip | refs/heads/develop | tests/unit/test_unit_outdated.py | 26 | import sys
import datetime
import os
from contextlib import contextmanager
import freezegun
import pytest
import pretend
from pip._vendor import lockfile
from pip.utils import outdated
@pytest.mark.parametrize(
['stored_time', 'newver', 'check', 'warn'],
[
('1970-01-01T10:00:00Z', '2.0', True, True)... |
KronoSKoderS/CalPack | refs/heads/prod | tests/test_IntFields.py | 1 | import unittest
import ctypes
from calpack import models
class Test_IntField(unittest.TestCase):
def setUp(self):
class two_int_field_packet(models.Packet):
int_field = models.IntField()
int_field_signed = models.IntField(signed=True)
self.two_int_field_packet = two_int_fi... |
stewnorriss/letsencrypt | refs/heads/master | acme/acme/other.py | 14 | """Other ACME objects."""
import functools
import logging
import os
from acme import jose
logger = logging.getLogger(__name__)
class Signature(jose.JSONObjectWithFields):
"""ACME signature.
:ivar .JWASignature alg: Signature algorithm.
:ivar bytes sig: Signature.
:ivar bytes nonce: Nonce.
:iva... |
shiyemin/shadowsocks | refs/heads/master | shadowsocks/udprelay.py | 924 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2015 clowwindy
#
# 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 b... |
FabriceSalvaire/PyDVI | refs/heads/master | PyDvi/Font/PkFont.py | 1 | ####################################################################################################
#
# PyDvi - A Python Library to Process DVI Stream
# Copyright (C) 2014 Fabrice Salvaire
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License a... |
AutorestCI/azure-sdk-for-python | refs/heads/master | azure-mgmt-billing/azure/mgmt/billing/models/billing_period_paged.py | 3 | # 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 ... |
elkingtonmcb/scikit-learn | refs/heads/master | benchmarks/bench_multilabel_metrics.py | 276 | #!/usr/bin/env python
"""
A comparison of multilabel target formats and metrics over them
"""
from __future__ import division
from __future__ import print_function
from timeit import timeit
from functools import partial
import itertools
import argparse
import sys
import matplotlib.pyplot as plt
import scipy.sparse as... |
cjaymes/pyscap | refs/heads/master | src/scap/model/xhtml/DlTag.py | 1 | # Copyright 2016 Casey Jaymes
# This file is part of PySCAP.
#
# PySCAP 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.
#
# PySCAP is ... |
cmajames/py_touhou | refs/heads/master | pytouhou/games/sample/shots.py | 1 | # -*- encoding: utf-8 -*-
##
## Copyright (C) 2014 Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
##
## 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; version 3 only.
##
## This program is distri... |
qibingbuso/pyew | refs/heads/master | batch_antidebug.py | 16 | #!/usr/bin/python
import os
import sys
import time
import hashlib
from pyew_core import CPyew
def printData(pyew, path, msg):
buf = pyew.getBuffer()
print "File :", path
print "MD5 :", hashlib.md5(buf).hexdigest()
print "SHA1 :", hashlib.sha1(buf).hexdigest()
print "SHA256:", hashlib.sha... |
Ichag/odoo | refs/heads/8.0 | addons/account/wizard/account_move_line_select.py | 385 | # -*- 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... |
bdh1011/cupeye | refs/heads/master | venv/lib/python2.7/site-packages/sqlalchemy/dialects/postgresql/__init__.py | 47 | # postgresql/__init__.py
# Copyright (C) 2005-2015 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
from . import base, psycopg2, pg8000, pypostgresql, zxjdbc, psycopg2cffi
bas... |
jhjguxin/blogserver | refs/heads/master | lib/python2.7/site-packages/django/contrib/localflavor/au/forms.py | 309 | """
Australian-specific Form helpers
"""
from django.core.validators import EMPTY_VALUES
from django.forms import ValidationError
from django.forms.fields import Field, RegexField, Select
from django.utils.encoding import smart_unicode
from django.utils.translation import ugettext_lazy as _
import re
PHONE_DIGITS_RE ... |
petercable/xray | refs/heads/master | xray/test/test_combine.py | 1 | from copy import deepcopy
import numpy as np
import pandas as pd
from xray import Dataset, DataArray, auto_combine, concat
from xray.core.pycompat import iteritems, OrderedDict
from . import TestCase, InaccessibleArray, requires_dask
from .test_dataset import create_test_data
class TestConcatDataset(TestCase):
... |
sfcta/ChampClient | refs/heads/master | ChampClient.py | 1 | from time import time,localtime,strftime
import os, sys, random, time, subprocess, threading
import Pyro.core
def threaded(f):
def wrapper(*args):
t = threading.Thread(target=f, args=args)
t.start()
return wrapper
class HelpRequest(Pyro.core.ObjBase):
def __init__(self):
Pyro.core... |
quarkonics/zstack-woodpecker | refs/heads/master | zstackwoodpecker/zstackwoodpecker/header/vm.py | 1 | import apibinding.inventory as inventory
import zstackwoodpecker.header.header as zstack_header
RUNNING = inventory.RUNNING
STOPPED = inventory.STOPPED
DESTROYED = inventory.DESTROYED
EXPUNGED = 'EXPUNGED'
VOLUME_BANDWIDTH = 'volumeTotalBandwidth'
VOLUME_IOPS = 'volumeTotalIops'
NETWORK_OUTBOUND_BANDWIDTH = 'networkO... |
Eivindbergman/Skrapa | refs/heads/master | libs/chardet/langturkishmodel.py | 269 | # -*- coding: utf-8 -*-
######################## 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... |
bixbydev/Bixby | refs/heads/master | google/gdata/tlslite/constants.py | 279 | """Constants used in various places."""
class CertificateType:
x509 = 0
openpgp = 1
cryptoID = 2
class HandshakeType:
hello_request = 0
client_hello = 1
server_hello = 2
certificate = 11
server_key_exchange = 12
certificate_request = 13
server_hello_done = 14
certificate_ve... |
GitHublong/hue | refs/heads/master | desktop/core/ext-py/Django-1.6.10/extras/csrf_migration_helper.py | 59 | #!/usr/bin/env python
# This script aims to help developers locate forms and view code that needs to
# use the new CSRF protection in Django 1.2. It tries to find all the code that
# may need the steps described in the CSRF documentation. It does not modify
# any code directly, it merely attempts to locate it. Deve... |
trishnaguha/ansible | refs/heads/devel | lib/ansible/plugins/lookup/csvfile.py | 80 | # (c) 2013, Jan-Piet Mens <jpmens(at)gmail.com>
# (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = """
lookup: csvfile
author: Jan-Piet Me... |
davidzchen/tensorflow | refs/heads/master | tensorflow/python/kernel_tests/sparsemask_op_test.py | 35 | # 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... |
CharlesShang/TFFRCNN | refs/heads/master | lib/datasets/kitti_tracking.py | 3 |
import os
import PIL
import numpy as np
import scipy.sparse
import subprocess
import cPickle
import math
from .imdb import imdb
from .imdb import ROOT_DIR
from ..utils.cython_bbox import bbox_overlaps
from ..utils.boxes_grid import get_boxes_grid
# TODO: make fast_rcnn irrelevant
# >>>> obsolete, because it depends... |
christophmeissner/volunteer_planner | refs/heads/develop | shiftmailer/excelexport.py | 5 | # coding: utf-8
import logging
import os
import tempfile
from django.conf import settings
from django.core.mail.message import EmailMessage
from excel_renderer import ExcelRenderer
log = logging.getLogger(__name__)
class GenerateExcelSheet:
def __init__(self, shifts, mailer):
if not shifts:
... |
KiChjang/servo | refs/heads/master | tests/wpt/web-platform-tests/tools/third_party/importlib_metadata/tests/test_zip.py | 12 | import sys
import unittest
from importlib_metadata import (
distribution, entry_points, files, PackageNotFoundError,
version, distributions,
)
try:
from importlib import resources
getattr(resources, 'files')
getattr(resources, 'as_file')
except (ImportError, AttributeError):
import importl... |
abhishekgahlot/tornado-boilerplate | refs/heads/master | settings.py | 6 | import logging
import tornado
import tornado.template
import os
from tornado.options import define, options
import environment
import logconfig
# Make filepaths relative to settings.
path = lambda root,*a: os.path.join(root, *a)
ROOT = os.path.dirname(os.path.abspath(__file__))
define("port", default=8888, help="run... |
akretion/odoo | refs/heads/12-patch-paging-100-in-o2m | addons/website_crm/models/res_config_settings.py | 12 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models
class ResConfigSettings(models.TransientModel):
_inherit = 'res.config.settings'
def _get_crm_default_team_domain(self):
if self.env.user.has_group('crm.group_use_lead'):... |
EmadMokhtar/Django | refs/heads/master | django/core/mail/backends/locmem.py | 128 | """
Backend for test environment.
"""
from django.core import mail
from django.core.mail.backends.base import BaseEmailBackend
class EmailBackend(BaseEmailBackend):
"""
An email backend for use during test sessions.
The test connection stores email messages in a dummy outbox,
rather than sending the... |
lulf/qpid-dispatch | refs/heads/master | tests/system_tests_drain_support.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... |
kmoocdev2/edx-platform | refs/heads/real_2019 | openedx/core/djangoapps/content/course_overviews/tests/test_tasks.py | 18 | import mock
from xmodule.modulestore import ModuleStoreEnum
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
from xmodule.modulestore.tests.factories import CourseFactory
from ..tasks import enqueue_async_course_overview_update_tasks
class BatchedAsyncCourseOverviewUpdateTests(ModuleStoreTestC... |
medspx/QGIS | refs/heads/master | python/plugins/processing/algs/grass7/ext/r_topmodel.py | 5 | # -*- coding: utf-8 -*-
"""
***************************************************************************
r_topmodel.py
-------------
Date : February 2016
Copyright : (C) 2016 by Médéric Ribreux
Email : medspx at medspx dot fr
********************************... |
DeadSix27/python_cross_compile_script | refs/heads/master | packages/dependencies/libopenh264.py | 1 | {
'repo_type' : 'git',
'url' : 'https://github.com/cisco/openh264.git',
'patches' : [
('openh264/0001-remove-fma3-call.patch','-p1'),
],
'needs_configure' : False,
'build_options' : '{make_prefix_options} OS=mingw_nt ARCH={bit_name} ASM=yasm',
'install_options' : '{make_prefix_options} OS=mingw_nt',
'install_... |
nickhand/nbodykit | refs/heads/master | nbodykit/source/mesh/tests/test_linear.py | 2 | from runtests.mpi import MPITest
from nbodykit.lab import *
from nbodykit import setup_logging
from numpy.testing import assert_allclose
setup_logging()
@MPITest([1,4])
def test_paint(comm):
cosmo = cosmology.Planck15
# linear grid
Plin = cosmology.LinearPower(cosmo, redshift=0.55, transfer='Eisenstein... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.