repo_name
stringlengths
6
100
path
stringlengths
4
294
copies
stringlengths
1
5
size
stringlengths
4
6
content
stringlengths
606
896k
license
stringclasses
15 values
kool79/intellij-community
plugins/hg4idea/testData/bin/hgext/largefiles/remotestore.py
92
3323
# Copyright 2010-2011 Fog Creek Software # Copyright 2010-2011 Unity Technologies # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. '''remote largefile store; the base class for wirestore''' import urllib2 from mercurial import ut...
apache-2.0
manipopopo/tensorflow
tensorflow/python/kernel_tests/bias_op_test.py
133
9303
# 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
PetrWolf/ninja
misc/ninja_test.py
7
4856
#!/usr/bin/env python # Copyright 2011 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
apache-2.0
kohnle-lernmodule/palama
twisted/python/hook.py
90
5266
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. """ I define support for hookable instance methods. These are methods which you can register pre-call and post-call external functions to augment their functionality. People familiar with more esoteric languages may think of these a...
gpl-2.0
airbnb/airflow
tests/providers/apache/druid/operators/test_druid.py
7
2478
# # 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...
apache-2.0
DigitalSlideArchive/cdsa_ipython_helpers
dsa_mongo_common_functions.py
1
38290
""" This contains various helper functions for the Digital Slide Archive""" import re, csv, os, sys, optparse import collections from PIL import Image import openslide from openslide.lowlevel import OpenSlideError import hashlib import subprocess import shutil,glob import random from functools import partial def md5su...
apache-2.0
4eek/edx-platform
common/djangoapps/enrollment/data.py
39
9283
""" Data Aggregation Layer of the Enrollment API. Collects all enrollment specific data into a single source to be used throughout the API. """ import logging from django.contrib.auth.models import User from opaque_keys.edx.keys import CourseKey from enrollment.errors import ( CourseNotFoundError, CourseEnrollmen...
agpl-3.0
trueblue2704/AskMeAnything
lib/python2.7/site-packages/httplib2/iri2uri.py
706
3828
""" iri2uri Converts an IRI to a URI. """ __author__ = "Joe Gregorio (joe@bitworking.org)" __copyright__ = "Copyright 2006, Joe Gregorio" __contributors__ = [] __version__ = "1.0.0" __license__ = "MIT" __history__ = """ """ import urlparse # Convert an IRI to a URI following the rules in RFC 3987 # # The character...
mit
EvanK/ansible
lib/ansible/modules/network/onyx/onyx_igmp_vlan.py
63
18889
#!/usr/bin/python # # Copyright: Ansible Project # 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
eXcomm/talkcoin-wallet
contrib/spendfrom/spendfrom.py
792
10053
#!/usr/bin/env python # # Use the raw transactions API to spend bitcoins received on particular addresses, # and send any change back to that same address. # # Example usage: # spendfrom.py # Lists available funds # spendfrom.py --from=ADDRESS --to=ADDRESS --amount=11.00 # # Assumes it will talk to a bitcoind or Bit...
mit
aminghadersohi/airflow
tests/operators/latest_only_operator.py
11
3298
# -*- 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
karrtikr/ete
sdoc/old_tutorial/examples/clustering_tree.py
10
3942
from ete3 import ClusterTree # Example of a minimalistic numerical matrix. It is encoded as a text # string for convenience, but it usally be loaded from a text file. matrix = """ #Names\tcol1\tcol2\tcol3\tcol4\tcol5\tcol6\tcol7 A\t-1.23\t-0.81\t1.79\t0.78\t-0.42\t-0.69\t0.58 B\t-1.76\t-0.94\t1.16\t0.36\t0.41\t-0.35\t...
gpl-3.0
chatcannon/scipy
scipy/optimize/_basinhopping.py
9
26368
""" basinhopping: The basinhopping global optimization algorithm """ from __future__ import division, print_function, absolute_import import numpy as np from numpy import cos, sin import scipy.optimize import collections __all__ = ['basinhopping'] class Storage(object): """ Class used to store the lowest en...
bsd-3-clause
fitermay/intellij-community
python/helpers/py3only/docutils/transforms/frontmatter.py
44
19348
# $Id: frontmatter.py 7595 2013-01-21 17:33:56Z milde $ # Author: David Goodger, Ueli Schlaepfer <goodger@python.org> # Copyright: This module has been placed in the public domain. """ Transforms related to the front matter of a document or a section (information found before the main text): - `DocTitle`: Used to tra...
apache-2.0
igemsoftware/SYSU-Software2013
project/Python27/Lib/site-packages/setuptools/command/build_ext.py
136
11704
from distutils.command.build_ext import build_ext as _du_build_ext try: # Attempt to use Pyrex for building extensions, if available from Pyrex.Distutils.build_ext import build_ext as _build_ext except ImportError: _build_ext = _du_build_ext import os, sys from distutils.file_util import copy_file from set...
mit
Changaco/oh-mainline
mysite/search/migrations/0027_change_name_of_python_the_project.py
17
4545
# This file is part of OpenHatch. # Copyright (C) 2010 OpenHatch, Inc. # # 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, either version 3 of the License, or # (at your option) any later v...
agpl-3.0
mosra/m.css
plugins/m/dox.py
1
8330
# # This file is part of m.css. # # Copyright © 2017, 2018, 2019, 2020 Vladimír Vondruš <mosra@centrum.cz> # # 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, inc...
mit
tectronics/cortex-vfx
python/IECoreMaya/PresetsUI.py
12
26395
########################################################################## # # Copyright (c) 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: # # * Redistribu...
bsd-3-clause
piffey/ansible
lib/ansible/modules/cloud/ovirt/ovirt_cluster_facts.py
74
3659
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016 Red Hat, Inc. # # 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 #...
gpl-3.0
lliss/tr-55
tr55/water_quality.py
1
1621
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division from tr55.tablelookup import lookup_load, lookup_nlcd def get_volume_of_runoff(runoff, cell_count, cell_resolution): """ Calculate the volume of runoff over the entire modeled...
apache-2.0
bjolivot/ansible
lib/ansible/modules/windows/win_tempfile.py
32
2013
#!/usr/bin/python #coding: utf-8 -*- # (c) 2017 Dag Wieers <dag@wieers.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 # (...
gpl-3.0
danduggan/hltd
test/testRunStop.py
2
3495
#!/bin/env python import os,sys,shutil,time def lineSearch(logfile,*args): searchTimeout = 10. searchTimeAccum = 0. doLoop = True while doLoop: line = logfile.readline() if not line: time.sleep(0.1) searchTimeAccum += 0.1 continue foundAll = True for arg in args: if line...
lgpl-3.0
beni55/django
django/contrib/sites/migrations/0001_initial.py
276
1096
# -*- coding: utf-8 -*- from __future__ import unicode_literals import django.contrib.sites.models from django.contrib.sites.models import _simple_domain_name_validator from django.db import migrations, models class Migration(migrations.Migration): dependencies = [] operations = [ migrations.Create...
bsd-3-clause
chaen/DIRAC
WorkloadManagementSystem/Client/JobState/JobManifest.py
2
8349
""" """ from DIRAC import S_OK, S_ERROR from DIRAC.Core.Utilities.CFG import CFG from DIRAC.Core.Utilities import List from DIRAC.ConfigurationSystem.Client.Helpers.Operations import Operations from DIRAC.Core.Utilities.JDL import loadJDLAsCFG, dumpCFGAsJDL from DIRAC.WorkloadManagementSystem.Agent.SiteDirector import...
gpl-3.0
mattilyra/scikit-learn
benchmarks/bench_isotonic.py
38
3047
""" Benchmarks of isotonic regression performance. We generate a synthetic dataset of size 10^n, for n in [min, max], and examine the time taken to run isotonic regression over the dataset. The timings are then output to stdout, or visualized on a log-log scale with matplotlib. This allows the scaling of the algorit...
bsd-3-clause
jorik041/phantomjs
src/qt/qtbase/src/3rdparty/freetype/src/tools/chktrcmp.py
381
3826
#!/usr/bin/env python # # Check trace components in FreeType 2 source. # Author: suzuki toshiya, 2009 # # This code is explicitly into the public domain. import sys import os import re SRC_FILE_LIST = [] USED_COMPONENT = {} KNOWN_COMPONENT = {} SRC_FILE_DIRS = [ "src" ] TRACE_DEF_FILES = [ "include/freetype/in...
bsd-3-clause
rhndg/openedx
common/lib/xmodule/xmodule/library_root_xblock.py
44
5062
""" 'library' XBlock (LibraryRoot) """ import logging from xmodule.studio_editable import StudioEditableModule from xblock.fields import Scope, String, List, Boolean from xblock.fragment import Fragment from xblock.core import XBlock log = logging.getLogger(__name__) # Make '_' a no-op so we can scrape strings _ = ...
agpl-3.0
microcom/odoo
addons/stock/tests/test_owner_available.py
46
2644
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # Author: Leonardo Pistone # Copyright 2015 Camptocamp SA from openerp.addons.stock.tests.common import TestStockCommon class TestVirtualAvailable(TestStockCommon): def setUp(self): super(TestVirtualAvail...
agpl-3.0
run2/citytour
4symantec/Lib/site-packages/pip/req/req_install.py
30
43196
from __future__ import absolute_import import logging import os import re import shutil import sys import tempfile import warnings import zipfile from distutils.util import change_root from distutils import sysconfig from email.parser import FeedParser from pip._vendor import pkg_resources, six from pip._vendor.dist...
mit
examachine/pisi
pisi/data/component.py
1
7983
# -*- coding: utf-8 -*- # # Copyright (C) 2005, TUBITAK/UEKAE # # 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. # # Plea...
gpl-3.0
trondhindenes/ansible
contrib/inventory/openvz.py
196
2818
#!/usr/bin/env python # -*- coding: utf-8 -*- # # openvz.py # # Copyright 2014 jordonr <jordon@beamsyn.net> # # 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 ...
gpl-3.0
tima/ansible
lib/ansible/modules/network/panos/panos_security_rule.py
15
20157
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, techbizdev <techbizdev@paloaltonetworks.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version':...
gpl-3.0
hbrunn/OCB
addons/hr_holidays/__openerp__.py
260
3101
# -*- 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...
agpl-3.0
indictranstech/focal-erpnext
patches/v4_0/remove_india_specific_fields.py
5
1447
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.core.doctype.custom_field.custom_field import create_custom_field_if_values_exist def execute(): frappe.db.sql("delete fr...
agpl-3.0
edx/edx-oauth2-provider
edx_oauth2_provider/tests/test_credentials.py
1
2833
""" Test email as username authentication """ from __future__ import absolute_import, division, print_function, unicode_literals import json import ddt from django.core.urlresolvers import reverse from provider.constants import CONFIDENTIAL, PUBLIC from .base import OAuth2TestCase from .factories import ClientFactor...
agpl-3.0
indashnet/InDashNet.Open.UN2000
android/external/mesa3d/common.py
12
3337
####################################################################### # Common SCons code import os import os.path import re import subprocess import sys import platform as _platform import SCons.Script.SConscript ####################################################################### # Defaults host_platform = ...
apache-2.0
arbrandes/edx-platform
common/djangoapps/util/password_policy_validators.py
4
18207
""" This file exposes a number of password validators which can be optionally added to account creation """ import logging import unicodedata from django.contrib.auth.password_validation import MinimumLengthValidator as DjangoMinimumLengthValidator from django.contrib.auth.password_validation import get_default_pass...
agpl-3.0
PaloAltoNetworks-BD/SplunkforPaloAltoNetworks
Splunk_TA_paloalto/bin/splunk_ta_paloalto/aob_py2/cloudconnectlib/splunktacollectorlib/cloud_connect_mod_input.py
2
2415
from future import standard_library standard_library.install_aliases() import configparser import os.path as op from .data_collection import ta_mod_input as ta_input from .ta_cloud_connect_client import TACloudConnectClient as CollectorCls from ..common.lib_util import ( get_main_file, get_app_root_dir, get_mod_in...
isc
signed/intellij-community
python/testData/MockSdk3.4/Lib/io.py
165
3395
"""The io module provides the Python interfaces to stream handling. The builtin open function is defined in this module. At the top of the I/O hierarchy is the abstract base class IOBase. It defines the basic interface to a stream. Note, however, that there is no separation between reading and writing to streams; impl...
apache-2.0
chronicwaffle/PokemonGo-DesktopMap
app/pywin/Lib/lib-tk/test/test_tkinter/test_variables.py
20
6788
import unittest from Tkinter import (Variable, StringVar, IntVar, DoubleVar, BooleanVar, Tcl, TclError) class TestBase(unittest.TestCase): def setUp(self): self.root = Tcl() def tearDown(self): del self.root class TestVariable(TestBase): def info_exists(self, *ar...
mit
nvoron23/hue
desktop/core/ext-py/tablib-develop/tablib/formats/_tsv.py
53
1299
# -*- coding: utf-8 -*- """ Tablib - TSV (Tab Separated Values) Support. """ from tablib.compat import is_py3, csv, StringIO title = 'tsv' extensions = ('tsv',) DEFAULT_ENCODING = 'utf-8' def export_set(dataset): """Returns a TSV representation of Dataset.""" stream = StringIO() if is_py3: ...
apache-2.0
drmrd/ansible
lib/ansible/modules/database/influxdb/influxdb_query.py
89
2642
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2017, René Moser <mail@renemoser.net> # 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...
gpl-3.0
lnielsen/invenio
invenio/legacy/docextract/scripts/docextract.py
4
2509
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2005, 2006, 2007, 2008, 2010, 2011, 2013 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 t...
gpl-2.0
en0/Supybot_sasl
src/utils/structures.py
14
13180
### # Copyright (c) 2002-2009, Jeremiah Fincher # 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 co...
bsd-3-clause
tobegit3hub/deep_cnn
java_predict_client/src/main/proto/tensorflow/contrib/quantization/python/math_ops.py
179
1122
# 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
amarian12/p2pool-adaptive
p2pool/__init__.py
278
1595
import os import re import sys import traceback import subprocess def check_output(*popenargs, **kwargs): process = subprocess.Popen(stdout=subprocess.PIPE, *popenargs, **kwargs) output, unused_err = process.communicate() retcode = process.poll() if retcode: raise ValueError((retcode, output)) ...
gpl-3.0
CSC301H-Fall2013/JuakStore
site-packages/build/lib/django/contrib/gis/gdal/envelope.py
221
7049
""" The GDAL/OGR library uses an Envelope structure to hold the bounding box information for a geometry. The envelope (bounding box) contains two pairs of coordinates, one for the lower left coordinate and one for the upper right coordinate: +----------o Upper right; (max_x, max_y) ...
mit
benthomasson/ansible
lib/ansible/modules/packaging/os/package.py
7
1892
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Ansible Project # # 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.0', ...
gpl-3.0
devs1991/test_edx_docmode
venv/lib/python2.7/site-packages/requests/packages/urllib3/packages/six.py
2375
11628
"""Utilities for writing code that runs on Python 2 and 3""" #Copyright (c) 2010-2011 Benjamin Peterson #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 l...
agpl-3.0
grupoprog3/proyecto_final
proyecto/flask/Lib/encodings/mac_cyrillic.py
37
13761
""" Python Character Mapping Codec mac_cyrillic generated from 'MAPPINGS/VENDORS/APPLE/CYRILLIC.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 de...
apache-2.0
joodo/davanoffi
board/handlers.py
2
1301
from django.core.files.uploadhandler import FileUploadHandler from django.core.cache import cache, caches class UploadProgressCachedHandler(FileUploadHandler): def __init__(self, request=None): super(UploadProgressCachedHandler, self).__init__(request) self.cache_key = None def handl...
unlicense
florianjacob/linkchecker
third_party/dnspython/tests/dnssec.py
56
9344
# Copyright (C) 2011 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation 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 PROVIDED "AS IS" AND NOMIN...
gpl-2.0
Suninus/NewsBlur
vendor/feedvalidator/formatter/application_test.py
16
1034
"""$Id: application_test.py 699 2006-09-25 02:01:18Z rubys $""" __author__ = "Sam Ruby <http://intertwingly.net/> and Mark Pilgrim <http://diveintomark.org/>" __version__ = "$Revision: 699 $" __date__ = "$Date: 2006-09-25 02:01:18 +0000 (Mon, 25 Sep 2006) $" __copyright__ = "Copyright (c) 2002 Sam Ruby and Mark Pilgri...
mit
birdsarah/bokeh
scripts/version_update.py
42
1687
import os import re import sys def check_input(new_ver): """ Ensure that user input matches the format X.X.X """ pat = r'\d+.\d+.\d+' if not re.match(pat, new_ver): print("The new version must be in the format X.X.X (ex. '0.6.0')") return True def version_update(new_ver, file_array): ...
bsd-3-clause
timmartin/ScanManager
setup.py
1
1198
from setuptools import setup from codecs import open from os import path import glob here = path.abspath(path.dirname(__file__)) # Get the long description from the README file with open(path.join(here, 'README.rst'), encoding='utf-8') as f: long_description = f.read() setup( name="scan_manager", version...
mit
LarsDu/DeepNuc
deepnuc/readers.py
2
11974
import sys import os import numpy as np import copy import pysam import dinucshuffle from Bio import SeqIO import dubiotools as dbt class Reader(object): def __init__(self): #self.type='BaseReader' pass def pull(self): return ([],[]) def pull_as_onehot(self,batch_size): ...
gpl-3.0
pculture/unisubs
apps/teams/workflows/teamworkflows.py
1
14051
# Amara, universalsubtitles.org # # Copyright (C) 2014 Participatory Culture Foundation # # 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, either version 3 of the # License, or (at your op...
agpl-3.0
consulo/consulo-python
plugin/src/main/dist/helpers/pydev/pydevd_attach_to_process/winappdbg/win32/gdi32.py
102
16829
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2009-2014, Mario Vilas # 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...
apache-2.0
sander76/home-assistant
homeassistant/components/smarthab/__init__.py
4
2479
"""Support for SmartHab device integration.""" import asyncio import logging import pysmarthab import voluptuous as vol from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry from homeassistant.const import CONF_EMAIL, CONF_PASSWORD from homeassistant.exceptions import ConfigEntryNotReady import homeassi...
apache-2.0
Adamovskiy/gtk
gtk/compose-parse.py
10
34282
#!/usr/bin/env python # -*- coding: utf-8 -*- # # compose-parse.py, version 1.4 # # multifunction script that helps manage the compose sequence table in GTK+ (gtk/gtkimcontextsimple.c) # the script produces statistics and information about the whole process, run with --help for more. # # You may need to switch your pyt...
lgpl-2.1
SteveHNH/ansible
lib/ansible/module_utils/facts/hardware/base.py
60
1746
# 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 ...
gpl-3.0
kinnou02/navitia
source/jormungandr/tests/calendar_tests.py
3
4480
# Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.canaltp.fr). # Help us simplify mobility and open public tr...
agpl-3.0
Adnn/django
django/utils/html.py
129
14668
"""HTML utilities suitable for global use.""" from __future__ import unicode_literals import re import warnings from django.utils import six from django.utils.deprecation import RemovedInDjango110Warning from django.utils.encoding import force_str, force_text from django.utils.functional import allow_lazy from djang...
bsd-3-clause
mikel-egana-aranguren/SADI-Galaxy-Docker
galaxy-dist/eggs/boto-2.27.0-py2.7.egg/boto/fps/__init__.py
429
1101
# Copyright (c) 2008, Chris Moyer http://coredumped.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, modify, ...
gpl-3.0
ccastell/Transfer-System
Website/env/lib/python3.5/site-packages/wheel/signatures/__init__.py
565
3779
""" Create and verify jws-js format Ed25519 signatures. """ __all__ = [ 'sign', 'verify' ] import json from ..util import urlsafe_b64decode, urlsafe_b64encode, native, binary ed25519ll = None ALG = "Ed25519" def get_ed25519ll(): """Lazy import-and-test of ed25519 module""" global ed25519ll if not ...
apache-2.0
commonsense/divisi
csc/divisi/recycling_set.py
1
3241
from ordered_set import OrderedSet from priodict import priorityDictionary class RecyclingSet(OrderedSet): __slots__ = ['items', 'indices', 'index', 'indexFor', '__contains__', '__getitem__', '__len__', 'count', 'maxsize', 'drop_listeners', 'priority'] def __init__(self, maxsi...
gpl-3.0
CiscoSystems/vespa
neutron/tests/unit/brocade/test_brocade_db.py
20
3653
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (c) 2013 OpenStack Foundation. # # 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 # # ...
apache-2.0
idaholab/raven
scripts/conversionScripts/conversion_from_old_hdf5_to_new/reader_old_HDF5_format.py
2
19905
# Copyright 2017 Battelle Energy Alliance, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
apache-2.0
epuzanov/ZenPacks.community.HPMon
ZenPacks/community/HPMon/modeler/plugins/community/snmp/HPFanMap.py
1
3236
################################################################################ # # This program is part of the HPMon Zenpack for Zenoss. # Copyright (C) 2008, 2009, 2010, 2011 Egor Puzanov. # # This program can be used under the GNU General Public License version 2 # You can find full information here: http://www.zen...
gpl-2.0
xsynergy510x/android_external_chromium_org
third_party/cython/src/Cython/Compiler/Scanning.py
90
16183
# cython: infer_types=True, language_level=3, py2_import=True # # Cython Scanner # import os import platform import cython cython.declare(EncodedString=object, any_string_prefix=unicode, IDENT=unicode, print_function=object) from Cython import Utils from Cython.Plex.Scanners import Scanner from Cyth...
bsd-3-clause
hmcl/storm-apache
storm-client/src/py/storm/DistributedRPC.py
1
10668
#!/usr/bin/env python # # 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 # "...
apache-2.0
eestay/edx-platform
lms/djangoapps/licenses/tests.py
78
9416
"""Tests for License package""" import logging import json from uuid import uuid4 from random import shuffle from tempfile import NamedTemporaryFile import factory from factory.django import DjangoModelFactory from django.test import TestCase from django.test.client import Client from django.core.management import ca...
agpl-3.0
CasparLi/calibre
src/calibre/web/jsbrowser/test.py
12
9144
#!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2011, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' import unitte...
gpl-3.0
juvvadi/keystone
keystone/logic/types/auth.py
1
5621
# Copyright (c) 2010-2011 OpenStack, LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
apache-2.0
Just-D/chromium-1
chrome/common/extensions/docs/server2/converter_html_parser.py
165
1723
# 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. from HTMLParser import HTMLParser from StringIO import StringIO class _ConverterHTMLParser(HTMLParser): def __init__(self, io): HTMLParser.__init_...
bsd-3-clause
arnoutpierre/rtv
rtv/curses_helpers.py
3
10560
import os import time import threading import curses from curses import textpad, ascii from contextlib import contextmanager from . import config from .docs import HELP from .helpers import strip_textpad, clean from .exceptions import EscapeInterrupt __all__ = ['ESCAPE', 'get_gold', 'show_notification', 'show_help', ...
mit
UniversalMasterEgg8679/ansible
lib/ansible/modules/cloud/misc/proxmox_kvm.py
41
47770
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Abdoul Bah (@helldorado) <bahabdoul at gmail.com> """ Ansible module to manage Qemu(KVM) instance in Proxmox VE cluster. This module is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Fr...
gpl-3.0
rhcarvalho/kombu
kombu/utils/functional.py
4
5890
from __future__ import absolute_import import sys import threading from collections import Iterable, Mapping, OrderedDict from functools import wraps from itertools import islice from kombu.five import UserDict, string_t, keys __all__ = ['LRUCache', 'memoize', 'lazy', 'maybe_evaluate', 'is_list', 'maybe_...
bsd-3-clause
dims/neutron
neutron/db/migration/alembic_migrations/versions/mitaka/expand/15be73214821_add_bgp_model_data.py
11
3781
# Copyright 2016 Hewlett Packard Enterprise Development Company LP # # 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 # # Unles...
apache-2.0
nickmarton/Paxos-Distributed-Calendar
Classes/Node.py
1
24814
"""Node (User) Class for Paxos Calendar.""" import os import sys import time import thread import pickle import socket import logging from Bully import bully_algorithm from Appointment import Appointment from Calendar import Calendar from Proposer import Proposer from Acceptor import Acceptor class Node(object): ...
mit
mizhi/mimecat
docs/conf.py
1
7984
# -*- coding: utf-8 -*- # # mimecat documentation build configuration file, created by # sphinx-quickstart on Wed Sep 11 12:01:01 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All...
mit
ProgVal/cjdns
node_build/dependencies/libuv/build/gyp/test/product/gyptest-product.py
290
1588
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies simplest-possible build of a "Hello, world!" program using the default build target. """ import TestGyp # Android does not su...
gpl-3.0
cjayb/mne-python
mne/commands/mne_setup_forward_model.py
14
4712
#!/usr/bin/env python """Create a BEM model for a subject. Examples -------- .. code-block:: console $ mne setup_forward_model -s 'sample' """ import sys import os import mne from mne.utils import get_subjects_dir, warn def run(): """Run command.""" from mne.commands.utils import get_optparser, _add_v...
bsd-3-clause
Serag8/Bachelor
google_appengine/lib/django-0.96/django/test/simple.py
32
3229
import unittest, doctest from django.conf import settings from django.test.utils import setup_test_environment, teardown_test_environment from django.test.utils import create_test_db, destroy_test_db from django.test.testcases import OutputChecker, DocTestRunner # The module name for tests outside models.py TEST_MODUL...
mit
annarev/tensorflow
tensorflow/tools/ci_build/update_version.py
14
10846
#!/usr/bin/python # 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 r...
apache-2.0
uw-it-aca/course-dashboards
coursedashboards/migrations/0014_auto_20200911_2040.py
1
1189
# Generated by Django 2.1.15 on 2020-09-11 20:40 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('coursedashboards', '0013_auto_20190108_2238'), ] operations = [ migrations.CreateModel( name='CourseGradeAverage', ...
apache-2.0
domibarton/ansible
lib/ansible/plugins/connection/__init__.py
7
10265
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # (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...
gpl-3.0
kdar/rconsoft
setup.py
1
2919
#!/usr/bin/env python # Read LICENSE for licensing details. import sys import textwrap import glob import shutil import os app_name = 'rconsoft' #----------------------------- # Do some checks if sys.version_info < (2, 4, 0): sys.stderr.write(app_name+' requires Python 2.4 or newer.\n') sys.exit(-1) try: f...
mit
sarutobi/flowofkindness
rynda/message/migrations/0001_initial.py
3
4623
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import jsonfield.fields from django.conf import settings class Migration(migrations.Migration): dependencies = [ ('geozones', '0001_initial'), migrations.swappable_dependency(settings.AUTH_US...
mit
JioCloud/neutron
neutron/agent/l3/legacy_router.py
15
1377
# Copyright (c) 2015 Openstack Foundation # # 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 ...
apache-2.0
ptemplier/ansible
lib/ansible/modules/cloud/amazon/elb_target_group_facts.py
8
9841
#!/usr/bin/python # Copyright: Ansible Project # 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
ryra/Personal
5.othersifer/CS1114/pyPAUSE.py
2
1037
#!C:\Python26\python.exe # pythonPAUSE.py # # This is a python variation of the classic # os.system("pause") hack # and # the "any key" joke # # author: etg # last revision: 09/17/09 # now that you know the BIF raw_input() - use it # instead of a non-platform-independent OS system call from __future...
agpl-3.0
discreteoptimization/assignment
tsp/solver.py
2
1515
#!/usr/bin/python # -*- coding: utf-8 -*- import math from collections import namedtuple Point = namedtuple("Point", ['x', 'y']) def length(point1, point2): return math.sqrt((point1.x - point2.x)**2 + (point1.y - point2.y)**2) def solve_it(input_data): # Modify this code to run your optimization algorithm ...
mit
CunningLogic/vivo-2.6.35
Documentation/networking/cxacru-cf.py
14668
1626
#!/usr/bin/env python # Copyright 2009 Simon Arlott # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the Free # Software Foundation; either version 2 of the License, or (at your option) # any later version. # # This program i...
gpl-2.0
chengjf/database-interface-doc-management
flask-demo/flask/Lib/site-packages/werkzeug/wsgi.py
147
37837
# -*- coding: utf-8 -*- """ werkzeug.wsgi ~~~~~~~~~~~~~ This module implements WSGI related helpers. :copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import re import os import sys import posixpath import mimetypes from itert...
apache-2.0
52ai/django-ccsds
tests/gis_tests/relatedapp/tests.py
6
16100
from __future__ import unicode_literals from django.contrib.gis.geos import HAS_GEOS from django.db import connection from django.test import TestCase, ignore_warnings, skipUnlessDBFeature from django.test.utils import override_settings from django.utils import timezone from django.utils.deprecation import RemovedInDj...
bsd-3-clause
vim-python/python-syntax
tests/test.py
1
4201
#! /usr/bin/env python # -*- coding: utf-8 -*- # Above the run-comment and file encoding comment. # Comments. # TODO FIXME XXX # Keywords. with break continue del return pass raise global assert lambda yield for while if elif else import as try except finally self cls mcs from test import var as name raise Excep...
mit
SteveHNH/ansible
lib/ansible/modules/monitoring/sensu_silence.py
60
8521
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Steven Bambling <smbambling@gmail.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1...
gpl-3.0
jbenden/ansible
lib/ansible/modules/cloud/misc/serverless.py
1
6837
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Ryan Scott Brown <ryansb@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_version': '1.0',...
gpl-3.0
apixandru/intellij-community
python/lib/Lib/site-packages/django/core/management/commands/diffsettings.py
411
1296
from django.core.management.base import NoArgsCommand def module_to_dict(module, omittable=lambda k: k.startswith('_')): "Converts a module namespace to a Python dictionary. Used by get_settings_diff." return dict([(k, repr(v)) for k, v in module.__dict__.items() if not omittable(k)]) class Command(NoArgsComm...
apache-2.0