repo_name
stringlengths
6
100
path
stringlengths
4
294
copies
stringlengths
1
5
size
stringlengths
4
6
content
stringlengths
606
896k
license
stringclasses
15 values
dims/neutron
neutron/common/config.py
1
13000
# Copyright 2011 VMware, 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 ...
apache-2.0
rkashapov/buildbot
master/buildbot/www/oauth2.py
2
14924
# This file is part of Buildbot. Buildbot 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 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
gpl-2.0
jordanemedlock/psychtruths
temboo/core/Library/Zendesk/Views/GetViewCount.py
5
3674
# -*- coding: utf-8 -*- ############################################################################### # # GetViewCount # Returns the ticket count for a single view. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use ...
apache-2.0
bacemtayeb/Tierra
src/core/stream.py
1
11392
import gc import re import config from copy import copy from colors import color from textwrap import dedent from util import Msg, Error, debug, check_opts, eval_type from collections import OrderedDict, namedtuple from src.modules.services.service import Service """ Main data bus for interacting with the various ...
gpl-3.0
nginxinc/kubernetes-ingress
tests/suite/grpc/helloworld_pb2.py
1
3911
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: helloworld.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _re...
apache-2.0
maniacx/android_kernel_htcleo-3.0_old
Documentation/target/tcm_mod_builder.py
3119
42754
#!/usr/bin/python # The TCM v4 multi-protocol fabric module generation script for drivers/target/$NEW_MOD # # Copyright (c) 2010 Rising Tide Systems # Copyright (c) 2010 Linux-iSCSI.org # # Author: nab@kernel.org # import os, sys import subprocess as sub import string import re import optparse tcm_dir = "" fabric_ops...
gpl-2.0
eloquence/unisubs
apps/videos/tests/videotestutils.py
5
3779
# -*- coding: utf-8 -*- # Amara, universalsubtitles.org # # Copyright (C) 2013 Participatory Culture Foundation # # 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 #...
agpl-3.0
Artanicus/python-cozify
cozify/test/test_cloud_api.py
1
1584
#!/usr/bin/env python3 import os, pytest, tempfile, datetime from cozify import cloud_api from cozify.test import debug from cozify.test.fixtures import * from cozify.Error import AuthenticationError, APIError, ConnectionError from mbtest.imposters import Imposter, Predicate, Stub, Response @pytest.mark.mbtest def...
mit
chhe/livestreamer
src/livestreamer_cli/packages/shutil_backport.py
25
2832
"""This is a backport of shutil.get_terminal_size from Python 3. The original implementation is in C, but here we use the ctypes and fcntl modules to create a pure Python version of os.get_terminal_size. """ import os import struct import sys from collections import namedtuple terminal_size = namedtuple("terminal_s...
bsd-2-clause
hvnsweeting/Diamond
src/diamond/handler/graphitepickle.py
20
3104
# coding=utf-8 """ Send metrics to a [graphite](http://graphite.wikidot.com/) using the high performace pickle interface. Graphite is an enterprise-scale monitoring tool that runs well on cheap hardware. It was originally designed and written by Chris Davis at Orbitz in 2006 as side project that ultimately grew to be...
mit
ercanezin/ce888labs
lab8/imdb.py
1
2192
from __future__ import print_function import numpy as np np.random.seed(1337) # for reproducibility from keras.preprocessing import sequence from keras.models import Model from keras.layers import Dense, Activation, Embedding, GlobalMaxPooling1D,Convolution1D, Input,LSTM,merge from keras.datasets import imdb max_fe...
gpl-3.0
SYSU-MATHZH/Dedekind-Django
project/sua/softdeletes/mixins.py
2
1347
class SoftDeleteQuerySetMixin: def delete(self): assert self.query.can_filter(), "Cannot use 'limit' or 'offset' with delete." for obj in self.all(): obj.delete() self._result_cache = None delete.alters_data = True class SoftDeleteManagerMixin: """ A manager mixin ...
gpl-3.0
ychen820/microblog
y/google-cloud-sdk/platform/google_appengine/lib/django-1.5/django/contrib/staticfiles/views.py
96
1616
""" Views and functions for serving static files. These are only to be used during development, and SHOULD NOT be used in a production setting. """ import os import posixpath try: from urllib.parse import unquote except ImportError: # Python 2 from urllib import unquote from django.conf import settings fr...
bsd-3-clause
jswope00/griffinx
common/djangoapps/course_modes/admin.py
9
1603
from ratelimitbackend import admin from course_modes.models import CourseMode from django import forms from opaque_keys import InvalidKeyError from xmodule.modulestore.django import modulestore from opaque_keys.edx.keys import CourseKey from opaque_keys.edx.locations import SlashSeparatedCourseKey class CourseModeFo...
agpl-3.0
sahiljain/catapult
third_party/Paste/tests/test_exceptions/test_error_middleware.py
47
3389
from paste.fixture import * from paste.exceptions.errormiddleware import ErrorMiddleware from paste import lint from paste.util.quoting import strip_html # # For some strange reason, these 4 lines cannot be removed or the regression # test breaks; is it counting the number of lines in the file somehow? # def do_reques...
bsd-3-clause
abircse06/youtube-dl
youtube_dl/extractor/kontrtube.py
60
2999
# encoding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import int_or_none class KontrTubeIE(InfoExtractor): IE_NAME = 'kontrtube' IE_DESC = 'KontrTube.ru - Труба зовёт' _VALID_URL = r'http://(?:www\.)?kontrtube\.ru/videos/(?P<id>\d+)/(?P<displa...
unlicense
keedio/hue
desktop/core/src/desktop/management/commands/test.py
20
3517
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
apache-2.0
listamilton/supermilton.repository
plugin.video.traquinas/_ytplist.py
173
4161
import urllib import urllib2,json import xbmcvfs import requests,time import os,xbmc,xbmcaddon,xbmcgui,re addon = xbmcaddon.Addon('plugin.video.live.streamspro') profile = xbmc.translatePath(addon.getAddonInfo('profile').decode('utf-8')) cacheDir = os.path.join(profile, 'cachedir') clean_cache=os.path.join(cacheDir,'cl...
gpl-2.0
dvliman/jaikuengine
.google_appengine/lib/django-1.4/django/contrib/gis/geoip/prototypes.py
200
3730
from ctypes import c_char_p, c_float, c_int, string_at, Structure, POINTER from django.contrib.gis.geoip.libgeoip import lgeoip, free #### GeoIP C Structure definitions #### class GeoIPRecord(Structure): _fields_ = [('country_code', c_char_p), ('country_code3', c_char_p), ('country...
apache-2.0
maheshakya/scikit-learn
sklearn/semi_supervised/label_propagation.py
2
15104
# coding=utf8 """ Label propagation in the context of this module refers to a set of semisupervised classification algorithms. In the high level, these algorithms work by forming a fully-connected graph between all points given and solving for the steady-state distribution of labels at each point. These algorithms per...
bsd-3-clause
zergov/flashcards
flashcards/sets.py
1
3877
""" flashcards.sets ~~~~~~~~~~~~~~~~~~~ Contain the StudySet object and logic related to it. """ from collections import OrderedDict from flashcards import cards from flashcards.cards import StudyCard TITLE_KEY = 'title' DESC_KEY = 'description' CARDS_KEY = 'cards' def create_from_dict(data): """ Construct...
mit
biolab/orange
Orange/OrangeCanvas/scheme/tests/test_nodes.py
13
1133
""" """ from ...gui import test from ...registry.tests import small_testing_registry from ...registry import InputSignal, OutputSignal from .. import SchemeNode class TestScheme(test.QAppTestCase): def test_node(self): """Test SchemeNode. """ reg = small_testing_registry() file_d...
gpl-3.0
googleapis/googleapis-gen
google/ads/googleads/v6/googleads-py/google/ads/googleads/v6/resources/types/search_term_view.py
1
2213
# -*- 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...
apache-2.0
lumig242/Hue-Integration-with-CDAP
desktop/core/ext-py/Django-1.6.10/django/db/backends/oracle/creation.py
104
12331
import sys import time from django.conf import settings from django.db.backends.creation import BaseDatabaseCreation from django.utils.six.moves import input TEST_DATABASE_PREFIX = 'test_' PASSWORD = 'Im_a_lumberjack' class DatabaseCreation(BaseDatabaseCreation): # This dictionary maps Field objects to their ass...
apache-2.0
lpryszcz/REDiscover
taxid2sra.py
1
13105
#!/usr/bin/env python desc="""Fetch all entries from SRA for given taxid. Save the biggest run per each SAMPLE (SRS) from given date. Paired first, if any. Note, it run fastq-dump in background. Make sure you have enough free cores;) DEPENDENCIES: Biopython """ epilog="""Author: l.p.pryszcz+git@gmail.com Barcelona,...
gpl-2.0
ZhangXinNan/tensorflow
tensorflow/python/kernel_tests/partitioned_variables_test.py
1
25955
# 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...
apache-2.0
jadarve/sciwiz
python/sciwebvis/color.py
2
2298
""" sciwebvis.color --------------- :copyright: 2015, Juan David Adarve. See AUTHORS for more details :license: 3-clause BSD, see LICENSE for more details """ import collections import numpy as np from jinja2 import Environment, PackageLoader from .JSRenderable import JSRenderable __all__ = ['Color'...
mit
eeshangarg/zulip
zerver/views/realm_icon.py
1
2428
from django.conf import settings from django.http import HttpRequest, HttpResponse from django.shortcuts import redirect from django.utils.translation import gettext as _ from zerver.decorator import require_realm_admin from zerver.lib.actions import do_change_icon_source from zerver.lib.realm_icon import realm_icon_u...
apache-2.0
jashort/SmartFileSorter
tests/test_integration_tests.py
1
1059
import unittest import smartfilesorter import os import tempfile import shutil class TestIntegrationTests(unittest.TestCase): """ Broader test cases """ def setUp(self): self.source_dir = tempfile.mkdtemp() self.dest_dir = os.path.join(self.source_dir, 'dest/') os.mkdir(self.de...
bsd-3-clause
atosorigin/ansible
test/units/_vendor/test_vendor.py
23
2128
# (c) 2020 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 import os import pkgutil import pytest import sys from units.compat.mock import MagicMock, NonCallableMagicMo...
gpl-3.0
ibrahimkarahan/Flexget
flexget/plugins/search_sceneaccess.py
11
12240
from __future__ import unicode_literals, division, absolute_import import logging import re from urllib import quote from flexget import plugin from flexget import validator from flexget.entry import Entry from flexget.event import event from flexget.utils.soup import get_soup from flexget.utils.search import torrent...
mit
neurotechuoft/MindType
Code/V1/src/deprecated/pyqtgraph/widgets/RemoteGraphicsView.py
14
12416
from ..Qt import QtGui, QtCore, USE_PYSIDE if not USE_PYSIDE: import sip from .. import multiprocess as mp from .GraphicsView import GraphicsView from .. import CONFIG_OPTIONS import numpy as np import mmap, tempfile, ctypes, atexit, sys, random __all__ = ['RemoteGraphicsView'] class RemoteGraphicsView(QtGui.QWid...
agpl-3.0
krash86/android_kernel_google_pixel
tools/perf/scripts/python/syscall-counts.py
1996
1700
# system call counts # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.path.append(os.envir...
gpl-2.0
schieb/angr
tests/test_stochastic.py
3
1173
import os import nose import angr location = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..', 'binaries', 'tests') find = { 'veritesting_a': { 'x86_64': 0x40066a } } criteria = { 'veritesting_a': lambda input_found: input_found.count(b'B') == 10 } def run_stochastic(binary, ...
bsd-2-clause
huiyiqun/check_mk
cmk/regex.py
1
2740
#!/usr/bin/python # -*- encoding: utf-8; py-indent-offset: 4 -*- # +------------------------------------------------------------------+ # | ____ _ _ __ __ _ __ | # | / ___| |__ ___ ___| | __ | \/ | |/ / | # | | | | '_ \ / _ \/ __| |/ /...
gpl-2.0
samliu/servo
tests/wpt/css-tests/tools/manifest/tests/test_sourcefile.py
59
12879
import os import pytest from six import BytesIO from ..sourcefile import SourceFile, read_script_metadata def create(filename, contents=b""): assert isinstance(contents, bytes) return SourceFile("/", filename, "/", contents=contents) def items(s): item_type, items = s.manifest_items() if item_type ...
mpl-2.0
Orav/kbengine
kbe/src/lib/python/Lib/lzma.py
2
19882
"""Interface to the liblzma compression library. This module provides a class for reading and writing compressed files, classes for incremental (de)compression, and convenience functions for one-shot (de)compression. These classes and functions support both the XZ and legacy LZMA container formats, as well as ...
lgpl-3.0
haroldl/homeworklog
django/contrib/gis/admin/widgets.py
321
4430
from django.conf import settings from django.contrib.gis.gdal import OGRException from django.contrib.gis.geos import GEOSGeometry, GEOSException from django.forms.widgets import Textarea from django.template import loader, Context from django.utils import translation # Creating a template context that contains Django...
bsd-3-clause
SublimeHaskell/SublimeHaskell
hsdev/backend.py
1
36770
""" The `hsdev` backend. """ from functools import reduce import io import json import os import os.path import pprint import re import subprocess import threading import sublime import SublimeHaskell.hsdev.callback as HsCallback import SublimeHaskell.hsdev.client as HsDevClient import SublimeHaskell.hsdev.result_pa...
mit
ToonTownInfiniteRepo/ToontownInfinite
toontown/cogdominium/CogdoMazePlayer.py
6
6909
from pandac.PandaModules import Point3, NodePath from direct.fsm.FSM import FSM from direct.interval.IntervalGlobal import ProjectileInterval, Track, ActorInterval from direct.interval.IntervalGlobal import Func, Sequence, Parallel from CogdoMazeGameObjects import CogdoMazeSplattable import CogdoMazeGameGlobals as Glob...
mit
andrew-aladev/samba-talloc-debug
python/samba/tests/upgrade.py
52
1389
# Unix SMB/CIFS implementation. # Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2007 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) a...
gpl-3.0
jdelight/django
tests/nested_foreign_keys/tests.py
207
9426
from __future__ import unicode_literals from django.test import TestCase from .models import ( Event, Movie, Package, PackageNullFK, Person, Screening, ScreeningNullFK, ) # These are tests for #16715. The basic scheme is always the same: 3 models with # 2 relations. The first relation may be null, while the sec...
bsd-3-clause
kkragenbrink/node-gyp
gyp/test/additional-targets/gyptest-additional.py
82
1522
#!/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 simple actions when using an explicit build target of 'all'. """ import TestGyp test = TestGyp.TestGyp() test.run_gyp('all.g...
mit
mysteryjeans/doorsale
doorstep/geo/models.py
3
3498
from __future__ import unicode_literals from django.db import models from django.conf import settings class Country(models.Model): """ Represents a country """ name = models.CharField(max_length=100, unique=True) allow_billing = models.BooleanField(default=True, help_text='Allow billing from this...
gpl-2.0
vikigenius/ns3-mmwave
.waf-1.8.19-b1fc8f7baef51bd2db4c2971909a568d/waflib/Tools/cs.py
9
4136
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file from waflib import Utils,Task,Options,Errors from waflib.TaskGen import before_method,after_method,feature from waflib.Tools import ccroot from waflib.Configure import conf import os,tempfile ccroot....
gpl-2.0
mixman/djangodev
tests/modeltests/aggregation/models.py
139
1181
# coding: utf-8 from django.db import models class Author(models.Model): name = models.CharField(max_length=100) age = models.IntegerField() friends = models.ManyToManyField('self', blank=True) def __unicode__(self): return self.name class Publisher(models.Model): name = models.CharField...
bsd-3-clause
RCOS-Grading-Server/HWserver
tests/e2e/base_testcase.py
2
10499
import shutil import tempfile from datetime import date import os import unittest import json from urllib.parse import urlencode from urllib.parse import urlparse from selenium import webdriver from websocket import create_connection from selenium.common.exceptions import WebDriverException from selenium.webdriver.s...
bsd-3-clause
telefonicaid/fiware-facts
tests/acceptance/fiwarecloto_client/client.py
2
4297
# -*- coding: utf-8 -*- # Copyright 2015 Telefonica Investigación y Desarrollo, S.A.U # # This file is part of FIWARE project. # # 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://w...
apache-2.0
Tepira/binwalk
src/binwalk/plugins/zlibvalid.py
3
1243
import binwalk.core.C import binwalk.core.plugin from binwalk.core.common import BlockFile class ZlibPlugin(binwalk.core.plugin.Plugin): ''' Searches for and validates zlib compressed data. ''' MODULES = ['Signature'] MIN_DECOMP_SIZE = 16 * 1024 MAX_DATA_SIZE = 33 * 1024 TINFL = "tinfl" ...
mit
afsungur/MemWord
framefinish.py
1
2063
import wx from griddict import GridDictionary import Global class FrameFinish(wx.Frame): def __init__(self, parent, true_count, false_count, falses): FRAME_SIZE_WIDTH = 800 FRAME_SIZE_HEIGHT = 300 FRAME_POS_X = 200 FRAME_POS_Y = 200 wx.Frame.__init__(self, parent, -1, ...
gpl-3.0
davidcdba/oBid
oBid/oBid/settings.py
1
6054
#encoding: utf-8 #Para que no de porculo los acentos y Ñ # Django settings for oBid project. ## EXPLICACION ## IMPORTAMOS LA LIBRERIA 'os' del sistema y establecemos como PATH del proyecto la carpeta en la que se encuentra import os PROJECT_PATH=os.path.dirname(os.path.realpath(__file__)) DEBUG = True TEMPLATE_DEBUG ...
gpl-2.0
leiferikb/bitpop
build/third_party/coverage-3.7.1/coverage/misc.py
160
4376
"""Miscellaneous stuff for Coverage.""" import errno import inspect import os import sys from coverage.backward import md5, sorted # pylint: disable=W0622 from coverage.backward import string_class, to_bytes def nice_pair(pair): """Make a nice string representation of a pair of numbers. If the number...
gpl-3.0
mblaauw/pre-publish-predictor
alchemyapi_python/tests.py
1
7384
#!/usr/bin/env python # Copyright 2013 AlchemyAPI # # 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 applicab...
mit
yarikoptic/NiPy-OLD
examples/interfaces/process_fiac.py
1
6055
''' Single subject analysis script for SPM / FIAC ''' import sys from os.path import join as pjoin from glob import glob import numpy as np from nipy.interfaces.spm import spm_info, make_job, scans_for_fnames, \ run_jobdef, fnames_presuffix, fname_presuffix, fltcols def get_data(data_path, subj_id): data_def...
bsd-3-clause
xesscorp/skidl
skidl/bus.py
1
16133
# -*- coding: utf-8 -*- # MIT license # # Copyright (C) 2018 by XESS Corp. # # 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...
mit
dustinrb/mezzanine
mezzanine/galleries/tests.py
54
2140
from __future__ import unicode_literals from future.builtins import str from future.utils import native import os from shutil import rmtree from uuid import uuid4 from mezzanine.conf import settings from mezzanine.core.templatetags.mezzanine_tags import thumbnail from mezzanine.galleries.models import Gallery, GALLER...
bsd-2-clause
WangHanbin/shadowsocks
shadowsocks/crypto/rc4_md5.py
1042
1339
#!/usr/bin/env python # # 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 by applicable law or ...
apache-2.0
LennonLab/ScalingMicroBiodiversity
ExtraTests/lognormal/Prestons_a.py
2
2188
from __future__ import division #from bigfloat import BigFloat, sqrt, exp, log, log2, erf, const_pi import numpy as np import math from numpy import log, log2, exp, sqrt,log10 from scipy.optimize import fsolve import scipy.optimize as opt import matplotlib.pyplot as plt from scipy.special import erf import sys pi = ma...
gpl-3.0
spookylukey/django-wiki
wiki/core/markdown/__init__.py
16
1104
from __future__ import absolute_import, unicode_literals from wiki.conf import settings from wiki.core.markdown.mdx.previewlinks import PreviewLinksExtension from wiki.core.plugins import registry as plugin_registry import markdown class ArticleMarkdown(markdown.Markdown): def __init__(self, article, preview=Fa...
gpl-3.0
vidyaravipati/net-next-rocker
scripts/rt-tester/rt-tester.py
11005
5307
#!/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...
gpl-2.0
amarandon/pinax
pinax/apps/tasks/urls.py
2
1402
from django.conf.urls.defaults import * from pinax.apps.tasks.feeds import AllTaskFeed tasks_feed_dict = {"feed_dict": { "all": AllTaskFeed, }} urlpatterns = patterns("", url(r"^$", "pinax.apps.tasks.views.tasks", name="task_list"), url(r"^(?P<field>modified|state|assignee|tag)/(?P<value>[^/]+)/$", "...
mit
handspring/bite-project
deps/gdata-python-client/samples/apps/marketplace_sample/gdata/tlslite/api.py
359
2965
"""Import this module for easy access to TLS Lite objects. The TLS Lite API consists of classes, functions, and variables spread throughout this package. Instead of importing them individually with:: from tlslite.TLSConnection import TLSConnection from tlslite.HandshakeSettings import HandshakeSettings f...
apache-2.0
avinashkunuje/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/system/stack_utils.py
215
2734
# 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 ...
bsd-3-clause
ereOn/pyslot
doc/source/conf.py
1
9568
# -*- coding: utf-8 -*- # # PySlot documentation build configuration file, created by # sphinx-quickstart on Fri Feb 5 22:24:39 2016. # # 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...
gpl-3.0
Eric-Gaudiello/tensorflow_dev
tensorflow_home/tensorflow_venv/lib/python3.4/site-packages/tensorflow/python/ops/seq2seq.py
3
39692
# Copyright 2015 Google 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 or a...
gpl-3.0
SivilTaram/edx-platform
lms/djangoapps/courseware/tests/test_access.py
51
24303
# -*- coding: utf-8 -*- """ Test the access control framework """ import datetime import ddt import itertools import pytz from django.test import TestCase from django.core.urlresolvers import reverse from mock import Mock, patch from nose.plugins.attrib import attr from opaque_keys.edx.locations import SlashSeparatedC...
agpl-3.0
landism/pants
contrib/scrooge/src/python/pants/contrib/scrooge/tasks/thrift_util.py
31
2554
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os import re ...
apache-2.0
MicheleTobias/CurvilinearAnisotropy
Code/WillametteFiles_Centerline.py
1
1734
# import the modules I'm gonna need import glob, string, csv, os # input the files to use inputdirectory = 'C:\Users\Michele\Documents\Research\CurvilinearAnisotropy\WillametteRiver\willamette_elevations\willamette\centerline_elevation\\' outputfile1 = 'C:\Users\Michele\Documents\Research\CurvilinearAnisotropy\Willame...
gpl-2.0
zhuwenping/python-for-android
python-modules/twisted/twisted/web/test/test_resource.py
53
4638
# Copyright (c) 2009 Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.web.resource}. """ from twisted.trial.unittest import TestCase from twisted.web import error from twisted.web.http import NOT_FOUND, FORBIDDEN from twisted.web.resource import ErrorPage, NoResource, ForbiddenResource ...
apache-2.0
aleida/django
tests/regressiontests/localflavor/is_/tests.py
13
9059
from __future__ import unicode_literals from django.contrib.localflavor.is_.forms import (ISIdNumberField, ISPhoneNumberField, ISPostalCodeSelect) from django.test import SimpleTestCase class ISLocalFlavorTests(SimpleTestCase): def test_ISPostalCodeSelect(self): f = ISPostalCodeSelect() out ...
bsd-3-clause
JohnDenker/brython
www/src/Lib/__future__.py
134
4584
"""Record of phased-in incompatible language changes. Each line is of the form: FeatureName = "_Feature(" OptionalRelease "," MandatoryRelease "," CompilerFlag ")" where, normally, OptionalRelease < MandatoryRelease, and both are 5-tuples of the same form as sys.version_info: (...
bsd-3-clause
solarjoe/numpy
numpy/lib/npyio.py
3
75574
from __future__ import division, absolute_import, print_function import sys import os import re import itertools import warnings import weakref from operator import itemgetter, index as opindex import numpy as np from . import format from ._datasource import DataSource from numpy.core.multiarray import packbits, unpa...
bsd-3-clause
jrbl/invenio
modules/websubmit/lib/functions/Make_Record.py
17
3767
## This file is part of Invenio. ## Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at...
gpl-2.0
kohnle-lernmodule/KITexe201based
twisted/test/test_logfile.py
19
6844
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. from twisted.trial import unittest # system imports import os, shutil, time # twisted imports from twisted.python import logfile class LogFileTestCase(unittest.TestCase): """Test the rotating log file.""" def setUp(sel...
gpl-2.0
jaddison/ansible
lib/ansible/plugins/inventory/ini.py
81
2000
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
gpl-3.0
mollstam/UnrealPy
UnrealPyEmbed/Source/Python/Lib/python27/test/test_decorators.py
194
9849
import unittest from test import test_support def funcattrs(**kwds): def decorate(func): func.__dict__.update(kwds) return func return decorate class MiscDecorators (object): @staticmethod def author(name): def decorate(func): func.__dict__['author'] = name ...
mit
SantosDevelopers/sborganicos
venv/lib/python3.5/site-packages/django/conf/locale/fi/formats.py
504
1390
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j. E Y' TIME_FORMAT = 'G.i' DATET...
mit
crosswalk-project/crosswalk-test-suite
webapi/tct-forms-html5-tests/inst.apk.py
1996
3186
#!/usr/bin/env python import os import shutil import glob import time import sys import subprocess from optparse import OptionParser, make_option SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) PARAMETERS = None ADB_CMD = "adb" def doCMD(cmd): # Do not need handle timeout in this short script, let tool...
bsd-3-clause
pgleeson/TestArea
lib/jython/Lib/xmllib.py
160
34848
"""A parser for XML, using the derived class as static DTD.""" # Author: Sjoerd Mullender. import re import string import warnings warnings.warn("The xmllib module is obsolete. Use xml.sax instead.", DeprecationWarning) del warnings version = '0.3' class Error(RuntimeError): pass # Regular expressions used f...
gpl-2.0
atul-bhouraskar/django
django/contrib/gis/maps/google/gmap.py
526
9223
from __future__ import unicode_literals from django.conf import settings from django.contrib.gis.maps.google.overlays import ( GMarker, GPolygon, GPolyline, ) from django.template.loader import render_to_string from django.utils.html import format_html from django.utils.safestring import mark_safe from django.util...
bsd-3-clause
quinot/ansible
lib/ansible/modules/network/aci/aci_tenant_span_dst_group.py
5
4180
#!/usr/bin/python # -*- coding: utf-8 -*- # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
gpl-3.0
fuhongliang/odoo
addons/knowledge/__init__.py
436
1064
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
lehinevych/cfme_tests
cfme/tests/cloud_infra_common/test_power_control_rest.py
2
5170
# -*- coding: utf-8 -*- import fauxfactory import pytest from cfme.common.vm import VM from utils import testgen from utils.version import current_version from utils.wait import wait_for pytestmark = [ pytest.mark.usefixtures('uses_infra_providers', 'uses_cloud_providers'), pytest.mark.tier(2) ] def pytest...
gpl-2.0
garbas/mozilla-releng-services
lib/cli_common/cli_common/log.py
1
5277
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from __future__ import absolute_import import os import structlog import logbook import structlog.exceptions CHANNELS...
mpl-2.0
zfrenchee/pandas
pandas/core/api.py
1
3146
# pylint: disable=W0614,W0401,W0611 # flake8: noqa import numpy as np from pandas.core.algorithms import factorize, unique, value_counts from pandas.core.dtypes.missing import isna, isnull, notna, notnull from pandas.core.categorical import Categorical from pandas.core.groupby import Grouper from pandas.io.formats.f...
bsd-3-clause
j-carl/boto
boto/ec2/cloudwatch/alarm.py
134
12192
# Copyright (c) 2010 Reza Lotun http://reza.lotun.name # # 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, m...
mit
unindented/streamcode
client/static/jsrepl/extern/python/unclosured/lib/python2.7/encodings/shift_jis_2004.py
816
1059
# # shift_jis_2004.py: Python Unicode Codec for SHIFT_JIS_2004 # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_jp, codecs import _multibytecodec as mbc codec = _codecs_jp.getcodec('shift_jis_2004') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class IncrementalEnc...
mit
fitoria/askbot-devel
askbot/utils/slug.py
13
2456
"""defines the method for building slugs slugification may be disabled with a live setting "USE_ASCII_ONLY_SLUGS" the setting was added just in case - if people actually want to see unicode characters in the slug. If this is the choice slug will be simply equal to the input text """ import re import unicodedata from u...
gpl-3.0
sivel/pyrax
samples/cloud_dns/add_ptr_records.py
13
1496
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c)2012 Rackspace US, 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.ap...
apache-2.0
flwh/KK_mt6589_iq451
prebuilts/python/linux-x86/2.7.5/lib/python2.7/lib2to3/pgen2/token.py
353
1244
#! /usr/bin/env python """Token constants (from "token.h").""" # Taken from Python (r53757) and modified to include some tokens # originally monkeypatched in by pgen2.tokenize #--start constants-- ENDMARKER = 0 NAME = 1 NUMBER = 2 STRING = 3 NEWLINE = 4 INDENT = 5 DEDENT = 6 LPAR = 7 RPAR = 8 LSQB = 9 RSQB = 10 C...
gpl-2.0
siddhantgoel/tornado-sqlalchemy
tests/test_session_mixin.py
1
1642
from unittest.mock import Mock from tornado_sqlalchemy import MissingDatabaseSettingError, SessionMixin from ._common import BaseTestCase, User, db class SessionMixinTestCase(BaseTestCase): def test_mixin_ok(self): class GoodHandler(SessionMixin): def __init__(h_self): h_self...
mit
detrout/pykolab
pykolab/cli/telemetry/cmd_examine_session.py
1
4119
# -*- coding: utf-8 -*- # Copyright 2010-2012 Kolab Systems AG (http://www.kolabsys.com) # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # # 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...
gpl-3.0
edevil/django
django/conf/locale/nb/formats.py
197
1766
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j. F Y' TIME_FORMAT = 'H:i' DATET...
bsd-3-clause
yubang/minServerMonitor
pyinotify.py
9
90520
#!/usr/bin/env python # pyinotify.py - python interface to inotify # Copyright (c) 2005-2015 Sebastien Martini <seb@dbzteam.org> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without res...
apache-2.0
PaddlePaddle/Paddle
python/paddle/fluid/tests/unittests/xpu/test_log_loss_op_xpu.py
2
1987
# Copyright (c) 2020 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 app...
apache-2.0
gltn/stdm
stdm/ui/view_str.py
1
44716
""" /*************************************************************************** Name : View STR Relationships Description : Main Window for searching and browsing the social tenure relationship of the participating entities. Date : 24/May/2014 copyr...
gpl-2.0
thomaspaulb/sale-workflow
sale_last_price_info/models/product.py
28
1207
# -*- encoding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in root directory ############################################################################## from openerp import api, fields, models class ProductP...
agpl-3.0
PaulKinlan/cli-caniuse
site/app/scripts/bower_components/jsrepl-build/extern/python/closured/lib/python2.7/UserString.py
312
9687
#!/usr/bin/env python ## vim:ts=4:et:nowrap """A user-defined wrapper around string objects Note: string objects have grown methods in Python 1.6 This module requires Python 1.6 or later. """ import sys import collections __all__ = ["UserString","MutableString"] class UserString(collections.Sequence): def __init...
apache-2.0
jayme-github/headphones
lib/requests/packages/chardet/mbcsgroupprober.py
2769
1967
######################## 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...
gpl-3.0
nriley/NewsBlur
apps/rss_feeds/migrations/0029_premium_null.py
18
10205
# encoding: 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): # Changing field 'Feed.premium_subscribers' db.alter_column('feeds', 'premium_subscribers', self.gf('djang...
mit