repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
maxcountryman/wtforms | refs/heads/master | wtforms/validators.py | 1 | import re
__all__ = (
'DataRequired', 'data_required', 'Email', 'email', 'EqualTo', 'equal_to',
'IPAddress', 'ip_address', 'InputRequired', 'input_required', 'Length',
'length', 'NumberRange', 'number_range', 'Optional', 'optional',
'Required', 'required', 'Regexp', 'regexp', 'URL', 'url', 'AnyOf',
... |
bazz-erp/erpnext | refs/heads/master | erpnext/schools/doctype/student_attendance/__init__.py | 12133432 | |
adamfast/docket_faa-2008-0188 | refs/heads/master | aircraftreregistration/__init__.py | 12133432 | |
trezor/micropython | refs/heads/trezor-v1.12 | tests/basics/class_super.py | 19 | class Base:
def __init__(self):
self.a = 1
def meth(self):
print("in Base meth", self.a)
class Sub(Base):
def meth(self):
print("in Sub meth")
return super().meth()
a = Sub()
a.meth()
# printing super
class A:
def p(self):
print(str(super())[:18])
A().p()
... |
gdcolella/BotBallRemote | refs/heads/master | util/joystickClient.py | 1 | #!/bin/env python
import pygame
import socket
import sys
import os
PORTNUM = 7777
UPDATE = .0001
DEAD = .005
if(len(sys.argv) < 2):
print "IP Address to connect to? "
ipaddr = raw_input()
else:
ipaddr = sys.argv[1]
pygame.init()
pygame.joystick.init()
joysticks = [pygame.joystick.Joystick(x) for x in range(pygam... |
8u1a/plaso | refs/heads/master | tests/output/interface.py | 3 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import unittest
from plaso.output import interface
from plaso.output import manager
from tests.cli import test_lib as cli_test_lib
from tests.output import test_lib
class TestEvent(object):
"""Simple class that defines a dummy event."""
def __init__(self, timestamp, e... |
kunci115/GetCode | refs/heads/master | algoritma/swapcase.py | 1 | # -*- coding: utf-8 -*-
"""
Created on Sun Nov 6 11:18:27 2016
@author: root
"""
print(raw_input().swapcase()) |
mlperf/training_results_v0.5 | refs/heads/master | v0.5.0/nvidia/submission/code/single_stage_detector/pytorch/distributed.py | 1 | # Copyright (c) 2018, NVIDIA 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-2.0
#
# Unless required by applic... |
aveshagarwal/openshift-ansible | refs/heads/master | roles/lib_utils/library/openshift_container_binary_sync.py | 24 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# pylint: disable=missing-docstring,invalid-name
import random
import tempfile
import shutil
import os.path
# pylint: disable=redefined-builtin,wildcard-import,unused-wildcard-import
from ansible.module_utils.basic import * # noqa: F403
DOCUMENTATION = '''
---
module: open... |
wetneb/django | refs/heads/master | django/conf/locale/es_NI/__init__.py | 12133432 | |
goozbach/ansible-modules-core | refs/heads/devel | packaging/__init__.py | 12133432 | |
StrellaGroup/erpnext | refs/heads/develop | erpnext/accounts/doctype/budget/__init__.py | 12133432 | |
menify/sandbox | refs/heads/master | tags/initial_mpc/tools/mpc_tool_flexelint.py | 2 | import os.path
import string
from mpc_env_options import MPC_EnvOptionsProxy
def _quote_spaces( arg ):
# Generic function for putting double quotes around any string that has white space in it.
if ' ' in arg or '\t' in arg:
return '"%s"' % arg
else:
return str(arg)
#//-----------------... |
gaocegege/treadmill | refs/heads/dev/2017-5-18 | tests/runtime_test.py | 3 | """Unit test for treadmill.runtime.
"""
import errno
import socket
import unittest
import mock
import treadmill
import treadmill.rulefile
import treadmill.runtime
from treadmill import exc
class RuntimeTest(unittest.TestCase):
"""Tests for treadmill.runtime."""
@mock.patch('socket.socket.bind', mock.Mock... |
calebfoss/tensorflow | refs/heads/master | tensorflow/python/kernel_tests/atrous_convolution_test.py | 58 | # 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... |
Grantern73/AiSopp | refs/heads/master | AiSopp/AiSopp/env/Scripts/player.py | 1 | #!C:\Users\tiger\Source\Repos\AiSopp\AiSopp\AiSopp\env\Scripts\python.exe
#
# The Python Imaging Library
# $Id$
#
from __future__ import print_function
import sys
if sys.version_info[0] > 2:
import tkinter
else:
import Tkinter as tkinter
from PIL import Image, ImageTk
# -----------------------------------... |
druuu/django | refs/heads/master | django/contrib/auth/management/commands/__init__.py | 12133432 | |
blacktear23/django | refs/heads/master | tests/regressiontests/staticfiles_tests/__init__.py | 12133432 | |
xtenex/raft | refs/heads/master | core/database/__init__.py | 12133432 | |
hitrust/namebench | refs/heads/master | nb_third_party/graphy/backends/__init__.py | 12133432 | |
openplans/shareabouts-nyr | refs/heads/master | src/flavors/breezy_point/__init__.py | 12133432 | |
cloudfoundry-incubator/bosh-vsphere-cpi-release | refs/heads/master | scripts/pyvmomi_to_ruby/pyVmomi/__init__.py | 12133432 | |
runiq/anki-plugins | refs/heads/master | src/scrambler/__init__.py | 1 | from scrambler import Rule, Scrambler
|
3dfxsoftware/cbss-addons | refs/heads/master | product_barcode_report/__init__.py | 4 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Addons modules by CLEARCORP S.A.
# Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>).
#
# This program is free software: you can redistribute... |
da1z/intellij-community | refs/heads/master | python/lib/Lib/site-packages/django/utils/formats.py | 71 | import decimal
import datetime
from django.conf import settings
from django.utils.translation import get_language, to_locale, check_for_language
from django.utils.importlib import import_module
from django.utils.encoding import smart_str
from django.utils import dateformat, numberformat, datetime_safe
from django.util... |
Panos512/invenio-records | refs/heads/master | invenio_records/views.py | 2 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2012, 2013, 2014, 2015 CERN.
#
# Invenio is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your... |
Sorsly/subtle | refs/heads/master | google-cloud-sdk/lib/googlecloudsdk/command_lib/ml/jobs.py | 1 | # Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... |
TalShafir/ansible | refs/heads/devel | lib/ansible/modules/network/f5/bigiq_regkey_license_assignment.py | 9 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright: (c) 2017, F5 Networks Inc.
# 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',
... |
vivekananda/fbeats | refs/heads/master | django/contrib/gis/tests/relatedapp/models.py | 121 | from django.contrib.gis.db import models
from django.contrib.localflavor.us.models import USStateField
class Location(models.Model):
point = models.PointField()
objects = models.GeoManager()
def __unicode__(self): return self.point.wkt
class City(models.Model):
name = models.CharField(max_length=50)
... |
hale36/SRTV | refs/heads/master | lib/tornado/test/auth_test.py | 37 | # These tests do not currently do much to verify the correct implementation
# of the openid/oauth protocols, they just exercise the major code paths
# and ensure that it doesn't blow up (e.g. with unicode/bytes issues in
# python 3)
from __future__ import absolute_import, division, print_function, with_statement
from... |
krazybean/randomaas | refs/heads/master | lib/python2.6/site-packages/flask/testsuite/test_apps/flask_newext_package/submodule.py | 1258 | def test_function():
return 42
|
UpOut/UpOutDF | refs/heads/master | upoutdf/types/recurring/weekly.py | 1 | # coding: utf-8
import pytz
from dateutil.relativedelta import relativedelta
from upoutdf import dow
from upoutdf.occurences import OccurenceBlock, OccurenceGroup
from .base import BaseRecurring
from upoutdf.constants import WEEKLY_TYPE
class WeeklyType(BaseRecurring):
days_of_week = []
required_attributes... |
tkaitchuck/nupic | refs/heads/master | external/darwin64/lib/python2.6/site-packages/numpy/testing/tests/test_utils.py | 25 | import warnings
import sys
import numpy as np
from numpy.testing import *
import unittest
class _GenericTest(object):
def _test_equal(self, a, b):
self._assert_func(a, b)
def _test_not_equal(self, a, b):
try:
self._assert_func(a, b)
passed = True
except Asserti... |
rdezavalia/ansible | refs/heads/devel | lib/ansible/executor/stats.py | 251 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) an... |
sometallgit/AutoUploader | refs/heads/master | Python27/Lib/test/test_file2k.py | 18 | import sys
import os
import unittest
import itertools
import select
import signal
import stat
import subprocess
import time
from array import array
from weakref import proxy
try:
import threading
except ImportError:
threading = None
from test import test_support
from test.test_support import TESTFN, run_unitte... |
praba230890/frappe | refs/heads/develop | frappe/core/doctype/docfield/docfield.py | 58 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
from frappe.model.document import Document
class DocField(Document):
pass
|
fermiPy/fermipy | refs/heads/master | fermipy/scripts/vstack_images.py | 2 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import absolute_import, division, print_function
import os
import glob
import argparse
from fermipy import merge_utils
def main():
""" Main function for command line usage """
usage = "usage: %(prog)s [options] "
description ... |
sk413025/thug | refs/heads/master | src/Java/java.py | 7 | #!/usr/bin/env python
#
# java.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; with... |
jmarsik/mopidy | refs/heads/develop | mopidy/mpd/protocol/mount.py | 15 | from __future__ import absolute_import, unicode_literals
from mopidy.mpd import exceptions, protocol
@protocol.commands.add('mount')
def mount(context, path, uri):
"""
*musicpd.org, mounts and neighbors section:*
``mount {PATH} {URI}``
Mount the specified remote storage URI at the given pat... |
kelsteNa/fyp | refs/heads/master | src/emu/bindings/modulegen__gcc_ILP32.py | 24 | from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
import pybindgen.settings
import warnings
class ErrorHandler(pybindgen.settings.ErrorHandler):
def handle_error(self, wrapper, exception, traceback_):
warnings.warn("exception %r in wrapper %s" % (exception, wrapper))
... |
initNirvana/Easyphotos | refs/heads/master | env/lib/python3.4/site-packages/flask_admin/tests/sqla/__init__.py | 7 | from flask import Flask
from flask.ext.admin import Admin
from flask.ext.sqlalchemy import SQLAlchemy
def setup():
app = Flask(__name__)
app.config['SECRET_KEY'] = '1'
app.config['CSRF_ENABLED'] = False
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///'
app.config['SQLALCHEMY_ECHO'] = True
... |
legoktm/wesnoth | refs/heads/master | data/tools/unit_tree/wiki_output.py | 20 | import helpers, sys, helpers
from html_output import Translation
def main():
wesnoth = helpers.WesnothList(
options.wesnoth,
options.config_dir,
options.data_dir,
options.transdir)
translated = Translation(options.transdir, options.language)
original = Translation(optio... |
bigbiff/android_kernel_samsung_n900 | refs/heads/cm10.2 | tools/perf/scripts/python/net_dropmonitor.py | 4235 | # Monitor the system for dropped packets and proudce a report of drop locations and counts
import os
import sys
sys.path.append(os.environ['PERF_EXEC_PATH'] + \
'/scripts/python/Perf-Trace-Util/lib/Perf/Trace')
from perf_trace_context import *
from Core import *
from Util import *
drop_log = {}
kallsyms = []
def... |
ajoaoff/django | refs/heads/master | django/conf/locale/bs/__init__.py | 12133432 | |
ZachRiegel/scriptbin | refs/heads/master | pypyjs/modules/test/leakers/__init__.py | 12133432 | |
edxnercel/edx-platform | refs/heads/master | lms/djangoapps/notes/__init__.py | 12133432 | |
jieter/django-localflavor | refs/heads/master | localflavor/mt/__init__.py | 12133432 | |
jansel/opentuner | refs/heads/master | stats_app/stats_app/views/__init__.py | 12133432 | |
rgeleta/odoo | refs/heads/8.0 | addons/purchase/__init__.py | 439 | # -*- 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... |
ygol/odoo | refs/heads/8.0 | addons/hw_blackbox_be/__init__.py | 502 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import controllers
|
sve-odoo/odoo | refs/heads/master | openerp/addons/base/res/ir_property.py | 116 | # -*- 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... |
MyRobotLab/myrobotlab | refs/heads/develop | src/main/resources/resource/RoboClaw/RoboClaw.py | 1 | # TODO: Implement this script fpr
roboclaw = Runtime.start("roboclaw","RoboClaw")... |
mkobos/tree_crawler | refs/heads/master | concurrent_tree_crawler/__init__.py | 12133432 | |
martynovp/edx-platform | refs/heads/master | common/djangoapps/track/__init__.py | 12133432 | |
jandebleser/django-wiki | refs/heads/master | testproject/testproject/__init__.py | 12133432 | |
directorlive/oppia | refs/heads/master | extensions/gadgets/__init__.py | 12133432 | |
kailIII/geraldo | refs/heads/master | site/newsite/django_1_0/django/conf/app_template/__init__.py | 12133432 | |
seocam/django | refs/heads/master | django/conf/locale/hu/__init__.py | 12133432 | |
popazerty/e2-gui | refs/heads/master | tests/enigma.py | 40 | # fake-enigma
class slot:
def __init__(self):
self.list = [ ]
def get(self):
return self.list
def __call__(self):
for x in self.list:
x()
timers = set()
import time
from events import eventfnc
##################### ENIGMA BASE
class eTimer:
def __init__(self):
self.timeout = slot()
self.next_ac... |
wcmitchell/insights-core | refs/heads/master | insights/parsers/tests/test_up2date.py | 2 | from insights.parsers.up2date import Up2Date
from insights.tests import context_wrap
UP2DATE = '''
# Automatically generated Red Hat Update Agent config file, do not edit.
# Format: 1.0
retrieveOnly[comment]=Retrieve packages only
retrieveOnly=0
#noSSLServerURL[comment]=''
#noSSLServerURL=http://192.168.160.23/XMLRP... |
exbluesbreaker/csu-code-analysis | refs/heads/master | logilab-astng XML Generator/src/Tests/04-exec_context.py | 2 | # -*- coding: utf-8 -*-
from __future__ import with_statement # задействует оператор with в коде
from contextlib import contextmanager
from threading import Lock
# Описание менеджера контекста
@contextmanager
def locked(lock):
lock.acquire()
try:
yield
finally:
lock.release()
# Опр... |
tucksaun/status.tucksaun.net | refs/heads/master | stashboard/utils/slugify.py | 17 | # Copyright (c) 2010 Twilio Inc.
#
# 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, publish, distri... |
upgrades-migrations/preupgrade-assistant | refs/heads/master | preupg/ui/compare/__init__.py | 12133432 | |
SamiHiltunen/invenio-utils | refs/heads/master | invenio_utils/__init__.py | 12133432 | |
kdeloach/OTM2 | refs/heads/develop | opentreemap/treemap/__init__.py | 12133432 | |
tymofij/adofex | refs/heads/master | transifex/addons/lotte/models.py | 12133432 | |
nupic-community/nostradamIQ | refs/heads/master | demo_app/nostradamIQ/webapp/__init__.py | 12133432 | |
Kromey/piroute | refs/heads/master | helpers/__init__.py | 12133432 | |
robort/kafka | refs/heads/trunk | tests/kafkatest/services/zookeeper.py | 35 | # 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 use ... |
svn2github/kgyp | refs/heads/master | test/mac/gyptest-copy-dylib.py | 349 | #!/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 dylibs can be copied into app bundles.
"""
import TestGyp
import sys
if sys.platform == 'darwin':
test = TestGyp.Test... |
cosmiclattes/TPBviz | refs/heads/master | torrent/lib/python2.7/site-packages/django/conf/locale/hu/formats.py | 118 | # -*- 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 = 'Y. F j.'
TIME_FORMAT = 'G.i.s'
DA... |
sunu/oh-missions-oppia-beta | refs/heads/master | core/domain/rule_domain.py | 9 | # 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... |
CSF-JH/crossbarexamples | refs/heads/master | disclose/hello.py | 1 | ###############################################################################
#
# Copyright (C) 2014, Tavendo GmbH and/or collaborators. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redi... |
wangli1426/heron | refs/heads/master | heron/common/src/python/utils/misc/serializer.py | 8 | # Copyright 2016 Twitter. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... |
d9pouces/swampdragon | refs/heads/master | swampdragon/serializers/field_deserializers.py | 13 | from dateutil.parser import parse
deserializer_map = {}
def register_field_deserializer(field_name, deserializer):
deserializer_map[field_name] = deserializer
class BaseFieldDeserializer(object):
def __call__(self, *args, **kwargs):
raise NotImplemented()
class DateTimeDeserializer(BaseFieldDese... |
UITools/saleor | refs/heads/master | saleor/order/migrations/0029_auto_20180111_0845.py | 2 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2018-01-11 14:45
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('order', '0028_status_fsm')... |
indictranstech/trufil-erpnext | refs/heads/master | erpnext/manufacturing/page/__init__.py | 12133432 | |
django-wiki/django-wiki | refs/heads/main | src/wiki/plugins/attachments/migrations/__init__.py | 12133432 | |
jitka/weblate | refs/heads/master | weblate/trans/management/__init__.py | 12133432 | |
brianwoo/django-tutorial | refs/heads/master | ENV/lib/python2.7/site-packages/django/contrib/gis/db/backends/mysql/features.py | 100 | from django.contrib.gis.db.backends.base.features import BaseSpatialFeatures
from django.db.backends.mysql.features import \
DatabaseFeatures as MySQLDatabaseFeatures
class DatabaseFeatures(BaseSpatialFeatures, MySQLDatabaseFeatures):
has_spatialrefsys_table = False
supports_add_srs_entry = False
supp... |
saleemjaveds/https-github.com-openstack-nova | refs/heads/master | nova/tests/pci/__init__.py | 12133432 | |
dushyant88/lymph | refs/heads/master | lymph/serializers/tests/__init__.py | 12133432 | |
ONSdigital/alpha-eq-author | refs/heads/master | installer/migrations/__init__.py | 12133432 | |
two9seven/geopy | refs/heads/master | geopy/distance.py | 17 | """
.. versionadded:: 0.93
Geopy can calculate geodesic distance between two points using the
[Vincenty distance](https://en.wikipedia.org/wiki/Vincenty's_formulae) or
[great-circle distance](https://en.wikipedia.org/wiki/Great-circle_distance)
formulas, with a default of Vincenty available as the function
`geopy.dist... |
Britefury/scikit-image | refs/heads/master | skimage/graph/tests/test_flexible.py | 40 | import skimage.graph.mcp as mcp
from numpy.testing import (assert_array_equal,
assert_almost_equal,
)
import numpy as np
a = np.ones((8, 8), dtype=np.float32)
a[1::2] *= 2.0
class FlexibleMCP(mcp.MCP_Flexible):
""" Simple MCP subcl... |
Azure/azure-sdk-for-python | refs/heads/sync-eng/common-js-nightly-docs-2-1768-ForTestPipeline | sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_account_certificates_operations.py | 1 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... |
kittiu/odoo | refs/heads/8.0 | openerp/addons/test_new_api/tests/__init__.py | 79 | # -*- coding: utf-8 -*-
from . import test_related
from . import test_new_fields
from . import test_onchange
from . import test_field_conversions
from . import test_attributes
from . import test_no_infinite_recursion
|
stblassitude/vvmroster | refs/heads/master | ReverseProxied.py | 1 | #!/usr/local/bin/python
class ReverseProxied(object):
'''Wrap the application in this middleware and configure the
front-end server to add these headers, to let you quietly bind
this to a URL other than / and to an HTTP scheme that is
different than what is used locally.
In nginx:
location /myprefix {
prox... |
petrutlucian94/nova | refs/heads/master | nova/cmd/network.py | 27 | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# 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 ... |
pafiedor/ruby_rhino | refs/heads/master | src/environment.py | 1 | #!/usr/bin/env python
# [SublimeLinter pep8-max-line-length:300]
# -*- coding: utf-8 -*-
"""
ruby_rhino is a multi-agent simulator for financial network analysis
Copyright (C) 2016 Paweł Fiedor (pawel@fiedor.eu)
Based on black_rhino available on Github
This program is free software: you can redistribute it and/or mo... |
sachintaware/huxley | refs/heads/master | huxley/steps.py | 6 | # Copyright (c) 2013 Facebook
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
candrews/xbmc | refs/heads/master | tools/EventClients/lib/python/bt/hid.py | 181 | # -*- coding: utf-8 -*-
# Copyright (C) 2008-2013 Team XBMC
#
# 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 2 of the License, or
# (at your option) any later version.
... |
eco32i/rpoS | refs/heads/master | utils/strand_data.py | 1 | from bokeh.plotting import vplot
from bokeh.palettes import brewer
from bokeh.models import FixedTicker, NumeralTickFormatter, Range1d, LinearAxis
strands_nobcm = {
'plus': '../results/19255_plus.bam',
'minus': '../results/19255_minus.bam'
}
strands_bcm = {
'plus': '../results/19256_plus.bam',
'minus'... |
odrling/peony-twitter | refs/heads/master | tests/__init__.py | 1 | # -*- coding: utf-8 -*-
""" load the module at the root of the repository """
import asyncio
import inspect
import json
import os.path
import pathlib
import sys
import aiofiles
file_ = pathlib.Path(inspect.getfile(inspect.currentframe()))
test_dir = file_.absolute().parent
sys.path.insert(0, os.path.dirname(str(tes... |
helogargon/TFG | refs/heads/master | CyberCube/FrontEnd/node_modules/node-gyp/gyp/tools/pretty_gyp.py | 2618 | #!/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.
"""Pretty-prints the contents of a GYP file."""
import sys
import re
# Regex to remove comments when we're counting braces.
COMMENT_RE = ... |
sriharshams/mlnd | refs/heads/master | smartcab/smartcab/planner.py | 18 | import random
class RoutePlanner(object):
""" Complex route planner that is meant for a perpendicular grid network. """
def __init__(self, env, agent):
self.env = env
self.agent = agent
self.destination = None
def route_to(self, destination=None):
""" Select the destinatio... |
gedare/GEMS | refs/heads/master | gems-2.1.1-gedare/jgraph/opal.py | 6 | #!/s/std/bin/python
import glob, math, mfgraph, os, re, string, sys
##################################
# Graphing Functions
##################################
def make_bars(fields, data):
if(len(fields) <= 0):
return
map = {}
for field in fields:
map[field] = {}
for tuple in data:... |
adrienbrault/home-assistant | refs/heads/dev | homeassistant/components/frontier_silicon/media_player.py | 14 | """Support for Frontier Silicon Devices (Medion, Hama, Auna,...)."""
import logging
from afsapi import AFSAPI
import requests
import voluptuous as vol
from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerEntity
from homeassistant.components.media_player.const import (
MEDIA_TYPE_MUSIC,
... |
Yannig/ansible | refs/heads/devel | lib/ansible/modules/storage/infinidat/infini_vol.py | 29 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016, Gregory Shulov (gregory.shulov@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': '... |
Rusk85/pyload | refs/heads/forum_release | module/plugins/hoster/UptoboxCom.py | 1 | # -*- coding: utf-8 -*-
from module.plugins.hoster.XFileSharingPro import XFileSharingPro, create_getInfo
class UptoboxCom(XFileSharingPro):
__name__ = "UptoboxCom"
__type__ = "hoster"
__pattern__ = r"http://(?:\w*\.)*?uptobox.com/\w{12}"
__version__ = "0.06"
__description__ = """Uptobox.com hoste... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.