src stringlengths 721 1.04M |
|---|
# coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.8.2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
... |
# This file was created automatically by SWIG.
import controlsc
from misc import *
from windows import *
from containers import *
import fox
class FX_LabelPtr(FX_FramePtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def onPaint(self, *_args, **_kwargs):
val = apply(con... |
# Generates 3D visualizations of input files.
import os
from binwalk.core.compat import *
from binwalk.core.common import BlockFile
from binwalk.core.module import Module, Option, Kwarg
class Plotter(Module):
'''
Base class for visualizing binaries in Qt.
Other plotter classes are derived from this.
'... |
# -*- coding: utf-8 -*-
#
# tippet documentation build configuration file, created by
# sphinx-quickstart on Sun Mar 23 09:56:57 2014.
#
# 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.
#
# Al... |
from __future__ import unicode_literals
import os
import sys
import logging
from six.moves.urllib.parse import urlparse, parse_qsl
from .green import socks
__all__ = ['parse_proxy_uri', 'printable_uri', 'debug']
def parse_proxy_uri(uri):
uri = urlparse(uri)
proxy_options = dict(parse_qsl(uri.query))
... |
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import datetime
import dateutil
import logging
import time
from collections import defaultdict
from odoo import api, fields, models, SUPERUSER_ID, tools, _
from odoo.exceptions import AccessError, UserError, ValidationE... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2016 Felipe Gallego. All rights reserved.
#
# This file is part of ycas: https://github.com/felgari/cpmb
#
# This 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 Softw... |
# -*- coding: utf-8 -*-
# Copyright (c) 2010-2016, MIT Probabilistic Computing Project
#
# 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/LICENS... |
# -*- coding: utf-8 -*-
# emma
#
# Copyright (C) 2006 Florian Schmidt (flo@fastflo.de)
# 2014 Nickolay Karnaukhov (mr.electronick@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 F... |
# ---------------------------------------------------------------------------------------#
# ----------------------------------------------------------------------------- HEADER --#
"""
:author:
Jared Webber
:synopsis:
:description:
:applications:
:see_also:
:license:
... |
import platform
import shlex
from coalib.bearlib.abstractions.Linter import linter
from coalib.bearlib.spacing.SpacingHelper import SpacingHelper
from coalib.bears.requirements.DistributionRequirement import (
DistributionRequirement)
@linter(executable="indent" if platform.system() != "Darwin" else "gindent",
... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Licensed under the MIT license
# http://opensource.org/licenses/mit-license.php
#
# Copyright 2009, Benjamin Kampmann <ben.kampmann@gmail.com>
# Copyright 2014, Hartmut Goebel <h.goebel@crazy-compilers.com>
from twisted.internet import reactor
from coherence.base impo... |
# -*- encoding: utf-8 -*-
""":mod:`typeconverter`
~~~~~~~~~~~~~~~~~~~~~~~~
Converts object into specified type.
"""
from __future__ import unicode_literals
from functools import wraps
__version__ = '0.1.0'
__license__ = 'MIT License'
__author__ = 'Geonu Choi'
__email__ = '6566gun@gmail.com'
class Handler(object):... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# __coconut_hash__ = 0xe7f49d48
# Compiled with Coconut version 1.2.3-post_dev1 [Colonel]
# Coconut Header: --------------------------------------------------------
from __future__ import print_function, absolute_import, unicode_literals, division
import sys as _coconut... |
# This code is licensed under the MIT License (see LICENSE file for details)
from PyQt5 import Qt
import pkg_resources
from . import device_widget
from . import status_widget
from ..simple_rpc import rpc_client
from .. import util
class MicroscopeWidget(device_widget.DeviceWidget):
PROPERTY_ROOT = 'scope.'
P... |
from application import application, utils
from application.urls import DIARY_ADD_URL, DIARY_ALL_URL
from dateutil.parser import parser
from flask import render_template, request, url_for
from werkzeug.utils import redirect
__author__ = 'elhe'
@application.route('/', methods=['GET', ])
def index():
response = ... |
# 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 ... |
################################################################################
#
# This program is part of the CIMMon Zenpack for Zenoss.
# Copyright (C) 2012 Egor Puzanov.
#
# This program can be used under the GNU General Public License version 2
# You can find full information here: http://www.zenoss.com/oss
#
###... |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 Grid Dynamics
# 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/l... |
#!/usr/bin/env python
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2014, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions ... |
import logging
import os
import subprocess
def out_for_in(in_path):
return '{0}.gpx'.format(os.path.splitext(os.path.basename(in_path))[0])
class Converter(object):
def __init__(self, config, input_path):
self.config = config
self.logger = logging.getLogger()
self.input_file = input... |
#coding=utf-8
'''
Created on 2016��10��20��
@author: huangning
'''
from flask import render_template, redirect, request, url_for, flash
from flask_login import login_user, logout_user, login_required, \
current_user
from . import auth
from .. import db
from ..models import User
from ..email import send... |
import sys
from CompoundRanker.database import get_db,query_db
from CompoundRanker import app
from requests import exceptions, get
class CIDGatherer(object):
def harvest(self, dataset_id):
"""
Harvest all of the CIDs from PubChem
:return: List of tuples [(cid, metab_id),]
"""
... |
'''
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 use this ... |
# 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/.
import json
import time
from configman.dotdict import DotDict
import mock
import pytest
from socorro.submitter.submitt... |
from menus.menu_pool import menu_pool
from menus.base import Menu, NavigationNode, Modifier
from cms.utils import get_language_from_request
from cms.utils.moderator import get_page_queryset, get_title_queryset
from django.conf import settings
from django.contrib.sites.models import Site
from cms.utils.i18n import get_f... |
"""
This function is to parse all of the DOI prefixes and their associated publishers from the table kept at
http://www.crossref.org/06members/50go-live.html
This program is accessing the table on May 12, 2016. Website states 'last updated on May 12, 2016.'
Creates and saves three things:
1) full_prefix_table.csv... |
from pretix.base.signals import EventPluginSignal
html_head = EventPluginSignal(
providing_args=["request"]
)
"""
This signal allows you to put code inside the HTML ``<head>`` tag
of every page in the frontend. You will get the request as the keyword argument
``request`` and are expected to return plain HTML.
As ... |
#!/usr/bin/env python
"""
accumulator class
Designed to be used as an expandable numpy array, to accumulate values, rather
than a python list.
Note that slices return copies, rather than views, unlike regular numpy arrays.
This is so that the buffer can be re-allocated without messing up any views.
"""
import numpy... |
#!/usr/bin/env python
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have purchased from
# Numenta, Inc. a separate commercial license for this software code, the
# following terms and conditio... |
import pyb
class rotary():
def __init__(self,Apin='X21',Bpin='X22'):
self.B = pyb.Pin(Bpin)
self.A = pyb.Pin(Apin)
self.prevA = self.A.value()
self.prevB = self.B.value()
self.CWcount = 0
self.CCWcount = 0
self.position = 0
self.Bint = pyb.ExtInt(... |
# Copyright (c) 2021, Djaodjin 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:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and t... |
import os.path
import pygame.mixer
import data
LOOP = -1
def load_music(music_ref):
"""
Charge une musique en mémoire mais ne la joue pas
music_ref - La référence de la musique
"""
music_path = data.get_sound_path(
os.path.join("music", music_ref + ".ogg"))
pygame.mixer.music.load(m... |
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Pagina.image'
db.add_column(u'manga_pagina', 'image',
... |
###############################################################################
##
## Copyright (C) 2014-2015, New York University.
## Copyright (C) 2011-2014, NYU-Poly.
## Copyright (C) 2006-2011, University of Utah.
## All rights reserved.
## Contact: contact@vistrails.org
##
## This file is part of VisTrails.
##
## ... |
#!/bin/sh
from flask import Flask, jsonify
import smbus
import time
import RPi.GPIO as io
import requests
# Plex Call
plexUrl = 'http://192.168.1.100/jsonrpc?request={"jsonrpc": "2.0", "method": "Player.GetItem", "params": { "properties": ["title", "album", "duration", "showtitle"], "playerid": 1 }, "id": "VideoGetIt... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import calendar
import codecs
import contextlib
import ctypes
import datetime
import email.utils
import errno
import gzip
import itertools
import io
import json
import locale
import math
import os
import pipes
import platform
import... |
from database.database import DatabaseInterface
from flask_restful import abort
from rest_api.restricted_resource import RestrictedResource
from usermanagement.user_management import UserManagementInterface
class Logout(RestrictedResource):
"""
REST API for logging out
"""
def __init__(self):
... |
# Copyright 2021, Kay Hayen, mailto:kay.hayen@gmail.com
#
# Python test originally created or extracted from other peoples work. The
# parts from me are licensed as below. It is at least Free Software where
# it's copied from other people. In these cases, that will normally be
# indicated.
#
# L... |
# -*- coding: utf-8 -*
import os
import random
import re
import six
import argparse
import io
import math
prog = re.compile("[^a-z ]", flags=0)
def parse_args():
parser = argparse.ArgumentParser(
description="Paddle Fluid word2 vector preprocess")
parser.add_argument(
'--build_dict_corpus_dir'... |
import datetime
from django.db import models
from django.conf import settings
from django.template import loader, Context
from markdown import markdown
blog = __import__(settings.BLOG_APP)
Entry = blog.models.__getattribute__(settings.BLOG_ENTRY_MODEL)
if Entry.objects.count():
default_blog_entry = Entry.objects... |
# -*- coding: utf-8 -*-
import unittest
import os
import sys
import mock
sys.path.append(os.getcwd())
import towbar
class TestTowbar(unittest.TestCase):
def setUp(self):
self.t = towbar.Towbar("foo", "bar")
def tearDown(self):
pass
@mock.patch('time.time')
@mock.patch('requests.post'... |
#
# Copyright 2016 BMC Software, 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 w... |
# -*- coding: utf-8 -*-
"""
Copyright (C) 2013 Dariusz Suchojad <dsuch at zato.io>
Licensed under LGPLv3, see LICENSE.txt for terms and conditions.
"""
from __future__ import absolute_import, division, print_function, unicode_literals
# stdlib
from traceback import format_exc
# Zato
from zato.common import ZatoExc... |
"""
Admin Shell commands available in 'normal' install mode
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IMPORTANT:
Every import from external packages must be made with LazyImportError!
Otherwise the bootstrap will fail, because no external package is
available in boots... |
# Copyright (C) 2016 Red Hat, Inc., Pratik Bandarkar <pbandark@redhat.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 2 of the License, or
# (at your option) any later versi... |
import session
from fov import generate
from random import randint
class Aggressive:
# AI for a basic monster.
def take_turn(self):
# a basic monster takes its turn. If you can see it, it can see you
monster = self.owner
monster_fov = generate(monster.x, monster.y)
if (session.... |
# Copyright 2020 Kapil Thangavelu
# Copyright The Cloud Custodian Authors.
# SPDX-License-Identifier: Apache-2.0
from .core import ValueFilter
from c7n.exceptions import PolicyExecutionError
from c7n.manager import resources
from c7n.utils import type_schema, local_session, chunks
class AccessAnalyzer(ValueFilter)... |
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar)
# All Rights Reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Pu... |
import math
import re
import matplotlib
import matplotlib.pyplot as plt
from matplotlib import collections, lines, patches
from analysis import heatmaps
import config
# Source: https://gist.github.com/jasonmc/1160951
def _set_foregroundcolor(ax, color):
'''For the specified axes, sets the color of the frame, m... |
#-*- coding: utf-8 -*-
###########################################################################
## ##
## Copyrights Etienne Chové <chove@crans.org> 2009 ##
## Copyrights Frédéric Rodrigo 2011 ... |
"""
The plugin for saving basic test info to the logs for Selenium tests.
The created file will be saved in the default logs folder (in .../logs)
Data to be saved includes:
* Last page url
* Browser
* Server
* Error
* Traceback
"""
import os
import codecs
import time
import traceback
from nose.plugins import Plugin
fr... |
#
# The Python Imaging Library.
# $Id$
#
# a Tk display interface
#
# History:
# 96-04-08 fl Created
# 96-09-06 fl Added getimage method
# 96-11-01 fl Rewritten, removed image attribute and crop method
# 97-05-09 fl Use PyImagingPaste method instead of image type
# 97-05-12 fl Minor tweaks to match the IFUNC9... |
"""
Test the Terminate/GPONLink Product Order
The product order takes a serial number, calls LST-ONTDETAIL to get the details of the ONT then DEL-ONT to remove it.
This test case ensures that the right commands happen in the right order
"""
import fptest
class TerminateGponLinkTest(fptest.FpTest):
def test_work... |
# (C) British Crown Copyright 2013 - 2014, Met Office
#
# This file is part of Iris.
#
# Iris 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 3 of the License, or
# (at your option) any l... |
# Copyright 2015-2016 Palo Alto Networks, 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... |
#!/usr/bin/env python
##############################################
# LIBRARIES IMPORT
##############################################
import sys
# 'Flask' libraries for web socket programming with the client/web-browser
from flask import Flask, render_template, request
from flask.ext.socketio import SocketIO, emit
... |
import pandas as pd
import matplotlib
import matplotlib.pyplot as plt
# change the font size
matplotlib.rc('xtick', labelsize=9)
matplotlib.rc('ytick', labelsize=9)
matplotlib.rc('font', size=14)
# time series tools
import statsmodels.api as sm
# folder with data
data_folder = '../../Data/Chapter07/'
# colors
colo... |
"""
metadataparser is designed to read metadata fields from light markup
pages in a way that is compatible with docutils [bibinfo][rst] fields as
well as Multimarkdown's [multimarkdown][metadata fields].
To do so, we follow the markup-specification of [multimarkdown] with the
additions that
- a colon can be added befo... |
import sys,string
import os
def makeTestFile():
all_data = [['name','harold','bob','frank','sally','kim','jim'],
['a','0','0','1','2','0','5'],['b','0','0','1','2','0','5'],
['c','0','0','1','2','0','5'],['d','0','0','1','2','0','5']]
input_file = 'test.txt'
export_object = open(input_... |
# -*- Mode: Python -*-
# GObject-Introspection - a framework for introspecting GObject libraries
# Copyright (C) 2008 Johan Dahlin
# Copyright (C) 2008, 2009 Red Hat, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as publish... |
#!/usr/bin/python2.7
# -*- coding: utf-8 -*-
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
# 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
... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Django settings for askkit project.
Generated by 'django-admin startproject' using Django 1.8.2.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproj... |
# -*- coding: utf-8 -*-
from django.contrib.auth.models import User
from django.conf import settings
from django.views.decorators.csrf import csrf_exempt
from django.http import HttpResponse
from django.shortcuts import get_object_or_404
from django.utils.translation import ugettext as _
from issues.models import Issue... |
__author__ = 'dev'
import re
from http.server import SimpleHTTPRequestHandler
HEADERS_HOST_PARAMETER_KEY_NAME = "Host"
REQUEST_LINE_ENCODING = "iso-8859-1"
HOST_PATTERN_KEY_NAME = "host_pattern"
RESPONSE_CONTENT_PATH_KEY_NAME = "response_content_path"
class FakeHTTPRequestHandler(SimpleHTTPRequestHandler):
def... |
# 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 ... |
import os
import dotenv
import yaml
from io import BytesIO
from fabric.api import env, local, run, task, settings, abort, put, cd, prefix, get, sudo, shell_env, open_shell, prompt, lcd
from fabric.colors import red, green, yellow, white
from fabric.context_managers import hide
from fabric.contrib.project import rsync_... |
#!/usr/bin/env python
# Copyright (c) 2010 SubDownloader Developers - See COPYING - GPLv3
def compVer(ver1,ver2):
#Checks to see if ver1 >= ver2
vl1 = ver1.split('.')
vl2 = ver2.split('.')
while 1:
if int(vl1[0]) > int(vl2[0]):
return 1
elif int(vl1[0]) == int(vl2[0]):
... |
from unittest import TestCase
from itertools import permutations
from src.main.managers.players.hard_coded_player_manager import HardCodedPlayerManager
from src.main.managers.conflict.hard_coded_example_conflict_manager import HardCodedExampleConflictManager
from src.main.managers.conflict.automated_conflict_manager i... |
__author__ = 'tylin'
__version__ = '2.0'
# Interface for accessing the Microsoft COCO dataset.
# Microsoft COCO is a large image dataset designed for object detection,
# segmentation, and caption generation. pycocotools is a Python API that
# assists in loading, parsing and visualizing the annotations in COCO.
# Pleas... |
"""
Custom Authenticator to use Globus OAuth2 with JupyterHub
"""
import base64
import os
import pickle
import urllib
from jupyterhub.auth import LocalAuthenticator
from tornado.httpclient import HTTPRequest
from tornado.web import HTTPError
from traitlets import Bool
from traitlets import default
from traitlets impor... |
def insertion_sort(lst):
"""Instead of just inserting the value where it should be at,
it shifts the entire array until the location is found. It prints
out all the intermediate steps, but the final step is actually just
returned, so the output must be manually printed.
:param lst: The list of value... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from amber_automate.automate import Automate
from amber_automate.state import State
from amber_automate.transition_table import TransitionTable
from amber_automate.transition import Transition
class AutomateBuilder(object):
@staticmethod
def create_automate_build... |
# -*- coding: utf-8 -*-
# <nbformat>3.0</nbformat>
# <codecell>
%run -i 'KRPC.ipynb'
# <codecell>
conn = krpc.connect(name='laptop', address='192.168.1.9')
ksc = conn.space_center
vessel = ksc.active_vessel
obt = vessel.orbit
ap = vessel.auto_pilot
con = vessel.control
vrf = vessel.reference_frame
srfrf = vessel.... |
""" Convolutional layers. """
#pylint: disable=not-callable
import torch.nn as nn
import torch.nn.functional as F
from ..utils import get_num_channels, get_num_dims, safe_eval, calc_padding
class BaseConv(nn.Module):
""" An universal module for plain and transposed convolutions. """
LAYERS = {}
TRANSPOSE... |
PAYLOAD_GET_EXAMPLE = {
"compose": {
"body": {
"type": "object",
"value": {
"response_code": {
"type": "integer",
"value": "@question.$resp.$$status_code",
},
"answer_ids": {
... |
# -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-12-06 12:33
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('market', '0005_auto_20161206_1204'),
]
operations = [
migrations.AddField(
... |
# -*- coding: utf-8 -*-
from django.contrib import admin
from django.utils.translation import ugettext_lazy as _
from django.core.urlresolvers import reverse
from django.utils.http import urlencode
from feedz.models import Feed, FeedEntry, Request
from feedz.utils import html_link
class FeedAdmin(admin.ModelAdmin):
... |
import csv
import datetime
import json
import calendar
from timeline3 import convertToFile
def convertTime(dateAsString):
MillisecNum=''
conv =''
if len(dateAsString)>4:
conv = datetime.datetime.strptime(dateAsString, '%m/%d/%Y')
MillisecNum = calendar.timegm(conv.timetuple())
else:
numberAsInt = int(dateA... |
#!/usr/bin/python
#
# Copyright (C) 2010 Google 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 2 of the License, or
# (at your option) any later version.
#
# This program... |
"""
Breadth-first-traversal is an algorithm for traversing a tree or
graph data structure. Starting at the tree root (or some arbitrary node of a
graph, sometimes referred to as a 'search key'[1]) and explores the neighbor
nodes at that level first, before moving to the next level.
"""
from collections import deque
... |
#!/usr/bin/python
# coding=UTF-8
#
# usage: ./merge_json.py 1.json 2.json 3.json ..
import os
import json, codecs
para_count=len(os.sys.argv)
d=dict()
d['configs']=[]
serverandport=[]
if para_count > 1:
for i in range(1,para_count,1):
if os.path.exists(os.sys.argv[i]) and os.sys.argv[i].sp... |
# Copyright (C) 2020-2021 Greenweaves Software Limited
# 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.
# Th... |
# -*- coding: utf-8 -*-
#
# (c) Copyright 2003-2009 Hewlett-Packard Development Company, L.P.
#
# 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 opt... |
__author__ = 'rihards'
import fileinput
'''
Original Java code can be found in https://github.com/apache/lucene-solr
Ported to Python by Rihards Krišlauks with minor modifications
* Light stemmer for Latvian.
* <p>
* This is a light version of the algorithm in Karlis Kreslin's PhD thesis
* <i>A stemming algorit... |
# Generated by Django 2.2.13 on 2020-10-13 14:47
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('protocoloadm', '0034_auto_20200708_1312'),
]
operations = [
migrations.AlterModelOptions(
name='acompanhamentodocumento',
o... |
import time,random,functools
import numpy as np
from PyQt4 import QtCore, QtGui
import pyqtgraph as pg
import pyqtgraph.opengl as gl
class utilitiesClass():
"""
This class contains methods that simplify setting up and running
an experiment.
"""
timers=[]
viewBoxes=[]
plots3D=[]
plots2D=[]
axisItems=[]
t... |
# -*- 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 th... |
# -*- coding: utf-8 -*-
#
# Kombinatorik documentation build configuration file, created by
# sphinx-quickstart on Wed Jul 24 17:58:33 2013.
#
# 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.
#
... |
#!/usr/bin/env python
# Copyright (C) 2011-2014 Swift Navigation Inc.
# Contact: Colin Beighley <colin@swift-nav.com>
#
# This source is subject to the license found in the file 'LICENSE' which must
# be be distributed together with this source. All other rights reserved.
#
# THIS CODE AND INFORMATION IS PROVIDED "AS I... |
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distri... |
#!/usr/bin/env python
"""
Create metrics using CloudWatch Logs
Usage:
disco_log_metrics.py [--debug] [--env ENV] list-metrics --hostclass HOSTCLASS
disco_log_metrics.py [--debug] [--env ENV] list-groups --hostclass HOSTCLASS
disco_log_metrics.py [--debug] [--env ENV] update --hostclass HOSTCLASS
disco_... |
''' ResourceStatusClient
Client to interact with the ResourceStatusDB.
'''
# pylint: disable=unused-argument
__RCSID__ = '$Id$'
from DIRAC import S_OK
from DIRAC.Core.Base.Client import Client
from DIRAC.ConfigurationSystem.Client.Helpers.Operations import Operations
from DIRAC.FrameworkSystem.Client.Notificatio... |
# Simply the class definitions for the bot and worker declarations
# Nice way to make HTTP get requests
import requests
# A nice holder for information we need between function calls
class Bot:
double_resets = {}
def __init__ (self, token):
self.token = token
handlers = {}
# Adds a singl... |
# -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2015 be-cloud.be
# Jerome Sonnet <jerome.sonnet@be-cloud.be>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU ... |
from __future__ import absolute_import
import proteus.default_so
from importlib import reload
reload(proteus.default_so)
from proteus.default_so import *
try:
from . import cylinder
except:
import cylinder
reload(cylinder)
from proteus.SplitOperator import Sequential_FixedStep_Simple, defaultSystem
if cylinde... |
#!/usr/bin/env python
from __future__ import division, print_function
import dartpy
import numpy
import os.path
WORKSPACE_BASE = '/home/mkoval/storage/dartpy-ws'
ROBOT_POSE = numpy.array([
[ -2.220e-16, 1.000e+00, 0.000e+00, 2.050e+00],
[ -1.000e+00, -2.220e-16, -0.000e+00, 3.050e+00],
[ -0.000e... |
# Copyright (c) 2015-2019 The Botogram Authors (see AUTHORS)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, mod... |
from __future__ import absolute_import
import pytest
import numpy as np
from numpy.testing import assert_allclose
import scipy.sparse as sparse
from vresutils import transfer
@pytest.fixture
def orig():
return np.array(((0., 0.), (1., 1.)))
@pytest.fixture
def dest():
return np.array(((1.5, 1.), (0., 0.5),... |
# -*- coding: utf-8 -*-
"""
Test the access control framework
"""
import datetime
import ddt
import itertools
import pytz
from django.contrib.auth.models import User
from ccx_keys.locator import CCXLocator
from django.test.client import RequestFactory
from django.core.urlresolvers import reverse
from django.test impor... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.