repo_name
stringlengths
5
100
path
stringlengths
4
375
copies
stringclasses
991 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
j00bar/ansible
test/units/playbook/test_helpers.py
60
19182
# (c) 2016, Adrian Likins <alikins@redhat.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 vers...
gpl-3.0
SGCreations/Flask
Work/TriviaMVA/TriviaMVA/env/Lib/site-packages/jinja2/testsuite/security.py
415
6204
# -*- coding: utf-8 -*- """ jinja2.testsuite.security ~~~~~~~~~~~~~~~~~~~~~~~~~ Checks the sandbox and other security features. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import unittest from jinja2.testsuite import JinjaTestCase from jinja2 import E...
apache-2.0
jnerin/ansible
lib/ansible/module_utils/ovirt.py
3
26081
# -*- 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 # (at your option) ...
gpl-3.0
lenstr/rethinkdb
test/rql_test/connections/http_support/werkzeug/testsuite/multipart/collect.py
248
1584
#!/usr/bin/env python """ Hacky helper application to collect form data. """ from werkzeug.serving import run_simple from werkzeug.wrappers import Request, Response def copy_stream(request): from os import mkdir from time import time folder = 'request-%d' % time() mkdir(folder) environ = request.e...
agpl-3.0
philippjfr/bokeh
bokeh/embed/tests/test_server.py
1
11784
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2017, Anaconda, Inc. All rights reserved. # # Powered by the Bokeh Development Team. # # The full license is in the file LICENSE.txt, distributed with this software. #---------------------------------------------------...
bsd-3-clause
google/gfw-toolkit
toolkit/third_party/oauth2client/client.py
122
44282
# Copyright (C) 2010 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 writ...
apache-2.0
40023256/2015cdag1man
static/Brython3.1.1-20150328-091302/Lib/_string.py
625
1112
"""string helper module""" import re class __loader__(object): pass def formatter_field_name_split(fieldname): """split the argument as a field name""" _list=[] for _name in fieldname: _parts = _name.split('.') for _item in _parts: is_attr=False #fix me if re....
gpl-3.0
ptrendx/mxnet
tests/nightly/test_kvstore.py
12
10372
#!/usr/bin/env python # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "L...
apache-2.0
dannyperez/bolivarcoin
share/seeds/generate-seeds.py
79
4297
#!/usr/bin/python # Copyright (c) 2014 Wladmir J. van der Laan # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Script to generate list of seed nodes for chainparams.cpp. This script expects two text files in the directory that...
mit
Panos512/inspire-next
inspirehep/modules/authors/__init__.py
3
1142
# -*- coding: utf-8 -*- # # This file is part of INSPIRE. # Copyright (C) 2016 CERN. # # INSPIRE is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later...
gpl-2.0
alphagov/notifications-admin
tests/app/main/views/test_notifications.py
1
29605
import base64 from functools import partial from unittest.mock import mock_open import pytest from flask import url_for from freezegun import freeze_time from notifications_python_client.errors import APIError from PyPDF2.utils import PdfReadError from tests.conftest import ( SERVICE_ONE_ID, create_active_cas...
mit
tensorflow/models
research/delf/delf/python/examples/extract_boxes.py
1
7510
# Copyright 2017 The TensorFlow Authors All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
apache-2.0
DG-i/openshift-ansible
roles/lib_openshift/src/ansible/oc_edit.py
42
1774
# pylint: skip-file # flake8: noqa def main(): ''' ansible oc module for editing objects ''' module = AnsibleModule( argument_spec=dict( kubeconfig=dict(default='/etc/origin/master/admin.kubeconfig', type='str'), state=dict(default='present', type='str', ...
apache-2.0
demon-ru/iml-crm
addons/hw_posbox_upgrade/controllers/main.py
172
4161
# -*- coding: utf-8 -*- import logging import os import time import openerp import openerp.addons.hw_proxy.controllers.main as hw_proxy import threading from openerp import http from openerp.http import request from openerp.tools.translate import _ _logger = logging.getLogger(__name__) upgrade_template = """ <!DOCTY...
agpl-3.0
mindm/2017Challenges
challenge_6/python/slandau3/ranges.py
5
1713
#!/usr/bin/env python3 # @author Slandau3 def ranges(input: list) -> list: # The patterns_found list keeps track of the definite ranges we have completed patterns_found = [] # pattern_in_progress keeps track of a pattern we are tracing pattern_in_progress = [] for i in input: if len(patter...
mit
bentilly/heroes
lib/werkzeug/contrib/limiter.py
295
1333
# -*- coding: utf-8 -*- """ werkzeug.contrib.limiter ~~~~~~~~~~~~~~~~~~~~~~~~ A middleware that limits incoming data. This works around problems with Trac_ or Django_ because those directly stream into the memory. .. _Trac: http://trac.edgewall.org/ .. _Django: http://www.djangoproject.com/ ...
apache-2.0
vrenkens/Nabu-asr
nabu/neuralnetworks/components/layer.py
2
3940
'''@file layer.py Neural network layers ''' import tensorflow as tf from tensorflow.python.ops.rnn import bidirectional_dynamic_rnn from nabu.neuralnetworks.components import ops def blstm( inputs, sequence_length, num_units, layer_norm=False, scope=None): ''' a BLSTM l...
mit
dohoangkhiem/ansible-modules-extras
cloud/rackspace/rax_mon_entity.py
123
6171
#!/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 distributed...
gpl-3.0
marcoscaceres/AlarmAPI
node_modules/grunt-contrib-uglify/node_modules/gzip-js/test/zipTest.py
182
1836
import os from helpers import run_cmd from colorama import Fore defaultTestDir = 'test-files' defaultOutDir = 'test-outs' """ Run a single test @param tFile- required; the full path to the file to run @param level- optional (default: all); the compression level [1-9] @return True if all tests passed; False if at lea...
mit
AICP/external_chromium_org
build/android/pylib/instrumentation/test_jar.py
11
9038
# Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Helper class for instrumenation test jar.""" # pylint: disable=W0702 import collections import logging import os import pickle import re import sys ...
bsd-3-clause
carloshwa/apps-android-wikipedia
scripts/make-templates.py
2
6090
#!/usr/bin/env python2 # coding=utf-8 import copy import os import json import unicodecsv as csv import codecs from urllib2 import urlopen from jinja2 import Environment, FileSystemLoader CHINESE_WIKI_LANG = "zh" SIMPLIFIED_CHINESE_LANG = "zh-hans" TRADITIONAL_CHINESE_LANG = "zh-hant" # Wikis that cause problems an...
apache-2.0
shsingh/ansible
test/units/modules/network/fortios/test_fortios_log_syslogd_override_filter.py
21
9346
# Copyright 2019 Fortinet, 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 program is distributed in the...
gpl-3.0
fredwilliam/PMO
apps/hq/middleware/hq.py
3
2738
from __future__ import absolute_import from django.contrib.auth import authenticate from django.contrib.auth.models import User from hq.authentication import get_username_password from hq.utils import get_dates try: from threading import local except ImportError: from django.utils._threading_local import loca...
bsd-3-clause
sebalix/OpenUpgrade
openerp/tools/float_utils.py
312
10296
# -*- 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
imk1/IMKTFBindingCode
getCellTypeSpecificDomainBoundaries.py
1
2787
import sys import argparse import gzip import math def parseArgument(): # Parse the input parser =\ argparse.ArgumentParser(description = "Get domain boundaries that are present in the 1st cell type but not in the 2nd") parser.add_argument("--cellTypeOneDomainsFileName", required=True, help='Domain boundaries ...
mit
guorendong/iridium-browser-ubuntu
native_client/pnacl/driver/shelltools.py
8
2070
#!/usr/bin/python # Copyright (c) 2012 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from driver_log import Log import types ###################################################################### # # Shell Utiliti...
bsd-3-clause
Drooids/odoo
addons/account_asset/wizard/account_asset_change_duration.py
258
5021
# -*- 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 t...
agpl-3.0
if1live/pelican-plugins
extract_toc/extract_toc.py
28
1805
# -*- coding: utf-8 -*- """ Extract Table of Content ======================== A Pelican plugin to extract table of contents (ToC) from `article.content` and place it in its own `article.toc` variable for use in templates. """ from os import path from bs4 import BeautifulSoup from pelican import signals, readers, cont...
agpl-3.0
hujiajie/pa-chromium
chrome/test/functional/omnibox.py
65
15428
#!/usr/bin/env python # Copyright (c) 2011 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 glob import os import re import shutil import tempfile import urlparse import pyauto_functional # Must be imported before ...
bsd-3-clause
aaiyer/bugseverywhere
libbe/command/list.py
5
10809
# Copyright (C) 2005-2012 Aaron Bentley <abentley@panoramicfeedback.com> # Chris Ball <cjb@laptop.org> # Gianluca Montecchi <gian@grys.it> # Oleg Romanyshyn <oromanyshyn@panoramicfeedback.com> # Robert Lehmann <mail@robertle...
gpl-2.0
alexforencich/python-ivi
ivi/tektronix/tektronixMSO5204B.py
1
1557
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2017 Alex Forencich 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 righ...
mit
simbha/mAngE-Gin
lib/Django 1.7/django/contrib/staticfiles/finders.py
106
9852
from collections import OrderedDict import os from django.apps import apps from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.files.storage import default_storage, Storage, FileSystemStorage from django.utils.functional import empty, LazyObject from django.utils.m...
mit
Kmayankkr/robocomp
tools/rcmonitor/someTest.py
5
1932
# -*- coding: utf-8 -*- # Copyright (C) 2010 by RoboLab - University of Extremadura # # This file is part of RoboComp # # RoboComp 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
binarytemple/ansible
plugins/inventory/rax.py
24
9460
#!/usr/bin/env python # (c) 2013, Jesse Keating <jesse.keating@rackspace.com> # # This file is part of Ansible, # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or ...
gpl-3.0
vmanoria/bluemix-hue-filebrowser
hue-3.8.1-bluemix/desktop/core/ext-py/Paste-2.0.1/paste/gzipper.py
50
3611
# (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org) # Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php # (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org) # Licensed under the MIT license: http://www.opensource.org/licens...
gpl-2.0
geertj/python-tdbus
examples/avahi.py
1
1381
#!/usr/bin/env python # # This file is part of python-tdbus. Python-tdbus is free software # available under the terms of the MIT license. See the file "LICENSE" that # was provided together with this source file for the licensing terms. # # Copyright (c) 2012 the python-tdbus authors. See the file "AUTHORS" for a # co...
mit
yajnab/android_kernel_samsung_msm7x27
tools/perf/scripts/python/sctop.py
895
1936
# 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
sajuptpm/manila
manila/tests/cmd/test_manage.py
2
15025
# Copyright 2015 Mirantis 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 by applicable law or a...
apache-2.0
Jc11235/Kekulean_Program
GUI_Version/Ubuntu_Version/DriverMethods.py
1
39406
from PerfectMatchingData import * from Face import * from Vertex import * from Graph import * from VertexList import * from Output import * from KekuleanMethods import * from Checkers import * from RequiredEdgeMethods import * from Tkinter import * from AppInformation import * from random import randint import time i...
gpl-2.0
metacloud/python-novaclient
novaclient/v1_1/aggregates.py
15
3503
# Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
StratusLab/client
api/code/src/main/python/stratuslab/HttpClient.py
1
9858
# # Created as part of the StratusLab project (http://stratuslab.eu), # co-funded by the European Commission under the Grant Agreement # INFSO-RI-261552." # # Copyright (c) 2011, SixSq Sarl # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Lice...
apache-2.0
FireWRT/OpenWrt-Firefly-Libraries
staging_dir/host/lib/python3.4/lib2to3/fixes/fix_dict.py
24
3811
# Copyright 2007 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Fixer for dict methods. d.keys() -> list(d.keys()) d.items() -> list(d.items()) d.values() -> list(d.values()) d.iterkeys() -> iter(d.keys()) d.iteritems() -> iter(d.items()) d.itervalues() -> iter(d.values()) d.v...
gpl-2.0
frinksdev/mini4chan
konnichiwa/settings.py
1
2675
""" Django settings for konnichiwa project. Generated by 'django-admin startproject' using Django 1.8.3. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build p...
mit
dianshen/python_day
day7/a/getfile.py
1
1625
#!/usr/bin/env python3 __author__ = 'DSOWASP' import socket import os import hashlib ip_port = ('127.0.0.1',9999) sk = socket.socket() sk.connect(ip_port) while True: cmd_input = input("cmd> ") # print("发送:%s"%cmd) cmd,fname = cmd_input.split() if os.path.exists(fname): ftell = os.path.gets...
apache-2.0
Insoleet/aiohttp
aiohttp/web_exceptions.py
12
6892
from .web_reqrep import Response __all__ = ( 'HTTPException', 'HTTPError', 'HTTPRedirection', 'HTTPSuccessful', 'HTTPOk', 'HTTPCreated', 'HTTPAccepted', 'HTTPNonAuthoritativeInformation', 'HTTPNoContent', 'HTTPResetContent', 'HTTPPartialContent', 'HTTPMultipleChoices', ...
apache-2.0
jurajmajor/ltl3tela
Experiments/ltlcross_runner.py
1
23078
# -*- coding: utf-8 -*- import subprocess import sys import os.path import re import math import spot from IPython.display import SVG from datetime import datetime import pandas as pd from experiments_lib import hoa_to_spot, dot_to_svg, pretty_print def bogus_to_lcr(form): """Converts a formula as it is printed in...
gpl-3.0
gbowerman/azurerm
azurerm/resourcegroups.py
1
4056
'''resourcegroups.py - azurerm functions for Resource Groups.''' import json from .restfns import do_delete, do_get, do_post, do_put from .settings import get_rm_endpoint, RESOURCE_API def create_resource_group(access_token, subscription_id, rgname, location): '''Create a resource group in the specified location....
mit
samesense/tools
py/uniprotTxt.py
1
5230
"""Getting uniprot txt files for proteins parsing them loading parsed data.""" import os, time, sys import files from collections import defaultdict def parseProteinName(protein): with open(mkTxtFile(protein)) as f: for line in f: # DE RecName: Full=Fatty acid synthase; if l...
mit
dragosbdi/p2pool
SOAPpy/SOAPBuilder.py
289
22852
""" ################################################################################ # Copyright (c) 2003, Pfizer # Copyright (c) 2001, Cayce Ullman. # Copyright (c) 2001, Brian Matthews. # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provid...
gpl-3.0
JonnyWong16/plexpy
lib/maxminddb/file.py
3
1988
"""For internal use only. It provides a slice-like file reader.""" import os try: # pylint: disable=no-name-in-module from multiprocessing import Lock except ImportError: from threading import Lock class FileBuffer(object): """A slice-able file reader""" def __init__(self, database): s...
gpl-3.0
dagwieers/ansible
lib/ansible/modules/packaging/os/svr4pkg.py
95
7684
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Boyd Adamson <boyd () boydadamson.com> # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1...
gpl-3.0
alexandrandronescu/autorobot
curs.py
1
2038
import sys import datetime import requests def check_arguments(argv): date1 = date2 = None today = datetime.datetime.now().date() if len(argv)==1: date1 = datetime.date(year=datetime.datetime.now().date().year, month=datetime.datetime.now().date().month, day=1) date2 = today try: if len(argv)>1: if argv...
gpl-2.0
gaddman/ansible
lib/ansible/module_utils/vmware.py
3
42109
# -*- coding: utf-8 -*- # Copyright: (c) 2015, Joseph Callen <jcallen () csc.com> # Copyright: (c) 2018, 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 import atexit impo...
gpl-3.0
heke123/chromium-crosswalk
third_party/WebKit/Source/build/scripts/make_cssom_types.py
6
1588
#!/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 sys import css_properties import in_generator from name_utilities import enum_for_css_keyword import template_expander class ...
bsd-3-clause
srsman/odoo
openerp/osv/fields.py
45
75006
# -*- 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 GNU...
agpl-3.0
a-parhom/edx-platform
common/lib/capa/capa/tests/test_answer_pool.py
37
27075
""" Tests the logic of the "answer-pool" attribute, e.g. <choicegroup answer-pool="4"> """ import unittest import textwrap from capa.tests.helpers import test_capa_system, new_loncapa_problem from capa.responsetypes import LoncapaProblemError class CapaAnswerPoolTest(unittest.TestCase): """Capa Answer Pool Tes...
agpl-3.0
ahu-odoo/odoo
addons/account_voucher/report/__init__.py
378
1083
# -*- 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
leppa/home-assistant
homeassistant/components/auth/__init__.py
3
17184
"""Component to allow users to login and get tokens. # POST /auth/token This is an OAuth2 endpoint for granting tokens. We currently support the grant types "authorization_code" and "refresh_token". Because we follow the OAuth2 spec, data should be send in formatted as x-www-form-urlencoded. Examples will be in JSON ...
apache-2.0
flask-admin/flask-admin
flask_admin/model/form.py
17
7221
import inspect import warnings from flask_admin.form import BaseForm, rules from flask_admin._compat import iteritems from wtforms.fields import HiddenField from wtforms.fields.core import UnboundField from wtforms.validators import InputRequired from .widgets import XEditableWidget def converts(*args): def _in...
bsd-3-clause
whitehorse-io/encarnia
pyenv/lib/python2.7/site-packages/twisted/words/protocols/jabber/sasl_mechanisms.py
13
8730
# -*- test-case-name: twisted.words.test.test_jabbersaslmechanisms -*- # # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Protocol agnostic implementations of SASL authentication mechanisms. """ from __future__ import absolute_import, division import binascii, random, time, os from hashlib...
mit
ScradFTW/WhoSampledMyLib
WhoSampledScraper.py
1
6314
""" File: WhoSampledScraper.py Author: Brad Jobe Version: 0.0.1 Scrapes relevant HTML content from an artist's track page """ import sys import eyed3 import urllib2 from lxml import html import httplib import json class WhoSampledScraper: URL_WHOSAMPLED = "www.whosampled.com" HTTP_PROTO = "http://" HTTP_...
gpl-2.0
brandsoulmates/incubator-airflow
tests/contrib/hooks/test_jira_hook.py
44
1616
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
apache-2.0
andyvand/Arduino-1
arduino-core/src/processing/app/i18n/python/requests/packages/charade/chardistribution.py
168
9153
######################## 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...
lgpl-2.1
cloudera/hue
desktop/core/ext-py/SQLAlchemy-1.3.17/test/dialect/test_sqlite.py
2
82848
#!coding: utf-8 """SQLite-specific tests.""" import datetime import json import os from sqlalchemy import and_ from sqlalchemy import bindparam from sqlalchemy import CheckConstraint from sqlalchemy import Column from sqlalchemy import column from sqlalchemy import Computed from sqlalchemy import create_engine from s...
apache-2.0
icereval/osf.io
addons/gitlab/models.py
1
14594
# -*- coding: utf-8 -*- import os import urlparse from django.db import models import markupsafe from addons.base import exceptions from addons.base.models import (BaseOAuthNodeSettings, BaseOAuthUserSettings, BaseStorageAddon) from addons.gitlab import utils from addons.gitlab.api imp...
apache-2.0
toabctl/osc
tests/test_revertfiles.py
15
3281
import osc.core import osc.oscerr import os from common import OscTestCase FIXTURES_DIR = os.path.join(os.getcwd(), 'revertfile_fixtures') def suite(): import unittest return unittest.makeSuite(TestRevertFiles) class TestRevertFiles(OscTestCase): def _get_fixtures_dir(self): return FIXTURES_DIR ...
gpl-2.0
theoryno3/pylearn2
pylearn2/utils/tests/test_video.py
44
2040
"""Tests for pylearn2.utils.video""" import numpy from theano.compat import six from pylearn2.compat import OrderedDict from pylearn2.utils.video import FrameLookup, spatiotemporal_cubes __author__ = "David Warde-Farley" __copyright__ = "Copyright 2011, David Warde-Farley / Universite de Montreal" __license__ = "BSD" ...
bsd-3-clause
tiborsimko/zenodo
tests/unit/auditor/test_records.py
6
13412
# -*- coding: utf-8 -*- # # This file is part of Zenodo. # Copyright (C) 2016 CERN. # # Zenodo is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later v...
gpl-2.0
drpngx/tensorflow
tensorflow/python/client/device_lib.py
42
1459
# 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
openstack/python-zaqarclient
zaqarclient/auth/__init__.py
1
1268
# Copyright (c) 2013 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 writ...
apache-2.0
mobiuscoin/p2pool-mobi
p2pool/bitcoin/sha256.py
285
3084
from __future__ import division import struct k = [ 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0...
gpl-3.0
palerdot/calibre
src/calibre/library/database2.py
4
164046
from __future__ import with_statement __license__ = 'GPL v3' __copyright__ = '2008, Kovid Goyal kovid@kovidgoyal.net' __docformat__ = 'restructuredtext en' ''' The database used to store ebook metadata ''' import os, sys, shutil, cStringIO, glob, time, functools, traceback, re, \ json, uuid, hashlib, copy, t...
gpl-3.0
arnondora/wordpress-paper-theme
PaperTheme/node_modules/gulp-sass/node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py
1812
9537
# Copyright (c) 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Utility functions shared amongst the Windows generators.""" import copy import os # A dictionary mapping supported target types to extensions. TARGET_TYPE_EX...
mit
robovm/robovm-studio
python/helpers/profiler/thriftpy3/transport/TSSLSocket.py
44
8264
# # 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
Deepak345/al-go-rithms
cryptography/steganography/python/steganography.py
3
4403
import getopt import math import os import struct import sys import wave def hide(sound_path, file_path, output_path, num_lsb): sound = wave.open(sound_path, "r") params = sound.getparams() num_channels = sound.getnchannels() sample_width = sound.getsampwidth() num_frames = sound.getnframes()...
mit
tashaxe/Red-DiscordBot
lib/youtube_dl/extractor/brightcove.py
2
30054
# coding: utf-8 from __future__ import unicode_literals import re import json from .common import InfoExtractor from ..compat import ( compat_etree_fromstring, compat_parse_qs, compat_str, compat_urllib_parse_urlparse, compat_urlparse, compat_xml_parse_error, compat_HTTPError, ) from ..uti...
gpl-3.0
horazont/aioxmpp
aioxmpp/ibr/service.py
1
5326
######################################################################## # File name: service.py # This file is part of: aioxmpp # # LICENSE # # This program 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 Foundati...
lgpl-3.0
nakagami/reportlab
tests/test_pdfgen_links.py
1
6833
#Copyright ReportLab Europe Ltd. 2000-2012 #this test and associates functionality kinds donated by Ian Sparks. #see license.txt for license details """ Tests for internal links and destinations """ __version__='''$Id: test_pdfgen_links.py 3959 2012-09-27 14:39:39Z robin $''' from reportlab.lib.testutils import setOutD...
bsd-3-clause
anarchivist/pyflag
src/plugins/PreCanned/Basic.py
2
5709
""" These are PreCanned Reports. PreCanned Reports are the PyFlag equivalent of the google 'Im Feeling Lucky' feature - we basically just dump out some simple queries which are used to get you started. """ import pyflag.Reports as Reports import pyflag.conf config=pyflag.conf.ConfObject() import pyflag.Registry as Re...
gpl-2.0
mozilla-services/data-pipeline
reports/stability-summary/utils.py
4
1274
import boto3 from gzip import GzipFile from cStringIO import StringIO import sys import csv class S3CompressedWriter(object): def __init__(self, bucket, path, mimetype='text/plain'): self.bucket = bucket self.path = path self.mimetype = mimetype self._buffer = None def __enter_...
mpl-2.0
bringsvor/account-financial-tools
__unported__/async_move_line_importer/model/move_line_importer.py
36
14197
# -*- coding: utf-8 -*- ############################################################################## # # Author: Nicolas Bessi # Copyright 2013 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # publi...
agpl-3.0
BrighterCommand/Brightside
brightside/dispatch.py
1
14030
""" File : dispatch.py Author : ian Created : 04-21-2017 Last Modified By : ian Last Modified On : 04-21-2017 *********************************************************************** The MIT License (MIT) Copyright © 2017 Ian Cooper <ian_hammond_cooper@yahoo.co.uk> Permission is hereby g...
mit
silly-wacky-3-town-toon/SOURCE-COD
Panda3D-1.10.0/direct/directscripts/extract_docs.py
8
10595
""" This script generates a pandadoc.hpp file representing the Python wrappers that can be parsed by doxygen to generate the Python documentation. You need to run this before invoking Doxyfile.python. It requires a valid makepanda installation with interrogatedb .in files in the lib/pandac/input directory. """ __all_...
apache-2.0
wkoathp/glance
glance/db/sqlalchemy/migrate_repo/versions/022_image_member_index.py
17
3573
# Copyright 2013 Red Hat, 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 by...
apache-2.0
webmasterraj/FogOrNot
flask/lib/python2.7/site-packages/docutils/parsers/rst/languages/gl.py
130
3711
# -*- coding: utf-8 -*- # Author: David Goodger # Contact: goodger@users.sourceforge.net # Revision: $Revision: 4229 $ # Date: $Date: 2005-12-23 00:46:16 +0100 (Fri, 23 Dec 2005) $ # Copyright: This module has been placed in the public domain. # New language mappings are welcome. Before doing a new translation, pleas...
gpl-2.0
bepitulaz/huntingdimana
env/Lib/site-packages/pip/_vendor/requests/packages/chardet/chardetect.py
1786
2504
#!/usr/bin/env python """ Script which takes one or more file paths and reports on their detected encodings Example:: % chardetect somefile someotherfile somefile: windows-1252 with confidence 0.5 someotherfile: ascii with confidence 1.0 If no paths are provided, it takes its input from stdin. """ from...
gpl-3.0
citrix-openstack/build-ryu
ryu/tests/integrated/test_add_flow_v12_actions.py
5
15350
# Copyright (C) 2012 Nippon Telegraph and Telephone Corporation. # # 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
snnn/tensorflow
tensorflow/python/debug/cli/tensor_format.py
44
20447
# 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
postlund/home-assistant
homeassistant/components/google_travel_time/sensor.py
5
10356
"""Support for Google travel time sensors.""" from datetime import datetime, timedelta import logging import googlemaps import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ( ATTR_ATTRIBUTION, ATTR_LATITUDE, ATTR_LONGITUDE, CONF_API_KEY, ...
apache-2.0
40223123/raven
static/Brython3.1.1-20150328-091302/Lib/site-packages/pygame/constants.py
603
15297
#!/usr/bin/env python '''Constants defined by SDL, and needed in pygame. Note that many of the flags for SDL are not needed in pygame, and are not included here. These constants are generally accessed from the `pygame.locals` module. This module is automatically placed in the pygame namespace, but you will usually ...
gpl-3.0
wrouesnel/ansible
lib/ansible/modules/network/cloudengine/ce_bfd_session.py
16
20563
#!/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
chrisseto/osf.io
osf/models/metaschema.py
10
2428
# -*- coding: utf-8 -*- from django.db import models import jsonschema from website.util import api_v2_url from osf.models.base import BaseModel, ObjectIDMixin from osf.utils.datetime_aware_jsonfield import DateTimeAwareJSONField from osf.exceptions import ValidationValueError from website.project.metadata.utils imp...
apache-2.0
AdamWill/python-fedora
doc/conf.py
5
5294
# -*- coding: utf-8 -*- # # Python Fedora Module documentation build configuration file, created by # sphinx-quickstart on Mon Jun 9 08:12:44 2008. # # This file is execfile()d with the current directory set to its containing # dir. # The contents of this file are pickled, so don't put values in the namespace # that ...
gpl-2.0
liukaijv/XlsxWriter
xlsxwriter/test/comparison/test_chart_font05.py
8
1869
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org # from ..excel_comparsion_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): """...
bsd-2-clause
namecoin/namecoin-core
test/get_previous_releases.py
25
9262
#!/usr/bin/env python3 # # Copyright (c) 2018-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Download or build previous releases. # Needs curl and tar to download a release, or the build depend...
mit
bussiere/pypyjs
website/demo/home/rfk/repos/pypy/lib-python/2.7/dumbdbm.py
251
8820
"""A dumb and slow but simple dbm clone. For database spam, spam.dir contains the index (a text file), spam.bak *may* contain a backup of the index (also a text file), while spam.dat contains the data (a binary file). XXX TO DO: - seems to contain a bug when updating... - reclaim free space (currently, space once o...
mit
DEVELByte/incubator-airflow
airflow/contrib/sensors/gcs_sensor.py
4
2452
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
apache-2.0
ga7g08/sympy
sympy/physics/vector/tests/test_output.py
117
2594
from sympy import S from sympy.physics.vector import Vector, ReferenceFrame, Dyadic from sympy.utilities.pytest import raises Vector.simp = True A = ReferenceFrame('A') def test_output_type(): A = ReferenceFrame('A') v = A.x + A.y d = v | v zerov = Vector(0) zerod = Dyadic(0) # dot products ...
bsd-3-clause
gangadharkadam/stfrappe
frappe/modules/utils.py
39
4119
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe, os import frappe.modules from frappe.utils import cstr from frappe.modules import export_doc, get_module_path, scrub def listfolders(path, only_name=0): """ ...
mit
bytor99999/vertx-web
src/test/sockjs-protocol/venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/charade/mbcharsetprober.py
2924
3268
######################## 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