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
x303597316/hue
apps/beeswax/src/beeswax/data_export.py
25
2985
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
apache-2.0
molebot/brython
www/src/Lib/test/test_shutil.py
23
67715
# Copyright (C) 2003 Python Software Foundation import unittest import shutil import tempfile import sys import stat import os import os.path import errno import functools import subprocess from test import support from test.support import TESTFN from os.path import splitdrive from distutils.spawn import find_executab...
bsd-3-clause
Xprima-ERP/odoo_addons
xpr_xis_connector/__init__.py
1
1040
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # This module copyright (C) 2014 Savoir-faire Linux # (<http://www.savoirfairelinux.com>). # # This program is free software: you can redistribute it and/or m...
gpl-3.0
FNST-OpenStack/horizon
openstack_dashboard/contrib/trove/content/databases/forms.py
17
3881
# Copyright 2014 Tesora 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...
apache-2.0
ocefpaf/system-test
pelican-plugins/extract_toc/extract_toc.py
9
1391
# -*- 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...
unlicense
kerneltask/RIOT
tests/gnrc_sock_udp/tests/01-run.py
24
3816
#!/usr/bin/env python3 # Copyright (C) 2016 Kaspar Schleiser <kaspar@schleiser.de> # # 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 from datetime import datetime sys.path.app...
lgpl-2.1
ImageEngine/gaffer
python/GafferUI/PathVectorDataPlugValueWidget.py
8
4045
########################################################################## # # Copyright (c) 2011-2012, Image Engine Design Inc. All rights reserved. # Copyright (c) 2012, John Haddon. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided ...
bsd-3-clause
oVirt/vdsm
lib/vdsm/storage/sdm/api/add_bitmap.py
2
2642
# # Copyright 2020 Red Hat, 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 2 of the License, or # (at your option) any later version. # # This program is distributed in th...
gpl-2.0
jonyroda97/redbot-amigosprovaveis
lib/youtube_dl/extractor/tele13.py
90
3345
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from .youtube import YoutubeIE from ..utils import ( js_to_json, qualities, determine_ext, ) class Tele13IE(InfoExtractor): _VALID_URL = r'^https?://(?:www\.)?t13\.cl/videos(?:/[^/]+)+/(?P<id>[\w-]+)' _TESTS...
gpl-3.0
b4oshany/Localstrorage-audio
server/lib/werkzeug/routing.py
313
62520
# -*- 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...
apache-2.0
robskillington/google-diff-match-patch
python2/diff_match_patch.py
337
67934
#!/usr/bin/python2.4 from __future__ import division """Diff Match and Patch Copyright 2006 Google Inc. http://code.google.com/p/google-diff-match-patch/ 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 Lice...
apache-2.0
tobiasgehring/qudi
hardware/motor/motor_stage_pi.py
1
28192
# -*- coding: utf-8 -*- """ This file contains the hardware control of the motorized stage for PI. Qudi 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 la...
gpl-3.0
hilarry/mvpn
mvpn/forms.py
1
1090
#!-*- coding:utf-8 -*- from django import forms from django.contrib.auth.models import User from django.forms import ModelForm from models import Openuser,Log class LoginForm(forms.Form): username = forms.CharField( required=True, label=u"用户名", error_messages={'required': '请输入用户...
apache-2.0
KyletheFox/4397_Demo_App
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
phanikiran2/Extending-RED-qdisc-in-ns3-to-support--NLRED
wutils.py
64
8869
import os import os.path import re import sys import subprocess import shlex # WAF modules from waflib import Options, Utils, Logs, TaskGen, Build, Context from waflib.Errors import WafError # these are set from the main wscript file APPNAME=None VERSION=None bld=None def get_command_template(env, arguments=()): ...
gpl-2.0
Archives/easy-mangos
dep/ACE_wrappers/bin/svn_props.py
95
1292
#!/usr/bin/python import sys import re import os import string print """WARNING: this script is dumb. I mean, really, really dumb. Every file is treated as a text file, so if you are checking in any binary files, YOU MUST set a non-text MIME type by hand, otherwise it WILL be corrupted by the checkout process. A b...
gpl-2.0
stvstnfrd/edx-platform
openedx/core/djangoapps/credentials/tests/test_utils.py
1
3242
"""Tests covering Credentials utilities.""" import uuid import mock from openedx.core.djangoapps.credentials.models import CredentialsApiConfig from openedx.core.djangoapps.credentials.tests import factories from openedx.core.djangoapps.credentials.tests.mixins import CredentialsApiConfigMixin from openedx.core.dja...
agpl-3.0
leveille/blog.v1
wurdig/controllers/error.py
1
1807
import cgi from paste.urlparser import PkgResourcesParser from pylons import request from pylons import tmpl_context as c from pylons.controllers.util import forward from pylons.middleware import error_document_template from pylons.i18n.translation import _ from webhelpers.html.builder import literal from wurdig.lib.b...
mit
daltonmaag/robofab
Scripts/RoboFabIntro/intro_SimpleDrawing.py
9
1202
#FLM: RoboFab Intro, Simple Drawing # # # demo of drawing with RoboFab # # import robofab from robofab.world import CurrentFont, CurrentGlyph # (make sure you have a font opened in FontLab) f = CurrentFont() if f == None: Message("You should open a font first, there's nothing to look at now!") else: newGlyph = ...
bsd-3-clause
dzolnierz/percona-server
mysql-test/suite/tokudb/t/change_column_blob.py
54
1409
import sys def main(): print "# this test is generated by change_blob.py" print "# generate hot blob expansion test cases" print "--disable_warnings" print "DROP TABLE IF EXISTS t;" print "--enable_warnings" print "SET SESSION DEFAULT_STORAGE_ENGINE=\"TokuDB\";" print "SET SESSION TOKUDB_DIS...
gpl-2.0
Gamebasis/3DGamebasisServer
GameData/blender-2.71-windows64/2.71/python/lib/fnmatch.py
894
3163
"""Filename matching with shell patterns. fnmatch(FILENAME, PATTERN) matches according to the local convention. fnmatchcase(FILENAME, PATTERN) always takes case in account. The functions operate by translating the pattern into a regular expression. They cache the compiled regular expressions for speed. The function...
gpl-3.0
tntnatbry/tensorflow
tensorflow/tensorboard/lib/python/json_util_test.py
47
2271
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
jeremiahyan/lammps
python/examples/mc.py
15
2535
#!/usr/bin/env python -i # preceeding line should have path for Python on your machine # mc.py # Purpose: mimic operation of example/MC/in.mc via Python # Syntax: mc.py in.mc # in.mc = LAMMPS input script import sys,random,math # set these parameters # make sure neigh skin (in in.mc) > 2*deltamove nloop =...
gpl-2.0
x75/smq
smq/plot.py
1
14408
import numpy as np import matplotlib.pyplot as pl import pandas as pd import seaborn as sns import smq.logging as log # check pandas, seaborne # FIXME: fix hardcoded tablenames from smq.utils import set_attr_from_dict def get_data_from_item_log(items): tbl_key = items[0].name # print "%s.run: tbl_key = %s" ...
mit
PSPDFKit-labs/libdispatch
thirdparty/click/examples/repo/repo.py
44
4802
import os import sys import posixpath import click class Repo(object): def __init__(self, home): self.home = home self.config = {} self.verbose = False def set_config(self, key, value): self.config[key] = value if self.verbose: click.echo(' config[%s] = ...
apache-2.0
sorenk/ansible
lib/ansible/modules/network/f5/bigip_pool_member.py
20
18557
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2017 F5 Networks Inc. # Copyright (c) 2013 Matt Hite <mhite@hotmail.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 ANSIBL...
gpl-3.0
fujunwei/chromium-crosswalk
tools/json_schema_compiler/idl_schema_test.py
32
15807
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import idl_schema import unittest from json_parse import OrderedDict def getFunction(schema, name): for item in schema['functio...
bsd-3-clause
naousse/odoo
addons/mail/controllers/main.py
383
1733
import base64 import psycopg2 import openerp from openerp import SUPERUSER_ID from openerp import http from openerp.http import request from openerp.addons.web.controllers.main import content_disposition import mimetypes class MailController(http.Controller): _cp_path = '/mail' @http.route('/mail/download_a...
agpl-3.0
sriki18/scipy
scipy/interpolate/ndgriddata.py
39
7457
""" Convenience interface to N-D interpolation .. versionadded:: 0.9 """ from __future__ import division, print_function, absolute_import import numpy as np from .interpnd import LinearNDInterpolator, NDInterpolatorBase, \ CloughTocher2DInterpolator, _ndim_coords_from_arrays from scipy.spatial import cKDTree _...
bsd-3-clause
troygrosfield/Django-facebook
docs/docs_env/Lib/encodings/cp1251.py
593
13617
""" Python Character Mapping Codec cp1251 generated from 'MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1251.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,in...
bsd-3-clause
jonashagstedt/tornado
tornado/test/websocket_test.py
2
14565
from __future__ import absolute_import, division, print_function, with_statement import traceback from tornado.concurrent import Future from tornado import gen from tornado.httpclient import HTTPError, HTTPRequest from tornado.log import gen_log, app_log from tornado.testing import AsyncHTTPTestCase, gen_test, bind_u...
apache-2.0
aeonick/skyin
blog/mylib.py
1
8661
# -*- coding: utf-8 -*- from blogDB import get_db class blogInfo: def __init__(self): blogdb = get_db() cur = blogdb.cursor() cur.execute('SELECT id,content from info order by id') temp = cur.fetchall() self.title=temp[4][1] self.subtitle=temp[3][1] self.pass...
apache-2.0
jpablobr/emacs.d
vendor/misc/emacs-skype/build/Skype4Py/Skype4Py/sms.py
21
7879
"""Short messaging system. """ __docformat__ = 'restructuredtext en' from utils import * class SmsMessage(Cached): """Represents an SMS message. """ _ValidateHandle = int def __repr__(self): return Cached.__repr__(self, 'Id') def _Alter(self, AlterName, Args=None): return self....
gpl-3.0
toudi/katana
test/test_communication.py
1
1067
from unittest import TestCase import socket from json import loads, dumps from uuid import UUID INVALID_OPERATION = { 'status': 'error', 'message': 'Invalid operation' } class CommunicationTestCase(TestCase): def send(self, message): s = socket.socket(socket.AF_UNIX) s.connect('katana.sock...
mit
nagyistoce/photivo
scons-local-2.2.0/SCons/Tool/textfile.py
14
6079
# -*- python -*- # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # 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 restri...
gpl-3.0
Robert904/pymumble
callbacks.py
3
3905
# -*- coding: utf-8 -*- from errors import UnknownCallbackError from constants import * class CallBacks(dict): """ Define the callbacks that can be registered by the application. Multiple functions can be assigned to a callback using "add_callback" The call is done from within the pymumble loop threa...
gpl-3.0
Xowap/ansible
lib/ansible/utils/vars.py
55
2382
# (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
mims2707/bite-project
deps/mrtaskman/server/mapreduce/lib/graphy/pie_chart.py
77
6233
#!/usr/bin/env python # # Copyright 2008 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 ...
apache-2.0
arskom/pyubl
ubl/const/__init__.py
1
1607
# encoding: utf8 # # Copyright (c), Arskom Ltd. and pyubl contributors, see CONTRIBUTORS file. # 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 ...
bsd-3-clause
segmentio/npm
node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py
566
9386
# 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 _TARGET_TYPE_EXT = { 'executable': '.exe', 'loadable_module': '.dll', ...
artistic-2.0
oribaldi/graphite-intro
examples/example_graphite_pickle.py
1
2824
#!/usr/bin/python """ An application example that sends app metrics to Graphite through the Pickle protocol. Based on the example: https://github.com/graphite-project/carbon/blob/master/examples/example-pickle-client.py Author: Oriana Baldizan Date: 21.12.16 """ import re import sys import time import socket impo...
mit
nealtodd/django
tests/messages_tests/urls.py
320
2569
from django import forms from django.conf.urls import url from django.contrib import messages from django.contrib.messages.views import SuccessMessageMixin from django.core.urlresolvers import reverse from django.http import HttpResponse, HttpResponseRedirect from django.template import engines from django.template.res...
bsd-3-clause
fkolacek/FIT-VUT
bp-revok/python/lib/python2.7/encodings/cp1026.py
593
13369
""" Python Character Mapping Codec cp1026 generated from 'MAPPINGS/VENDORS/MICSFT/EBCDIC/CP1026.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,inp...
apache-2.0
mlaitinen/odoo
addons/website/tests/test_converter.py
280
8947
# -*- coding: utf-8 -*- import textwrap import unittest2 from lxml import etree, html from lxml.builder import E from openerp.tests import common from openerp.addons.base.ir import ir_qweb from openerp.addons.website.models.ir_qweb import html_to_text from openerp.addons.website.models.website import slugify, unslug ...
agpl-3.0
abridgett/boto
boto/kms/__init__.py
113
1640
# Copyright (c) 2014 Amazon.com, Inc. or its affiliates. # 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
shingonoide/odoo
addons/website_crm_partner_assign/controllers/main.py
271
7541
# -*- coding: utf-8 -*- import werkzeug from openerp import SUPERUSER_ID from openerp.addons.web import http from openerp.addons.web.http import request from openerp.addons.website.models.website import slug, unslug from openerp.tools.translate import _ class WebsiteCrmPartnerAssign(http.Controller): _references_...
agpl-3.0
clonetwin26/buck
third-party/py/pex/pex/resolvable.py
52
9765
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import os import re from abc import abstractmethod, abstractproperty from pkg_resources import Requirement, safe_extra from .base import maybe_requirement, requirement_is_exact from .com...
apache-2.0
leighpauls/k2cro4
third_party/python_26/Lib/distutils/bcppcompiler.py
53
15091
"""distutils.bcppcompiler Contains BorlandCCompiler, an implementation of the abstract CCompiler class for the Borland C++ compiler. """ # This implementation by Lyle Johnson, based on the original msvccompiler.py # module and using the directions originally published by Gordon Williams. # XXX looks like there's a L...
bsd-3-clause
jnerin/ansible
lib/ansible/modules/web_infrastructure/ansible_tower/tower_job_template.py
34
8207
#!/usr/bin/python # coding: utf-8 -*- # (c) 2017, Wayne Witzel III <wayne@riotousliving.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1...
gpl-3.0
Zen-CODE/kivy
kivy/uix/vkeyboard.py
3
29246
''' VKeyboard ========= .. image:: images/vkeyboard.jpg :align: right .. versionadded:: 1.0.8 VKeyboard is an onscreen keyboard for Kivy. Its operation is intended to be transparent to the user. Using the widget directly is NOT recommended. Read the section `Request keyboard`_ first. Modes ----- This virtual ...
mit
lddubeau/wed
selenium_test/steps/typing.py
2
4498
import re from selenium.webdriver.common.action_chains import ActionChains from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.by import By from nose.tools import assert_equal # pylint: disable=E0611 from behave import step_matcher import wedutil # Don't complain about redefined function...
mpl-2.0
stanchan/jenkins-job-builder
tests/triggers/test_triggers.py
37
1098
# Joint copyright: # - Copyright 2012,2013 Wikimedia Foundation # - Copyright 2012,2013 Antoine "hashar" Musso # - Copyright 2013 Arnaud Fabre # # 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 ...
apache-2.0
tbinjiayou/Odoo
addons/hr_attendance/__openerp__.py
52
2119
# -*- 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
bobeirasa/virtualenvs
pygeckozabbix/lib/python2.7/site-packages/setuptools/tests/test_bdist_egg.py
286
1954
"""develop tests """ import sys import os, re, shutil, tempfile, unittest import tempfile import site from distutils.errors import DistutilsError from setuptools.compat import StringIO from setuptools.command.bdist_egg import bdist_egg from setuptools.command import easy_install as easy_install_pkg from setuptools.dis...
mit
madhanrm/kubernetes
hack/boilerplate/boilerplate_test.py
629
1362
#!/usr/bin/env python # Copyright 2016 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
xin3liang/platform_external_chromium_org
build/android/install_emulator_deps.py
43
10192
#!/usr/bin/env python # 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. """Installs deps for using SDK emulator for testing. The script will download the SDK and system images, if they are not present, ...
bsd-3-clause
Alwnikrotikz/l5rcm
sinks/sink_2.py
3
4477
# Copyright (C) 2011 Daniele Simonetti # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is dist...
gpl-3.0
Maximilian-Reuter/SickRage
lib/markupsafe/tests.py
674
6107
# -*- coding: utf-8 -*- import gc import sys import unittest from markupsafe import Markup, escape, escape_silent from markupsafe._compat import text_type class MarkupTestCase(unittest.TestCase): def test_adding(self): # adding two strings should escape the unsafe one unsafe = '<script type="appl...
gpl-3.0
superchilli/webapp
venv/lib/python2.7/site-packages/sqlalchemy/dialects/mysql/oursql.py
33
8125
# mysql/oursql.py # Copyright (C) 2005-2017 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: mysql+oursql :name: OurSQL :dbapi: oursql :connectstri...
mit
2014c2g5/2014c2
exts/wsgi/static/Brython2.1.0-20140419-113919/Lib/xml/sax/xmlreader.py
824
12612
"""An XML Reader is the SAX 2 name for an XML parser. XML Parsers should be based on this code. """ from . import handler from ._exceptions import SAXNotSupportedException, SAXNotRecognizedException # ===== XMLREADER ===== class XMLReader: """Interface for reading an XML document using callbacks. XMLReade...
gpl-2.0
StartupsPoleEmploi/labonneboite
labonneboite/scripts/data_scripts/get_nb_clic_per_siret_pse.py
1
3258
import os import json from datetime import date import pandas as pd from labonneboite.scripts.impact_retour_emploi.daily_json_activity_parser import ActivityLogParser, siret class NoDataException(Exception): pass def get_clics_per_siret_main(activity_log_parser, file_path): ''' Main function which ...
agpl-3.0
shoelzer/buildbot
master/buildbot/__init__.py
7
2037
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
gpl-2.0
koblitz/django-guardian
guardian/shortcuts.py
10
18949
""" Convenient shortcuts to manage or check object permissions. """ from django.contrib.contenttypes.models import ContentType from django.db import models from django.db.models import Q from django.shortcuts import _get_queryset from itertools import groupby from guardian.core import ObjectPermissionChecker from gua...
bsd-2-clause
danmar/cppcheck
htmlreport/test_htmlreport.py
2
3595
#!/usr/bin/env python """Test cppcheck-htmlreport.""" import os import contextlib import shutil import subprocess import sys import tempfile if sys.version_info < (2, 7): # For TestCase.assertIn(). import unittest2 as unittest else: import unittest ROOT_DIR = os.path.split(os.path.abspath(os.path.dirname...
gpl-3.0
MangoMangoDevelopment/neptune
lib/ros_comm-1.12.0/tools/roslaunch/test/unit/test_roslaunch_launch.py
2
7592
# Software License Agreement (BSD License) # # Copyright (c) 2008, Willow Garage, 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...
bsd-3-clause
google-code-export/dojango
dojango/conf/settings.py
3
7697
import os from django.conf import settings DEBUG = getattr(settings, "DEBUG", False) DEFAULT_CHARSET = getattr(settings, 'DEFAULT_CHARSET', 'utf-8') DOJO_VERSION = getattr(settings, "DOJANGO_DOJO_VERSION", "1.6.0") DOJO_PROFILE = getattr(settings, "DOJANGO_DOJO_PROFILE", "google") DOJO_MEDIA_URL = getattr(settings, ...
bsd-3-clause
BillWang139967/Starfish
x-luo/run_daemon.py
1
1767
#!/usr/bin/env python import os import sys import importlib from xlib import daemon root_path = os.path.split(os.path.realpath(__file__))[0] os.chdir(root_path) module = ["agent","server"] def usage(): print "usage: run_daemon.py agent|server start|stop|restart|status" sys.exit(2) def main(): if len(s...
gpl-3.0
Dandandan/wikiprogramming
jsrepl/extern/python/closured/lib/python2.7/_weakrefset.py
135
6389
# Access WeakSet through the weakref module. # This code is separated-out because it is needed # by abc.py to load everything else at startup. from _weakref import ref __all__ = ['WeakSet'] class _IterationGuard(object): # This context manager registers itself in the current iterators of the # weak containe...
mit
0312birdzhang/opencc-for-sailfish
deps/gtest-1.7.0/test/gtest_catch_exceptions_test.py
2139
9901
#!/usr/bin/env python # # Copyright 2010 Google Inc. All Rights Reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list o...
apache-2.0
JVillella/tensorflow
tensorflow/contrib/boosted_trees/python/kernel_tests/stats_accumulator_ops_test.py
34
17040
# 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 applica...
apache-2.0
marissazhou/django
tests/signed_cookies_tests/tests.py
288
2768
from __future__ import unicode_literals from django.core import signing from django.http import HttpRequest, HttpResponse from django.test import SimpleTestCase, override_settings from django.test.utils import freeze_time class SignedCookieTest(SimpleTestCase): def test_can_set_and_read_signed_cookies(self): ...
bsd-3-clause
68foxboris/enigma2-openpli-vuplus
lib/python/Screens/Rc.py
12
2569
from Components.Pixmap import MovingPixmap, MultiPixmap from Tools.Directories import resolveFilename, SCOPE_SKIN from xml.etree.ElementTree import ElementTree from Components.config import config, ConfigInteger from Components.RcModel import rc_model config.misc.rcused = ConfigInteger(default = 1) class Rc: def __i...
gpl-2.0
ashishtanwer/DFS
conf/trafficmatrixReader_backup3.py
1
2728
#!/usr/bin/python import random fi = open("traffic_matrix_001", "r") fo = open("traffic_matrix_001.dot", "wb") fo.write("graph test {\n") print "graph test {\n" fo.write("\nflowexport=text\n") print "\nflowexport=text\n" RouterDict = dict() for line in fi: if line!= "": counter=0 Lin...
gpl-2.0
abhishekarora12/ansible
lib/ansible/parsing/__init__.py
18
11050
# (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
drpngx/tensorflow
tensorflow/contrib/sparsemax/python/ops/sparsemax.py
19
2598
# 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
viaict/viaduct
app/models/base_model.py
1
5425
""" Extra functionality that is used by all models. It extends db.Model with extra functions. """ import dateutil.parser from datetime import datetime from sqlalchemy.exc import SQLAlchemyError from typing import Any, Tuple from app import db from app.utils.serialize_sqla import serialize_sqla class BaseEntity(obje...
mit
dataxu/ansible
test/units/modules/network/nxos/test_nxos_switchport.py
51
3526
# (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) any later version. # # Ansible is dis...
gpl-3.0
joeythesaint/yocto-autobuilder
lib/python2.7/site-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/internet/_pollingfile.py
18
8883
# -*- test-case-name: twisted.internet.test.test_pollingfile -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Implements a simple polling interface for file descriptors that don't work with select() - this is pretty much only useful on Windows. """ from zope.interface import implements ...
gpl-2.0
okami-1/python-dnssec
dnssec/defs.py
1
4584
# Copyright (C) 2015 Okami, okami@fuzetsu.info # 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 distr...
gpl-3.0
pyparallel/numpy
numpy/lib/tests/test_ufunclike.py
188
2024
from __future__ import division, absolute_import, print_function import numpy.core as nx import numpy.lib.ufunclike as ufl from numpy.testing import ( run_module_suite, TestCase, assert_, assert_equal, assert_array_equal ) class TestUfunclike(TestCase): def test_isposinf(self): a = nx.array([nx....
bsd-3-clause
EricSB/nupic
examples/opf/clients/hotgym/anomaly/model_params.py
3
8788
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
agpl-3.0
ptemplier/ansible
lib/ansible/modules/web_infrastructure/apache2_module.py
15
7074
#!/usr/bin/python # coding: utf-8 -*- # (c) 2013-2014, Christian Berendt <berendt@b1-systems.de> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': ...
gpl-3.0
slevenhagen/odoo
addons/knowledge/__openerp__.py
261
1738
# -*- 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
yaph/github-data-challenge
language_correlation/d3.py
1
1144
# -*- coding: utf-8 -*- import csv, json # build langs dict langs = {} flangs = open('top_langs.json') top_langs = json.load(flangs) idx = 0 # zero-based index for tl in top_langs: if int(tl['pushes']) >= 100000: langs[tl['repository_language']] = {'id': idx, 'size': tl['pushes'], 'links': []} idx ...
mit
yamahata/neutron
neutron/agent/linux/utils.py
9
4436
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Locaweb. # 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/licens...
apache-2.0
gabrielelanaro/pyquante
PyQuante/Basis/sto3g.py
3
62358
"""\ basis_sto3g.dat basis set for use with PyQuante This program is part of the PyQuante quantum chemistry program suite. Copyright (c) 2004, Richard P. Muller. All Rights Reserved. PyQuante version 1.2 and later is covered by the modified BSD license. Please see the file LICENSE that is part of this distrib...
bsd-3-clause
medspx/QGIS
python/user.py
6
4679
# -*- coding: utf-8 -*- """ *************************************************************************** user.py --------------------- Date : January 2015 Copyright : (C) 2015 by Nathan Woodrow Email : woodrow dot nathan at gmail dot com ********************...
gpl-2.0
geobricks/geobricks_trmm
geobricks_trmm/resources/trmm_schema.py
1
6243
schema = { "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "title": "TRMM", "description": "Tropical Rainfall Measuring Mission.", "definitions": { "href": { "title": "Endpoint", "description": "Relative path to the service.", "type...
gpl-2.0
penzance/quis
quis/settings/base.py
1
7227
""" Django settings for quis project. Generated by 'django-admin startproject' using Django 1.9.5 of TLT template. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ im...
mit
fabian4/trove
trove/db/sqlalchemy/migrate_repo/schema.py
4
2608
# 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 requ...
apache-2.0
bop/rango
lib/python2.7/site-packages/django/contrib/gis/gdal/prototypes/srs.py
219
3498
from ctypes import c_char_p, c_int, c_void_p, POINTER from django.contrib.gis.gdal.libgdal import lgdal, std_call from django.contrib.gis.gdal.prototypes.generation import (const_string_output, double_output, int_output, srs_output, string_output, void_output) ## Shortcut generation for routines with known paramet...
gpl-2.0
spcs/synaps
synaps/auth/ldapdriver.py
1
28673
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
apache-2.0
jfarrell/thrift
lib/py/src/transport/TTwisted.py
30
10904
# # 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
jainanisha90/WeVoteServer
office/views_admin.py
1
57667
# office/views_admin.py # Brought to you by We Vote. Be good. # -*- coding: UTF-8 -*- from .controllers import add_contest_office_name_to_next_spot, fetch_duplicate_office_count, \ find_duplicate_contest_office, figure_out_office_conflict_values, merge_if_duplicate_offices, \ offices_import_from_master_server ...
mit
jordanemedlock/psychtruths
temboo/Library/Twitter/DirectMessages/DirectMessagesSent.py
5
6163
# -*- coding: utf-8 -*- ############################################################################### # # DirectMessagesSent # Retrieves the 20 most recent direct messages sent by the authenticating user. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version...
apache-2.0
milinbhakta/flaskjinja
flask1/Lib/site-packages/werkzeug/datastructures.py
122
87447
# -*- coding: utf-8 -*- """ werkzeug.datastructures ~~~~~~~~~~~~~~~~~~~~~~~ This module provides mixins and classes with an immutable interface. :copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import re import codecs import ...
gpl-2.0
maybelinot/df2gspread
tests/test_df2gspread.py
1
16942
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: Eduard Trott # @Date: 2015-09-16 13:25:41 # @Email: etrott@redhat.com # @Last modified by: etrott # @Last Modified time: 2016-03-08 12:38:03 import pytest # MAKE THIS SO IT ONLY EVER GETS RUN ONCE PER "SESSION" def test_global_import(): from df2gsprea...
gpl-3.0
tomkralidis/geonode
geonode/compat.py
6
1429
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2020 OSGeo # # 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 ...
gpl-3.0
giggsey/SickRage
lib/github/Organization.py
28
28358
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Steve English <steve.english@navetas.com> # # Copyright 2012 Vincent Jacques <vincent@vincent-ja...
gpl-3.0
nuagenetworks/tempest
tempest/lib/services/compute/security_group_rules_client.py
1
1793
# 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