repo_name
stringlengths
5
100
path
stringlengths
4
375
copies
stringclasses
991 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
karies/root
interpreter/llvm/src/utils/lit/tests/selecting.py
13
4518
# RUN: %{lit} %{inputs}/discovery | FileCheck --check-prefix=CHECK-BASIC %s # CHECK-BASIC: Testing: 5 tests # Check that regex-filtering works # # RUN: %{lit} --filter 'o[a-z]e' %{inputs}/discovery | FileCheck --check-prefix=CHECK-FILTER %s # CHECK-FILTER: Testing: 2 of 5 tests # Check that regex-filtering based on ...
lgpl-2.1
pfmoore/invoke
invoke/collection.py
1
15277
import copy import types from .vendor import six from .vendor.lexicon import Lexicon from .config import merge_dicts from .parser import Context as ParserContext from .tasks import Task class Collection(object): """ A collection of executable tasks. """ def __init__(self, *args, **kwargs): "...
bsd-2-clause
tzewangdorje/SIPserv
Twisted-13.1.0/twisted/trial/test/skipping.py
59
5356
# -*- test-case-name: twisted.trial.test.test_tests -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Definitions of test cases with various interesting behaviors, to be used by L{twisted.trial.test.test_tests} and other test modules to exercise different features of trial's test runner. ...
gpl-3.0
stephanehenry27/Sickbeard-anime
lib/hachoir_parser/misc/pdf.py
90
16806
""" Adobe Portable Document Format (PDF) parser. Author: Christophe Gisquet <christophe.gisquet@free.fr> """ from lib.hachoir_parser import Parser from lib.hachoir_core.field import ( Field, FieldSet, ParserError, GenericVector, UInt8, UInt16, UInt32, String, RawBytes) from lib.hachoir_core.en...
gpl-3.0
erikld/Bobo
python3/runner/sensei.py
13
10057
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest import re import sys import os import glob from . import helper from .mockable_test_result import MockableTestResult from runner import path_to_enlightenment from libs.colorama import init, Fore, Style init() # init colorama class Sensei(MockableTestResu...
mit
sunqm/pyscf
pyscf/dft/gen_grid.py
1
23326
#!/usr/bin/env python # Copyright 2014-2020 The PySCF Developers. 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 # # U...
apache-2.0
jhsenjaliya/incubator-airflow
airflow/contrib/operators/file_to_wasb.py
16
2200
# -*- coding: utf-8 -*- # # 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, software ...
apache-2.0
st0ne/smarthome
plugins/ebus/__init__.py
12
5356
#!/usr/bin/env python3 # vim: set encoding=utf-8 tabstop=4 softtabstop=4 shiftwidth=4 expandtab # # Copyright 2012-2013 KNX-User-Forum e.V. http://knx-user-forum.de/ # # This file is part of SmartHome.py. http://mknx.github.io/smarthome/ # # SmartHome.py is free software: you can redistribute it and/or modif...
gpl-3.0
fullfanta/mxnet
python/mxnet/libinfo.py
4
3291
# 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...
apache-2.0
EkaterinaFedorova/murano-repository
muranorepository/openstack/common/rpc/impl_qpid.py
2
30053
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack Foundation # Copyright 2011 - 2012, Red Hat, 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 # # ...
apache-2.0
terrycojones/cheese-puzzle
cheese.py
1
6973
#!/usr/bin/env python from PIL import Image count = 0 solutions = 0 # Hole sizes. TINY = 0 SMALL = 1 MEDIUM = 2 LARGE = 3 # Portion of hole. MAJOR = 4 MINOR = 5 NAMES = ['tiny', 'small', 'medium', 'big', 'major', 'minor'] class Hole: def __init__(self, size, portion): self.size = size self.po...
apache-2.0
FHannes/intellij-community
python/lib/Lib/urlparse.py
99
12042
"""Parse (absolute and relative) URLs. See RFC 1808: "Relative Uniform Resource Locators", by R. Fielding, UC Irvine, June 1995. """ __all__ = ["urlparse", "urlunparse", "urljoin", "urldefrag", "urlsplit", "urlunsplit"] # A classification of schemes ('' means apply by default) uses_relative = ['ftp', 'htt...
apache-2.0
RiccardoPecora/MP
Lib/site-packages/scipy/signal/info.py
55
5542
""" Signal Processing Tools ======================= Convolution: convolve: N-dimensional convolution. correlate: N-dimensional correlation. fftconvolve: N-dimensional convolution using the FFT. convolve2d: 2-dimensional convolution (more options). correlate2d: ...
gpl-3.0
edx/lettuce
tests/integration/lib/Django-1.3/tests/regressiontests/views/tests/generic/date_based.py
99
6988
# coding: utf-8 from django.test import TestCase from datetime import datetime, date from datetime import timedelta from regressiontests.views.models import Article, Author, DateArticle class ObjectDetailTest(TestCase): fixtures = ['testdata.json'] def setUp(self): # Correct the date for the current ar...
gpl-3.0
danucalovj/mailin
python/dkim/dnsplug.py
9
2787
# This software is provided 'as-is', without any express or implied # warranty. In no event will the author be held liable for any damages # arising from the use of this software. # # Permission is granted to anyone to use this software for any purpose, # including commercial applications, and to alter it and redistri...
mit
gecos-team/gecos-firstboot
firstboot/pages/localUsers/SystemUsers.py
1
6001
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- # This file is part of Guadalinex # # This software 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, ...
gpl-2.0
SDX2000/hotwire
hotwire/gutil.py
1
2290
# This file is part of the Hotwire Shell project API. # Copyright (C) 2007 Colin Walters <walters@verbum.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, includin...
gpl-2.0
ameya30/IMaX_pole_data_scripts
my_scripts/snr_quiet_pulpo.py
1
1119
import numpy as np from astropy.io import fits from matplotlib import pyplot as plt fima = fits.open('/scratch/prabhu/HollyWaller/IMaX_pole_data_scripts/primary_scripts/saves_Oct11/post_demod_tr2_output_21.fits')[0].data st = int(input("Choose stokes: ")) stokes = {0:'I',1:'Q',2:'U',3:'V'} dim = fima.shape pri...
mit
chrisfranzen/django
django/contrib/gis/maps/google/zoom.py
224
6622
from django.contrib.gis.geos import GEOSGeometry, LinearRing, Polygon, Point from django.contrib.gis.maps.google.gmap import GoogleMapException from django.utils.six.moves import xrange from math import pi, sin, log, exp, atan # Constants used for degree to radian conversion, and vice-versa. DTOR = pi / 180. RTOD = 18...
bsd-3-clause
akhilari7/pa-dude
lib/python2.7/site-packages/pip/commands/hash.py
514
1597
from __future__ import absolute_import import hashlib import logging import sys from pip.basecommand import Command from pip.status_codes import ERROR from pip.utils import read_chunks from pip.utils.hashes import FAVORITE_HASH, STRONG_HASHES logger = logging.getLogger(__name__) class HashCommand(Command): ""...
mit
bxshi/gem5
tests/long/se/40.perlbmk/test.py
14
1762
# Copyright (c) 2006-2007 The Regents of The University of Michigan # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source code must retain the above copyright # notice, this ...
bsd-3-clause
sunu/oppia
extensions/interactions/base.py
5
7414
# 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...
apache-2.0
krismz/Delv
pyqtdelv/WebViewUtils.py
2
4222
# ====================================================================== # Copyright (c) 2013, Scientific Computing and Imaging Institute, # University of Utah. All rights reserved. # Author: Kris Zygmunt # License: New BSD 3-Clause (see accompanying LICENSE file for details) # =========================================...
bsd-3-clause
camptocamp/c2c-rd-addons
sale_uos_entry/__openerp__.py
4
1610
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2012 ChriCar Beteiligungs- und Beratungs- GmbH (<http://www.camptocamp.at>) # # Thi...
agpl-3.0
ms-iot/python
cpython/Tools/pybench/Numbers.py
92
16198
from pybench import Test class CompareIntegers(Test): version = 2.0 operations = 30 * 5 rounds = 120000 def test(self): for i in range(self.rounds): 2 < 3 2 > 3 2 == 3 2 > 3 2 < 3 2 < 3 2 > 3 2 ...
bsd-3-clause
direvus/ansible
lib/ansible/modules/cloud/google/gcpubsub_facts.py
95
4359
#!/usr/bin/python # Copyright 2016 Google 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', 'status': ['preview'], ...
gpl-3.0
MatthieuMichon/flight_data_miner
src/extract/geojson_reader.py
1
2260
#!/usr/bin/python3 """ extract.geojson_reader ~~~~~~~~~~~~~~~~~~~~~~ This module handles flight data represented as a list of positions in a format compliant with the Geo JSON specification. - longitude - latitude - altitude as well as a time in seconds. """ import json import logging class GeoJsonReader: de...
gpl-2.0
pblottiere/QGIS
python/plugins/processing/algs/grass7/ext/r_li_pielou.py
45
1293
# -*- coding: utf-8 -*- """ *************************************************************************** r_li_pielou.py -------------- Date : February 2016 Copyright : (C) 2016 by Médéric Ribreux Email : medspx at medspx dot fr ******************************...
gpl-2.0
lmazuel/azure-sdk-for-python
azure-mgmt-devtestlabs/setup.py
1
2792
#!/usr/bin/env python #------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #----------------------------------------------------------------...
mit
AsimmHirani/ISpyPi
tensorflow/contrib/tensorflow-master/tensorflow/contrib/distributions/python/ops/exponential.py
6
5295
# 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...
apache-2.0
asajeffrey/servo
tests/wpt/web-platform-tests/tools/wptserve/wptserve/utils.py
1
4545
import socket import sys from six import binary_type, text_type def isomorphic_decode(s): """Decodes a binary string into a text string using iso-8859-1. Returns `unicode` in Python 2 and `str` in Python 3. The function is a no-op if the argument already has a text type. iso-8859-1 is chosen because ...
mpl-2.0
marc-sensenich/ansible
test/units/modules/remote_management/oneview/test_oneview_fcoe_network.py
68
5980
# -*- coding: utf-8 -*- # # Copyright (2016-2017) Hewlett Packard Enterprise Development LP # # 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 optio...
gpl-3.0
marc-sensenich/ansible
lib/ansible/modules/cloud/google/gcp_compute_instance_template.py
9
62027
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
gpl-3.0
ProjectSWGCore/NGECore2
scripts/mobiles/naboo/nightspider_bloodsipper.py
2
1499
import sys from services.spawn import MobileTemplate from services.spawn import WeaponTemplate from resources.datatables import WeaponType from resources.datatables import Difficulty from resources.datatables import Options from java.util import Vector def addTemplate(core): mobileTemplate = MobileTemplate() mobi...
lgpl-3.0
codester2/devide
modules/filters/imageGreyDilate.py
7
2198
import gen_utils from module_base import ModuleBase from module_mixins import ScriptedConfigModuleMixin import module_utils import vtk class imageGreyDilate(ScriptedConfigModuleMixin, ModuleBase): def __init__(self, module_manager): # initialise our base class ModuleBase.__init__(self, module_mana...
bsd-3-clause
t794104/ansible
lib/ansible/modules/cloud/vmware/vmware_host_feature_facts.py
31
4292
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.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_...
gpl-3.0
paninetworks/neutron
neutron/tests/unit/agent/linux/test_interface.py
6
25094
# Copyright 2012 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...
apache-2.0
yzl0083/orange
Orange/testing/unit/tests/test_pick_class.py
6
5279
from Orange import data try: import unittest2 as unittest except: import unittest class TestPickClass(unittest.TestCase): def __init__(self, testCaseName): unittest.TestCase.__init__(self, testCaseName) self.orig = data.Table('multitarget-synthetic') def test_pick_first(self): ...
gpl-3.0
trishnaguha/ansible
lib/ansible/modules/net_tools/nios/nios_naptr_record.py
68
5884
#!/usr/bin/python # Copyright (c) 2018 Red Hat, 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', 'status': ['preview...
gpl-3.0
UstadMobile/exelearning-ustadmobile-work
twisted/python/test/test_constants.py
23
37640
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Unit tests for L{twisted.python.constants}. """ from __future__ import division, absolute_import from twisted.trial.unittest import TestCase from twisted.python.constants import ( NamedConstant, Names, ValueConstant, Values, FlagConstan...
gpl-2.0
JingJunYin/tensorflow
tensorflow/contrib/kfac/python/ops/op_queue_lib.py
45
1229
# 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...
apache-2.0
Endika/OpenUpgrade
addons/sale_mrp/tests/test_move_explode.py
225
5190
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
agpl-3.0
andrewyoung1991/scons
src/test_strings.py
2
8022
#!/usr/bin/env python # # __COPYRIGHT__ # # 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, ...
mit
carnell69/kuma
vendor/packages/_markerlib/markers.py
1769
3979
# -*- coding: utf-8 -*- """Interpret PEP 345 environment markers. EXPR [in|==|!=|not in] EXPR [or|and] ... where EXPR belongs to any of those: python_version = '%s.%s' % (sys.version_info[0], sys.version_info[1]) python_full_version = sys.version.split()[0] os.name = os.name sys.platform = sys.platfo...
mpl-2.0
DavidAndreev/indico
indico/modules/attachments/controllers/display/event.py
2
2744
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
gpl-3.0
t0mk/ansible
lib/ansible/modules/monitoring/newrelic_deployment.py
25
4796
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2013 Matt Coddington <coddington@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 ...
gpl-3.0
Chasego/codi
lintcode/132-[DUP]-Palindrome-Partitioning-II/PalindromePartitioningII_001.py
10
1402
class Solution: # @param s, a string # @return an integer def minCut(self, s): # write your code here n = len(s) if n < 2: return 0 isPal = [[False for j in range(n)] for i in range(n)] for d in range(n): isPal[d][d] = True for l...
mit
semonte/intellij-community
python/helpers/pydev/third_party/pep8/lib2to3/lib2to3/fixes/fix_xrange.py
326
2699
# Copyright 2007 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Fixer that changes xrange(...) into range(...).""" # Local imports from .. import fixer_base from ..fixer_util import Name, Call, consuming_calls from .. import patcomp class FixXrange(fixer_base.BaseFix): BM_...
apache-2.0
Imaginashion/cloud-vision
.fr-d0BNfn/django-jquery-file-upload/venv/lib/python3.5/site-packages/pip/_vendor/progress/counter.py
510
1502
# -*- coding: utf-8 -*- # Copyright (c) 2012 Giorgos Verigakis <verigak@gmail.com> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS P...
mit
ChronoMonochrome/android_external_chromium_org
net/tools/quic/benchmark/run_client.py
165
6744
#!/usr/bin/env python # Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import csv import datetime import json import os import shlex import subprocess import sys from optparse import OptionParser """Start...
bsd-3-clause
dentaku65/pelisalacarta
python/main-classic/channels/filmsenzalimiti.py
8
5077
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Canal para filmsenzalimiti # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import urlparse,urllib2,urllib,re import os, sys from c...
gpl-3.0
ifduyue/django
django/contrib/auth/backends.py
13
6637
from django.contrib.auth import get_user_model from django.contrib.auth.models import Permission UserModel = get_user_model() class ModelBackend: """ Authenticates against settings.AUTH_USER_MODEL. """ def authenticate(self, request, username=None, password=None, **kwargs): if username is No...
bsd-3-clause
travc/paper-Predicted-MF-Quarantine-Length-Data-and-Code
data/MedFoes/collate_longrun_output.py
1
3371
#!/bin/env python3 import sys import os import glob import numpy as np import pandas as pd from collections import OrderedDict RUNSET = sys.argv[1].rstrip('/') BASEDIR = './' OUTDIR = 'out' INTERPOLATION_METHOD = 'nearest' STEP_FILENAME_GLOB = 'step_*' MEDFOESP_DETAIL_FILE_GLOB = 'MED-FOESp_*_detail.txt' DATA_O...
mit
unlessbamboo/grocery-shop
language/python/src/magic-method/test_property.py
1
2112
# coding:utf8 from __future__ import print_function class Property(object): " Emulate PyProperty_Type() in Objects/descrobject.c 该类时Property的python实现方式 参考:https://stackoverflow.com/questions/17330160/how-does-the-property-decorator-work " def __init__(self, fget=None, fset=None, fd...
gpl-3.0
AllenDowney/ThinkStats2
code/thinkstats2_test.py
1
13329
"""This file contains code for use with "Think Stats", by Allen B. Downey, available from greenteapress.com Copyright 2014 Allen B. Downey License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html """ from __future__ import print_function, division import unittest import random from collections import Counter import ...
gpl-3.0
google/nerfactor
third_party/xiuminglib/xiuminglib/vis/pt.py
1
6738
from os.path import join, dirname import numpy as np from .. import const, os as xm_os from .general import _savefig from ..imprt import preset_import from ..log import get_logger logger = get_logger() def scatter_on_img(pts, im, size=2, bgr=(0, 0, 255), outpath=None): r"""Plots scatter on top of an image or ju...
apache-2.0
zappyk-github/zappyk-python
lib/lib_external/postgresql/resolved/crypt.py
2
26684
# fcrypt.py """Unix crypt(3) password hash algorithm. This is a port to Python of the standard Unix password crypt function. It's a single self-contained source file that works with any version of Python from version 1.5 or higher. The code is based on Eric Young's optimised crypt in C. Python fcrypt is intended fo...
gpl-2.0
ClearCorp-dev/odoo
addons/payment_paypal/tests/test_paypal.py
378
11126
# -*- coding: utf-8 -*- from openerp.addons.payment.models.payment_acquirer import ValidationError from openerp.addons.payment.tests.common import PaymentAcquirerCommon from openerp.addons.payment_paypal.controllers.main import PaypalController from openerp.tools import mute_logger from lxml import objectify import u...
agpl-3.0
nvoron23/hue
desktop/core/ext-py/thrift-0.9.1/src/protocol/TJSONProtocol.py
72
14318
# # 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...
apache-2.0
irwinlove/django
tests/admin_views/test_adminsite.py
247
2992
from __future__ import unicode_literals import datetime from django.conf.urls import url from django.contrib import admin from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django.test import TestCase, override_settings from django.test.client import RequestFactory from .mo...
bsd-3-clause
hale36/SRTV
lib/unidecode/x05a.py
252
4636
data = ( 'Song ', # 0x00 'Wei ', # 0x01 'Hong ', # 0x02 'Wa ', # 0x03 'Lou ', # 0x04 'Ya ', # 0x05 'Rao ', # 0x06 'Jiao ', # 0x07 'Luan ', # 0x08 'Ping ', # 0x09 'Xian ', # 0x0a 'Shao ', # 0x0b 'Li ', # 0x0c 'Cheng ', # 0x0d 'Xiao ', # 0x0e 'Mang ', # 0x0f 'Fu ', # 0x1...
gpl-3.0
rjschwei/azure-sdk-for-python
azure-mgmt-sql/azure/mgmt/sql/models/slo_usage_metric.py
1
1776
# 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 ...
mit
mfherbst/spack
var/spack/repos/builtin/packages/r-rgl/package.py
5
2874
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
sirex/couchdbkit
couchdbkit/schema/__init__.py
2
6330
# -*- coding: utf-8 - # # This file is part of couchdbkit released under the MIT license. # See the NOTICE for more information. """ Schema is an easy way to map couchdb object in pythoin object. It's similar to ORMs but with all couchdb glory. An application describes the kinds of data it uses with a Document objec...
mit
willingc/oh-mainline
vendor/packages/gdata/src/gdata/tlslite/mathtls.py
273
11647
"""Miscellaneous helper functions.""" from utils.compat import * from utils.cryptomath import * import hmac import md5 import sha #1024, 1536, 2048, 3072, 4096, 6144, and 8192 bit groups] goodGroupParameters = [(2,0xEEAF0AB9ADB38DD69C33F80AFA8FC5E86072618775FF3C0B9EA2314C9C256576D674DF7496EA81D3383B4813D692C6E0E0D5D...
agpl-3.0
hfp/tensorflow-xsmm
tensorflow/python/kernel_tests/sparse_split_op_test.py
22
13868
# 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...
apache-2.0
nitin-cherian/LifeLongLearning
Python/PythonProgrammingLanguage/Encapsulation/encap_env/lib/python3.5/site-packages/pygments/formatters/other.py
31
5162
# -*- coding: utf-8 -*- """ pygments.formatters.other ~~~~~~~~~~~~~~~~~~~~~~~~~ Other formatters: NullFormatter, RawTokenFormatter. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.formatter import Formatter from pygments...
mit
saleemjaveds/https-github.com-openstack-nova
nova/tests/api/openstack/compute/contrib/test_cloudpipe_update.py
13
3289
# Copyright 2012 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
apache-2.0
wreckJ/intellij-community
python/lib/Lib/site-packages/django/conf/locale/sr_Latn/formats.py
655
1980
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # 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 = 'H:i' DATETIME_FORMAT = 'j. F Y. H:i' YEAR_MONTH_F...
apache-2.0
steebchen/youtube-dl
youtube_dl/extractor/moniker.py
66
3951
# coding: utf-8 from __future__ import unicode_literals import os.path import re from .common import InfoExtractor from ..utils import ( ExtractorError, remove_start, sanitized_Request, urlencode_postdata, ) class MonikerIE(InfoExtractor): IE_DESC = 'allmyvideos.net and vidspot.net' _VALID_U...
unlicense
nerzhul/ansible
lib/ansible/module_utils/gce.py
94
2535
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
gpl-3.0
anielsen001/scipy
scipy/sparse/csgraph/tests/test_reordering.py
93
3457
from __future__ import division, print_function, absolute_import import numpy as np from numpy.testing import assert_equal from scipy.sparse.csgraph import reverse_cuthill_mckee,\ maximum_bipartite_matching from scipy.sparse import diags, csr_matrix, coo_matrix def test_graph_reverse_cuthill_mckee(): A = ...
bsd-3-clause
alexsmx/djangoAppengineSrcTemplate
django/contrib/messages/tests/urls.py
154
2019
from django.conf.urls.defaults import * from django.contrib import messages from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect, HttpResponse from django.shortcuts import render_to_response, redirect from django.template import RequestContext, Template from django.template.response...
bsd-3-clause
sirio81/vmcli
libhost.py
1
4935
from libvmcli import * from libguest import Guest class Host: def __init__(self, name, global_cluster_options, cluster_options): self.guests = {} self.name = name self.global_cluster_options = global_cluster_options self.cluster_options = cluster_options d = os.path.join('/...
lgpl-2.1
indirectlylit/kolibri
kolibri/core/logger/migrations/0001_initial.py
3
17383
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2017-05-16 22:32 from __future__ import unicode_literals import django.core.validators import django.db.models.deletion import morango.models from django.db import migrations from django.db import models import kolibri.core.fields class Migration(migrations.Mig...
mit
graingert/maluroam
maluroam/eduroam_snort/views.py
1
6451
#!/usr/bin/env python # -*- coding: utf-8 -*- # # views.py # # Copyright 2012 Thomas Grainger <tagrain@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation; version 3. # ...
agpl-3.0
avanov/django
tests/utils_tests/test_timezone.py
170
7827
import copy import datetime import pickle import unittest from django.test import override_settings from django.utils import timezone try: import pytz except ImportError: pytz = None requires_pytz = unittest.skipIf(pytz is None, "this test requires pytz") if pytz is not None: CET = pytz.timezone("Europe...
bsd-3-clause
nzavagli/UnrealPy
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/django-1.8.2/django/conf/locale/zh_TW/formats.py
634
1810
# -*- 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年n月j日' # 2016年9月5...
mit
seslattery/django-sample-app
djtut2/polls/migrations/0002_auto__add_field_poll_pub_date.py
1
1379
# -*- 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 field 'Poll.pub_date' db.add_column('polls_poll', 'pub_date', self.gf('django...
bsd-3-clause
karimdamak123/configuration2
playbooks/callback_plugins/datadog_tasks_timing.py
10
4292
import os import datetime import time import logging import datadog import sys logging.basicConfig(level=logging.INFO, stream=sys.stdout) logging.getLogger("requests").setLevel(logging.WARNING) logging.getLogger("dd").setLevel(logging.WARNING) logger = logging.getLogger(__name__) """ Originally written by 'Jharrod La...
agpl-3.0
projectcalico/calico-nova
nova/virt/hyperv/rdpconsoleutilsv2.py
100
1088
# Copyright 2013 Cloudbase Solutions Srl # 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 r...
apache-2.0
mortada/tensorflow
tensorflow/contrib/tfprof/python/tools/tfprof/tfprof_logger.py
15
6540
# 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...
apache-2.0
superberny70/plugin.video.pelisalacarta-3-9X
servers/video4you.py
40
3787
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Conector para video4you # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import urlparse,urllib2,urllib,re import os from core imp...
gpl-3.0
tta/gnuradio-tta
gnuradio-examples/python/pfb/chirp_channelize.py
7
6936
#!/usr/bin/env python # # Copyright 2009 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) ...
gpl-3.0
Nicop06/ansible
lib/ansible/modules/windows/win_template.py
47
4837
# this is a virtual module that is entirely implemented server side # 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 op...
gpl-3.0
zeroSteiner/boltons
boltons/ecoutils.py
2
13495
# -*- coding: utf-8 -*- """As a programming ecosystem grows, so do the chances of runtime variability. Python boasts one of the widest deployments for a high-level programming environment, making it a viable target for all manner of application. But with breadth comes variance, so it's important to know what you're wo...
bsd-3-clause
gaddman/ansible
lib/ansible/modules/network/avi/avi_ipamdnsproviderprofile.py
31
5896
#!/usr/bin/python # # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # # Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ANSIB...
gpl-3.0
viswimmer1/PythonGenerator
data/python_files/34471319/plot_covariance.py
1
1489
import dataset; import numpy as np import scipy.io; import matplotlib.cm as cm import matplotlib.mlab as mlab import matplotlib.pyplot as plt import networkx as nx import scipy.stats as ss #z = scipy.io.loadmat('tmp.dat'); #ccfull = z['ccfull'] #sx,sy = ccfull.shape ##x = np.arange(sx) ##delta = 0.025 ##X, Y = np.mes...
gpl-2.0
kabracity/Flexget
flexget/plugins/modify/torrent.py
11
4597
from __future__ import unicode_literals, division, absolute_import import logging import os from flexget import plugin from flexget.event import event from flexget.utils.bittorrent import Torrent, is_torrent_file log = logging.getLogger('modif_torrent') class TorrentFilename(object): """ Makes sure that...
mit
kenorb/BitTorrent
windows_installer/winsetup.py
2
4938
# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # bu...
gpl-3.0
agaurav/ansible
lib/ansible/parsing/__init__.py
10
7992
# (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...
gpl-3.0
chrispbailey/xhtml2pdf
xhtml2pdf/util.py
29
27809
# -*- coding: utf-8 -*- from reportlab.lib.colors import Color, CMYKColor, getAllNamedColors, toColor, \ HexColor from reportlab.lib.enums import TA_LEFT, TA_CENTER, TA_RIGHT, TA_JUSTIFY from reportlab.lib.units import inch, cm import base64 import httplib import logging import mimetypes import os.path import re im...
apache-2.0
jbedorf/tensorflow
tensorflow/python/framework/auto_control_deps.py
5
16383
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
johnwyles/PySpeak
fabfile.py
1
1707
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Deployment of PySpeak """ # system import os, re # fabric from fabric.api import cd, env, execute, local, run, sudo, prefix # PySpeak from pyspeak import __version__ def fast_commit(capture=True): """ Fast commit with generic message. """ env.warn_only = True...
gpl-3.0
lemonad/jaikuengine
common/imageutil.py
34
2202
# Copyright 2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
fartashf/python-mode
pymode/libs3/rope/base/fscommands.py
3
7524
"""Project file system commands. This modules implements file system operations used by rope. Different version control systems can be supported by implementing the interface provided by `FileSystemCommands` class. See `SubversionCommands` and `MercurialCommands` for example. """ import os, re import shutil import ...
lgpl-3.0
Dino0631/RedRain-Bot
lib/pip/_vendor/lockfile/symlinklockfile.py
536
2616
from __future__ import absolute_import import os import time from . import (LockBase, NotLocked, NotMyLock, LockTimeout, AlreadyLocked) class SymlinkLockFile(LockBase): """Lock access to a file using symlink(2).""" def __init__(self, path, threaded=True, timeout=None): # super(Symlin...
gpl-3.0
Bachaco-ve/odoo
addons/base_report_designer/plugin/openerp_report_designer/bin/script/Fields.py
384
12340
######################################################################### # # Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com # Copyright (C) 2004-2010 OpenERP SA (<http://openerp.com>). # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser Gene...
agpl-3.0
phazel/pixelated-user-agent
service/pixelated/adapter/model/tag.py
10
2109
# # Copyright (c) 2014 ThoughtWorks, Inc. # # Pixelated is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Pixelated is distrib...
agpl-3.0
leppa/home-assistant
tests/components/mfi/test_sensor.py
3
6940
"""The tests for the mFi sensor platform.""" import unittest import unittest.mock as mock from mficlient.client import FailedToLogin import requests import homeassistant.components.mfi.sensor as mfi import homeassistant.components.sensor as sensor from homeassistant.const import TEMP_CELSIUS from homeassistant.setup ...
apache-2.0