repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
ds-hwang/chromium-crosswalk
refs/heads/master
third_party/WebKit/Source/bindings/scripts/idl_types.py
30
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """IDL type handling. Classes: IdlTypeBase IdlType IdlUnionType IdlArrayOrSequenceType IdlArrayType IdlSequenceType IdlNullableType IdlTypes are pic...
formath/mxnet
refs/heads/master
tests/python/train/test_autograd.py
28
# 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...
davidemms/OrthoFinder
refs/heads/master
tests/test_consensus_tree.py
1
# -*- coding: utf-8 -*- """ Created on Wed Jan 10 18:01:40 2018 @author: david """ import unittest from . import tree from . import consensus_tree as ct import sys sys.path.append("/home/david/workspace/p4/OrthoFinder/orthofinder/scripts/") import tree_isomorphism as ti taxa = "a b c d e".split() taxa_index = {t:...
kirca/odoo
refs/heads/master
addons/sale_analytic_plans/sale_analytic_plans.py
381
# -*- 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...
wholeGenomeSequencingAnalysisPipeline/BacPipe
refs/heads/master
SPAdes-3.13.0-Linux/bin/spades.py
2
#!/usr/bin/env python ############################################################################ # Copyright (c) 2015 Saint Petersburg State University # Copyright (c) 2011-2014 Saint Petersburg Academic University # All Rights Reserved # See file LICENSE for details. ################################################...
kohnle-lernmodule/palama
refs/heads/master
twisted/scripts/twistd.py
19
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. from twisted.python import log, syslog from twisted.python.util import switchUID from twisted.application import app, service from twisted.scripts import mktap from twisted import copyright import os, errno, sys class ServerOptions(a...
kramwens/order_bot
refs/heads/master
venv/lib/python2.7/site-packages/setuptools/msvc.py
89
""" Improved support for Microsoft Visual C++ compilers. Known supported compilers: -------------------------- Microsoft Visual C++ 9.0: Microsoft Visual C++ Compiler for Python 2.7 (x86, amd64); Microsoft Windows SDK 7.0 (x86, x64, ia64); Microsoft Windows SDK 6.1 (x86, x64, ia64) Microsoft Visual C++ 10...
Microsoft/PTVS
refs/heads/master
Python/Tests/TestData/ReplSysPath/Program.py
12133432
synergeticsedx/deployment-wipro
refs/heads/oxa/master.fic
lms/djangoapps/instructor/tests/views/__init__.py
12133432
QUANTAXIS/QUANTAXIS
refs/heads/master
QUANTAXIS_Test/__init__.py
12133432
biicode/common
refs/heads/develop
test/edition/parsing/nodejs/__init__.py
12133432
boldprogressives/django-apihangar
refs/heads/master
apihangar/__init__.py
12133432
ArchiFleKs/magnum
refs/heads/master
magnum/tests/unit/db/sqlalchemy/__init__.py
12133432
fdlm/simplehmm-python
refs/heads/master
hmm.py
1
from math import log from itertools import izip class HMM: def __init__(self, pi, A, B): self.pi = pi self.A = A self.B = B def normalise(l): norm_const = sum(l) return map(lambda x: x / norm_const, l), norm_const def find_max(l): m = max(l) i = l.index(m) return m,...
AizazSharif/aizazsharif.github.io
refs/heads/master
markdown_generator/talks.py
199
# coding: utf-8 # # Talks markdown generator for academicpages # # Takes a TSV of talks with metadata and converts them for use with [academicpages.github.io](academicpages.github.io). This is an interactive Jupyter notebook ([see more info here](http://jupyter-notebook-beginner-guide.readthedocs.io/en/latest/what_i...
zerobatu/edx-platform
refs/heads/master
cms/djangoapps/contentstore/management/commands/check_course.py
160
from django.core.management.base import BaseCommand, CommandError from xmodule.modulestore.django import modulestore from xmodule.modulestore.xml_importer import check_module_metadata_editability from opaque_keys.edx.keys import CourseKey from opaque_keys import InvalidKeyError from opaque_keys.edx.locations import Sla...
nyddle/hyde
refs/heads/master
hyde/users/forms.py
89
# -*- coding: utf-8 -*- from django import forms from .models import User class UserForm(forms.ModelForm): class Meta: # Set this form to use the User model. model = User # Constrain the UserForm to just these fields. fields = ("first_name", "last_name")
yask123/django
refs/heads/master
tests/defer/models.py
282
""" Tests for defer() and only(). """ from django.db import models from django.utils.encoding import python_2_unicode_compatible class Secondary(models.Model): first = models.CharField(max_length=50) second = models.CharField(max_length=50) @python_2_unicode_compatible class Primary(models.Model): name...
nikoonia/gem5v
refs/heads/master
ext/ply/test/lex_dup2.py
174
# lex_dup2.py # # Duplicated rule specifiers import sys if ".." not in sys.path: sys.path.insert(0,"..") import ply.lex as lex tokens = [ "PLUS", "MINUS", "NUMBER", ] t_PLUS = r'\+' t_MINUS = r'-' def t_NUMBER(t): r'\d+' pass def t_NUMBER(t): r'\d+' pass def t_error(t): pass ...
sliz1/servo
refs/heads/master
tests/wpt/web-platform-tests/websockets/handlers/protocol_array_wsh.py
265
#!/usr/bin/python from mod_pywebsocket import msgutil, util def web_socket_do_extra_handshake(request): line = request.headers_in.get('Sec-WebSocket-Protocol') request.ws_protocol = line.split(',', 1)[0] #pass def web_socket_transfer_data(request): while True: msgutil.send_message(request, reque...
bluec0re/pentest_utils
refs/heads/master
pocs/cors/test/cgi-bin/utils.py
1
#!/usr/bin/env python # vim: set ts=8 sw=4 tw=0 fileencoding=utf-8 filetype=python expandtab: import cgi import os def send_response(body, headers=None): if not headers: headers = {} if 'Content-type' not in headers: headers['Content-type'] = 'text/html' for key, value in headers.items()...
guewen/rma
refs/heads/master
__unported__/crm_claim_ext/wizard/returned_lines_from_invoice.py
14
# -*- coding: utf-8 -*- ######################################################################### # # # # ######################################################################### ...
wanglongqi/sympy
refs/heads/master
sympy/galgebra/manifold.py
51
# sympy/galgebra/manifold.py """ manifold.py defines the Manifold class which allows one to create a vector manifold (manifold defined by vector field of coordinates in embedding vector space) calculate the tangent vectors and derivatives of tangent vectors. Once manifold is created multivector fields can be construc...
rodgerd/cobbler
refs/heads/master
cobbler/action_replicate.py
2
""" Replicate from a cobbler master. Copyright 2007-2009, Red Hat, Inc Michael DeHaan <mdehaan@redhat.com> Scott Henson <shenson@redhat.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 Foundation; either ve...
fldc/CouchPotatoServer
refs/heads/custom
libs/enzyme/ogm.py
180
# -*- coding: utf-8 -*- # enzyme - Video metadata parser # Copyright 2011-2012 Antoine Bertin <diaoulael@gmail.com> # Copyright 2003-2006 Thomas Schueppel <stain@acm.org> # Copyright 2003-2006 Dirk Meyer <dischi@freevo.org> # # This file is part of enzyme. # # enzyme is free software; you can redistribute it and/or mod...
hyrole/scrapy
refs/heads/master
scrapy/contrib/logstats.py
144
import warnings from scrapy.exceptions import ScrapyDeprecationWarning warnings.warn("Module `scrapy.contrib.logstats` is deprecated, " "use `scrapy.extensions.logstats` instead", ScrapyDeprecationWarning, stacklevel=2) from scrapy.extensions.logstats import *
danielpronych/python-twitter
refs/heads/master
simplejson/scanner.py
928
"""JSON token scanner """ import re try: from simplejson._speedups import make_scanner as c_make_scanner except ImportError: c_make_scanner = None __all__ = ['make_scanner'] NUMBER_RE = re.compile( r'(-?(?:0|[1-9]\d*))(\.\d+)?([eE][-+]?\d+)?', (re.VERBOSE | re.MULTILINE | re.DOTALL)) def py_make_scan...
Hybrid-Cloud/badam
refs/heads/master
patches_tool/aws_patch/aws_deps/libcloud/storage/__init__.py
1
""" Module for working with Storage """
akshatharaj/django
refs/heads/master
tests/get_object_or_404/tests.py
296
from __future__ import unicode_literals from django.http import Http404 from django.shortcuts import get_list_or_404, get_object_or_404 from django.test import TestCase from .models import Article, Author class GetObjectOr404Tests(TestCase): def test_get_object_or_404(self): a1 = Author.objects.create(n...
MyRookie/SentimentAnalyse
refs/heads/master
venv/lib/python2.7/site-packages/pip/utils/hashes.py
517
from __future__ import absolute_import import hashlib from pip.exceptions import HashMismatch, HashMissing, InstallationError from pip.utils import read_chunks from pip._vendor.six import iteritems, iterkeys, itervalues # The recommended hash algo of the moment. Change this whenever the state of # the art changes; ...
leafclick/intellij-community
refs/heads/master
plugins/hg4idea/testData/bin/mercurial/statichttprepo.py
91
# statichttprepo.py - simple http repository class for mercurial # # This provides read-only repo access to repositories exported via static http # # Copyright 2005-2007 Matt Mackall <mpm@selenic.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or a...
aemal/westcat
refs/heads/master
amcat/scripts/article_upload/fileupload.py
2
########################################################################### # (C) Vrije Universiteit, Amsterdam (the Netherlands) # # # # This file is part of AmCAT - The Amsterdam Content Analysis Toolkit # # ...
ludmilamarian/invenio
refs/heads/master
invenio/legacy/bibedit/__init__.py
2
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015 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 your option) any later...
gh0std4ncer/thug
refs/heads/master
src/ActiveX/modules/AnswerWorks.py
8
# Vantage Linguistics AnserWorks ActiveX Controls # CVE-2007-6387 import logging log = logging.getLogger("Thug") def GetHistory(self, arg): if len(arg) > 215: log.ThugLogging.log_exploit_event(self._window.url, "AnswerWorks ActiveX", ...
Stranger6667/postmarker
refs/heads/master
src/postmarker/models/base.py
1
from json import loads from ..utils import sizes class Model: """Abstract data model for Postmark entities.""" _data = None def __init__(self, manager=None, **kwargs): self._manager = manager self._update(kwargs) def __str__(self): return "{}: {}".format(self.__class__.__na...
boooka/GeoPowerOff
refs/heads/master
venv/lib/python2.7/site-packages/django/conf/project_template/project_name/__init__.py
12133432
stefanfoulis/django-filer-test
refs/heads/master
filer/fields/__init__.py
12133432
iafan/zing
refs/heads/master
pootle/apps/pootle_app/views/index/__init__.py
12133432
watersalesman/aura-botnet
refs/heads/master
aura-server/convey/tests.py
1
import datetime from django.test import TestCase from django.utils import timezone from convey.models import Bot, Command, File import json def create_bot( version='0.1.2', hash_type='sha256sum', hash_sum='testsum123', operating_sys='Test', ip_addr='8.8.8.8', user='test...
ishay2b/tensorflow
refs/heads/segnet
tensorflow/tools/api/tests/api_compatibility_test.py
34
# 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...
mccheung/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/lib2to3/fixes/fix_future.py
529
"""Remove __future__ imports from __future__ import foo is replaced with an empty line. """ # Author: Christian Heimes # Local imports from .. import fixer_base from ..fixer_util import BlankLine class FixFuture(fixer_base.BaseFix): BM_compatible = True PATTERN = """import_from< 'from' module_name="__future...
clan2000/data-science-from-scratch
refs/heads/master
code-python3/most_common_words.py
16
# most_common_words.py import sys from collections import Counter if __name__ == "__main__": # pass in number of words as first argument try: num_words = int(sys.argv[1]) except: print("usage: most_common_words.py num_words") sys.exit(1) # non-zero exit code indicates error ...
simongoffin/website_version
refs/heads/Multi_fonctionnel
addons/hr/__init__.py
382
# -*- 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...
babble/babble
refs/heads/master
include/jython/Lib/test/bugs/pr239.py
31
# A test for PR#239, escaping a quote inside a triple quoted string. s = r""" \""" 1.triple-quote \""" 2.triple-quote """
ccomb/OpenUpgrade
refs/heads/master
addons/sale/__openerp__.py
52
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
eeshangarg/oh-mainline
refs/heads/master
vendor/packages/scrapy/scrapy/tests/test_spidermanager/test_spiders/spider2.py
28
from scrapy.spider import BaseSpider class Spider2(BaseSpider): name = "spider2" allowed_domains = ["scrapy2.org", "scrapy3.org"]
danpetrikin/django-tracking
refs/heads/master
demo/__init__.py
12133432
bhupennewalkar1337/erpnext
refs/heads/develop
erpnext/docs/assets/img/selling/__init__.py
12133432
beckastar/django
refs/heads/master
tests/m2m_through/__init__.py
12133432
2hdddg/pyvidstream
refs/heads/master
vidutil/__init__.py
12133432
overcastcloud/trollius
refs/heads/master
tests/test_proactor_events.py
1
"""Tests for proactor_events.py""" import socket import unittest from trollius import test_utils from trollius.proactor_events import BaseProactorEventLoop from trollius.proactor_events import _ProactorDuplexPipeTransport from trollius.proactor_events import _ProactorSocketTransport from trollius.proactor_events impo...
hrishioa/Aviato
refs/heads/master
flask/Lib/site-packages/nltk/test/portuguese_en_fixt.py
24
# -*- coding: utf-8 -*- from __future__ import absolute_import from nltk.compat import PY3 from nltk.corpus import teardown_module def setup_module(module): from nose import SkipTest raise SkipTest("portuguese_en.doctest imports nltk.examples.pt which doesn't exist!") if not PY3: raise SkipTest...
MihaiMoldovanu/ansible
refs/heads/devel
lib/ansible/modules/cloud/azure/azure_rm_virtualmachine_extension.py
21
#!/usr/bin/python # # Copyright (c) 2017 Sertac Ozercan <seozerca@microsoft.com> # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
tolokoban/grenier
refs/heads/master
src/articles/allergique_a_la_primalite/code.py
1
primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97] def ok(n): if n + 1 in primes: return False for a in range(7): maskA = 2**a if n >= maskA: for b in range(a): maskB = 2**b v = n ^ maskA ...
ryfeus/lambda-packs
refs/heads/master
Keras_tensorflow/source/numpy/lib/twodim_base.py
26
""" Basic functions for manipulating 2d arrays """ from __future__ import division, absolute_import, print_function from numpy.core.numeric import ( asanyarray, arange, zeros, greater_equal, multiply, ones, asarray, where, int8, int16, int32, int64, empty, promote_types, diagonal, ) from numpy.core import...
JackDandy/SickGear
refs/heads/master
lib/hachoir_py3/parser/common/win32_lang_id.py
2
""" Windows 2000 - List of Locale IDs and Language Groups Original data table: http://www.microsoft.com/globaldev/reference/win2k/setup/lcid.mspx """ LANGUAGE_ID = { 0x0436: "Afrikaans", 0x041c: "Albanian", 0x0401: "Arabic Saudi Arabia", 0x0801: "Arabic Iraq", 0x0c01: "Arabic Egypt", 0x1001: "...
unho/translate
refs/heads/master
translate/misc/file_discovery.py
1
# -*- coding: utf-8 -*- # # Copyright 2008 Zuza Software Foundation # Copyright 2014 F Wolff # # This file is part of translate. # # translate 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 o...
michealcarrerweb/LHVent_app
refs/heads/master
LHV_app/settings.py
1
import os PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)) PACKAGE_ROOT = os.path.abspath(os.path.dirname(__file__)) BASE_DIR = PACKAGE_ROOT DEBUG = True DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'LHVent_app', ...
michalliu/OpenWrt-Firefly-Libraries
refs/heads/master
staging_dir/target-mipsel_1004kc+dsp_uClibc-0.9.33.2/usr/lib/python3.4/idlelib/idle_test/mock_idle.py
81
'''Mock classes that imitate idlelib modules or classes. Attributes and methods will be added as needed for tests. ''' from idlelib.idle_test.mock_tk import Text class Func: '''Mock function captures args and returns result set by test. Attributes: self.called - records call even if no args, kwds passed...
konstruktoid/ansible-upstream
refs/heads/devel
lib/ansible/modules/cloud/heroku/__init__.py
12133432
marionleborgne/cloudbrain_examples
refs/heads/master
cloudbrain_examples/__init__.py
12133432
JNRowe/upoints
refs/heads/main
upoints/baken.py
1
# """baken - Imports baken data files.""" # Copyright © 2007-2021 James Rowe <jnrowe@gmail.com> # # SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of upoints. # # upoints is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the ...
NewpTone/stacklab-nova
refs/heads/master
nova/tests/api/openstack/test_xmlutil.py
14
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # 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/...
paveu/api_mocker
refs/heads/develop
apimocker/mocker/views.py
1
# -*- coding: utf-8 -*- import logging from django.contrib import messages from django.utils.decorators import method_decorator from django.views import View from django.views.decorators.csrf import csrf_exempt from django.views.generic import FormView, CreateView from .enums import SUCCESS_FORM_ACTION_MSG from .form...
achang97/YouTunes
refs/heads/master
lib/python2.7/site-packages/oauth2client/contrib/xsrfutil.py
39
# Copyright 2014 the Melange authors. # # 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 wr...
cd334/hangoutsbot
refs/heads/master
hangupsbot/sinks/generic/simpledemo.py
4
import time import json import base64 import io import asyncio import imghdr import logging from http.server import BaseHTTPRequestHandler from urllib.parse import urlparse, parse_qs from utils import simple_parse_to_segments class webhookReceiver(BaseHTTPRequestHandler): _bot = None # set externally by the han...
hardanimal/UFT_UPGEM
refs/heads/master
src/UFT_GUI/log_handler.py
1
#!/usr/bin/env python # encoding: utf-8 """Description: Initilize the logger """ __version__ = "0.1" __author__ = "@mzfa" import sys import logging from PyQt4 import QtCore class XStream(QtCore.QObject): _stdout = None _stderr = None messageWritten = QtCore.pyqtSignal(str) def flush(self): ...
nikolas/lettuce
refs/heads/master
tests/integration/lib/Django-1.2.5/tests/regressiontests/forms/__init__.py
12133432
MaxTyutyunnikov/lino
refs/heads/master
lino/modlib/courses/fixtures/demo.py
1
# -*- coding: UTF-8 -*- ## Copyright 2012-2013 Luc Saffre ## This file is part of the Lino project. ## Lino 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 y...
y-j-n/pyFastfusion
refs/heads/master
modeler/util.py
1
import os import errno import shutil import sys import math import numpy as np from numpy import linalg as LA from PySide import QtCore, QtGui, QtOpenGL import time from contextlib import contextmanager # http://stackoverflow.com/questions/2327719/timing-block-of-code-in-python-without-putting-it-in-a-function @con...
shubhdev/edxOnBaadal
refs/heads/master
common/lib/capa/capa/inputtypes.py
1
# # File: courseware/capa/inputtypes.py # """ Module containing the problem elements which render into input objects - textline - textbox (aka codeinput) - schematic - choicegroup (aka radiogroup, checkboxgroup) - javascriptinput - imageinput (for clickable image) - optioninput (for option list) - filesubmission (...
czpython/django-cms
refs/heads/develop
cms/tests/test_publisher.py
1
# -*- coding: utf-8 -*- from djangocms_text_ckeditor.models import Text from django.contrib.auth import get_user_model from django.contrib.sites.models import Site from django.core.cache import cache from django.core.management.base import CommandError from django.core.management import call_command from django.core.ur...
nthiep/global-ssh-server
refs/heads/master
gshproject/api/permissions.py
1
from rest_framework import permissions from manage.models import Domain from node.models import Machine class IsAuthenticatedOrCreate(permissions.IsAuthenticated): def has_permission(self, request, view): if request.method == 'POST': return True return super(IsAuthenticatedOrCreate, self).has_permission(request...
ksmit799/Toontown-Source
refs/heads/master
toontown/speedchat/TTSCResistanceTerminal.py
6
from otp.speedchat.SCTerminal import SCTerminal from toontown.chat import ResistanceChat TTSCResistanceMsgEvent = 'TTSCResistanceMsg' def decodeTTSCResistanceMsg(textId): return ResistanceChat.getChatText(textId) class TTSCResistanceTerminal(SCTerminal): def __init__(self, textId, charges): SCTermin...
vitaly4uk/django
refs/heads/master
django/contrib/gis/management/commands/ogrinspect.py
369
import argparse from django.contrib.gis import gdal from django.core.management.base import BaseCommand, CommandError from django.utils.inspect import get_func_args class LayerOptionAction(argparse.Action): """ Custom argparse action for the `ogrinspect` `layer_key` keyword option which may be an integer...
forevernull/incubator-airflow
refs/heads/master
airflow/example_dags/example_trigger_controller_dag.py
45
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
ammubhave/dropboxfs
refs/heads/master
dropbox-python-sdk-2.2.0/build/lib.linux-x86_64-2.7/dropbox/session.py
8
""" dropbox.session.DropboxSession is responsible for holding OAuth authentication info (app key/secret, request key/secret, access key/secret). It knows how to use all of this information to craft properly constructed requests to Dropbox. A DropboxSession object must be passed to a dropbox.client.DropboxClient object...
mahak/ansible
refs/heads/devel
test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/modules/win_selfcontained.py
82
# docs for Windows module would go here; just ensure we don't accidentally load this instead of the .ps1
blackye/luscan-devel
refs/heads/master
thirdparty_libs/django/templatetags/tz.py
114
from datetime import datetime, tzinfo try: import pytz except ImportError: pytz = None from django.template import Node from django.template import TemplateSyntaxError, Library from django.utils import six from django.utils import timezone register = Library() # HACK: datetime is an old-style class, create...
ecobost/pipeline
refs/heads/master
python/pipeline/utils/enhancement.py
5
import numpy as np from scipy import ndimage def lcn(image, sigmas=(12, 12)): """ Local contrast normalization. Normalize each pixel using mean and stddev computed on a local neighborhood. We use gaussian filters rather than uniform filters to compute the local mean and std to soften the effect of e...
mydongistiny/external_chromium_org
refs/heads/benzo
mojo/public/tools/bindings/pylib/mojom/generate/data_tests.py
104
# 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 sys import data import test_support EXPECT_EQ = test_support.EXPECT_EQ EXPECT_TRUE = test_support.EXPECT_TRUE RunTest = test_support.RunTest def D...
amyvmiwei/kbengine
refs/heads/master
kbe/src/lib/python/Lib/test/test_email/test_inversion.py
120
"""Test the parser and generator are inverses. Note that this is only strictly true if we are parsing RFC valid messages and producing RFC valid messages. """ import io import unittest from email import policy, message_from_bytes from email.generator import BytesGenerator from test.test_email import TestEmailBase, pa...
pkats15/hdt_analyzer
refs/heads/master
django_test/django_venv/Lib/site-packages/pip/_vendor/html5lib/serializer/__init__.py
1731
from __future__ import absolute_import, division, unicode_literals from .. import treewalkers from .htmlserializer import HTMLSerializer def serialize(input, tree="etree", format="html", encoding=None, **serializer_opts): # XXX: Should we cache this? walker = treewalkers.getTreeWalker(tree) ...
odlgroup/odl
refs/heads/master
examples/solvers/nuclear_norm_minimization.py
2
"""Nuclear norm minimization using the Douglas-Rachford solver. Solves the optimization problem min_{x_1, x_2} ||x_1 - g_1||_2^2 + ||x_2 - g_2||_2^2 + lam || [grad(x_1), grad(x_2)] ||_* where ``grad`` is the spatial gradient, ``g`` the given noisy data and ``|| . ||_*`` is the nuclear norm. T...
hyperized/ansible
refs/heads/devel
lib/ansible/modules/cloud/centurylink/clc_publicip.py
47
#!/usr/bin/python # # Copyright (c) 2015 CenturyLink # 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': ['previe...
scpeters/catkin
refs/heads/indigo-devel
python/catkin/__init__.py
12133432
pgmillon/ansible
refs/heads/devel
lib/ansible/modules/cloud/digital_ocean/digital_ocean_image_info.py
6
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Ansible Project # Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = ty...
cneill/designate
refs/heads/master
contrib/tempest/dns_schema/records.py
9
# Copyright 2014 Hewlett-Packard Development Company, L.P # # 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 require...
geoenvo/geonode
refs/heads/master
geonode/contrib/dynamic/admin.py
36
from django.contrib.gis import admin from geonode.contrib.dynamic.models import ModelDescription for md in ModelDescription.objects.all(): TheModel, TheAdmin = md.get_django_model(with_admin=True) admin.site.register(TheModel, TheAdmin)
seocam/django
refs/heads/master
tests/generic_views/test_dates.py
17
from __future__ import unicode_literals import datetime from django.core.exceptions import ImproperlyConfigured from django.test import TestCase, override_settings, skipUnlessDBFeature from django.test.utils import requires_tz_support from django.utils import timezone from .models import Book, BookSigning def _mak...
xiaoxiamii/scikit-learn
refs/heads/master
examples/exercises/plot_iris_exercise.py
323
""" ================================ SVM Exercise ================================ A tutorial exercise for using different SVM kernels. This exercise is used in the :ref:`using_kernels_tut` part of the :ref:`supervised_learning_tut` section of the :ref:`stat_learn_tut_index`. """ print(__doc__) import numpy as np i...
btallman/incubator-airflow
refs/heads/master
scripts/perf/scheduler_ops_metrics.py
30
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softw...
MQQiang/kbengine
refs/heads/master
kbe/src/lib/python/Lib/pydoc_data/__init__.py
12133432
jabesq/home-assistant
refs/heads/dev
homeassistant/components/cloud/http_api.py
1
"""The HTTP api to control the cloud integration.""" import asyncio from functools import wraps import logging import attr import aiohttp import async_timeout import voluptuous as vol from homeassistant.core import callback from homeassistant.components.http import HomeAssistantView from homeassistant.components.http...
kawamon/hue
refs/heads/master
desktop/core/ext-py/SQLAlchemy-1.3.17/examples/join_conditions/__init__.py
7
"""Examples of various :func:`.orm.relationship` configurations, which make use of the ``primaryjoin`` argument to compose special types of join conditions. .. autosource:: """
olafdietsche/scrapy
refs/heads/master
tests/test_spiderloader/__init__.py
107
import sys import os import shutil from zope.interface.verify import verifyObject from twisted.trial import unittest # ugly hack to avoid cyclic imports of scrapy.spiders when running this test # alone from scrapy.interfaces import ISpiderLoader from scrapy.spiderloader import SpiderLoader from scrapy.settings impor...
rotofly/odoo
refs/heads/master
addons/product_extended/wizard/__init__.py
374
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify #...
ssssam/rdflib
refs/heads/master
rdflib/plugins/parsers/hturtle.py
24
# -*- coding: utf-8 -*- """ Extraction parser RDF embedded verbatim into HTML or XML files. This is based on: * The specification on embedding turtle into html: http://www.w3.org/TR/turtle/#in-html For SVG (and currently SVG only) the method also extracts an embedded RDF/XML data, per SVG specification License: ...
ff94315/hiwifi-openwrt-HC5661-HC5761
refs/heads/master
staging_dir/host/lib/python2.7/lib-tk/test/test_tkinter/__init__.py
12133432
jeroenj/CouchPotatoServer
refs/heads/master
couchpotato/core/media/movie/providers/metadata/__init__.py
12133432