repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
sYnfo/sti-python
refs/heads/master
3.3/test/django-test-app/project/settings.py
51
""" Django settings for project project. Generated by 'django-admin startproject' using Django 1.8.1. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build path...
wenyu1001/scrapy
refs/heads/master
tests/test_downloadermiddleware_robotstxt.py
11
from __future__ import absolute_import import re from twisted.internet import reactor, error from twisted.internet.defer import Deferred, DeferredList, maybeDeferred from twisted.python import failure from twisted.trial import unittest from scrapy.downloadermiddlewares.robotstxt import (RobotsTxtMiddleware, ...
googleapis/googleapis-gen
refs/heads/master
google/cloud/osconfig/agentendpoint/v1/osconfig-agentendpoint-v1-py/noxfile.py
1
# -*- coding: utf-8 -*- # Copyright 2020 Google 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...
gtt116/novalog
refs/heads/master
remotelog/admin.py
1
from django.contrib import admin from django.core.urlresolvers import reverse from remotelog import models as remotelog class ApplicationAdmin(admin.ModelAdmin): list_display = ('name', 'slug',) search_fields = ('name', 'slug',) admin.site.register(remotelog.Application, ApplicationAdmin) # date = models...
rldotai/deepy
refs/heads/master
deepy/utils/functions.py
3
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import theano import theano.tensor as T import numpy as np import re import copy from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams import logging as loggers logging = loggers.getLogger(__name__) FLOATX = theano.config.floatX EPSILON = T.const...
jeffery-do/Vizdoombot
refs/heads/master
doom/lib/python3.5/site-packages/numpy/f2py/capi_maps.py
29
#!/usr/bin/env python """ Copyright 1999,2000 Pearu Peterson all rights reserved, Pearu Peterson <pearu@ioc.ee> Permission to use, modify, and distribute this software is given under the terms of the NumPy License. NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. $Date: 2005/05/06 10:57:33 $ Pearu Peterson...
fluxcapacitor/pipeline
refs/heads/master
libs/pipeline_model/tensorflow/core/framework/tensor_slice_pb2.py
1
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: tensorflow/core/framework/tensor_slice.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.proto...
m4rx9/rna-pdb-tools
refs/heads/master
versioneer.py
386
# Version: 0.18 """The Versioneer - like a rocketeer, but for versions. The Versioneer ============== * like a rocketeer, but for versions! * https://github.com/warner/python-versioneer * Brian Warner * License: Public Domain * Compatible With: python2.6, 2.7, 3.2, 3.3, 3.4, 3.5, 3.6, and pypy * [![Latest Version] ...
GNOME/orca
refs/heads/master
test/keystrokes/firefox/line_nav_roledescriptions.py
1
#!/usr/bin/python from macaroon.playback import * import utils sequence = MacroSequence() #sequence.append(WaitForDocLoad()) sequence.append(PauseAction(5000)) # Work around some new quirk in Gecko that causes this test to fail if # run via the test harness rather than manually. sequence.append(KeyComboAction("<Con...
lekum/ansible
refs/heads/devel
contrib/inventory/zabbix.py
119
#!/usr/bin/env python # (c) 2013, Greg Buehler # # This file is part of Ansible, # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ve...
kbidarkar/robottelo
refs/heads/master
robottelo/ui/globalparameters.py
2
# -*- encoding: utf-8 -*- """Implements Global Parameters .""" from robottelo.ui.base import Base from robottelo.ui.locators import common_locators, locators from robottelo.ui.navigator import Navigator class GlobalParameters(Base): """Provides the CRUD functionality for Global Parameters.""" def navigate_t...
nugget/home-assistant
refs/heads/dev
homeassistant/components/gpslogger/device_tracker.py
2
"""Support for the GPSLogger device tracking.""" import logging from homeassistant.components.device_tracker import DOMAIN as \ DEVICE_TRACKER_DOMAIN from homeassistant.components.gpslogger import DOMAIN as GPSLOGGER_DOMAIN, \ TRACKER_UPDATE from homeassistant.helpers.dispatcher import async_dispatcher_connect...
ShangtongZhang/DeepRL
refs/heads/master
deep_rl/agent/DQN_agent.py
1
####################################################################### # Copyright (C) 2017 Shangtong Zhang(zhangshangtong.cpp@gmail.com) # # Permission given to modify the code as long as you keep this # # declaration at the top # ################################...
da1z/intellij-community
refs/heads/master
python/testData/stubs/ImportedNamedTupleFields.py
38
from collections import namedtuple from b import fields nt = namedtuple("name", fields)
angelblue05/Embytest.Kodi
refs/heads/master
resources/lib/mutagen/__init__.py
5
# -*- coding: utf-8 -*- # Copyright (C) 2005 Michael Urman # # This program is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. """Mutagen aims to be an all purpose multimedia tagging library. ::...
luisgg/iteexe
refs/heads/master
twisted/internet/tksupport.py
20
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. """This module integrates Tkinter with twisted.internet's mainloop. API Stability: semi-stable Maintainer: U{Itamar Shtull-Trauring<mailto:twisted@itamarst.org>} To use, do:: | tksupport.install(rootWidget) and then run your re...
SteveDiamond/cvxpy
refs/heads/master
cvxpy/reductions/solvers/qp_solvers/cplex_qpif.py
1
import cvxpy.settings as s import cvxpy.interface as intf from cvxpy.reductions import Solution from cvxpy.reductions.solvers.qp_solvers.qp_solver import QpSolver from cvxpy.reductions.solvers.conic_solvers.cplex_conif import ( get_status, hide_solver_output, set_parameters ) import numpy as np def constr...
umitproject/tease-o-matic
refs/heads/master
django/contrib/flatpages/models.py
410
from django.db import models from django.contrib.sites.models import Site from django.utils.translation import ugettext_lazy as _ class FlatPage(models.Model): url = models.CharField(_('URL'), max_length=100, db_index=True) title = models.CharField(_('title'), max_length=200) content = models.TextField(_(...
jondo/shogun
refs/heads/develop
examples/undocumented/python_modular/tools/load.py
39
#!/usr/bin/env python from numpy import double, fromfile, loadtxt class LoadMatrix: def __init__(self): pass def load_numbers(self, filename): return loadtxt(filename).T def load_dna(self, filename): fh=open(filename, 'r'); matrix=[] for line in fh: matrix.append(line[:-1]) return matrix def...
Ramalus/herovoices
refs/heads/master
.buildozer/venv/lib/python2.7/site-packages/setuptools/version.py
20
__version__ = '17.0'
robinfourdeux/check-linux-by-ssh
refs/heads/master
check_load_average_by_ssh.py
4
#!/usr/bin/env python2 # Copyright (C) 2013: # Gabes Jean, naparuba@gmail.com # Pasche Sebastien, sebastien.pasche@leshop.ch # # 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...
jmiller-boundless/ol3
refs/heads/master
bin/BeautifulSoup.py
5
"""Beautiful Soup Elixir and Tonic "The Screen-Scraper's Friend" http://www.crummy.com/software/BeautifulSoup/ Beautiful Soup parses a (possibly invalid) XML or HTML document into a tree representation. It provides methods and Pythonic idioms that make it easy to navigate, search, and modify the tree. A well-formed X...
Renji/weevely3
refs/heads/master
modules/file/cd.py
16
from core.vectors import PhpCode, ModuleExec from core.module import Module from core import messages from core.loggers import log import random class Cd(Module): """Change current working directory.""" aliases = [ 'cd' ] def init(self): self.register_info( { 'autho...
wllmtrng/wllmtrng.github.io-src
refs/heads/master
fabfile.py
19
from fabric.api import * import fabric.contrib.project as project import os import shutil import sys import SocketServer from pelican.server import ComplexHTTPRequestHandler # Local path configuration (can be absolute or relative to fabfile) env.deploy_path = 'output' DEPLOY_PATH = env.deploy_path # Remote server co...
redhat-openstack/neutron
refs/heads/f22-patches
neutron/plugins/ml2/models.py
8
# Copyright (c) 2013 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
tomduijf/home-assistant
refs/heads/master
tests/components/switch/test_mqtt.py
3
""" tests.components.switch.test_mqtt ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tests mqtt switch. """ import unittest from homeassistant.const import STATE_ON, STATE_OFF import homeassistant.core as ha import homeassistant.components.switch as switch from tests.common import mock_mqtt_component, fire_mqtt_message class Te...
anthgur/servo
refs/heads/master
tests/wpt/web-platform-tests/workers/baseurl/beta/worker.py
241
def main(request, response): return (302, "Moved"), [("Location", "../gamma/worker.js")], "postMessage('executed redirecting script');"
jdereus/labman
refs/heads/master
labcontrol/db/tests/__init__.py
7
# ---------------------------------------------------------------------------- # Copyright (c) 2017-, LabControl development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # -------------------------------------------------...
bkirui/odoo
refs/heads/8.0
openerp/conf/__init__.py
442
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the G...
cchurch/ansible
refs/heads/devel
test/units/modules/net_tools/nios/test_nios_mx_record.py
68
# This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed in the hope that ...
yzl0083/orange
refs/heads/master
Orange/testing/regression/tests_20/modules_kmeans-cmp-init.py
6
import orange import orngClustering import random data_names = ["iris.tab", "housing.tab", "vehicle.tab"] data_sets = [orange.ExampleTable(name) for name in data_names] print "%10s %3s %3s %3s" % ("", "Rnd", "Div", "HC") for data, name in zip(data_sets, data_names): random.seed(42) km_random = orngClustering....
aronsky/home-assistant
refs/heads/dev
homeassistant/components/binary_sensor/axis.py
3
""" Support for Axis binary sensors. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/binary_sensor.axis/ """ from datetime import timedelta import logging from homeassistant.components.axis import AxisDeviceEvent from homeassistant.components.binary_sens...
radiasoft/radtrack
refs/heads/master
radtrack/ui/__init__.py
17
__author__ = 'David'
sgerhart/ansible
refs/heads/maintenance_policy_module
lib/ansible/modules/cloud/amazon/aws_batch_job_definition.py
40
#!/usr/bin/python # Copyright (c) 2017 Jon Meran <jonathan.meran@sonos.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTAT...
firerszd/kbengine
refs/heads/master
kbe/src/lib/python/Tools/clinic/clinic.py
30
#!/usr/bin/env python3 # # Argument Clinic # Copyright 2012-2013 by Larry Hastings. # Licensed to the PSF under a contributor agreement. # import abc import ast import atexit import collections import contextlib import copy import cpp import functools import hashlib import inspect import io import itertools import os ...
lukauskas/scipy
refs/heads/master
scipy/special/tests/test_mpmath.py
40
""" Test Scipy functions versus mpmath, if available. """ from __future__ import division, print_function, absolute_import import sys import time from distutils.version import LooseVersion import numpy as np from numpy.testing import dec, run_module_suite, assert_ from numpy import pi import scipy.special as sc fr...
pepitogithub/PythonScripts
refs/heads/master
Fractaloides.py
1
import os import time import pygame import Aplicacion from fractions import gcd from datetime import datetime from paletaColores import Paleta from Menu import * from Variable import * from validador import * from Funcionesfractales import * #------------------------------------------------ #-----------...
Dhivyap/ansible
refs/heads/devel
lib/ansible/module_utils/facts/system/fips.py
232
# Determine if a system is in 'fips' mode # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. ...
JesusZapata/asdcust
refs/heads/10.0
asdcust/tests/__init__.py
1
# coding: utf-8 # Copyright 2016 Vauxoo (https://www.vauxoo.com) <info@vauxoo.com> # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
OpenEdgeComputing/elijah-openstack
refs/heads/master
dashboard/instances/panel.py
21
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Nebula, 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 # # ...
umbra2/Calc
refs/heads/master
calc_0.1.3.3.py
1
""" <one line to give the program's name and a brief idea of what it does.> Copyright (C) 2015 Sadovnikov Dmitriy Pavlovich mail: umbra2@mail.ru 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...
MartinThoma/PyMySQL
refs/heads/master
pymysql/tests/test_optionfile.py
31
from pymysql.optionfile import Parser from unittest import TestCase from pymysql._compat import PY2 try: from cStringIO import StringIO except ImportError: from io import StringIO __all__ = ['TestParser'] _cfg_file = (r""" [default] string = foo quoted = "bar" single_quoted = 'foobar' """) class TestPars...
collective/eden
refs/heads/master
private/templates/CRMT/controllers.py
2
# -*- coding: utf-8 -*- from urllib import urlencode try: import json # try stdlib (Python 2.6) except ImportError: try: import simplejson as json # try external module except: import gluon.contrib.simplejson as json # fallback to pure-Python module from gluon import current, URL from glu...
RobinQuetin/CAIRIS-web
refs/heads/develop
cairis/cairis/DimensionListBox.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...
step-up-health/step-up-backend
refs/heads/master
viz.py
1
import os import json import hashlib def get_data_path(): if not 'OPENSHIFT_DATA_DIR' in os.environ: return '../data/data.json' else: return os.path.join(os.environ['OPENSHIFT_DATA_DIR'], 'data.json') def get_data(): if not os.path.isfile(get_data_path()): with open(get_data_path()...
theatrus/statsite
refs/heads/master
integ/test_stdin.py
2
import os import os.path import socket import textwrap import shutil import subprocess import contextlib import sys import tempfile import time import random try: import pytest except ImportError: print >> sys.stderr, "Integ tests require pytests!" sys.exit(1) @pytest.fixture def servers(request): "Re...
chylli/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/system/file_lock.py
125
# Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Szeged # # 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. Redistributions of source code must retain the above co...
Elandril/SickRage
refs/heads/master
lib/sqlalchemy/sql/compiler.py
76
# sql/compiler.py # Copyright (C) 2005-2014 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 """Base SQL and DDL compiler implementations. Classes provided include: :class:`.com...
kingmotley/SickRage
refs/heads/master
lib/sqlalchemy/sql/compiler.py
76
# sql/compiler.py # Copyright (C) 2005-2014 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 """Base SQL and DDL compiler implementations. Classes provided include: :class:`.com...
camayak/django-apiserver
refs/heads/master
tests/complex/api/urls.py
1
from django.conf.urls.defaults import * from apiserver.api import Api from complex.api.resources import PostResource, ProfileResource, CommentResource, UserResource, GroupResource api = API(api_name='v1') api.register(PostResource(), canonical=True) api.register(ProfileResource(), canonical=True) api.register(Comment...
ProjetPP/PPP-Logger
refs/heads/master
ppp_logger/http.py
1
"""Handles the HTTP frontend (ie. answers to requests from a UI).""" import cgi import json import logging from ppp_libmodule import HttpRequestHandler as HttpRequestHandler from ppp_libmodule.exceptions import ClientError, InvalidConfig from .api import Api from .logger import Logger DOC_URL = 'https://github.com/...
doismellburning/django
refs/heads/master
tests/null_fk_ordering/tests.py
24
from __future__ import unicode_literals from django.test import TestCase from .models import Author, Article, SystemInfo, Forum, Post, Comment class NullFkOrderingTests(TestCase): def test_ordering_across_null_fk(self): """ Regression test for #7512 ordering across nullable Foreign Key...
drayanaindra/shoop
refs/heads/master
shoop/core/models/contacts.py
2
# -*- coding: utf-8 -*- # This file is part of Shoop. # # Copyright (c) 2012-2015, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals from django.conf import settings fr...
kuralesache/kuralesache.github.io
refs/heads/master
tools/process_images.py
2
from PIL import Image import glob import os.path import re import json def get_frame(path): return int(path.rpartition('.')[0].rpartition('\\')[2]) for character in glob.glob('.\\raw\\*'): character_name = character.rpartition('\\')[2] for move in glob.glob(character + '\\*'): move_name = move.rp...
bitmazk/django-logger
refs/heads/master
logger/utils.py
1
"""Utilities for the ``logger`` app.""" from logger.models import ( Action, ActionParameter, ActionParameterType, Log, ) class Logger(object): """The class that holds all the methods needed for logging.""" def create_log(self, action_name, param_dict): """ Creates a ``Log`` obj...
dudepare/django
refs/heads/master
tests/sites_framework/tests.py
115
from django.apps import apps from django.conf import settings from django.contrib.sites.managers import CurrentSiteManager from django.contrib.sites.models import Site from django.core import checks from django.db import models from django.test import TestCase from .models import ( AbstractArticle, CustomArticle, ...
snnn/tensorflow
refs/heads/master
tensorflow/contrib/nn/python/ops/fwd_gradients.py
50
# 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...
lesserwhirls/scipy-cwt
refs/heads/cwt
scipy/weave/tests/test_numpy_scalar_spec.py
10
import os import sys # Note: test_dir is global to this file. # It is made by setup_test_location() #globals global test_dir test_dir = '' import numpy from numpy.testing import TestCase, dec, assert_ from scipy.weave import inline_tools,ext_tools from scipy.weave.build_tools import msvc_exists, gcc_exists fr...
Archassault/archassaultweb
refs/heads/master
mirrors/migrations/0024_auto__add_field_mirrorlog_location.py
2
# -*- coding: utf-8 -*- from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): db.add_column(u'mirrors_mirrorlog', 'location', self.gf('django.db.models.fields.related.ForeignKey')(related_...
ftomassetti/intellij-community
refs/heads/master
python/testData/quickFixes/PyRemoveParameterQuickFixTest/param_after.py
80
def foo(): def a(): pass x = 1 x = 2
suncycheng/intellij-community
refs/heads/master
python/testData/copyPaste/Selection3.dst.py
83
if True: a = 1 b = 2 def f(): <selection> c = 3 <caret></selection>
kleskjr/scipy
refs/heads/master
tools/win32/detect_cpu_extensions_wine.py
79
#!/usr/bin/python """ Detect which x86 CPU extension instructions the given scipy install uses. This file can be used in the release process to check that the nosse installer does not contain SSE instructions. This has happened before, see for example ticket #1170. Is meant to be run on OS X with Wine. Make sure objdu...
asadoughi/quark
refs/heads/master
quark/db/migration/alembic/versions/374c1bdb4480_add_port_network_plugin.py
6
"""add_port_network_plugin Revision ID: 374c1bdb4480 Revises: 4da4444d7706 Create Date: 2015-10-20 12:08:24.780056 """ # revision identifiers, used by Alembic. revision = '374c1bdb4480' down_revision = '4da4444d7706' from alembic import op import sqlalchemy as sa def upgrade(): op.add_column('quark_ports', sa...
hominlinx/linux-bananapi
refs/heads/lemaker-3.4
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
12527
# Util.py - Python extension for perf script, miscellaneous utility code # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. import errno, os FUTEX_WAIT = 0...
jswartwood/node-streams
refs/heads/gh-pages
node_modules/socket.io/node_modules/redis/node_modules/hiredis/build/c4che/build.config.py
59
version = 0x105016 tools = [{'tool': 'ar', 'tooldir': None, 'funs': None}, {'tool': 'cxx', 'tooldir': None, 'funs': None}, {'tool': 'gxx', 'tooldir': None, 'funs': None}, {'tool': 'compiler_cxx', 'tooldir': None, 'funs': None}, {'tool': 'osx', 'tooldir': None, 'funs': None}, {'tool': 'node_addon', 'tooldir': None, 'fun...
ahnjungho/fabtools
refs/heads/master
fabtools/require/python.py
6
""" Python environments and packages ================================ This module provides high-level tools for using Python `virtual environments`_ and installing Python packages using the `pip`_ installer. .. _virtual environments: http://www.virtualenv.org/ .. _pip: http://www.pip-installer.org/ """ from fabtool...
liang42hao/django-chartit
refs/heads/master
chartit/exceptions.py
6
"""Global ChartIt exception and warning classes.""" class APIInputError(Exception): """Some kind of problem when validating the user input.""" pass
XXMrHyde/android_external_chromium_org
refs/heads/darkkat-4.4
tools/checkdeps/checkdeps.py
24
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Makes sure that files include headers from allowed directories. Checks DEPS files in the source tree for rules, and applies tho...
supriyantomaftuh/django
refs/heads/master
django/utils/xmlutils.py
491
""" Utilities for XML generation/parsing. """ import re from xml.sax.saxutils import XMLGenerator class UnserializableContentError(ValueError): pass class SimplerXMLGenerator(XMLGenerator): def addQuickElement(self, name, contents=None, attrs=None): "Convenience method for adding an element with no...
allotria/intellij-community
refs/heads/master
python/testData/intentions/PyConvertTypeCommentToVariableAnnotationIntentionTest/chainedAssignment.py
31
x = y = 42 # ty<caret>pe: int
autosportlabs/kivy
refs/heads/master
setup.py
4
# # Kivy - Cross-platform UI framework # https://kivy.org/ # from __future__ import print_function import sys build_examples = False if "--build_examples" in sys.argv: build_examples = True sys.argv.remove("--build_examples") from copy import deepcopy import os from os.path import join, dirname, sep, exists, ...
kendazheng/wizcloud2
refs/heads/develop
wizcloud/rctrl/api.py
14224
# -*- coding: utf-8 -*-
indevgr/django
refs/heads/master
django/core/management/commands/makemessages.py
6
from __future__ import unicode_literals import fnmatch import glob import io import os import re import sys from functools import total_ordering from itertools import dropwhile import django from django.conf import settings from django.core.files.temp import NamedTemporaryFile from django.core.management.base import ...
chouseknecht/ansible
refs/heads/devel
lib/ansible/modules/network/f5/bigip_device_connectivity.py
38
#!/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', ...
jejimenez/django
refs/heads/master
tests/requests/tests.py
73
# -*- encoding: utf-8 -*- from __future__ import unicode_literals import time from datetime import datetime, timedelta from io import BytesIO from itertools import chain from django.core.exceptions import SuspiciousOperation from django.core.handlers.wsgi import LimitedStream, WSGIRequest from django.http import ( ...
vollib/py_vollib
refs/heads/master
py_vollib/helpers/constants.py
1
# -*- coding: utf-8 -*- """ py_vollib.helpers.constants ~~~~~~~~~~~~~~~~~~~~~~~~~~~ A library for option pricing, implied volatility, and greek calculation. py_vollib is based on lets_be_rational, a Python wrapper for LetsBeRational by Peter Jaeckel as described below. :copyright: © 2017 Gammon Capital LLC :license...
darkforestzero/buck
refs/heads/master
third-party/py/unittest2/setup.py
72
#! /usr/bin/env python # setup.py # Install script for unittest2 # Copyright (C) 2010 Michael Foord # E-mail: fuzzyman AT voidspace DOT org DOT uk # This software is licensed under the terms of the BSD license. # http://www.voidspace.org.uk/python/license.shtml import os import sys from unittest2 import __version__ a...
Mlieou/oj_solutions
refs/heads/master
leetcode/python/ex_656.py
3
class Solution(object): def cheapestJump(self, A, B): """ :type A: List[int] :type B: int :rtype: List[int] """ n = len(A) next = [-1] * n dp = [0] * n for i in range(n-2, -1, -1): min_cost = sys.maxsize for j in range(i...
willprice/weboob
refs/heads/master
modules/dailymotion/__init__.py
9
from .module import DailymotionModule __all__ = ['DailymotionModule']
StephenWeber/ansible
refs/heads/devel
lib/ansible/modules/cloud/docker/docker_image.py
13
#!/usr/bin/python # # Copyright 2016 Red Hat | Ansible # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any la...
shenyy/lily2-gem5
refs/heads/master
src/mem/slicc/ast/PairAST.py
92
# Copyright (c) 2009 The Hewlett-Packard Development Company # 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 of...
tehamalab/dgs
refs/heads/master
goals/migrations/0027_modify_translated_fields.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2017-06-29 06:04 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('goals', '0026_move_agency_source_and_stats_available_fields_from_indicator_to_component'), ...
myint/pyfuzz
refs/heads/master
pygen/qndispatch/qndispatch.py
1
import inspect class InvalidArgException(Exception): pass class DispatchTargetException(Exception): pass class Dispatcher(object): """General dispatcher object.""" def __init__(self, name, argnum, args): self.name = name self.argnum = argnum self.args = args self...
blazek/lrs
refs/heads/master
lrs/lrs/lrslayerroute.py
1
# -*- coding: utf-8 -*- """ /*************************************************************************** LrsPlugin A QGIS plugin Linear reference system builder and editor ------------------- begin : 2017-5-29 copyright ...
darkleons/BE
refs/heads/master
addons/website_certification/__init__.py
385
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-TODAY OpenERP S.A. <http://www.openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms...
fangxingli/hue
refs/heads/master
desktop/core/ext-py/django-openid-auth-0.5/django_openid_auth/tests/__init__.py
44
# django-openid-auth - OpenID integration for django.contrib.auth # # Copyright (C) 2009-2013 Canonical Ltd. # # 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 ...
markflyhigh/incubator-beam
refs/heads/master
sdks/python/apache_beam/io/gcp/datastore/v1/util_test.py
2
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
dslutz/qemu
refs/heads/master
tests/qapi-schema/test-qapi.py
11
#!/usr/bin/env python3 # # QAPI parser test harness # # Copyright (c) 2013 Red Hat Inc. # # Authors: # Markus Armbruster <armbru@redhat.com> # # This work is licensed under the terms of the GNU GPL, version 2 or later. # See the COPYING file in the top-level directory. # import argparse import difflib import os impo...
dagnir/servo
refs/heads/master
tests/wpt/web-platform-tests/encoding/resources/single-byte-raw.py
228
def main(request, response): response.headers.set("Content-Type", "text/plain;charset=" + request.GET.first("label")) response.content = "".join(chr(byte) for byte in xrange(255))
ozgurozmen/OptimizedPKCSuite
refs/heads/master
ATmega2560/micro-ecc/emk_rules.py
49
c, link = emk.module("c", "link") emk.subdir("test")
enkore/i3pystatus
refs/heads/master
i3pystatus/mail/imap.py
5
from i3pystatus.core.util import require, internet try: from imaplib2.imaplib2 import IMAP4, IMAP4_SSL use_idle = True except ImportError: from imaplib import IMAP4, IMAP4_SSL use_idle = False import contextlib import time import socket from threading import Thread from i3pystatus.mail import Backend ...
avikurapati/elasticsearch
refs/heads/master
dev-tools/create_bwc_index.py
7
# Licensed to Elasticsearch under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use this file except...
StefanRijnhart/server-tools
refs/heads/7.0
auth_admin_passkey/__openerp__.py
2
# -*- encoding: utf-8 -*- ############################################################################## # # Admin Passkey module for OpenERP # Copyright (C) 2013-2014 GRAP (http://www.grap.coop) # @author Sylvain LE GAL (https://twitter.com/legalsylvain) # # This program is free software: you can redistrib...
edevil/django
refs/heads/master
django/conf/locale/cy/formats.py
160
# -*- 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 = 'j F Y' # '25 Hy...
EzyInsights/Diamond
refs/heads/master
src/collectors/entropy/entropy.py
48
# coding=utf-8 """ Uses /proc to collect available entropy #### Dependencies * /proc/sys/kernel/random/entropy_avail """ import diamond.collector import os class EntropyStatCollector(diamond.collector.Collector): PROC = '/proc/sys/kernel/random/entropy_avail' def get_default_config(self): """ ...
js0701/chromium-crosswalk
refs/heads/master
third_party/tlslite/tlslite/errors.py
111
# Authors: # Trevor Perrin # Dave Baggett (Arcode Corporation) - Added TLSUnsupportedError. # # See the LICENSE file for legal information regarding use of this file. """Exception classes. @sort: TLSError, TLSAbruptCloseError, TLSAlert, TLSLocalAlert, TLSRemoteAlert, TLSAuthenticationError, TLSNoAuthenticationErr...
gsmartway/odoo
refs/heads/8.0
addons/base_import_module/controllers/main.py
354
# -*- coding: utf-8 -*- import functools import openerp from openerp.http import Controller, route, request, Response def webservice(f): @functools.wraps(f) def wrap(*args, **kw): try: return f(*args, **kw) except Exception, e: return Response(response=str(e), status=500...
bruderstein/PythonScript
refs/heads/master
PythonLib/min/encodings/iso8859_3.py
272
""" Python Character Mapping Codec iso8859_3 generated from 'MAPPINGS/ISO8859/8859-3.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_table) def decode(self,input,errors='...
tianyi33/simple_blog
refs/heads/master
django/conf/locale/ar/formats.py
234
# -*- 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 = 'j F، Y' TIME_FORMAT = 'g:i:s A' #...
mano3m/CouchPotatoServer
refs/heads/develop_mano3m
couchpotato/core/helpers/variable.py
2
from couchpotato.core.helpers.encoding import simplifyString, toSafeString, ss from couchpotato.core.logger import CPLog import hashlib import os.path import platform import random import re import string import sys log = CPLog(__name__) def link(src, dst): if os.name == 'nt': import ctypes if cty...