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
Mic92/systemd
src/test/test-systemd-tmpfiles.py
6
5242
#!/usr/bin/env python3 # SPDX-License-Identifier: LGPL-2.1+ # # This file is part of systemd. # # 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; either version 2.1 of the License, or # (a...
gpl-2.0
Thraxis/SickRage
lib/hachoir_core/field/integer.py
73
1848
""" Integer field classes: - UInt8, UInt16, UInt24, UInt32, UInt64: unsigned integer of 8, 16, 32, 64 bits ; - Int8, Int16, Int24, Int32, Int64: signed integer of 8, 16, 32, 64 bits. """ from hachoir_core.field import Bits, FieldError class GenericInteger(Bits): """ Generic integer class used to generate othe...
gpl-3.0
clouserw/olympia
apps/api/tests/test_views.py
1
53842
# -*- coding: utf-8 -*- import json from textwrap import dedent from django.conf import settings from django.test.client import Client from django.utils import translation import jingo from mock import patch from nose.tools import eq_ from pyquery import PyQuery as pq import amo import api from addons.models import ...
bsd-3-clause
Debian/dak
dak/write_sections.py
1
2199
#! /usr/bin/env python3 """ Writes out a rfc2822-formatted list of sections and their descriptions. @contact: Debian FTP Master <ftpmaster@debian.org> @copyright: 2009 Peter Palfrader <peter@palfrader.org> @copyright: 2020 Joerg Jaspert <joerg@debian.org> @license: GNU General Public License version 2 or later """ ...
gpl-2.0
badbear1727/rur-ple
rur_py/event_manager.py
4
1447
# -*- coding: utf-8 """ RUR-PLE: Roberge's Used Robot - a Python Learning Environment event_manager.py Version 0.8.7 Author: Andre Roberge Copyright 2005 andre.roberge@gmail.com """ import wx # Custom event # The functions and class are needed to create everything needed for our custom # wxPython ...
gpl-2.0
RackSec/ansible
lib/ansible/modules/storage/netapp/netapp_e_lun_mapping.py
42
12380
#!/usr/bin/python # (c) 2016, NetApp, 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....
gpl-3.0
jfpla/odoo
addons/hr_holidays/report/__init__.py
442
1129
# -*- 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
azaghal/ansible
test/support/integration/plugins/modules/cloudformation.py
23
37091
#!/usr/bin/python # Copyright: (c) 2017, 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': ['st...
gpl-3.0
slonik-az/cython
runtests.py
2
81498
#!/usr/bin/env python import os import sys import re import gc import locale import shutil import time import unittest import doctest import operator import subprocess import tempfile import traceback import warnings try: import platform IS_PYPY = platform.python_implementation() == 'PyPy' IS_CPYTHON = pl...
apache-2.0
Snuzzo/max_od
arch/ia64/scripts/unwcheck.py
13143
1714
#!/usr/bin/python # # Usage: unwcheck.py FILE # # This script checks the unwind info of each function in file FILE # and verifies that the sum of the region-lengths matches the total # length of the function. # # Based on a shell/awk script originally written by Harish Patil, # which was converted to Perl by Matthew Ch...
gpl-2.0
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-3.3.0/Lib/timeit.py
6
12384
#! /usr/bin/env python3 """Tool for measuring execution time of small code snippets. This module avoids a number of common traps for measuring execution times. See also Tim Peters' introduction to the Algorithms chapter in the Python Cookbook, published by O'Reilly. Library usage: see the Timer class. Command line...
mit
paultopia/auto-sklearn
setup.py
5
4953
import setuptools from setuptools.command.install import install from distutils.extension import Extension import os import shutil import subprocess import sys import tarfile import urllib SMAC_DOWNLOAD_LOCATION = "http://aad.informatik.uni-freiburg.de/~feurerm/" SMAC_TAR_NAME = "smac-v2.08.01-development-1.tar.gz" #...
bsd-3-clause
annarev/tensorflow
tensorflow/python/distribute/distribute_utils_test.py
9
10281
# Copyright 2020 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
dimara/synnefo
snf-cyclades-app/synnefo/logic/management/commands/subnet-create.py
10
5234
# Copyright (C) 2010-2014 GRNET S.A. # # 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 i...
gpl-3.0
anirudhagar13/PES-Portal
pes_portal/tester/views.py
1
7426
from django.shortcuts import render from .forms import * from .models import * from django.utils import timezone from django.core.mail import send_mail from django.conf import settings from welcomepage.views import navbar_functions # Create your views here. ''' This function renders the form to create the even...
apache-2.0
Warbo/wtk
update_copyright/vcs/git.py
1
2729
# Copyright (C) 2012-2013 W. Trevor King <wking@tremily.us> # # This file is part of update-copyright. # # update-copyright 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 (...
gpl-3.0
nickjj/build-a-saas-app-with-flask
snakeeyes/app.py
1
1832
from flask import Flask from celery import Celery from werkzeug.debug import DebuggedApplication from snakeeyes.blueprints.page import page from snakeeyes.blueprints.contact import contact from snakeeyes.extensions import debug_toolbar, mail, csrf, flask_static_digest def create_celery_app(app=None): """ Cre...
mit
CRImier/pyLCI
input/drivers/adafruit_plate.py
2
2744
import smbus from time import sleep from skeleton import InputSkeleton class InputDevice(InputSkeleton): """A driver for Adafruit-developed Raspberry Pi character LCD&button shields based on MCP23017, either Adafruit-made or Chinese-made. Tested on hardware compatible with Adafruit schematic and working ...
apache-2.0
dongjoon-hyun/spark
examples/src/main/python/mllib/logistic_regression_with_lbfgs_example.py
27
2043
# # 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
Azure/azure-sdk-for-python
sdk/eventhub/azure-eventhub/tests/livetest/synctests/test_properties.py
1
3596
#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- import pyte...
mit
40223150/2015cd_midterm
static/Brython3.1.0-20150301-090019/Lib/xml/sax/expatreader.py
870
14659
""" SAX driver for the pyexpat C module. This driver works with pyexpat.__version__ == '2.22'. """ version = "0.20" from xml.sax._exceptions import * from xml.sax.handler import feature_validation, feature_namespaces from xml.sax.handler import feature_namespace_prefixes from xml.sax.handler import feature_external_...
gpl-3.0
bryancall/trafficserver
tests/gold_tests/tls_hooks/tls_hooks14.test.py
4
2795
''' Test two outbound start delayed hooks ''' # 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 Li...
apache-2.0
yonglehou/scikit-learn
sklearn/cluster/tests/test_k_means.py
132
25860
"""Testing for K-means""" import sys import numpy as np from scipy import sparse as sp from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_array_equal from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testing import SkipTest from sklearn.utils.testing i...
bsd-3-clause
double12gzh/nova
nova/tests/unit/conductor/tasks/test_live_migrate.py
5
18849
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
apache-2.0
DEVSYST/MedFreq
main.py
1
2630
#!/usr/bin/python from decimal import Decimal import json from tools import HasStringNumbers from time import sleep import RPi.GPIO as GPIO gpio_pin_numbers = [5, 6, 7, 13, 12, 16, 19, 20, 21, 26] GPIO.setmode(GPIO.BCM) GPIO.setup(gpio_pin_numbers, GPIO.OUT) gpio_objects = [] class IllnessItem: d...
gpl-3.0
louietsai/python-for-android
python3-alpha/python3-src/Lib/test/crashers/gc_inspection.py
195
1092
""" gc.get_referrers() can be used to see objects before they are fully built. Note that this is only an example. There are many ways to crash Python by using gc.get_referrers(), as well as many extension modules (even when they are using perfectly documented patterns to build objects). Identifying and removing all ...
apache-2.0
idem2lyon/persomov
libs/tornado/process.py
66
10954
#!/usr/bin/env python # # Copyright 2011 Facebook # # 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 a...
gpl-3.0
reinhrst/panda
usr/lib/python2.7/warnings.py
265
14044
"""Python part of the warnings subsystem.""" # Note: function level imports should *not* be used # in this module as it may cause import lock deadlock. # See bug 683658. import linecache import sys import types __all__ = ["warn", "showwarning", "formatwarning", "filterwarnings", "resetwarnings", "catch_war...
gpl-3.0
gquirozbogner/contentbox-master
third_party/django/contrib/messages/storage/fallback.py
627
2171
from django.contrib.messages.storage.base import BaseStorage from django.contrib.messages.storage.cookie import CookieStorage from django.contrib.messages.storage.session import SessionStorage class FallbackStorage(BaseStorage): """ Tries to store all messages in the first backend, storing any unstored mes...
apache-2.0
savoirfairelinux/odoo
addons/l10n_uy/__openerp__.py
170
1887
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2011 Openerp.uy <openerp.uy@lists.launchpad.net> # Proyecto de Localización de OperERP para Uruguay # $Id$ # # This program i...
agpl-3.0
whitepyro/debian_server_setup
sickbeard/clients/download_station.py
2
2686
# Authors: # Pedro Jose Pereira Vieito <pvieito@gmail.com> (Twitter: @pvieito) # # URL: https://github.com/mr-orange/Sick-Beard # # 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 Softwa...
gpl-3.0
chemelnucfin/tensorflow
tensorflow/compiler/tests/dynamic_stitch_test.py
25
3813
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
shaunstanislaus/ZeroNet
src/lib/pybitcointools/test.py
21
25212
import json import os import random import unittest import bitcoin.ripemd as ripemd from bitcoin import * class TestECCArithmetic(unittest.TestCase): @classmethod def setUpClass(cls): print('Starting ECC arithmetic tests') def test_all(self): for i in range(8): print('### Ro...
gpl-2.0
openstack/neutron
neutron/tests/functional/services/logapi/test_logging.py
2
6468
# Copyright (c) 2017 Fujitsu Limited # 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 requi...
apache-2.0
sander76/home-assistant
homeassistant/components/config/entity_registry.py
6
6271
"""HTTP views to interact with the entity registry.""" import voluptuous as vol from homeassistant import config_entries from homeassistant.components import websocket_api from homeassistant.components.websocket_api.const import ERR_NOT_FOUND from homeassistant.components.websocket_api.decorators import ( async_re...
apache-2.0
schwehr/gdal-autotest2
python/ogr/ogr_util.py
1
10064
# 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 a...
apache-2.0
aparna29/Implementation-of-Random-Exponential-Marking-REM-in-ns-3
src/dsdv/bindings/modulegen__gcc_ILP32.py
8
525693
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
gpl-2.0
saleemjaveds/https-github.com-openstack-nova
nova/tests/cells/test_cells_weights.py
22
9045
# Copyright (c) 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
apache-2.0
evensonbryan/yocto-autobuilder
lib/python2.7/site-packages/autobuilder/buildsteps/CheckOutLayers.py
3
4815
# This file is part of Buildbot. Buildbot is free software: you can # redistribute it and/or modify it under the terms of the GNU General Public # License as published by the Free Software Foundation, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
gpl-2.0
vrenaville/ngo-addons-backport
addons/email_template/tests/__init__.py
56
1104
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
agpl-3.0
aerophile/django
tests/ordering/tests.py
33
9272
from __future__ import unicode_literals from datetime import datetime from operator import attrgetter from django.db.models import F from django.test import TestCase from .models import Article, Author class OrderingTests(TestCase): def setUp(self): self.a1 = Article.objects.create( headlin...
bsd-3-clause
camptocamp/ngo-addons-backport
addons/point_of_sale/report/pos_report.py
55
10354
# -*- 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
rikuayanokozy/closure-templates
python/sanitize.py
5
13123
# Copyright 2015 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 a...
apache-2.0
haad/ansible
contrib/inventory/spacewalk.py
117
8766
#!/usr/bin/env python """ Spacewalk external inventory script ================================= Ansible has a feature where instead of reading from /etc/ansible/hosts as a text file, it can query external programs to obtain the list of hosts, groups the hosts are in, and even variables to assign to each host. To use...
gpl-3.0
filbranden/systemd
.ycm_extra_conf.py
54
8410
#!/usr/bin/env python # SPDX-License-Identifier: Unlicense # # Based on the template file provided by the 'YCM-Generator' project authored by # Reuben D'Netto. # Jiahui Xie has re-reformatted and expanded the original script in accordance # to the requirements of the PEP 8 style guide and 'systemd' project, # respecti...
gpl-2.0
wallnerryan/quantum_migrate
quantum/plugins/bigswitch/plugin.py
1
53398
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Big Switch Networks, 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.a...
apache-2.0
nolanliou/tensorflow
third_party/llvm/expand_cmake_vars.py
168
2679
# 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
GDGLima/contentbox
third_party/django/contrib/gis/sitemaps/kml.py
121
2480
from django.core import urlresolvers from django.contrib.sitemaps import Sitemap from django.contrib.gis.db.models.fields import GeometryField from django.db import models class KMLSitemap(Sitemap): """ A minimal hook to produce KML sitemaps. """ geo_format = 'kml' def __init__(self, locations=Non...
apache-2.0
chengduoZH/Paddle
python/paddle/fluid/tests/unittests/test_adamax_op.py
5
6077
# Copyright (c) 2018 PaddlePaddle 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 app...
apache-2.0
M4sse/chromium.src
build/android/gyp/gcc_preprocess.py
105
1654
#!/usr/bin/env python # # 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. import optparse import os import sys from util import build_utils def DoGcc(options): build_utils.MakeDirectory(os.path.dirname(o...
bsd-3-clause
elainenaomi/sciwonc-dataflow-examples
sbbd2016/experiments/4-mongodb-rp-3sh/11_workflow_full_10files_primary_3sh_annot_with_proj_3s_rg/calculateratio_3/CalculateRatioCpuMemory_3.py
2
3196
#!/usr/bin/env python """ This activity will calculate the ratio between CPU request and Memory request by (job ID, task index, event type). These fields are optional and could be null. """ # It will connect to DataStoreClient from sciwonc.dataflow.DataStoreClient import DataStoreClient import ConfigDB_TaskEvent_3 imp...
gpl-3.0
kevclarx/ansible
lib/ansible/utils/listify.py
14
1464
# (c) 2014 Michael DeHaan, <michael@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 ve...
gpl-3.0
doheekim/chuizonetest
lib/flask/debughelpers.py
777
3508
# -*- coding: utf-8 -*- """ flask.debughelpers ~~~~~~~~~~~~~~~~~~ Various helpers to make the development experience better. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from ._compat import implements_to_string class UnexpectedUnicodeError(AssertionEr...
apache-2.0
sivaprakashniet/push_pull
p2p/lib/python2.7/site-packages/compressor/tests/test_signals.py
1
2470
from django.test import TestCase from django.test.utils import override_settings from mock import Mock from compressor.css import CssCompressor from compressor.js import JsCompressor from compressor.signals import post_compress @override_settings( COMPRESS_ENABLED=True, COMPRESS_PRECOMPILERS=(), COMPRES...
bsd-3-clause
cawka/ns-3-dev-ndnSIM
waf-tools/command.py
5
4202
import re import subprocess # import feature, taskgen_method, before_method, task_gen from waflib import TaskGen, Node, Task, Utils, Build, Options, Logs, Task debug = Logs.debug error = Logs.error import shellcmd #shellcmd.subprocess = pproc # the WAF version of the subprocess module is supposedly less buggy shellcm...
gpl-2.0
ayushgoel/FixGoogleContacts
phonenumbers/data/region_ML.py
1
1934
"""Auto-generated file, do not edit by hand. ML metadata""" from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_ML = PhoneMetadata(id='ML', country_code=223, international_prefix='00', general_desc=PhoneNumberDesc(national_number_pattern='[246-8]\\d{7}', possible_number_pattern=...
mit
tmroeder/cloudproxy
src/third_party/googlemock/gtest/test/gtest_xml_test_utils.py
1815
8876
#!/usr/bin/env python # # Copyright 2006, 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...
apache-2.0
JianGoForIt/YellowFin_Pytorch
pytorch-cifar/utils.py
1
3444
'''Some helper functions for PyTorch, including: - get_mean_and_std: calculate the mean and std value of dataset. - msr_init: net parameter initialization. - progress_bar: progress bar mimic xlua.progress. ''' import os import sys import time import math import torch.nn as nn import torch.nn.init as init ...
apache-2.0
manishbisht/Udacity
Full Stack Web Developer Nanodegree v2/P1 - Fyyur Artist Booking Site/models.py
1
5969
from sqlalchemy import Column, String, Integer, Boolean, DateTime, ARRAY, ForeignKey from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate db = SQLAlchemy() # TODO: connect to a local postgresql database def setup_db(app): app.config.from_object('config') db.app = app db.init_app(app) ...
mit
shubhamdhama/zulip
zerver/management/commands/export_single_user.py
4
1820
import os import shutil import subprocess import tempfile from argparse import ArgumentParser from typing import Any from zerver.lib.export import do_export_user from zerver.lib.management import ZulipBaseCommand class Command(ZulipBaseCommand): help = """Exports message data from a Zulip user This command ...
apache-2.0
romain-dartigues/ansible
lib/ansible/modules/network/vyos/vyos_l3_interface.py
56
8511
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, inc # # This file is part of Ansible by Red Hat # # 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 Li...
gpl-3.0
jolyboy/ardupilot
Tools/scripts/magfit_flashlog.py
278
4744
#!/usr/bin/env python ''' fit best estimate of magnetometer offsets from ArduCopter flashlog using the algorithm from Bill Premerlani ''' import sys, time, os, math # command line option handling from optparse import OptionParser parser = OptionParser("magfit_flashlog.py [options]") parser.add_option("--verbose", ac...
gpl-3.0
JunchengChen/tvb
tvb/excel.py
2
1375
# encoding: utf-8 ''' @author: Juncheng Chen @copyright: 1999-2015 Alibaba.com. All rights reserved. @license: Apache Software License 2.0 @contact: juncheng.cjc@outlook.com ''' import xlsxwriter import logging logger = logging.getLogger(__name__) class Excel(object): def __init__(self, book_name): ...
apache-2.0
flavour/eden
modules/templates/SAMBRO/controllers.py
5
80015
# -*- coding: utf-8 -*- from datetime import datetime, timedelta try: import json # try stdlib (Python 2.6) except ImportError: try: import simplejson as json # try external module except: import gluon.contrib.simplejson as json # fallback to pure-Python module from gluon import current f...
mit
miltonruelas/cursotecnico
branch/base_state_ubication/res_state.py
4
3931
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2012 Cubic ERP - Teradata SAC. (http://cubicerp.com). # # WARNING: This program as such is intended to be used by professional # programmers who take t...
agpl-3.0
frc1418/2017-robot
robot/autonomous/unused/drive_forward.py
1
1721
from .base_auto import VictisAuto from components import swervedrive, gearpicker, shooter from controllers import angle_controller, pos_controller, position_history, position_tracker from magicbot.state_machine import timed_state, state, AutonomousStateMachine from magicbot.magic_tunable import tunable class SideGe...
mit
ge0rgi/cinder
cinder/volume/drivers/netapp/dataontap/fc_7mode.py
1
5311
# Copyright (c) - 2014, Clinton Knight. All rights reserved. # Copyright (c) 2016 Mike Rooney. 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:...
apache-2.0
fuzzyhandle/awslambdas
garden-irrigation-tweets/requests/packages/chardet/universaldetector.py
24
11990
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
mit
rhdedgar/openshift-tools
openshift/installer/vendored/openshift-ansible-3.6.173.0.27/roles/lib_utils/library/repoquery.py
10
22273
#!/usr/bin/env python # pylint: disable=missing-docstring # ___ ___ _ _ ___ ___ _ _____ ___ ___ # / __| __| \| | __| _ \ /_\_ _| __| \ # | (_ | _|| .` | _|| / / _ \| | | _|| |) | # \___|___|_|\_|___|_|_\/_/_\_\_|_|___|___/_ _____ # | \ / _ \ | \| |/ _ \_ _| | __| \_ _|_ _| # | |) | (...
apache-2.0
kaedroho/django
tests/queries/test_explain.py
16
6381
import unittest from django.db import NotSupportedError, connection, transaction from django.db.models import Count from django.test import TestCase, skipIfDBFeature, skipUnlessDBFeature from django.test.utils import CaptureQueriesContext from .models import Tag @skipUnlessDBFeature('supports_explaining_query_execu...
bsd-3-clause
campbellr/tapiriik
tapiriik/testing/testtools.py
6
7371
from unittest import TestCase from tapiriik.services import Service, ServiceRecord, ServiceBase from tapiriik.services.interchange import Activity, ActivityType, ActivityStatistic, ActivityStatisticUnit, Waypoint, WaypointType, Lap, Location from datetime import datetime, timedelta import random import pytz from tapi...
apache-2.0
Designist/audacity
lib-src/lv2/lilv/waflib/Runner.py
330
4483
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import random,atexit try: from queue import Queue except ImportError: from Queue import Queue from waflib import Utils,Task,Errors,Logs GAP=10 class TaskConsumer(Utils.threa...
gpl-2.0
KarolBedkowski/kupfer-adds
kupfer/plugin/custom_terminal.py
4
1092
__kupfer_name__ = _("Custom Terminal") __description__ = _("Configure a custom terminal emulator") __version__ = "" __author__ = "Ulrik Sverdrup" from kupfer import plugin_support from kupfer import utils __kupfer_settings__ = plugin_support.PluginSettings( { "key": "command", "label": _("Command"), "type"...
gpl-3.0
odoo-turkiye/odoo
openerp/addons/base/workflow/workflow.py
199
9948
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (C) 2004-2014 OpenERP S.A. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
yuanagain/seniorthesis
venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/eucjpprober.py
2919
3678
######################## 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...
mit
kawamon/hue
desktop/libs/metadata/src/metadata/catalog/atlas_flags.py
2
1823
#!/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
daj0ker/BinPy
BinPy/examples/source/ic/Series_7400/IC7416.py
5
1254
# -*- coding: utf-8 -*- # <nbformat>3.0</nbformat> # <headingcell level=2> # Usage of IC 7416 # <codecell> from __future__ import print_function from BinPy import * # <codecell> # Usage of IC 7416: ic = IC_7416() print(ic.__doc__) # <codecell> # The Pin configuration is: inp = {1: 1, 2: 0, 3: 0, 4: 0, 5: 0, ...
bsd-3-clause
imesong/enjarify
enjarify/jvm/jvmops.py
35
3479
# Copyright 2015 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 a...
apache-2.0
nicolargo/intellij-community
python/helpers/pydev/pydev_ipython/inputhook.py
52
18411
# coding: utf-8 """ Inputhook management for GUI event loop integration. """ #----------------------------------------------------------------------------- # Copyright (C) 2008-2011 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distribu...
apache-2.0
larsbutler/oq-hazardlib
openquake/hazardlib/tests/geo/surface/_simple_fault_test_data.py
4
16007
# The Hazard Library # Copyright (C) 2012-2014, GEM Foundation # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. ...
agpl-3.0
tylerjereddy/scipy
scipy/special/tests/test_digamma.py
21
1394
import numpy as np from numpy import pi, log, sqrt from numpy.testing import assert_, assert_equal from scipy.special._testutils import FuncData import scipy.special as sc # Euler-Mascheroni constant euler = 0.57721566490153286 def test_consistency(): # Make sure the implementation of digamma for real arguments...
bsd-3-clause
DanLanglois/PloverDebianPackage
plover/translation.py
1
9540
# Copyright (c) 2013 Hesky Fisher # See LICENSE.txt for details. """Stenography translation. This module handles translating streams of strokes in translations. Two classes compose this module: Translation -- A data model class that encapsulates a sequence of Stroke objects in the context of a particular dictionary....
gpl-2.0
mapr/hue
desktop/core/ext-py/tablib-0.10.0/tablib/packages/odf3/dr3d.py
56
1448
# -*- coding: utf-8 -*- # Copyright (C) 2006-2007 Søren Roug, European Environment Agency # # This library 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; either # version 2.1 of the License, or (at you...
apache-2.0
sjthespian/ISYlib-python
bin/isy_manage_node.py
2
12517
#!/usr/bin/env python """ Node managment WORK IN PROGRESS Some command may not work yet """ __author__ = "Peter Shipley" import ISY # from ISY.IsyExceptionClass import IsyError class cmdException(Exception): def __init__(self, msg) : Exception.__init__(self, msg) verbose=0 commands_hel...
bsd-2-clause
zsiciarz/django
tests/template_tests/syntax_tests/test_resetcycle.py
127
4478
from django.template import TemplateSyntaxError from django.test import SimpleTestCase from ..utils import setup class ResetCycleTagTests(SimpleTestCase): @setup({'resetcycle01': "{% resetcycle %}"}) def test_resetcycle01(self): with self.assertRaisesMessage(TemplateSyntaxError, "No cycles in templa...
bsd-3-clause
cristianquaglio/odoo
addons/crm_partner_assign/wizard/crm_forward_to_partner.py
377
10606
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
apache-2.0
jnhwkim/cuda-convnet2
layer.py
162
82481
# 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...
apache-2.0
chiragjogi/odoo
addons/account_followup/report/__init__.py
447
1108
# -*- 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
alexforencich/verilog-ethernet
example/KC705/fpga_gmii/tb/fpga_core/test_fpga_core.py
2
7178
""" Copyright (c) 2020 Alex Forencich 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, publish, distribute...
mit
antepsis/anteplahmacun
sympy/utilities/mathml/__init__.py
117
2030
"""Module with some functions for MathML, like transforming MathML content in MathML presentation. To use this module, you will need lxml. """ from sympy.utilities.pkgdata import get_resource from sympy.utilities.decorator import doctest_depends_on import xml.dom.minidom def add_mathml_headers(s): return """<ma...
bsd-3-clause
Debian/dak
dak/dakdb/update104.py
1
1958
# coding=utf8 """ Drop created and modified columns from bin_contents and src_contents @contact: Debian FTP Master <ftpmaster@debian.org> @copyright: 2014, Ansgar Burchardt <ansgar@debian.org> @license: GNU General Public License version 2 or later """ # This program is free software; you can redistribute it and/or ...
gpl-2.0
chajadan/dragonfly
documentation/conf.py
5
2336
# -*- coding: utf-8 -*- # import sys import os import os.path import re directory = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) sys.path.insert(0, directory) #--------------------------------------------------------------------------- # Gather version from distribution file. path ...
lgpl-3.0
letouriste001/SmartForest_2.0
python3.4Smartforest/lib/python3.4/site-packages/django/contrib/auth/models.py
1
14879
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...
mit
erdc-cm/air-water-vv
2d/waveOvertopping/OliveiraEtAl2012/vof_n.py
3
2343
from proteus.default_n import * from proteus import (StepControl, TimeIntegration, NonlinearSolvers, LinearSolvers, LinearAlgebraTools) import vof_p as physics from proteus.mprans import VOF from proteus import Context ct = Context.get...
mit
meshula/NTRTsim
scripts/splitInfile.py
2
1859
#!/usr/bin/python # Copyright (c) 2012, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. # All rights reserved. # # The NASA Tensegrity Robotics Toolkit (NTRT) v1 platform is licensed # under the Apache License, Version 2.0 (the "License"); # you ma...
apache-2.0
bbbenja/SickRage
lib/jsonrpclib/jsonrpc.py
68
17116
""" Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the Lice...
gpl-3.0
gravity-tak/vmware-nsx-tempest
vmware_nsx_tempest/tests/nsxv/scenario/net_resources.py
1
4414
# Copyright 2015 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 ...
apache-2.0
KeyWeeUsr/kivy
kivy/extras/highlight.py
78
1880
'''Pygments lexer for kv language ''' from pygments.lexer import RegexLexer, bygroups, using from pygments.lexers.agile import PythonLexer from pygments import highlight from pygments.token import * from pygments.formatters import get_formatter_by_name import sys class KivyLexer(RegexLexer): name = 'Kivy' ali...
mit
doged/electrum-doged-i2p
lib/i18n.py
4
2133
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Electrum - lightweight Bitcoin client # Copyright (C) 2012 thomasv@gitorious # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 ...
gpl-3.0
natefoo/pip
pip/_vendor/_markerlib/markers.py
1769
3979
# -*- coding: utf-8 -*- """Interpret PEP 345 environment markers. EXPR [in|==|!=|not in] EXPR [or|and] ... where EXPR belongs to any of those: python_version = '%s.%s' % (sys.version_info[0], sys.version_info[1]) python_full_version = sys.version.split()[0] os.name = os.name sys.platform = sys.platfo...
mit