repo_name
stringlengths
6
100
path
stringlengths
4
294
copies
stringlengths
1
5
size
stringlengths
4
6
content
stringlengths
606
896k
license
stringclasses
15 values
ravibhure/ansible
lib/ansible/modules/storage/purestorage/purefa_hg.py
44
4566
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Simon Dodsley (simon@purestorage.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
Team-Blackout/AOZP_Blackout_edition
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
12527
1935
# Util.py - Python extension for perf script, miscellaneous utility code # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. import errno, os FUTEX_WAIT = 0...
gpl-2.0
andres-root/AIND
Therm1/Week2/Lab/search/pacman.py
4
24258
# pacman.py # --------- # Licensing Information: Please do not distribute or publish solutions to this # project. You are free to use and extend these projects for educational # purposes. The Pacman AI projects were developed at UC Berkeley, primarily by # John DeNero (denero@cs.berkeley.edu) and Dan Klein (klein@cs.be...
mit
j-griffith/cinder
cinder/tests/unit/volume/drivers/netapp/dataontap/utils/fakes.py
4
4562
# Copyright (c) 2016 Clinton Knight # 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 requir...
apache-2.0
rembtalastasin/d8-training-project
themes/d8training/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py
1283
65086
# Copyright (c) 2012 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. """ This module contains classes that help to emulate xcodebuild behavior on top of other build systems, such as make and ninja. """ import copy import gyp.common...
gpl-2.0
michaelwu/servo
python/licenseck.py
18
1985
# Copyright 2013 The Servo Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution. # # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or # http://www.apache.org/licenses/LICENSE-2.0> or the MIT license # <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your #...
mpl-2.0
cscott/wikiserver
mwlib/utils.py
2
14820
import cgi try: from email.mime.text import MIMEText from email.utils import make_msgid, formatdate except ImportError: from email.MIMEText import MIMEText from email.Utils import make_msgid, formatdate import errno import os import pprint import re import smtplib import socket import StringIO impo...
gpl-2.0
stevenmizuno/QGIS
python/plugins/processing/algs/gdal/ui/RasterOptionsWidget.py
4
2820
# -*- coding: utf-8 -*- """ *************************************************************************** RasterOptionsWidget.py --------------------- Date : December 2016 Copyright : (C) 2016 by Alexander Bruy Email : alexander dot bruy at gmail dot com ****...
gpl-2.0
brunoliveira8/managyment
project/gym_app/migrations/0001_initial.py
1
7312
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import datetime from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ m...
mit
jacknjzhou/neutron
neutron/tests/tempest/services/identity/v3/json/policy_client.py
24
2505
# Copyright 2013 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
chenchiyuan/django-project-template
applications/weixin/models/menus.py
3
2795
# -*- coding: utf-8 -*- # __author__ = chenchiyuan from __future__ import division, unicode_literals, print_function from collections import OrderedDict from applications.weixin.models.apps import App from applications.weixin.models.rules import Rule from libs.models.mixins import QuerysetMixin from libs.models.models...
bsd-3-clause
crazy-cat/incubator-mxnet
tests/python/unittest/test_operator.py
3
199584
# 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
Snifer/BurpSuite-Plugins
Sqlmap/thirdparty/chardet/euctwprober.py
236
1672
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org 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 Reserved. # # Con...
gpl-2.0
zhaojuntao/rt-thread
bsp/lpc54114-lite/rtconfig.py
3
3639
import os # toolchains options ARCH='arm' CPU='cortex-m4' CROSS_TOOL='gcc' BOARD_NAME = 'lpc54114' if os.getenv('RTT_CC'): CROSS_TOOL = os.getenv('RTT_CC') if CROSS_TOOL == 'gcc': PLATFORM = 'gcc' EXEC_PATH = r'D:/Program Files/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin' elif CROSS_TOOL ...
apache-2.0
cobbler/cobbler
cobbler/cobbler_collections/distros.py
1
4476
""" Copyright 2006-2009, Red Hat, Inc and Others Michael DeHaan <michael.dehaan AT gmail> 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 late...
gpl-2.0
bennylope/django-site-contacts
contact/migrations/0001_initial.py
1
4272
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models from django.conf import settings USER_MODEL = getattr(settings, 'AUTH_USER_MODEL', 'auth.User') USER_MODEL_NAME = USER_MODEL.split('.')[1] class Migration(SchemaMigration): def forwa...
bsd-3-clause
Rogentos/legacy-anaconda
iw/partition_dialog_gui.py
3
22196
# # partition_dialog_gui.py: dialog for editting a partition request # # Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 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...
gpl-2.0
nathantypanski/zombierl
character.py
1
2941
from libtcod import libtcodpy as libtcod import object as O import map_vars as M import status as S import random class Character (O.Object): def __init__ (self, name, max_health, x, y, char, color, npc=False, strength=5, to_hit=0.8, view_distance=10): self.name = name self.health = max_health self...
gpl-3.0
sirkubax/ansible-modules-extras
packaging/os/apk.py
56
7067
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Kevin Brebanov <https://github.com/kbrebanov> # Based on pacman (Afterburn <http://github.com/afterburn>, Aaron Bull Schaefer <aaron@elasticdog.com>) # and apt (Matthew Williams <matthew@flowroute.com>>) modules. # # This module is free software: you can redistribu...
gpl-3.0
waqasbhatti/astrobase
astrobase/services/dust.py
2
7768
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # dust - Waqas Bhatti (wbhatti@astro.princeton.edu) - Dec 2017 # License: MIT. See the LICENSE file for more details. ''' This gets extinction tables from the the 2MASS DUST service at: http://irsa.ipac.caltech.edu/applications/DUST/ If you use this, please cite the SF1...
mit
PCManticore/argus-ci
scripts/subunit2html.py
6
21793
#!/usr/bin/python """ Utility to convert a subunit stream to an html results file. Code is adapted from the pyunit Html test runner at http://tungwaiyip.info/software/HTMLTestRunner.html Takes two arguments. First argument is path to subunit log file, second argument is path of desired output file. Second argument is ...
apache-2.0
dmlc/tvm
python/tvm/relay/op/_reduce.py
3
3362
# 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
Tomtomgo/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/system/filesystem_mock.py
122
16269
# 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 f...
bsd-3-clause
t1g0r/npyscreen
build/lib/npyscreen/proto_fm_screen_area.py
15
5124
#!/usr/bin/env python import curses import curses.panel #import curses.wrapper from . import npyspmfuncs as pmfuncs import os from . import npysThemeManagers as ThemeManagers # For more complex method of getting the size of screen try: import fcntl, termios, struct, sys except: # Win32 platforms do not have ...
bsd-2-clause
matthagy/Jamenson
jamenson/compiler/Attic/constant_reduction.py
1
4970
'''Evaluate constant expressions in ir ''' from __future__ import absolute_import from __future__ import with_statement import operator as O from ..runtime.multimethod import MultiMethod, defmethod, around from .resolution import compile_time_resolve, UnresolvableError from .walk import propigate_location from . imp...
apache-2.0
alexlo03/ansible
lib/ansible/plugins/action/ironware_config.py
27
4215
# # (c) 2017, 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...
gpl-3.0
mrshelly/openerp71313
openerp/addons/subscription/__init__.py
441
1076
# -*- 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
adelton/django
django/contrib/auth/models.py
13
14800
from __future__ import unicode_literals from django.contrib import auth from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager from django.contrib.auth.signals import user_logged_in from django.contrib.contenttypes.models import ContentType from django.core import validators from django.core.excep...
bsd-3-clause
wyom/sympy
sympy/simplify/radsimp.py
46
35730
from __future__ import print_function, division from collections import defaultdict from sympy import SYMPY_DEBUG from sympy.core.evaluate import global_evaluate from sympy.core.compatibility import iterable, ordered, as_int, default_sort_key from sympy.core import expand_power_base, sympify, Add, S, Mul, Derivative...
bsd-3-clause
jchodera/openmoltools
openmoltools/tests/test_amber.py
2
6722
import numpy as np import mdtraj as md from unittest import skipIf import logging from openmoltools import utils, amber,packmol from distutils.spawn import find_executable import shutil logging.basicConfig(level=logging.DEBUG, format="LOG: %(message)s") @skipIf(packmol.PACKMOL_PATH is None, "Skipping testing of packm...
gpl-2.0
GluuFederation/community-edition-setup
static/extension/person_authentication/ThumbSignInExternalAuthenticator.py
2
14838
# Author: ThumbSignIn from org.gluu.service.cdi.util import CdiUtil from org.gluu.oxauth.security import Identity from org.gluu.model.custom.script.type.auth import PersonAuthenticationType from org.gluu.oxauth.service import AuthenticationService from org.gluu.util import StringHelper from org.gluu.oxauth.util import...
mit
apache/beam
sdks/python/apache_beam/examples/fastavro_it_test.py
5
6070
# # 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
frappe/frappe
frappe/utils/file_manager.py
1
13378
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt import frappe import os, base64, re, json import hashlib import mimetypes import io from frappe.utils import get_hook_method, get_files_path, random_string, encode, cstr, call_hook_method, cint from frappe import _ from...
mit
consulo/consulo-python
plugin/src/main/dist/helpers/pydev/_pydevd_bundle/pydevd_additional_thread_info_regular.py
12
7869
import sys import weakref from _pydev_imps._pydev_saved_modules import thread from _pydevd_bundle.pydevd_constants import STATE_RUN, PYTHON_SUSPEND, dict_iter_items from _pydevd_bundle.pydevd_frame import PyDBFrame #======================================================================================================...
apache-2.0
stonebig/bokeh
bokeh/util/hex.py
2
8263
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2019, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
bsd-3-clause
DrabWeb/iTerm2
tests/esctest/tests/hpa.py
31
1837
import esccmd import escio from escutil import AssertEQ, AssertScreenCharsInRectEqual, GetCursorPosition, GetScreenSize, knownBug from esctypes import Point, Rect class HPATests(object): @knownBug(terminal="iTerm2", reason="Not implemented") def test_HPA_DefaultParams(self): """With no params, HPA moves to 1st...
gpl-2.0
markuszoeller/openstack
scripts/launchpad/expire_old_bug_reports.py
2
6238
#!/usr/bin/env python # # Closes Launchpad bug reports which are older than the oldest stable # release (usually 18 months). # # Copyright 2016 Markus Zoeller # Copyright 2016 Steven Hardy import argparse import datetime import logging import os import sys import time from launchpadlib.launchpad import Launchpad impo...
mit
lthurlow/Network-Grapher
proj/external/matplotlib-1.2.1/build/lib.linux-i686-2.7/matplotlib/transforms.py
2
88425
""" matplotlib includes a framework for arbitrary geometric transformations that is used determine the final position of all elements drawn on the canvas. Transforms are composed into trees of :class:`TransformNode` objects whose actual value depends on their children. When the contents of children change, their pare...
mit
jomolinare/brackets-shell
gyp/pylib/gyp/MSVSSettings.py
253
43329
# Copyright (c) 2012 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. """Code to validate and convert settings of the Microsoft build tools. This file contains code to validate and convert settings of the Microsoft build tools. The...
mit
nck0405/MyOwn
modules/tests/volunteer/create_volunteer_job_title.py
25
2080
""" Sahana Eden Automated Test - HRM001 Create Job Title @copyright: 2011-2012 (c) Sahana Software Foundation @license: MIT 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 wit...
mit
LaoZhongGu/kbengine
kbe/src/lib/python/Lib/test/json_tests/test_fail.py
8
3911
from test.json_tests import PyTest, CTest # 2007-10-05 JSONDOCS = [ # http://json.org/JSON_checker/test/fail1.json '"A JSON payload should be an object or array, not a string."', # http://json.org/JSON_checker/test/fail2.json '["Unclosed array"', # http://json.org/JSON_checker/test/fail3.json '...
lgpl-3.0
davidjonas/alice_python
en/parser/nltk_lite/cluster/kmeans.py
9
7537
# Natural Language Toolkit: K-Means Clusterer # # Copyright (C) 2004-2006 University of Melbourne # Author: Trevor Cohn <tacohn@cs.mu.oz.au> # Porting: Steven Bird <sb@csse.unimelb.edu.au> # URL: <http://nltk.sf.net> # For license information, see LICENSE.TXT from en.parser.nltk_lite.cluster import * class KMeans(Vec...
gpl-3.0
keyurpatel076/MissionPlannerGit
packages/IronPython.StdLib.2.7.5-beta1/content/Lib/mhlib.py
290
33434
"""MH interface -- purely object-oriented (well, almost) Executive summary: import mhlib mh = mhlib.MH() # use default mailbox directory and profile mh = mhlib.MH(mailbox) # override mailbox location (default from profile) mh = mhlib.MH(mailbox, profile) # override mailbox and profile mh.error(format, ...)...
gpl-3.0
lig/picket_deadend
apps/picket/middleware.py
1
1686
""" Copyright 2010 Serge Matveenko This file is part of Picket. Picket 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. Picket is distribut...
gpl-3.0
nagyistoce/odoo-dev-odoo
addons/product_margin/product_margin.py
194
8823
# -*- 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
talnoah/m7-gpe
tools/perf/util/setup.py
4998
1330
#!/usr/bin/python2 from distutils.core import setup, Extension from os import getenv from distutils.command.build_ext import build_ext as _build_ext from distutils.command.install_lib import install_lib as _install_lib class build_ext(_build_ext): def finalize_options(self): _build_ext.finalize_optio...
gpl-2.0
soerendip42/rdkit
rdkit/Chem/UnitTestOldBugs.py
4
3746
# $Id$ # # Copyright (C) 2001-2006 greg Landrum and Rational Discovery LLC # # @@ All Rights Reserved @@ # This file is part of the RDKit. # The contents are covered by the terms of the BSD license # which is included in the file license.txt, found at the root # of the RDKit source tree. # """testing code inspi...
bsd-3-clause
unreal666/youtube-dl
youtube_dl/extractor/rtp.py
50
3090
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor class RTPIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?rtp\.pt/play/p(?P<program_id>[0-9]+)/(?P<id>[^/?#]+)/?' _TESTS = [{ 'url': 'http://www.rtp.pt/play/p405/e174042/paixoes-cruzadas', ...
unlicense
fabian4/ceilometer
ceilometer/network/statistics/opendaylight/driver.py
6
17716
# # 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 by applicable...
apache-2.0
mkaluza/external_chromium_org
tools/telemetry/telemetry/core/backends/webdriver/webdriver_desktop_browser_finder.py
23
3701
# Copyright 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. """Finds desktop browsers that can be controlled by telemetry.""" import logging import os import sys from telemetry.core import browser from telemetry.core...
bsd-3-clause
gspilio/nova
nova/virt/hyperv/livemigrationutils.py
8
11212
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Cloudbase Solutions Srl # 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.ap...
apache-2.0
zrhans/pythonanywhere
.virtualenvs/django19/lib/python3.4/site-packages/numpy/core/tests/test_indexing.py
33
40526
from __future__ import division, absolute_import, print_function import sys import warnings import functools import numpy as np from numpy.core.multiarray_tests import array_indexing from itertools import product from numpy.testing import ( TestCase, run_module_suite, assert_, assert_equal, assert_raises, ass...
apache-2.0
whatitslike/spiders
zhihu/roundtables.py
1
1046
from .agent import do_request from .base import BaseSource from .types import Types class RoundTables(BaseSource): def __init__(self): super(RoundTables, self).__init__() self._start_urls = [ 'https://api.zhihu.com/roundtables?excerpt_len=75' ] def _parse(self, json_objs...
gpl-3.0
wangyou/XX-Net
code/default/python27/1.0/lib/email/test/test_email_renamed.py
4
124420
# Copyright (C) 2001-2007 Python Software Foundation # Contact: email-sig@python.org # email package unit tests import os import sys import time import base64 import difflib import unittest import warnings from cStringIO import StringIO import email from email.charset import Charset from email.header...
bsd-2-clause
aliyun/aliyun-spark-sdk
examples/src/main/python/odps-sample.py
3
2678
# # 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 n...
artistic-2.0
adelina-t/compute-hyperv
hyperv/nova/livemigrationops.py
1
5536
# Copyright 2012 Cloudbase Solutions Srl # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless r...
apache-2.0
galaxyproject/tools-iuc
tools/circos/process-cytogenetic-bands.py
17
4150
#!/usr/bin/env python import sys # band hs1 p36.32 p36.32 2200000 5100000 gpos25 # band hs1 p36.31 p36.31 5100000 6900000 gneg # band hs1 p36.23 p36.23 6900000 8800000 gpos25 COLS = ( "chrom", "chromStart", "chromEnd", "name", "score", "strand", "thickStart", "thickEnd", "itemRgb", ...
mit
mrquim/repository.mrquim
repo/plugin.program.super.favourites/history.py
8
1981
# # Copyright (C) 2014-2015 # Sean Poyser (seanpoyser@gmail.com) # # 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, or (at your option) # any later version. # # ...
gpl-2.0
kwagyeman/openmv
scripts/examples/OpenMV/26-April-Tags/find_apriltags_w_lens_zoom.py
3
1630
# AprilTags Example # # This example shows the power of the OpenMV Cam to detect April Tags # on the OpenMV Cam M7. The M4 versions cannot detect April Tags. import sensor, image, time, math sensor.reset() sensor.set_pixformat(sensor.RGB565) sensor.set_framesize(sensor.VGA) # we run out of memory if the resolution is...
mit
infirit/blueman
blueman/main/indicators/GtkStatusIcon.py
2
3117
from typing import Callable, Iterable, TYPE_CHECKING, overload, Any, cast, Mapping, Optional import gi gi.require_version("Gtk", "3.0") from gi.repository import Gtk from blueman.Functions import create_menuitem if TYPE_CHECKING: from typing_extensions import Protocol from blueman.plugins.applet.Menu import...
gpl-3.0
bobisme/odoo
addons/stock/wizard/stock_transfer_details.py
39
8376
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-TODAY OpenERP S.A. <http://www.odoo.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of t...
agpl-3.0
coolsvap/sos
sos/plugins/symcli.py
12
3838
# Copyright (C) 2008 EMC Corporation. Keith Kearnan <kearnan_keith@emc.com> # Copyright (C) 2014 Red Hat, Inc. Bryn M. Reeves <bmr@redhat.com> # 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; ei...
gpl-2.0
chiahaoliu/2016_summer_XPD
out_of_date/pyqt_prac/Checking_update_functioniong.py
2
1834
import sys from xray_vision import QtGui, QtCore import numpy as np from xray_vision.messenger.mpl.cross_section_2d import CrossSection2DMessenger from xray_vision.qt_widgets import CrossSectionMainWindow def data_gen(length): x, y = [_ * 2 * np.pi / 200 for _ in np.ogrid[-200:200, -200:200]] rep = int(np....
bsd-2-clause
indashnet/InDashNet.Open.UN2000
android/external/chromium/chrome/common/extensions/docs/build/directory.py
65
24652
#!/usr/bin/python # Copyright (c) 2010 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. """Class for parsing metadata about extension samples.""" import locale import os import os.path import re import hashlib import zipfi...
apache-2.0
danibram/mitro
browser-ext/third_party/firefox-addon-sdk/python-lib/cuddlefish/tests/test_property_parser.py
37
3063
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import unittest from cuddlefish.property_parser import parse, MalformedLocaleFileError class TestParser(unittest.TestC...
gpl-3.0
nalle/dyndd
dyndd/ipaddr.py
1
1696
import re class IPAddress(): def is_ipv4(self, ip): ipv4 = re.compile("\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}") if ipv4.search(ip): return True else: return False def is_ipv6(self, ip): ipv6 = re.compile("(\A([0-9a-f]{1,4}:){1,1}(:[0-9a-f]{1,4}){1,6}\Z)|(\A...
gpl-3.0
JimDuggan/SDMR
pysd2r/pysd2r_scripts/models/SIR.py
1
4264
""" Python model "SIR.py" Translated using PySD version 0.9.0 """ from __future__ import division import numpy as np from pysd import utils import xarray as xr from pysd.py_backend.functions import cache from pysd.py_backend import functions _subscript_dict = {} _namespace = { 'TIME': 'time', 'Time': 'time',...
mit
bennylope/sysenv
sysenv/__init__.py
1
1422
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'Ben Lopatin' __email__ = 'ben@wellfire.co' __version__ = '0.1.0' import os import re import logging from .data import EnvDict logger = logging.getLogger(__name__) def read_file_values(env_file, fail_silently=True): """ Borrowed from Honcho "...
bsd-3-clause
rdblue/Impala
tests/common/impala_test_suite.py
7
20055
# Copyright (c) 2012 Cloudera, 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 o...
apache-2.0
rspavel/spack
var/spack/repos/builtin/packages/llvm-openmp-ompt/package.py
3
2441
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class LlvmOpenmpOmpt(CMakePackage): """The OpenMP subproject provides an OpenMP runtime for use...
lgpl-2.1
FEniCS/dolfin
python/dolfin/function/functionspace.py
1
8437
# -*- coding: utf-8 -*- """Main module for DOLFIN""" # Copyright (C) 2017 Chris N. Richardson and Garth N. Wells # # Distributed under the terms of the GNU Lesser Public License (LGPL), # either version 3 of the License, or (at your option) any later # version. import types import ffc import ufl import dolfin.cpp as ...
lgpl-3.0
Allow2CEO/browser-ios
brave/node_modules/ad-block/node_modules/bloom-filter-cpp/vendor/depot_tools/third_party/logilab/common/__init__.py
64
5103
# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as publ...
mpl-2.0
KrishMunot/swift
utils/SwiftBuildSupport.py
4
6700
# utils/SwiftBuildSupport.py - Utilities for Swift build scripts -*- python -*- # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See http://swift.org/LICENSE.tx...
apache-2.0
jordanemedlock/psychtruths
temboo/Library/Withings/User/GetUser.py
5
3907
# -*- coding: utf-8 -*- ############################################################################### # # GetUser # Retrieves information regarding the specified user. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not u...
apache-2.0
MarcosCommunity/odoo
addons/account_payment/__openerp__.py
261
2925
# -*- 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
zonca/oauthenticator
setup.py
2
2330
#!/usr/bin/env python # coding: utf-8 # Copyright (c) Juptyer Development Team. # Distributed under the terms of the Modified BSD License. #----------------------------------------------------------------------------- # Minimal Python version sanity check (from IPython/Jupyterhub) #-----------------------------------...
bsd-3-clause
Titosoft/ferry-boat
web2py/gluon/tests/test_html.py
2
12228
#!/bin/python # -*- coding: utf-8 -*- """ Unit tests for gluon.html """ import sys import os import unittest def fix_sys_path(): """ logic to have always the correct sys.path '', web2py/gluon, web2py/site-packages, web2py/ ... """ def add_path_first(path): sys.path = [path] + [p for...
mit
embray/astropy_helpers
astropy_helpers/sphinx/ext/astropyautosummary.py
11
3983
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This sphinx extension builds off of `sphinx.ext.autosummary` to clean up some issues it presents in the Astropy docs. The main issue this fixes is the summary tables getting cut off before the end of the sentence in some cases. Note: Sphinx 1.2 appea...
bsd-3-clause
3dfxmadscientist/cbss-server
addons/account_check_writing/account_voucher.py
33
6716
# -*- 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
manaris/jythonMusic
library/jython2.5.3/Lib/xml/etree/ElementTree.py
79
41496
# # ElementTree # $Id: ElementTree.py 2326 2005-03-17 07:45:21Z fredrik $ # # light-weight XML support for Python 1.5.2 and later. # # history: # 2001-10-20 fl created (from various sources) # 2001-11-01 fl return root from parse method # 2002-02-16 fl sort attributes in lexical order # 2002-04-06 fl TreeBuilde...
gpl-3.0
nkalodimas/invenio
modules/bibsched/lib/tasklets/bst_run_bibtask.py
26
1545
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2012 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) a...
gpl-2.0
krikru/tensorflow-opencl
tensorflow/contrib/cudnn_rnn/__init__.py
9
1231
# 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
peterlharding/PDQ
examples/ppa_1998/chap3/multi_class.py
1
2445
#!/usr/bin/env python ############################################################################### # Copyright (C) 1994 - 2009, Performance Dynamics Company # # # # This software is licensed as described in the file COP...
mit
noba3/KoTos
addons/plugin.video.genesis/resources/lib/libraries/captcha.py
8
4194
# -*- coding: utf-8 -*- ''' Genesis Add-on Copyright (C) 2015 lambda 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 ...
gpl-2.0
javierTerry/odoo
addons/mass_mailing/models/mass_mailing.py
74
27565
# -*- coding: utf-8 -*- from datetime import datetime from dateutil import relativedelta import json import random from openerp import tools from openerp.exceptions import Warning from openerp.tools.safe_eval import safe_eval as eval from openerp.tools.translate import _ from openerp.tools import ustr from openerp.os...
agpl-3.0
kleinfeld/medpy
medpy/graphcut/generate.py
1
16523
""" @package medpy.graphcut.generate Provides functionality to generate graphs efficiently from nD label-images and image voxels. Functions: - def graph_from_labels(label_image, fg_markers, bg_markers, regional_term = False, bo...
gpl-3.0
twisted/mantissa
xmantissa/_recordattr.py
1
6833
# -*- test-case-name: xmantissa.test.test_recordattr -*- """ Utility support for attributes on items which compose multiple Axiom attributes into a single epsilon.structlike.record attribute. This can be handy when composing a simple, common set of columns that several tables share into a recognizable object that is ...
mit
okumura/gyp
test/configurations/inheritance/gyptest-inheritance.py
430
1047
#!/usr/bin/env python # Copyright (c) 2009 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. """ Verifies build of an executable in three different configurations. """ import TestGyp test = TestGyp.TestGyp() test.run_gyp('configur...
bsd-3-clause
guysoft/SMS-Twitter-Gate
gate_scripts/tweepy/cursor.py
36
4027
# Tweepy # Copyright 2009-2010 Joshua Roesslein # See LICENSE for details. from tweepy.error import TweepError class Cursor(object): """Pagination helper class""" def __init__(self, method, *args, **kargs): if hasattr(method, 'pagination_mode'): if method.pagination_mode == 'cursor': ...
gpl-2.0
TheHonestGene/thehonestgene-pipeline
thehonestgenepipeline/riskprediction.py
1
1383
from celery.utils.log import get_task_logger from celery.signals import after_setup_task_logger from thehonestgenepipeline.celery import celery from riskpredictor.core import predictor as pred from os import path from . import GENOTYPE_FOLDER,DATA_FOLDER from . import get_platform_from_genotype from .progress_logger ...
mit
vertcoin/vertcoin
test/functional/p2p_invalid_tx.py
2
6794
#!/usr/bin/env python3 # Copyright (c) 2015-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test node responses to invalid transactions. In this test we connect to one node over p2p, and test tx...
mit
samatdav/zulip
zerver/lib/push_notifications.py
3
10859
from __future__ import absolute_import import random from typing import Any, Dict, Optional, SupportsInt, Text from zerver.models import PushDeviceToken, UserProfile from zerver.models import get_user_profile_by_id from zerver.lib.timestamp import timestamp_to_datetime from zerver.decorator import statsd_increment fr...
apache-2.0
40223142/2015cad0623
static/Brython3.1.3-20150514-095342/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
kaushik94/sympy
sympy/core/function.py
1
112629
""" There are three types of functions implemented in SymPy: 1) defined functions (in the sense that they can be evaluated) like exp or sin; they have a name and a body: f = exp 2) undefined function which have a name but no body. Undefined functions can be defined using a Function cla...
bsd-3-clause
Lkhagvadelger/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/newstringio_unittest.py
124
1811
# 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 list of conditions and the ...
bsd-3-clause
ioram7/keystone-federado-pgid2013
build/sqlalchemy/test/sql/test_types.py
1
69356
# coding: utf-8 from test.lib.testing import eq_, assert_raises, assert_raises_message import decimal import datetime, os, re from sqlalchemy import * from sqlalchemy import exc, types, util, schema, dialects for name in dialects.__all__: __import__("sqlalchemy.dialects.%s" % name) from sqlalchemy.sql import operat...
apache-2.0
katstalk/android_external_chromium_org
chrome/test/chromedriver/run_buildbot_steps.py
23
14801
#!/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. """Runs all the buildbot steps for ChromeDriver except for update/compile.""" import bisect import csv import datetime import glob...
bsd-3-clause
georgestarcher/TA-SyncKVStore
bin/ta_synckvstore/requests/__init__.py
35
2197
# -*- coding: utf-8 -*- # __ # /__) _ _ _ _ _/ _ # / ( (- (/ (/ (- _) / _) # / """ Requests HTTP library ~~~~~~~~~~~~~~~~~~~~~ Requests is an HTTP library, written in Python, for human beings. Basic GET usage: >>> import requests >>> r = requests.get('https://www.python.org') >>> ...
mit
squilter/mavlink
pymavlink/generator/lib/minixsv/xsvalBase.py
79
67072
# # minixsv, Release 0.9.0 # file: xsvalBase.py # # XML schema validator base class # # history: # 2004-10-07 rl created # 2006-08-18 rl W3C testsuite passed for supported features # 2007-06-14 rl Features for release 0.8 added, several bugs fixed # # Copyright (c) 2004-2008 by Roland Leuthe. All righ...
lgpl-3.0
OpenInfoporto/infoporto.odoo.ecommerce
infoporto/odoo/ecommerce/lib/odoo.py
1
5284
from infoporto.odoo.core.odoo import OdooInstance class Odoo(object): # settings def getCurrency(self): """ Retrieve currency from Odoo Company settings """ odoo_core = OdooInstance() # company ID should be dynamic return odoo_core.read('res.company', 1, ['currency_id']) ...
gpl-2.0