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
russorat/savage-leads
api/models/lead.py
1
2649
from elasticsearch import Elasticsearch,RequestsHttpConnection,NotFoundError from flask import url_for import config import json class Lead(object): es = Elasticsearch(config.ES_HOSTS,connection_class=RequestsHttpConnection) @staticmethod def create_lead(lead_data): try: results = Lead.es.create(index...
apache-2.0
openstack/dragonflow
dragonflow/tests/unit/test_port_behind_port.py
1
2387
# 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 # d...
apache-2.0
tinkerthaler/odoo
openerp/addons/base/ir/ir_default.py
342
1883
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
agpl-3.0
yosshy/nova
nova/scheduler/filters/image_props_filter.py
58
4622
# Copyright (c) 2011-2012 OpenStack Foundation # Copyright (c) 2012 Canonical Ltd # Copyright (c) 2012 SUSE LINUX Products GmbH # 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 o...
apache-2.0
cloudbau/nova
nova/tests/api/openstack/compute/contrib/test_evacuate.py
3
10062
# Copyright 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 # # Unless required by applicable law or a...
apache-2.0
woggle/mesos-old
frameworks/hadoop-0.20.2/src/contrib/hod/hodlib/HodRing/hodRing.py
64
32427
#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
pombredanne/http-repo.gem5.org-gem5-
src/arch/arm/kvm/ArmV8KvmCPU.py
38
2269
# Copyright (c) 2015 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functionality ...
bsd-3-clause
okwow123/djangol2
example/env/lib/python2.7/site-packages/django/contrib/gis/gdal/__init__.py
52
2169
""" This module houses ctypes interfaces for GDAL objects. The following GDAL objects are supported: CoordTransform: Used for coordinate transformations from one spatial reference system to another. Driver: Wraps an OGR data source driver. DataSource: Wrapper for the OGR data source object, supports OGR-su...
mit
yaroslavvb/tensorflow
tensorflow/python/kernel_tests/random_poisson_test.py
49
7153
# 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
uranusjr/django
tests/migrations/test_autodetector.py
3
114892
import functools import re from unittest import mock from django.apps import apps from django.conf import settings from django.contrib.auth.models import AbstractBaseUser from django.core.validators import RegexValidator, validate_slug from django.db import connection, models from django.db.migrations.autodetector imp...
bsd-3-clause
BeATz-UnKNoWN/python-for-android
python3-alpha/python3-src/Lib/idlelib/IOBinding.py
46
19385
import os import types import sys import codecs import tempfile import tkinter.filedialog as tkFileDialog import tkinter.messagebox as tkMessageBox import re from tkinter import * from tkinter.simpledialog import askstring from idlelib.configHandler import idleConf from codecs import BOM_UTF8 # Try setting the local...
apache-2.0
alexgleith/Quantum-GIS
python/pyplugin_installer/qgsplugininstallerfetchingdialog.py
9
3223
# -*- coding:utf-8 -*- """ /*************************************************************************** qgsplugininstallerfetchingdialog.py Plugin Installer module ------------------- Date : June 2013 Copyright ...
gpl-2.0
KaranToor/MA450
google-cloud-sdk/lib/googlecloudsdk/third_party/apis/runtimeconfig/v1beta1/runtimeconfig_v1beta1_client.py
2
29576
"""Generated client library for runtimeconfig version v1beta1.""" # NOTE: This file is autogenerated and should not be edited by hand. from apitools.base.py import base_api from googlecloudsdk.third_party.apis.runtimeconfig.v1beta1 import runtimeconfig_v1beta1_messages as messages class RuntimeconfigV1beta1(base_api....
apache-2.0
citrix-openstack-build/nova
nova/openstack/common/notifier/rpc_notifier.py
14
1694
# Copyright 2011 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 req...
apache-2.0
Etwigg/Examples
Group Project Website/venv/Lib/site-packages/werkzeug/routing.py
87
66746
# -*- coding: utf-8 -*- """ werkzeug.routing ~~~~~~~~~~~~~~~~ When it comes to combining multiple controller or view functions (however you want to call them) you need a dispatcher. A simple way would be applying regular expression tests on the ``PATH_INFO`` and calling registered callback fun...
mit
LacusCon/hugula
Client/tools/site-packages/PIL/ImageFileIO.py
14
1233
# # The Python Imaging Library. # $Id: ImageFileIO.py 2134 2004-10-06 08:55:20Z fredrik $ # # kludge to get basic ImageFileIO functionality # # History: # 1998-08-06 fl Recreated # # Copyright (c) Secret Labs AB 1998-2002. # # See the README file for information on usage and redistribution. # from StringIO import St...
mit
jaantollander/CrowdDynamics
crowddynamics/core/tests/test_interactions_benchmark.py
1
1239
import numpy as np import pytest from crowddynamics.core.interactions import agent_agent_block_list from crowddynamics.core.vector2D import unit_vector from crowddynamics.simulation.agents import Agents, Circular, ThreeCircle, \ AgentGroup def attributes(): orientation = np.random.uniform(-np.pi, np.pi) ...
gpl-3.0
jiulongzaitian/kubernetes
hack/verify-flags-underscore.py
205
4659
#!/usr/bin/env python # Copyright 2015 The Kubernetes Authors. # # 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 appli...
apache-2.0
myshkov/bnn-analysis
models/bbb_sampler.py
1
4851
""" This module implements Bayes By Backprop -based sampler for NNs. http://jmlr.org/proceedings/papers/v37/blundell15.pdf """ import numpy as np from keras.models import Sequential from keras.layers.core import Activation from keras import backend as K from keras.engine.topology import Layer from sampler import Samp...
mit
MiLk/ansible
lib/ansible/module_utils/netcli.py
87
9650
# 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
nhomar/odoo
addons/report/controllers/main.py
210
6943
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2014-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
agpl-3.0
semonte/intellij-community
plugins/hg4idea/testData/bin/mercurial/mail.py
91
12504
# mail.py - mail sending bits for mercurial # # Copyright 2006 Matt Mackall <mpm@selenic.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. from i18n import _ import util, encoding, sslutil import os, smtplib, socket, quopri, ti...
apache-2.0
staticsan/light-layers
requests/packages/oauthlib/oauth1/rfc5849/signature.py
74
20839
# -*- coding: utf-8 -*- from __future__ import absolute_import """ oauthlib.oauth1.rfc5849.signature ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This module represents a direct implementation of `section 3.4`_ of the spec. Terminology: * Client: software interfacing with an OAuth API * Server: the API provider * Resource Ow...
mit
hydrospanner/DForurm
DForurm/env/Lib/site-packages/pip/_vendor/cachecontrol/heuristics.py
490
4141
import calendar import time from email.utils import formatdate, parsedate, parsedate_tz from datetime import datetime, timedelta TIME_FMT = "%a, %d %b %Y %H:%M:%S GMT" def expire_after(delta, date=None): date = date or datetime.now() return date + delta def datetime_to_header(dt): return formatdate(c...
mit
xxvii27/gae-pushtest
bp_includes/lib/captcha.py
30
3056
import urllib2, urllib API_SSL_SERVER="https://www.google.com/recaptcha/api" API_SERVER="http://www.google.com/recaptcha/api" VERIFY_SERVER="www.google.com" class RecaptchaResponse(object): def __init__(self, is_valid, error_code=None): self.is_valid = is_valid self.error_code = error_code def di...
lgpl-3.0
ucoin-bot/cutecoin
lib/ucoinpy/documents/peer.py
2
4141
''' Created on 2 déc. 2014 @author: inso ''' import re from ..api.bma import ConnectionHandler from . import Document from .. import PROTOCOL_VERSION, MANAGED_API class Peer(Document): """ Version: VERSION Type: Peer Currency: CURRENCY_NAME PublicKey: NODE_PUBLICKEY Block: BLOCK Endpoin...
mit
40223137/2015abc
static/Brython3.1.1-20150328-091302/Lib/unittest/suite.py
748
9715
"""TestSuite""" import sys from . import case from . import util __unittest = True def _call_if_exists(parent, attr): func = getattr(parent, attr, lambda: None) func() class BaseTestSuite(object): """A simple test suite that doesn't provide class or module shared fixtures. """ def __init__(se...
gpl-3.0
felixbr/nosql-rest-preprocessor
nosql_rest_preprocessor/models.py
1
5131
from __future__ import absolute_import, unicode_literals, print_function, division from nosql_rest_preprocessor import exceptions from nosql_rest_preprocessor.utils import non_mutating class BaseModel(object): required_attributes = set() optional_attributes = None immutable_attributes = set() priv...
mit
olt/mapproxy
mapproxy/test/system/test_arcgis.py
2
5409
# This file is part of the MapProxy project. # Copyright (C) 2010 Omniscale <http://omniscale.de> # # 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...
apache-2.0
juliakreger/bifrost
playbooks/library/os_ironic_node.py
1
12262
#!/usr/bin/python # coding: utf-8 -*- # (c) 2015, Hewlett-Packard Development Company, L.P. # # 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 Free Software Foundation, either version 3 of the License, or # (at your optio...
apache-2.0
FNCS/ns-3.24
src/visualizer/visualizer/plugins/olsr.py
182
3935
import gtk import ns.core import ns.network import ns.internet import ns.olsr from visualizer.base import InformationWindow class ShowOlsrRoutingTable(InformationWindow): ( COLUMN_DESTINATION, COLUMN_NEXT_HOP, COLUMN_INTERFACE, COLUMN_NUM_HOPS, ) = range(4) def __init...
gpl-2.0
fisele/slimta-abusix
slimta/policy/__init__.py
2
4631
# Copyright (c) 2012 Ian C. Good # # 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, distrib...
mit
rmfitzpatrick/ansible
lib/ansible/modules/cloud/profitbricks/profitbricks.py
26
21868
#!/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
jorik041/scikit-learn
sklearn/tests/test_common.py
127
7665
""" General tests for all estimators in sklearn. """ # Authors: Andreas Mueller <amueller@ais.uni-bonn.de> # Gael Varoquaux gael.varoquaux@normalesup.org # License: BSD 3 clause from __future__ import print_function import os import warnings import sys import pkgutil from sklearn.externals.six import PY3 fr...
bsd-3-clause
surgebiswas/poker
PokerBots_2017/Johnny/numpy/f2py/tests/util.py
66
9351
""" Utility functions for - building and importing modules on test time, using a temporary location - detecting if compilers are present """ from __future__ import division, absolute_import, print_function import os import sys import subprocess import tempfile import shutil import atexit import textwrap import re im...
mit
hongbin/magnum
magnum/common/pythonk8sclient/client/models/V1beta3_EnvVar.py
15
1575
#!/usr/bin/env python """ Copyright 2015 Reverb Technologies, 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 require...
apache-2.0
les69/calvin-base
calvin/runtime/north/portmanager.py
2
37414
# -*- coding: utf-8 -*- # Copyright (c) 2015 Ericsson AB # # 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
BetterWorks/pysaml2
src/saml2/client.py
1
42487
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2009-2011 Umeå University # # 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...
bsd-2-clause
chouseknecht/ansible
lib/ansible/modules/storage/netapp/netapp_e_amg_role.py
52
7909
#!/usr/bin/python # (c) 2016, NetApp, 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
dimecoinco/Dimecoin-1.5a
contrib/bitrpc/bitrpc.py
2348
7835
from jsonrpc import ServiceProxy import sys import string # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "" rpcpass = "" # ====== END USER SETTINGS ====== if rpcpass == "": access = ServiceProxy("http://127.0.0.1:8332") else: access = Ser...
mit
Distrotech/mercurial
tests/test-walkrepo.py
5
1874
import os from mercurial import hg, ui from mercurial.scmutil import walkrepos from mercurial.util import checklink from os import mkdir, chdir from os.path import join as pjoin u = ui.ui() sym = checklink('.') hg.repository(u, 'top1', create=1) mkdir('subdir') chdir('subdir') hg.repository(u, 'sub1', create=1) mkdir...
gpl-2.0
MarkTheF4rth/youtube-dl
youtube_dl/extractor/comedycentral.py
23
11797
from __future__ import unicode_literals import re from .mtv import MTVServicesInfoExtractor from ..compat import ( compat_str, compat_urllib_parse, ) from ..utils import ( ExtractorError, float_or_none, unified_strdate, ) class ComedyCentralIE(MTVServicesInfoExtractor): _VALID_URL = r'''(?x)...
unlicense
AgostonSzepessy/servo
tests/wpt/web-platform-tests/tools/pywebsocket/src/test/testdata/handlers/blank_wsh.py
499
1557
# 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 of conditions and the f...
mpl-2.0
Anonymous-X6/django
django/db/backends/postgresql/version.py
632
1517
""" Extracts the version of the PostgreSQL server. """ import re # This reg-exp is intentionally fairly flexible here. # Needs to be able to handle stuff like: # PostgreSQL #.#.# # EnterpriseDB #.# # PostgreSQL #.# beta# # PostgreSQL #.#beta# VERSION_RE = re.compile(r'\S+ (\d+)\.(\d+)\.?(\d+)?') def _parse_...
bsd-3-clause
cosurgi/trunk
examples/test/test_Ip2_FrictMat_CpmMat_FrictPhys.py
10
1264
from yade import * from yade import plot,qt import sys young=25e9 poisson=.2 sigmaT=3e6 frictionAngle=atan(1) density=4800 ## 4800 # twice the density, since porosity is about .5 (.62) epsCrackOnset=1e-4 relDuctility=300 intRadius=1.5 concMat = O.materials.append(CpmMat(young=young,poisson=poisson,density=4800,sig...
gpl-2.0
raj-zealous/DrupalProject
sites/all/modules/contrib/proj4js/lib/proj4js/tools/jsmin.py
513
7471
#!/usr/bin/python # This code is original from jsmin by Douglas Crockford, it was translated to # Python by Baruch Even. The original code had the following copyright and # license. # # /* jsmin.c # 2007-01-08 # # Copyright (c) 2002 Douglas Crockford (www.crockford.com) # # Permission is hereby granted, free of ch...
gpl-2.0
NeCTAR-RC/cinder
cinder/tests/db/fakes.py
43
1389
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2010 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 # # ...
apache-2.0
kailIII/emaresa
trunk.pe/report_aeroo/wizard/report_actions_remove.py
5
4658
############################################################################## # # Copyright (c) 2008-2011 Alistek Ltd (http://www.alistek.com) All Rights Reserved. # General contacts <info@alistek.com> # # WARNING: This program as such is intended to be used by professional # programmers who take th...
agpl-3.0
math-a3k/django-ai
tests/test_models/migrations/0011_add_is_inferred_and_minor_tweaks.py
1
2196
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-12-20 15:34 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('test_models', '0010_myunsupervisedlearningtechnique'), ] operations = [ mig...
lgpl-3.0
minhtuancn/odoo
addons/hr_timesheet_sheet/__init__.py
434
1127
# -*- 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...
agpl-3.0
SiddheshK15/android_kernel_cyanogen_msm8916
scripts/rt-tester/rt-tester.py
11005
5307
#!/usr/bin/python # # rt-mutex tester # # (C) 2006 Thomas Gleixner <tglx@linutronix.de> # # 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. # import os import sys import getopt import sh...
gpl-2.0
Makeystreet/makeystreet
woot/apps/catalog/views/review.py
1
5983
from django.conf import settings from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect, Http404 from django.shortcuts import render from django.utils import timezone from woot.apps.catalog.forms import CreateProductReviewForm,\ CreateShopReviewForm, CreateSpaceReviewForm from wo...
apache-2.0
ar7z1/ansible
lib/ansible/modules/remote_management/oneview/oneview_network_set.py
146
5167
#!/usr/bin/python # Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP # 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
semplea/characters-meta
python/alchemy/examples/alchemy_vision_v1.py
1
1466
import json from os.path import join, dirname from watson_developer_cloud import AlchemyVisionV1 alchemy_vision = AlchemyVisionV1(api_key='c851400276c1acbd020210847f8677e6d1577c26') # Face recognition with open(join(dirname(__file__), '../resources/face.jpg'), 'rb') as image_file: print(json.dumps(alchemy_vision...
mit
scw/ansible
lib/ansible/galaxy/api.py
82
5143
#!/usr/bin/env python ######################################################################## # # (C) 2013, James Cammarata <jcammarata@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 ...
gpl-3.0
heke123/chromium-crosswalk
tools/chrome_proxy/common/chrome_proxy_measurements.py
5
4301
# 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. import base64 import logging from common import chrome_proxy_metrics as metrics from telemetry.core import exceptions from telemetry.page import page_test ...
bsd-3-clause
mmclenna/engine
sky/tools/create_ios_sdk.py
1
1820
#!/usr/bin/env python # Copyright 2016 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 argparse import subprocess import shutil import sys import os def main(): parser = argparse.ArgumentParser(description='Crea...
bsd-3-clause
gpg/gpgme
lang/python/tests/final.py
1
1048
#!/usr/bin/env python # Copyright (C) 2016 g10 Code GmbH # # This file is part of GPGME. # # GPGME 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 la...
lgpl-2.1
nkhuyu/airflow
airflow/migrations/versions/1507a7289a2f_create_is_encrypted.py
37
1408
"""create is_encrypted Revision ID: 1507a7289a2f Revises: e3a246e0dc1 Create Date: 2015-08-18 18:57:51.927315 """ # revision identifiers, used by Alembic. revision = '1507a7289a2f' down_revision = 'e3a246e0dc1' branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa from sqlalchemy.eng...
apache-2.0
campbe13/openhatch
vendor/packages/amqp/amqp/basic_message.py
38
3954
"""Messages for AMQP""" # Copyright (C) 2007-2008 Barry Pederson <bp@barryp.org> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option)...
agpl-3.0
pshen/ansible
lib/ansible/modules/network/eos/eos_facts.py
56
10878
#!/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
calinerd/AWS
LAMBDA/Lambda_AutoUpdate_SecurityGroup_to_Allow_inbound_All_CloudFront_IPs_443.py
1
6268
''' Copyright 2015 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at http://aws.amazon.com/apache2.0/ or in the "license" file accompanying this fil...
unlicense
ftomassetti/intellij-community
python/lib/Lib/ntpath.py
80
16985
# Module 'ntpath' -- common operations on WinNT/Win95 pathnames """Common pathname manipulations, WindowsNT/95 version. Instead of importing this module directly, import os and refer to this module as os.path. """ import os import stat import sys __all__ = ["normcase","isabs","join","splitdrive","split","splitext", ...
apache-2.0
BorisJeremic/Real-ESSI-Examples
analytic_solution/test_cases/Contact/Dynamic_Shear_Behaviour/Frictional_SDOF_With_Damping/c_t_0.1/NonLinHardShear/compare_HDF5_ALL.py
424
3382
#!/usr/bin/python import h5py import sys import numpy as np import os import re import random # find the path to my own python function: cur_dir=os.getcwd() sep='test_cases' test_DIR=cur_dir.split(sep,1)[0] scriptDIR=test_DIR+'compare_function' sys.path.append(scriptDIR) # import my own function for color and comparat...
cc0-1.0
sbidoul/odoo
addons/share/__openerp__.py
250
2317
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2011 OpenERP SA (<http://www.openerp.com>). # # This program is free software: you ...
agpl-3.0
tik0/inkscapeGrid
share/extensions/scour.py
3
110803
#!/usr/bin/env python # -*- coding: utf-8 -*- # Scour # # Copyright 2010 Jeff Schiller # Copyright 2010 Louis Simard # # This file is part of Scour, http://www.codedread.com/scour/ # # This library is free software; you can redistribute it and/or modify # it either under the terms of the Apache License, Versio...
gpl-2.0
mastizada/kuma
vendor/packages/sqlalchemy/test/sql/test_constraints.py
6
15445
from sqlalchemy.test.testing import assert_raises, assert_raises_message from sqlalchemy import * from sqlalchemy import exc, schema from sqlalchemy.test import * from sqlalchemy.test import config, engines from sqlalchemy.engine import ddl from sqlalchemy.test.testing import eq_ from sqlalchemy.test.assertsql import A...
mpl-2.0
klmitch/pbr
pbr/hooks/__init__.py
101
1086
# Copyright 2013 Hewlett-Packard Development Company, L.P. # 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 # # Unles...
apache-2.0
efortuna/AndroidSDKClone
ndk/prebuilt/linux-x86_64/lib/python2.7/textwrap.py
110
17037
"""Text wrapping and filling. """ # Copyright (C) 1999-2001 Gregory P. Ward. # Copyright (C) 2002, 2003 Python Software Foundation. # Written by Greg Ward <gward@python.net> __revision__ = "$Id$" import string, re try: _unicode = unicode except NameError: # If Python is built without Unicode support, the un...
apache-2.0
Xdynix/PixivPixie
bundle_cli.py
1
2691
import os import subprocess import sys from pixiv_pixie.cli import main as cli_main, NAME BINARY_PATH = 'lib' DATA_PATH = 'data' def is_packaged(): # Return true if executing from packaged file return hasattr(sys, 'frozen') def get_path(path, package_prefix=DATA_PATH): if os.path.isabs(path) or not is...
apache-2.0
krichter722/binutils-gdb
gdb/testsuite/gdb.perf/lib/perftest/perftest.py
46
2768
# Copyright (C) 2013-2015 Free Software Foundation, Inc. # 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 progr...
gpl-2.0
frnsys/broca
tests/test_pipeline.py
2
14889
import unittest from broca import Pipe, Pipeline from broca.preprocess import BasicCleaner, HTMLCleaner from broca.tokenize.keyword import OverkillTokenizer, RAKETokenizer class PipelineTests(unittest.TestCase): def setUp(self): self.docs = [ '''In the Before-Time, there was only the Vast Empty. N...
mit
p0psicles/SickRage
lib/github/InputGitAuthor.py
47
2633
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # # Copyright 2012 Zearin <zearin@gonk.net> ...
gpl-3.0
ressu/SickGear
lib/requests/packages/chardet/big5freq.py
3133
82594
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
gpl-3.0
darith27/wagtail
wagtail/tests/testapp/migrations/0005_streampage.py
22
1043
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import wagtail.wagtailcore.fields import wagtail.wagtailcore.blocks import wagtail.wagtailimages.blocks class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0001_squashed_0016_cha...
bsd-3-clause
sohail-aspose/Aspose_Words_Cloud
SDKs/Aspose.Words_Cloud_SDK_for_Python/asposewordscloud/WordsApi.py
4
224530
#!/usr/bin/env python import sys import os import urllib import json import re from models import * from ApiClient import ApiException class WordsApi(object): def __init__(self, apiClient): self.apiClient = apiClient def GetDocumentBookmarkByName(self, name, bookmarkName, **kwargs): """...
mit
jamespcole/home-assistant
homeassistant/components/http/auth.py
8
7249
"""Authentication for HTTP component.""" import base64 import logging from aiohttp import hdrs from aiohttp.web import middleware import jwt from homeassistant.auth.providers import legacy_api_password from homeassistant.auth.util import generate_secret from homeassistant.const import HTTP_HEADER_HA_AUTH from homeass...
apache-2.0
jideobs/twilioAngular
venv/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/lxmletree.py
436
5992
from __future__ import absolute_import, division, unicode_literals from pip._vendor.six import text_type from lxml import etree from ..treebuilders.etree import tag_regexp from . import _base from .. import ihatexml def ensure_str(s): if s is None: return None elif isinstance(s, text_type): ...
mit
apocalypsebg/odoo
addons/lunch/__openerp__.py
267
2542
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2012 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the G...
agpl-3.0
tortugueta/multilayers
examples/radcenter_distribution.py
1
8087
# -*- coding: utf-8 -*- """ Name : radcenter_distribution Author : Joan Juvert <trust.no.one.51@gmail.com> Version : 1.0 Description : This script calculates the influence of the distribution of : radiative centers in the active layer on the observed : spectrum. Copyright 2012 J...
gpl-3.0
linaro-technologies/jobserv
jobserv/storage/local_storage.py
1
3989
# Copyright (C) 2017 Linaro Limited # Author: Andy Doan <andy.doan@linaro.org> import hmac import os import mimetypes import shutil from flask import Blueprint, request, send_file, url_for from jobserv.jsend import get_or_404 from jobserv.models import Build, Project, Run from jobserv.settings import INTERNAL_API_KE...
agpl-3.0
ygenc/onlineLDA
onlineldavb_new/build/scipy/build/lib.macosx-10.6-intel-2.7/scipy/weave/blitz_tools.py
11
4789
import parser import sys import ast_tools import slice_handler import size_check import converters import numpy import copy import inline_tools from inline_tools import attempt_function_call function_catalog = inline_tools.function_catalog function_cache = inline_tools.function_cache def blitz(expr,local_dict=None, ...
gpl-3.0
jadref/buffer_bci
python/echoClient/eventForwarder.py
1
2911
#!/usr/bin/env python3 bufferpath = "../../python/signalProc" fieldtripPath="../../dataAcq/buffer/python" import os, sys, random, math, time, socket, struct sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)),bufferpath)) import bufhelp sys.path.append(os.path.join(os.path.dirname(os.path.abspath(_...
gpl-3.0
attilahorvath/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/port/http_lock_unittest.py
124
5481
# Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Szeged # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above co...
bsd-3-clause
ksh/gpitrainingv2
common/safe_dom.py
13
4961
"""Classes to build sanitized HTML.""" __author__ = 'John Orr (jorr@google.com)' import cgi import re def escape(strg): return cgi.escape(strg, quote=1).replace("'", '&#39;').replace('`', '&#96;') class Node(object): """Base class for the sanitizing module.""" @property def sanitized(self): ...
apache-2.0
elopez/linux
tools/perf/scripts/python/syscall-counts.py
1996
1700
# system call counts # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.path.append(os.envir...
gpl-2.0
AutorestCI/azure-sdk-for-python
azure-mgmt-containerregistry/setup.py
2
2823
#!/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
13xforever/webserver
admin/plugins/evhost.py
5
1821
# -*- coding: utf-8 -*- # # Cheroke-admin # # Authors: # Alvaro Lopez Ortega <alvaro@alobbs.com> # # Copyright (C) 2001-2014 Alvaro Lopez Ortega # # This program is free software; you can redistribute it and/or # modify it under the terms of version 2 of the GNU General Public # License as published by the Free So...
gpl-2.0
MTG/essentia
test/src/unittests/tonal/test_tonicindianartmusic.py
1
7198
#!/usr/bin/env python # Copyright (C) 2006-2021 Music Technology Group - Universitat Pompeu Fabra # # This file is part of Essentia # # Essentia is free software: you can redistribute it and/or modify it under # the terms of the GNU Afextentro General Public License as published by the Free # Software Foundation (FSF...
agpl-3.0
shanot/imp
modules/saxs/test/test_surface.py
1
3121
from __future__ import print_function import IMP import IMP.test import IMP.atom import IMP.core import IMP.saxs import os import time class Tests(IMP.test.TestCase): def test_surface_area(self): """Check protein surface computation""" m = IMP.Model() #! read PDB mp = IMP.atom.re...
gpl-3.0
adamlwgriffiths/Pyglet
experimental/directshow.py
28
1798
#!/usr/bin/python # $Id:$ # Play an audio file with DirectShow. Tested ok with MP3, WMA, MID, WAV, AU. # Caveats: # - Requires a filename (not from memory or stream yet). Looks like we need # to manually implement a filter which provides an output IPin. Lot of # work. # - Theoretically can traverse the graph to...
bsd-3-clause
alianmohammad/pd-gem5-latest
src/arch/mips/MipsISA.py
61
2521
# Copyright (c) 2012 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functionality ...
bsd-3-clause
switchboardOp/ansible
test/units/modules/network/f5/test_bigip_provision.py
47
4904
# -*- coding: utf-8 -*- # # Copyright 2017 F5 Networks 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 # (at your option) a...
gpl-3.0
ozgurakgun/minion
mini-scripts/testallconstraints.py
1
3983
#!/usr/bin/python # Generate two minion input files, run them then compare dumptree outputs to # detect bugs in constraint propagators. import sys, os, getopt from constraint_test_common import * from multiprocessing import Pool, Manager import random #from sendemail import * import time (optargs, other)=getopt.gnu_...
gpl-2.0
Bashar/django
tests/null_fk/models.py
166
1323
""" Regression tests for proper working of ForeignKey(null=True). """ from django.db import models from django.utils.encoding import python_2_unicode_compatible class SystemDetails(models.Model): details = models.TextField() class SystemInfo(models.Model): system_details = models.ForeignKey(SystemDetails) ...
bsd-3-clause
40123112/w17exam
static/Brython3.1.1-20150328-091302/Lib/binascii.py
620
24585
"""A pure Python implementation of binascii. Rather slow and buggy in corner cases. PyPy provides an RPython version too. """ # borrowed from https://bitbucket.org/pypy/pypy/src/f2bf94943a41/lib_pypy/binascii.py class Error(Exception): pass class Done(Exception): pass class Incomplete(Exception): pass ...
agpl-3.0
rabramley/telomere
app/model/batch.py
1
2972
from app import db from sqlalchemy.ext.hybrid import hybrid_property from sqlalchemy.sql import select, func from app.model.outstandingError import OutstandingError import numpy import decimal class Batch(db.Model): id = db.Column(db.Integer, primary_key=True) robot = db.Column(db.String(20)) temperature ...
mit
DarioGT/OMS-PluginXML
org.modelsphere.sms/lib/jython-2.2.1/Lib/uu.py
1
6092
#! /usr/bin/env python # Copyright 1994 by Lance Ellinghouse # Cathedral City, California Republic, United States of America. # All Rights Reserved # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, # ...
gpl-3.0
jhogg41/gm-o-matic
gom_server/gom_server/urls.py
1
1187
"""gom_server URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-...
bsd-2-clause
GitHublong/hue
desktop/core/src/desktop/migrations/0010_auto__add_document2__chg_field_userpreferences_key__chg_field_userpref.py
35
13246
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Document2' db.create_table('desktop_document2', ( ('id', self.gf('django.db.mode...
apache-2.0