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
nishad-jobsglobal/odoo-marriot
addons/product/__init__.py
443
1120
# -*- 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
youscreenit/node-config
node_modules/js-yaml/support/pyyaml-src/events.py
985
2445
# Abstract classes. class Event(object): def __init__(self, start_mark=None, end_mark=None): self.start_mark = start_mark self.end_mark = end_mark def __repr__(self): attributes = [key for key in ['anchor', 'tag', 'implicit', 'value'] if hasattr(self, key)] argu...
mit
fedallah/scrapieweb
scrapietest.py
1
1530
#!/usr/bin/env python import web import time import hashlib sha2 = hashlib.sha256() # db = web.database(dbn='postgres', db='scrapieweb', user='postgres', pw='fuddruckers') # def uservalidate(username): # usernum = db.query("SELECT COUNT(*) FROM auth WHERE username=$uid", vars="username") # return usernum[0] urls...
agpl-3.0
Crassirostris/kubernetes
cluster/juju/layers/kubernetes-worker/lib/charms/kubernetes/flagmanager.py
290
4961
#!/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
krsjoseph/youtube-dl
youtube_dl/extractor/radiode.py
150
1819
from __future__ import unicode_literals from .common import InfoExtractor class RadioDeIE(InfoExtractor): IE_NAME = 'radio.de' _VALID_URL = r'https?://(?P<id>.+?)\.(?:radio\.(?:de|at|fr|pt|es|pl|it)|rad\.io)' _TEST = { 'url': 'http://ndr2.radio.de/', 'info_dict': { 'id': 'ndr2...
unlicense
zooba/PTVS
Python/Product/Miniconda/Miniconda3-x64/Lib/site-packages/win32com/client/makepy.py
10
12411
# Originally written by Curt Hagenlocher, and various bits # and pieces by Mark Hammond (and now Greg Stein has had # a go too :-) # Note that the main worker code has been moved to genpy.py # As this is normally run from the command line, it reparses the code each time. # Now this is nothing more than the command l...
apache-2.0
mcgoddard/widgetr
env/Lib/site-packages/pip/_vendor/requests/packages/chardet/charsetprober.py
3127
1902
######################## 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...
mit
sander76/home-assistant
script/scaffold/docs.py
7
2998
"""Print links to relevant docs.""" from .model import Info DATA = { "config_flow": { "title": "Config Flow", "docs": "https://developers.home-assistant.io/docs/en/config_entries_config_flow_handler.html", }, "config_flow_discovery": { "title": "Discoverable Config Flow", "d...
apache-2.0
jparise/tornado
tornado/test/testing_test.py
144
7361
#!/usr/bin/env python from __future__ import absolute_import, division, print_function, with_statement from tornado import gen, ioloop from tornado.log import app_log from tornado.testing import AsyncTestCase, gen_test, ExpectLog from tornado.test.util import unittest import contextlib import os import traceback @...
apache-2.0
kushalbhola/MyStuff
venv/Lib/site-packages/setuptools/_vendor/pyparsing.py
417
224171
# module pyparsing.py # # Copyright (c) 2003-2016 Paul T. McGuire # # 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, cop...
apache-2.0
BackupGGCode/python-for-android
python-build/python-libs/gdata/samples/webmastertools/AddDeleteExampleDotCom.py
128
3302
#!/usr/bin/python # # Copyright (C) 2008 Yu-Jie Lin # # 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 o...
apache-2.0
xobb1t/ddash2013
apps/accounts/models.py
1
2197
from django.contrib.auth.models import AbstractBaseUser, PermissionsMixin from django.db import models from django.db.models.signals import post_save from django.utils import timezone from django.utils.translation import ugettext_lazy as _ from openid_provider.models import OpenID from .managers import UserManager, A...
mit
petermat/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem.py
118
7138
# Copyright (c) 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 ...
bsd-3-clause
qwertyjune/BethSaidaBible
venv/lib/python2.7/site-packages/django/views/decorators/csrf.py
228
2201
from django.middleware.csrf import CsrfViewMiddleware, get_token from django.utils.decorators import decorator_from_middleware, available_attrs from functools import wraps csrf_protect = decorator_from_middleware(CsrfViewMiddleware) csrf_protect.__name__ = "csrf_protect" csrf_protect.__doc__ = """ This decorator adds ...
gpl-3.0
run2/citytour
4symantec/Lib/site-packages/pip/_vendor/requests/packages/chardet/compat.py
2943
1157
######################## BEGIN LICENSE BLOCK ######################## # Contributor(s): # Ian Cordasco - port to Python # # 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 # versio...
mit
inflrscns/django-wiki
wiki/plugins/notifications/views.py
1
2273
from __future__ import unicode_literals from __future__ import absolute_import from django.contrib import messages from django.contrib.auth.decorators import login_required from django.shortcuts import redirect from django.utils.decorators import method_decorator from django.utils.translation import ugettext as _ from ...
gpl-3.0
fatimatunnura/laravelxm
public/assets/global/plugins/jquery-file-upload/server/gae-python/main.py
245
5845
# -*- coding: utf-8 -*- # # jQuery File Upload Plugin GAE Python Example 2.2.0 # https://github.com/blueimp/jQuery-File-Upload # # Copyright 2011, Sebastian Tschan # https://blueimp.net # # Licensed under the MIT license: # http://www.opensource.org/licenses/MIT # from __future__ import with_statement from google.appe...
mit
gperciva/artifastring
research/impulses/mere-lowpass.py
1
3842
#!/usr/bin/env python import wave import struct import glob import numpy import scipy.io.wavfile import scipy.signal import scipy.fftpack import pylab #MAX_SHRT = 32768.0 GAIN = 1.0 PLOT = True #PLOT = False #IMPULSES = True IMPULSES = False #if not IMPULSES: # GAIN = 400.0 HEADER_BEGIN = """/* This file was a...
gpl-3.0
tedder/ansible
lib/ansible/module_utils/network/cnos/cnos_devicerules.py
69
100502
# 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
yangdw/PyRepo
src/annotation/Firefly/firefly/web/delayrequest.py
8
4841
#coding:utf8 ''' Created on 2013-9-3 @author: lan ''' from twisted.web.server import Request,Site from twisted.internet import defer from twisted.web import http,html from twisted.python import log, reflect from twisted.web import resource from twisted.web.error import UnsupportedMethod from twisted.web.microdom impor...
mit
showgood/YCM_windows
third_party/requests/requests/packages/chardet/compat.py
2943
1157
######################## BEGIN LICENSE BLOCK ######################## # Contributor(s): # Ian Cordasco - port to Python # # 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 # versio...
gpl-3.0
herberthudson/pynance
pynance/common.py
2
5485
""" .. Copyright (c) 2014, 2015 Marshall Farrier license http://opensource.org/licenses/MIT Common - generic functions (:mod:`pynance.common`) ================================================== .. currentmodule:: pynance.common """ import pandas as pd def featurize(equity_data, n_sessions, **kwargs): """ ...
mit
TheWardoctor/Wardoctors-repo
script.module.exodus/lib/resources/lib/sources/en/solarmovie.py
5
10658
# NEEDS FIXING # -*- coding: utf-8 -*- ''' Exodus Add-on 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. ...
apache-2.0
hovo1990/deviser
generator/util/generateLatex.py
1
3666
#!/usr/bin/env python # # @file generateLatex.py # @brief function for generating all latex files # @author Frank Bergmann # @author Sarah Keating # # <!-------------------------------------------------------------------------- # # Copyright (c) 2013-2015 by the California Institute of Technology # (California, ...
lgpl-2.1
jiangyunfei/Michelangelo
libs/tesstool.py
1
5182
#!/usr/bin/python # -*- coding: utf-8 -*- """Library with tools related to tesseract """ __author__ = 'Jiang Yunfei' __version__ = '0.1' __date__ = '2015.04' import os import sys import ctypes from ctypes.util import find_library from itertools import count LIBPATH = '/usr/local/lib/' VERSION = '' # Define Page It...
apache-2.0
nju520/django
tests/template_tests/test_library.py
413
3753
from django.template import Library from django.template.base import Node from django.test import TestCase class FilterRegistrationTests(TestCase): def setUp(self): self.library = Library() def test_filter(self): @self.library.filter def func(): return '' self.ass...
bsd-3-clause
lerouxb/seymour
seymour/accounts/models.py
1
3824
import datetime from django.db import models, connection from seymour.feeds.models import Feed, Item, AccountFeed class Account(models.Model): openid = models.CharField('openid', max_length=255, null=True) firstname = models.CharField('first name', max_length=100, null=True) lastname = models.CharField('l...
mit
sssllliang/edx-analytics-pipeline
edx/analytics/tasks/database_imports.py
1
22573
""" Import data from external RDBMS databases into Hive. """ import datetime import logging import textwrap import luigi from luigi.hive import HiveQueryTask, HivePartitionTarget from edx.analytics.tasks.sqoop import SqoopImportFromMysql from edx.analytics.tasks.url import url_path_join from edx.analytics.tasks.util....
agpl-3.0
miguelparaiso/OdooAccessible
openerp/addons/base/tests/test_mail_examples.py
302
57129
#!/usr/bin/env python # -*- coding: utf-8 -*- MISC_HTML_SOURCE = """ <font size="2" style="color: rgb(31, 31, 31); font-family: monospace; font-variant: normal; line-height: normal; ">test1</font> <div style="color: rgb(31, 31, 31); font-family: monospace; font-variant: normal; line-height: normal; font-size: 12px; fo...
agpl-3.0
SrNetoChan/QGIS
python/plugins/db_manager/db_plugins/plugin.py
4
50826
# -*- coding: utf-8 -*- """ /*************************************************************************** Name : DB Manager Description : Database manager plugin for QGIS Date : May 23, 2011 copyright : (C) 2011 by Giuseppe Sucameli email : brush.tyler@...
gpl-2.0
fhaoquan/kbengine
kbe/res/scripts/common/Lib/unittest/case.py
69
55519
"""Test case implementation""" import sys import functools import difflib import logging import pprint import re import warnings import collections import contextlib import traceback from . import result from .util import (strclass, safe_repr, _count_diff_all_purpose, _count_diff_hashable, _common_...
lgpl-3.0
erkrishna9/odoo
addons/hr_recruitment/__init__.py
433
1145
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
agpl-3.0
LokiCoder/Sick-Beard
lib/html5lib/treebuilders/etree_lxml.py
98
12544
import warnings import re import _base from html5lib.constants import DataLossWarning import html5lib.constants as constants import etree as etree_builders from html5lib import ihatexml try: import lxml.etree as etree except ImportError: pass fullTree = True tag_regexp = re.compile("{([^}]*)}(.*)") """Modul...
gpl-3.0
joshimio/blog
node_modules/pygmentize-bundled/vendor/pygments/pygments/lexers/math.py
291
93298
# -*- coding: utf-8 -*- """ pygments.lexers.math ~~~~~~~~~~~~~~~~~~~~ Lexers for math languages. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.util import shebang_matches from pygments.lexer import Lexer, Re...
mit
slevenhagen/odoo
addons/account_asset/account_asset_invoice.py
141
3088
# -*- encoding: 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 G...
agpl-3.0
dwhswenson/openpathsampling
openpathsampling/shooting.py
2
7855
import math import logging import numpy as np from openpathsampling.netcdfplus import StorableNamedObject from openpathsampling import default_rng logger = logging.getLogger(__name__) init_log = logging.getLogger('openpathsampling.initialization') class ShootingPointSelector(StorableNamedObject): def __init__(...
mit
ussrunit-project/ussrunit
contrib/seeds/getseeds/getseeds.py
1
3021
#!/usr/bin/python3 ### ### Automatic seeding over HTTP ### (C) 2016 Alex D. ### ### http://www.gnu.org/licenses/agpl-3.0.en.html ### import os import sys import json import random import platform import urllib.request sources = ['http://dalexhz1.cloudapp.net', 'http://dalexhz2.cloudapp.net', 'http://dalexhz4.clou...
mit
raildo/nova
nova/api/openstack/compute/legacy_v2/contrib/server_groups.py
15
9330
# Copyright (c) 2014 Cisco Systems, 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 r...
apache-2.0
glaubitz/fs-uae-debian
launcher/fsgs/input/eventlistener.py
2
3920
import time from arcade.notification import Notification from fsgs.input.device import Device from fsgs.input.eventhelper import EventHelper from fsgs.input.devicemanager import DeviceManager CHECK_DELAY = 0.5 class EventListener: def __init__(self): self.helper = EventHelper() self.helper.init(...
gpl-2.0
willthames/ansible
lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py
8
17442
#!/usr/bin/python # # Copyright (c) 2016 Matt Davis, <mdavis@ansible.com> # Chris Houseknecht, <house@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 ANS...
gpl-3.0
maxamillion/ansible
test/units/module_utils/common/arg_spec/test_sub_spec.py
15
2580
# -*- coding: utf-8 -*- # Copyright (c) 2021 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 from ansible.module_utils.common.arg_spec import ArgumentSpecValidator, Valida...
gpl-3.0
brett-patterson/pyface
pyface/viewer/table_viewer.py
2
12210
#------------------------------------------------------------------------------ # Copyright (c) 2005, Enthought, Inc. # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in enthought/LICENSE.txt and may be redistributed only # under the conditions describe...
bsd-3-clause
matt-tyas/matthewtyas.com
logs/info.py
9
6384
#!/usr/bin/python # # This CGI script gives you the location of your Python interpreter, # your path to Sendmail, your environment variables and a list of the # Python modules that are installed on your web server. # import glob, os, re, string, sys, traceback from stat import * lang2css = { '0': ''' th ...
gpl-2.0
ksthesis/gatk
src/main/python/org/broadinstitute/hellbender/setup_gcnvkernel.py
3
1290
from distutils.core import setup import re import sys assert sys.version_info >= (3, 4), "gcnvkernel requires Python 3.4.x or later" def get_version_string(): version_file = "gcnvkernel/_version.py" version_str_line = open(version_file, "rt").read() version_regexp = r"^__version__ = ['\"]([^'\"]*)['\"]" ...
bsd-3-clause
StackStorm/mistral
mistral/tests/unit/api/v2/test_environment.py
1
10105
# Copyright 2015 - StackStorm, 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 ...
apache-2.0
jiangwei1221/django-virtualenv-demo
env/lib/python2.7/site-packages/django/contrib/gis/tests/__init__.py
110
1099
def geo_apps(): """ Returns a list of GeoDjango test applications that reside in `django.contrib.gis.tests` that can be used with the current database and the spatial libraries that are installed. """ from django.db import connection from django.contrib.gis.geos import GEOS_PREPARE from ...
unlicense
herilalaina/scikit-learn
sklearn/decomposition/tests/test_factor_analysis.py
112
3203
# Author: Christian Osendorfer <osendorf@gmail.com> # Alexandre Gramfort <alexandre.gramfort@inria.fr> # License: BSD3 import numpy as np from sklearn.utils.testing import assert_warns from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_greater from sklearn.utils.testing im...
bsd-3-clause
creichlin/captivout
tests/requests/packages/chardet/latin1prober.py
1778
5232
######################## 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...
gpl-3.0
albeva/fbide
third-party/yaml-cpp/test/gtest-1.10.0/googlemock/scripts/generator/cpp/gmock_class_test.py
69
11712
#!/usr/bin/env python # # Copyright 2009 Neal Norwitz All Rights Reserved. # Portions 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 # # ...
gpl-3.0
ntt-sic/python-cinderclient
cinderclient/v1/volumes.py
2
13485
# Copyright 2011 Denali Systems, 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 requ...
apache-2.0
guolivar/2spec-on-a-pi
logger_main.py
1
6723
#!/usr/bin/env python3 # Load the libraries #this is to test something import serial # Serial communications import time # Timing utilities import subprocess # Shell utilities ... compressing data files import os,sys # OS utils to keep working directory import json # To send JSON object to MQTT broker impor...
mit
CEG-FYP-OpenStack/scheduler
nova/tests/unit/network/test_network_info.py
13
43575
# Copyright 2011 OpenStack Foundation # All Rights Reserved. # Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LIC...
apache-2.0
PXke/invenio
invenio/modules/workflows/tasks/simplified_data_tasks.py
2
1311
# -*- coding: utf-8 -*- ## This file is part of Invenio. ## Copyright (C) 2013, 2014 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option...
gpl-2.0
nharraud/b2share
invenio/modules/search/admin_forms.py
6
1705
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2011, 2014, 2015 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your optio...
gpl-2.0
uhuramedia/django-dynamic-forms
dynamic_forms/formfields.py
1
7830
# -*- coding: utf-8 -*- from __future__ import unicode_literals import copy import re from importlib import import_module from django import forms from django.utils import six from django.utils.decorators import classonlymethod from django.utils.encoding import python_2_unicode_compatible from django.utils.translatio...
bsd-3-clause
abaditsegay/arangodb
3rdParty/V8-4.3.61/third_party/python_26/Lib/site-packages/win32comext/shell/demos/viewstate.py
37
1821
""" Demonstrates how to propagate a folder's view state to all its subfolders The format of the ColInfo stream is apparently undocumented, but it can be read raw from one folder and copied to another's view state. """ from win32com.shell import shell, shellcon import pythoncom import os, sys template_folder=os.path.s...
apache-2.0
mmcloughlin/finsky
finsky/protos/purchase_pb2.py
2
24000
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: purchase.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _refl...
mit
ryfeus/lambda-packs
Tensorflow/source/numpy/distutils/mingw32ccompiler.py
10
25147
""" Support code for building Python extensions on Windows. # NT stuff # 1. Make sure libpython<version>.a exists for gcc. If not, build it. # 2. Force windows to use gcc (we're struggling with MSVC and g77 support) # 3. Force windows to use g77 """ from __future__ import division, absolute_import, p...
mit
petemounce/ansible
lib/ansible/modules/cloud/ovirt/ovirt_snapshots_facts.py
45
4381
#!/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
kambysese/mne-python
mne/decoding/time_frequency.py
12
5163
# Author: Jean-Remi King <jeanremi.king@gmail.com> # # License: BSD (3-clause) import numpy as np from .mixin import TransformerMixin from .base import BaseEstimator from ..time_frequency.tfr import _compute_tfr, _check_tfr_param from ..utils import fill_doc, _check_option @fill_doc class TimeFrequency(TransformerMi...
bsd-3-clause
assefay/inasafe
safe_qgis/tools/impact_report_dialog.py
2
6817
# coding=utf-8 """ InaSAFE Disaster risk assessment tool developed by AusAid - **Options Dialog.** Contact : ole.moller.nielsen@gmail.com .. note:: 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 Foun...
gpl-3.0
SNAPPETITE/backend
flask/lib/python2.7/site-packages/coverage/data.py
27
27526
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt """Coverage data for coverage.py.""" import glob import json import optparse import os import os.path import random import re import socket from coverage import e...
mit
dirn/ansible
v1/ansible/runner/lookup_plugins/url.py
86
1588
# (c) 2015, Brian Coca <bcoca@ansible.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version....
gpl-3.0
milkpku/BetaElephant
policy_experiment/policy.add-all/model.py
1
2810
#!/usr/bin/python3 #-*-coding:utf-8-*- #$File: model.py #$Date: Sat May 7 10:59:45 2016 #$Author: Like Ma <milkpku[at]gmail[dot]com> from config import Config import tensorflow as tf import functools from util.model import Model, conv2d def get_model(name): name = functools.partial('{}-{}'.format, name) s...
mit
Intel-Corporation/tensorflow
tensorflow/python/ops/ragged/ragged_tensor_test.py
5
53802
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
jm-begon/scikit-learn
sklearn/externals/joblib/_memory_helpers.py
303
3605
try: # Available in Python 3 from tokenize import open as open_py_source except ImportError: # Copied from python3 tokenize from codecs import lookup, BOM_UTF8 import re from io import TextIOWrapper, open cookie_re = re.compile("coding[:=]\s*([-\w.]+)") def _get_normal_name(orig_enc): ...
bsd-3-clause
DaanHoogland/cloudstack
test/selenium/cstests/smoketests/login_logout_test.py
7
8432
# 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
alexryndin/ambari
ambari-server/src/main/resources/common-services/AMBARI_INFRA/0.1.0/package/scripts/service_check.py
3
2080
""" 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 this ...
apache-2.0
claudep/pootle
pootle/apps/accounts/utils.py
1
16481
# -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # # This file is a part of the Pootle project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship information. import functools import logging import sys ...
gpl-3.0
40223148/2015cda_g5
static/Brython3.1.1-20150328-091302/Lib/unittest/test/testmock/testmock.py
737
40047
import copy import sys import unittest from unittest.test.testmock.support import is_instance from unittest import mock from unittest.mock import ( call, DEFAULT, patch, sentinel, MagicMock, Mock, NonCallableMock, NonCallableMagicMock, _CallList, create_autospec ) class Iter(object): def __init__...
gpl-3.0
jmesteve/asterisk
openerp/addons/point_of_sale/wizard/pos_box_entries.py
54
6577
# -*- 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
punalpatel/st2
st2debug/setup.py
10
1688
# -*- coding: utf-8 -*- # Licensed to the StackStorm, Inc ('StackStorm') 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 "Licen...
apache-2.0
wunderlins/learning
python/zodb/lib/linux64/ZODB/utils.py
2
9565
############################################################################## # # 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-2.0
pokemon4ik2008/py-airfoil
scons-local-2.2.0/SCons/Tool/gas.py
14
1931
"""SCons.Tool.gas Tool-specific initialization for as, the Gnu assembler. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2...
gpl-3.0
mapennell/ansible
v1/ansible/color.py
134
2388
# (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
jagill/treeano
treeano/core/tests/children_container_test.py
3
3932
import nose.tools as nt from treeano import core import treeano import treeano.nodes as tn def test_list_children_container(): # test to_data cc = core.ListChildrenContainer([]) nt.assert_equal([], cc.to_data()) # test children_container_to_data as_data = core.children_container_to_data(cc) n...
apache-2.0
signed/intellij-community
python/helpers/pydev/_pydevd_bundle/pydevd_frame.py
3
37703
import linecache import os.path import re import sys import traceback # @Reimport from _pydev_bundle import pydev_log from _pydevd_bundle import pydevd_dont_trace from _pydevd_bundle import pydevd_vars from _pydevd_bundle.pydevd_breakpoints import get_exception_breakpoint from _pydevd_bundle.pydevd_comm import CMD_ST...
apache-2.0
rfguri/vimfiles
bundle/ycm/third_party/ycmd/third_party/python-future/src/future/backports/http/cookies.py
78
21569
#### # Copyright 2000 by Timothy O'Malley <timo@alum.mit.edu> # # All Rights Reserved # # Permission to use, copy, modify, and distribute this software # and its documentation for any purpose and without fee is hereby # granted, provided that the above copyright notice appear in all # copies and that bot...
mit
felipenaselva/repo.felipe
plugin.video.specto/resources/lib/libraries/cleandate.py
33
1876
# -*- coding: utf-8 -*- ''' Exodus Add-on Copyright (C) 2016 Exodus 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 l...
gpl-2.0
jiajiax/crosswalk-test-suite
webapi/tct-text-css3-tests/inst.wgt.py
372
6809
#!/usr/bin/env python import os import shutil import glob import time import sys import subprocess import string from optparse import OptionParser, make_option SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) PKG_NAME = os.path.basename(SCRIPT_DIR) PARAMETERS = None #XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=...
bsd-3-clause
randyzingle/tools
kub/services/archive/cdk/python/sample-app/.env/lib/python3.6/site-packages/pip/_vendor/msgpack/__init__.py
10
1535
# coding: utf-8 from ._version import version from .exceptions import * from collections import namedtuple class ExtType(namedtuple('ExtType', 'code data')): """ExtType represents ext type in msgpack.""" def __new__(cls, code, data): if not isinstance(code, int): raise TypeError("code mus...
apache-2.0
ZeYt/mitmproxy
libmproxy/console/common.py
3
11712
from __future__ import absolute_import import urwid import urwid.util import os from netlib.http.semantics import CONTENT_MISSING import netlib.utils from .. import utils from ..models import decoded from . import signals try: import pyperclip except: pyperclip = False VIEW_FLOW_REQUEST = 0 VIEW_FLOW_RES...
mit
brymaster5000/m7-GPE-L
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
12527
1935
# Util.py - Python extension for perf script, miscellaneous utility code # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. import errno, os FUTEX_WAIT = 0...
gpl-2.0
pf-aics-riken/kmr
cmd/kmrfsplit.py
1
5999
#!/usr/bin/python # Copyright (C) 2012-2018 RIKEN R-CCS ## \file kmrfsplit.py KMR-Shell File Splitter. import sys import os import re from optparse import OptionParser ## Write part of the inputfile to outputfile. # @param ipath inputfile path. # @param opath outputfile path. # @startpos start position o...
bsd-2-clause
jakew02/android_kernel_moto_shamu
tools/perf/scripts/python/syscall-counts-by-pid.py
11180
1927
# system call counts, by pid # (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, sys sys.path.append(os.env...
gpl-2.0
dpnova/cyclone
cyclone/sqlite.py
4
3065
# coding: utf-8 # # Copyright 2010 Alexandre Fiori # based on the original Tornado by Facebook # # 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...
apache-2.0
naemono/pyrax
pyrax/image.py
12
24535
# -*- coding: utf-8 -*- # Copyright (c)2014 Rackspace US, 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/LIC...
apache-2.0
willprice/weboob
modules/explorimmo/test.py
7
1355
# -*- coding: utf-8 -*- # Copyright(C) 2014 Bezleputh # # This file is part of weboob. # # weboob 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 opt...
agpl-3.0
CIYswengineer/cookityourself
python/bs4/__init__.py
23
20421
"""Beautiful Soup Elixir and Tonic "The Screen-Scraper's Friend" http://www.crummy.com/software/BeautifulSoup/ Beautiful Soup uses a pluggable XML or HTML parser to parse a (possibly invalid) document into a tree representation. Beautiful Soup provides methods and Pythonic idioms that make it easy to navigate, search,...
mit
jmason-ebi/pdx
web/settings.py
1
3715
""" Django settings for web project. Generated by 'django-admin startproject' using Django 1.10. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ import os # Bu...
apache-2.0
Josar/RIOT
tests/pkg_u8g2/tests/01-run.py
6
4212
#!/usr/bin/env python3 # Copyright (C) 2017 Inria # # This file is subject to the terms and conditions of the GNU Lesser # General Public License v2.1. See the file LICENSE in the top level # directory for more details. import os import sys EXPECTED_STDOUT = ( '00| ...
lgpl-2.1
shanglt/youtube-dl
youtube_dl/extractor/mit.py
32
6038
from __future__ import unicode_literals import re import json from .common import InfoExtractor from .youtube import YoutubeIE from ..utils import ( clean_html, ExtractorError, get_element_by_id, ) class TechTVMITIE(InfoExtractor): IE_NAME = 'techtv.mit.edu' _VALID_URL = r'https?://techtv\.mit\....
unlicense
janusnic/dj-21v
unit_13/mysite/shop/models.py
3
1362
from django.db import models from django.core.urlresolvers import reverse class Category(models.Model): name = models.CharField(max_length=200, db_index=True) slug = models.SlugField(max_length=200, db_index=True, unique=True) class Meta: ordering = ('name',) verbose_name = 'category' ...
mit
kontrafiktion/ansible
lib/ansible/galaxy/api.py
3
10440
#!/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
igal/openproposals
public/fckeditor/editor/filemanager/connectors/py/zope.py
93
5685
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http:...
mit
timj/scons
test/packaging/msi/explicit-target.py
1
3151
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, ...
mit
alex/boto
tests/integration/dynamodb/test_layer2.py
114
19814
# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/ # All rights reserved. # # 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 ...
mit
Kanik07/wifite
wifite.py
56
98589
#!/usr/bin/python # -*- coding: utf-8 -*- """ wifite author: derv82 at gmail Licensed under the GNU General Public License Version 2 (GNU GPL v2), available at: http://www.gnu.org/licenses/gpl-2.0.txt (C) 2011 Derv Merkler ----------------- TODO: ignore root check when -cracked (afterward) (nee...
gpl-2.0
Alidron/demo-nao
alidron-env/lib/python2.7/site-packages/gevent/pywsgi.py
22
22855
# Copyright (c) 2005-2009, eventlet contributors # Copyright (c) 2009-2011, gevent contributors import errno import sys import time import traceback import mimetools from datetime import datetime from urllib import unquote from gevent import socket import gevent from gevent.server import StreamServer from gevent.hub ...
mpl-2.0
NeCTAR-RC/nova
nova/tests/unit/virt/libvirt/test_imagebackend.py
1
76598
# Copyright 2012 Grid Dynamics # 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...
apache-2.0