repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
timothycrosley/webelements_site
refs/heads/master
pygments/styles/manni.py
26
# -*- coding: utf-8 -*- """ pygments.styles.manni ~~~~~~~~~~~~~~~~~~~~~ A colorful style, inspired by the terminal highlighting style. This is a port of the style used in the `php port`_ of pygments by Manni. The style is called 'default' there. :copyright: Copyright 2006-2012 by the Pygments...
jamesblunt/gunicorn
refs/heads/master
examples/longpoll.py
22
# -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. import sys import time class TestIter(object): def __iter__(self): lines = ['line 1\n', 'line 2\n'] for line in lines: yield line time.sleep(20) ...
kunaaljain/gnome-news
refs/heads/master
gnomenews/post.py
1
# Copyright (C) 2015 Felipe Borges <felipeborges@gnome.org> # # 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 p...
amyvmiwei/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/ctypes/test/test_repr.py
170
from ctypes import * import unittest subclasses = [] for base in [c_byte, c_short, c_int, c_long, c_longlong, c_ubyte, c_ushort, c_uint, c_ulong, c_ulonglong, c_float, c_double, c_longdouble, c_bool]: class X(base): pass subclasses.append(X) class X(c_char): pass # This test check...
zaccoz/odoo
refs/heads/8.0
addons/procurement/wizard/schedulers_all.py
306
# -*- 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...
ppanczyk/ansible
refs/heads/devel
lib/ansible/plugins/lookup/indexed_items.py
57
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = """ lookup: indexed_items author:...
siosio/intellij-community
refs/heads/master
python/testData/refactoring/inlineFunction/localClassUse/main.py
12
def MyClass(): def __init__(self): # init is necessary to check resolve target pass def my_function(): res = MyClass() # should not be renamed return res x = my_fun<caret>ction()
nathanaevitas/odoo
refs/heads/master
openerp/addons/l10n_gr/__openerp__.py
260
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2009 P. Christeas <p_christ@hol.gr>. All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
floh1695/projecteuler
refs/heads/master
python/projecteuler/problem_0.py
1
#!/usr/bin/python2 """ """ from __future__ import print_function def run(): return 0, None if __name__ == '__main__': from timeit import timeit timeit(run)
jamestwebber/scipy
refs/heads/master
scipy/optimize/_linprog_rs.py
2
"""Revised simplex method for linear programming The *revised simplex* method uses the method described in [1]_, except that a factorization [2]_ of the basis matrix, rather than its inverse, is efficiently maintained and used to solve the linear systems at each iteration of the algorithm. .. versionadded:: 1.3.0 Re...
garbas/mozilla-releng-services
refs/heads/master
lib/backend_common/backend_common/cors.py
1
# -*- coding: utf-8 -*- # 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 cli_common.log import flask_cors logger = cli_c...
halmd-org/h5md-tools
refs/heads/master
h5mdtools/_plot/__init__.py
1
__all__=["msv", "pdf", "ssf", "tcf", ]
priyom/priyomdb
refs/heads/master
PriyomHTTP/Server/Selectors/CatchDisconnect.py
1
# encoding=utf-8 """ File name: CatchDisconnect.py This file is part of: priyomdb LICENSE The contents of this file are subject to the Mozilla Public License Version 1.1 (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.mozilla.org/MPL...
csalom/puput
refs/heads/master
puput/migrations/0001_initial.py
2
from __future__ import unicode_literals from django.db import models, migrations import wagtail.core.fields import puput.routes import datetime import django.db.models.deletion import modelcluster.contrib.taggit import modelcluster.fields class Migration(migrations.Migration): dependencies = [ ('wagtail...
vhaupert/mitmproxy
refs/heads/master
test/mitmproxy/net/test_wsgi.py
11
from io import BytesIO import sys from mitmproxy.net import wsgi from mitmproxy.net.http import Headers def tflow(): headers = Headers(test=b"value") req = wsgi.Request("http", "GET", "/", "HTTP/1.1", headers, "") return wsgi.Flow(("127.0.0.1", 8888), req) class ExampleApp: def __init__(self): ...
LimitedCoin/LimitedCoin
refs/heads/master
share/qt/make_spinner.py
4415
#!/usr/bin/env python # W.J. van der Laan, 2011 # Make spinning .mng animation from a .png # Requires imagemagick 6.7+ from __future__ import division from os import path from PIL import Image from subprocess import Popen SRC='img/reload_scaled.png' DST='../../src/qt/res/movies/update_spinner.mng' TMPDIR='/tmp' TMPNAM...
pkimber/compose
refs/heads/master
example_compose/dev_greg.py
13
# -*- encoding: utf-8 -*- from __future__ import unicode_literals from .base import * DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'NAME': 'temp.db', # Or path to databas...
striglia/ipyimport
refs/heads/master
ipyimport/__init__.py
1
from gather import find_failed_imports from gather import find_failed_imports_by_directory _silence_pyflakes = [find_failed_imports, find_failed_imports_by_directory]
n0m4dz/odoo
refs/heads/8.0
openerp/report/print_fnc.py
458
# -*- 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...
joelddiaz/openshift-tools
refs/heads/prod
openshift/installer/vendored/openshift-ansible-3.7.42-1/roles/openshift_health_checker/openshift_checks/ovs_version.py
6
""" Ansible module for determining if an installed version of Open vSwitch is incompatible with the currently installed version of OpenShift. """ from openshift_checks import OpenShiftCheck, OpenShiftCheckException from openshift_checks.mixins import NotContainerizedMixin class OvsVersion(NotContainerizedMixin, Open...
PaoloP74/Arduino
refs/heads/master
arduino-core/src/processing/app/i18n/python/requests/__init__.py
184
# -*- coding: utf-8 -*- # __ # /__) _ _ _ _ _/ _ # / ( (- (/ (/ (- _) / _) # / """ requests HTTP library ~~~~~~~~~~~~~~~~~~~~~ Requests is an HTTP library, written in Python, for human beings. Basic GET usage: >>> import requests >>> r = requests.get('http://python.org') >>> r.sta...
saradbowman/osf.io
refs/heads/develop
addons/twofactor/__init__.py
32
default_app_config = 'addons.twofactor.apps.TwoFactorAddonAppConfig'
igemsoftware/SYSU-Software2013
refs/heads/master
project/Python27/Lib/site-packages/werkzeug/testsuite/wrappers.py
66
# -*- coding: utf-8 -*- """ werkzeug.testsuite.wrappers ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tests for the response and request objects. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import unittest import pickle from StringIO import StringIO from datetime import ...
achernakov/flugegeheimen
refs/heads/master
vendor/gtest/test/gtest_break_on_failure_unittest.py
2140
#!/usr/bin/env python # # Copyright 2006, 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...
aabbox/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/encodings/cp863.py
272
""" Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP863.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,input,errors='strict'): ...
rebost/django
refs/heads/master
django/contrib/gis/gdal/layer.py
401
# Needed ctypes routines from ctypes import c_double, byref # Other GDAL imports. from django.contrib.gis.gdal.base import GDALBase from django.contrib.gis.gdal.envelope import Envelope, OGREnvelope from django.contrib.gis.gdal.error import OGRException, OGRIndexError, SRSException from django.contrib.gis.gdal.feature...
alfa-addon/addon
refs/heads/master
plugin.video.alfa/lib/python_libtorrent/linux_x86_64/1.1.0/__init__.py
362
#-*- coding: utf-8 -*- ''' python-libtorrent for Kodi (script.module.libtorrent) Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman 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 t...
perkinslr/pypyjs
refs/heads/master
addedLibraries/twisted/conch/insults/__init__.py
138
""" Insults: a replacement for Curses/S-Lang. Very basic at the moment.""" from twisted.python import deprecate, versions deprecate.deprecatedModuleAttribute( versions.Version("Twisted", 10, 1, 0), "Please use twisted.conch.insults.helper instead.", __name__, "colors") deprecate.deprecatedModuleAttribut...
gauribhoite/personfinder
refs/heads/master
env/site-packages/django/conf/locale/fy/formats.py
852
# -*- 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 = # TIME_FORMAT = # DATETIME_FORMA...
chienlieu2017/it_management
refs/heads/master
odoo/addons/website_crm/__init__.py
1023
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import controllers import models
toontownfunserver/Panda3D-1.9.0
refs/heads/master
python/Lib/site-packages/pip/_vendor/requests/packages/chardet/langbulgarianmodel.py
2964
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
unreal666/outwiker
refs/heads/master
src/outwiker/pages/wiki/actions/updatehtml.py
3
# -*- coding: utf-8 -*- from outwiker.core.events import PageUpdateNeededParams from outwiker.gui.baseaction import BaseAction class WikiUpdateHtmlAction (BaseAction): """ Обновить (пересоздать) код HTML """ stringId = u"WikiUpdateHtml" def __init__(self, application): self._application ...
suyashphadtare/test
refs/heads/develop
erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py
39
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import flt from erpnext.accounts.report.financial_statements import (get_period_list, get_column...
defionscode/ansible
refs/heads/devel
lib/ansible/module_utils/acme.py
8
# -*- coding: utf-8 -*- # This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own lic...
arnavd96/Cinemiezer
refs/heads/master
myvenv/lib/python3.4/site-packages/provider/views.py
6
import json import urlparse from django.http import HttpResponse from django.http import HttpResponseRedirect, QueryDict from django.utils.translation import ugettext as _ from django.views.generic.base import TemplateView from django.core.exceptions import ObjectDoesNotExist from oauth2.models import Client from . imp...
DavisDevelopment/app_engine_demo
refs/heads/master
lib/flask/testsuite/test_apps/config_package_app/__init__.py
1257
import os import flask here = os.path.abspath(os.path.dirname(__file__)) app = flask.Flask(__name__)
jdobes/spacewalk
refs/heads/master
client/debian/packages-already-in-debian/rhn-client-tools/test/testrhnregGui.py
36
#!/usr/bin/python import settestpath from up2date_client import up2dateErrors ##from up2date_client import config import unittest #Import the modules you need to test... from up2date_client import rhnregGui from up2date_client.rhnregGui import callAndFilterExceptions class MyError(Exception): pass class Testc...
pescobar/easybuild-framework
refs/heads/master
test/framework/variables.py
2
# # # Copyright 2012-2020 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (...
arximboldi/pigeoncide
refs/heads/master
src/core/task.py
1
# # Copyright (C) 2009 Juan Pedro Bolivar Puente, Alberto Villegas Erce # # This file is part of Pigeoncide. # # Pigeoncide 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 # Lic...
timj/scons
refs/heads/master
src/engine/SCons/Tool/__init__.py
1
"""SCons.Tool SCons tool selection. This looks for modules that define a callable object that can modify a construction environment as appropriate for a given tool (or tool chain). Note that because this subsystem just *selects* a callable that can modify a construction environment, it's possible for people to defin...
sabi0/intellij-community
refs/heads/master
python/testData/resolve/multiFile/fromImportSubModuleDunderAll/pkg1/__init__.py
148
__all__ = ['m1']
jgeewax/googlepersonfinder
refs/heads/master
app/multiview.py
1
#!/usr/bin/python2.5 # Copyright 2010 Google 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 ...
drednout/letspython
refs/heads/master
lesson5/epic_datetime_bug.py
1
import datetime def get_midnight_datetime(dt=datetime.datetime.now()): return datetime.datetime(dt.year, dt.month, dt.day) if __name__ == "__main__": print(get_midnight_datetime())
OshynSong/scikit-learn
refs/heads/master
sklearn/tests/test_random_projection.py
79
from __future__ import division import numpy as np import scipy.sparse as sp from sklearn.metrics import euclidean_distances from sklearn.random_projection import johnson_lindenstrauss_min_dim from sklearn.random_projection import gaussian_random_matrix from sklearn.random_projection import sparse_random_matrix from...
RAtechntukan/Sick-Beard
refs/heads/development
sickbeard/webserve.py
4
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lice...
b1acknight/linux
refs/heads/master
Documentation/target/tcm_mod_builder.py
237
#!/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...
mesosphere/dcos-template
refs/heads/master
dcos_template/mesos.py
1
# 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...
jkitchin/pycse
refs/heads/master
pycse/obipython.py
1
import IPython from tabulate import tabulate class OrgFormatter(IPython.core.formatters.BaseFormatter): def __call__(self, obj): try: return tabulate(obj, headers='keys', tablefmt='orgtbl', showindex='always') except: return None ip = get_ipython...
gmimano/commcaretest
refs/heads/master
corehq/apps/translations/urls.py
1
from django.conf.urls.defaults import patterns, url urlpatterns = patterns('corehq.apps.translations.views', url(r'^api/suggestions/$', 'get_translations'), url(r'^api/set/$', 'set_translations', name="set_translation"), url(r'^edit/$', 'edit'), )
WarrenWeckesser/scipy
refs/heads/master
scipy/fftpack/pseudo_diffs.py
22
""" Differential and pseudo-differential operators. """ # Created by Pearu Peterson, September 2002 __all__ = ['diff', 'tilbert','itilbert','hilbert','ihilbert', 'cs_diff','cc_diff','sc_diff','ss_diff', 'shift'] from numpy import pi, asarray, sin, cos, sinh, cosh, tanh, iscomplexobj f...
grap/OCB
refs/heads/7.0
addons/mrp/mrp.py
1
# -*- 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...
olivierfriard/BORIS
refs/heads/master
boris/version.py
1
""" BORIS Behavioral Observation Research Interactive Software Copyright 2012-2021 Olivier Friard This file is part of BORIS. BORIS 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 L...
counsyl/baya
refs/heads/master
baya/tests/submod2/urls.py
1
from django.conf.urls import url from . import admin app_name = 'submod2' urlpatterns = [ url(r'^admin/', admin.site.urls, name='submod2_admin'), ]
derAndreas/pyGtk3Docs
refs/heads/develop
pyGtk3Docs/ast/Callback.py
1
from Base import Base class Callback(Base): """ Callbacks nodes, used for signals """ def parse_node(self): """ Parse the node """ self.parse_attributes_from_map({ 'name' : 'name', 'ctype' : (self.NS_C, 'type') }) self.parse_pa...
nschloe/quadpy
refs/heads/main
src/quadpy/s2/_classical.py
1
from ._helpers import S2Scheme, register def midpoint(): d = {"zero2": [[1]]} return S2Scheme("Midpoint", d, 1) register([midpoint])
PulsePod/old-www-do-not-use
refs/heads/master
lib/python2.7/site-packages/pip/backwardcompat/__init__.py
80
"""Stuff that differs in different Python versions""" import os import imp import sys import site __all__ = ['WindowsError'] uses_pycache = hasattr(imp, 'cache_from_source') class NeverUsedException(Exception): """this exception should never be raised""" try: WindowsError = WindowsError except NameError: ...
danirus/django-comments-xtd
refs/heads/master
django_comments_xtd/tests/test_serializers.py
1
from __future__ import unicode_literals from datetime import datetime import pytz try: from unittest.mock import patch except ImportError: from mock import patch from django.contrib.auth.models import Permission, User from django.contrib.contenttypes.models import ContentType from django.contrib.sites.models ...
thaumos/ansible
refs/heads/devel
test/sanity/code-smell/empty-init.py
29
#!/usr/bin/env python import os import sys def main(): skip = set([ 'test/sanity/code-smell/%s' % os.path.basename(__file__), # facts is grandfathered in but will break namespacing # the only way to fix it is to deprecate and eventually remove it # six and distro will break namesp...
harshaneelhg/scikit-learn
refs/heads/master
sklearn/ensemble/tests/test_gradient_boosting_loss_functions.py
221
""" Testing for the gradient boosting loss functions and initial estimators. """ import numpy as np from numpy.testing import assert_array_equal from numpy.testing import assert_almost_equal from numpy.testing import assert_equal from nose.tools import assert_raises from sklearn.utils import check_random_state from ...
yaoandw/joke
refs/heads/master
Pods/AVOSCloudCrashReporting/Breakpad/src/tools/gyp/pylib/gyp/generator/dump_dependency_json.py
899
# 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. import collections import os import gyp import gyp.common import gyp.msvs_emulation import json import sys generator_supports_multiple_toolsets = True generator_...
TalShafir/ansible
refs/heads/devel
lib/ansible/modules/cloud/amazon/aws_config_aggregator.py
31
#!/usr/bin/python # Copyright: (c) 2018, Aaron Smith <ajsmith10381@gmail.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', ...
devendermishrajio/nova_test_latest
refs/heads/master
nova/tests/unit/api/openstack/compute/test_v21_extensions.py
37
# Copyright 2013 IBM Corp. # Copyright 2014 NEC Corporation. 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-...
spcui/autotest
refs/heads/master
client/shared/control_data.py
6
# # Copyright 2008 Google Inc. Released under the GPL v2 import compiler, textwrap REQUIRED_VARS = set(['author', 'doc', 'name', 'time', 'test_class', 'test_category', 'test_type']) class ControlVariableException(Exception): pass class ControlData(object): def __init__(self, vars, pat...
alexsandrohaag/odoo-website-addons
refs/heads/master
website_sale_add_to_cart/__init__.py
1350
import controllers
ProyectoRATSoft/RATSoft
refs/heads/master
web/bower_components/bootstrap-datepicker/docs/conf.py
171
# -*- coding: utf-8 -*- # # bootstrap-datepicker documentation build configuration file, created by # sphinx-quickstart on Fri Aug 2 14:45:57 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated ...
nikolay-fedotov/tempest
refs/heads/master
tempest/api/compute/servers/test_multiple_create.py
6
# Copyright 2013 IBM Corp # 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 appl...
mdaniel/intellij-community
refs/heads/master
python/testData/inspections/PyDataclassInspection/comparisonInStdInheritance.py
14
from dataclasses import dataclass @dataclass(order=True) class A1: x: int = 1 @dataclass(order=False) class B1(A1): y: str = "1" print(A1() <error descr="'__lt__' not supported between instances of 'A1' and 'B1'"><</error> B1()) print(B1() < B1()) @dataclass(order=False) class A2: x: int = 1 @dataclass...
mrquim/mrquimrepo
refs/heads/master
repo/plugin.video.rebirth/resources/lib/modules/source_utils.py
5
# -*- coding: utf-8 -*- ################################################################################ # | # # | ______________________________________________________________ # # | :~8a.`~888a:::::::::::::::88......88:::::::::...
ddy88958620/lib
refs/heads/master
Python/scrapy/reliefspot/__init__.py
2
ACCOUNT_NAME = 'reliefspot'
robhudson/zamboni
refs/heads/master
apps/stats/db.py
5
from django.db import models import phpserialize as php try: import simplejson as json except ImportError: import json class StatsDictField(models.TextField): description = 'A dictionary of counts stored as serialized php.' __metaclass__ = models.SubfieldBase def db_type(self, connection): ...
ProfessionalIT/professionalit-webiste
refs/heads/master
sdk/google_appengine/lib/django-1.2/django/db/backends/oracle/creation.py
43
import sys, time from django.db.backends.creation import BaseDatabaseCreation TEST_DATABASE_PREFIX = 'test_' PASSWORD = 'Im_a_lumberjack' class DatabaseCreation(BaseDatabaseCreation): # This dictionary maps Field objects to their associated Oracle column # types, as strings. Column-type strings can contain fo...
hynnet/openwrt-mt7620
refs/heads/master
staging_dir/target-mipsel_r2_uClibc-0.9.33.2/root-ralink/usr/lib/python2.7/Cookie.py
65
#!/usr/bin/env python # #### # Copyright 2000 by Timothy O'Malley <timo@alum.mit.edu> # # All Rights Reserved # # Permission to use, copy, modify, and distribute this software # and its documentation for any purpose and without fee is hereby # granted, provided that the above copyright notice appear in ...
Mitchkoens/sympy
refs/heads/master
sympy/printing/codeprinter.py
38
from __future__ import print_function, division from sympy.core import Add, Mul, Pow, S from sympy.core.basic import Basic from sympy.core.compatibility import default_sort_key, string_types from sympy.core.function import Lambda from sympy.core.mul import _keep_coeff from sympy.core.relational import Relational from ...
ierror/django-js-reverse
refs/heads/master
django_js_reverse/views.py
1
# -*- coding: utf-8 -*- import json from django import http from django_js_reverse import core try: from django.urls import get_resolver except ImportError: from django.core.urlresolvers import get_resolver def _urls_js(fn, type): def view(request): default_urlresolver = get_resolver(getattr(req...
andresmrm/brython-experiment
refs/heads/master
static/brython/Lib/_testcapi.py
742
CHAR_MAX = 127 CHAR_MIN = -128 DBL_MAX = 1.7976931348623157e+308 DBL_MIN = 2.2250738585072014e-308 FLT_MAX = 3.4028234663852886e+38 FLT_MIN = 1.1754943508222875e-38 INT_MAX = 2147483647 INT_MIN = -2147483648 LLONG_MAX = 9223372036854775807 LLONG_MIN = -9223372036854775808 LONG_MAX = 2147483647 LONG_MIN = -2...
sunil07t/e-mission-server
refs/heads/master
emission/core/wrapper/incident.py
3
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import from future import standard_library standard_library.install_aliases() from builtins import * import logging import emission.core.wrapper.wrapperbase as ecwb class Incide...
zestrada/horizon-cs498cc
refs/heads/master
horizon/decorators.py
9
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 CRS4 # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use th...
PeteW/luigi
refs/heads/master
luigi/contrib/opener.py
3
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
raccoongang/edx-platform
refs/heads/ginkgo-rg
lms/djangoapps/gating/apps.py
62
""" Django AppConfig module for the Gating app """ from django.apps import AppConfig class GatingConfig(AppConfig): """ Django AppConfig class for the gating app """ name = 'gating' def ready(self): # Import signals to wire up the signal handlers contained within from gating impor...
colemanja91/PyEloqua-Examples
refs/heads/master
venv/lib/python3.4/site-packages/setuptools/command/upload.py
210
import getpass from distutils.command import upload as orig class upload(orig.upload): """ Override default upload behavior to obtain password in a variety of different ways. """ def finalize_options(self): orig.upload.finalize_options(self) # Attempt to obtain password. Short cir...
adarob/magenta
refs/heads/master
magenta/pipelines/dag_pipeline.py
2
# Copyright 2019 The Magenta 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 ...
garlandkr/ansible
refs/heads/devel
lib/ansible/module_utils/urls.py
2
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
mapnik/mapnik
refs/heads/master
utils/mapnik-render/build.py
8
import os import glob from copy import copy Import ('env') program_env = env.Clone() source = Split( """ mapnik-render.cpp """ ) program_env['CXXFLAGS'] = copy(env['LIBMAPNIK_CXXFLAGS']) program_env.Append(CPPDEFINES = env['LIBMAPNIK_DEFINES']) if env['HAS_CAIRO']: program_env.PrependUnique(CPPP...
pybrain/pybrain
refs/heads/master
pybrain/datasets/supervised.py
21
from __future__ import print_function __author__ = 'Thomas Rueckstiess, ruecksti@in.tum.de' from numpy import random from random import sample from scipy import isscalar from pybrain.datasets.dataset import DataSet from pybrain.utilities import fListToString class SupervisedDataSet(DataSet): """SupervisedDataS...
Ingesup-Lab-OS/OS-Lend-Frontend
refs/heads/master
lend_frontend/lend_frontend/utils/keystone_helper.py
1
from keystoneclient.v2_0 import client class KeystoneHelper: def __init__(self, **kwargs): self.client = client.Client(**kwargs) self.endpoint = self.client.service_catalog.url_for( service_type= 'orchestration', endpoint_type= 'publicURL' ) self.token = sel...
guorendong/iridium-browser-ubuntu
refs/heads/ubuntu/precise
net/tools/testserver/testserver_base.py
51
# 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 BaseHTTPServer import errno import json import optparse import os import re import socket import SocketServer import struct import sys import warnings...
extremewaysback/django
refs/heads/master
tests/sessions_tests/custom_db_backend.py
159
""" This custom Session model adds an extra column to store an account ID. In real-world applications, it gives you the option of querying the database for all active sessions for a particular account. """ from django.contrib.sessions.backends.db import SessionStore as DBStore from django.contrib.sessions.base_session ...
rynomster/django
refs/heads/master
django/contrib/gis/geos/libgeos.py
79
""" This module houses the ctypes initialization procedures, as well as the notice and error handler function callbacks (get called when an error occurs in GEOS). This module also houses GEOS Pointer utilities, including get_pointer_arr(), and GEOM_PTR. """ import logging import os import re from ctypes import CD...
dvliman/jaikuengine
refs/heads/master
.google_appengine/google/appengine/_internal/django/core/management/commands/sql.py
23
from optparse import make_option from google.appengine._internal.django.core.management.base import AppCommand from google.appengine._internal.django.core.management.sql import sql_create from google.appengine._internal.django.db import connections, DEFAULT_DB_ALIAS class Command(AppCommand): help = "Prints the C...
jlnaudin/x-drone
refs/heads/master
MissionPlanner-master/Lib/smtpd.py
76
#! /usr/bin/env python """An RFC 2821 smtp proxy. Usage: %(program)s [options] [localhost:localport [remotehost:remoteport]] Options: --nosetuid -n This program generally tries to setuid `nobody', unless this flag is set. The setuid call will fail if this program is not run as root (in ...
montoyjh/pymatgen
refs/heads/master
pymatgen/io/lammps/utils.py
3
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ This module defines utility classes and functions. """ import os import tempfile from io import open from subprocess import Popen, PIPE import numpy as np try: import pybel as pb except ImportError:...
BIRDY-obspm/DOCKing_System
refs/heads/master
Module/Simulation/Trajectory/TrajectorySolver/extended_classes.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # # ============================================================== # ===========================LICENSE============================ # ============================================================== # This file is part of DOCKS. # # DOCKS is free software: you can redistribut...
SummerLW/Perf-Insight-Report
refs/heads/test
third_party/gsutil/third_party/boto/boto/cloudfront/distribution.py
92
# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.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 restriction, including # without limitation the rights to use, copy, modi...
cchurch/ansible
refs/heads/devel
lib/ansible/modules/web_infrastructure/rundeck_project.py
44
#!/usr/bin/python # -*- coding: utf-8 -*- # Ansible module to manage rundeck projects # (c) 2017, Loic Blot <loic.blot@unix-experience.fr> # Sponsored by Infopro Digital. http://www.infopro-digital.com/ # Sponsored by E.T.A.I. http://www.etai.fr/ # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org...
vinced/namecoin
refs/heads/master
client/DNS/Base.py
35
""" $Id: Base.py,v 1.12.2.10 2008/08/01 03:58:03 customdesigned Exp $ This file is part of the pydns project. Homepage: http://pydns.sourceforge.net This code is covered by the standard Python License. Base functionality. Request and Response classes, that sort of thing. """ import socket, string, types, time, ...
ran5515/DeepDecision
refs/heads/master
tensorflow/contrib/slim/python/slim/nets/overfeat.py
164
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
ThreatCentral/blackberries
refs/heads/master
src/ThreatCentral/transforms/IncidentToThreatCentral.py
1
#!/usr/bin/env python # (c) Copyright [2016] Hewlett Packard Enterprise Development LP 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 Unless required by applicable # law or agreed to in writ...
tpodowd/boto
refs/heads/master
boto/ec2/instancestatus.py
181
# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/ # 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...
Accelerite/cinder
refs/heads/master
cinder/volume/drivers/huawei/__init__.py
3
# Copyright (c) 2013 - 2014 Huawei Technologies Co., Ltd. # 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....
virajprabhu/oppia
refs/heads/develop
core/domain/user_services_test.py
29
# coding: utf-8 # # Copyright 2014 The Oppia 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 requi...