repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
aachik/flask-blog-abdulmx
refs/heads/master
env/lib/python2.7/site-packages/gunicorn/__init__.py
41
# -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. version_info = (19, 3, 0) __version__ = ".".join([str(v) for v in version_info]) SERVER_SOFTWARE = "gunicorn/%s" % __version__
jejimenez/django
refs/heads/master
django/contrib/gis/gdal/base.py
654
from ctypes import c_void_p from django.contrib.gis.gdal.error import GDALException from django.utils import six class GDALBase(object): """ Base object for GDAL objects that has a pointer access property that controls access to the underlying C pointer. """ # Initially the pointer is NULL. _...
norayr/unisubs
refs/heads/staging
apps/videos/management/commands/test_celery.py
6
# 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 # License, or (at your ...
aldeloren/super_secret_thing
refs/heads/master
doc/Guide/conf.py
3
# -*- coding: utf-8 -*- # # Kurogo iOS documentation build configuration file, created by # sphinx-quickstart on Mon Jun 20 19:14:53 2011. # # 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. # # ...
numeratechoir/python-twitter
refs/heads/master
twitter/parse_tweet.py
18
#!/usr/bin/env python import re from twitter import TwitterError # import not used? class Emoticons: POSITIVE = ["*O","*-*","*O*","*o*","* *", ":P",":D",":d",":p", ";P",";D",";d",";p", ":-)",";-)",":=)",";=)", ":<)",":>)",";>)",";=)", ...
orlov-vo/mtasa
refs/heads/master
vendor/google-breakpad/src/third_party/protobuf/protobuf/python/google/protobuf/internal/containers.py
261
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions o...
gencer/sentry
refs/heads/master
src/social_auth/backends/trello.py
6
""" Obtain TRELLO_CONSUMER_KEY & TRELLO_CONSUMER_SECRET at https://trello.com/1/appKey/generate and put into settings.py Also you can put something like TRELLO_AUTH_EXTRA_ARGUMENTS = { 'name': '7WebPages Time Tracker', 'expiration': 'never' } into settings.py """ from __future__ import absolute_import import...
nishigori/boto
refs/heads/develop
tests/integration/ec2/vpc/test_connection.py
114
#!/usr/bin/env python # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved # # 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 ...
leonardbj/AIMS
refs/heads/master
src/exec/co2_data.py
1
""" Description here Author: Leonard Berrada Date: 5 Nov 2015 """ import sys sys.path.append("../") import matplotlib.pyplot as plt from Regression import AutoRegressive, AutoCorrelation, GaussianProcess, KalmanFilter from process_data import data_from_file file_name = "co2.mat" data_dict = data_from_file(file_...
elg/passhport
refs/heads/master
docs/conf.py
2
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # PaSSHport documentation build configuration file, created by # sphinx-quickstart on Sat Sep 2 14:47:10 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 # ...
mahinthjoe/bedrock
refs/heads/master
py3env/lib/python3.4/site-packages/setuptools/command/saveopts.py
1052
from setuptools.command.setopt import edit_config, option_base class saveopts(option_base): """Save command-line options to a file""" description = "save supplied options to setup.cfg or other config file" def run(self): dist = self.distribution settings = {} for cmd in dist.com...
Eric89GXL/vispy
refs/heads/master
examples/basics/visuals/dynamic_polygon.py
1
# -*- coding: utf-8 -*- # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. """ Demonstration of Polygon and subclasses """ import sys import numpy as np from vispy import app, visuals from vispy.visuals import transforms # vertex po...
mdhaman/superdesk-core
refs/heads/master
superdesk/default_settings.py
1
#!/usr/bin/env python # -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014, 2015 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/sup...
sassoftware/rmake3
refs/heads/master
rmake/multinode/server/messagebus.py
2
# # Copyright (c) SAS Institute 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 agreed to in w...
brandon-rhodes/numpy
refs/heads/master
numpy/core/tests/test_records.py
10
from __future__ import division, absolute_import, print_function import sys from os import path import numpy as np from numpy.testing import * from numpy.compat import asbytes, asunicode import warnings import collections import pickle class TestFromrecords(TestCase): def test_fromrecords(self): r = np....
asavah/xbmc
refs/heads/fix-cscriptrunner
addons/metadata.themoviedb.org.python/python/lib/tmdbscraper/traktratings.py
23
# -*- coding: UTF-8 -*- # # Copyright (C) 2020, Team Kodi # # 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) any later version. # # This pro...
goodwinnk/intellij-community
refs/heads/master
python/testData/editing/spaceDocStringStubInFunction.after.py
53
def func(x, y, z): """ :param x: <caret> :param y: :param z: :return: """
AnObfuscator/Lean
refs/heads/master
Algorithm.Python/ParameterizedAlgorithm.py
8
# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. # Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation. # # 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 Li...
Tejal011089/paypal_erpnext
refs/heads/develop
erpnext/patches/v5_0/update_dn_against_doc_fields.py
109
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt import frappe def execute(): frappe.reload_doc('stock', 'doctype', 'delivery_note_item') frappe.db.sql("""update `tabDelivery Note Item` set so_detail = prevdoc_detail_docname where ifnu...
Vayne-Lover/Effective
refs/heads/master
Python/Learn Python The Hard Way/ex21.py
1
# -*- coding: utf-8 -*- def add(a,b): return a+b def sub(a,b): return a-b def mul(a,b): return a*b def div(a,b): return a/b a=add(10,20) b=sub(90,20) c=mul(5,2) d=div(50,25) print(a,b,c,d) print(add(a,sub(200,mul(5,div(10,2)))))
goliveirab/odoo
refs/heads/8.0
openerp/addons/base/workflow/workflow.py
199
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (C) 2004-2014 OpenERP S.A. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms o...
incuna/base-library
refs/heads/master
test_project/wsgi.py
4
""" WSGI config for test_project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS...
RobertoMalatesta/qpid-proton
refs/heads/master
proton-c/mllib/parsers.py
12
# # 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...
SciLifeLab/bcbio-nextgen
refs/heads/master
bcbio/workflow/stormseq.py
10
"""Prepare a workflow for running on AWS using STORMSeq as a front end. http://www.stormseq.org/ """ import argparse import json import os import yaml from bcbio import utils from bcbio.upload import s3 from bcbio.workflow import xprize def parse_args(args): parser = xprize.HelpArgParser(description="Run STORMS...
mwmuni/LIGGGHTS_GUI
refs/heads/master
OpenGL/GL/ARB/texture_storage_multisample.py
9
'''OpenGL extension ARB.texture_storage_multisample This module customises the behaviour of the OpenGL.raw.GL.ARB.texture_storage_multisample to provide a more Python-friendly API Overview (from the spec) The ARB_texture_storage extension and OpenGL 4.2 introduced the concept of immutable texture objects. With ...
ianyh/heroku-buildpack-python-opencv
refs/heads/master
vendor/.heroku/lib/python2.7/wave.py
10
"""Stuff to parse WAVE files. Usage. Reading WAVE files: f = wave.open(file, 'r') where file is either the name of a file or an open file pointer. The open file pointer must have methods read(), seek(), and close(). When the setpos() and rewind() methods are not used, the seek() method is not necessary. This ...
2014c2g2/2014c2
refs/heads/master
exts/w2/static/Brython2.0.0-20140209-164925/Lib/difflib.py
737
#! /usr/bin/env python3 """ Module difflib -- helpers for computing deltas between objects. Function get_close_matches(word, possibilities, n=3, cutoff=0.6): Use SequenceMatcher to return list of the best "good enough" matches. Function context_diff(a, b): For two lists of strings, return a delta in context ...
mbayon/TFG-MachineLearning
refs/heads/master
venv/lib/python3.6/site-packages/pandas/types/common.py
22
import warnings warnings.warn("pandas.types.common is deprecated and will be " "removed in a future version, import " "from pandas.api.types", DeprecationWarning, stacklevel=3) from pandas.core.dtypes.common import * # noqa
catapult-project/catapult
refs/heads/master
telemetry/third_party/altgraph/altgraph/GraphStat.py
3
''' altgraph.GraphStat - Functions providing various graph statistics ================================================================= ''' from __future__ import division from __future__ import absolute_import import sys # 2To3-division: the / operations here are not converted to // as the results # are expected floa...
deployed/django
refs/heads/master
django/contrib/gis/maps/google/overlays.py
6
from __future__ import unicode_literals from django.contrib.gis.geos import fromstr, Point, LineString, LinearRing, Polygon from django.utils.functional import total_ordering from django.utils.safestring import mark_safe from django.utils import six from django.utils.encoding import python_2_unicode_compatible @pyth...
halberom/ansible
refs/heads/devel
lib/ansible/plugins/lookup/file.py
131
# (c) 2012, Daniel Hokka Zakrisson <daniel@hozac.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) any lat...
oasiswork/odoo
refs/heads/8.0
addons/website_mail_group/__init__.py
3964
import controllers import models
xodus7/tensorflow
refs/heads/master
tensorflow/contrib/data/python/kernel_tests/writer_ops_test.py
2
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
hastexo/edx-platform
refs/heads/master
cms/djangoapps/contentstore/views/error.py
9
# pylint: disable=missing-docstring,unused-argument import functools from django.http import HttpResponse, HttpResponseNotFound, HttpResponseServerError from edxmako.shortcuts import render_to_response, render_to_string from openedx.core.djangolib.js_utils import dump_js_escaped_json __all__ = ['not_found', 'server...
cheral/orange3-text
refs/heads/master
orangecontrib/text/widgets/owtwitter.py
1
from AnyQt.QtCore import Qt from AnyQt.QtWidgets import QApplication, QGridLayout, QLabel, QFormLayout from Orange.widgets import gui from Orange.widgets.credentials import CredentialManager from Orange.widgets.settings import Setting from Orange.widgets.widget import OWWidget, Msg from orangecontrib.text import twitt...
Davidjohnwilson/sympy
refs/heads/master
sympy/liealgebras/tests/test_root_system.py
125
from sympy.liealgebras.root_system import RootSystem from sympy.liealgebras.type_a import TypeA from sympy.matrices import Matrix def test_root_system(): c = RootSystem("A3") assert c.cartan_type == TypeA(3) assert c.simple_roots() == {1: [1, -1, 0, 0], 2: [0, 1, -1, 0], 3: [0, 0, 1, -1]} assert c.roo...
allotria/intellij-community
refs/heads/master
python/testData/codeInsight/classMRO/ComplicatedDiamond.py
83
class A(object): pass class B(A): pass class C(A): pass class D(A): pass class E(B): pass class F(B): pass class G(C, D): pass class H(E, F, G): pass
Yong-Lee/decode-Django
refs/heads/master
Django-1.5.1/tests/regressiontests/forms/tests/extra.py
44
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import datetime from django.forms import * from django.forms.extras import SelectDateWidget from django.forms.util import ErrorList from django.test import TestCase from django.test.utils import override_settings from django.utils import...
flo298/linux
refs/heads/rpi-4.1.y
scripts/gdb/linux/dmesg.py
367
# # gdb helper commands and functions for Linux kernel debugging # # kernel log buffer dump # # Copyright (c) Siemens AG, 2011, 2012 # # Authors: # Jan Kiszka <jan.kiszka@siemens.com> # # This work is licensed under the terms of the GNU GPL version 2. # import gdb import string from linux import utils class LxDme...
CallaJun/hackprince
refs/heads/master
indico/networkx/algorithms/tests/test_vitality.py
83
#!/usr/bin/env python from nose.tools import * import networkx as nx class TestVitality: def test_closeness_vitality_unweighted(self): G=nx.cycle_graph(3) v=nx.closeness_vitality(G) assert_equal(v,{0:4.0, 1:4.0, 2:4.0}) assert_equal(v[0],4.0) def test_closeness_vitality_weight...
xurxof/reddtube
refs/heads/master
utils.py
1
import urllib2 import time def attempts(max_attempts, default_value, wait=4): # F is func or method without instance def wrap(function): def wrapper(*args, **kwargs): # class instance in args[0] for method curr_attempts = 0 return_value = default_value while curr_att...
coolshou/htc_k2u_kernel-3.4.10
refs/heads/master
scripts/gcc-wrapper.py
74
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2011-2012, Code Aurora Forum. 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 a...
dkubiak789/odoo
refs/heads/8.0
openerp/report/render/__init__.py
381
# -*- 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...
ivan-fedorov/intellij-community
refs/heads/master
python/testData/inspections/PyClassHasNoInitInspection/parentClass.py
83
__author__ = 'ktisha' class <weak_warning descr="Class has no __init__ method">A</weak_warning>: def foo(self): self.b = 1 class B(A): def __init__(self): self.b = 2
Omegaphora/external_chromium_org
refs/heads/lp5.1
media/tools/constrained_network_server/cns_test.py
168
#!/usr/bin/env python # Copyright (c) 2012 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. """Tests for Constrained Network Server.""" import os import signal import subprocess import tempfile import time import unittest i...
deepmind/acme
refs/heads/master
acme/agents/jax/normalization.py
1
# python3 # Copyright 2018 DeepMind Technologies Limited. 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 re...
GarySparrow/mFlaskWeb
refs/heads/master
venv/Lib/site-packages/requests/packages/chardet/latin1prober.py
1777
######################## 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...
40223117cda/w17test
refs/heads/master
static/Brython3.1.0-20150301-090019/Lib/gc.py
743
"""This module provides access to the garbage collector for reference cycles. enable() -- Enable automatic garbage collection. disable() -- Disable automatic garbage collection. isenabled() -- Returns true if automatic collection is enabled. collect() -- Do a full collection right now. get_count() -- Return the curren...
felix-d/boto
refs/heads/develop
tests/integration/route53/test_zone.py
100
# Copyright (c) 2011 Blue Pines Technologies LLC, Brad Carleton # www.bluepines.org # Copyright (c) 2012 42 Lines Inc., Jim Browne # # 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 re...
martinfesser/PythonAndAi
refs/heads/master
pybraincorrected/datasets/__init__.py
1
from pybraincorrected.datasets.classification import ClassificationDataSet
antoinecarme/pyaf
refs/heads/master
tests/artificial/transf_RelativeDifference/trend_Lag1Trend/cycle_7/ar_/test_artificial_32_RelativeDifference_Lag1Trend_7__0.py
1
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 32 , FREQ = 'D', seed = 0, trendtype = "Lag1Trend", cycle_length = 7, transform = "RelativeDifference", sigma = 0.0, exog_count = 0, ar_order = 0);
farebord/qtile
refs/heads/develop
libqtile/window.py
3
# Copyright (c) 2008, Aldo Cortesi. All rights reserved. # # 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,...
allevato/swift
refs/heads/master
utils/update_checkout/tests/scheme_mock.py
12
# ===--- SchemeMock.py ----------------------------------------------------===# # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https:#swift.org/LICENS...
nicememory/pie
refs/heads/master
pyglet/tests/extlibs/future/py2_3/future/moves/tkinter/messagebox.py
118
from __future__ import absolute_import from future.utils import PY3 if PY3: from tkinter.messagebox import * else: try: from tkMessageBox import * except ImportError: raise ImportError('The tkMessageBox module is missing. Does your Py2 ' 'installation include tkin...
KristianOellegaard/django-health-check
refs/heads/master
health_check/contrib/rabbitmq/__init__.py
1
default_app_config = 'health_check.contrib.rabbitmq.apps.HealthCheckConfig'
diego-d5000/MisValesMd
refs/heads/master
env/lib/python2.7/site-packages/django/utils/lru_cache.py
1
try: from functools import lru_cache except ImportError: # backport of Python's 3.3 lru_cache, written by Raymond Hettinger and # licensed under MIT license, from: # <http://code.activestate.com/recipes/578078-py26-and-py30-backport-of-python-33s-lru-cache/> # Should be removed when Django o...
bobobox/ansible
refs/heads/devel
test/integration/targets/module_utils/module_utils/bar0/foo.py
298
data = 'bar0'
RyokoAkizuki/mtasa-blue
refs/heads/master
vendor/google-breakpad/src/tools/gyp/test/make/gyptest-dependencies.py
344
#!/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 .d files and all.deps are properly generated. """ import TestGyp # .d files are only used by the make build. test = Test...
jlcarmic/producthunt_simulator
refs/heads/master
venv/lib/python2.7/site-packages/scipy/spatial/_procrustes.py
71
""" This module provides functions to perform full Procrustes analysis. This code was originally written by Justin Kucynski and ported over from scikit-bio by Yoshiki Vazquez-Baeza. """ from __future__ import absolute_import, division, print_function import numpy as np from scipy.linalg import orthogonal_procrustes ...
michaelkirk/QGIS
refs/heads/master
python/plugins/processing/algs/lidar/lastools/lasheightPro.py
1
# -*- coding: utf-8 -*- """ *************************************************************************** lasheightPro.py --------------------- Date : October 2014 Copyright : (C) 2014 by Martin Isenburg Email : martin near rapidlasso point com **************...
bkirui/odoo
refs/heads/8.0
addons/survey_crm/__init__.py
385
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2011 OpenERP S.A (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
SnabbCo/neutron
refs/heads/master
neutron/services/firewall/drivers/__init__.py
267
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 OpenStack Foundation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apac...
thaim/ansible
refs/heads/fix-broken-link
lib/ansible/modules/network/cnos/cnos_rollback.py
21
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function) __metaclass__ = type # # Copyright (C) 2017 Lenovo, 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 Licens...
RaviTezu/yowsup
refs/heads/master
yowsup/layers/protocol_media/protocolentities/message_media_downloadable.py
45
from .message_media import MediaMessageProtocolEntity from yowsup.common.tools import WATools import mimetypes import os class DownloadableMediaMessageProtocolEntity(MediaMessageProtocolEntity): ''' <message t="{{TIME_STAMP}}" from="{{CONTACT_JID}}" offline="{{OFFLINE}}" type="text" id="{{MESSAGE_ID}}"...
kidburglar/youtube-dl
refs/heads/master
youtube_dl/extractor/tvnet.py
23
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( int_or_none, unescapeHTML, url_or_none, ) class TVNetIE(InfoExtractor): _VALID_URL = r'https?://(?:[^/]+)\.tvnet\.gov\.vn/[^/]+/(?:\d+/)?(?P<id>\d+)(?:/|$)' _TESTS = [{ ...
deandunbar/bitwave
refs/heads/master
hackathon_version/venv/lib/python2.7/site-packages/pip/_vendor/distlib/database.py
360
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2013 The Python Software Foundation. # See LICENSE.txt and CONTRIBUTORS.txt. # """PEP 376 implementation.""" from __future__ import unicode_literals import base64 import codecs import contextlib import hashlib import logging import os import posixpath import sys import z...
jmfranck/pyspecdata
refs/heads/master
pyspecdata/general_functions.py
1
r"""These are general functions that need to be accessible to everything inside pyspecdata.core. I can't just put these inside pyspecdata.core, because that would lead to cyclic imports, and e.g. submodules of pyspecdata can't find them.""" import os import sys from matplotlib.pylab import gci from numpy import pi de...
wyrover/titanium_desktop
refs/heads/master
sdk/PyRTF/Constants.py
6
class ViewKind : """An integer (0-5) that represents the view mode of the document.""" NONE = 0 PageLayout = 1 Outline = 2 MasterDocument = 3 Normal = 4 OnlineLayout = 5 DEFAULT = PageLayout def _IsValid( cls, value ) : return value in [ 0, 1, 2, 3, 4, 5 ] IsValid = classme...
rtucker/sycamore
refs/heads/master
Sycamore/support/pytz/zoneinfo/Pacific/Pitcairn.py
9
'''tzinfo timezone information for Pacific/Pitcairn.''' from pytz.tzinfo import DstTzInfo from pytz.tzinfo import memorized_datetime as d from pytz.tzinfo import memorized_ttinfo as i class Pitcairn(DstTzInfo): '''Pacific/Pitcairn timezone definition. See datetime.tzinfo for details''' zone = 'Pacific/Pitcair...
mahak/keystone
refs/heads/master
keystone/identity/backends/base.py
2
# Copyright 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
taroplus/spark
refs/heads/master
python/pyspark/ml/regression.py
22
# # 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 us...
jackytu/newbrandx
refs/heads/rankx
src/oscar/apps/voucher/__init__.py
58
default_app_config = 'oscar.apps.voucher.config.VoucherConfig'
pemryan/f2py
refs/heads/master
fparser/tests/test_issue33.py
2
from fparser import api def test_reproduce_issue(): source_str = '''\ module foo interface assignment(=) module procedure baa end interface assignment(=) end module foo ''' tree = api.parse(source_str, isfree=True, isstrict=False, ignore_comments=False) r = str(tree).strip() ...
OpenPymeMx/OCB
refs/heads/7.0
addons/account/wizard/account_period_close.py
56
# -*- 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...
illicitonion/givabit
refs/heads/master
lib/sdks/google_appengine_1.7.1/google_appengine/lib/django_1_2/django/conf/locale/es/formats.py
80
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # DATE_FORMAT = r'j \de F \de Y' TIME_FORMAT = 'H:i:s' DATETIME_FORMAT = r'j \de F \de Y \a \l\a\s H:i' YEAR_MONTH_FORMAT = r'F \de Y' MONTH_DAY_FORMAT = r'j \de F' SHORT_DATE_FORMAT = 'd/m/Y' SHORT_DATETIME_FORMAT = 'd/...
sestrella/ansible
refs/heads/devel
lib/ansible/modules/network/ios/ios_l2_interfaces.py
11
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2019 Red Hat # GNU General Public License v3.0+ # (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ############################################# # WARNING # ############################################# # # This file is au...
marcoarruda/MissionPlanner
refs/heads/master
Lib/dummy_threading.py
70
"""Faux ``threading`` version using ``dummy_thread`` instead of ``thread``. The module ``_dummy_threading`` is added to ``sys.modules`` in order to not have ``threading`` considered imported. Had ``threading`` been directly imported it would have made all subsequent imports succeed regardless of whether ``thread...
ubiar/odoo
refs/heads/8.0
addons/base_import_module/models/ir_module.py
238
import logging import os import sys import zipfile from os.path import join as opj import openerp from openerp.osv import osv from openerp.tools import convert_file from openerp.tools.translate import _ _logger = logging.getLogger(__name__) MAX_FILE_SIZE = 100 * 1024 * 1024 # in megabytes class view(osv.osv): _...
kirillzhuravlev/numpy
refs/heads/master
doc/cdoc/numpyfilter.py
108
#!/usr/bin/env python """ numpyfilter.py INPUTFILE Interpret C comments as ReStructuredText, and replace them by the HTML output. Also, add Doxygen /** and /**< syntax automatically where appropriate. """ from __future__ import division, absolute_import, print_function import sys import re import os import textwrap ...
stvstnfrd/edx-platform
refs/heads/master
import_shims/lms/course_home_api/dates/v1/__init__.py
2
"""Deprecated import support. Auto-generated by import_shims/generate_shims.sh.""" # pylint: disable=redefined-builtin,wrong-import-position,wildcard-import,useless-suppression,line-too-long from import_shims.warn import warn_deprecated_import warn_deprecated_import('course_home_api.dates.v1', 'lms.djangoapps.course_...
jiumx60rus/isso
refs/heads/master
isso/utils/hash.py
8
# -*- encoding: utf-8 -*- from __future__ import unicode_literals import codecs import hashlib from isso.compat import string_types, text_type as str try: from werkzeug.security import pbkdf2_bin as pbkdf2 except ImportError: try: from passlib.utils.pbkdf2 import pbkdf2 as _pbkdf2 def pbkdf...
caijieming-baidu/tera
refs/heads/master
src/benchmark/eva/run.py
12
# Copyright (c) 2015, Baidu.com, Inc. All Rights Reserved # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. #!/usr/bin/env pythons import sys import subprocess import time import threading import traceback import json import signal from bin import eva_var from bin ...
Oslandia/vizitown_plugin
refs/heads/master
twisted/tap/portforward.py
65
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Support module for making a port forwarder with twistd. """ from twisted.protocols import portforward from twisted.python import usage from twisted.application import strports class Options(usage.Options): synopsis = "[options]" long...
agry/NGECore2
refs/heads/master
scripts/object/installation/battlefield/destructible/bfield_gungan_statue_s02b.py
85615
import sys def setup(core, object): return
MarcJoan/django
refs/heads/master
tests/postgres_tests/migrations/0002_create_test_models.py
231
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from ..fields import * # NOQA class Migration(migrations.Migration): dependencies = [ ('postgres_tests', '0001_setup_extensions'), ] operations = [ migrations.CreateModel( ...
rafamanzo/colab
refs/heads/master
colab/accounts/utils/mailman.py
1
import urlparse import requests import logging from django.conf import settings TIMEOUT = 1 LOGGER = logging.getLogger('colab.mailman') def get_url(listname=None): if listname: return urlparse.urljoin(settings.MAILMAN_API_URL, '/' + listname) return settings.MAILMAN_API_URL def subscribe(listna...
Titosoft/ferry-boat
refs/heads/master
web2py/gluon/tests/test_web.py
2
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Unit tests for running web2py """ import sys import os if sys.version_info < (2, 7): import unittest2 as unittest else: import unittest import subprocess import time import signal def fix_sys_path(): """ logic to have always the correct sys.path ...
andresmargalef/xbmc-plugin.video.ted.talks
refs/heads/helix
resources/lib/model/test_util.py
1
import urllib2 def get_HTML(url): return urllib2.urlopen(url).read() class CachedHTMLProvider: __cache__ = {} def get_HTML(self, url): if url not in self.__cache__: self.__cache__[url] = get_HTML(url) return self.__cache__[url]
noodle-learns-programming/python-social-auth
refs/heads/master
social/apps/django_app/me/__init__.py
70
""" Mongoengine backend support. To enable this app: * Add 'social.apps.django_app.me' to INSTALLED_APPS * In urls.py include url('', include('social.apps.django_app.urls')) """ default_app_config = \ 'social.apps.django_app.me.config.PythonSocialAuthConfig'
armab/st2
refs/heads/master
st2actions/tests/unit/base.py
5
# Licensed to the StackStorm, Inc ('StackStorm') 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 use th...
giovaneliberato/fp_redis_server
refs/heads/master
tests/unit/__init__.py
6
__author__ = 'gliberat'
qPCR4vir/orange
refs/heads/master
Orange/testing/regression/tests_20/reference_tab-basket.py
6
# Description: Shows how to add basket attribute to a tab-delimited file # Category: data input # Classes: ExampleTable # Uses: tab-basket # Referenced: tabdelimited.htm import orange d = orange.ExampleTable("tab-basket") for i in d[:5]: print i print d.save("del.tab") d2 = orange.ExampleTable("de...
iaz3/ModReader
refs/heads/master
modreader/loadorder.py
1
# !/usr/bin/env python3 """ Handles processing of game Load Order, assuming it uses Loadorder.txt """ # ====================== GPL License and Copyright Notice ====================== # This file is part of ModReader # Copyright (C) 2016 Diana Land # # This program is free software: you can redistribute it and/or modify...
patricmutwiri/jinja2
refs/heads/master
scripts/make-release.py
4
#!/usr/bin/env python # -*- coding: utf-8 -*- """ make-release ~~~~~~~~~~~~ Helper script that performs a release. Does pretty much everything automatically for us. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import sys import os import re from dat...
oscarolar/odoo
refs/heads/master
addons/l10n_in_hr_payroll/report/payslip_report.py
340
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2012-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
lfranchi/zulip
refs/heads/master
zerver/models.py
114
from __future__ import absolute_import from django.db import models from django.conf import settings from django.contrib.auth.models import AbstractBaseUser, UserManager, \ PermissionsMixin from django.dispatch import receiver from zerver.lib.cache import cache_with_key, flush_user_profile, flush_realm, \ user...
costadorione/purestream
refs/heads/master
lib/gdata/tlslite/messages.py
273
"""Classes representing TLS messages.""" from utils.compat import * from utils.cryptomath import * from errors import * from utils.codec import * from constants import * from X509 import X509 from X509CertChain import X509CertChain import sha import md5 class RecordHeader3: def __init__(self): self.type ...
optima-ict/odoo
refs/heads/9.0
openerp/addons/test_inherit/tests/test_inherit.py
13
# -*- coding: utf-8 -*- from openerp.tests import common class test_inherits(common.TransactionCase): def test_00_inherits(self): """ Check that a many2one field with delegate=True adds an entry in _inherits """ daughter = self.env['test.inherit.daughter'] self.assertEqual(daughter._inher...
rahul67/hue
refs/heads/master
desktop/core/ext-py/pycrypto-2.6.1/lib/Crypto/SelfTest/Hash/test_MD4.py
116
# -*- coding: utf-8 -*- # # SelfTest/Hash/MD4.py: Self-test for the MD4 hash function # # Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net> # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication ...
jburel/openmicroscopy
refs/heads/develop_merge_trigger
docs/sphinx-api/conf.py
6
# -*- coding: utf-8 -*- # # OMERO.py API documentation build configuration file, created by # sphinx-quickstart on Mon Jul 23 12:22:32 2012. # # 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. # ...