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
thefinn93/orgsms
orgsms/api.py
1
3675
from flask import Blueprint, abort, jsonify, request, current_app, Response import datetime from sqlalchemy import desc from .provider import providers from .socketio import socketio from . import models, exceptions app = Blueprint('api', __name__) @app.route('/inbound/<provider>', methods=["POST"]) def inbound(pro...
gpl-3.0
zhinaonet/sqlmap-z
thirdparty/termcolor/termcolor.py
168
5044
# coding: utf-8 # Copyright (c) 2008-2011 Volvox Development Team # # 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...
gpl-3.0
cristianomatos/crKernel-mako
scripts/build-all.py
1250
9474
#! /usr/bin/env python # Copyright (c) 2009-2011, Code Aurora Forum. 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 # n...
gpl-2.0
tableau/TabPy
tests/integration/test_deploy_and_evaluate_model_auth_on.py
1
1233
from . import integ_test_base class TestDeployAndEvaluateModelAuthOn(integ_test_base.IntegTestBase): def _get_config_file_name(self) -> str: return "./tests/integration/resources/deploy_and_evaluate_model_auth.conf" def _get_port(self) -> str: return "9009" def test_deploy_and_evaluate_m...
mit
bolkedebruin/airflow
airflow/executors/executor_loader.py
1
3573
# 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
rg3/youtube-dl
youtube_dl/extractor/srmediathek.py
53
2316
# coding: utf-8 from __future__ import unicode_literals from .ard import ARDMediathekIE from ..utils import ( ExtractorError, get_element_by_attribute, ) class SRMediathekIE(ARDMediathekIE): IE_NAME = 'sr:mediathek' IE_DESC = 'Saarländischer Rundfunk' _VALID_URL = r'https?://sr-mediathek(?:\.sr-o...
unlicense
zamattiac/osf.io
admin_tests/metrics/test_utils.py
11
6284
from nose import tools as nt from datetime import timedelta, datetime from tests.base import AdminTestCase from tests.factories import ( AuthUserFactory, NodeFactory, ProjectFactory, RegistrationFactory ) from website.project.model import Node, User from framework.auth import Auth from admin.metrics.utils import...
apache-2.0
pdelsante/thug
thug/DOM/History.py
1
3513
#!/usr/bin/env python # # History.py # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; w...
gpl-2.0
guewen/odoo
addons/google_calendar/__openerp__.py
21
1598
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2012 OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
alexproca/askbot-devel
askbot/migrations/0165_update_thread_search.py
14
35446
# -*- coding: utf-8 -*- import askbot import datetime import os.path from south.db import db from south.v2 import DataMigration from django.db import models from askbot.search import postgresql class Migration(DataMigration): def forwards(self, orm): "Write your forwards methods here." db_engine_n...
gpl-3.0
haeusser/tensorflow
tensorflow/python/ops/sparse_ops.py
21
65964
# 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
pypa/setuptools
setuptools/extension.py
6
1684
import re import functools import distutils.core import distutils.errors import distutils.extension from .monkey import get_unpatched def _have_cython(): """ Return True if Cython can be imported. """ cython_impl = 'Cython.Distutils.build_ext' try: # from (cython_impl) import build_ext ...
mit
mrhanky17/irc3
irc3/_rfc.py
2
39293
class retcode(int): name = None re = None RPL_TRACELINK = retcode(200) RPL_TRACELINK.name = "RPL_TRACELINK" RPL_TRACELINK.re = ( "^:(?P<srv>\S+) 200 (?P<me>\S+) " "(?P<next_server>\S+)") RPL_TRACELINK.tpl = ( ':{c.srv} 200 {c.nick} ' '{next_server}') RPL_TRACELINK.params = ['srv', 'me', 'next_...
mit
ky822/scikit-learn
sklearn/utils/metaestimators.py
283
2353
"""Utilities for meta-estimators""" # Author: Joel Nothman # Andreas Mueller # Licence: BSD from operator import attrgetter from functools import update_wrapper __all__ = ['if_delegate_has_method'] class _IffHasAttrDescriptor(object): """Implements a conditional property using the descriptor protocol. ...
bsd-3-clause
Euphoria-OS-Legacy/android_external_skia
platform_tools/android/tests/ordered_set_tests.py
145
2880
#!/usr/bin/python # Copyright 2014 Google Inc. # # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Test OrderedSet. """ import sys import test_variables import unittest sys.path.append(test_variables.GYP_GEN_DIR) from vars_dict_lib import OrderedSet def cre...
bsd-3-clause
ehashman/oh-mainline
vendor/packages/docutils/test/test_transforms/test_target_notes.py
19
2301
#! /usr/bin/env python # $Id: test_target_notes.py 4564 2006-05-21 20:44:42Z wiemann $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ Tests for `docutils.transforms.references.TargetNotes` (via `docutils.transforms.universal.LastReaderPending`). """ fr...
agpl-3.0
sonaht/ansible
lib/ansible/modules/cloud/vmware/vmware_vm_shell.py
65
6605
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, 2016 Ritesh Khadgaray <khadgaray () 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...
gpl-3.0
theseyi/WhereHows
wherehows-etl/src/main/resources/jython/requests/packages/urllib3/util/url.py
713
5879
from __future__ import absolute_import from collections import namedtuple from ..exceptions import LocationParseError url_attrs = ['scheme', 'auth', 'host', 'port', 'path', 'query', 'fragment'] class Url(namedtuple('Url', url_attrs)): """ Datastructure for representing an HTTP URL. Used as a return value f...
apache-2.0
GoogleCloudPlatform/professional-services
tools/hive-bigquery/hive_to_bigquery/mysql_component.py
2
11109
# Copyright 2019 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 w...
apache-2.0
chouseknecht/ansible
test/units/modules/network/f5/test_bigiq_application_fastl4_udp.py
21
7808
# -*- coding: utf-8 -*- # # Copyright: (c) 2017, F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os import json import pytest import sys if sys.version_info < (2...
gpl-3.0
DLR-SC/DataFinder
src/datafinder/gui/user/common/widget/property/editors/list_editor.py
1
14838
# # $Filename$ # $Authors$ # Last Changed: $Date$ $Committer$ $Revision-Id$ # # Copyright (c) 2003-2011, German Aerospace Center (DLR) # All rights reserved. # # #Redistribution and use in source and binary forms, with or without #modification, are permitted provided that the following conditions are #met: ...
bsd-3-clause
laperry1/android_external_chromium_org
chrome/browser/resources/chromeos/chromevox/tools/generate_test_messages.py
62
1237
#!/usr/bin/env python # 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. '''Generates test_messages.js from an extension message json file.''' import optparse import sys def Die(message): '''Prints an er...
bsd-3-clause
mano3m/CouchPotatoServer
libs/sqlalchemy/engine/ddl.py
35
7176
# engine/ddl.py # Copyright (C) 2009-2011 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Routines to handle CREATE/DROP workflow.""" from sqlalchemy import engine, schema fr...
gpl-3.0
chripell/pyasicam
view.py
1
8948
#!/usr/bin/python3 import datetime import os import pyasicam as pc import sys import numpy as np import cairo import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk, GdkPixbuf, GLib, Gdk, Gio, GObject def gamma_stretch(im, gamma): if im.dtype != np.float: im = im.astype(np.float) i...
gpl-3.0
lynus/hadoop-over-rdma
src/contrib/hod/hodlib/Hod/hod.py
182
29420
#Licensed to the Apache Software Foundation (ASF) under one #or more contributor license agreements. See the NOTICE file #distributed with this work for additional information #regarding copyright ownership. The ASF licenses this file #to you under the Apache License, Version 2.0 (the #"License"); you may not use thi...
apache-2.0
philippjfr/bokeh
bokeh/sphinxext/bokeh_github.py
10
4909
''' Simplify linking to Bokeh Github resources. This module proved four new roles that can be uses to easily link to various resources in the Bokeh Github repository: ``:bokeh-commit:`` : link to a specific commit ``:bokeh-issue:`` : link to an issue ``:bokeh-pull:`` : link to a pull request ``:bokeh-tree:`` : (ve...
bsd-3-clause
delighted/phantomjs
src/qt/qtwebkit/Source/ThirdParty/gtest/scripts/fuse_gtest_files.py
314
8813
#!/usr/bin/env python # # Copyright 2009, 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...
bsd-3-clause
livioferrante/my-final-project
.mywaflib/waflib/extras/boost.py
1
13891
#!/usr/bin/env python # encoding: utf-8 # # partially based on boost.py written by Gernot Vormayr # written by Ruediger Sonderfeld <ruediger@c-plusplus.de>, 2008 # modified by Bjoern Michaelsen, 2008 # modified by Luca Fossati, 2008 # rewritten for waf 1.5.1, Thomas Nagy, 2008 # rewritten for waf 1.6.2, Sylvain Rouquet...
bsd-3-clause
diwer/sublimeconfig
Packages/BracketHighlighter/bh_rules.py
2
7452
import ure import bh_plugin from bh_logging import debug, log def exclude_bracket(enabled, filter_type, language_list, language): """ Exclude or include brackets based on filter lists. """ exclude = True if enabled: # Black list languages if filter_type == 'blacklist': ...
mit
elitak/pexpect
tests/platform_tests/test.py
3
2094
#!/usr/bin/env python import signal, os, time, errno, pty def signal_handler (signum, frame): print 'Signal handler called with signal:', signum print 'signal.SIGCHLD=', signal.SIGKILL # First thing we do is set up a handler for SIGCHLD. signal.signal (signal.SIGCHLD, signal.SIG_IGN) print 'PART 1 -- Test si...
mit
neonmaccca/theHarvester
discovery/googleCSE.py
23
3546
import string import httplib import sys import myparser import re import time class search_googleCSE: def __init__(self, word, limit, start): self.word = word self.files = "pdf" self.results = "" self.totalresults = "" self.server = "www.googleapis.com" self.hostna...
gpl-2.0
bruderstein/PythonScript
PythonLib/full/encodings/iso8859_15.py
272
13212
""" Python Character Mapping Codec iso8859_15 generated from 'MAPPINGS/ISO8859/8859-15.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...
gpl-2.0
jaap-karssenberg/zim-desktop-wiki
tests/operations.py
1
4550
# Copyright 2017 Jaap Karssenberg <jaap.karssenberg@gmail.com> import tests from gi.repository import Gtk from zim.notebook.operations import * class MockProgressDialog(object): def __init__(self, parent, operation): # self.heading.set_text(operation.msg) operation.connect('step', self.on_iteration_step) ...
gpl-2.0
mpetyx/heroku-buildpack-couchbase-geo-django
vendor/pip-1.3.1/pip/vcs/subversion.py
63
10620
import os import re from pip.backwardcompat import urlparse from pip import InstallationError from pip.index import Link from pip.util import rmtree, display_path, call_subprocess from pip.log import logger from pip.vcs import vcs, VersionControl _svn_xml_url_re = re.compile('url="([^"]+)"') _svn_rev_re = re.compile('...
mit
dgoedkoop/QGIS
python/plugins/processing/algs/qgis/SingleSidedBuffer.py
12
4922
# -*- coding: utf-8 -*- """ *************************************************************************** SingleSidedBuffer.py -------------------- Date : August 2016 Copyright : (C) 2016 by Nyall Dawson Email : nyall dot dawson at gmail dot com *************...
gpl-2.0
therandomcode/WikiWriter
lib/requests/packages/chardet/langhebrewmodel.py
2763
11318
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Simon Montagu # Portions created by the Initial Developer are Copyright (C) 2005 # the Initial Developer. All Rights Reserved...
apache-2.0
10clouds/edx-platform
lms/djangoapps/discussion_api/tests/utils.py
4
13936
""" Discussion API test utilities """ import json import re import httpretty def _get_thread_callback(thread_data): """ Get a callback function that will return POST/PUT data overridden by response_overrides. """ def callback(request, _uri, headers): """ Simulate the thread creati...
agpl-3.0
datakortet/django-cms
cms/test_utils/project/placeholderapp/admin.py
5
2959
from cms.admin.placeholderadmin import PlaceholderAdmin from cms.test_utils.project.placeholderapp.models import (Example1, Example2, Example3, Example4, Example5, MultilingualExample1) from django.contrib import admin from hvad.admin import TranslatableAdmin class MixinAdmin(admin.ModelAdmin): def formfield_...
bsd-3-clause
garyjyao1/ansible
lib/ansible/plugins/connection/accelerate.py
8
13413
# (c) 2012, 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) any lat...
gpl-3.0
twiest/openshift-tools
openshift/installer/vendored/openshift-ansible-3.5.91/roles/lib_openshift/library/oc_atomic_container.py
19
6966
#!/usr/bin/env python # pylint: disable=missing-docstring # flake8: noqa: T001 # ___ ___ _ _ ___ ___ _ _____ ___ ___ # / __| __| \| | __| _ \ /_\_ _| __| \ # | (_ | _|| .` | _|| / / _ \| | | _|| |) | # \___|___|_|\_|___|_|_\/_/_\_\_|_|___|___/_ _____ # | \ / _ \ | \| |/ _ \_ _| | __| \_ ...
apache-2.0
lawzou/shoop
shoop/notify/template.py
6
3002
# -*- coding: utf-8 -*- # This file is part of Shoop. # # Copyright (c) 2012-2015, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals from django.utils.encoding import f...
agpl-3.0
GodBlessPP/w16b_test
static/Brython3.1.1-20150328-091302/Lib/multiprocessing/util.py
696
9917
# # Module providing various facilities to other parts of the package # # multiprocessing/util.py # # Copyright (c) 2006-2008, R Oudkerk # Licensed to PSF under a Contributor Agreement. # import sys import functools import os import itertools import weakref import atexit import threading # we want threading to ...
agpl-3.0
Arkapravo/morse-0.6
src/morse/actuators/destination.py
1
3226
import logging; logger = logging.getLogger("morse." + __name__) import morse.core.actuator from morse.helpers.components import add_data, add_property class DestinationActuatorClass(morse.core.actuator.MorseActuatorClass): """ Destination motion controller This controller will receive a destination point and ...
bsd-3-clause
garbled1/ansible
lib/ansible/modules/network/ios/ios_banner.py
22
5315
#!/usr/bin/python # # 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 distribut...
gpl-3.0
Nitaco/ansible
test/units/modules/network/dellos9/test_dellos9_command.py
46
4289
# (c) 2016 Red Hat Inc. # # (c) 2017 Dell EMC. # # 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 vers...
gpl-3.0
igemsoftware/SYSU-Software2013
project/Python27_32/Lib/test/test_contextlib.py
125
9103
"""Unit tests for contextlib.py, and other context managers.""" import sys import tempfile import unittest from contextlib import * # Tests __all__ from test import test_support try: import threading except ImportError: threading = None class ContextManagerTestCase(unittest.TestCase): def test_contextm...
mit
cpcloud/ibis
ibis/pandas/execution/tests/test_structs.py
1
2175
from collections import OrderedDict import pandas as pd import pandas.util.testing as tm import pytest import ibis import ibis.expr.datatypes as dt @pytest.fixture(scope="module") def value(): return OrderedDict([("fruit", "pear"), ("weight", 0)]) @pytest.fixture(scope="module") def struct_client(value): ...
apache-2.0
andrius-preimantas/odoo
openerp/tools/float_utils.py
151
9267
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2011 OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GN...
agpl-3.0
davidvon/pipa-pay-server
site-packages/pip/_vendor/requests/packages/chardet/mbcsgroupprober.py
2769
1967
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
apache-2.0
radinformatics/whatisit
whatisit/apps/wordfish/storage.py
1
2207
from django.core.files.storage import FileSystemStorage from django.core.files.move import file_move_safe from django.contrib.auth.models import User from django.apps import apps from fnmatch import fnmatch from whatisit.settings import ( MEDIA_ROOT, MEDIA_URL ) import errno import itertools import os import...
mit
yyu168/linux
tools/testing/selftests/bpf/tcp_server.py
61
1778
#!/usr/bin/env python2 # # SPDX-License-Identifier: GPL-2.0 # import sys, os, os.path, getopt import socket, time import subprocess import select def read(sock, n): buf = '' while len(buf) < n: rem = n - len(buf) try: s = sock.recv(rem) except (socket.error), e: return '' buf +...
gpl-2.0
blue-yonder/pyscaffold
tests/test_api.py
1
8054
# -*- coding: utf-8 -*- from os.path import exists as path_exists from os.path import getmtime import pytest from pyscaffold import templates from pyscaffold.api import ( Extension, create_project, discover_actions, get_default_options, helpers, verify_project_dir, ) from pyscaffold.exceptions...
mit
gwpy/vet
gwvet/metric/__init__.py
1
1693
# coding=utf-8 # Copyright (C) Duncan Macleod (2014) # # This file is part of GWVeto. # # GWVeto 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...
gpl-3.0
dwightgunning/django
django/test/client.py
132
26745
from __future__ import unicode_literals import json import mimetypes import os import re import sys from copy import copy from importlib import import_module from io import BytesIO from django.apps import apps from django.conf import settings from django.core import urlresolvers from django.core.handlers.base import ...
bsd-3-clause
chriha/GistTerminal
helpers.py
1
2293
#!/usr/bin/python # -*- coding: utf-8 -*- from contextlib import contextmanager import os import re import sys import tempfile # see http://en.wikipedia.org/wiki/ANSI_escape_code for more ANSI escape codes class textColors( object ): grey = '37m' white = '97m' cyan = '36m' lightcy...
mit
bwrsandman/OpenUpgrade
addons/stock_dropshipping/wizard/__init__.py
313
1077
# -*- 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
mkrupcale/ansible
lib/ansible/modules/network/eos/eos_config.py
25
12504
#!/usr/bin/python # # 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 distribut...
gpl-3.0
kernel-sanders/arsenic-mobile
Dependencies/zope.interface-4.0.5/src/zope/interface/document.py
30
3456
############################################################################## # # Copyright (c) 2001, 2002 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # TH...
gpl-3.0
edx/edx-platform
lms/djangoapps/ccx/tests/test_tasks.py
4
3442
""" Tests for celery tasks defined in tasks module """ import contextlib from unittest import mock from ccx_keys.locator import CCXLocator from common.djangoapps.student.roles import CourseCcxCoachRole from common.djangoapps.student.tests.factories import AdminFactory from lms.djangoapps.ccx.tasks import send_ccx_c...
agpl-3.0
lucasa/landell_gst-gengui
sltv/gstmanager/sbinmanager.py
2
1441
#!/usr/bin/env python # -*- coding: utf-8 -*- import logging logger = logging.getLogger('sbinmanager') class SBinManager(object): def __init__(self): self.pipeline_desc = "" self.check_for_compat = True def add_sbin(self, element): if self.check_for_compat and element.type.find("sourc...
gpl-2.0
flyher/pymo
symbian/PythonForS60_1.9.6/module-repo/standard-modules/encodings/cp1258.py
593
13620
""" Python Character Mapping Codec cp1258 generated from 'MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1258.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,in...
mit
usmschuck/canvas
vendor/bundle/ruby/1.9.1/gems/pygments.rb-0.5.0/vendor/pygments-main/pygments/lexers/_asybuiltins.py
369
27319
# -*- coding: utf-8 -*- """ pygments.lexers._asybuiltins ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This file contains the asy-function names and asy-variable names of Asymptote. Do not edit the ASYFUNCNAME and ASYVARNAME sets by hand. TODO: perl/python script in Asymptote SVN similar to asy-list.pl but onl...
agpl-3.0
SummerLW/Perf-Insight-Report
third_party/gsutil/third_party/boto/boto/sqs/__init__.py
129
1705
# Copyright (c) 2006-2012 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...
bsd-3-clause
andrewyoung1991/abjad
abjad/tools/abctools/AbjadObject.py
1
3350
# -*- encoding: utf-8 -*- import abc AbstractBase = abc.ABCMeta( 'AbstractBase', (), { '__metaclass__': abc.ABCMeta, '__module__': __name__, '__slots__': (), }, ) class AbjadObject(AbstractBase): '''Abstract base class from which many custom classes inherit. '...
gpl-3.0
alebcay/namebench
libnamebench/charts_test.py
175
5898
#!/usr/bin/env python # Copyright 2009 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
EmreAtes/spack
lib/spack/llnl/util/filesystem.py
2
34246
############################################################################## # 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
rhdedgar/openshift-tools
openshift/installer/vendored/openshift-ansible-3.6.173.0.27/roles/lib_openshift/library/oc_route.py
6
63067
#!/usr/bin/env python # pylint: disable=missing-docstring # flake8: noqa: T001 # ___ ___ _ _ ___ ___ _ _____ ___ ___ # / __| __| \| | __| _ \ /_\_ _| __| \ # | (_ | _|| .` | _|| / / _ \| | | _|| |) | # \___|___|_|\_|___|_|_\/_/_\_\_|_|___|___/_ _____ # | \ / _ \ | \| |/ _ \_ _| | __| \_ ...
apache-2.0
ISN-LYSTCHA17/glowing-invention
personnalize.py
1
2940
# import drawing lib import pygame # pygame constants as events' constants from pygame.locals import * # game constants from constants import * from buttonwimage import ButtonWImage import glob import os import textentry from button import Button import shutil class Personnalize: def __init__(self,...
gpl-3.0
MiltosD/CEFELRC
lib/python2.7/site-packages/dateutil/easter.py
291
2633
""" Copyright (c) 2003-2007 Gustavo Niemeyer <gustavo@niemeyer.net> This module offers extensions to the standard python 2.3+ datetime module. """ __author__ = "Gustavo Niemeyer <gustavo@niemeyer.net>" __license__ = "PSF License" import datetime __all__ = ["easter", "EASTER_JULIAN", "EASTER_ORTHODOX", "EASTER_WESTE...
bsd-3-clause
gooddata/openstack-nova
nova/tests/unit/conf/test_neutron.py
6
1171
# Copyright 2018 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
apache-2.0
eteamin/spell_checker_web_api
scwapi/model/__init__.py
1
2402
# -*- coding: utf-8 -*- """The application's model objects""" from zope.sqlalchemy import ZopeTransactionExtension from sqlalchemy.orm import scoped_session, sessionmaker from sqlalchemy.ext.declarative import declarative_base # Global session manager: DBSession() returns the Thread-local # session object appropriate...
gpl-3.0
m00re/ns-3-stdma
sources/src/netanim/bindings/modulegen__gcc_LP64.py
354
264513
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
gpl-2.0
rbheromax/android_kernel_htc_a11
tools/perf/scripts/python/sctop.py
11180
1924
# system call top # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Periodically displays system-wide system call totals, broken down by # syscall. If a [comm] arg is specified, only syscalls called by # [comm] are displayed. If an [interval] arg is specified,...
gpl-2.0
LUTAN/tensorflow
tensorflow/python/util/decorator_utils_test.py
139
4197
# 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
thnee/ansible
lib/ansible/modules/cloud/cloudstack/cs_instance_nic.py
13
7635
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2017, Marc-Aurèle Brothier @marcaurele # (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 ANSIBL...
gpl-3.0
haowu80s/spark
examples/src/main/python/mllib/recommendation_example.py
3
2066
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
apache-2.0
sirchia/CouchPotatoServer
libs/requests/sessions.py
31
9484
# -*- coding: utf-8 -*- """ requests.session ~~~~~~~~~~~~~~~~ This module provides a Session object to manage and persist settings across requests (cookies, auth, proxies). """ from .defaults import defaults from .models import Request from .hooks import dispatch_hook from .utils import header_expand from .packages...
gpl-3.0
gnulinooks/sympy
sympy/thirdparty/pyglet/pyglet/font/carbon.py
4
12954
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2007 Alex Holkner # 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
cysuncn/python
spark/crm/PROC_M_MID_PER_ASSETS.py
1
3335
#coding=UTF-8 from pyspark import SparkContext, SparkConf, SQLContext, Row, HiveContext from pyspark.sql.types import * from datetime import date, datetime, timedelta import sys, re, os st = datetime.now() conf = SparkConf().setAppName('PROC_M_MID_PER_ASSETS').setMaster(sys.argv[2]) sc = SparkContext(conf = conf) sc.s...
gpl-3.0
rocio/rethinkdb
bench/serializer-bench/clean_bench.py
5
3954
#!/usr/bin/env python # Copyright 2010-2012 RethinkDB, all rights reserved. import subprocess, stat, os, re, time def format_args(d): """Formats a dictionary of key-value pairs into a list of arguments of the form ['--KEY1', 'VALUE1', '--KEY2', 'VALUE2', ...] suitable for passing to the subprocess module.""" ...
agpl-3.0
evanthebouncy/nnhmm
uai_sushi/script_test_sort.py
1
1245
from model import * from draw import * from naive_baseline import * from quicksort import * # ------------- helpers -------------- def get_id_map(start_sort, truth): ret = dict(zip(start_sort, truth)) return ret def pred_acc(preds, qry): num_cor = 0 ...
mit
rds0751/colinkers
env/Lib/encodings/iso8859_5.py
272
13015
""" Python Character Mapping Codec iso8859_5 generated from 'MAPPINGS/ISO8859/8859-5.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='...
agpl-3.0
llhe/tensorflow
tensorflow/tensorboard/backend/http_util.py
7
5714
# 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
54shady/android-iw-libnl3
python/doc/conf.py
30
7141
# -*- coding: utf-8 -*- # # libnl-python documentation build configuration file, created by # sphinx-quickstart on Mon May 9 10:58:58 2011. # # 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. # ...
lgpl-2.1
ionrock/compose
compose/cli/multiplexer.py
21
1323
from __future__ import absolute_import from threading import Thread try: from Queue import Queue, Empty except ImportError: from queue import Queue, Empty # Python 3.x STOP = object() class Multiplexer(object): """ Create a single iterator from several iterators by running all of them in paral...
apache-2.0
tochange/ueditor
_test/tools/lib/jshunter_1.2.0.1/jshunter_dev/jshunter/hint.py
28
13510
#!/usr/bin/python #encoding=utf-8 import sys,os import ConfigParser import commands import time import codecs htmlMap = {} def processHtml(filename): f = open(filename,"r") if f is None: raise Exception('open %s error!' % (filename)) newName = os.sep.join(os.path.abspath(__file__).split(os.sep)[:-1]) + os.sep + "...
mit
gurneyalex/OpenUpgrade
addons/web_analytics/__openerp__.py
62
1409
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-2012 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
petermat/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/config/urls.py
117
3095
# 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...
bsd-3-clause
cGVuaXM/botcnt
PYodbcutils.py
1
2151
#https://github.com/mkleehammer/pyodbc/wiki/ import os import re import logging import pyodbc from openpyxl import Workbook from openpyxl.styles import Font class SQLserver: def __init__(self, params, autocommit=False, searchescape=None, timeout=None): params_str = r'DRIVER={ODBC Driver 11 for SQL Server};' para...
mit
batxes/4c2vhic
Six_zebra_models/Six_zebra_models_final_output_0.1_-0.1_13000/Six_zebra_models44006.py
4
13925
import _surface import chimera try: import chimera.runCommand except: pass from VolumePath import markerset as ms try: from VolumePath import Marker_Set, Link new_marker_set=Marker_Set except: from VolumePath import volume_path_dialog d= volume_path_dialog(True) new_marker_set= d.new_marker_set marker_set...
gpl-3.0
pdellaert/ansible
lib/ansible/playbook/taggable.py
96
3170
# (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
vitalogy/openbricks
packages/multimedia/freevo/config/local_conf.py
17
61400
# -*- coding: iso-8859-1 -*- # ----------------------------------------------------------------------- # local_conf.py - System configuration # ----------------------------------------------------------------------- # $Id: local_conf.py.example 11525 2009-05-17 13:25:03Z duncan $ # # Notes: # # This file contains your ...
gpl-2.0
pigeonflight/strider-plone
docker/appengine/lib/django-1.5/django/db/backends/postgresql_psycopg2/creation.py
107
4139
import psycopg2.extensions from django.db.backends.creation import BaseDatabaseCreation from django.db.backends.util import truncate_name class DatabaseCreation(BaseDatabaseCreation): # This dictionary maps Field objects to their associated PostgreSQL column # types, as strings. Column-type strings can conta...
mit
tedder/ansible
lib/ansible/modules/network/checkpoint/checkpoint_host.py
7
6023
#!/usr/bin/python # # 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 distribut...
gpl-3.0
fp7-netide/Tools
debugger/Core/debugger.py
1
7289
#!/usr/bin/env python import zmq import sys import time import binascii import argparse import csv #from scapy.utils import wrpcap sys.path.insert(0,'../../../Engine/libraries/netip/python/') sys.path.insert(0,'../../../ryu/ryu/') from netip import * from ofproto import ofproto_parser from ofproto import ofproto_comm...
epl-1.0
IndonesiaX/edx-platform
openedx/core/lib/tests/assertions/events.py
174
9803
"""Assertions related to event validation""" import json import pprint def assert_event_matches(expected, actual, tolerate=None): """ Compare two event dictionaries. Fail if any discrepancies exist, and output the list of all discrepancies. The intent is to produce clearer error messages than "{ som...
agpl-3.0
mationic/pyload
module/lib/jinja2/constants.py
1169
1626
# -*- coding: utf-8 -*- """ jinja.constants ~~~~~~~~~~~~~~~ Various constants. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ #: list of lorem ipsum words used by the lipsum() helper function LOREM_IPSUM_WORDS = u'''\ a ac accumsan ad adipiscing aenean a...
gpl-3.0
mpetyx/palmdrop
venv/lib/python2.7/site-packages/gunicorn/http/body.py
153
7355
# -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. from gunicorn.http.errors import (NoMoreData, ChunkMissingTerminator, InvalidChunkSize) from gunicorn import six class ChunkedReader(object): def __init__(self, req, unreader): ...
apache-2.0
kaarl/pyload
module/plugins/hoster/UptoboxCom.py
2
1495
# -*- coding: utf-8 -*- from module.plugins.internal.XFSHoster import XFSHoster class UptoboxCom(XFSHoster): __name__ = "UptoboxCom" __type__ = "hoster" __version__ = "0.27" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?(uptobox|uptostream)\.com/\w{12}' __config__ = [("ac...
gpl-3.0
stormpath/stormpath-sdk-android
docs/conf.py
2
9336
# -*- coding: utf-8 -*- # # stormpath-sdk-android documentation build configuration file, created by # sphinx-quickstart on Mon Mar 14 10:49:08 2016. # # 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 # autogenerat...
apache-2.0