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
rdaton/ARS2015
otroScript.py
1
3473
#!/usr/bin/python2 # -*- coding: utf-8 -*- ##intento import cElementTree que es código nativo import sys reload(sys) sys.setdefaultencoding('utf-8') import csv import os import glob try: import xml.etree.cElementTree as ET except ImportError: import xml.etree.ElementTree as ET """ Creado 1 de Diciembre 2015 @...
gpl-3.0
lincolnloop/emailed-me
lib/werkzeug/routing.py
25
55181
# -*- 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...
bsd-3-clause
zmaruo/coreclr
src/pal/automation/compile.py
154
2660
import logging as log import sys import getopt import os import subprocess import shutil def RunCMake(workspace, target, platform): # run CMake print "\n==================================================\n" returncode = 0 if platform == "windows": print "Running: vcvarsall.bat x86_amd64 && " +...
mit
Windowsfreak/OpenNI2
Packaging/ReleaseVersion.py
32
6788
#!/usr/bin/python #/**************************************************************************** #* * #* OpenNI 2.x Alpha * #* Copyright (C) 2012 PrimeSense Ltd. ...
apache-2.0
iho/wagtail
wagtail/wagtailcore/migrations/0014_add_verbose_name.py
26
4031
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0013_update_golive_expire_help_text'), ] operations = [ migrations.AlterField( model_name='groupp...
bsd-3-clause
samuellefever/server-tools
cron_run_manually/ir_cron.py
42
2778
# -*- coding: utf-8 -*- # OpenERP, Open Source Management Solution # This module copyright (C) 2013 Therp BV (<http://therp.nl>) # Code snippets from openobject-server copyright (C) 2004-2013 OpenERP S.A. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Ge...
agpl-3.0
andreadean5/python-hpOneView
hpOneView/resources/servers/id_pools_vsn_ranges.py
1
1946
# -*- coding: utf-8 -*- ### # (C) Copyright (2012-2016) Hewlett Packard Enterprise Development LP # # 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 limi...
mit
kaday/rose
lib/python/rose/macros/duplicate.py
1
3415
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # (C) British Crown Copyright 2012-6 Met Office. # # This file is part of Rose, a framework for meteorological suites. # # Rose is free software: you can redistribute it and/or modify # it under the terms of the GNU ...
gpl-3.0
Alwnikrotikz/pmx
scripts/DTI_analysis.py
2
88009
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" > <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" > <meta name="ROBOTS" content="NOARCHIVE"> <link rel="icon" type="image/vnd.microsoft.icon" href="https://ssl.gstatic.com/codesite/ph/images/phosti...
lgpl-3.0
wwj718/ANALYSE
cms/envs/aws.py
4
11519
""" This is the default template for our main set of AWS servers. """ # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files # pylint: disable=W0401, W0614 import json from .common import * from logsettings import get_logger_config import os from p...
agpl-3.0
maohongyuan/kbengine
kbe/res/scripts/common/Lib/test/test_email/test__encoded_words.py
123
6387
import unittest from email import _encoded_words as _ew from email import errors from test.test_email import TestEmailBase class TestDecodeQ(TestEmailBase): def _test(self, source, ex_result, ex_defects=[]): result, defects = _ew.decode_q(source) self.assertEqual(result, ex_result) self.a...
lgpl-3.0
iamprakashom/offlineimap
offlineimap/folder/GmailMaildir.py
10
13398
# Maildir folder support with labels # Copyright (C) 2002 - 2011 John Goerzen & contributors # # 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 # (...
gpl-2.0
PeterWangIntel/chromium-crosswalk
native_client_sdk/src/tools/tests/create_nmf_test.py
3
19466
#!/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 json import os import posixpath import shutil import subprocess import sys import tempfile import unittest SCRIPT_DIR = os.p...
bsd-3-clause
adityacs/ansible
lib/ansible/modules/network/nxos/nxos_mtu.py
11
11446
#!/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
drufat/sympy
sympy/physics/mechanics/kane.py
6
37043
from __future__ import print_function, division from sympy import zeros, Matrix, diff, solve_linear_system_LU, eye from sympy.core.compatibility import range from sympy.utilities import default_sort_key from sympy.physics.vector import (ReferenceFrame, dynamicsymbols, partial_velocity...
bsd-3-clause
kevin8909/xjerp
openerp/addons/account/account_invoice.py
9
96259
# -*- 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
lakewood999/Ciphers
rcipherx.py
1
5693
''' ================================================================================================= R Cipher Suite Includes all variants of the R cipher ================================================================================================= Developed by: ProgramRandom, a division of RandomCorporations A Pa...
mit
eahneahn/free
lib/python2.7/site-packages/pygments/styles/vim.py
364
1976
# -*- coding: utf-8 -*- """ pygments.styles.vim ~~~~~~~~~~~~~~~~~~~ A highlighting style for Pygments, inspired by vim. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.style import Style from pygments.token import Keywor...
agpl-3.0
SnappyDataInc/spark
examples/src/main/python/mllib/fpgrowth_example.py
158
1280
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
apache-2.0
webjunkie/python-social-auth
social/backends/slack.py
68
2414
""" Slack OAuth2 backend, docs at: http://psa.matiasaguirre.net/docs/backends/slack.html https://api.slack.com/docs/oauth """ import re from social.backends.oauth import BaseOAuth2 class SlackOAuth2(BaseOAuth2): """Slack OAuth authentication backend""" name = 'slack' AUTHORIZATION_URL = 'https://...
bsd-3-clause
DESHRAJ/crowdsource-platform
crowdsourcing/models.py
4
22804
from django.contrib.auth.models import User from django.db import models from django.utils import timezone from oauth2client.django_orm import FlowField, CredentialsField from crowdsourcing.utils import get_delimiter import pandas as pd import os class RegistrationModel(models.Model): user = models.OneToOneField(...
mit
andela-bojengwa/talk
venv/lib/python2.7/site-packages/pip/req/req_set.py
79
24967
from __future__ import absolute_import import logging import os from pip._vendor import pkg_resources from pip._vendor import requests from pip.download import (url_to_path, unpack_url) from pip.exceptions import (InstallationError, BestVersionAlreadyInstalled, DistributionNotFound, Previ...
mit
apurvbhartia/gnuradio-routing
gr-wxgui/grc/top_block_gui.py
18
2250
# Copyright 2008, 2009 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) # any later version....
gpl-3.0
borisroman/vdsm
vdsm_hooks/ovs/ovs_after_network_setup_fail.py
1
1636
#!/usr/bin/env python # Copyright 2015 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 ...
gpl-2.0
40223220/2015_cdb_g7_40223220
static/Brython3.1.1-20150328-091302/Lib/xml/sax/__init__.py
637
3505
"""Simple API for XML (SAX) implementation for Python. This module provides an implementation of the SAX 2 interface; information about the Java version of the interface can be found at http://www.megginson.com/SAX/. The Python version of the interface is documented at <...>. This package contains the following modu...
gpl-3.0
tntnatbry/tensorflow
tensorflow/contrib/learn/python/learn/estimators/state_saving_rnn_estimator.py
9
38410
# 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
TripleDogDare/RadioWCSpy
env/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.py
153
9905
'''SSL with SNI_-support for Python 2. Follow these instructions if you would like to verify SSL certificates in Python 2. Note, the default libraries do *not* do certificate checking; you need to do additional work to validate certificates yourself. This needs the following packages installed: * pyOpenSSL (tested wi...
mit
elkingtonmcb/scikit-learn
sklearn/feature_selection/tests/test_feature_select.py
103
22297
""" Todo: cross-check the F-value with stats model """ from __future__ import division import itertools import warnings import numpy as np from scipy import stats, sparse from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_almost_equal from sklearn.utils.testing import assert_raises...
bsd-3-clause
jnishi/chainer
chainer/links/connection/lstm.py
2
12108
import six import chainer from chainer.backends import cuda from chainer.functions.activation import lstm from chainer.functions.array import concat from chainer.functions.array import split_axis from chainer import initializers from chainer import link from chainer.links.connection import linear from chainer import u...
mit
israeltobias/DownMedia
youtube-dl/youtube_dl/extractor/atresplayer.py
5
7688
from __future__ import unicode_literals import time import hmac import hashlib import re from .common import InfoExtractor from ..compat import compat_str from ..utils import ( ExtractorError, float_or_none, int_or_none, sanitized_Request, urlencode_postdata, xpath_text, ) class AtresPlayerI...
gpl-3.0
ocadotechnology/django-forge
forge/views/v3.py
2
4771
import urllib import urlparse from django.core.paginator import Paginator from django.core.urlresolvers import reverse from .utils import json_response from ..models import Author, Module, Release ## Helper methods def error_response(errors, **kwargs): """ Returns an error response for v3 Forge API. ""...
apache-2.0
wouwei/PiLapse
picam/picamEnv/Lib/site-packages/pip/req/req_install.py
50
45589
from __future__ import absolute_import import logging import os import re import shutil import sys import tempfile import traceback import warnings import zipfile from distutils import sysconfig from distutils.util import change_root from email.parser import FeedParser from pip._vendor import pkg_resources, six from...
apache-2.0
talbrecht/pism_pik07
site-packages/PISM/options.py
2
8548
# Copyright (C) 2011, 2014, 2015 David Maxwell # # This file is part of PISM. # # PISM 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
armab/st2contrib
packs/opsgenie/actions/list_users.py
4
1144
# 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 "License"); you may not use th...
apache-2.0
Linaro/squad
squad/core/migrations/0028_suite_and_test_name_length.py
2
1629
# -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2017-06-06 15:14 from __future__ import unicode_literals import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0027_project_notification_strategy'), ] opera...
agpl-3.0
zorroz/microblog
flask/lib/python2.7/site-packages/sqlalchemy/testing/fixtures.py
32
10721
# testing/fixtures.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 from . import config from . import assertions, schema from .util import adict fr...
bsd-3-clause
cneumann/vrjuggler
modules/gadgeteer/tools/matrix_solver/matrix_solver.py
7
3642
""" Matrix Solver Parses a calibration table and solves the equations for the alpha constants used in the Hardy's Multi-Quadric method of calibration. """ import os, sys, string from math import sqrt from xml.dom import * from xml.dom.minidom import * import Numeric, LinearAlgebra # Define useful functions def length(...
lgpl-2.1
pilou-/ansible
lib/ansible/modules/network/aci/aci_contract_subject.py
22
10735
#!/usr/bin/python # -*- coding: utf-8 -*- # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
gpl-3.0
georgid/sms-tools
lectures/5-Sinusoidal-model/plots-code/sine-analysis-synthesis.py
2
1538
import numpy as np import matplotlib.pyplot as plt from scipy.signal import hamming, triang, blackmanharris import sys, os, functools, time from scipy.fftpack import fft, ifft, fftshift sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../../../software/models/')) import dftModel as DFT import ...
agpl-3.0
commtrack/temp-aquatest
apps/user_registration/forms.py
1
4996
""" Forms and validation code for user user_registration. """ from django.contrib.auth.models import User from django import forms from django.utils.translation import ugettext_lazy as _ # I put this on all required fields, because it's easier to pick up # on them with CSS or JavaScript if they have a ...
bsd-3-clause
sg00dwin/origin
vendor/github.com/google/certificate-transparency/python/ct/crypto/asn1/x509_extension.py
34
7546
"""ASN.1 specification for X509 extensions.""" from ct.crypto.asn1 import named_value from ct.crypto.asn1 import oid from ct.crypto.asn1 import tag from ct.crypto.asn1 import types from ct.crypto.asn1 import x509_common from ct.crypto.asn1 import x509_name # Standard extensions from RFC 5280. class BasicConstraints(...
apache-2.0
dkroy/luigi
luigi/six.py
65
29796
"""Utilities for writing code that runs on Python 2 and 3 In luigi, we hard-copy this file into the project itself, to ensure that all luigi users use the same version of six. """ # Copyright (c) 2010-2015 Benjamin Peterson # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this so...
apache-2.0
kalxas/geonode
geonode/base/api/pagination.py
6
1935
# -*- 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
joshblum/django-with-audit
django/contrib/localflavor/ar/forms.py
87
4024
# -*- coding: utf-8 -*- """ AR-specific Form helpers. """ from __future__ import absolute_import from django.contrib.localflavor.ar.ar_provinces import PROVINCE_CHOICES from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import RegexField, CharField, Selec...
bsd-3-clause
xapp-le/kernel
tools/perf/scripts/python/sched-migration.py
11215
11670
#!/usr/bin/python # # Cpu task migration overview toy # # Copyright (C) 2010 Frederic Weisbecker <fweisbec@gmail.com> # # perf script event handlers have been generated by perf script -g python # # This software is distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Fre...
gpl-2.0
yamila-moreno/django
django/templatetags/i18n.py
16
18205
from __future__ import unicode_literals import sys from django.conf import settings from django.template import Library, Node, TemplateSyntaxError, Variable from django.template.base import TOKEN_TEXT, TOKEN_VAR, render_value_in_context from django.template.defaulttags import token_kwargs from django.utils import six...
bsd-3-clause
SublimeText-Markdown/MarkdownEditing
references.py
1
26853
""" Commands related to links, references and footnotes. Exported commands: ReferenceJumpCommand ReferenceJumpContextCommand ReferenceNewReferenceCommand ReferenceNewInlineLinkCommand ReferenceNewInlineImage ReferenceNewImage ReferenceNewFootnote ReferenceDeleteReference ReferenceOr...
mit
gdelpierre/ansible-modules-core
utilities/helper/meta.py
11
3274
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Ansible, a Red Hat company # # 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, o...
gpl-3.0
tangentlabs/wagtail
wagtail/wagtailsearch/tests/test_backends.py
18
7650
import unittest import time from django.test import TestCase from django.test.utils import override_settings from django.conf import settings from django.core import management from django.utils.six import StringIO from wagtail.tests.utils import WagtailTestUtils from wagtail.tests.search import models from wagtail.w...
bsd-3-clause
kxliugang/edx-platform
common/djangoapps/util/model_utils.py
31
6782
""" Utilities for django models. """ import unicodedata import re from eventtracking import tracker from django.conf import settings from django.utils.encoding import force_unicode from django.utils.safestring import mark_safe from django_countries.fields import Country # The setting name used for events when "sett...
agpl-3.0
thaole16/Boids
boids/boids.py
1
4866
""" A refactored implementation of Boids from a deliberately bad implementation of [Boids](http://dl.acm.org/citation.cfm?doid=37401.37406): an exercise for class. """ from matplotlib import pyplot as plt from matplotlib import animation import numpy as np class Boids(object): def __init__(self, ...
mit
Eric-Zhong/odoo
addons/resource/faces/utils.py
433
3231
############################################################################ # Copyright (C) 2005 by Reithinger GmbH # mreithinger@web.de # # This file is part of faces. # # faces is free software; you can redistribute it and/or modify # ...
agpl-3.0
fhaoquan/kbengine
kbe/src/lib/python/Lib/difflib.py
72
81679
""" Module difflib -- helpers for computing deltas between objects. Function get_close_matches(word, possibilities, n=3, cutoff=0.6): Use SequenceMatcher to return list of the best "good enough" matches. Function context_diff(a, b): For two lists of strings, return a delta in context diff format. Function nd...
lgpl-3.0
Bionetbook/bionetbook
bnbapp/bionetbook/protocols/forms/verbs/resuspend.py
2
1489
from protocols.forms import forms from core.utils import VOLUME_UNITS, CONCENTRATION_UNITS, TIME_UNITS class ResuspendForm(forms.VerbForm): name = "Resuspend" slug = "resuspend" # has_component = True has_manual = True layers = ['item_to_act', 'reagent', 'settify'] item_to_act = forms.CharFie...
mit
EKiefer/edge-starter
py34env/Lib/site-packages/authtools/views.py
4
11578
""" Mostly equivalent to the views from django.contrib.auth.views, but implemented as class-based views. """ from __future__ import unicode_literals import warnings from django.conf import settings from django.contrib.auth import get_user_model, REDIRECT_FIELD_NAME from django.contrib.auth.decorators import login_requ...
mit
larsmans/numpy
numpy/random/tests/test_random.py
9
31521
from __future__ import division, absolute_import, print_function import numpy as np from numpy.testing import ( TestCase, run_module_suite, assert_, assert_raises, assert_equal, assert_warns) from numpy import random from numpy.compat import asbytes import sys class TestSeed(TestCase): def test_sc...
bsd-3-clause
jhseu/tensorflow
tensorflow/python/kernel_tests/summary_ops_test.py
6
46187
# 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
Ziqi-Li/bknqgis
pandas/pandas/tests/io/parser/quoting.py
18
5813
# -*- coding: utf-8 -*- """ Tests that quoting specifications are properly handled during parsing for all of the parsers defined in parsers.py """ import csv import pandas.util.testing as tm from pandas import DataFrame from pandas.compat import PY3, StringIO, u class QuotingTests(object): def test_bad_quote_...
gpl-2.0
bailey1234/hyeri7846
lib/werkzeug/wsgi.py
312
37386
# -*- coding: utf-8 -*- """ werkzeug.wsgi ~~~~~~~~~~~~~ This module implements WSGI related helpers. :copyright: (c) 2013 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import re import os import sys import posixpath import mimetypes from itert...
apache-2.0
cjayb/mne-python
mne/channels/montage.py
1
41279
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Denis Engemann <denis.engemann@gmail.com> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # Eric Larson <larson.eric.d@gmail.com> # Marijn van Vliet <w.m.vanvliet@gmail.com> # Jona Sassenhagen <jona.sassenhagen@gmai...
bsd-3-clause
publicus/pelican-plugins
liquid_tags/mdx_liquid_tags.py
281
3447
""" Markdown Extension for Liquid-style Tags ---------------------------------------- A markdown extension to allow user-defined tags of the form:: {% tag arg1 arg2 ... argn %} Where "tag" is associated with some user-defined extension. These result in a preprocess step within markdown that produces either markdo...
agpl-3.0
kytvi2p/Sigil
3rdparty/python/Lib/test/test_script_helper.py
8
5187
"""Unittests for test.script_helper. Who tests the test helper?""" import subprocess import sys from test import script_helper import unittest from unittest import mock class TestScriptHelper(unittest.TestCase): def test_assert_python_expect_success(self): t = script_helper._assert_python(True, '-c', 'i...
gpl-3.0
0asa/scikit-learn
sklearn/feature_selection/univariate_selection.py
5
18520
"""Univariate features selection.""" # Authors: V. Michel, B. Thirion, G. Varoquaux, A. Gramfort, E. Duchesnay. # L. Buitinck, A. Joly # License: BSD 3 clause import numpy as np import warnings from scipy import special, stats from scipy.sparse import issparse from ..base import BaseEstimator from ..prepr...
bsd-3-clause
ric2b/Vivaldi-browser
chromium/tools/binary_size/libsupersize/concurrent_test.py
2
5418
#!/usr/bin/env python # Copyright 2017 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 os import threading import unittest import concurrent def _ForkTestHelper(arg1, arg2, pickle_me_not, test_instance, parent_pi...
bsd-3-clause
quarkslab/irma
probe/tests/probe/controllers/test_ftpctrl.py
1
1780
from unittest import TestCase from mock import patch, MagicMock, call import probe.controllers.ftpctrl as module from irma.common.base.exceptions import IrmaFtpError class TestFtpctrl(TestCase): @patch("probe.controllers.ftpctrl.os.path.isdir") @patch('probe.controllers.ftpctrl.config.IrmaSFTPv2') def te...
apache-2.0
thanatoskira/cansina
core/payload.py
2
3505
import threading import Queue import time from core.task import Task def _populate_list_with_file(file_name): """ Open a file, read its content and strips it. Returns a list with the content additionally it filter and clean some splinters """ with open(file_name, 'r') as f: tmp_list = f.r...
gpl-3.0
willseward/cattle
tests/integration/cattletest/core/test_user_preferences.py
8
2401
from common_fixtures import * # NOQA from gdapi import ApiError @pytest.fixture(scope='module') def user_client(context): return context.user_client def _user_preference(client, name=None): if name is None: name = random_str() preference = client.wait_success(client.create_user_preference( ...
apache-2.0
mdublin/Brightcove-Dynamic-Ingest-App
ENV/lib/python2.7/site-packages/pip/_vendor/packaging/__about__.py
441
1073
# Copyright 2014 Donald Stufft # # 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, so...
mit
Enucatl/pilatus-experiments
scripts/time_series2csv.py
1
1133
"""Read the time series and output a csv""" import argparse import h5py import csv import sys import numpy as np parser = argparse.ArgumentParser( __doc__, formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument( "file", nargs=1, help="hdf5 file" ) if __name__ == '__main__': ...
gpl-3.0
redhat-performance/tuned
tuned/plugins/plugin_irqbalance.py
1
3151
from . import base from .decorators import command_custom from tuned import consts import tuned.logs import errno import perf import re log = tuned.logs.get() class IrqbalancePlugin(base.Plugin): """ Plugin for irqbalance settings management. """ def __init__(self, *args, **kwargs): super(IrqbalancePlugin, sel...
gpl-2.0
cellus-sas/heavy-encypted-chat
http_side/runkey.py
1
8371
#!/usr/bin/env python # -*- coding: UTF-8 -*- #need python-crypto,py-crypto,python-keyzcar # from Crypto.Cipher import DES3 from Crypto.Cipher import AES from Crypto import Random from hashlib import md5 from hashlib import sha256 import os import time import pickle local=False def des3_encrypt_file(in_filename, out...
mit
rggjan/gegl-global-matting
bindings/pygegl/Gegl/__init__.py
7
1702
# PyGEGL - Python bindings for the GEGL image processing library # Copyright (C) 2007 Manish Singh # # __init__.py: initialization file for the Gegl package # # PyGEGL 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 Softw...
gpl-3.0
Natim/sentry
tests/sentry/api/endpoints/test_project_group_index.py
8
19043
from __future__ import absolute_import from datetime import timedelta from django.core.urlresolvers import reverse from django.utils import timezone from mock import patch from sentry.models import ( EventMapping, Group, GroupBookmark, GroupSeen, GroupStatus ) from sentry.testutils import APITestCase from sentry....
bsd-3-clause
gigglesninja/senior-design
MAVProxy/MAVProxy/modules/lib/mp_menu.py
4
10663
#!/usr/bin/env python ''' menu handling widgets for wx Andrew Tridgell November 2013 ''' import wx from MAVProxy.modules.lib import mp_util class MPMenuGeneric(object): '''a MP menu separator''' def __init__(self): pass def find_selected(self, event): return None def _append(self, m...
gpl-2.0
eusi/MissionPlanerHM
Lib/site-packages/scipy/ndimage/interpolation.py
55
25609
# Copyright (C) 2003-2005 Peter J. Verveer # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following d...
gpl-3.0
ToonTownInfiniteRepo/ToontownInfinite
toontown/minigame/DistributedIceGameAI.py
2
15666
from pandac.PandaModules import Point3 from direct.distributed.ClockDelta import globalClockDelta from direct.fsm import ClassicFSM, State from direct.task import Task from toontown.minigame import DistributedMinigameAI from toontown.minigame import MinigameGlobals from toontown.minigame import IceGameGlobals from toon...
mit
msbeta/apollo
modules/tools/prediction/data_pipelines/common/rotation2d.py
3
1121
#!/usr/bin/env python ############################################################################### # Copyright 2018 The Apollo 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 ...
apache-2.0
ikrauchanka/flask-jsonrpc
examples/flask-httpauth/auth.py
2
2733
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2012-2015, Cenobit Technologies, Inc. http://cenobit.es/ # 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 sour...
bsd-3-clause
KontorConsulting/odoo
addons/account_accountant/__init__.py
892
1046
# -*- 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
willzhang05/postgrestesting1
postgrestesting1/lib/python3.5/site-packages/django/conf/locale/it/formats.py
115
2079
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'd F Y' # 25 Ottobre 2006 TIME_FO...
mit
hifly/OpenUpgrade
addons/account/wizard/account_report_general_journal.py
378
1697
# -*- 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
kidaa/aurora
src/test/python/apache/thermos/monitoring/test_resource.py
8
3705
# # 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 # distributed under ...
apache-2.0
sanderator/lab-o-matic
test/test_lab_o_matic/test_compiler.py
1
1208
''' Created on May 8, 2011 @author: sander ''' import os.path import shutil import sys ''' nose.tools has to be imported into the Eclipse project, eg, from /usr/local/lib/python2.6/dist-packages/nose-1.0.0-py2.6.egg/nose/tools.py ''' from tools import with_setup, raises, nottest import lab_o_matic.compiler paths ...
gpl-2.0
anair13/where-am-i
flaskapp/flask/bin/activate_this.py
669
1129
"""By using execfile(this_file, dict(__file__=this_file)) you will activate this virtualenv environment. This can be used when you must use an existing Python interpreter, not the virtualenv bin/python """ try: __file__ except NameError: raise AssertionError( "You must run this like execfile('path/to/...
mit
cs207-project/TimeSeries
tsdb/tsdb_constants.py
1
1455
#################################################### # # This file records all the constant variables used # in tsdb module # #################################################### OPMAP = { '<': 0, '>': 1, '==': 2, '!=': 3, '<=': 4, '>=': 5 } FILES_DIR = 'persistent_files' MAX_CARD = 8 INDEX...
mit
esthermm/odoomrp-wip
mrp_subcontracting/models/procurement_order.py
25
1258
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in root directory ############################################################################## from openerp import models, fields, api class Procurement...
agpl-3.0
sirinath/root
interpreter/llvm/src/tools/clang/bindings/python/tests/cindex/test_token_kind.py
97
1064
from clang.cindex import TokenKind from nose.tools import eq_ from nose.tools import ok_ from nose.tools import raises def test_constructor(): """Ensure TokenKind constructor works as expected.""" t = TokenKind(5, 'foo') eq_(t.value, 5) eq_(t.name, 'foo') @raises(ValueError) def test_bad_register():...
lgpl-2.1
glaubitz/fs-uae-debian
launcher/launcher/setup/setupwizarddialog.py
2
1290
import fsui from launcher.i18n import gettext from launcher.setup.setupwelcomepage import SetupWelcomePage from launcher.ui.skin import LauncherTheme from launcher.ui.widgets import PrevButton, NextButton, CloseButton class SetupWizardDialog(fsui.Window): @classmethod def open(cls, parent=None): retur...
gpl-2.0
roderickmackenzie/gpvdm
gpvdm_gui/gui/materials_main.py
1
7747
# # General-purpose Photovoltaic Device Model - a drift diffusion base/Shockley-Read-Hall # model for 1st, 2nd and 3rd generation solar cells. # Copyright (C) 2012-2017 Roderick C. I. MacKenzie r.c.i.mackenzie at googlemail.com # # https://www.gpvdm.com # Room B86 Coates, University Park, Nottingham, NG7 2RD...
gpl-2.0
rickerc/cinder_audit
cinder/tests/db/test_name_id.py
5
2344
# 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/LICENSE-2.0 # # Unless required by applicable law or agreed t...
apache-2.0
jpshort/odoo
marcos_addons/marcos_l10n_do/__init__.py
3
1085
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2013-2015 Marcos Organizador de Negocios SRL http://marcos.do # Write by Eneldo Serrata (eneldo@marcos.do) # # This program is free software: you can redistribute it and/or modify # it un...
agpl-3.0
widelands/widelands
utils/fix_formatting.py
1
4107
#!/usr/bin/env python # -*- coding: utf-8 -*- """The code base had inconsistent usage of tabs/spaces for indenting in Lua. files. Spaces were more prominent - and I prefer them over tabs. So I wrote this small script to fix leading tabs in Lua files to spaces. It also saves files in unix file endings ("\r\n") and s...
gpl-2.0
louyihua/edx-platform
lms/djangoapps/badges/migrations/0001_initial.py
17
3499
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import jsonfield.fields import badges.models from django.conf import settings import django.utils.timezone from model_utils import fields import xmodule_django.models class Migration(migrations.Migration): d...
agpl-3.0
drglove/SickRage
sickbeard/clients/rtorrent.py
2
5258
# Author: jkaberg <joel.kaberg@gmail.com>, based on fuzemans work (https://github.com/RuudBurger/CouchPotatoServer/blob/develop/couchpotato/core/downloaders/rtorrent/main.py) # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage is free software: you can redistribute it and/or modif...
gpl-3.0
zoggn/kernel_tcl_msm8610
tools/perf/python/twatch.py
7370
1334
#! /usr/bin/python # -*- python -*- # -*- coding: utf-8 -*- # twatch - Experimental use of the perf python interface # Copyright (C) 2011 Arnaldo Carvalho de Melo <acme@redhat.com> # # This application is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License...
gpl-2.0
mavenlin/tensorflow
tensorflow/python/debug/cli/cli_shared_test.py
45
15872
# 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
aforalee/RRally
rally/plugins/openstack/scenarios/murano/utils.py
2
10549
# 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 b...
apache-2.0
elelsee/pycfn-elasticsearch
pycfn_elasticsearch/vendored/docutils/utils/error_reporting.py
104
7765
#!/usr/bin/env python # -*- coding: utf-8 -*- # :Id: $Id: error_reporting.py 7668 2013-06-04 12:46:30Z milde $ # :Copyright: © 2011 Günter Milde. # :License: Released under the terms of the `2-Clause BSD license`_, in short: # # Copying and distribution of this file, with or without modification, # are permitted...
apache-2.0
xiaoyaozi5566/DynamicCache
src/mem/ruby/network/simple/SimpleLink.py
18
1846
# Copyright (c) 2011 Advanced Micro Devices, 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...
bsd-3-clause
earshel/PokeyPyManager
POGOProtos/Enums/IapItemCategory_pb2.py
16
2408
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: POGOProtos/Enums/IapItemCategory.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.prot...
mit