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
# -*- coding: utf-8 -*- """ Little script that replaces comment characters to html, found in the *.hbs files. """ import os import glob if __name__ == '__main__': os.chdir(os.path.join(os.environ['HOME'], "Downloads", "Casper-master")) for filename in glob.glob("*.hbs"): pr...
acercadelaeducacion/acercadelaeducacion.github.io
script.py
Python
mit
727
#!/usr/bin/env python from app import app if __name__ == "__main__": app.run(debug=True, host='0.0.0.0')
voltaire/minecraft-site
app/run.py
Python
bsd-3-clause
111
""" #3205: W0704 (except doesn't do anything) false positive if some statements follow a "pass" """ __revision__ = None try: A = 2 except ValueError: pass # pylint: disable-msg=W0107 print A
dbbhattacharya/kitsune
vendor/packages/pylint/test/input/func_noerror_except_pass.py
Python
bsd-3-clause
204
# Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
nparley/mylatitude
lib/endpoints/openapi_generator.py
Python
mit
38,210
from __future__ import absolute_import # Zulip's main markdown implementation. See docs/markdown.md for # detailed documentation on our markdown syntax. from typing import Any, Callable, Dict, Iterable, List, Optional, Tuple, TypeVar, Union from typing.re import Match import markdown import logging import traceback f...
umkay/zulip
zerver/lib/bugdown/__init__.py
Python
apache-2.0
50,753
import numpy as np import pytest from ... import units as u class TestQuantityLinAlgFuncs: """ Test linear algebra functions """ @pytest.mark.xfail def test_outer(self): q1 = np.array([1, 2, 3]) * u.m q2 = np.array([1, 2]) / u.s o = np.outer(q1, q2) assert np.all...
funbaker/astropy
astropy/units/tests/test_quantity_non_ufuncs.py
Python
bsd-3-clause
942
""" Tests for student enrollment. """ from __future__ import absolute_import import unittest import ddt import pytest from django.conf import settings from django.test.utils import override_settings from mock import Mock, patch from course_modes.models import CourseMode from openedx.core.djangoapps.enrollments impor...
ESOedX/edx-platform
openedx/core/djangoapps/enrollments/tests/test_api.py
Python
agpl-3.0
12,851
#!/usr/bin/python # -*- coding: utf-8 -*- """ import: Budżet środków europejskich w układzie tradycyjnym flat structure (each data unit is a separate doc in the collection) parenting is archieved through 'parent' key bulk of files: - this file (budgeutr.py) - data file CSV, produced from XLS (for example, budgeutr.c...
CCLab/Raw-Salad
scripts/db/budget/budgeutr.py
Python
bsd-3-clause
11,394
import os Import("env") STM32_FLASH_SIZE = 256 for define in env['CPPDEFINES']: if define[0] == "VECT_TAB_ADDR": env['CPPDEFINES'].remove(define) if define[0] == "STM32_FLASH_SIZE": STM32_FLASH_SIZE = define[1] # Relocate firmware from 0x08000000 to 0x08007000 env['CPPDEFINES'].append(("VECT_...
aetel/3D-printer
prusa_i3/Firmware/Marlin-2.0.x/buildroot/share/PlatformIO/scripts/STM32F103RC_SKR_MINI.py
Python
gpl-2.0
678
#!/usr/bin/env python from os.path import join import sys def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration from numpy.distutils.system_info import get_info config = Configuration('dsolve',parent_package,top_path) config.add_data_dir('tests') ...
stefanv/scipy3
scipy/sparse/linalg/dsolve/setup.py
Python
bsd-3-clause
2,345
# -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import, unicode_literals """ Wrapper for Vowpal Wabbit executable TODO: -Detect VW version in unit tests; for command line generation scenarios, unit tests should detect whether it works as expected. -Scenario assistance; e.g. cach...
mokelly/wabbit_wappa
wabbit_wappa/__init__.py
Python
mit
16,614
import graphene from graphene_django.filter import DjangoFilterConnectionField from user.schema.UpdateUser import UpdateUser from user.schema.UserNode import UserNode, UserFilter, get_user from user.schema.Login import Login from user.schema.CreateUser import CreateUser class Query(graphene.ObjectType): me = gra...
arcingio/arcing.io
services/cms/user/schema/__init__.py
Python
mit
717
# Generated by Django 1.11.21 on 2019-06-27 09:34 import django.contrib.auth.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("users", "0018_auto_20190404_0320")] operations = [ migrations.AlterField( model_name="user", ...
watchdogpolska/poradnia.siecobywatelska.pl
poradnia/users/migrations/0019_auto_20190627_1134.py
Python
bsd-3-clause
785
import docker import npyscreen import os import shutil import sys import threading import time from docker.errors import DockerException from vent.api.actions import Action from vent.helpers.meta import Containers from vent.helpers.meta import Core from vent.helpers.meta import Cpu from vent.helpers.meta import Gpu f...
cprafullchandra/vent
vent/menus/main.py
Python
apache-2.0
19,231
""" Support for Ikea Tradfri. For more details about this component, please refer to the documentation at https://home-assistant.io/components/ikea_tradfri/ """ import asyncio import json import logging import os import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.helpers...
JshWright/home-assistant
homeassistant/components/tradfri.py
Python
apache-2.0
4,220
from django.shortcuts import get_object_or_404, render_to_response from forms import RegistrationForm from models import Event, Site, Software def register(request, event_slug, site_slug): event = get_object_or_404(Event, slug=event_slug) site = get_object_or_404(Site, event__slug=event_slug slug=site_slug) ...
nnrcschmdt/festival
installfest/views.py
Python
bsd-3-clause
1,268
#!/usr/bin/python # coding: utf-8 import datetime [INFO, WARNING, ERROR, UNKNOW] = range(4) levels = { 'INFO': INFO, 'WARNING': WARNING, 'WARN': WARNING, 'ERROR': ERROR, 'UNKNOW': UNKNOW, INFO: 'info', WARNING: 'warning', ERROR: 'error', UNKNOW: 'unknow', } class LogFormat(objec...
Lanceolata/log2hdfs
monitor/log_format.py
Python
mit
1,163
import os from paste.urlparser import * from paste.fixture import * from pkg_resources import get_distribution def relative_path(name): here = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'urlparser_data') f = os.path.join('urlparser_data', '..', 'urlparser_data', name) ...
dulems/hue
desktop/core/ext-py/Paste-1.7.2/tests/test_urlparser.py
Python
apache-2.0
6,684
import os from clickable.commands.docker.docker_config import DockerConfig from clickable.config.project import ProjectConfig from clickable.config.constants import Constants from .docker_support import DockerSupport class RustSupport(DockerSupport): config = None def __init__(self, config: ProjectConfig): ...
bhdouglass/clickable
clickable/commands/docker/rust_support.py
Python
gpl-3.0
927
""" Base module containing parent classes for the Features. In following versions, base classes for algorithms should also be included here. """ import collections import datetime from enum import Enum import librosa import logging import jams import json import numpy as np import os import six # Local stuff import m...
urinieto/msaf
msaf/base.py
Python
mit
20,197
from random import randrange import urllib2 import json import calendar from datetime import datetime import flickrapi import config def get_random_photo(flickrid, year, month, sort=''): #get the photos first = datetime(year, month, 1) first = calendar.timegm(first.utctimetuple()) last = da...
bsweger/flickr-random
random_photos.py
Python
mit
2,733
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2017-03-31 19:49 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('common', '0051_import_2000_top_journals'), ] opera...
baylee-d/cos.io
common/migrations/0052_auto_20170331_1949.py
Python
apache-2.0
1,118
# This is the interface for adb import subprocess import logging import re from adapter import Adapter import time import sys import os class ADBException(Exception): """ Exception in ADB connection """ pass class ADB(Adapter): """ interface of ADB send adb commands via this, see: ht...
nastya/droidbot
droidbot/adapter/adb.py
Python
mit
13,744
""" """ from __future__ import division from PyDSTool import * gentype = 'dopri' # 'vode' # -------------------------------------- def makeHHneuron(name, par_args, ic_args, gentype='vode'): # extra_terms must not introduce new variables! vfn_str = '(Iapp-ionic(v,m,h,n))/C' mfn_str = 'ma(...
robclewley/compneuro
Ch9_HH.py
Python
bsd-3-clause
3,486
# -*- coding: utf-8 -*- """ Copyright (C) 2015, MuChu Hsu Contributed by Muchu Hsu (muchu1983@gmail.com) This file is part of BSD license <https://opensource.org/licenses/BSD-3-Clause> """ import os import datetime import json import logging import re from findfine_crawler.localdb import LocalDbForJsonImporter #from f...
muchu1983/104_findfine
findfine_crawler/importerForKLOOK.py
Python
bsd-3-clause
2,417
# vim: tabstop=8 shiftwidth=4 softtabstop=4 expandtab smarttab autoindent # Altai API Service # Copyright (C) 2012-2013 Grid Dynamics Consulting Services, Inc # All Rights Reserved # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License ...
altai/altai-api
tests/mocked.py
Python
lgpl-2.1
8,581
import sys import os import time import serial #DTR0 - blue DATA #RTS0 - purple STB RX #DTR1 - (blue on 232 side) then green CLK #CTS0 - black LD #RTS1 - purple STB TX delay=0.001 def getserials(): s0 = serial.Serial("/dev/ttyUSB0") s1 = serial.Serial("/dev/ttyUSB1") return (s0,s1) def test(): per...
johngumb/danphone
wavetx2.py
Python
gpl-3.0
2,677
from django.core.management.base import BaseCommand, CommandError from django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist from django.db.models import Q from django.utils.module_loading import import_by_path from nodeshot.core.layers.models import Layer from optparse import make_option class Com...
chachan/nodeshot
nodeshot/interop/sync/management/commands/sync.py
Python
gpl-3.0
5,008
"""Kazoo State and Event objects""" from collections import namedtuple class KazooState(object): """High level connection state values States inspired by Netflix Curator. .. attribute:: SUSPENDED The connection has been lost but may be recovered. We should operate in a "safe mode" until...
johankaito/fufuka
microblog/venv/lib/python2.7/site-packages/kazoo/protocol/states.py
Python
apache-2.0
6,304
# -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # # This file is a part of the Pootle project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship information. import os # This must be run before importi...
Finntack/pootle
pootle/apps/pootle_app/management/commands/flush_cache.py
Python
gpl-3.0
2,888
import json from globus_sdk._testing import load_response_set def test_exclude(run_line, go_ep1_id, go_ep2_id): """ Submits two --exclude options on a transfer, confirms they show up in --dry-run output """ # put a submission ID and autoactivate response in place load_response_set("cli.get_su...
globus/globus-cli
tests/functional/task/test_task_submit.py
Python
apache-2.0
2,368
import aiohttp import json from .fetcher import Fetcher class WavesAPI(Fetcher): _decimals = { 'STA': 2, } _token_ids = { 'STA': '3SdrmU1GGZRiZz12MrMcfUz4JksTzvcU25cLFXpZy1qz', } _URL = 'https://nodes.wavesnodes.com/' async def get_waves_balance(self, loop, address, symbol...
etherionlab/the_token_fund_asset_parser
models/waves.py
Python
mit
1,630
import traceback from nose.plugins import Plugin from nose.plugins.errorclass import ErrorClass, ErrorClassPlugin class MarkdownSyntaxError(Exception): pass class Markdown(ErrorClassPlugin): """ Add MarkdownSyntaxError and ensure proper formatting. """ mdsyntax = ErrorClass( MarkdownSyntaxError,...
DailyActie/md2sql
projects/Python-Markdown-master/tests/plugins.py
Python
gpl-3.0
3,783
# 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 may ...
Azure/azure-sdk-for-python
sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/operations/_action_groups_operations.py
Python
mit
24,867
# -*- coding: utf-8 -*- # Copyright (c) 2005-2013 # Tomer Filiba (tomerfiliba@gmail.com) # Copyrights of patches are held by their respective submitters # # 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...
layus/INGInious
backend_agent/_rpyc_unix_server.py
Python
agpl-3.0
7,994
from django import template register = template.Library() @register.inclusion_tag('main/templatetags/menu.html') def display_links_for_menu(key): from main.models import Link menus = Link.objects.filter(leftmenu=key, deleted=False).order_by('title') return {'menus': menus}
ArcaniteSolutions/truffe2
truffe2/main/templatetags/main_extras.py
Python
bsd-2-clause
292
# # Copyright 2011 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. # #...
gnu-sandhi/sandhi
modules/gr36/gr-qtgui/python/__init__.py
Python
gpl-3.0
1,026
# Copyright 2013 VMware, 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 a...
samsu/neutron
plugins/vmware/plugins/service.py
Python
apache-2.0
80,699
from .query import QueryBase, RawQuery, QueryGroup
sloria/modular-odm
modularodm/query/__init__.py
Python
apache-2.0
50
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 OSGeo # # 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 ...
kartoza/geonode
geonode/proxy/tests.py
Python
gpl-3.0
3,031
import pytest import util.cli def test_valid_command(): assert util.cli.execute("echo test") == "test\n" def test_utf_command(): rv = util.cli.execute("echo ÖPmŧß") assert util.cli.execute("echo ÖPmŧß") == "ÖPmŧß\n" def test_invalid_command(): with pytest.raises(RuntimeError): util.cli.ex...
tobi-wan-kenobi/bumblebee-status
tests/util/test_cli.py
Python
mit
709
import sys sys.path.insert(1,"../../") import h2o from tests import pyunit_utils import random def all_confusion_matrix_funcs(): metrics = ["min_per_class_accuracy", "absolute_MCC", "precision", "accuracy", "f0point5", "f2", "f1"] train = [True, False] valid = [True, False] print "PARSIN...
pchmieli/h2o-3
h2o-py/tests/testdir_misc/pyunit_all_confusion_matrix_funcs.py
Python
apache-2.0
6,364
# maxdb/sapdb.py # Copyright (C) 2005-2012 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from sqlalchemy.dialects.maxdb.base import MaxDBDialect class MaxDBDialect_sapdb(MaxDB...
landier/imdb-crawler
crawler/libs/sqlalchemy/dialects/maxdb/sapdb.py
Python
gpl-3.0
639
# 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 t...
celebdor/kuryr-libnetwork
kuryr_libnetwork/schemata/request_pool.py
Python
apache-2.0
2,102
#!/usr/bin/python # -*- coding: utf-8 -*- # # Script to download time tables as PDF and extract times into containers that can be used by OSM2GFTS # or similar from common import * import os import sys import io import logging import requests import json import datetime logger = logging.getLogger("GTFS_get_times") l...
Skippern/PDF-scraper-Lorenzutti
creators/aracruz/get_times.py
Python
gpl-3.0
2,169
""" MUSE -- A Multi-algorithm-collaborative Universal Structure-prediction Environment Copyright (C) 2010-2017 by Zhong-Li Liu 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 version 2 of t...
zhongliliu/muse
muse/Similarity/Calc_Angle.py
Python
gpl-2.0
1,889
# -*- coding: utf-8 -*- # # Copyright 2018-2020 Ramil Nugmanov <nougmanoff@protonmail.com> # This file is part of CGRtools. # # CGRtools 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 versi...
stsouko/CGRtools
CGRtools/algorithms/isomorphism.py
Python
lgpl-3.0
9,844
import pytest from sqlalchemy.ext.asyncio import AsyncEngine import virtool.indexes.db from aiohttp.test_utils import make_mocked_coro from virtool.indexes.db import ( attach_files, get_current_id_and_version, get_next_version, get_patched_otus, update_last_indexed_versions, ) from virtool.indexes....
igboyes/virtool
tests/indexes/test_db.py
Python
mit
5,183
try: import maya.cmds as cmds except ImportError: print 'WARNING (%s): failed to load maya.cmds module.' % __file__ from .pure import _not, comp, const, cmap, isEmpty, uncurryPair, snd, mid, preadd, emptyNone, minAndMax from .scene import getTime # PURE nodeFromChannel = lambda channel: channel.split('.')[0...
gfixler/fmaya
fmaya/core/chan.py
Python
gpl-3.0
1,887
# coding: utf-8 import pytz from dateutil.relativedelta import relativedelta from upoutdf import dow from upoutdf.occurences import OccurenceBlock, OccurenceGroup from .base import BaseRecurring from upoutdf.constants import WEEKLY_TYPE class WeeklyType(BaseRecurring): days_of_week = [] required_attributes...
UpOut/UpOutDF
upoutdf/types/recurring/weekly.py
Python
mit
5,114
#!/usr/bin/env python # -*- coding: utf-8 -*- try: import coverage coverage.process_startup() except ImportError: pass import unittest import sys, os, glob test_root = os.path.dirname(os.path.abspath(__file__)) test_files = glob.glob(os.path.join(test_root, 'test_*.py')) os.chdir(test_root) sys.path.ins...
Eddy0402/Environment
vim/ycmd/third_party/bottle/test/testall.py
Python
gpl-3.0
1,119
#!/usr/bin/env python # we're using python 3.x style print but want it to work in python 2.x, from __future__ import print_function import os, sys, subprocess, time from subprocess import CalledProcessError def ExitProgram(message): print("{0}: {1}".format(os.path.basename(sys.argv[0]), ...
chris920820/pocolm
scripts/internal/pocolm_common.py
Python
apache-2.0
2,922
# Copyright (c) 2008, Eric Florenzano # Copyright (c) 2010, 2011 Linaro Limited # 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 cop...
Polyconseil/django-pagination
linaro_django_pagination/settings.py
Python
bsd-3-clause
2,658
import json from pathlib import Path import omf from omf import feeder class Test_treeToNxGraph: def test_newNetworkxAPI_returns_sameGraphAsOldNetworkXAPI(self): ''' Two unequal objects CAN have the same hash value. - networkx.Graph instances define __eq__ and __hash__, but that does not ...
dpinney/omf
omf/static/testFiles/test_feeder/test_feeder.py
Python
gpl-2.0
1,423
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # qstring documentation build configuration file, created by # sphinx-quickstart on Tue Jul 14 15:42:21 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # au...
fastmonkeys/qstring
docs/conf.py
Python
mit
9,308
"""Test pylint.extension.typing - consider-using-alias 'py-version' needs to be set to '3.7' or '3.8' and 'runtime-typing=no'. """ # pylint: disable=missing-docstring,invalid-name,unused-argument,line-too-long,unsubscriptable-object import collections import collections.abc import typing from collections.abc import Aw...
PyCQA/pylint
tests/functional/ext/typing/typing_consider_using_alias_without_future.py
Python
gpl-2.0
2,165
# -*- coding: utf-8 -*- # # nova documentation build configuration file, created by # sphinx-quickstart on Sat May 1 15:17:47 2010. # # This file is execfile()d with the current directory set to # its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All ...
cloudbase/nova
doc/source/conf.py
Python
apache-2.0
9,539
from flask import url_for from flask.ext.testing import TestCase from flask.ext.fillin import FormWrapper from dexter.core import app from dexter.app import db from dexter.models.seeds import seed_db from dexter.models import User, Role class UserSessionTestCase(TestCase): def create_app(self): app.confi...
Code4SA/mma-dexter
tests/functional/__init__.py
Python
apache-2.0
1,230
# -*- coding: utf-8 -*- """ Created on Sun Sep 17 22:06:52 2017 Based on: print_MODFLOW_inputs_res_NWT.m @author: gcng """ # print_MODFLOW_inputs import numpy as np from MODFLOW_scripts import MODFLOW_NWT_lib_Shullcas_test as mf # functions to write individual MODFLOW files import os # os functions #from ConfigPar...
UMN-Hydro/GSFLOW_pre-processor
python_scripts/cp_preLauren_171023_py/print_MODFLOW_inputs_res_NWT_Shullcas_test.py
Python
gpl-3.0
4,342
# Copyright 2020 Google LLC. 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...
tensorflow/tfx
tfx/orchestration/portable/mlmd/context_lib.py
Python
apache-2.0
6,401
# -*- encoding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Belgian Intrastat Declaration', 'version': '1.0', 'category': 'Localization', 'description': """ Generates Intrastat XML report for declaration Based on invoices. """, 'depends': ['re...
vileopratama/vitech
src/addons/l10n_be_intrastat/__openerp__.py
Python
mit
730
#!/usr/bin/python from lofar.qpidinfrastructure.QPIDDB import qpidinfra from lofar.common import dbcredentials def qpidconfig_add_queue(settings): print ("qpid-config -b %s add queue %s --durable" %(settings['hostname'],settings['queuename'])) def qpidconfig_add_topic(settings): print ("qpid-config -b %s add...
jjdmol/LOFAR
SAS/QPIDInfrastructure/bin/configQPIDfromDB.py
Python
gpl-3.0
1,308
# -*- coding: utf-8 -*- # Generated by Django 1.11.10 on 2018-04-24 08:25 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion def populate_status(apps, schema_editor): Status = apps.get_model("emgapi", "Status") st = ( (1, "draft"), ...
EBI-Metagenomics/emgapi
emgapi/migrations/0007_split_run.py
Python
apache-2.0
7,178
# Copyright 2012 James McCauley # # 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 writi...
sumanth232/vlc-streaming-mininet
controllers/2snh_ssim_Controller_QoS.py
Python
mit
9,825
# Copyright 2013 OpenStack Foundation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
takeshineshiro/cinder
cinder/api/v2/volume_metadata.py
Python
apache-2.0
6,003
#! /usr/bin/env python from peyotl.api.taxomachine import Taxomachine, TNRSResponse from peyotl.test.support.pathmap import get_test_ot_service_domains from peyotl.utility import get_logger import unittest import os _LOG = get_logger(__name__) example_response = { u'context': u'All life', u'governing_code': u'...
mtholder/peyotl
tests/ws_tests/read_only/test_taxomachine.py
Python
bsd-2-clause
7,233
import os from pylab import * from numpy import * import matplotlib.patches as patches import matplotlib.transforms as transforms import console_colors as ccl #------------------------------ Nsh = 63#47 #100 # revisar a ojo nbins = 50 # (revisar a ojo) bine por unidad de tiempo normalizado MCwant = '2' # '2', '...
jimsrc/seatos
mixed/src/63events/mixed.py
Python
mit
4,209
from pytest_bdd.steps import when from pytest_bdd import given, then, scenario test_reuse = scenario( 'reuse.feature', 'Given and when using the same fixture should not evaluate it twice', ) @given('I have an empty list') def empty_list(): return [] @given('I have a fixture (appends 1 to a list)') def...
curzona/pytest-bdd
tests/feature/test_reuse.py
Python
mit
638
# -*- coding: utf-8 -*- from __future__ import absolute_import import pytest import re import responses import six from symbolic import SourceMapTokenMatch from mock import patch from requests.exceptions import RequestException from sentry import http from sentry.lang.javascript.processor import ( discover_sour...
gencer/sentry
tests/sentry/lang/javascript/test_processor.py
Python
bsd-3-clause
25,956
# Stolen from: http://bruno.im/2009/dec/07/silently-failing-include-tag-in-django/ # Big thanks for this! from django import template register = template.Library() class IncludeNode(template.Node): def __init__(self, template_name): self.template_name = template_name def render(self, context): try: # Load...
Uruwolf/pyshop
global/templatetags/global_tags.py
Python
gpl-3.0
929
#!/usr/bin/python import gltk from gltkdriver import GlutWindowDriver as WindowDriver from OpenGL.GLU import * from OpenGL.GL import * class MyScreen(gltk.Screen): def __init__(self): gltk.Screen.__init__(self) vbox = gltk.VBox() model = gltk.SpinnerModel(1) for i in range(10...
darxen/Gltk
src/examples/spinners.py
Python
gpl-3.0
1,156
# Copyright (C) 2003-2011 Robey Pointer <robeypointer@gmail.com> # # This file is part of paramiko. # # Paramiko 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...
vprime/puuuu
env/lib/python2.7/site-packages/paramiko/__init__.py
Python
mit
3,658
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
skosukhin/spack
var/spack/repos/builtin/packages/atompaw/package.py
Python
lgpl-2.1
2,376
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright © 2016 Taylor C. Richberger <taywee@gmx.com> # This code is released under the license described in the LICENSE file from __future__ import absolute_import, division, print_function, unicode_literals import argparse import json import sys from makerestapicli...
Taywee/makerestapiclient
makerestapiclient/__main__.py
Python
mit
1,996
import asyncio import os.path from importlib import import_module import yaml from structlog import get_logger from .state import State from .action_descriptor import ActionDescriptor from .schedule import Schedule MAIN_CONFIG_FILE = 'config.yaml' def import_class(class_str): module_name, class_name = class_s...
insolite/alarme
alarme/core/application.py
Python
mit
5,735
# -*- coding: utf-8 -*- """ Testing that functions from compat work as expected """ from pandas.compat import ( range, zip, map, filter, lrange, lzip, lmap, lfilter, builtins ) import unittest import nose import pandas.util.testing as tm class TestBuiltinIterators(tm.TestCase): def check_result(self, ...
bdh1011/wau
venv/lib/python2.7/site-packages/pandas/tests/test_compat.py
Python
mit
2,358
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from __future__ import print_function import os import llnl.util.tty as tty import spack.cmd import spack.cmd.common.ar...
LLNL/spack
lib/spack/spack/cmd/location.py
Python
lgpl-2.1
4,698
from PyQt4 import QtGui, QtCore import os, sys class PrettyWidget(QtGui.QWidget): def __init__(self): super(PrettyWidget, self).__init__() self.initUI() def initUI(self): self.setGeometry(600, 500, 500, 500) self.setWindowTitle('Multiple Browse') ...
sayali144/TP
page1.py
Python
gpl-3.0
1,413
# # Copyright 2014 Quantopian, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
dhruvparamhans/zipline
zipline/finance/controls.py
Python
apache-2.0
7,597
#!/usr/bin/python # -*- coding: utf-8 -*- # # 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. ...
buzzsurfr/f5-ansible
library/bigip_command.py
Python
apache-2.0
7,393
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-TODAY OpenERP S.A. <http://www.openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms o...
tedi3231/openerp
openerp/release.py
Python
agpl-3.0
2,960
import pygame as pg from .sprite import Sprite class Animation(object): def __init__(self, paths=None, imgs=None, sprites=None, spritesheet=None, rect=None, count=None, colorkey=None, loop=False, frame_interval=1, size=None): if paths: self.frames = [Sprit...
LittleSmaug/summercamp2k17
src/game/animation.py
Python
gpl-3.0
1,129
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os import re ...
sameerparekh/pants
tests/python/pants_test/tasks/test_protobuf_integration.py
Python
apache-2.0
6,222
"""Verse structures of Old Norse poetry""" import re from math import floor from cltk.phonology.utils import Transcriber from cltk.phonology.old_norse.transcription import Consonant, Vowel, old_norse_rules, IPA_class, \ DIPHTHONGS_IPA_class, DIPHTHONGS_IPA, measure_old_norse_syllable from cltk.phonology.syllabify...
TylerKirby/cltk
cltk/prosody/old_norse/verse.py
Python
mit
27,512
#!/usr/bin/env python3 # ScatterBackup - A chaotic backup solution # Copyright (C) 2015 Ingo Ruhnke <grumbel@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the...
Grumbel/scatterbackup
tests/test_fileinfo.py
Python
gpl-3.0
1,443
"""Lists vpn users""" from baseCmd import * from baseResponse import * class listVpnUsersCmd (baseCmd): typeInfo = {} def __init__(self): self.isAsync = "false" """list resources by account. Must be used with the domainId parameter.""" self.account = None self.typeInfo['accoun...
MissionCriticalCloud/marvin
marvin/cloudstackAPI/listVpnUsers.py
Python
apache-2.0
2,599
# -*- 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...
googleads/google-ads-python
google/ads/googleads/v10/services/services/asset_service/client.py
Python
apache-2.0
20,805
import datetime import time import os from markdown import markdown import dominate import sass from dominate.tags import * from dominate.util import raw from prettify import html_prettify import ingest def generate_css(): with open("card.scss") as f: uncompiled = f.read() compiled = sass.compile(...
kleutzinger/kleutzinger.github.io
site-generator/generate.py
Python
mit
4,138
#!/usr/bin/env python # -*- coding: utf-8 -*- # MySQL Connector/Python - MySQL driver written in Python. # Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. # MySQL Connector/Python is licensed under the terms of the GPLv2 # <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most...
mrquim/mrquimrepo
script.module.myconnpy/lib/examples/engines.py
Python
gpl-2.0
1,881
#!/usr/bin/python # -- Content-Encoding: UTF-8 -- """ Herald HTTP transport discovery, based on a homemade multicast protocol :author: Thomas Calmant :copyright: Copyright 2014, isandlaTech :license: Apache License 2.0 :version: 0.0.1 :status: Alpha .. Copyright 2014 isandlaTech Licensed under the Apache Li...
isandlaTech/cohorte-3rdparty
herald/src/main/python/herald/transports/http/discovery_multicast.py
Python
apache-2.0
25,400
# -*- 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...
googleads/google-ads-python
google/ads/googleads/v9/services/types/distance_view_service.py
Python
apache-2.0
1,223
# -*- coding: utf-8 -*- ''' XMLDSig: Sign and Verify XML digital cryptographic signatures. xmldsig is a minimal implementation of bytestring cryptographic xml digital signatures @note: Adapted from Andrew D. Yates' implementation of xmldsig for python ''' __all__ = ('sign', 'verify') try: import lxml.etree as...
mohamedattahri/PyXMLi
pyxmli/xmldsig.py
Python
bsd-3-clause
5,648
# # 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 ...
thinker0/aurora
src/main/python/apache/aurora/executor/http_lifecycle.py
Python
apache-2.0
4,038
import copy import time import warnings from collections import deque from contextlib import contextmanager import _thread import pytz from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db import DEFAULT_DB_ALIAS from django.db.backends import utils from django.db.bac...
uranusjr/django
django/db/backends/base/base.py
Python
bsd-3-clause
24,419
from .project import Project
hutcheb/l5x
__init__.py
Python
gpl-3.0
30
# Import smtplib for the actual sending function import smtplib # Import the email modules we'll need from email.MIMEText import MIMEText # Open a plain text file for reading. For this example, assume that # the text file contains only ASCII characters. fp = open(textfile, 'rb') # Create a text/plain message msg = M...
xbmc/atv2
xbmc/lib/libPython/Python/Doc/lib/email-simple.py
Python
gpl-2.0
673
""" Classes and subroutines dealing with network connections and related topics. """ from __future__ import with_statement, print_function from functools import wraps import getpass import os import re import time import socket import sys from six import string_types, StringIO, PY3 from fabric.auth import get_passwo...
pashinin/fabric
fabric/network.py
Python
bsd-2-clause
24,832
#!/usr/bin/python -u # Copyright or Copr. INRIA/Scilab - Sylvestre LEDRU # # Sylvestre LEDRU - <sylvestre.ledru@inria.fr> <sylvestre@ledru.info> # # This software is a computer program whose purpose is to generate C++ wrapper # for Java objects/methods. # # This software is governed by the CeCILL license under French ...
sguazt/dcsxx-testbed
tools/giws/datatypes/stringDataGiws.py
Python
apache-2.0
8,951
# BlenderBIM Add-on - OpenBIM Blender Add-on # Copyright (C) 2020, 2021 Dion Moult <dion@thinkmoult.com> # # This file is part of BlenderBIM Add-on. # # BlenderBIM Add-on 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 Fo...
IfcOpenShell/IfcOpenShell
src/blenderbim/blenderbim/bim/module/model/wall.py
Python
lgpl-3.0
43,863
#!/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...
mapr/hue
apps/beeswax/src/beeswax/hive_site.py
Python
apache-2.0
5,442