code
stringlengths
3
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
3
1.05M
# Copyright 2014 Hewlett-Packard Development Company, L.P. # # 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 applicabl...
Tan0/ironic
ironic/tests/test_raid.py
Python
apache-2.0
10,900
#!/usr/bin/env python # TODO: move this to pyevmasm # EVM disassembler import pyevmasm as ea from binascii import hexlify def printi(instruction): print(f"Instruction: {instruction}") print("\tdescription:", instruction.description) print("\tgroup:", instruction.group) print("\taddress:", instruction...
trailofbits/manticore
examples/evm/asm.py
Python
agpl-3.0
1,771
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
v-iam/azure-sdk-for-python
azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/operation_entity_paged.py
Python
mit
902
# # header # coding: utf-8 # dd: 20200125 from __future__ import print_function, absolute_import, division, unicode_literals # # __init__.py parser import sys import os import datetime import traceback sys.path = [path for path in sys.path if path not in [os.getcwd(), ""]] import platform # NOQA from _ast import *...
rochacbruno/dynaconf
dynaconf/vendor_src/ruamel/yaml/setup.py
Python
mit
35,641
__all__ = ['get_config_vars', 'get_path'] try: # Python 2.7 or >=3.2 from sysconfig import get_config_vars, get_path except ImportError: from distutils.sysconfig import get_config_vars, get_python_lib def get_path(name): if name not in ('platlib', 'purelib'): raise ValueError("Name ...
OpenWinCon/OpenWinNet
web-gui/myvenv/lib/python3.4/site-packages/setuptools/py31compat.py
Python
apache-2.0
1,184
#coding:utf-8 from django.db import transaction from SmartDataApp.models import Housekeeping_items, Repair_item from xlrd import open_workbook from django.http import HttpResponse from django.shortcuts import render, render_to_response from django.views.decorators.csrf import csrf_exempt import simplejson @transactio...
snailhu/myself-Repository
SmartDataApp/controller/import_xlrd.py
Python
apache-2.0
4,736
-- ************************ -- PostgreSQL database dump -- not used in hqmf setup -- NOT PORTED TO SQL SERVER -- #!/usr/bin/python import unicodedata import csv class value_set_string_util: def __init__(self, unicode_convert_attrs): self.unicode_convert_attrs = unicode_convert_attrs def open_csvfile...
pSCANNER/USC-source-code
hqmf2sqlserver/valuesets/value_set_string_util.py
Python
apache-2.0
897
# Copyright (C) 2015 Anders Logg # # This file is part of mshr. # # mshr 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. # # mshr is di...
FEniCS/mshr
demo/python/deathstar.py
Python
gpl-3.0
1,161
"""Blocking and non-blocking HTTP client interfaces. This module defines a common interface shared by two implementations, ``simple_httpclient`` and ``curl_httpclient``. Applications may either instantiate their chosen implementation class directly or use the `AsyncHTTPClient` class from this module, which selects an...
hiphopsmurf/bitcoin-secured
online/build/tornado/tornado/httpclient.py
Python
mit
19,750
import numpy as np from numpy.fft import rfft from scipy.ndimage.filters import convolve from scipy.ndimage.morphology import grey_dilation # Spectrogram parameter defaults # FREQ is the number of samples/sec in the audio file # FRAME_WIDTH is the number of samples to include in each window frame of # the DTFT. FRAM...
cgearhart/Resound
resound/resound.py
Python
cc0-1.0
5,079
import sound import threading, time class SoundLvl( threading.Thread ): def init( self, stateClient ): self.driver = sound.MicDriver() self.stateClient = stateClient self.isSilent = False self.is_running = False def run( self ): self.is_running = True ...
socialdevices/manager
stateplugin/src/legacy/soundLvl.py
Python
bsd-3-clause
765
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import time from mcrouter.test.MCProcess import Memcached from mcrouter.test.McrouterTestCase import McrouterTestCa...
facebook/mcrouter
mcrouter/test/test_mcrouter.py
Python
mit
4,041
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import os import platform import shutil import sys sys.path.append('bin') from autojump_argparse import ArgumentParser SUPPORTED_SHELLS = ('bash', 'zsh', 'fish') def cp(src, dest, dryrun=False): print("copying file: %s -> %s" ...
mdlawson/autojump
install.py
Python
gpl-3.0
5,781
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-05-05 02:08 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('forum', '0003_remove_forum_is_active'), ] operations = [ migrations.AddField(...
reinbach/django-machina
machina/apps/forum/migrations/0004_auto_20170504_2108.py
Python
bsd-3-clause
772
#!/usr/bin/env python3 # # Copyright (c) 2019 Intel Corporation # # SPDX-License-Identifier: Apache-2.0 import logging from ctypes import Structure, c_uint64, c_uint32, c_uint16, \ c_uint8, addressof, sizeof import lib.platforms as plat_def # Global Message - Generic IPC_GLB_TYPE_OFFSET = 28 I...
Vudentz/zephyr
boards/xtensa/intel_adsp_cavs15/tools/lib/ipc.py
Python
apache-2.0
7,445
# Copyright 2014 Red Hat, 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 agre...
openstack/oslo.service
oslo_service/tests/test_systemd.py
Python
apache-2.0
2,580
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2017-02-17 10:06 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('basicviz', '0049_auto_20170216_2228'), ...
sdrogers/ms2ldaviz
ms2ldaviz/decomposition/migrations/0001_initial.py
Python
mit
4,500
### # Copyright (c) 2015, butterscotchstallion # All rights reserved. # # ### import supybot.conf as conf import supybot.registry as registry try: from supybot.i18n import PluginInternationalization _ = PluginInternationalization('IMDB') except: # Placeholder that allows to run the plugin on a bot # wi...
butterscotchstallion/limnoria-plugins
IMDB/config.py
Python
mit
1,389
q = int(raw_input()) for qq in xrange(q): n = int(raw_input()) matrix = [] for i in xrange(2 * n): matrix += [map(int, raw_input().split(' '))] m1 = [] m2 = [] m3 = [] m4 = [] for i in xrange(n): m1 += [matrix[i][:n]] m2 += [matrix[i][n:][::-1]] for i in xrang...
shree-shubham/Unitype
Flipping the Matrix.py
Python
gpl-3.0
698
# coding: utf-8 from daemon import settings, create_app from daemon.database import db from daemon.tests.base_test import TestCase import os.path import simplejson as json class MetricsTestCase(TestCase): def create_app(self): settings.settings["SQLALCHEMY_DATABASE_URI"] = "sqlite://" settings.se...
pbanaszkiewicz/collectd-webdaemon
daemon/tests/test_metrics.py
Python
mit
7,238
"""Garbage collection thread for representing zmq refcount of Python objects used in zero-copy sends. """ #----------------------------------------------------------------------------- # Copyright (c) 2013 Brian E. Granger & Min Ragan-Kelley # # This file is part of pyzmq # # Distributed under the terms of the New ...
ellisonbg/pyzmq
zmq/utils/garbage.py
Python
lgpl-3.0
5,396
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
kaarolch/ansible
lib/ansible/modules/network/nxos/nxos_vtp_password.py
Python
gpl-3.0
14,860
#Assignment to a module field can only at the constructor from polyphony import module @module class module_field01: def __init__(self): self.append_worker(self.func) def func(self): self.x = 10 m = module_field01()
ktok07b6/polyphony
tests/error/module_field01.py
Python
mit
245
from __future__ import absolute_import import os from celery import Celery os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'settings') from django.conf import settings # noqa app = Celery('proj') app.config_from_object('django.conf:settings') app.autodiscover_tasks(lambda: settings.INSTALLED_APPS, force=True) ...
xeor/hohu
api/data/src/lib/celery_instance.py
Python
mit
412
import sys import os import unittest import time from mock import Mock, patch sys.path.append(os.path.abspath(".")) sys.path.append(os.path.abspath("rpirobot")) from rpirobot.robot import Robot class TestRobot(unittest.TestCase): """Tests for Robot class.""" def setUp(self): self.robot = Robot() ...
climbus/RPiRobot
tests/test_robot.py
Python
mit
10,802
#!/usr/bin/env python3 """Tests for package-level objects in python-gsl.""" # Copyright © 2016 Timothy Pederick. # # Based on the GNU Scientific Library (GSL): # Copyright © 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 The GSL Team. #...
perey/python-gsl
tests/test_gsl.py
Python
gpl-3.0
1,597
# Generated by Django 2.0.3 on 2018-04-29 18:27 import django.contrib.postgres.fields.jsonb from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('thefederation', '0013_alter_indexes_on_stat'), ] operations = [ migrations.AlterField( ...
jaywink/diaspora-hub
thefederation/migrations/0014_fix_some_node_fields_to_be_blank_true.py
Python
agpl-3.0
1,087
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_login import LoginManager from flask_mail import Mail from flask_bootstrap import Bootstrap import os import logging from logging.handlers import RotatingFileHandler from celery import Celery from celery.schedules import crontab app = Flask(__...
cash/happybot
happybot/__init__.py
Python
bsd-3-clause
1,274
import logging, re from autotest.client import utils from autotest.client.shared import error from virttest import remote, utils_misc, utils_net from virttest.aexpect import ShellCmdError @error.context_aware def run_virtual_nic_private(test, params, env): """ Test Step: 1. boot up three virtual machin...
sathnaga/virt-test
qemu/tests/virtual_nic_private.py
Python
gpl-2.0
4,376
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2008, 2009, 2010, 2011 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your...
jmacmahon/invenio
modules/bibformat/lib/elements/bfe_photos.py
Python
gpl-2.0
5,814
# coding:utf-8 import json import logging import requests from urllib.parse import urlparse, urljoin from requests.auth import HTTPBasicAuth LOG = logging.getLogger(__name__) class St2PluginAuth(object): """ Helper to manage API key or user token authentication with the stackstorm API """ def __init...
fmnisme/err-stackstorm
lib/st2pluginauth.py
Python
apache-2.0
3,354
# Amara, universalsubtitles.org # # Copyright (C) 2013 Participatory Culture 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 op...
norayr/unisubs
apps/messages/rpc.py
Python
agpl-3.0
2,348
from django.contrib import admin from .models import Person, TelephoneNumber # Register your models here. class TelephoneNumberInline(admin.TabularInline): model = TelephoneNumber extra = 3 class PersonAdmin(admin.ModelAdmin): fieldsets = [ (None, {'fields': ['firstname', 'lastname', 'email']...
tomjemmett/DjangoContactList
admin.py
Python
mit
574
from setuptools import setup setup(name="texopic", version="0.1", description="A texopic document processor for Python.", url="https://cheery.github.io/texopic/", author="Henri Tuhola", author_email="henri.tuhola@gmail.com", license="MIT", packages=['texopic'], zip_safe=False)
cheery/texopic
setup.py
Python
mit
311
# -*- coding: utf-8 -*- from django.db import models from mptt.models import MPTTModel, TreeForeignKey class Area(MPTTModel): """ Uma área, usado para categorização de dados. """ nome = models.CharField("Nome", max_length=250, blank=False, null=False) parent = TreeForeignKey('self',related_name="...
Uniriotec/esporte-tec
esporte_tec/areas/models.py
Python
mit
908
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings") os.environ.setdefault("DJANGO_CONFIGURATION", "Production") from configurations.management import execute_from_command_line execute_from_command_line(sys.argv)
oscarmcm/AlzoMiVoz
alzomivoz/manage.py
Python
mit
316
"""Support for Xiaomi Gateways.""" from datetime import timedelta import logging import voluptuous as vol from xiaomi_gateway import XiaomiGateway, XiaomiGatewayDiscovery from homeassistant.components import persistent_notification from homeassistant.config_entries import ConfigEntry from homeassistant.const import (...
rohitranjan1991/home-assistant
homeassistant/components/xiaomi_aqara/__init__.py
Python
mit
13,019
# Copyright 2018 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...
dongjoon-hyun/tensorflow
tensorflow/contrib/tensorrt/test/reshape_transpose_test.py
Python
apache-2.0
6,469
from django import template from django.contrib.humanize.templatetags.humanize import naturalday, naturaltime from datetime import datetime from pytz import utc register = template.Library() @register.filter(name="custom_natural_date") def custom_natural_date(value): delta = datetime.now(utc) - value if del...
johnstcn/whatsnew
whatsnew/templatetags/app_filters.py
Python
mit
506
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. """Store the results. Use a db, but we could do better""" import shelve import string class results: def __init__...
wilebeast/FireFox-OS
B2G/gecko/tools/httptester/results.py
Python
apache-2.0
1,504
webhook_service = paymill_context.get_webhook_service() webhook_service.remove(email_webhook)
paymill/paymill-python
samples/webhooks/remove_webhook.py
Python
mit
94
#!/usr/bin/python # -*- coding: utf8 -*- """!say <문장>; 이걸 따라합니다.""" import re def on_message(msg, server): text = msg.get("text", "") match = re.findall(r"!(?:say) (.*)", text) if not match: return return match[0]
storyhe/playWithBot
plugins/tellme.py
Python
mit
253
from datetime import datetime import os import shutil import hashlib import subprocess import re from django.conf import settings def _apt(path, cmd, *args): conf = os.path.join(path, 'apt.conf') param = [cmd, '-c', conf] param += args print param sp = subprocess.Popen(param, cwd=path, ...
fajran/gerobak
src/gerobak/apt.py
Python
agpl-3.0
1,932
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2019 Manas.Tech # License granted by Canonical Limited # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # ...
ubuntu-core/snapcraft
snapcraft/plugins/v1/crystal.py
Python
gpl-3.0
4,665
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # 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...
googleapis/python-aiplatform
samples/generated_samples/aiplatform_generated_aiplatform_v1beta1_specialist_pool_service_delete_specialist_pool_async.py
Python
apache-2.0
1,679
import subprocess from .exiv2_parser import Exiv2Parser class MockPopen(object): """Mock Popen method""" def __init__(self, cmd, *, stdout): pass def communicate(self): """Mock communicate method of Popen""" return b'bash: command not found: exiv2', b'' class MockPopenSuccess(M...
UHBiocomputation/pelican-plugins
jpeg_reader/test_exiv2_parser.py
Python
agpl-3.0
976
"""Do the prerelease, actual release and post release in one fell swoop! """ import logging import os from zest.releaser import prerelease from zest.releaser import release from zest.releaser import postrelease from zest.releaser import utils logger = logging.getLogger(__name__) def main(): utils.parse_options...
mgedmin/zest.releaser
zest/releaser/fullrelease.py
Python
gpl-2.0
873
from include import IncludeManager from django.apps import apps from django.db import models from django.utils import timezone from osf.models.base import BaseModel, ObjectIDMixin from osf.utils.datetime_aware_jsonfield import DateTimeAwareJSONField from osf.utils.fields import NonNaiveDateTimeField from website.util ...
binoculars/osf.io
osf/models/nodelog.py
Python
apache-2.0
7,092
import unittest import doctest import os import astrolyze.functions.astro_functions class Test(unittest.TestCase): """Unit tests for astro_functions.""" def test_doctests(self): """Run astro_functions doctests""" doctest.testmod(astrolyze.functions.astro_functions) os.system('/usr/bin...
buchbend/astrolyze
test/test_astro_functions.py
Python
bsd-3-clause
526
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'form.ui' # # Created: Wed Jun 17 19:36:04 2009 # by: PyQt4 UI code generator 4.4.3 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui class Ui_Form(object): def setupUi(self, Form): Fo...
atereshkin/Mailbox-Log-Archiver-for-Skype
src/form.py
Python
gpl-2.0
4,618
#!/usr/bin/env python # # Participants Editor - DEI-FCTUC IHC 2011 # # Developers: # - Renato Rodrigues # - Rui Molar # from models import * from xml.dom.minidom import Document from google.appengine.ext import webapp def createProvidersXml(self): #Get Providers from DB providers = Provider.all().order('provider...
Simpsonpt/Participants-Editor
providersxml.py
Python
gpl-3.0
3,826
import json import os import requests from django.contrib import messages from django.contrib.auth.decorators import login_required from django.core import mail from django.core.mail import send_mail from django.shortcuts import render, redirect from .forms import * from .models import * # Create your views here. ...
TheWebMonks/equipo
app/applications/views.py
Python
apache-2.0
3,245
import pytest from selenium import webdriver from selenium.webdriver.support.wait import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By @pytest.fixture def driver(request): wd = webdriver.Chrome() wd.implicitly_wait(10) request.ad...
limemadness/selenium_training
test_sticker_is_present.py
Python
apache-2.0
803
from . import Alignment from . import Sequence __all__ = ['Alignment', 'Sequence']
FloBay/PyOmics
PyOmics/__init__.py
Python
bsd-3-clause
84
#!/usr/bin/python import RPi.GPIO as GPIO import time pin = 17 first = 1 gap = 1 second = 1 def play(nra): # D Letter firstCount = 5 secondCount = nra pin = 17 first = 1 gap = 1 second = 1 firstSleepTimeOn = 0.02 firstSleepTimeOff = 0.04 secondSleepTimeOn = 0.02 secondSleepTimeOff = 0.04 gapSleepT...
larssima/AmiJukeBoxRemote
AmiJukeBoxRemote/gui/RaspberryPi/playjbd.py
Python
mit
869
""" This module contains various side affect tests that can be registered with a :class:`TestSuite`. """ import functools class SideAffectTest(): """ A base class for other side affect tests. """ name = "" def __init__(self, logger): self._logger = logger @property def ne...
bluepeppers/dectest
dectest/sideaffects.py
Python
lgpl-3.0
6,458
#!/usr/bin/env python # -*- coding: utf-8 -*- # Escrito por Daniel Fuentes B. # Licencia: X11/MIT license http://www.opensource.org/licenses/mit-license.php # https://www.pythonmania.net/es/2010/04/07/tutorial-pygame-3-un-videojuego/ # --------------------------- # Importacion de los módulos # -----------------------...
dbfuentes/tutorial-pygame
tutorial_pygame_3/ejemplo6.py
Python
mit
4,595
# -*- 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 'Category' db.create_table(u'bestof_category', ( (u'id', self.gf('django.db.model...
vjousse/viserlalune
bestof/migrations/0001_initial.py
Python
mit
2,911
DB_USER = 'postgres' DB_PASSWORD = None DB_PORT = 15533 DB_HOST = '127.0.0.1'
mruwnik/leaflets
leaflets/etc/test.py
Python
gpl-3.0
78
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.core.files.storage import default_storage from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage from django.db.models.fields.files import FieldFile from django.views.generic import FormView from django.views.generic.base imp...
pmeier82/spike_gnode
demo/views.py
Python
bsd-3-clause
2,759
# # vmail/daemon/health.py # # Copyright (C) 2011-2012 @UK Plc, http://www.uk-plc.net # # Author: # 2011-2012 Damien Churchill <damoxc@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
damoxc/vmail
vmail/daemon/health.py
Python
gpl-3.0
4,145
#!/usr/bin/env python3 # Copyright (c) 2014-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test running bitcoind with -reindex and -reindex-chainstate options. - Start a single node and generat...
chaincoin/chaincoin
test/functional/feature_reindex.py
Python
mit
1,450
#------------------------------------------------------------------------------- # Copyright 2017 Cognizant Technology Solutions # # 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:...
CognizantOneDevOps/Insights
PlatformAgents/com/cognizant/devops/platformagents/agents/ci/jenkins/JenkinsAgent3_views.py
Python
apache-2.0
10,185
from flask_security import Security from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy() security = Security()
sumalla/flask-todomvc
flask_todomvc/extensions.py
Python
mit
117
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*- # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 # # MDAnalysis --- http://www.mdanalysis.org # Copyright (c) 2006-2016 The MDAnalysis Development Team and contributors # (see the file AUTHORS for the full list of names) # # Released under t...
kain88-de/mdanalysis
package/MDAnalysis/topology/PDBQTParser.py
Python
gpl-2.0
5,227
from sprox.fillerbase import FillerBase, TableFiller, EditFormFiller, AddFormFiller, FormFiller, ConfigBaseError from sprox.test.base import setup_database, sorted_user_columns, SproxTest, User, Example from nose.tools import raises, eq_ session = None engine = None connection = None trans = None def setup(): glo...
gjhiggins/sprox
tests/test_fillerbase.py
Python
mit
3,808
"""The tests for the Cast Media player platform.""" # pylint: disable=too-many-public-methods,protected-access import unittest from unittest.mock import patch from blumate.components.media_player import cast class TestCastMediaPlayer(unittest.TestCase): """Test the media_player module.""" @patch('blumate.co...
bdfoster/blumate
tests/components/media_player/test_cast.py
Python
mit
830
#!/usr/bin/env python # -*- coding: utf-8 -*- # -*- coding: utf-850 -*- #Titulo :Analizador.py #Descripción :Programa analizador de datos y calculo de FFT. #Autor :Javier Campos Rojas #Fecha :Junio-2017 #Versión :1.0 #Notas : #===============================================...
seslab/MIPVC
MIPVC/Analizador.py
Python
gpl-3.0
3,450
#!/bin/env python import tornado.httpserver import tornado.ioloop import tornado.options import tornado.web from concurrent.futures import ThreadPoolExecutor from functools import partial, wraps import time from tornado.options import define, options define("port", default=8000, help="run on the given port", type=in...
dongweiming/speakerdeck
tornado/6_done_callback_sleep.py
Python
apache-2.0
1,427
#!/usr/bin/env python # encoding: utf-8 # PYTHON_ARGCOMPLETE_OK # from __future__ imports must occur at the beginning of the file from __future__ import unicode_literals from __future__ import print_function from __future__ import division import sys from . import gvar from .util import (iswindows, fixenc, bannerwar...
houtianze/bypy
bypy/chkreq.py
Python
mit
2,258
__author__ = 'asdffdsa' import importlib from .databases import base __DATABASES_AVAILABLE__ = {} #the database to use database = base.DummyBase('DummyBase') #from which path to load the account autoconfig xml files LOCAL_AUTOCONFIG_PATH = '' def __load_databases__(): global __DATABASES_AVAILABLE__ for db i...
git-asdffdsa/pymailib
pymailib/settings.py
Python
gpl-3.0
885
""" Support for AlarmDecoder devices. For more details about this component, please refer to the documentation at https://home-assistant.io/components/alarmdecoder/ """ import asyncio import logging import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.core import callback ...
alexmogavero/home-assistant
homeassistant/components/alarmdecoder.py
Python
apache-2.0
5,331
#!/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 fnmatch import optparse import os import shutil import re import sys import textwrap from util import build_utils from util i...
ltilve/chromium
build/android/gyp/javac.py
Python
bsd-3-clause
8,975
# Copyright (C) 2016 Scott Rome. 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 ...
srome/jacksearch
main.py
Python
apache-2.0
3,878
# coding: utf-8 # Copyright 2017 video++ Project, SJTU MediaLab # # 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...
ArthurChiao/videoplusplus
vpp/minion/transcode.py
Python
apache-2.0
4,027
#!/usr/bin/env python # -*- coding: utf-8 -*- import os, re, time from json import dump as write_json from twisted.internet.defer import inlineCallbacks, returnValue from datetime import datetime, timedelta from gazouilleur import config from gazouilleur.lib.mongo import SingleMongo, find_stats, count_followers, find_...
RouxRC/gazouilleur
gazouilleur/lib/stats.py
Python
agpl-3.0
10,978
import unittest class NestedSampleTest(unittest.TestCase): def setUp(self): return def tearDown(self): return def test_non_unique_name(self): pass if __name__ == '__main__': unittest.main()
roscoeZA/GeoGigSync
pydev/tests_runfiles/samples/nested_dir/simple4_test.py
Python
cc0-1.0
256
#!/opt/rocks/python/python # #$ -cwd #$ -j y #$ -S /opt/rocks/bin/python #$ -m be # #$ -pe mpi 2 # import sys,os from os import path from os import environ from PyFoam.Infrastructure.ClusterJob import SolverJob from PyFoam.FoamInformation import injectVariables injectVariables("/home/bgschaid/OpenFOAM/OpenFOAM-2.1.x/e...
wyldckat/swak4foam
Examples/other/OSCFD_cleaningTank3D/runEmptyAndClean.py
Python
gpl-2.0
1,353
### Author: Dag Wieers <dag$wieers,com> class dstat_plugin(dstat): """ Example "Hello world!" output plugin for aspiring Dstat developers. """ def __init__(self): self.name = 'plugin title' self.nick = ('counter',) self.vars = ('text',) self.type = 's' self.widt...
barzan/dbseer
rs-sysmon2/plugins/dstat_helloworld.py
Python
apache-2.0
436
#!/usr/bin/env python # # Patchwork - automated patch tracking system # Copyright (C) 2008 Jeremy Kerr <jk@ozlabs.org> # # This file is part of the Patchwork package. # # Patchwork 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...
computersforpeace/patchwork
patchwork/parser.py
Python
gpl-2.0
7,472
# -*- coding: UTF-8 -*- """behave is behaviour-driven development, Python style Behavior-driven development (or BDD) is an agile software development technique that encourages collaboration between developers, QA and non-technical or business participants in a software project. *behave* uses tests written in a natura...
jenisys/behave
behave/__init__.py
Python
bsd-2-clause
1,076
#!/usr/bin/env python # encoding: utf-8 ################################################################################ # # RPMDrate - Bimolecular reaction rates via ring polymer molecular dynamics # # Copyright (c) 2013 by Yury V. Suleimanov (ysuleyma@mit.edu, ysuleyma@princeton.edu) # Jo...
YurySuleymanov/RPMDrate_v2.0
rpmdrate/constants.py
Python
mit
4,447
# Copyright 2018 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
googleapis/python-ndb
tests/system/test_query.py
Python
apache-2.0
59,375
#------------------------------------------------------------------------------ # Copyright (C) 2009 Richard Lincoln # # 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; version 2 dated June...
rwl/openpowersystem
cpsm/meas/__init__.py
Python
agpl-3.0
1,130
import json from http import HTTPStatus from django.core import serializers from django.core.exceptions import ImproperlyConfigured from django.core.serializers.json import DjangoJSONEncoder from django.http import HttpResponse, HttpResponseBadRequest, JsonResponse, HttpResponseNotFound from django.utils.decorators i...
efforia/eos-dashboard
restframework/rest/mixins.py
Python
lgpl-3.0
5,713
# vim:fileencoding=utf-8:noet from __future__ import (unicode_literals, division, absolute_import, print_function) import os from powerline.lib.unicode import out_u from powerline.theme import requires_segment_info from powerline.segments import Segment, with_docstring @requires_segment_info def environment(pl, seg...
seanfisk/powerline
powerline/segments/common/env.py
Python
mit
4,971
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import logg...
sivakuna-aap/superdesk-core
superdesk/vocabularies/vocabularies.py
Python
agpl-3.0
3,567
############################################################################ # # Copyright (C) 2016 The Qt Company Ltd. # Contact: https://www.qt.io/licensing/ # # This file is part of Qt Creator. # # Commercial License Usage # Licensees holding valid commercial Qt licenses may use this file in # accordance with the co...
Philips14171/qt-creator-opensource-src-4.2.1
tests/system/suite_general/tst_opencreator_qbs/test.py
Python
gpl-3.0
2,422
# Made by disKret import sys from com.l2scoria.gameserver.model.quest import State from com.l2scoria.gameserver.model.quest import QuestState from com.l2scoria.gameserver.model.quest.jython import QuestJython as JQuest qn = "621_EggDelivery" #NPC JEREMY = 31521 PULIN = 31543 NAFF = 31544 CROCUS = 31545 KUBER = 31546 ...
zenn1989/scoria-interlude
L2Jscoria-Game/data/scripts/quests/621_EggDelivery/__init__.py
Python
gpl-3.0
4,476
# ---------------------------------------------------------------------------- # Copyright 2014 Nervana Systems Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.o...
ruguevara/neon
neon/experiments/fit_predict_err.py
Python
apache-2.0
6,996
#!/usr/bin/env python # # Copyright 2012 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # from __future__ import print_function from __future__ import unicode_literals from gnuradio.filter import filter_design import sys try: from PyQt4 import Qt, ...
jdemel/gnuradio
gr-filter/examples/gr_filtdes_callback.py
Python
gpl-3.0
1,089
from starcluster.clustersetup import ClusterSetup from starcluster.logger import log class PysamInstaller(ClusterSetup): def run(self, nodes, master, user, user_shell, volumes): for node in nodes: log.info("Installing PySam 0.8.4 on %s" % (node.alias)) node.ssh.execute('mkdir -p /opt/software/pysam') ...
meissnert/StarCluster-Plugins
Pysam_0_8_4.py
Python
mit
905
import time from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC import csv def prepare(driver): driver.get("http://www.misim.gov.il/mm_lelorasham/firstPage.aspx") elem...
omerbartal/open-budget-data
processors/scrape_special_entities.py
Python
mit
3,972
# Copyright (C) 2008 CSC - Scientific Computing Ltd. """This module defines an ASE interface to VASP. Developed on the basis of modules by Jussi Enkovaara and John Kitchin. The path of the directory containing the pseudopotential directories (potpaw,potpaw_GGA, potpaw_PBE, ...) should be set by the environmental flag...
askhl/ase
ase/calculators/vasp.py
Python
gpl-2.0
75,118
import sys from traceback import extract_tb, format_exc from sanic.exceptions import ( INTERNAL_SERVER_ERROR_HTML, TRACEBACK_BORDER, TRACEBACK_LINE_HTML, TRACEBACK_STYLE, TRACEBACK_WRAPPER_HTML, TRACEBACK_WRAPPER_INNER_HTML, ContentRangeError, HeaderNotFound, InvalidRangeType, ...
lixxu/sanic
sanic/handlers.py
Python
mit
8,766
import h5py from matplotlib.axes import Axes import numpy as np from os.path import abspath, dirname, join as pjoin from karabo_data.geometry2 import DSSC_1MGeometry tests_dir = dirname(abspath(__file__)) sample_xfel_geom = pjoin(tests_dir, 'dssc_geo_june19.h5') # Made up numbers! QUAD_POS = [ (-130, 5), (-1...
European-XFEL/h5tools-py
karabo_data/tests/test_dssc_geometry.py
Python
bsd-3-clause
2,061
import json import falcon __author__ = 'weldpua2008@gmail.com' # pylint: disable=unused-argument class WrongURL(object): def process_response(self, req, resp, resource=''): """Intercept main 404 response by Falcon If the API hits a non existing endpoint, it will trigger a customized 404 r...
theadviceio/executer
framework/falcon/middleware/handle_404.py
Python
apache-2.0
747
# -*- coding: utf-8 -*- # Copyright (C) 2007, 2008, 2009, 2010 Stewart Adam # This file is part of fwbackups. # fwbackups 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, ...
stewartadam/fwbackups
src/fwbackups/i18n.py
Python
gpl-2.0
3,493
from django import forms import json class JSONListToNewlineWidget(forms.Textarea): def render(self, name, value, attrs=None): if not isinstance(value, basestring): display_string = '' if value is not None and len(value) > 0: for v in value: ...
certtools/contactdb
old2/contactdb/forms/widgets.py
Python
agpl-3.0
735
import unittest from django.conf import settings from django.test import TestCase from common.utils import convert_iso8601_duration_to_seconds, split_lists from .models import Video, Channel from .utils import YoutubeAPIQuery test_channel_id = 'UCFKDEp9si4RmHFWJW1vYsMA' test_username_id = 'ethoslab' test_playlist_id...
stevehead/youtubefeed
youtube/tests.py
Python
mit
6,227