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
bruce3557/NTHUOJ_web
problem/admin.py
4
1385
''' The MIT License (MIT) Copyright (c) 2014 NTHUOJ team Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, ...
mit
ProjexSoftware/projexui
projexui/widgets/xquerybuilderwidget/xquerybuilderwidget.py
2
9247
#!/usr/bin/python """ Defines an interface to allow users to build their queries on the fly. """ # define authorship information __authors__ = ['Eric Hulser'] __author__ = ','.join(__authors__) __credits__ = [] __copyright__ = 'Copyright (c) 2011, Projex Software' __license__ = ...
lgpl-3.0
diagramsoftware/odoo
addons/analytic_contract_hr_expense/analytic_contract_hr_expense.py
223
7860
# -*- 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
maverickYQB/mqtt_zway
test/test_main_class.py
1
2397
#!/usr/bin/env python ''' Created on Mars 20 2016 @author: popotvin ''' import mqtt_zway_test import mqtt_zway import paho.mqtt.client as mqtt import time import traceback date_time = mqtt_zway_test.date_time # Main variables mqtt_old_payload = [] mqtt_new_payload = [] payload = {} publish_string = "" # MQTT confi...
gpl-3.0
j4/horizon
openstack_dashboard/urls.py
56
1979
# 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 # not use this file except in compliance with the...
apache-2.0
tylerclair/py3canvas
py3canvas/apis/modules.py
1
54047
"""Modules API Version 1.0. This API client was generated using a template. Make sure this code is valid before using it. """ import logging from datetime import date, datetime from .base import BaseCanvasAPI from .base import BaseModel class ModulesAPI(BaseCanvasAPI): """Modules API Version 1.0.""" def __i...
mit
fengzhe29888/gnuradio-old
gr-blocks/python/blocks/qa_threshold.py
57
1537
#!/usr/bin/env python # # Copyright 2013 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) # ...
gpl-3.0
kinnou02/navitia
source/jormungandr/jormungandr/parking_space_availability/__init__.py
3
1795
# Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.canaltp.fr). # Help us simplify mobility and open public tr...
agpl-3.0
0xkag/tornado
tornado/test/simple_httpclient_test.py
13
22722
from __future__ import absolute_import, division, print_function, with_statement import collections from contextlib import closing import errno import gzip import logging import os import re import socket import sys from tornado import gen from tornado.httpclient import AsyncHTTPClient from tornado.httputil import HT...
apache-2.0
IronLanguages/ironpython2
Src/StdLib/Lib/test/test_poll.py
4
7315
# Test case for the os.poll() function import os import random import select try: import threading except ImportError: threading = None import time import unittest from test.test_support import TESTFN, run_unittest, reap_threads, cpython_only try: select.poll except AttributeError: raise unittest.Skip...
apache-2.0
gundalow/ansible
lib/ansible/executor/task_queue_manager.py
11
18711
# (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
suhe/odoo
addons/pad/py_etherpad/__init__.py
505
7804
"""Module to talk to EtherpadLite API.""" import json import urllib import urllib2 class EtherpadLiteClient: """Client to talk to EtherpadLite API.""" API_VERSION = 1 # TODO probably 1.1 sometime soon CODE_OK = 0 CODE_INVALID_PARAMETERS = 1 CODE_INTERNAL_ERROR = 2 CODE_INVALID_FUNCTION = 3 ...
gpl-3.0
shubhamVerma/code-eval
Category - Easy/sumdigitsCodeEval.py
1
1271
''' sumdigitsCodeEval.py - Solution to Problem Lowercase (Category - Easy) Copyright (C) 2013, Shubham Verma 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 Lice...
gpl-3.0
DazWorrall/ansible
lib/ansible/modules/packaging/language/composer.py
24
9023
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Dimitrios Tydeas Mengidis <tydeas.dr@gmail.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_versi...
gpl-3.0
vmora/QGIS
python/plugins/processing/algs/gdal/rearrange_bands.py
5
5727
# -*- coding: utf-8 -*- """ *************************************************************************** rearrange_bands.py --------------------- Date : August 2018 Copyright : (C) 2018 by Mathieu Pellerin Email : nirvn dot asia at gmail dot com ************...
gpl-2.0
frohoff/Empire
lib/modules/powershell/exploitation/exploit_jenkins.py
2
3352
import base64 from lib.common import helpers class Module: def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'Exploit-Jenkins', 'Author': ['@luxcupitor'], 'Description': ("Run command on unauthenticated Jenkins Script consoles."), 'Backgroun...
bsd-3-clause
schimar/ngs_tools
remove_collapsed_clusters.py
2
1110
#! /usr/bin/python # # This script reads a fasta file (the last vsearch run with --id 0.8 # to test for whether clusters collapse at a lower id) and removes # all entries that have(the 2nd) seqs > 1. # # Usage: ./remove_collapsed_clusters.py <input-file_name.fasta> <new_file_name.fasta> import sys import re #import s...
gpl-2.0
kajgan/stbgui
lib/python/Components/Converter/ClientsStreaming.py
1
3432
from Converter import Converter from Poll import Poll from Components.Element import cached from Components.Sources.StreamService import StreamServiceList from enigma import eStreamServer from ServiceReference import ServiceReference import socket class ClientsStreaming(Converter, Poll, object): UNKNOWN = -1 REF = 0...
gpl-2.0
viaict/viaduct
app/forms/pimpy.py
1
1268
import datetime from flask_babel import _ from flask_login import current_user from flask_wtf import FlaskForm from wtforms import StringField, TextAreaField, DateTimeField, SelectField from wtforms.ext.sqlalchemy.fields import QuerySelectField from wtforms.validators import InputRequired, Optional from app import co...
mit
Cito/DBUtils
tests/mock_db.py
1
3341
"""This module serves as a mock object for the DB-API 2 module""" threadsafety = 2 class Error(Exception): pass class DatabaseError(Error): pass class OperationalError(DatabaseError): pass class InternalError(DatabaseError): pass class ProgrammingError(DatabaseError): pass def connect(d...
mit
amaret/wind.util
windutil/main.py
1
5085
# Copyright Amaret, Inc 2011-2015. All rights reserved. ''' Wind Docker Container Util ''' import os import time import json from subprocess import call from windutil.argparser import parse from windutil.scrlogger import ScrLogger LOG = ScrLogger() DEFAULT_CONTAINER_CONFIG = [ { 'name': 'redis', ...
gpl-2.0
miconof/headphones
headphones/notifiers.py
1
28911
# This file is part of Headphones. # # Headphones 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. # # Headphones is distributed i...
gpl-3.0
termoshtt/DataProcessor
lib/dataprocessor/tests/test_scan.py
3
9544
# coding=utf-8 """Test for scan.""" import os from .utils import TestNodeListAndDir from ..pipes.scan import directory class TestScan(TestNodeListAndDir): """Unittest for dataprocessor.pipes.scan. Attributes ---------- tempdir_paths : list list of project root dir path node_list : list ...
gpl-3.0
freakboy3742/django
tests/forms_tests/field_tests/test_charfield.py
27
6355
from django.core.exceptions import ValidationError from django.forms import ( CharField, HiddenInput, PasswordInput, Textarea, TextInput, ) from django.test import SimpleTestCase from . import FormFieldAssertionsMixin class CharFieldTest(FormFieldAssertionsMixin, SimpleTestCase): def test_charfield_1(self):...
bsd-3-clause
shaggytwodope/qutebrowser
tests/end2end/fixtures/test_webserver.py
9
2499
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2015-2016 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser 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 S...
gpl-3.0
goliveirab/odoo
addons/point_of_sale/wizard/pos_open_statement.py
387
4217
# -*- 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
sorenk/ansible
lib/ansible/modules/cloud/amazon/ec2_snapshot.py
27
9687
#!/usr/bin/python # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
gpl-3.0
bluestemscott/librarygadget
librarygadget/librarybot/migrations/0001_initial.py
1
15532
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'UserProfile' db.create_table('librarybot_userprofile', ( ('id', se...
mit
jaredjennings/snowy
libs/openshiftlibs.py
8
3967
#!/usr/bin/env python __author__ = 'N. Harrison Ripps' """ This library was written to the original django-example project - https://github.com/openshift/django-example by @url(https://github.com/nhr), but since it was placed inside the django project folder I've removed it when I started working on my fork - https:/...
agpl-3.0
rcmachado/pysuru
pysuru/tests/test_http.py
1
1256
# coding: utf-8 try: from unittest import mock except ImportError: import mock from pysuru.http import HttpClient def test_headers_attribute_should_always_have_authorization_header_with_token(): client = HttpClient('TARGET', 'TOKEN') assert 'Authorization' in client.headers assert client.headers[...
mit
ardumont/linux
scripts/checkkconfigsymbols.py
88
15783
#!/usr/bin/env python2 """Find Kconfig symbols that are referenced but not defined.""" # (c) 2014-2015 Valentin Rothberg <valentinrothberg@gmail.com> # (c) 2014 Stefan Hengelein <stefan.hengelein@fau.de> # # Licensed under the terms of the GNU GPL License version 2 import difflib import os import re import signal i...
gpl-2.0
ridfrustum/lettuce
tests/integration/lib/Django-1.3/django/core/management/commands/inspectdb.py
203
7614
import keyword from optparse import make_option from django.core.management.base import NoArgsCommand, CommandError from django.db import connections, DEFAULT_DB_ALIAS class Command(NoArgsCommand): help = "Introspects the database tables in the given database and outputs a Django model module." option_list =...
gpl-3.0
JaneliaSciComp/Neuroptikon
Source/lib/CrossPlatform/networkx/generators/small.py
1
12813
""" Various small and named graphs, together with some compact generators. """ __author__ ="""Aric Hagberg (hagberg@lanl.gov)\nPieter Swart (swart@lanl.gov)""" # Copyright (C) 2004-2008 by # Aric Hagberg <hagberg@lanl.gov> # Dan Schult <dschult@colgate.edu> # Pieter Swart <swart@lanl.gov> # All rights ...
bsd-3-clause
firebase/grpc-SwiftPM
test/http2_test/http2_server_health_check.py
13
1319
# Copyright 2017 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
apache-2.0
navrasio/mxnet
example/reinforcement-learning/ddpg/ddpg.py
42
13263
# 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
facebook/buck
docs/soy2html.py
3
3318
#!/usr/bin/env python # Copyright (c) Facebook, Inc. and its affiliates. # # 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
looopTools/sw9-source
.waf-1.9.8-6657823688b736c1d1a4e2c4e8e198b4/waflib/extras/wurf/dependency.py
1
2578
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file import hashlib import json import collections import pprint class Dependency(object): def __init__(self,**kwargs): assert"sha1"not in kwargs if'recurse'not in kwargs: kwargs['recurse']=True ...
mit
guijomatos/SickRage
sickbeard/providers/bitsoup.py
7
10171
# Author: Idan Gutman # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage 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 o...
gpl-3.0
Qalthos/ansible
test/integration/targets/want_json_modules_posix/library/helloworld.py
62
1047
#!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
gpl-3.0
SuperDARNCanada/placeholderOS
experiments/testing_archive/test_scanbound_not_increasing.py
2
1568
#!/usr/bin/python # write an experiment that raises an exception import sys import os BOREALISPATH = os.environ['BOREALISPATH'] sys.path.append(BOREALISPATH) import experiments.superdarn_common_fields as scf from experiment_prototype.experiment_prototype import ExperimentPrototype class TestExperiment(ExperimentP...
gpl-3.0
JamiiTech/mplh5canvas
examples/multi_plot.py
4
1357
#!/usr/bin/python """Testbed for the animation functionality of the backend, with multiple figures. It basically produces an long series of frames that get animated on the client browser side, this time with two figures. """ import matplotlib matplotlib.use('module://mplh5canvas.backend_h5canvas') from pylab import ...
bsd-3-clause
Artanicus/python-cozify
util/device-fade-test.py
1
1301
#!/usr/bin/env python3 from cozify import hub import numpy, time from absl import flags, app FLAGS = flags.FLAGS flags.DEFINE_string('device', None, 'Device to operate on.') flags.DEFINE_float('delay', 0.5, 'Step length in seconds.') flags.DEFINE_float('steps', 20, 'Amount of steps to divide into.') flags.DEFINE_bool...
mit
tdent/pycbc
pycbc/results/table_utils.py
6
4698
# Copyright (C) 2014 Alex Nitz # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 3 of the License, or (at your # option) any later version. # # This program is distributed in the ...
gpl-3.0
BreakawayLabs/mom
test/test_bit_reproducibility.py
3
1736
from __future__ import print_function import os import sys import re from model_test_setup import ModelTestSetup from test_run import tests as test_specs class TestBitReproducibility(ModelTestSetup): def __init__(self): super(TestBitReproducibility, self).__init__() def checksums_to_dict(self, fil...
gpl-2.0
vericred/vericred-python
vericred_client/models/network_comparison_response.py
1
13134
# coding: utf-8 """ Vericred API Vericred's API allows you to search for Health Plans that a specific doctor accepts. ## Getting Started Visit our [Developer Portal](https://developers.vericred.com) to create an account. Once you have created an account, you can create one Application for Production and an...
apache-2.0
emilio/servo
tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/opera.py
15
3783
from .base import Browser, ExecutorBrowser, require_arg from .base import get_timeout_multiplier # noqa: F401 from ..webdriver_server import OperaDriverServer from ..executors import executor_kwargs as base_executor_kwargs from ..executors.executorselenium import (SeleniumTestharnessExecutor, # noqa: F401 ...
mpl-2.0
saumishr/django
django/template/context.py
80
6146
from copy import copy from django.core.exceptions import ImproperlyConfigured from django.utils.importlib import import_module # Cache of actual callables. _standard_context_processors = None # We need the CSRF processor no matter what the user has in their settings, # because otherwise it is a security vulnerability,...
bsd-3-clause
rooi/CouchPotatoServer
couchpotato/core/plugins/trailer/main.py
8
1661
from couchpotato.core.event import addEvent, fireEvent from couchpotato.core.helpers.variable import getExt, getTitle from couchpotato.core.logger import CPLog from couchpotato.core.plugins.base import Plugin import os log = CPLog(__name__) class Trailer(Plugin): def __init__(self): addEvent('renamer.af...
gpl-3.0
blueburningcoder/pybrain
pybrain/supervised/knn/lsh/nearoptimal.py
25
6466
"""This module provides functionality for locality sensitive hashing in high dimensional euclidean spaces. It is based on the work of Andoni and Indyk, 'Near-Optimal Hashing Algorithms for Approximate Nearest Neighbor in High Dimensions'.""" __author__ = 'Justin Bayer, bayer.justin@googlemail.com' import logging...
bsd-3-clause
roadmapper/ansible
lib/ansible/modules/storage/netapp/_na_ontap_gather_facts.py
21
21721
#!/usr/bin/python # (c) 2018 Piotr Olczak <piotr.olczak@redhat.com> # (c) 2018-2019, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '...
gpl-3.0
calamityman/ansible-modules-extras
cloud/amazon/ec2_vpc_vgw.py
43
20238
#!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
gpl-3.0
sgerhart/ansible
lib/ansible/modules/web_infrastructure/django_manage.py
9
11389
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Scott Anderson <scottanderson42@gmail.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': ...
mit
40223119/2015w13
static/Brython3.1.0-20150301-090019/Lib/sys.py
109
4959
# hack to return special attributes from _sys import * from javascript import JSObject has_local_storage=__BRYTHON__.has_local_storage has_session_storage = __BRYTHON__.has_session_storage has_json=__BRYTHON__.has_json argv = ['__main__'] base_exec_prefix = __BRYTHON__.brython_path base_prefix = __BRYTHON__.brython...
gpl-3.0
sserrot/champion_relationships
venv/Lib/site-packages/pythonwin/pywin/framework/editor/template.py
7
1792
import string import win32ui import win32api from pywin.mfc import docview import pywin.framework.window import os from . import frame ParentEditorTemplate=docview.DocTemplate class EditorTemplateBase(ParentEditorTemplate): def __init__(self, res=win32ui.IDR_TEXTTYPE, makeDoc=None, makeFrame=None, makeView=None): i...
mit
msrb/samba
python/examples/samr.py
66
3870
#!/usr/bin/env python # -*- coding: utf-8 -*- # Unix SMB/CIFS implementation. # Copyright © Jelmer Vernooij <jelmer@samba.org> 2008 # # Based on samr.js © Andrew Tridgell <tridge@samba.org> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public Licens...
gpl-3.0
cloudbase/neutron-virtualbox
neutron/plugins/embrane/common/constants.py
47
2749
# Copyright 2013 Embrane, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
apache-2.0
ged-lab/khmer
tests/test_graph.py
2
10940
# This file is part of khmer, https://github.com/dib-lab/khmer/, and is # Copyright (C) 2010-2015, Michigan State University. # Copyright (C) 2015, The Regents of the University of California. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the followin...
bsd-3-clause
Peddle/hue
desktop/core/ext-py/boto-2.38.0/boto/kinesis/__init__.py
145
1652
# Copyright (c) 2013 Amazon.com, Inc. or its affiliates. # All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights...
apache-2.0
pcamp/google-appengine-wx-launcher
launcher/app_unittest.py
28
2973
#!/usr/bin/env python # # Copyright 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
apache-2.0
teosz/servo
tests/wpt/css-tests/tools/manifest/item.py
84
5794
import os import urlparse from abc import ABCMeta, abstractmethod, abstractproperty from utils import from_os_path, to_os_path item_types = ["testharness", "reftest", "manual", "stub", "wdspec"] def get_source_file(source_files, tests_root, manifest, path): def make_new(): from sourcefile import SourceF...
mpl-2.0
sahitya-pavurala/luigi
test/test_ssh.py
95
1796
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
apache-2.0
v1k45/django-notify-x
notify/models.py
1
14033
from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import models from django.conf import settings from django.db.models import QuerySet from jsonfield.fields import JSONField from six import python_2_unicode_compatible from django.u...
mit
angstwad/ansible
hacking/module_formatter.py
13
18768
#!/usr/bin/env python # (c) 2012, Jan-Piet Mens <jpmens () gmail.com> # (c) 2012-2014, Michael DeHaan <michael@ansible.com> and others # # 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 So...
gpl-3.0
jayceyxc/hue
desktop/libs/hadoop/src/hadoop/mini_cluster.py
10
18183
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
apache-2.0
Sarsate/compute-image-packages
google_compute_engine/clock_skew/tests/clock_skew_daemon_test.py
1
4640
#!/usr/bin/python # Copyright 2016 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 appli...
apache-2.0
blindFS/powerline
tests/lib/vterm.py
23
4580
# vim:fileencoding=utf-8:noet from __future__ import (unicode_literals, division, absolute_import, print_function) import ctypes from powerline.lib.unicode import unicode, unichr, tointiter class CTypesFunction(object): def __init__(self, library, name, rettype, args): self.name = name self.prototype = ctypes....
mit
pbrady/sympy
sympy/galgebra/stringarrays.py
50
3306
# sympy/galgebra/stringarrays.py """ stringarrays.py are a group of helper functions to convert string input to vector and multivector class function to arrays of SymPy symbols. """ import operator from sympy.core.compatibility import reduce from itertools import combinations from sympy import S, Symbol, Function f...
bsd-3-clause
hlieberman/ansible-modules-core
cloud/openstack/os_server_volume.py
77
4651
#!/usr/bin/python #coding: utf-8 -*- # Copyright (c) 2014 Hewlett-Packard Development Company, L.P. # # This module 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 yo...
gpl-3.0
dan1/horizon-proto
horizon/tabs/base.py
36
17272
# Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
apache-2.0
Azulinho/ansible
lib/ansible/modules/clustering/znode.py
46
7699
#!/usr/bin/python # Copyright 2015 WP Engine, Inc. All rights reserved. # 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
teamfx/openjfx-10-dev-rt
modules/javafx.web/src/main/native/Tools/Scripts/webkitpy/tool/bot/irc_command.py
2
12985
# 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 ...
gpl-2.0
gameduell/duell
bin/win/python2.7.9/Lib/nturl2path.py
228
2371
"""Convert a NT pathname to a file URL and vice versa.""" def url2pathname(url): """OS-specific conversion from a relative URL of the 'file' scheme to a file system path; not recommended for general use.""" # e.g. # ///C|/foo/bar/spam.foo # becomes # C:\foo\bar\spam.foo import string, urlli...
bsd-2-clause
Umang88/Radon-Kenzo
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py
4653
3596
# EventClass.py # # This is a library defining some events types classes, which could # be used by other scripts to analyzing the perf samples. # # Currently there are just a few classes defined for examples, # PerfEvent is the base class for all perf event sample, PebsEvent # is a HW base Intel x86 PEBS event, and use...
gpl-2.0
astaninger/speakout
venv/lib/python3.6/site-packages/setuptools/wheel.py
19
8102
"""Wheels support.""" from distutils.util import get_platform import email import itertools import os import posixpath import re import zipfile from pkg_resources import Distribution, PathMetadata, parse_version from setuptools.extern.packaging.utils import canonicalize_name from setuptools.extern.six import PY3 from...
mit
GoogleCloudDataproc/cloud-dataproc
codelabs/spark-nlp/topic_model.py
1
8715
# Copyright 2019 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
bretlowery/snakr
lib/django/contrib/gis/gdal/feature.py
439
4153
from django.contrib.gis.gdal.base import GDALBase from django.contrib.gis.gdal.error import GDALException, OGRIndexError from django.contrib.gis.gdal.field import Field from django.contrib.gis.gdal.geometries import OGRGeometry, OGRGeomType from django.contrib.gis.gdal.prototypes import ds as capi, geom as geom_api fro...
bsd-3-clause
Spiderlover/Toontown
toontown/suit/SuitBase.py
1
3300
import SuitDNA from SuitLegList import * import SuitTimings from direct.directnotify import DirectNotifyGlobal from direct.distributed.ClockDelta import * from pandac.PandaModules import * from pandac.PandaModules import Point3 from toontown.battle import SuitBattleGlobals from toontown.toonbase import TTLocalizer TI...
mit
pombredanne/invenio-old
modules/websubmit/lib/functions/Move_Files_Archive.py
4
2180
## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 CERN. ## ## CDS 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 (...
gpl-2.0
vlinhd11/vlinhd11-android-scripting
python/src/Lib/plat-mac/Carbon/Icons.py
81
16284
# Generated from 'Icons.h' def FOUR_CHAR_CODE(x): return x from Carbon.Files import * kGenericDocumentIconResource = -4000 kGenericStationeryIconResource = -3985 kGenericEditionFileIconResource = -3989 kGenericApplicationIconResource = -3996 kGenericDeskAccessoryIconResource = -3991 kGenericFolderIconResource = -3999 ...
apache-2.0
ray-project/ray
rllib/utils/annotations.py
2
1536
def override(cls): """Annotation for documenting method overrides. Args: cls (type): The superclass that provides the overridden method. If this cls does not actually have the method, an error is raised. """ def check_override(method): if method.__name__ not in dir(cls): ...
apache-2.0
akash1808/glance
glance/tests/unit/common/test_signature_utils.py
2
15922
# Copyright (c) The Johns Hopkins University/Applied Physics Laboratory # 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/licen...
apache-2.0
DreamerKing/LightweightHtmlWidgets
publish-rc/v1.1/files/Ipy.Lib/bdb.py
108
21084
"""Debugger basics""" import fnmatch import sys import os import types __all__ = ["BdbQuit","Bdb","Breakpoint"] class BdbQuit(Exception): """Exception to give up completely""" class Bdb: """Generic Python debugger base class. This class takes care of details of the trace facility; a derived class...
gpl-3.0
CouchPotato/CouchPotatoServer
couchpotato/core/downloaders/blackhole.py
16
7939
from __future__ import with_statement import os import traceback from couchpotato.core._base.downloader.main import DownloaderBase from couchpotato.core.helpers.encoding import sp from couchpotato.core.helpers.variable import getDownloadDir from couchpotato.core.logger import CPLog from couchpotato.environment import ...
gpl-3.0
raumfeld/linux-am33xx
tools/testing/selftests/tc-testing/plugin-lib/valgrindPlugin.py
91
5020
''' run the command under test, under valgrind and collect memory leak info as a separate test. ''' import os import re import signal from string import Template import subprocess import time from TdcPlugin import TdcPlugin from tdc_config import * def vp_extract_num_from_string(num_as_string_maybe_with_commas): ...
gpl-2.0
fronti90/kernel_lge_geefhd
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py
12980
5411
# SchedGui.py - Python extension for perf script, basic GUI code for # traces drawing and overview. # # Copyright (C) 2010 by Frederic Weisbecker <fweisbec@gmail.com> # # This software is distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. ...
gpl-2.0
danilito19/django
django/core/files/locks.py
725
3516
""" Portable file locking utilities. Based partially on an example by Jonathan Feignberg in the Python Cookbook [1] (licensed under the Python Software License) and a ctypes port by Anatoly Techtonik for Roundup [2] (license [3]). [1] http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65203 [2] http://sourceforg...
bsd-3-clause
anrl/gini3
backend/src/gloader/xml/dom/html/HTMLUListElement.py
10
1612
######################################################################## # # File Name: HTMLUListElement # # ### This file is automatically generated by GenerateHtml.py. ### DO NOT EDIT! """ WWW: http://4suite.com/4DOM e-mail: support@4suite.com Copyright (c) 2000 Fourthought Inc, USA. All Right...
mit
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-2.7/Lib/distutils/tests/test_build_py.py
2
4009
"""Tests for distutils.command.build_py.""" import os import sys import StringIO import unittest from distutils.command.build_py import build_py from distutils.core import Distribution from distutils.errors import DistutilsFileError from distutils.tests import support class BuildPyTestCase(support.TempdirManager, ...
mit
pattywgm/funny-spider
douban/douban/spiders/movie_awards.py
1
2888
#!/usr/bin/env python # encoding: utf-8 """ @version: 1.0 @file: movie_awards.py @time: 17/10/19 下午10:35 @desc: 电影获奖数据抓取 28items/每分钟 被ban """ import re from copy import deepcopy from os.path import exists import scrapy from douban.items import AwardsItem from douban.utils.my_utils import load_obj, replace_d...
gpl-3.0
flyfei/python-for-android
python3-alpha/python3-src/Tools/scripts/ftpmirror.py
49
13088
#! /usr/bin/env python3 """Mirror a remote ftp subtree into a local directory tree. usage: ftpmirror [-v] [-q] [-i] [-m] [-n] [-r] [-s pat] [-l username [-p passwd [-a account]]] hostname[:port] [remotedir [localdir]] -v: verbose -q: quiet -i: interactive mode -m: macintosh server (N...
apache-2.0
zerobatu/edx-platform
lms/djangoapps/teams/migrations/0004_auto__add_field_courseteam_discussion_topic_id__add_field_courseteam_l.py
46
6547
# -*- coding: utf-8 -*- import pytz from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'CourseTeam.last_activity_at' db.add_column('t...
agpl-3.0
nrwahl2/ansible
lib/ansible/modules/cloud/centurylink/clc_group.py
26
16745
#!/usr/bin/python # # Copyright (c) 2015 CenturyLink # 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': ['previ...
gpl-3.0
SlimRoms/android_external_chromium_org
build/mac/tweak_info_plist.py
42
10163
#!/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. # # Xcode supports build variable substitutions and CPP; sadly, that doesn't work # because: # # 1. Xcode wants to do the Info.pli...
bsd-3-clause
simone/django-gb
django/core/serializers/pyyaml.py
115
2635
""" YAML serializer. Requires PyYaml (http://pyyaml.org/), but that's checked for in __init__. """ import decimal import yaml import sys from io import StringIO from django.db import models from django.core.serializers.base import DeserializationError from django.core.serializers.python import Serializer as PythonSe...
bsd-3-clause
bclau/nova
nova/virt/powervm/lpar.py
11
5106
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 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 # # ...
apache-2.0
CyanogenMod/android_external_chromium_org
third_party/protobuf/python/google/protobuf/internal/text_format_test.py
162
23727
#! /usr/bin/python # # Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # ...
bsd-3-clause
janocat/odoo
addons/base_report_designer/__init__.py
421
1136
# -*- 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
mancoast/CPythonPyc_test
cpython/273_test_memoryio.py
31
25664
"""Unit tests for memory-based file-like objects. StringIO -- for unicode strings BytesIO -- for bytes """ from __future__ import unicode_literals from __future__ import print_function import unittest from test import test_support as support import io import _pyio as pyio import pickle class MemorySeekTestMixin: ...
gpl-3.0
rsignell-usgs/yaml2ncml
setup.py
1
1966
import os import sys from setuptools import setup from setuptools.command.test import test as TestCommand class PyTest(TestCommand): def finalize_options(self): TestCommand.finalize_options(self) self.test_args = ['--verbose'] self.test_suite = True def run_tests(self): import...
mit
harmy/kbengine
kbe/src/lib/python/Tools/scripts/texi2html.py
48
70149
#! /usr/bin/env python3 # Convert GNU texinfo files into HTML, one file per node. # Based on Texinfo 2.14. # Usage: texi2html [-d] [-d] [-c] inputfile outputdirectory # The input file must be a complete texinfo file, e.g. emacs.texi. # This creates many files (one per info node) in the output directory, # overwriting ...
lgpl-3.0