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
nmiroshnichenko/scripts
diskinfo/diskinfo.py
1
4642
#!/usr/bin/env python import sys _LINUX_PARTITIONS_FILE_NAME = '/proc/partitions' _LINUX_PARTITION_SIZE_MULTIPLIER = 1024 _LINUX_DISK_TYPE_NUMBERS = (3, 8) class DiskInfo(object): def get_disk_full_list(self): raise NotImplementedError("Should be called in subclasses") class DiskInfoLinux(DiskInfo): ...
mit
nathanielvarona/airflow
tests/test_utils/perf/perf_kit/sqlalchemy.py
8
8062
# 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
ShownX/incubator-mxnet
example/rcnn/rcnn/processing/nms.py
41
2329
# 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
nuxeh/keystone
keystone/trust/routers.py
28
2500
# Copyright 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
apache-2.0
pzajda/eloquence
scons-local-2.5.0/SCons/Platform/win32.py
3
14950
"""SCons.Platform.win32 Platform-specific initialization for Win32 systems. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Platform.Platform() selection method. """ # # Copyright (c) 2001 - 2016 The SCons Foundation # # Permission is hereby...
mit
chapellu/pekee2.0
Python/test_joystick2.py
1
2391
import pygame import sys import time import serial ser = serial.Serial('/dev/ttyACM0',115200) pygame.init() pygame.joystick.init() print (pygame.joystick.get_count()) _joystick = pygame.joystick.Joystick(0) _joystick.init() print (_joystick.get_init()) print (_joystick.get_id()) print (_joystick.get_name()) print (...
mit
mat12/mytest
lib/python/Components/NimManager.py
1
79035
from time import localtime, mktime from datetime import datetime import xml.etree.cElementTree from os import path from enigma import eDVBSatelliteEquipmentControl as secClass, \ eDVBSatelliteLNBParameters as lnbParam, \ eDVBSatelliteDiseqcParameters as diseqcParam, \ eDVBSatelliteSwitchParameters as switchParam, \...
gpl-2.0
codingisacopingstrategy/aa.core
aacore/settings.py
1
1923
# This file is part of Active Archives. # Copyright 2006-2011 the Active Archives contributors (see AUTHORS) # # 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 # Li...
agpl-3.0
shepdl/stream-daemon
twitter_local/stream.py
1
3651
try: import urllib.request as urllib_request import urllib.error as urllib_error import io except ImportError: import urllib2 as urllib_request import urllib2 as urllib_error import simplejson as json from ssl import SSLError import socket from .api import TwitterCall, wrap_response import sys cl...
mit
mccarrmb/moztrap
scripts/update/update.py
3
1527
""" Deployment for moztrap Requires commander (https://github.com/oremj/commander) which is installed on the systems that need it. """ import os import sys sys.path.append(os.path.dirname(os.path.abspath(__file__))) from commander.deploy import task, hostgroups import commander_settings as settings @task def upda...
bsd-2-clause
supamii/QttpServer
lib/gmock/scripts/generator/cpp/tokenize.py
679
9703
#!/usr/bin/env python # # Copyright 2007 Neal Norwitz # Portions Copyright 2007 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...
mit
qyx210an/kernel
tools/perf/scripts/python/failed-syscalls-by-pid.py
11180
2058
# failed system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide failed system call totals, broken down by pid. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.pa...
gpl-2.0
Kast0rTr0y/ansible
lib/ansible/modules/cloud/misc/ovirt.py
17
17885
#!/usr/bin/python # (c) 2013, Vincent Van der Kussen <vincent at vanderkussen.org> # # 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,...
gpl-3.0
ehalls/at100-kernel
tools/perf/scripts/python/sched-migration.py
11215
11670
#!/usr/bin/python # # Cpu task migration overview toy # # Copyright (C) 2010 Frederic Weisbecker <fweisbec@gmail.com> # # perf script event handlers have been generated by perf script -g python # # This software is distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Fre...
gpl-2.0
MattCrystal/shiny-octo-happiness
scripts/gcc-wrapper.py
1276
3382
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2011-2012, The Linux Foundation. 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 th...
gpl-2.0
zero-rp/miniblink49
v8_7_5/tools/testrunner/local/statusfile.py
5
11573
# Copyright 2012 the V8 project authors. 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 conditi...
apache-2.0
florian-dacosta/OpenUpgrade
addons/l10n_fr_hr_payroll/report/__init__.py
424
1091
#-*- coding:utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # d$ # # This program is free software: you can redistribute it and/or modify # it...
agpl-3.0
devendermishrajio/nova
nova/api/openstack/compute/legacy_v2/contrib/extended_ips.py
79
3098
# Copyright 2013 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 agreed to...
apache-2.0
KaiSzuttor/espresso
testsuite/python/rotational_inertia.py
2
6230
# Copyright (C) 2010-2019 The ESPResSo project # # This file is part of ESPResSo. # # ESPResSo 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 v...
gpl-3.0
zirou30/MITMf
core/sslstrip/DnsCache.py
5
1699
# Copyright (c) 2014-2016 Moxie Marlinspike, Marcello Salvati # # 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...
gpl-3.0
seecr/meresco-html
meresco/html/login/basichtmlloginform.py
1
17676
## begin license ## # # "Meresco Html" is a template engine based on generators, and a sequel to Slowfoot. # It is also known as "DynamicHtml" or "Seecr Html". # # Copyright (C) 2012 Meertens Instituut (KNAW) http://meertens.knaw.nl # Copyright (C) 2012-2018, 2020-2021 Seecr (Seek You Too B.V.) https://seecr.nl # Copyr...
gpl-2.0
vrieni/orange
Orange/OrangeCanvas/gui/toolgrid.py
6
14520
""" A widget containing a grid of clickable actions/buttons. """ from collections import namedtuple, deque from PyQt4.QtGui import ( QFrame, QAction, QToolButton, QGridLayout, QFontMetrics, QSizePolicy, QStyleOptionToolButton, QStylePainter, QStyle ) from PyQt4.QtCore import Qt, QObject, QSize, QVariant, QEv...
gpl-3.0
flok99/constatus
examples/lcdproc-overlay.py
1
1079
#! /usr/bin/python3 # this code uses the 'lcdproc-python3' library: # https://github.com/jinglemansweep/lcdproc # for more details about lcdproc, see: # http://lcdproc.org/ from lcdproc.server import Server import time import urllib.request def main(): # 'localhost' must be replaced by the network address on wh...
agpl-3.0
ivmech/iviny-scope
lib/xlsxwriter/test/table/test_table07.py
1
2031
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013, John McNamara, jmcnamara@cpan.org # import unittest from ...compatibility import StringIO from ..helperfunctions import _xml_to_list from ...table import Table from ...worksheet import Wor...
gpl-3.0
kcompher/topik
topik/intermediaries/raw_data.py
1
9075
""" This file is concerned with providing a simple interface for data stored in Elasticsearch. The class(es) defined here are fed into the preprocessing step. """ import logging import time from abc import ABCMeta, abstractmethod from six import with_metaclass from elasticsearch import Elasticsearch, helpers def _...
bsd-3-clause
romain-dartigues/ansible
lib/ansible/modules/cloud/vmware/vsphere_copy.py
35
6503
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2015, Dag Wieers (@dagwieers) <dag@wieers.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_ve...
gpl-3.0
jtyr/ansible-modules-extras
windows/win_environment.py
90
2870
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Jon Hawkesworth (@jhawkesworth) <figs@unity.demon.co.uk> # # 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, eith...
gpl-3.0
40123210/-2015cd_40123210
static/Brython3.1.1-20150328-091302/Lib/errno.py
624
4096
""" This module makes available standard errno system symbols. The value of each symbol is the corresponding integer value, e.g., on most systems, errno.ENOENT equals the integer 2. The dictionary errno.errorcode maps numeric codes to symbol names, e.g., errno.errorcode[2] could be the string 'ENOENT'. Symbols that ar...
gpl-3.0
lbdreyer/iris
lib/iris/tests/runner/_runner.py
2
5308
# Copyright Iris contributors # # This file is part of Iris and is released under the LGPL license. # See COPYING and COPYING.LESSER in the root of the repository for full # licensing details. """ Provides testing capabilities for installed copies of Iris. """ # Because this file is imported by setup.py, there may be...
lgpl-3.0
yvess/cmsplugin-filer
cmsplugin_filer_file/migrations/0001_initial.py
13
1221
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings import filer.fields.file class Migration(migrations.Migration): dependencies = [ ('cms', '0003_auto_20140926_2347'), ('filer', '0001_initial'), ] ope...
bsd-3-clause
AlanD88/website
web2py/gluon/contrib/login_methods/oneall_account.py
8
4595
#!/usr/bin/env python # coding: utf8 """ Oneall Authentication for web2py Developed by Nathan Freeze (Copyright © 2013) Email <nathan@freezable.com> This file contains code to allow using onall.com authentication services with web2py """ import os import base64 from gluon import * from gluon.storage i...
mit
gangadharkadam/saloon_erp_install
erpnext/selling/report/customer_credit_balance/customer_credit_balance.py
96
1688
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import flt from erpnext.selling.doctype.customer.customer import get_customer_outstanding,...
agpl-3.0
mezz64/home-assistant
homeassistant/components/tellduslive/binary_sensor.py
14
1068
"""Support for binary sensors using Tellstick Net.""" from homeassistant.components import binary_sensor, tellduslive from homeassistant.components.binary_sensor import BinarySensorEntity from homeassistant.helpers.dispatcher import async_dispatcher_connect from .entry import TelldusLiveEntity async def async_setup_...
apache-2.0
edcast-inc/edx-platform-edcast
lms/djangoapps/lms_xblock/migrations/0001_initial.py
110
4883
# -*- coding: 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 'XBlockAsidesConfig' db.create_table('lms_xblock_xblockasidesconfig', ( ('id', se...
agpl-3.0
publicRoman/spark
examples/src/main/python/ml/logistic_regression_summary_example.py
71
2442
# # 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
bdero/edx-platform
common/djangoapps/student/migrations/0002_text_to_varchar_and_indexes.py
188
9581
# 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): # Changing field 'UserProfile.name' db.alter_column('auth_userprofile', 'name', self.gf('django.db.models.fields....
agpl-3.0
friebsch/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers
Chapter2_MorePyMC/separation_plot.py
86
1494
# separation plot # Author: Cameron Davidson-Pilon,2013 # see http://mdwardlab.com/sites/default/files/GreenhillWardSacks.pdf import matplotlib.pyplot as plt import numpy as np def separation_plot( p, y, **kwargs ): """ This function creates a separation plot for logistic and probit classification. Se...
mit
kaltsimon/youtube-dl
youtube_dl/extractor/cbsnews.py
96
3204
# encoding: utf-8 from __future__ import unicode_literals import re import json from .common import InfoExtractor class CBSNewsIE(InfoExtractor): IE_DESC = 'CBS News' _VALID_URL = r'http://(?:www\.)?cbsnews\.com/(?:[^/]+/)+(?P<id>[\da-z_-]+)' _TESTS = [ { 'url': 'http://www.cbsnews....
unlicense
Micronaet/micronaet-migration
__UNPORTED__/log_and_mail/__init__.py
1
1076
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # d$ # # This program is free software: you can redistribute it and/or modify # ...
agpl-3.0
quietcoolwu/python-playground
pipeg/gravitate/Board.py
4
10467
#!/usr/bin/env python3 # Copyright © 2012-13 Qtrac Ltd. All rights reserved. # This program or 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 your option) any ...
mit
johannfaouzi/pyts
pyts/metrics/tests/test_boss.py
1
1130
"""Testing for BOSS metric.""" # Author: Johann Faouzi <johann.faouzi@gmail.com> # License: BSD-3-Clause import numpy as np import pytest import re from math import sqrt from pyts.metrics import boss x = np.arange(1, 6) y = np.arange(1, 6)[::-1] z = [0, 0, 0, 10, 0] @pytest.mark.parametrize( 'x, y, err_msg', ...
bsd-3-clause
Nikoala/CouchPotatoServer
libs/guessit/slogging.py
94
3388
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Smewt - A smart collection manager # Copyright (c) 2011 Nicolas Wack <wackou@gmail.com> # # Smewt 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 versio...
gpl-3.0
mikewiebe-ansible/ansible
lib/ansible/modules/cloud/google/gcp_compute_reservation_info.py
13
10575
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
gpl-3.0
mikewiebe-ansible/ansible
test/units/modules/network/netvisor/test_pn_vrouter_pim_config.py
23
2463
# Copyright: (c) 2018, Pluribus Networks # 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 from units.compat.mock import patch from ansible.modules.network.netvisor import pn_vrouter_pim_...
gpl-3.0
shrkey/ardupilot
Tools/LogAnalyzer/tests/TestDualGyroDrift.py
273
5396
from LogAnalyzer import Test,TestResult import DataflashLog # import scipy # import pylab #### TEMP!!! only for dev # from scipy import signal class TestDualGyroDrift(Test): '''test for gyro drift between dual IMU data''' def __init__(self): Test.__init__(self) self.name = "Gyro Drift" self.enable = Fals...
gpl-3.0
siddhartharay007/buck
third-party/py/twitter-commons/src/python/twitter/common/python/translator.py
18
6084
from __future__ import absolute_import from abc import abstractmethod import os import shutil from .common import chmod_plus_w, safe_rmtree, safe_mkdir, safe_mkdtemp from .compatibility import AbstractClass from .installer import WheelInstaller from .interpreter import PythonInterpreter from .package import ( Egg...
apache-2.0
foreni-packages/golismero
thirdparty_libs/django/core/serializers/pyyaml.py
110
2353
""" YAML serializer. Requires PyYaml (http://pyyaml.org/), but that's checked for in __init__. """ import decimal import yaml from io import StringIO from django.db import models from django.core.serializers.base import DeserializationError from django.core.serializers.python import Serializer as PythonSerializer fr...
gpl-2.0
eteq/ginga
ginga/gtkw/ImageViewCanvasGtk.py
4
1290
# # ImageViewCanvasGtk.py -- A FITS image widget with canvas drawing in Gtk # # Eric Jeschke (eric@naoj.org) # # Copyright (c) Eric R. Jeschke. All rights reserved. # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # from ginga.gtkw import ImageViewGtk from gin...
bsd-3-clause
kenshay/ImageScripter
ProgramData/SystemFiles/Python/Lib/site-packages/pygments/lexers/_tsql_builtins.py
31
15484
# -*- coding: utf-8 -*- """ pygments.lexers._tsql_builtins ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ These are manually translated lists from https://msdn.microsoft.com. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ # See https://msdn.microsof...
gpl-3.0
stevenbrichards/boto
boto/cognito/__init__.py
473
1123
# Copyright (c) 2014 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 ...
mit
oy-vey/algorithms-and-data-structures
6-GenomeAssemblyProgrammingChallenge/Week3/optimal_kmer_size.py
1
2363
# python3 class Edge: def __init__(self, u, v, value): self.u = u self.v = v self.value = value class Graph: def __init__(self): self.edges = [] self.incoming_edges = [] self.graph = dict () #[[] for _ in range(n)] self.incoming_graph = dict() def...
mit
GiladE/birde
venv/lib/python2.7/site-packages/psycopg2/tests/test_cancel.py
62
3705
#!/usr/bin/env python # -*- coding: utf-8 -*- # test_cancel.py - unit test for query cancellation # # Copyright (C) 2010-2011 Jan Urbański <wulczer@wulczer.org> # # psycopg2 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...
mit
romankagan/DDBWorkbench
python/lib/Lib/site-packages/django/template/loaders/filesystem.py
229
2358
""" Wrapper for loading templates from the filesystem. """ from django.conf import settings from django.template.base import TemplateDoesNotExist from django.template.loader import BaseLoader from django.utils._os import safe_join class Loader(BaseLoader): is_usable = True def get_template_sources(self, temp...
apache-2.0
Justin-Yuan/Image2Music-Generator
library/jython2.5.3/Lib/test/test_os_jy.py
5
1551
"""Misc os module tests Made for Jython. """ import os import unittest from test import test_support class OSTestCase(unittest.TestCase): def setUp(self): open(test_support.TESTFN, 'w').close() def tearDown(self): if os.path.exists(test_support.TESTFN): os.remove(test_support.TES...
gpl-2.0
webOS-ports/qtwebkit
Tools/Scripts/webkitpy/common/system/executive_mock.py
117
7106
# Copyright (C) 2011 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...
gpl-2.0
RaoUmer/django
django/contrib/localflavor/si/si_postalcodes.py
110
13147
# *-* coding: utf-8 *-* from __future__ import unicode_literals SI_POSTALCODES = [ (1000, 'Ljubljana'), (1215, 'Medvode'), (1216, 'Smlednik'), (1217, 'Vodice'), (1218, 'Komenda'), (1219, 'Laze v Tuhinju'), (1221, 'Motnik'), (1222, 'Trojane'), (1223, 'Blagovica'), (1225, 'Lukovic...
bsd-3-clause
victorbriz/rethinkdb
external/v8_3.30.33.16/tools/run-tests.py
33
22539
#!/usr/bin/env python # # Copyright 2012 the V8 project authors. 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 # noti...
agpl-3.0
ahmadiga/min_edx
common/djangoapps/enrollment/views.py
14
28709
""" The Enrollment API Views should be simple, lean HTTP endpoints for API access. This should consist primarily of authentication, request validation, and serialization. """ import logging from django.core.exceptions import ObjectDoesNotExist from django.utils.decorators import method_decorator from opaque_keys impo...
agpl-3.0
jmcarp/osf.io
scripts/staff_public_regs.py
25
1355
# -*- coding: utf-8 -*- """Get public registrations for staff members. python -m scripts.staff_public_regs """ from collections import defaultdict import logging from modularodm import Q from website.models import Node, User from website.app import init_app logger = logging.getLogger('staff_public_regs') STAFF...
apache-2.0
JGarcia-Panach/odoo
addons/hw_scanner/__openerp__.py
220
1738
# -*- 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
pjdufour/petrarch
petrarch/tests/test_petrarch.py
2
8081
from petrarch import petrarch, PETRglobals, PETRreader, utilities config = petrarch.utilities._get_data('data/config/', 'PETR_config.ini') print("reading config") petrarch.PETRreader.parse_Config(config) print("reading dicts") petrarch.read_dictionaries() petrarch.start_logger() def test_version(): assert petra...
mit
MarceloCorpucci/lettucetutorial
specs/glue/register_fields_steps.py
1
2016
__author__ = 'corpu' from lettuce import step, world import webtest class RegisterFieldSteps(): #Background steps @step(u'Dado que la aplicacion ACL esta en "([^"]*)"') def dado_que_la_aplicacion_acl_esta_en_group1(step, url): world.webApp = webtest.TestApp(url) @step(u'Cuando accedo a la mi...
gpl-2.0
jgoclawski/django
tests/generic_inline_admin/tests.py
154
22749
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime from django.contrib import admin from django.contrib.admin.sites import AdminSite from django.contrib.auth.models import User from django.contrib.contenttypes.admin import GenericTabularInline from django.contrib.contenttypes.forms import...
bsd-3-clause
kyledewey/z3
scripts/mk_win_dist.py
1
8708
############################################ # Copyright (c) 2012 Microsoft Corporation # # Scripts for automatically generating # Window distribution zip files. # # Author: Leonardo de Moura (leonardo) ############################################ import os import glob import re import getopt import sys import shutil...
mit
liucode/tempest-master
tempest/services/object_storage/container_client.py
9
6222
# Copyright 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 requ...
apache-2.0
wildchildyn/autism-website
yanni_env/lib/python3.6/site-packages/pip/_vendor/requests/packages/chardet/langgreekmodel.py
2763
12628
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
gpl-3.0
louyihua/edx-platform
lms/djangoapps/certificates/tests/test_signals.py
29
1324
""" Unit tests for enabling self-generated certificates by default for self-paced courses. """ from certificates import api as certs_api from certificates.models import CertificateGenerationConfiguration from certificates.signals import _listen_for_course_publish from openedx.core.djangoapps.self_paced.models import Se...
agpl-3.0
adelina-t/nova
nova/api/openstack/compute/contrib/hosts.py
48
14023
# Copyright (c) 2011 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
orbnauticus/Pique
pique/rawtty.py
1
5205
#!/usr/bin/python # # Copyright (c) 2010, Ryan Marquardt # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # 1. Redistributions of source code must retain the above copyright notice, # this l...
bsd-3-clause
dmlc/tvm
python/tvm/contrib/rocm.py
3
5347
# 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
Eddy0402/rt-thread
bsp/mb9bf506r/rtconfig.py
41
3310
import os # toolchains options ARCH='arm' CPU='cortex-m3' CROSS_TOOL='iar' if os.getenv('RTT_CC'): CROSS_TOOL = os.getenv('RTT_CC') # cross_tool provides the cross compiler # EXEC_PATH is the compiler execute path, for example, CodeSourcery, Keil MDK, IAR if CROSS_TOOL == 'gcc': PLATFORM = 'gcc' EXEC_PATH = '...
gpl-2.0
poojavade/Genomics_Docker
Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/ipython-2.2.0-py2.7.egg/IPython/parallel/tests/test_mongodb.py
12
1563
"""Tests for mongodb backend Authors: * Min RK """ #------------------------------------------------------------------------------- # Copyright (C) 2011 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distributed as part of this softwar...
apache-2.0
bob3000/thumbor_aws
vows/result_storage_vows.py
3
3453
#se!/usr/bin/python # -*- coding: utf-8 -*- from pyvows import Vows, expect from thumbor.context import Context from tc_aws import Config from fixtures.storage_fixture import IMAGE_BYTES, get_server from boto.s3.connection import S3Connection from moto import mock_s3 from tc_aws.result_storages.s3_storage import St...
mit
auntieNeo/asterisk-testsuite
lib/python/asterisk/channel_test_condition.py
1
8676
#!/usr/bin/env python """Test condition for channels Copyright (C) 2011-2012, Digium, Inc. Matt Jordan <mjordan@digium.com> This program is free software, distributed under the terms of the GNU General Public License Version 2. """ from twisted.internet import defer from test_conditions import TestCondition import l...
gpl-2.0
terbolous/SickRage
lib/hachoir_parser/audio/flac.py
95
5626
""" FLAC (audio) parser Documentation: * http://flac.sourceforge.net/format.html Author: Esteban Loiseau <baal AT tuxfamily.org> Creation date: 2008-04-09 """ from hachoir_parser import Parser from hachoir_core.field import FieldSet, String, Bit, Bits, UInt16, UInt24, RawBytes, Enum, NullBytes from hachoir_core.st...
gpl-3.0
toshywoshy/ansible
lib/ansible/modules/network/fortios/fortios_wireless_controller_ble_profile.py
7
13328
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
gpl-3.0
home-assistant/home-assistant
homeassistant/components/guardian/switch.py
2
7888
"""Switches for the Elexa Guardian integration.""" from __future__ import annotations from aioguardian import Client from aioguardian.errors import GuardianError import voluptuous as vol from homeassistant.components.switch import SwitchEntity from homeassistant.config_entries import ConfigEntry from homeassistant.co...
apache-2.0
nitzmahone/ansible-modules-extras
network/haproxy.py
26
13390
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Ravi Bhure <ravibhure@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 Lice...
gpl-3.0
robmcl4/Coinex
arbitrage.py
1
16316
""" arbitrage.py Check for arbitrage opportunities. USAGE: python arbitrage.py [--all] --all Display all arbitrage opportunities, not just profitable ones """ from models import * from decimal import * import utils import sys # the coinex transaction fee TRANSAC_FEE = 0.002 # the minimum amount of to_currency r...
apache-2.0
KingsCross/Quadrotor
Tools/autotest/dump_logs.py
229
1762
#!/usr/bin/env python # dump flash logs from SITL # Andrew Tridgell, April 2013 import pexpect, os, sys, shutil, atexit import optparse, fnmatch, time, glob, traceback, signal sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), 'pysim')) import util ############## main program ############# ...
gpl-3.0
seaotterman/tensorflow
tensorflow/contrib/linalg/python/ops/linear_operator_addition.py
30
15248
# 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
vicnet/weboob
modules/meslieuxparis/module.py
1
1444
# -*- coding: utf-8 -*- # Copyright(C) 2018 Vincent A # # This file is part of a weboob module. # # This weboob module 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 Licen...
lgpl-3.0
PLyczkowski/Sticky-Keymap
2.74/python/lib/encodings/mac_centeuro.py
257
14102
""" Python Character Mapping Codec mac_centeuro generated from 'MAPPINGS/VENDORS/APPLE/CENTEURO.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,inp...
gpl-2.0
lcostantino/healing-os
healing/openstack/common/log.py
1
26305
# Copyright 2011 OpenStack Foundation. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance w...
apache-2.0
abhattad4/Digi-Menu
digimenu2/django/utils/html.py
36
15061
"""HTML utilities suitable for global use.""" from __future__ import unicode_literals import re import sys import warnings from django.utils import six from django.utils.deprecation import RemovedInDjango20Warning from django.utils.encoding import force_str, force_text from django.utils.functional import allow_lazy ...
bsd-3-clause
OpenAcademy-OpenStack/nova-scheduler
nova/tests/utils.py
1
6545
# Copyright 2011 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 l...
apache-2.0
lilchurro/vent
vent/menu.py
2
5236
#!/usr/bin/env python2.7 # -*- coding: utf-8 -*- import curses import npyscreen import time from threading import Thread from vent.api.actions import Action from vent.api.plugins import Plugin from vent.helpers.meta import Version from vent.helpers.paths import PathDirs from vent.menus.help import HelpForm from vent...
apache-2.0
obsh/tornado
demos/chat/chatdemo.py
98
4426
#!/usr/bin/env python # # Copyright 2009 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...
apache-2.0
battlecat/Spirit
spirit/comment/models.py
2
2911
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models from django.utils.translation import ugettext_lazy as _ from django.core.urlresolvers import reverse from django.conf import settings from django.db.models import F from django.utils import timezone from .managers import Com...
mit
Microvellum/Fluid-Designer
win64-vc/2.78/Python/bin/2.78/scripts/modules/blend_render_info.py
1
2789
#!/usr/bin/env python3 # ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # ...
gpl-3.0
Pexego/odoo
addons/note/tests/test_note.py
427
1686
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2013-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
joe-antognini/matasano
set1.py
1
6125
#! /usr/bin/env python # # Matasano Crypto Pals # Set 1 # import binascii import base64 from freqs import * from Crypto.Cipher import AES def hex2base64(a): '''Convert a string in hex to a string in base64.''' data = binascii.unhexlify(a) return base64.b64encode(data) def fixedXOR(b1, b2): int1 = int(b1.enc...
mit
XiaodunServerGroup/medicalmooc
common/lib/sandbox-packages/eia.py
79
1979
""" Standard resistor codes. http://en.wikipedia.org/wiki/Electronic_color_code """ E6 = [10, 15, 22, 33, 47, 68] E12 = [10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68, 82] E24 = [10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68, 82, 11, 13, 16, 20, 24, 30, 36, 43, 51, 62, 75, 91] E48 = [100, 121, 147, 178, 215, 261, 316, 383...
agpl-3.0
markoshorro/gem5
src/arch/x86/isa/insts/system/control_registers.py
91
3073
# Copyright (c) 2009 The Regents of The University of Michigan # 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 ...
bsd-3-clause
jymannob/CouchPotatoServer
couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/brightcove.py
8
12227
# encoding: utf-8 from __future__ import unicode_literals import re import json import xml.etree.ElementTree from .common import InfoExtractor from ..utils import ( compat_urllib_parse, find_xpath_attr, fix_xml_ampersands, compat_urlparse, compat_str, compat_urllib_request, compat_parse_qs...
gpl-3.0
DANCEcollaborative/forum-xblock
XBlock Integration Files/xdjangobb/xblock/lib/python2.7/site-packages/django/contrib/gis/tests/inspectapp/tests.py
134
5128
from __future__ import absolute_import import os from django.db import connections from django.test import TestCase from django.contrib.gis.gdal import Driver from django.contrib.gis.geometry.test_data import TEST_DATA from django.contrib.gis.utils.ogrinspect import ogrinspect from .models import AllOGRFields clas...
mit
saikrishnar/Forced-Alignment
Post_1/scripts/run_kaldi/utils/reverse_arpa.py
13
5824
# -*- coding: utf-8 -*- # Copyright 2012 Mirko Hannemann BUT, mirko.hannemann@gmail.com import sys import codecs # for UTF-8/unicode if len(sys.argv) != 2: print 'usage: reverse_arpa arpa.in' sys.exit() arpaname = sys.argv[1] #\data\ #ngram 1=4 #ngram 2=2 #ngram 3=2 # #\1-grams: #-5.234679 a -3.3 #-3.456783 ...
gpl-2.0
atodorov/anaconda
pyanaconda/modules/storage/devicetree/devicetree_interface.py
6
1430
# # DBus interface for the device tree module # # Copyright (C) 2019 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This progr...
gpl-2.0
WoLpH/celery
celery/tests/test_task/test_task_builtins.py
1
1421
from __future__ import with_statement import warnings from celery.task import ping, PingTask, backend_cleanup from celery.tests.compat import catch_warnings from celery.tests.utils import unittest def some_func(i): return i * i class test_deprecated(unittest.TestCase): def test_ping(self): warnin...
bsd-3-clause
ThrowDice/watu
friendfeed.py
1
14114
#!/usr/bin/env python # # Copyright 2008 FriendFeed # # 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...
gpl-3.0