repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
siliconsmiley/QGIS
refs/heads/master
python/plugins/fTools/tools/doPointsInPolygon.py
1
# -*- coding: utf-8 -*- #----------------------------------------------------------- # # fTools # Copyright (C) 2008-2011 Carson Farmer # EMAIL: carson.farmer (at) gmail.com # WEB : http://www.ftools.ca/fTools.html # # A collection of data management and analysis tools for vector data # #-----------------------------...
OmnesRes/onco_lnc
refs/heads/master
lncrna/cox/LGG/adjusted_pvalue.py
76
## Add a column of BH adjusted pvalues for coeffs_pvalues.txt ## Load necessary modules from rpy2 import robjects as ro ##open file and read data f=open('coeffs_pvalues.txt') data=[i.strip().split() for i in f] genes,coeffs,pvalues=zip(*data) #prepare data for R ro.globalenv['pvalues']=ro.FloatVector([float(i) for ...
yifan-gu/.emacs.d
refs/heads/master
.python-environments/default/lib/python2.7/site-packages/pip/vcs/__init__.py
536
"""Handles all VCS (version control) support""" import os import shutil from pip.backwardcompat import urlparse, urllib from pip.log import logger from pip.util import (display_path, backup_dir, find_command, rmtree, ask_path_exists) __all__ = ['vcs', 'get_src_requirement'] class VcsSupport(...
simon-anders/htseq
refs/heads/master
python3/doc/tss1.py
7
import HTSeq import numpy from matplotlib import pyplot bamfile = HTSeq.BAM_Reader( "SRR001432_head.bam" ) gtffile = HTSeq.GFF_Reader( "Homo_sapiens.GRCh37.56_chrom1.gtf" ) halfwinwidth = 3000 fragmentsize = 200 coverage = HTSeq.GenomicArray( "auto", stranded=False, typecode="i" ) for almnt in bamfile: if almnt.al...
Denisolt/Tensorflow_Chat_Bot
refs/heads/master
local/lib/python2.7/site-packages/tensorflow/python/framework/errors.py
141
# Copyright 2015 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...
ManjiriBirajdar/coala
refs/heads/master
tests/misc/run_shell_command_testfiles/test_program.py
29
if __name__ == "__main__": print("test_program Z") print("non-interactive mode.") print("Exiting...")
jsha/letsencrypt
refs/heads/master
certbot-nginx/certbot_nginx/tests/parser_test.py
1
"""Tests for certbot_nginx.parser.""" import glob import os import re import shutil import unittest from certbot import errors from certbot_nginx import nginxparser from certbot_nginx import obj from certbot_nginx import parser from certbot_nginx.tests import util class NginxParserTest(util.NginxTest): #pylint: dis...
zerothi/sids
refs/heads/master
sisl/io/xsf.py
1
import os.path as osp import numpy as np # Import sile objects from .sile import * from sisl._internal import set_module from sisl import Geometry, AtomUnknown, SuperCell from sisl.utils import str_spec __all__ = ['xsfSile', 'axsfSile'] @set_module("sisl.io") class xsfSile(Sile): """ XSF file for XCrySDen """...
SensibilityTestbed/clearinghouse
refs/heads/master
scripts/initialize.py
4
""" <Program> initialize.py <Started> August 2014. <Authors> Albert Rafetseder Chintan Choksi <Purpose> This script does a "git clone" of all the dependent repositories of a Seattle component. <Usage> * Clone the repository you would like to build on your machine, e.g. using "git clone htt...
pridemusvaire/yowsup
refs/heads/master
yowsup/layers/auth/autherror.py
69
class AuthError(Exception): pass
dgladkov/django
refs/heads/master
tests/gis_tests/utils.py
124
import unittest from functools import wraps from django.conf import settings from django.db import DEFAULT_DB_ALIAS, connection def skipUnlessGISLookup(*gis_lookups): """ Skip a test unless a database supports all of gis_lookups. """ def decorator(test_func): @wraps(test_func) def ski...
40223209/2015cd_midterm
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/_io.py
629
""" Python implementation of the io module. """ import os import abc import codecs import errno # Import _thread instead of threading to reduce startup cost try: from _thread import allocate_lock as Lock except ImportError: from _dummy_thread import allocate_lock as Lock import io #brython fix me #from io imp...
motion2015/a3
refs/heads/a3
lms/djangoapps/student_account/views.py
7
""" Views for a student's account information. """ import logging import json from ipware.ip import get_ip from django.conf import settings from django.http import ( HttpResponse, HttpResponseBadRequest, HttpResponseForbidden ) from django.shortcuts import redirect from django.http import HttpRequest from django....
dimkal/mne-python
refs/heads/master
examples/visualization/plot_topo_compare_conditions.py
11
""" ================================================= Compare evoked responses for different conditions ================================================= In this example, an Epochs object for visual and auditory responses is created. Both conditions are then accessed by their respective names to create a sensor layout...
caot/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/core/paginator.py
356
from math import ceil class InvalidPage(Exception): pass class PageNotAnInteger(InvalidPage): pass class EmptyPage(InvalidPage): pass class Paginator(object): def __init__(self, object_list, per_page, orphans=0, allow_empty_first_page=True): self.object_list = object_list self.per_pa...
edx/lettuce
refs/heads/master
tests/integration/lib/Django-1.3/django/core/paginator.py
356
from math import ceil class InvalidPage(Exception): pass class PageNotAnInteger(InvalidPage): pass class EmptyPage(InvalidPage): pass class Paginator(object): def __init__(self, object_list, per_page, orphans=0, allow_empty_first_page=True): self.object_list = object_list self.per_pa...
sghosh1991/distalgo
refs/heads/master
da/compiler/__main__.py
1
# Copyright (c) 2010-2015 Bo Lin # Copyright (c) 2010-2015 Yanhong Annie Liu # Copyright (c) 2010-2015 Stony Brook University # Copyright (c) 2010-2015 The Research Foundation of SUNY # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files #...
s20121035/rk3288_android5.1_repo
refs/heads/master
external/chromium_org/tools/cr/cr/base/platform.py
112
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Module for the target platform support.""" from importlib import import_module import os import cr DEFAULT = cr.Config.From( DEPOT_TOOLS=os.path.jo...
christer155/PTVS
refs/heads/master
Python/Tests/TestData/DebuggerProject/DebugReplTest4A.py
18
a1 = 'hello' b1 = 30 c1 = 1.1
HiroIshikawa/21playground
refs/heads/master
visualizer/_app_boilerplate/venv/lib/python3.5/site-packages/pip/_vendor/packaging/version.py
439
# Copyright 2014 Donald Stufft # # 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, so...
meletakis/collato
refs/heads/master
esn/actstream/runtests/settings.py
1
# Django settings for example_project project. import os, sys sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) import django DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( ('Justin Quick', 'justquick@gmail.com'), ) DATABASES = { 'default': { 'ENGINE': 'django.db.b...
nitirohilla/upm
refs/heads/master
examples/python/curieimu.py
7
#!/usr/bin/python # Author: Ron Evans (@deadprogram) # Copyright (c) 2016 Intel Corporation. # # 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 limita...
gnowxilef/Wox
refs/heads/master
PythonHome/Lib/site-packages/setuptools/svn_utils.py
20
import os import re import sys from distutils import log import xml.dom.pulldom import shlex import locale import codecs import unicodedata import warnings from setuptools.compat import unicode, PY2 from setuptools.py31compat import TemporaryDirectory from xml.sax.saxutils import unescape try: import urlparse exce...
Widiot/simpleblog
refs/heads/master
venv/lib/python3.5/site-packages/wtforms/fields/html5.py
178
""" Fields to support various HTML5 input types. """ from ..widgets import html5 as widgets from . import core __all__ = ( 'DateField', 'DateTimeField', 'DateTimeLocalField', 'DecimalField', 'DecimalRangeField', 'EmailField', 'IntegerField', 'IntegerRangeField', 'SearchField', 'TelField', 'URLField', ) c...
smolix/incubator-mxnet
refs/heads/master
example/reinforcement-learning/parallel_actor_critic/train.py
24
# 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...
chokribr/PIST
refs/heads/master
modules/bibclassify/lib/bibclassify_config.py
17
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 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 ## License, or ...
wallnerryan/quantum_migrate
refs/heads/master
quantum/tests/unit/test_security_groups_rpc.py
4
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2012, Nachi Ueno, NTT MCL, 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://ww...
captainpete/rethinkdb
refs/heads/next
external/v8_3.30.33.16/build/gyp/pylib/gyp/__init__.py
574
#!/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. import copy import gyp.input import optparse import os.path import re import shlex import sys import traceback from gyp.common import GypErr...
ThinkOpen-Solutions/odoo
refs/heads/stable
addons/website_certification/controllers/main.py
373
# -*- 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...
danielneis/osf.io
refs/heads/develop
website/addons/figshare/views/config.py
52
# -*- coding: utf-8 -*- import httplib as http from flask import request from framework.exceptions import HTTPError from framework.auth.decorators import must_be_logged_in from website.util import web_url_for from website.project.decorators import ( must_have_addon, must_be_addon_authorizer, must_have_permi...
stevenbrichards/boto
refs/heads/develop
boto/sqs/jsonmessage.py
153
# Copyright (c) 2006-2008 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modi...
code-google-com/cortex-vfx
refs/heads/master
test/IECore/PDCReader.py
5
########################################################################## # # Copyright (c) 2007-2010, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redis...
ryano144/intellij-community
refs/heads/master
python/lib/Lib/DocXMLRPCServer.py
91
"""Self documenting XML-RPC Server. This module can be used to create XML-RPC servers that serve pydoc-style documentation in response to HTTP GET requests. This documentation is dynamically generated based on the functions and methods registered with the server. This module is built upon the pydoc and SimpleXMLRPCSe...
MichaelAquilina/pytest
refs/heads/master
testing/test_config.py
1
from __future__ import absolute_import, division, print_function import py import pytest import _pytest._code from _pytest.config import getcfg, get_common_ancestor, determine_setup, _iter_rewritable_modules from _pytest.main import EXIT_NOTESTSCOLLECTED class TestParseIni(object): @pytest.mark.parametrize('sec...
zhreshold/mxnet
refs/heads/master
python/mxnet/optimizer/__init__.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 u...
msambol/ursula
refs/heads/master
library/swift_disk.py
5
#!/usr/bin/python #coding: utf-8 -*- DOCUMENTATION = ''' --- author: Jesse Keating and Dustin Lundquist module: swift_disk short_description: Configure Swift disks/partition description: - This module prepares the disk/partition for use with Swift options: dev: description: - The device to make a swift d...
grokify/guzzle
refs/heads/master
docs/conf.py
51
import sys, os from sphinx.highlighting import lexers from pygments.lexers.web import PhpLexer lexers['php'] = PhpLexer(startinline=True, linenos=1) lexers['php-annotations'] = PhpLexer(startinline=True, linenos=1) primary_domain = 'php' extensions = [] templates_path = ['_templates'] source_suffix = '.rst' master_d...
wisfern/vnpy
refs/heads/master
examples/DataRecording/runDataRecording.py
1
# encoding: UTF-8 import multiprocessing from time import sleep from datetime import datetime, time from vnpy.event import EventEngine2 from vnpy.trader.vtEvent import EVENT_LOG, EVENT_ERROR from vnpy.trader.vtEngine import MainEngine, LogEngine from vnpy.trader.gateway import ctpGateway from vnpy.trader.app import d...
franzmathauser/Mobile-Netze
refs/heads/master
FreeswitchConfig/scripts/OpenBTS_Send_SMS.py
3
#Copyright 2011 Kurtis Heimerl <kheimerl@cs.berkeley.edu>. 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 copyright notice, this list of ...
barykaed/Pelican-Test
refs/heads/gh-pages
activate/Lib/encodings/cp1006.py
272
""" Python Character Mapping Codec cp1006 generated from 'MAPPINGS/VENDORS/MISC/CP1006.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...
ewitz/PhotoHaus
refs/heads/master
venv/lib/python2.7/site-packages/flask/testsuite/test_apps/importerror.py
614
# NoImportsTestCase raise NotImplementedError
apakulov/kafka
refs/heads/trunk
system_test/__init__.py
20578
be-cloud-be/horizon-addons
refs/heads/9.0
partner-contact/partner_default_sale_discount/tests/test_partner_default_sale_discount.py
2
# -*- coding: utf-8 -*- # Copyright 2016 Pedro M. Baeza <pedro.baeza@tecnativa.com> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp.tests import common from lxml import etree class TestPartnerDefaultSaleDiscount(common.SavepointCase): def test_fields_view_get(self): res ...
akashtalole/android_kernel_cyanogen_msm8916
refs/heads/cm-12.1
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...
googleapis/python-dialogflow
refs/heads/master
google/cloud/dialogflow_v2beta1/services/contexts/transports/__init__.py
2
# -*- 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...
googleapis/googleapis-gen
refs/heads/master
google/cloud/websecurityscanner/v1beta/websecurityscanner-v1beta-py/google/cloud/websecurityscanner_v1beta/services/web_security_scanner/pagers.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...
zaccoz/odoo
refs/heads/8.0
addons/share/wizard/__init__.py
448
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
srivassumit/servo
refs/heads/master
tests/wpt/harness/wptrunner/browsers/__init__.py
59
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. """Subpackage where each product is defined. Each product is created by adding a a .py file containing a __wptrunner__ v...
bccp/nbodykit
refs/heads/master
nbodykit/utils.py
1
import numpy from mpi4py import MPI import warnings import functools import contextlib import os, sys def is_structured_array(arr): """ Test if the input array is a structured array by testing for `dtype.names` """ if not isinstance(arr, numpy.ndarray) or not hasattr(arr, 'dtype'): return F...
takaaptech/sky_engine
refs/heads/master
sky/tools/webkitpy/common/net/regressionwindow.py
165
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
dataDogma/Computer-Science
refs/heads/master
Django-MVP-page/venv/Lib/site-packages/pip/_vendor/requests/packages/chardet/codingstatemachine.py
2930
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org 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 Reserved. # # Con...
customcommander/selenium
refs/heads/master
py/test/selenium/webdriver/common/__init__.py
537
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
dongweiming/code
refs/heads/master
tests/test_api_token.py
3
from datetime import datetime from tests.base import TestCase from vilya.models.api_token import ApiToken from nose.tools import eq_ class TestApiToken(TestCase): def _add_api_token(self): apikey = self._add_api_key() user_id = 'testuser' return ApiToken.add(apikey.client_id, user_id, d...
tuhangdi/django
refs/heads/master
tests/expressions_case/models.py
282
from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible try: from PIL import Image except ImportError: Image = None @python_2_unicode_compatible class CaseTestModel(models.Model): integer = models.IntegerField() integer2 = mo...
vishnu-kumar/ec2-api
refs/heads/master
ec2api/tests/functional/botocoreclient.py
1
# Copyright 2015 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 requ...
wavicles/pycode-browser
refs/heads/master
Code/Maths/rfile.py
5
#Example rfile.py f = open('test.dat' , 'r') print f.read() f.close()
micropython/micropython
refs/heads/master
tests/extmod/uasyncio_basic.py
10
try: import uasyncio as asyncio except ImportError: try: import asyncio except ImportError: print("SKIP") raise SystemExit try: import utime ticks = utime.ticks_ms ticks_diff = utime.ticks_diff except: import time ticks = lambda: int(time.time() * 1000) ti...
hainm/numpy
refs/heads/master
numpy/core/tests/test_half.py
133
from __future__ import division, absolute_import, print_function import platform import numpy as np from numpy import uint16, float16, float32, float64 from numpy.testing import TestCase, run_module_suite, assert_, assert_equal, \ dec def assert_raises_fpe(strmatch, callable, *args, **kwargs): try: ...
schilli/MOPS
refs/heads/master
MOPS/OrderParameter.py
1
# -*- coding: UTF-8 -*- from __future__ import print_function, division import sys, os, time, copy import numpy as np import matplotlib.pyplot as plt import MOPS as mops try: # python 3 ? import MOPS.LS as LS except ImportError: # python 2 ? import LS as LS try: # python 3 ? from MOPS.Cor...
F5Networks/f5-ansible-modules
refs/heads/doc-update
setup.py
1
#!/usr/bin/env python import json import os import os.path import re import sys from collections import defaultdict from distutils.command.build_scripts import build_scripts as BuildScripts from distutils.command.sdist import sdist as SDist try: from setuptools import setup, find_packages from setuptools.comm...
mjirayu/sit_academy
refs/heads/master
lms/djangoapps/courseware/tests/test_split_module.py
83
""" Test for split test XModule """ from django.core.urlresolvers import reverse from mock import MagicMock from nose.plugins.attrib import attr from courseware.module_render import get_module_for_descriptor from courseware.model_data import FieldDataCache from student.tests.factories import UserFactory, CourseEnrollm...
madhukar01/coala-bears
refs/heads/master
tests/python/BanditBearTest.py
21
from queue import Queue import os.path from coalib.settings.Section import Section from coalib.results.Result import Result from coalib.results.RESULT_SEVERITY import RESULT_SEVERITY from coalib.testing.LocalBearTestHelper import ( LocalBearTestHelper, verify_local_bear) from bears.python.BanditBear import Bandit...
gauravbose/digital-menu
refs/heads/master
digimenu2/build/lib.linux-x86_64-2.7/django/conf/locale/it/formats.py
115
# -*- 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 = 'd F Y' # 25 Ottobre 2006 TIME_FO...
ylando2/pysol-with-easy-gaps
refs/heads/master
pysollib/winsystems/x11.py
2
#!/usr/bin/env python # -*- mode: python; coding: utf-8; -*- ##---------------------------------------------------------------------------## ## ## Copyright (C) 1998-2003 Markus Franz Xaver Johannes Oberhumer ## Copyright (C) 2003 Mt. Hood Playing Card Co. ## Copyright (C) 2005-2009 Skomoroh ## ## This program is free ...
weebygames/boto
refs/heads/develop
boto/sdb/db/query.py
153
from boto.compat import six # Copyright (c) 2006,2007,2008 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitat...
ujvl/ray-ng
refs/heads/master
rllib/agents/qmix/qmix.py
1
from __future__ import absolute_import from __future__ import division from __future__ import print_function from ray.rllib.agents.trainer import with_common_config from ray.rllib.agents.dqn.dqn import GenericOffPolicyTrainer from ray.rllib.agents.qmix.qmix_policy import QMixTorchPolicy from ray.rllib.optimizers impor...
juntatalor/qexx
refs/heads/master
orders/migrations/0009_auto_20150326_0143.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('orders', '0008_auto_20150324_2110'), ] operations = [ migrations.AlterField( model_name='orderproducts', ...
n3wtron/log4all-client-python
refs/heads/master
pylog4all/config.py
2
import json import os from os.path import expanduser __author__ = 'Igor Maculan <n3wtron@gmail.com>' def get_conf_folder_path(): home_dir = expanduser("~") return home_dir + os.sep + '.log4all' def get_conf_file_path(): return get_conf_folder_path() + os.sep + '/log4all.conf' def get_user_conf(): ...
Fiware/cloud.PaaS
refs/heads/master
test/acceptance/integration/environments/add_tier/terrain.py
4
# -*- coding: utf-8 -*- # Copyright 2014 Telefonica Investigación y Desarrollo, S.A.U # # This file is part of FI-WARE project. # # 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: # # h...
golismero/golismero-devel
refs/heads/master
thirdparty_libs/nltk/corpus/reader/sinica_treebank.py
17
# Natural Language Toolkit: Sinica Treebank Reader # # Copyright (C) 2001-2012 NLTK Project # Author: Steven Bird <sb@ldc.upenn.edu> # URL: <http://www.nltk.org/> # For license information, see LICENSE.TXT """ Sinica Treebank Corpus Sample http://rocling.iis.sinica.edu.tw/CKIP/engversion/treebank.htm 10,000 parsed s...
telamonian/saga-python
refs/heads/devel
examples/jobs/condorjob.py
1
#!/usr/bin/env python __author__ = "Andre Merzky, Ole Weidner" __copyright__ = "Copyright 2012-2013, The SAGA Project" __license__ = "MIT" """ This examples shows how to run a job on a remote Condor gateway using the 'condor' job adaptor. """ import sys import saga import getpass URL = "condor+ssh://gw68....
munjeni/stock_jb_kexec_kernel_for_locked_bootloader
refs/heads/master
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py
11088
# Core.py - Python extension for perf script, core functions # # 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. from collections import defaultdict def aut...
buguelos/odoo
refs/heads/master
addons/base_import/controllers.py
347
# -*- coding: utf-8 -*- import simplejson from openerp.http import Controller, route class ImportController(Controller): @route('/base_import/set_file') def set_file(self, req, file, import_id, jsonp='callback'): import_id = int(import_id) written = req.session.model('base_import.import').wri...
ryrzy/ics_kernel
refs/heads/master
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py
11088
# Core.py - Python extension for perf script, core functions # # 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. from collections import defaultdict def aut...
depop/kombu
refs/heads/2.5_depop
docs/conf.py
3
# -*- coding: utf-8 -*- import sys import os # If your extensions are in another directory, add it here. If the directory # is relative to the documentation root, use os.path.abspath to make it # absolute, like shown here. sys.path.append(os.path.join(os.pardir, "tests")) import kombu from django.conf import setting...
saurabh6790/omnisys-app
refs/heads/master
support/doctype/maintenance_schedule_item/__init__.py
37694
from __future__ import unicode_literals
ar7z1/ansible
refs/heads/devel
test/units/plugins/connection/test_connection.py
21
# (c) 2015, Toshio Kuratomi <tkuratomi@ansible.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later...
TangHao1987/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/contrib/gis/db/backends/mysql/creation.py
613
from django.db.backends.mysql.creation import DatabaseCreation class MySQLCreation(DatabaseCreation): def sql_indexes_for_field(self, model, f, style): from django.contrib.gis.db.models.fields import GeometryField output = super(MySQLCreation, self).sql_indexes_for_field(model, f, style) ...
MER-GROUP/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/contrib/gis/db/backends/mysql/creation.py
613
from django.db.backends.mysql.creation import DatabaseCreation class MySQLCreation(DatabaseCreation): def sql_indexes_for_field(self, model, f, style): from django.contrib.gis.db.models.fields import GeometryField output = super(MySQLCreation, self).sql_indexes_for_field(model, f, style) ...
linsalrob/PhageHosts
refs/heads/master
code/crispr_mismatches_counts.py
1
""" Generate a list of NC ids of the phages and their hosts for the CRISPR searches. We accept two different parameters, the number of mismatches and the BLAST output file. Note that we expect the blast output file to incldue qlen slen as the last two columns """ import rob import sys import os import re try: mm...
condad/google-objects
refs/heads/master
setup.py
3
#!/usr/bin/env python # -*- coding: utf-8 -*- import io import os import sys from setuptools import setup from setuptools import find_packages with io.open('README.md', 'rt', encoding='utf8') as f: README = f.read() if sys.argv[-1] == 'test': os.system('python -sm unittest discover tests "*_test.py"') ...
SteveXiSong/ECE757-SnoopingPredictions
refs/heads/master
configs/ruby/MESI_Three_Level.py
9
# Copyright (c) 2006-2007 The Regents of The University of Michigan # Copyright (c) 2009 Advanced Micro Devices, Inc. # Copyright (c) 2013 Mark D. Hill and David A. Wood # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the followin...
QGuLL/samba
refs/heads/master
source3/stf/example.py
82
#! /usr/bin/env python # Copyright (C) 2003 by Martin Pool <mbp@samba.org> # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later ve...
tanzaho/django-dynamic-scraper
refs/heads/master
migrations/0003_auto__add_logmarker__add_field_log_type.py
10
# -*- coding: 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 model 'LogMarker' db.create_table('dynamic_scraper_logmarker', ( ('id', self.gf('django...
zerc/django
refs/heads/master
tests/migrate_signals/models.py
576
# This module has to exist, otherwise pre/post_migrate aren't sent for the # migrate_signals application.
dhenrygithub/QGIS
refs/heads/master
python/PyQt/PyQt4/QtXml.py
11
# -*- coding: utf-8 -*- """ *************************************************************************** QtXml.py --------------------- Date : February 2016 Copyright : (C) 2016 by Jürgen E. Fischer Email : jef at norbit dot de ******************************...
kenshay/ImageScripter
refs/heads/master
ProgramData/Android/ADB/platform-tools/systrace/catapult/telemetry/telemetry/testing/internal/fake_gpu_info.py
11
# Copyright 2015 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. # This dictionary of GPU information was captured from a run of # Telemetry on a Linux workstation with NVIDIA GPU. It helps test # telemetry.internal.platfo...
sgraham/nope
refs/heads/master
tools/deps2git/svn_to_git_public.py
6
#!/usr/bin/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. """SVN to GIT mapping for the public Chromium repositories.""" import re GIT_HOST = 'https://chromium.googlesource.com/' BLINK_TRUN...
aselle/tensorflow
refs/heads/master
tensorflow/python/eager/execution_callbacks.py
17
# 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...
mtrotter/insight_proj
refs/heads/master
app/userinput.py
1
from flask.ext.wtf import Form from wtforms import TextField, BooleanField from wtforms.validators import Required class UserInputForm(Form): title = TextField('title', validators = [Required()]) category = TextField('category') BooleanField('remember_me', default = False)
mancoast/CPythonPyc_test
refs/heads/master
cpython/222_test_builtin.py
27
# Python test set -- part 4, built-in functions from test_support import * print '4. Built-in functions' print 'test_b1' unload('test_b1') import test_b1 print 'test_b2' unload('test_b2') import test_b2
kikocorreoso/brython
refs/heads/master
www/speed/benchmarks/primes.py
17
def primes(n): if n==2: return [2] elif n<2: return [] s=list(range(3,n+1,2)) mroot = n ** 0.5 half=(n+1)//2-1 i=0 m=3 while m <= mroot: if s[i]: j=(m*m-3)//2 s[j]=0 while j<half: s[j]=0 j+=m ...
zhangjunlei26/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/sslutils/__init__.py
463
import openssl import pregenerated from base import NoSSLEnvironment from openssl import OpenSSLEnvironment from pregenerated import PregeneratedSSLEnvironment environments = {"none": NoSSLEnvironment, "openssl": OpenSSLEnvironment, "pregenerated": PregeneratedSSLEnvironment}
PaloAltoNetworks-BD/SplunkforPaloAltoNetworks
refs/heads/master
Splunk_TA_paloalto/bin/splunk_ta_paloalto/aob_py2/future/backports/urllib/parse.py
11
""" Ported using Python-Future from the Python 3.3 standard library. Parse (absolute and relative) URLs. urlparse module is based upon the following RFC specifications. RFC 3986 (STD66): "Uniform Resource Identifiers" by T. Berners-Lee, R. Fielding and L. Masinter, January 2005. RFC 2732 : "Format for Literal IPv6...
Bysmyyr/blink-crosswalk
refs/heads/master
LayoutTests/http/tests/websocket/workers/resources/stall_wsh.py
52
# Copyright 2014 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. def web_socket_do_extra_handshake(request): # Stall until the connection is closed. request.connection.read(4096) def web_socket_transfer_data(req...
hakancelik96/coogger
refs/heads/master
core/threaded_comment/signals/__init__.py
1
from .threaded import when_create_comment
BehavioralInsightsTeam/edx-platform
refs/heads/release-bit
lms/djangoapps/gating/api.py
11
""" API for the gating djangoapp """ import json import logging from collections import defaultdict from opaque_keys.edx.keys import UsageKey from lms.djangoapps.courseware.entrance_exams import get_entrance_exam_content from openedx.core.lib.gating import api as gating_api from util import milestones_helpers log = ...
rtoma/Diamond
refs/heads/master
src/collectors/libvirtkvm/test/testlibvirtkvm.py
29
#!/usr/bin/python # coding=utf-8 ############################################################################### from test import CollectorTestCase from test import get_collector_config from test import unittest from libvirtkvm import LibvirtKVMCollector #############################################################...
psiq/gdsfactory
refs/heads/master
pp/components/version_stamp.py
1
import datetime import platform import pp from pp.layers import LAYER from pp.components.text import text as Text def Pixel(size=1.0, layer=LAYER.WG): c = pp.Component() a = size / 2 c.add_polygon([(a, a), (a, -a), (-a, -a), (-a, a)], layer) return c @pp.autoname def qrcode(data, psize=1, layer=LAYE...
trankmichael/scipy
refs/heads/master
scipy/interpolate/tests/test_polyint.py
44
from __future__ import division, print_function, absolute_import import warnings import numpy as np from numpy.testing import (assert_almost_equal, assert_array_equal, TestCase, run_module_suite, assert_allclose, assert_equal, assert_) from scipy.interpolate import (splrep, splev, KroghInterpolator, ...