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
renaelectronics/linuxcnc
src/emc/usr_intf/axis/scripts/teach-in.py
5
2641
#!/usr/bin/env python """Usage: python teach.py nmlfile outputfile If outputfile is not specified, writes to standard output. You must ". scripts/rip-environment" before running this script, if you use run-in-place. """ # Copyright 2007 Jeff Epler <jepler@unpythonic.net> # # This program is free software; yo...
gpl-2.0
harayz/raspberry_pwn
src/pentest/fimap/singleScan.py
8
5441
# # This file is part of fimap. # # Copyright(c) 2009-2010 Iman Karim(ikarim2s@smail.inf.fh-brs.de). # http://fimap.googlecode.com # # This file may be licensed under the terms of of the # GNU General Public License Version 2 (the ``GPL''). # # Software distributed under the License is distributed # on an ``AS IS'' bas...
gpl-3.0
merckhung/bokken
ui/treeviews.py
3
11285
# treeviews.py # -*- coding: utf-8 -*- # # Copyright 2011 Hugo Teso <hugo.teso@gmail.com> # Copyright 2014 David Martínez Moreno <ender@debian.org> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published b...
gpl-2.0
malkoto1/just_cook
SQLAlchemy-1.0.4/lib/sqlalchemy/dialects/mysql/zxjdbc.py
59
3942
# mysql/zxjdbc.py # Copyright (C) 2005-2015 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+zxjdbc :name: zxjdbc for Jython :dbapi: zxjdbc :...
gpl-2.0
espadrine/opera
chromium/src/third_party/python_26/Tools/scripts/linktree.py
101
2425
#! /usr/bin/env python # linktree # # Make a copy of a directory tree with symbolic links to all files in the # original tree. # All symbolic links go to a special symbolic link at the top, so you # can easily fix things if the original source tree moves. # See also "mkreal". # # usage: mklinks oldtree newtree import...
bsd-3-clause
pombreda/seascope
src/backend/plugins/gtags/GtagsProject.py
2
3525
#!/usr/bin/python # Copyright (c) 2010 Anil Kumar # All rights reserved. # # License: BSD import os, string, re from ..PluginBase import PluginFeatureBase, ProjectBase, ConfigBase, QueryBase from ..PluginBase import PluginProcess from ..CtagsCache import CtagsThread class GtagsFeature(PluginFeatureBase): def __i...
bsd-3-clause
RPI-OPENEDX/edx-platform
common/test/acceptance/pages/lms/problem.py
23
5236
""" Problem Page. """ from bok_choy.page_object import PageObject class ProblemPage(PageObject): """ View of problem page. """ url = None CSS_PROBLEM_HEADER = '.problem-header' def is_browser_on_page(self): return self.q(css='.xblock-student_view').present @property def prob...
agpl-3.0
rudischilder/MAV_TU_Delft_gr10
sw/ground_segment/python/settings_app/settingsframe.py
29
6685
#Boa:Frame:PlotFrame from __future__ import division import wx import sys import os PPRZ_SRC = os.getenv("PAPARAZZI_SRC", os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), '../../../..'))) sys.path.append(PPRZ_SRC + "/sw/li...
gpl-2.0
temasek/android_external_chromium_org_third_party_WebKit
Source/devtools/scripts/generate_devtools_html.py
9
3173
#!/usr/bin/env python # # Copyright (C) 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...
bsd-3-clause
sriki18/scipy
scipy/sparse/linalg/tests/test_interface.py
38
12724
"""Test functions for the sparse.linalg.interface module """ from __future__ import division, print_function, absolute_import from functools import partial from itertools import product import operator import nose from numpy.testing import TestCase, assert_, assert_equal, \ assert_raises import numpy as np ...
bsd-3-clause
Evervolv/android_kernel_samsung_msm8660
tools/perf/scripts/python/failed-syscalls-by-pid.py
11180
2058
# failed system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide failed system call totals, broken down by pid. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.pa...
gpl-2.0
mollstam/UnrealPy
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/Python-2.7.10/Tools/framer/framer/member.py
50
1933
from framer import template from framer.util import cstring, unindent T_SHORT = "T_SHORT" T_INT = "T_INT" T_LONG = "T_LONG" T_FLOAT = "T_FLOAT" T_DOUBLE = "T_DOUBLE" T_STRING = "T_STRING" T_OBJECT = "T_OBJECT" T_CHAR = "T_CHAR" T_BYTE = "T_BYTE" T_UBYTE = "T_UBYTE" T_UINT = "T_UINT" T_ULONG = "T_ULONG" T_STRING_INPLAC...
mit
Ernesto99/odoo
addons/mrp_operations/report/mrp_code_barcode.py
381
1511
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
agpl-3.0
chusiang/git-repo
subcmds/abandon.py
48
2034
# # Copyright (C) 2008 The Android Open Source Project # # 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 la...
apache-2.0
vedujoshi/tempest
tempest/scenario/test_minimum_basic.py
1
7041
# Copyright 2013 NEC Corporation # 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 ...
apache-2.0
abhikumar22/MYBLOG
blg/Lib/site-packages/pip/utils/__init__.py
323
27187
from __future__ import absolute_import from collections import deque import contextlib import errno import io import locale # we have a submodule named 'logging' which would shadow this if we used the # regular name: import logging as std_logging import re import os import posixpath import shutil import stat import su...
gpl-3.0
UnrememberMe/pants
tests/python/pants_test/backend/project_info/tasks/resolve_jars_test_mixin.py
17
3782
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os from textw...
apache-2.0
MattsFleaMarket/python-for-android
python3-alpha/python3-src/PC/VS8.0/build_ssl.py
48
10103
# Script for building the _ssl and _hashlib modules for Windows. # Uses Perl to setup the OpenSSL environment correctly # and build OpenSSL, then invokes a simple nmake session # for the actual _ssl.pyd and _hashlib.pyd DLLs. # THEORETICALLY, you can: # * Unpack the latest SSL release one level above your main Python ...
apache-2.0
vmax-feihu/hue
desktop/core/ext-py/Pygments-1.3.1/pygments/formatters/other.py
75
3857
# -*- coding: utf-8 -*- """ pygments.formatters.other ~~~~~~~~~~~~~~~~~~~~~~~~~ Other formatters: NullFormatter, RawTokenFormatter. :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.formatter import Formatter from pygments...
apache-2.0
thurt/arangodb
3rdParty/V8-4.3.61/third_party/python_26/Lib/pty.py
109
4869
"""Pseudo terminal utilities.""" # Bugs: No signal handling. Doesn't set slave termios and window size. # Only tested on Linux. # See: W. Richard Stevens. 1992. Advanced Programming in the # UNIX Environment. Chapter 19. # Author: Steen Lumholt -- with additions by Guido. from select import select imp...
apache-2.0
jvrsantacruz/XlsxWriter
xlsxwriter/test/comparison/test_textbox16.py
8
1117
############################################################################### # # 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
mahabs/nitro
nssrc/com/citrix/netscaler/nitro/resource/config/aaa/aaasession.py
1
8759
# # Copyright (c) 2008-2015 Citrix Systems, 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 l...
apache-2.0
pschmitt/home-assistant
homeassistant/components/verisure/alarm_control_panel.py
9
3404
"""Support for Verisure alarm control panels.""" import logging from time import sleep import homeassistant.components.alarm_control_panel as alarm from homeassistant.components.alarm_control_panel.const import ( SUPPORT_ALARM_ARM_AWAY, SUPPORT_ALARM_ARM_HOME, ) from homeassistant.const import ( STATE_ALAR...
apache-2.0
Kingclove/ChannelAPI-Demo
server/lib/itsdangerous.py
296
30509
# -*- coding: utf-8 -*- """ itsdangerous ~~~~~~~~~~~~ A module that implements various functions to deal with untrusted sources. Mainly useful for web applications. :copyright: (c) 2011 by Armin Ronacher and the Django Software Foundation. :license: BSD, see LICENSE for more details. """ imp...
apache-2.0
rruebner/odoo
addons/claim_from_delivery/__init__.py
374
1053
############################################################################## # # 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 Affero General Publ...
agpl-3.0
leonevo/euao
tornadows/xmltypes.py
1
6469
#!/usr/bin/env python # # Copyright 2011 Rodrigo Ancavil del Pino # # 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
CXQERP/ODOOERP
addons/note/note.py
223
8893
# -*- 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
sivaprakashniet/push_pull
p2p/lib/python2.7/site-packages/kombu/tests/transport/virtual/test_scheduling.py
38
1835
from __future__ import absolute_import from kombu.transport.virtual.scheduling import FairCycle from kombu.tests.case import Case class MyEmpty(Exception): pass def consume(fun, n): r = [] for i in range(n): r.append(fun()) return r class test_FairCycle(Case): def test_cycle(self): ...
bsd-3-clause
J861449197/edx-platform
lms/djangoapps/staticbook/views.py
91
6351
""" Views for serving static textbooks. """ from django.contrib.auth.decorators import login_required from django.http import Http404 from edxmako.shortcuts import render_to_response from opaque_keys.edx.locations import SlashSeparatedCourseKey from xmodule.annotator_token import retrieve_token from courseware.acces...
agpl-3.0
jcpowermac/ansible
lib/ansible/module_utils/facts/hardware/linux.py
7
27299
# 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 in the hope that ...
gpl-3.0
lcpt/xc
misc/test/defSections.py
1
3450
# Source Generated with Decompyle++ # File: defSections.pyc (Python 2.7) from __future__ import division import xc_base import geom import xc from materials.ehe import EHE_materials areaFi8 = 5e-05 areaFi10 = 7.85e-05 areaFi12 = 0.000113 areaFi16 = 0.000201 areaFi20 = 0.000314 areaFi25 = 0.0004608 def getDiagIntSecti...
gpl-3.0
vainotuisk/icecreamratings
ENV/lib/python2.7/site-packages/pkg_resources/_vendor/packaging/__about__.py
101
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...
bsd-3-clause
SpectreJan/gnuradio
gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/base.py
333
6794
# # Copyright 2010 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
adityacs/ansible
test/units/plugins/connection/test_connection.py
52
6390
# (c) 2015, Toshio Kuratomi <tkuratomi@ansible.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later...
gpl-3.0
susilehtola/psi4
tests/pytests/test_addons_qcschema.py
7
65060
import json import pprint import pytest from .addons import hardware_nvidia_gpu, using import qcengine as qcng import psi4 # Notes # * options-setting NOT cummulative if a run_qcschema in between # Generating # * equivalent to test_psi4. copy over the job, then run below to generate atomicinput # atin = psi4.dri...
lgpl-3.0
upsidetravel/bucket-antivirus-function
scan_bucket.py
1
4671
#! /usr/bin/env python # -*- coding: utf-8 -*- # Upside Travel, 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 app...
apache-2.0
ecanzonieri/pyleus
examples/word_count/word_count/line_spout.py
9
1818
import logging import random from pyleus.storm import Spout log = logging.getLogger('counter') LINES = """ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur pharetra ante eget nunc blandit vestibulum. Curabitur tempus mi a risus lacinia egestas. Nulla faucibus elit vitae dignissim euismod. Fusce ac ...
apache-2.0
Smarsh/django
tests/regressiontests/templates/smartif.py
50
2175
import unittest from django.template.smartif import IfParser, Literal class SmartIfTests(unittest.TestCase): def assertCalcEqual(self, expected, tokens): self.assertEqual(expected, IfParser(tokens).parse().eval({})) # We only test things here that are difficult to test elsewhere # Many other test...
bsd-3-clause
cburgmer/eclectus
tomoeqt/handwritingwidget.py
1
12861
#!/usr/bin/python # -*- coding: utf-8 -*- """ Qt widget integrating Tegaki/Tomoe handwriting character recognition for Japanese Kanji and Chinese Hanzi. Includes a QApplication demonstrating the wiget. 10.02.2009 Christoph Burgmer (cburgmer@ira.uka.de) History: * 11.02.2009, show boundaries and keep handwriting ...
gpl-3.0
keenerd/namcap
Namcap/tests/pkgbuild/test_invalidstartdir.py
4
2034
# -*- coding: utf-8 -*- # # namcap tests - invalidstartdir # Copyright (C) 2011 Rémy Oudompheng <remy@archlinux.org> # # 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 ...
gpl-2.0
ZenDevelopmentSystems/scikit-learn
sklearn/metrics/cluster/unsupervised.py
230
8281
""" Unsupervised evaluation metrics. """ # Authors: Robert Layton <robertlayton@gmail.com> # # License: BSD 3 clause import numpy as np from ...utils import check_random_state from ..pairwise import pairwise_distances def silhouette_score(X, labels, metric='euclidean', sample_size=None, random...
bsd-3-clause
polyaxon/polyaxon
examples/quick-start/model.py
1
4890
#!/usr/bin/python # # Copyright 2018-2020 Polyaxon, 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 ...
apache-2.0
tomlof/scikit-learn
examples/svm/plot_custom_kernel.py
93
1562
""" ====================== SVM with custom kernel ====================== Simple usage of Support Vector Machines to classify a sample. It will plot the decision surface and the support vectors. """ print(__doc__) import numpy as np import matplotlib.pyplot as plt from sklearn import svm, datasets # import some data...
bsd-3-clause
orione7/plugin.video.streamondemand-pureita
lib/gdata/tlslite/utils/cryptomath.py
172
11559
"""cryptomath module This module has basic math/crypto code.""" import os import math import base64 import binascii import sha from compat import * # ************************************************************************** # Load Optional Modules # ****************************************************************...
gpl-3.0
katsikas/gnuradio
gnuradio-core/src/lib/filter/generate_gr_fir_sysconfig.py
17
3117
#!/bin/env python # -*- python -*- # # Copyright 2003,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 (...
gpl-3.0
BartoszCichecki/onlinepython
onlinepython/pypy-2.4.0-win32/lib-python/2.7/test/test_float.py
23
62308
import unittest, struct import os from test import test_support import math from math import isinf, isnan, copysign, ldexp import operator import random import fractions import sys INF = float("inf") NAN = float("nan") have_getformat = hasattr(float, "__getformat__") requires_getformat = unittest.skipUnless(have_get...
gpl-2.0
gavmain/django_demo
demo/users/views.py
95
1459
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django.core.urlresolvers import reverse from django.views.generic import DetailView, ListView, RedirectView, UpdateView from django.contrib.auth.mixins import LoginRequiredMixin from .models import User class UserDetailView(Login...
mit
yatinkumbhare/openstack-nova
nova/tests/unit/scheduler/test_scheduler_utils.py
10
15657
# Copyright (c) 2013 Rackspace Hosting # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
apache-2.0
mkieszek/odoo
openerp/addons/test_inherit/models.py
11
2179
# -*- coding: utf-8 -*- from openerp import models, fields, api, osv # We just create a new model class mother(models.Model): _name = 'test.inherit.mother' _columns = { # check interoperability of field inheritance with old-style fields 'name': osv.fields.char('Name'), 'state': osv.fie...
agpl-3.0
PredictiveScienceLab/py-mcmc
pymcmc/_mala_proposal.py
2
1960
""" This is a Metropolis Adjusted Langevin Algorithm (MALA) proposal. Author: Ilias Bilionis """ __all__ = ['MALAProposal'] import numpy as np from scipy.stats import norm from . import GradProposal from . import SingleParameterTunableProposalConcept class MALAProposal(GradProposal, SingleParameterTunablePro...
lgpl-3.0
shinate/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/system/outputcapture.py
124
5478
# Copyright (c) 2009, Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the...
bsd-3-clause
danielquinn/spirithunter
src/spirits/migrations/0002_auto_20160904_1741.py
1
2320
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-09-04 17:41 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migratio...
agpl-3.0
fedora-infra/fmn.consumer
tests/test_sse_backend.py
2
5500
""" Unit tests for the SSE backend. """ from __future__ import unicode_literals, absolute_import import json import unittest import mock from fmn.consumer.backends import SSEBackend @mock.patch('fmn.consumer.backends.sse.protocol.ClientCreator', mock.Mock()) class TestSSEBackend(unittest.TestCase): def test_f...
gpl-2.0
mcrowson/django
django/utils/functional.py
234
13622
import copy import operator from functools import total_ordering, wraps from django.utils import six from django.utils.six.moves import copyreg # You can't trivially replace this with `functools.partial` because this binds # to classes and returns bound instances, whereas functools.partial (on # CPython) is a type a...
bsd-3-clause
rwatson/chromium-capsicum
third_party/scons/scons-local/SCons/Tool/cvf.py
3
2399
"""engine.SCons.Tool.cvf Tool-specific initialization for the Compaq Visual Fortran compiler. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentatio...
bsd-3-clause
inveniosoftware/kwalitee
kwalitee/cli/githooks.py
2
2832
# -*- coding: utf-8 -*- # # This file is part of kwalitee # Copyright (C) 2014, 2015 CERN. # # kwalitee 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) an...
gpl-2.0
xaviercobain88/framework-python
openerp/addons/account/account_analytic_line.py
31
7587
# -*- 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
adamschmideg/mal
rpython/step2_eval.py
32
3030
#import sys, traceback import mal_readline import mal_types as types from mal_types import (MalSym, MalInt, MalStr, _keywordu, MalList, _list, MalVector, MalHashMap, MalFunc) import reader, printer # read def READ(str): return reader.read_str(str) # eval def eval_ast(...
mpl-2.0
vgan/soiqbot
requests/packages/chardet/langcyrillicmodel.py
2762
17725
######################## 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...
mit
angryrancor/kivy
kivy/core/clipboard/clipboard_pygame.py
39
1446
''' Clipboard Pygame: an implementation of the Clipboard using pygame.scrap. ''' __all__ = ('ClipboardPygame', ) from kivy.utils import platform from kivy.compat import PY2 from kivy.core.clipboard import ClipboardBase if platform not in ('win', 'linux', 'macosx'): raise SystemError('unsupported platform for pyg...
mit
arista-eosplus/ansible
lib/ansible/modules/network/panos/panos_security_policy.py
39
16244
#!/usr/bin/python # -*- coding: utf-8 -*- # # Ansible module to manage PaloAltoNetworks Firewall # (c) 2016, techbizdev <techbizdev@paloaltonetworks.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 publish...
gpl-3.0
amoikevin/gyp
test/win/gyptest-cl-enable-enhanced-instruction-set.py
52
1432
#!/usr/bin/env python # Copyright (c) 2014 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. """ Test VCCLCompilerTool EnableEnhancedInstructionSet setting. """ import TestGyp import os import sys if sys.platform == 'win32': tes...
bsd-3-clause
mila-iqia/babyai
scripts/il_perf.py
1
2047
#!/usr/bin/env python3 import argparse import pandas import os import json import re import numpy as np from scipy import stats from babyai import plotting as bp parser = argparse.ArgumentParser("Analyze performance of imitation learning") parser.add_argument("--path", default='.', help="path to model logs") par...
bsd-3-clause
boundlessgeo/QGIS
python/plugins/db_manager/db_plugins/postgis/plugins/versioning/__init__.py
32
2259
# -*- coding: utf-8 -*- """ /*************************************************************************** Name : Versioning plugin for DB Manager Description : Set up versioning support for a table Date : Mar 12, 2012 copyright : (C) 2012 by Giuseppe Sucameli email ...
gpl-2.0
edum1978/eduengage
boilerplate/lib/basehandler.py
8
12971
# *-* coding: UTF-8 *-* # standard library imports import logging import re import traceback import sys # related third party imports import webapp2 from google.appengine.api.users import NotAllowedError from webapp2_extras import jinja2 from webapp2_extras import auth from webapp2_extras import sessions from google.a...
lgpl-3.0
CloverHealth/airflow
airflow/example_dags/example_passing_params_via_test_command.py
14
2351
# -*- coding: utf-8 -*- # # 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 #...
apache-2.0
Luobiny/bioconda-recipes
recipes/mtnucratio/mtnucratio.py
20
2667
#!/usr/bin/env python # # Wrapper script for Java Conda packages that ensures that the java runtime # is invoked with the right options. Adapted from the bash script (http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in/246128#246128). # # # Program Parameters # import os import...
mit
ahamilton55/ansible
lib/ansible/modules/network/cloudengine/ce_netconf.py
46
5922
#!/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
OpenBfS/dokpool-plone
Plone/src/elan.sitrep/elan/sitrep/content/srmoduleconfig.py
1
3765
# -*- coding: utf-8 -*- # # File: srmoduleconfig.py # # Copyright (c) 2017 by Condat AG # Generator: ConPD2 # http://www.condat.de # __author__ = '' __docformat__ = 'plaintext' """Definition of the SRModuleConfig content type. See srmoduleconfig.py for more explanation on the statements below. """ from Acc...
gpl-3.0
safwanrahman/mozillians
vendor-local/lib/python/unidecode/x0fa.py
252
4406
data = ( 'Chey ', # 0x00 'Thak ', # 0x01 'Thak ', # 0x02 'Thang ', # 0x03 'Thayk ', # 0x04 'Thong ', # 0x05 'Pho ', # 0x06 'Phok ', # 0x07 'Hang ', # 0x08 'Hang ', # 0x09 'Hyen ', # 0x0a 'Hwak ', # 0x0b 'Wu ', # 0x0c 'Huo ', # 0x0d '[?] ', # 0x0e '[?] ', # 0x0f 'Zhong ', ...
bsd-3-clause
camptocamp/odoo
addons/crm_claim/__init__.py
390
1078
# -*- 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
ptisserand/docker-registry
tests/test_s3.py
30
6105
# -*- coding: utf-8 -*- import StringIO import sys import time from nose import tools from docker_registry.core import exceptions import docker_registry.testing as testing from docker_registry.testing import mock_boto # noqa from . import mock_s3 # noqa class StringIOWithError(StringIO.StringIO): '''Throw...
apache-2.0
MoritzS/django
django/utils/archive.py
52
7462
""" Based on "python-archive" -- http://pypi.python.org/pypi/python-archive/ Copyright (c) 2010 Gary Wilson Jr. <gary.wilson@gmail.com> and contributors. 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 So...
bsd-3-clause
buntyke/Flask
microblog/flask/lib/python2.7/site-packages/sqlalchemy/util/__init__.py
10
2520
# util/__init__.py # Copyright (C) 2005-2015 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 .compat import callable, cmp, reduce, \ threading, py3k, py33, py36, py2k...
mit
ojii/sandlib
lib/lib-python/2.7/importlib/__init__.py
456
1327
"""Backport of importlib.import_module from 3.x.""" # While not critical (and in no way guaranteed!), it would be nice to keep this # code compatible with Python 2.3. import sys def _resolve_name(name, package, level): """Return the absolute name of the module to be imported.""" if not hasattr(package, 'rindex...
bsd-3-clause
nelsongoh/tembotsu
libs/future/backports/email/generator.py
82
19520
# Copyright (C) 2001-2010 Python Software Foundation # Author: Barry Warsaw # Contact: email-sig@python.org """Classes to generate plain text from a message object tree.""" from __future__ import print_function from __future__ import unicode_literals from __future__ import division from __future__ import absolute_impo...
apache-2.0
fabaff/ansible
lib/ansible/executor/playbook_executor.py
1
9866
# (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
savi-dev/horizon
horizon/dashboards/nova/containers/forms.py
1
7384
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # no...
apache-2.0
mahak/keystone
keystone/auth/plugins/base.py
2
3476
# Copyright 2013 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
apache-2.0
GaussDing/django
tests/gis_tests/geoapp/test_feeds.py
33
4256
from __future__ import unicode_literals from xml.dom import minidom from django.conf import settings from django.contrib.gis.geos import HAS_GEOS from django.contrib.sites.models import Site from django.test import ( TestCase, modify_settings, override_settings, skipUnlessDBFeature, ) if HAS_GEOS: from .mode...
bsd-3-clause
SkillSmart/ConferenceManagementSystem
ApplicationManagement/migrations/0012_auto_20170331_1943.py
1
1448
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-03-31 17:43 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('ApplicationManagement', '0011_auto_20170331_1649'), ] operations = [ migrat...
mit
michaelyin/code-for-blog
2009/plotting_data_monitor/com_monitor.py
15
2988
import Queue import threading import time import serial class ComMonitorThread(threading.Thread): """ A thread for monitoring a COM port. The COM port is opened when the thread is started. data_q: Queue for received data. Items in the queue are (data, ti...
unlicense
systemdaemon/systemd
tools/gdb-sd_dump_hashmaps.py
112
5114
# -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */ # # This file is part of systemd. # # Copyright 2014 Michal Schmidt # # systemd is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; eith...
gpl-2.0
lukeburden/django-allauth
allauth/socialaccount/providers/bitbucket_oauth2/provider.py
10
1122
from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class BitbucketOAuth2Account(ProviderAccount): def get_profile_url(self): return (self.account.extra_data .get('links', {}) .get('html...
mit
BlueLens/bl-magi
tensorflow/object_detection/protos/optimizer_pb2.py
4
22276
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: object_detection/protos/optimizer.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf i...
apache-2.0
rancher/validation-tests
tests/v3_validation/cattlevalidationtest/core/test_network_policy.py
2
33949
from common_fixtures import * # NOQA test_network_policy = os.environ.get( 'TEST_NETWORK_POLICY', "False") np_reason = \ 'Intended to not execute this network policy test' if_network_policy = pytest.mark.skipif(test_network_policy != "ALL", reason=np_reason) if_network_...
apache-2.0
michelts/lettuce
tests/integration/test_brocolis.py
17
2167
# -*- coding: utf-8 -*- # <Lettuce - Behaviour Driven Development for python> # Copyright (C) <2010-2012> Gabriel Falcão <gabriel@nacaolivre.org> # # 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 Foundatio...
gpl-3.0
Chrispassold/ionicons
builder/generate.py
357
9438
from subprocess import call import os import json BUILDER_PATH = os.path.dirname(os.path.abspath(__file__)) ROOT_PATH = os.path.join(BUILDER_PATH, '..') FONTS_FOLDER_PATH = os.path.join(ROOT_PATH, 'fonts') CSS_FOLDER_PATH = os.path.join(ROOT_PATH, 'css') SCSS_FOLDER_PATH = os.path.join(ROOT_PATH, 'scss') LESS_FOLDER_...
mit
dvliman/jaikuengine
.google_appengine/lib/django-1.4/django/contrib/gis/gdal/datasource.py
92
4724
""" DataSource is a wrapper for the OGR Data Source object, which provides an interface for reading vector geometry data from many different file formats (including ESRI shapefiles). When instantiating a DataSource object, use the filename of a GDAL-supported data source. For example, a SHP file or a TIGER/Line...
apache-2.0
Rogentos/legacy-anaconda
storage/devicelibs/crypto.py
2
6138
# # crypto.py # # Copyright (C) 2009 Red Hat, Inc. All rights reserved. # # 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 versi...
gpl-2.0
eunchong/build
scripts/slave/recipe_modules/skia/ios_flavor.py
1
5292
# Copyright 2015 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 copy import default_flavor """iOS flavor utils, used for building for and running tests on iOS.""" class iOSFlavorUtils(default_flavor.DefaultFla...
bsd-3-clause
hipnusleo/laserjet
resource/pypi/cryptography-1.7.1/src/_cffi_src/openssl/engine.py
1
5445
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function INCLUDES = """ #include <openssl/engine.h> """ TYPES = """ st...
apache-2.0
rhinstaller/anaconda
tests/unit_tests/pyanaconda_tests/modules/payloads/payload/test_module_payload_dnf_utils.py
2
15676
# # Copyright (C) 2020 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distributed in the hope that it will be...
gpl-2.0
adfernandes/pcp
src/pcp/pidstat/test/process_stackutil_test.py
6
2213
#!/usr/bin/env pmpython # # Copyright (C) 2016 Sitaram Shelke. # # 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. # # Thi...
lgpl-2.1
mou4e/zirconium
build/android/adb_reverse_forwarder.py
15
2519
#!/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. """Command line tool for forwarding ports from a device to the host. Allows an Android device to connect to services running on ...
bsd-3-clause
zaqwes8811/micro-apps
extern/gmock-1.6.0/gtest/test/gtest_uninitialized_test.py
2901
2480
#!/usr/bin/env python # # Copyright 2008, 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...
mit
pim89/youtube-dl
youtube_dl/extractor/brightcove.py
5
27756
# 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...
unlicense
BowdoinOrient/bongo
bongo/apps/bongo/tests/model_tests.py
1
13646
from bongo.apps.bongo.tests import factories from django.test import TestCase from django.contrib.auth.models import User from django.conf import settings from django.utils.text import slugify import os """ Test content type models and related: test, video, PDF, photo, HTML, pullquote, post """ class TextTestCase(Te...
mit
viridia/coda
third-party/python/ply-3.4/ply/cpp.py
192
33040
# ----------------------------------------------------------------------------- # cpp.py # # Author: David Beazley (http://www.dabeaz.com) # Copyright (C) 2007 # All rights reserved # # This module implements an ANSI-C style lexical preprocessor for PLY. # -------------------------------------------------------------...
apache-2.0
Chilledheart/chromium
tools/telemetry/third_party/typ/typ/arg_parser.py
33
13928
# Copyright 2014 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
bsd-3-clause