repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
elemel/boxlet
refs/heads/master
lib/boxlet/physics.py
1
import boxlet.actors from boxlet.utils import * from Box2D import * from pyglet.gl import * class BodyData(object): def __init__(self, actor, position=(0.0, 0.0), angle=0.0, linear_velocity=(0.0, 0.0), angular_velocity=0.0, linear_damping=0.0, angular_damping=0.0): assert...
hawkowl/pydoctor
refs/heads/master
setup.py
2
#!/usr/bin/python from distutils.core import setup setup( name='pydoctor', version='0.6b2', author='Michael Hudson-Doyle', author_email='micahel@gmail.com', url='http://github.com/twisted/pydoctor', description='API doc generator.', license='MIT/X11', packages=[ 'pydoctor', ...
CCI-MOC/GUI-Backend
refs/heads/master
core/email.py
1
# -*- coding: utf-8 -*- """ Atmosphere core email. """ from core.models import AtmosphereUser as User from core.models import Instance from django.core.urlresolvers import reverse from django.db.models import ObjectDoesNotExist from django.template import Context from django.template.loader import render_to_string fro...
twiest/openshift-tools
refs/heads/stg
openshift/installer/vendored/openshift-ansible-3.7.52-1/library/modify_yaml.py
63
#!/usr/bin/python # -*- coding: utf-8 -*- ''' modify_yaml ansible module ''' import yaml # ignore pylint errors related to the module_utils import # pylint: disable=redefined-builtin, unused-wildcard-import, wildcard-import from ansible.module_utils.basic import * # noqa: F402,F403 DOCUMENTATION = ''' --- module: ...
wzbozon/statsmodels
refs/heads/master
statsmodels/tsa/filters/tests/results/filter_results.py
33
import numpy as np conv2 = np.array([118.75,155.5,197.75,238.75,239.5,228,303,629,789,599.75,499.25,527.25,477.75,260.5,180.75,296.75,263.5,155.75,108.5,199.5,379.75,109.5,74.25,56.75,-95,-93,-29,90.5,302,56.5,126.75,np.nan]) conv1 = np.array([np.nan,118.75,155.5,197.75,238.75,239.5,228,303,629,789,599.75,499.25,527....
nagyistoce/koalacloud
refs/heads/master
boto/dynamodb/__init__.py
4
# Copyright (c) 2011 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2011 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 ...
certik/pyquante
refs/heads/master
PyQuante/Basis/__init__.py
6
"""\ This program is part of the PyQuante quantum chemistry program suite. Copyright (c) 2004, Richard P. Muller. All Rights Reserved. PyQuante version 1.2 and later is covered by the modified BSD license. Please see the file LICENSE that is part of this distribution. """
ambikeshwar1991/gnuradio
refs/heads/master
gr-utils/src/python/modtool/gr-newmod/docs/doxygen/doxyxml/doxyindex.py
223
# # Copyright 2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) # any later version. # #...
qedsoftware/commcare-hq
refs/heads/master
corehq/apps/sms/tests/test_chat.py
1
import uuid from corehq.apps.domain.models import Domain from corehq.apps.sms.models import SMS, SQLLastReadMessage, OUTGOING, INCOMING from corehq.apps.sms.views import ChatMessageHistory from corehq.apps.users.models import CommCareUser from corehq.form_processor.tests.utils import run_with_all_backends from corehq.u...
bschuon/django-oscar
refs/heads/master
tests/integration/order/model_tests.py
41
from datetime import timedelta, datetime from decimal import Decimal as D from django.test import TestCase from django.utils import timezone from django.utils.translation import ugettext_lazy as _ import mock from oscar.apps.order.exceptions import ( InvalidOrderStatus, InvalidLineStatus, InvalidShippingEvent) fr...
apark263/tensorflow
refs/heads/master
tensorflow/contrib/distribute/python/keras_correctness_test_base.py
1
# 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...
pztrick/django-allauth
refs/heads/master
allauth/socialaccount/providers/soundcloud/tests.py
14
from allauth.socialaccount.tests import OAuth2TestsMixin from allauth.tests import MockedResponse, TestCase from .provider import SoundCloudProvider class SoundCloudTests(OAuth2TestsMixin, TestCase): provider_id = SoundCloudProvider.id def get_mocked_response(self): return MockedResponse(200, """ ...
repotvsupertuga/repo
refs/heads/master
instal/script.module.metahandler/lib/metahandler/metacontainers.py
14
''' create/install metadata containers, v1.0 currently very specific to icefilms.info ''' # NOTE: these are imported later on in the create container function: # from cleaners import * # import clean_dirs import os,sys import shutil import xbmcvfs import common #necessary so that the metacontainers.py can use the sc...
tronlogistics/micro
refs/heads/master
venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/sbcsgroupprober.py
2935
######################## 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...
hydroshare/hydroshare
refs/heads/develop
hs_core/hydroshare/hs_bagit.py
1
import os import shutil import errno import tempfile import mimetypes import zipfile import logging from foresite import utils, Aggregation, AggregatedResource, RdfLibSerializer from rdflib import Namespace, URIRef from django.conf import settings from django_irods.icommands import SessionException from django.core.ex...
mrfuxi/django
refs/heads/master
tests/m2m_intermediary/models.py
128
""" Many-to-many relationships via an intermediary table For many-to-many relationships that need extra fields on the intermediary table, use an intermediary model. In this example, an ``Article`` can have multiple ``Reporter`` objects, and each ``Article``-``Reporter`` combination (a ``Writer``) has a ``position`` f...
whitepyro/debian_server_setup
refs/heads/master
lib/html5lib/treewalkers/lxmletree.py
618
from __future__ import absolute_import, division, unicode_literals from six import text_type from lxml import etree from ..treebuilders.etree import tag_regexp from gettext import gettext _ = gettext from . import _base from .. import ihatexml def ensure_str(s): if s is None: return None elif isin...
aarticianpc/greenpointtrees
refs/heads/master
src/superbook/urls.py
2
from django.conf.urls import patterns, include, url from django.contrib import admin from accounts.views import SignInAndSignUp, LogoutView, ProductView, ServiceView, ContactView, AboutView from oscar.app import application as oscarapplication from paypal.express.dashboard.app import application from django.conf impor...
yugang/crosswalk-test-suite
refs/heads/master
webapi/webapi-performancetimeline-w3c-tests/inst.xpk.py
176
#!/usr/bin/env python import os import shutil import glob import time import sys import subprocess import string from optparse import OptionParser, make_option SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) PKG_NAME = os.path.basename(SCRIPT_DIR) PARAMETERS = None #XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=...
yelizariev/account-financial-tools
refs/heads/8.0
account_credit_control/wizard/credit_control_communication.py
2
# -*- coding: utf-8 -*- ############################################################################## # # Author: Nicolas Bessi, Guewen Baconnier # Copyright 2012-2014 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Publi...
taito/scrapy
refs/heads/master
scrapy/utils/http.py
202
""" Transitional module for moving to the w3lib library. For new code, always import from w3lib.http instead of this module """ from w3lib.http import * def decode_chunked_transfer(chunked_body): """Parsed body received with chunked transfer encoding, and return the decoded body. For more info see: ...
MisterTea/HyperNEAT
refs/heads/master
boost_1_57_0/libs/python/test/pickle4.py
12
# Copyright David Abrahams 2004. Distributed under the Boost # Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) r'''>>> import pickle4_ext >>> import pickle >>> def world_getinitargs(self): ... return (self.get_country(),) ...
tynn/numpy
refs/heads/master
benchmarks/benchmarks/__init__.py
90
from __future__ import absolute_import, division, print_function from . import common
google/makani
refs/heads/master
third_party_toolchains/gcc_arm_none_eabi/arm-none-eabi/share/gdb/system-gdbinit/elinos.py
134
# Copyright (C) 2011-2014 Free Software Foundation, Inc. # 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 progr...
mysql/mysql-utilities
refs/heads/master
mysql-test/suite/replication/t/rpl_admin_basic_ssl_opt_gtid.py
1
# # Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of the License. # # This program is distributed in th...
depet/scikit-learn
refs/heads/master
sklearn/svm/tests/test_sparse.py
5
import warnings from nose.tools import assert_raises, assert_true, assert_false import numpy as np from scipy import sparse from numpy.testing import (assert_array_almost_equal, assert_array_equal, assert_equal) from sklearn import datasets, svm, linear_model, base from sklearn.datasets imp...
jjmleiro/hue
refs/heads/master
desktop/core/ext-py/cryptography-1.3.1/src/cryptography/hazmat/bindings/openssl/__init__.py
482
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function
glneo/gnuradio
refs/heads/master
gr-audio/examples/python/dial_tone_wav.py
58
#!/usr/bin/env python # # Copyright 2004,2005,2007,2008,2012,2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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 ...
firerszd/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/test/test_wsgiref.py
68
from __future__ import nested_scopes # Backward compat for 2.1 from unittest import TestCase from wsgiref.util import setup_testing_defaults from wsgiref.headers import Headers from wsgiref.handlers import BaseHandler, BaseCGIHandler from wsgiref import util from wsgiref.validate import validator from wsgiref.simple...
InternationalAirlinesGroup/stubo-app
refs/heads/master
stubo/model/__init__.py
5
""" stubo.model ~~~~~~~~~~~ The Model? :copyright: (c) 2015 by OpenCredo. :license: GPLv3, see LICENSE for more details. """
Instagram/django
refs/heads/master
django/contrib/gis/tests/geoapp/tests.py
155
import re from django.db import connection from django.contrib.gis import gdal from django.contrib.gis.geos import fromstr, GEOSGeometry, \ Point, LineString, LinearRing, Polygon, GeometryCollection from django.contrib.gis.measure import Distance from django.contrib.gis.tests.utils import \ no_mysql, no_oracle,...
40423105/2017springcd_ag1
refs/heads/gh-pages
plugin/render_math/__init__.py
371
from .math import *
frc1418/2015-robot
refs/heads/master
robot/common/sensor.py
1
import wpilib from common.distance_sensors import SharpIR2Y0A02, SharpIRGP2Y0A41SK0F, CombinedSensor from networktables import NetworkTable class Sensor: def __init__(self, tote_motor): self.sd = NetworkTable.getTable('SmartDashboard') self.toteLimitLSensor = wpilib.DigitalIn...
wfxiang08/django178
refs/heads/master
django/contrib/admin/templatetags/admin_list.py
75
from __future__ import unicode_literals import datetime from django.contrib.admin.templatetags.admin_urls import add_preserved_filters from django.contrib.admin.utils import (lookup_field, display_for_field, display_for_value, label_for_field) from django.contrib.admin.views.main import (ALL_VAR, EMPTY_CHANGELIST...
labordoc/labordoc-next
refs/heads/labordoc-next
modules/bibformat/lib/elements/bfe_bibtex.py
1
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## ...
markmcclain/astara
refs/heads/master
akanda/rug/openstack/common/notifier/api.py
2
# Copyright 2014 DreamHost, LLC # # Author: DreamHost, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
untitaker/icalendar
refs/heads/master
src/icalendar/tests/test_unit_cal.py
1
from datetime import datetime from datetime import timedelta from icalendar.tests import unittest import icalendar import pytz class TestCalComponent(unittest.TestCase): def test_cal_Component(self): from icalendar.cal import Component, Calendar, Event from icalendar import prop # A com...
emk/pyjamas
refs/heads/master
examples/showcase/compile.py
5
#!/usr/bin/env python """ compile.py Build the pyjamas-showcase web application. We firstly scan through all the demo modules, pulling out the module docstrings and the source code, and adding this information to the demoInfo.py module. We then call Pyjamas to compile the application, and finall...
wkentaro/chainer
refs/heads/master
chainer/functions/pooling/average_pooling_2d.py
10
import numpy import chainer from chainer import backend from chainer.backends import cuda from chainer.backends import intel64 from chainer import function_node from chainer.functions.pooling import average_pooling_nd from chainer.functions.pooling import pooling_2d from chainer.utils import conv import chainerx cla...
ilayn/scipy
refs/heads/master
scipy/sparse/linalg/tests/test_pydata_sparse.py
19
import pytest import numpy as np import scipy.sparse as sp import scipy.sparse.linalg as splin from numpy.testing import assert_allclose try: import sparse except Exception: sparse = None pytestmark = pytest.mark.skipif(sparse is None, reason="pydata/sparse not installed") ...
storm-computers/odoo
refs/heads/9.0
addons/website_quote/__openerp__.py
18
{ 'name': 'Online Proposals', 'category': 'Website', 'summary': 'Sales', 'website': 'https://www.odoo.com/page/quote-builder', 'version': '1.0', 'description': """ OpenERP Sale Quote Roller ========================= """, 'depends': ['website', 'sale', 'mail', 'web_tip', 'payment', '...
psiwczak/quantum
refs/heads/master
quantum/db/db_base_plugin_v2.py
1
# Copyright (c) 2012 OpenStack, LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
Ztiany/Repository
refs/heads/master
Python/Python3-Base/12_MultiTask/process/IPC-CopyFile.py
2
from multiprocessing import Pool, Manager import os def copy_file_task(name, old_folder_name, new_folder_name, queue): """完成copy一个文件的功能""" fr = open(old_folder_name + "/" + name) fw = open(new_folder_name + "/" + name, "w") content = fr.read() fw.write(content) fr.close() fw.close() ...
plazix/python-openfire
refs/heads/master
setup.py
1
# -*- coding: utf-8 -*- from setuptools import setup, find_packages from openfire import get_version setup( name='python-openfire', version=get_version().replace(' ', '-'), description=u'A python client for openfire’s api', license="BSD License", author='Aleksandr Zorin (plazix)', author_ema...
appsembler/edx-platform
refs/heads/appsembler/tahoe/master
lms/djangoapps/mobile_api/tests/test_context_processor.py
13
""" Tests for Django template context processors. """ from django.conf import settings from django.test import TestCase from django.test.client import RequestFactory from lms.djangoapps.mobile_api.context_processor import is_from_mobile_app class MobileContextProcessorTests(TestCase): """ Tests for the confi...
sshwsfc/django-xadmin
refs/heads/master
xadmin/plugins/__init__.py
5
PLUGINS = ( 'actions', 'filters', 'bookmark', 'export', 'layout', 'refresh', 'details', 'editable', 'relate', 'chart', 'ajax', 'relfield', 'inline', 'topnav', 'portal', 'quickform', 'wizard', 'images', 'auth', 'multiselect'...
unnikrishnankgs/va
refs/heads/master
venv/lib/python3.5/site-packages/django/db/migrations/graph.py
108
from __future__ import unicode_literals import sys import warnings from collections import deque from functools import total_ordering from django.db.migrations.state import ProjectState from django.utils import six from django.utils.datastructures import OrderedSet from django.utils.encoding import python_2_unicode_c...
irwinlove/django
refs/heads/master
tests/files/tests.py
277
# -*- coding: utf-8 -*- from __future__ import unicode_literals import gzip import os import struct import tempfile import unittest from io import BytesIO, StringIO from django.core.files import File from django.core.files.base import ContentFile from django.core.files.move import file_move_safe from django.core.file...
Orav/kbengine
refs/heads/master
kbe/src/lib/python/Lib/turtledemo/paint.py
2
#!/usr/bin/env python3 """ turtle-example-suite: tdemo_paint.py A simple event-driven paint program - left mouse button moves turtle - middle mouse button changes color - right mouse button toogles betweem pen up (no line drawn when the turtle moves) and pen down (line is drawn). If pen...
zooba/PTVS
refs/heads/master
Python/Product/Miniconda/Miniconda3-x64/Lib/site-packages/pip/_internal/utils/models.py
21
"""Utilities for defining models """ import operator class KeyBasedCompareMixin(object): """Provides comparision capabilities that is based on a key """ def __init__(self, key, defining_class): self._compare_key = key self._defining_class = defining_class def __hash__(self): ...
robdennis/sideboard
refs/heads/master
tests/plugins/different_versions/rdflib3_1_0/env/lib/python2.7/site-packages/rdflib/plugins/parsers/ntriples.py
7
#!/usr/bin/env python __doc__=""" N-Triples Parser License: GPL 2, W3C, BSD, or MIT Author: Sean B. Palmer, inamidst.com Documentation: http://inamidst.com/proj/rdf/ntriples-doc Command line usage:: ./ntriples.py <URI> - parses URI as N-Triples ./ntriples.py --help - prints out this help message # @@ fu...
lokeshjindal15/gem5_transform
refs/heads/master
tests/configs/o3-timing-ruby.py
14
# Copyright (c) 2006-2007 The Regents of The University of Michigan # 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 ...
fuselock/odoo
refs/heads/8.0
addons/mass_mailing/wizard/__init__.py
432
# -*- coding: utf-8 -*- import test_mailing import mail_compose_message
gygcnc/gygcnc
refs/heads/master
gygcnc/manage.py
73
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config") os.environ.setdefault("DJANGO_CONFIGURATION", "Local") from configurations.management import execute_from_command_line execute_from_command_line(sys.argv)
mingyeh/DjangoQuickTour
refs/heads/master
DjangoQuickTour/blog/apps.py
55
from __future__ import unicode_literals from django.apps import AppConfig class BlogConfig(AppConfig): name = 'blog'
hkhamm/django_rest_tutorial_2
refs/heads/master
env/lib/python2.7/site-packages/pip/_vendor/distlib/version.py
166
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2013 The Python Software Foundation. # See LICENSE.txt and CONTRIBUTORS.txt. # """ Implementation of a flexible versioning scheme providing support for PEP-386, distribute-compatible and semantic versioning. """ import logging import re from .compat import string_types ...
utkarsh-goswami/erpnext
refs/heads/develop
erpnext/patches/v7_0/repost_bin_qty_and_item_projected_qty.py
35
# 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 erpnext.stock.doctype.bin.bin import update_item_projected_qty def execute(): repost_bin_qty() repost_item_projected_qty() def...
dexterx17/nodoSocket
refs/heads/master
clients/Python-2.7.6/Lib/mailcap.py
351
"""Mailcap file handling. See RFC 1524.""" import os __all__ = ["getcaps","findmatch"] # Part 1: top-level interface. def getcaps(): """Return a dictionary containing the mailcap database. The dictionary maps a MIME type (in all lowercase, e.g. 'text/plain') to a list of dictionaries corresponding to ...
currychou/1
refs/heads/master
static/Brython3.1.0-20150301-090019/Lib/encodings/__init__.py
764
""" Standard "encodings" Package Standard Python encoding modules are stored in this package directory. Codec modules must have names corresponding to normalized encoding names as defined in the normalize_encoding() function below, e.g. 'utf-8' must be implemented by the module 'utf_8.py'. Ea...
ZLLab-Mooc/edx-platform
refs/heads/named-release/dogwood.rc
common/djangoapps/third_party_auth/tasks.py
47
# -*- coding: utf-8 -*- """ Code to manage fetching and storing the metadata of IdPs. """ from celery.task import task import datetime import dateutil.parser import logging from lxml import etree import requests from onelogin.saml2.utils import OneLogin_Saml2_Utils from third_party_auth.models import SAMLConfiguration...
frankiecjunle/yunblog
refs/heads/master
venv/lib/python2.7/site-packages/pygments/styles/native.py
364
# -*- coding: utf-8 -*- """ pygments.styles.native ~~~~~~~~~~~~~~~~~~~~~~ pygments version of my "native" vim theme. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.style import Style from pygments.token import Keyword, ...
aleksandr-bakanov/astropy
refs/heads/master
astropy/coordinates/builtin_frames/skyoffset.py
3
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst from astropy import units as u from astropy.coordinates.transformations import DynamicMatrixTransform, FunctionTransform from astropy.coordinates.baseframe import (frame_transform_graph, Ba...
kumar303/addons-server
refs/heads/master
src/olympia/addons/tests/test_tasks.py
2
from unittest import mock import os import pytest import tempfile from datetime import datetime from django.conf import settings from django.core import mail from django.test.utils import override_settings from olympia import amo from olympia.activity.models import ActivityLog from olympia.addons import cron from oly...
hslee16/ansible-modules-extras
refs/heads/devel
database/influxdb/influxdb_database.py
54
#!/usr/bin/python # (c) 2016, Kamil Szczygiel <kamil.szczygiel () intel.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 # ...
aaronr/Quantum-GIS
refs/heads/master
python/plugins/osm/OsmDatabaseManager.py
3
"""@package OsmDatabaseManager This module provides methods to manipulate with database where OSM data are stored. OsmDatabaseManager is the only part of OSM Plugin that has the right to access OSM (sqlite) database. If any other part of plugin wants to manipulate with OSM data, it is expected to use constructs of thi...
shaufi10/odoo
refs/heads/8.0
addons/crm/ir_http.py
306
# -*- coding: utf-8 -*- from openerp.http import request from openerp.osv import orm class ir_http(orm.AbstractModel): _inherit = 'ir.http' def get_utm_domain_cookies(self): return request.httprequest.host def _dispatch(self): response = super(ir_http, self)._dispatch() for var, ...
pothosware/gr-runtime
refs/heads/master
gnuradio-runtime/python/gnuradio/gr/qa_hier_block2.py
25
# # Copyright 2014 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) # any later version. # #...
zanderle/django
refs/heads/master
tests/admin_changelist/admin.py
247
from django.contrib import admin from django.contrib.auth.admin import UserAdmin from django.contrib.auth.models import User from django.core.paginator import Paginator from .models import Child, Event, Parent, Swallow site = admin.AdminSite(name="admin") site.register(User, UserAdmin) class CustomPaginator(Pagina...
leifdenby/namelist_python
refs/heads/master
namelist_python/utils.py
254
# Copyright (c) 2009 Raymond Hettinger # # 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, merge, # pu...
open-austin/influence-texas
refs/heads/master
src/influencetx/contrib/sites/__init__.py
238
""" To understand why this file is here, please read: http://cookiecutter-django.readthedocs.io/en/latest/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django """
tcpcloud/contrail-controller
refs/heads/master
src/api-lib/tools/install_venv_common.py
3
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 OpenStack Foundation # Copyright 2013 IBM Corp. # # 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.a...
timlinux/watchkeeper
refs/heads/develop
django_project/event_mapper/migrations/0016_auto_20150511_0912.py
5
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.contrib.gis.db.models.fields class Migration(migrations.Migration): dependencies = [ ('event_mapper', '0015_auto_20150511_0858'), ] operations = [ migrations.AddField( ...
iAmMrinal0/HTPC-Manager
refs/heads/master
libs/requests/packages/charade/big5freq.py
3132
######################## 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...
wesley1001/formhub
refs/heads/master
odk_viewer/migrations/0010_auto__add_field_export_filepath.py
7
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Export.filepath' db.add_column('odk_viewer_export', 'filepath', self.gf('django.db.models....
EOSIO/eos
refs/heads/master
tests/distributed-transactions-remote-test.py
1
#!/usr/bin/env python3 from testUtils import Utils from Cluster import Cluster from TestHelper import TestHelper import subprocess import tempfile import os ############################################################### # distributed-transactions-remote-test # # Tests remote capability of the distributed-transacti...
apache/incubator-airflow
refs/heads/master
tests/providers/google/cloud/log/test_gcs_task_handler_system.py
7
# 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...
manipopopo/tensorflow
refs/heads/master
tensorflow/contrib/gan/python/features/python/virtual_batchnorm.py
73
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tomerfiliba/plumbum
refs/heads/master
tests/test_terminal.py
1
# -*- coding: utf-8 -*- import sys import time from contextlib import contextmanager import pytest from plumbum.cli.terminal import Progress, ask, choose, hexdump, prompt from plumbum.lib import StringIO try: from collections import OrderedDict except ImportError: try: from ordereddict import Ordered...
jmiserez/sts
refs/heads/hb
sts/gui/entities.py
2
# Copyright 2011-2013 Colin Scott # Copyright 2012-2013 Andrew Or # # 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 ap...
GbalsaC/bitnamiP
refs/heads/master
venv/lib/python2.7/site-packages/boto/sdb/db/test_db.py
153
import logging import time from datetime import datetime from boto.sdb.db.model import Model from boto.sdb.db.property import StringProperty, IntegerProperty, BooleanProperty from boto.sdb.db.property import DateTimeProperty, FloatProperty, ReferenceProperty from boto.sdb.db.property import PasswordProperty, ListPrope...
liangjiaxing/sympy
refs/heads/master
sympy/printing/tests/test_mathematica.py
93
from sympy.core import (S, pi, oo, symbols, Function, Rational, Integer, Tuple) from sympy.integrals import Integral from sympy.concrete import Sum from sympy.functions import exp, sin, cos from sympy import mathematica_code as mcode x, y, z = symbols('x,y,z') f = Function('f') def test_Inte...
mitchbertsch/lightnet
refs/heads/master
webServer.py
1
from flask import Flask, render_template from flask_socketio import SocketIO, emit from Adafruit_BME280 import * sensor = BME280(mode=BME280_OSAMPLE_8) app = Flask(__name__) app.config['SECRET_KEY'] = 'lightnet' socketio = SocketIO(app) @socketio.on('update') def handle_update(): print("Received update request\n") ...
heisewangluo/micropython
refs/heads/master
tests/basics/builtin_sorted.py
65
# test builtin sorted print(sorted(set(range(100)))) print(sorted(set(range(100)), key=lambda x: x + 100*(x % 2))) # need to use keyword argument try: sorted([], None) except TypeError: print("TypeError")
cherrydocker/minos
refs/heads/master
owl/alert/management/commands/alert.py
5
import ConfigParser import argparse import datetime import json import logging import os import smtplib import sys import time import utils.mail import deploy_utils from optparse import make_option from os import path from django.conf import settings from django.core.management.base import BaseCommand, CommandError ...
jptomo/rpython-lang-scheme
refs/heads/master
rpython/rlib/rvmprof/cintf.py
1
import py import sys from rpython.tool.udir import udir from rpython.tool.version import rpythonroot from rpython.rtyper.lltypesystem import lltype, llmemory, rffi from rpython.translator.tool.cbuild import ExternalCompilationInfo from rpython.rtyper.tool import rffi_platform as platform from rpython.jit.backend impor...
timvandermeij/drone-tomography
refs/heads/master
tests/core_import_manager.py
3
import os import sys import unittest from mock import patch, Mock from ..core import Import_Manager class TestCoreImportManager(unittest.TestCase): def setUp(self): self.import_manager = Import_Manager.Import_Manager() # Base package that the import manager uses. We expect it to be equal ...
michaelgallacher/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/contrib/gis/db/backends/spatialite/operations.py
282
import re from decimal import Decimal from django.contrib.gis.db.backends.base import BaseSpatialOperations from django.contrib.gis.db.backends.util import SpatialOperation, SpatialFunction from django.contrib.gis.db.backends.spatialite.adapter import SpatiaLiteAdapter from django.contrib.gis.geometry.backend import G...
gdub/django
refs/heads/master
tests/template_tests/syntax_tests/test_builtins.py
521
from django.test import SimpleTestCase from ..utils import setup class BuiltinsTests(SimpleTestCase): @setup({'builtins01': '{{ True }}'}) def test_builtins01(self): output = self.engine.render_to_string('builtins01') self.assertEqual(output, 'True') @setup({'builtins02': '{{ False }}'}...
rowhit/h2o-2
refs/heads/master
py/testdir_single_jvm/test_rf_many_rooz_enums_fvec.py
9
import unittest, random, sys, time, re sys.path.extend(['.','..','../..','py']) import h2o, h2o_cmd, h2o_browse as h2b, h2o_import as h2i, h2o_rf targetList = ['red', 'mail', 'black flag', 5, 1981, 'central park', 'good', 'liquor store rooftoop', 'facebook'] lol = [ ['red','orange','yellow','green','blue','indigo...
ozburo/youtube-dl
refs/heads/master
youtube_dl/extractor/tv5mondeplus.py
11
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( determine_ext, extract_attributes, int_or_none, parse_duration, ) class TV5MondePlusIE(InfoExtractor): IE_DESC = 'TV5MONDE+' _VALID_URL = r'https?://(?:www\.)?(?:tv5mondeplus|revoir...
rschnapka/account-financial-tools
refs/heads/7.0
currency_rate_date_check/company.py
7
# -*- encoding: utf-8 -*- ############################################################################## # # Currency rate date check module for OpenERP # Copyright (C) 2012-2013 Akretion (http://www.akretion.com) # @author Alexis de Lattre <alexis.delattre@akretion.com> # # This program is free software: y...
zasdfgbnm/tensorflow
refs/heads/master
tensorflow/contrib/kfac/__init__.py
45
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
meijing0114/redis-in-action-implementation
refs/heads/master
chapter6/lock.py
1
import uuid import time import redis import math from redis import Redis from flask import Flask,request app = Flask(__name__) @app.route('/watch/test',methods=['GET']) def watch_test(): conn = Redis("127.0.0.1", 6379) pipe = conn.pipeline(True) while(1): try: pipe.watch("user") ...
Honkl/general-ai
refs/heads/master
Controller/controller.py
1
""" GENERAL ARTIFICIAL INTELLIGENCE FOR GAME PLAYING JAN KLUJ, 2017. For more information on models or documentation how to use them, please visit: https://github.com/Honkl/general-ai """ from __future__ import division from __future__ import print_function import random import numpy as np from evolu...
putuotingchan/kernel_goldfish
refs/heads/myGoldfish
tools/perf/scripts/python/syscall-counts.py
11181
# system call counts # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.path.append(os.envir...
scvalencia/ROBOCOL_desastres
refs/heads/master
Galileo/Python/venv/lib/python2.7/site-packages/werkzeug/contrib/securecookie.py
294
# -*- coding: utf-8 -*- r""" werkzeug.contrib.securecookie ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This module implements a cookie that is not alterable from the client because it adds a checksum the server checks for. You can use it as session replacement if all you have is a user id or something to mark ...
bossiernesto/melta
refs/heads/master
melta/transactions/melta_transaction.py
1
from melta.exceptions.exceptions import MeltaException class MeltaTransaction(object): def __init__(self, schema=None): if not schema: self.bind_to_schema(schema) def bind_to_schema(self, schema): self.schema = schema def _check_binding_schema(self): try: ...
michalliu/OpenWrt-Firefly-Libraries
refs/heads/master
staging_dir/host/lib/python2.7/email/test/test_email_codecs_renamed.py
300
# Copyright (C) 2002-2006 Python Software Foundation # Contact: email-sig@python.org # email package unit tests for (optional) Asian codecs import unittest from test.test_support import run_unittest from email.test.test_email import TestEmailBase from email.charset import Charset from email.header import Header, deco...
quickresolve/accel.ai
refs/heads/master
flask-aws/lib/python2.7/site-packages/wtforms/ext/sqlalchemy/__init__.py
102
import warnings warnings.warn( 'wtforms.ext.sqlalchemy is deprecated, and will be removed in WTForms 3.0. ' 'Instead transition to the excellent WTForms-Alchemy package: ' 'https://github.com/kvesteri/wtforms-alchemy', DeprecationWarning )
amisrs/one-eighty
refs/heads/master
angular_flask/lib/python2.7/site-packages/sqlalchemy/dialects/informix/informixdb.py
17
# informix/informixdb.py # Copyright (C) 2005-2013 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: informix+informixdb :name: informixdb :dbapi: informi...