src
stringlengths
721
1.04M
from github import Github from social.apps.django_app.default.models import UserSocialAuth def get_github(user): if user.is_authenticated(): try: data = UserSocialAuth.objects.filter(user=user).values_list('extra_data')[0][0] username = data['login'] password = data['ac...
# Unix SMB/CIFS implementation. # Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2007-2010 # Copyright (C) Matthias Dieter Wallnoefer 2009 # # Based on the original in EJS: # Copyright (C) Andrew Tridgell <tridge@samba.org> 2005 # Copyright (C) Giampaolo Lauria <lauria2@yahoo.com> 2011 # # This program is free softwa...
from flask import flash, jsonify, redirect, render_template, request from flask_login import login_required from flask_restful import Resource, Api from flask_wtf.file import InputRequired from sqlalchemy.exc import IntegrityError from wtforms.fields import SelectField from ..models import EditableHTML, Parameter from...
# 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 ...
# -*- coding: utf-8 -*- """ This config file runs the simplest dev environment using sqlite, and db-based sessions. Assumes structure: /envroot/ /db # This is where it'll write the database file /edx-platform # The location of this repo /log # Where we're going to write log files """ # We ...
""" objbrowser package """ __all__ = ['browse', 'execute', 'create_object_browser', 'logging_basic_config'] import sys, os, logging, pprint, inspect from PyQt5 import QtCore from PyQt5 import QtGui from PyQt5 import QtWidgets from objbrowser.objectbrowser import ObjectBrowser from objbrowser.version import PROGRAM_NA...
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2015, Numenta, Inc. Unless you have purchased from # Numenta, Inc. a separate commercial license for this software code, the # following terms and conditions apply: # # This pro...
# -*- coding: utf-8 -*- # Copyright 2017 Ignacio Ibeas <ignacio@acysos.com> # Copyright 2017 Studio73 - Pablo Fuentes <pablo@studio73> # Copyright 2017 Studio73 - Jordi Tolsà <jordi@studio73.es> # Copyright 2017 Otherway - Pedro Rodríguez Gil # Copyright 2017 Tecnativa - Pedro M. Baeza # Copyright 2017 Comunitea - Omar...
#!/usr/bin/env python # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2012, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' import imghdr ...
#/usr/bin/python #encoding=utf-8 from .Base import * class FEDFixNestedStatement(ExtraChecker): '''{ "summary":"修复嵌套的CSS", "desc":"@keyframes, @media之类的" }''' def __init__(self): self.id = 'fix-nested-ruleset' self.errorLevel = ERROR_LEVEL.ERROR self.errorMsg ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys kwargs = {} if sys.platform == 'win32': kwargs['install_requires'] = ['colorama'] try: from setuptools import setup except ImportError: from distutils.core import setup import terminal from email.utils import parseaddr author, author_email = parsea...
from zmq.eventloop.zmqstream import ZMQStream as ZmqStream from zmq.sugar import Socket as ZmqSocket from zmq.sugar import constants as zmq_constants from pysigslot import Signal from pycloudia.streams.zmq_impl.messages import Message from pycloudia.streams.zmq_impl.strategies import * __all__ = [ 'RouterStream...
import torch.nn as nn import torch.nn.functional as F from mmcv.cnn import ConvModule from mmcv.runner import BaseModule, auto_fp16, force_fp32 from mmdet.models.builder import HEADS @HEADS.register_module() class FusedSemanticHead(BaseModule): r"""Multi-level fused semantic segmentation head. .. code-block...
from __future__ import unicode_literals import os from threading import Lock import warnings from .mmap_dict import mmap_key, MmapedDict class MutexValue(object): """A float protected by a mutex.""" _multiprocess = False def __init__(self, typ, metric_name, name, labelnames, labelvalues, **kwargs): ...
import collections import itertools import logging import pykka import mopidy from mopidy import audio, backend, mixer from mopidy.audio import PlaybackState from mopidy.core.history import HistoryController from mopidy.core.library import LibraryController from mopidy.core.listener import CoreListener from mopidy.co...
#This tool was rushed together over the course of an hour or so. Be gentle. from flask import Flask, render_template, request import threading import socket import json app = Flask(__name__) def request(request, value=None): sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.settimeout(5) sock.connect...
from ..commons import * from .shape import Shape from xml.etree.ElementTree import Element as XmlElement from .mirror import * class PolygonFormRenderer(object): def __init__(self, polygon_shape, form_name): self.polygon_shape = polygon_shape self.form_name = form_name def get_name(self): ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np import matplotlib.pyplot as plt import matplotlib as mpl import scipy.optimize as optimize from scipy import special #import sympy.latex import uncertainties from uncertainties import ufloat from uncertainties import ufloat_fromstr from uncertainties im...
# -*- coding: utf-8 -*- """This file contains a parser for compound ZIP files.""" from __future__ import unicode_literals import struct import zipfile from plaso.lib import errors from plaso.parsers import interface from plaso.parsers import logger from plaso.parsers import manager class CompoundZIPParser(interfac...
"""aque submit - Schedule a shell command. Schedules to given command to run on the queue. The environment will have an extra $AQUE_TID variable containing the ID of the running task. E.g.: $ aque submit --shell 'echo $AQUE_TID says: "$@"' one two three """ import argparse import os import sys from aque.c...
# vi: ts=8 sts=4 sw=4 et # # test_misc: test suite for draco2.util.misc # # This file is part of Draco2. Draco2 is free software and is made available # under the MIT license. Consult the file "LICENSE" that is distributed # together with this file for the exact licensing terms. # # Draco2 is copyright (c) 1999-2007 by...
# # 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 n...
# -*- coding: utf-8 -*- import datetime import time import traceback from flask import request from flask.ext.restful import Resource from api import API_PREFIX from api.order import create_order from app import restful_api, db, logger from cache.order import cache_qrcode_code, get_cache_order from cache.weixin impor...
########################################################################## # Copyright (c) 2011, ETH Zurich. # All rights reserved. # # This file is distributed under the terms in the attached LICENSE file. # If you do not find this file, copies can be found by writing to: # ETH Zurich D-INFK, Universitaetstrasse 6, CH...
# encoding:utf-8 """ :synopsis: views "read-only" for main textual content By main textual content is meant - text of Exercises, Problems and Comments. The "read-only" requirement here is not 100% strict, as for example "exercise" view does allow adding new comments via Ajax form post. """ import datetime import loggi...
class Viewport_Mixin(object): """ Mixin to help move around the image """ def update(self): """ Call update to get fresh data. """ pass def reset(self): """ Reset the viewport """ self._position = (0, 0) def set_position(self, xy): self._position = xy def move_left(self)...
import logging config = { "settings": { # To be used by Flask: DEVELOPMENT ONLY "debug": True, # Flask host: DEVELOPMENT ONLY "host": "localhost", # Flask port: DEVELOPMENT ONLY "port": 5904, # Logging configurations "logging": { "leve...
from __future__ import unicode_literals, division, absolute_import from builtins import * # pylint: disable=unused-import, redefined-builtin class TestSortBy(object): config = """ tasks: test1: sort_by: title mock: - {title: 'B C D', url: 'http://localhost...
# Copyright 2019 LUXIM, Slovenia (Matjaž Mozetič) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from odoo import api, fields, models from odoo.tools.translate import _ from odoo.exceptions import ValidationError class ResourcePlanLineMakePurchase(models.TransientModel): _name = "res...
from django.conf import settings from django.urls import reverse from pyquery import PyQuery as pq from olympia import amo from olympia.amo.tests import TestCase, addon_factory, formset, user_factory from olympia.bandwagon.models import Collection, CollectionAddon class TestCollectionAdmin(TestCase): def setUp(...
# # Copyright (C) 2014 Stanislav Bohm # # This file is part of Aislinn. # # Aislinn 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 the License, or # (at your option) any later v...
''' Backend Kivy ===== .. image:: images/backend_kivy_example.jpg :align: right The :class:`FigureCanvasKivy` widget is used to create a matplotlib graph. This widget has the same properties as :class:`kivy.ext.mpl.backend_kivyagg.FigureCanvasKivyAgg`. FigureCanvasKivy instead of rendering a static image, uses th...
from __future__ import absolute_import, division, print_function, with_statement import collections from contextlib import closing import errno import gzip import logging import os import re import socket import sys from tornado.httpclient import AsyncHTTPClient from tornado.httputil import HTTPHeaders from tornado.i...
# This file is part of RinohType, the Python document preparation system. # # Copyright (c) Brecht Machiels. # # Use of this source code is subject to the terms of the GNU Affero General # Public License v3. See the LICENSE file or http://www.gnu.org/licenses/. from .element import DocumentElement from .flowable impo...
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2010 - 2011, University of New Orleans # # 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 o...
from service.base import BaseService from req import Service from utils.form import form_validation import os import config class VerdictService(BaseService): def __init__(self, db, rs): super().__init__(db, rs) VerdictService.inst = self def get_verdict_list(self, data={}): # res = s...
from aleph.core import db from aleph.model import Role from aleph.views.util import validate from aleph.tests.util import TestCase class GroupsApiTestCase(TestCase): def setUp(self): super(GroupsApiTestCase, self).setUp() self.role = self.create_user(foreign_id='user_1') group = Role.load...
from __future__ import print_function import time from dual_mc33926_rpi import motors, MAX_SPEED # Set up sequences of motor speeds. test_forward_speeds = list(range(0, MAX_SPEED, 1)) + \ [MAX_SPEED] * 200 + list(range(MAX_SPEED, 0, -1)) + [0] test_reverse_speeds = list(range(0, -MAX_SPEED, -1)) + \ [-MAX_SPEED...
import os import cv2 from tkFileDialog import askdirectory from tkMessageBox import askyesno WINDOW_NAME = 'Simple Bounding Box Labeling Tool' FPS = 24 SUPPOTED_FORMATS = ['jpg', 'jpeg', 'png'] DEFAULT_COLOR = {'Object': (255, 0, 0)} COLOR_GRAY = (192, 192, 192) BAR_HEIGHT = 16 KEY_UP = 65362 KEY_DOWN = 65364 KEY_LEF...
# coding: utf-8 from django.test import TestCase from django.conf import settings # local test models from models import Episode, Media class GenericAdminViewTest(TestCase): fixtures = ['users.xml'] def setUp(self): # set TEMPLATE_DEBUG to True to ensure {% include %} will raise # exceptions...
import setuptools with open('VERSION.txt', 'r') as f: version = f.read().strip() setuptools.setup( name="odoo12-addons-oca-purchase-workflow", description="Meta package for oca-purchase-workflow Odoo addons", version=version, install_requires=[ 'odoo12-addon-procurement_purchase_no_groupin...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.Create...
import numpy as np from sklearn import ensemble from sklearn import cross_validation from sklearn import metrics from sklearn import preprocessing from sklearn import linear_model import OVFM.Model as md import OVFM.FeatureMap as fm import OVFM.Risk as rsk import OVFM.LearningRate as lr import OVFM.DataGeneration as d...
import sys import os import time import numpy as np np.random.seed(1234) # for reproducibility # specifying the gpu to use # import theano.sandbox.cuda # theano.sandbox.cuda.use('gpu1') import theano import theano.tensor as T import lasagne import cPickle as pickle import gzip import binary_ops from pylearn2.d...
#!/usr/bin/env python import sys import json from types import SimpleNamespace from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter from webbrowser import open_new_tab import tornado.ioloop import tornado.web from .console import start_message, append_message, print_message from .infos import DbInfo, P...
# Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. import os import flask from flask.ext.wtf import Form import wtforms from wtforms import validators from digits.config import config_value from digits.device_query import get_device, get_nvml_info from digits import utils from digits.utils import s...
#!/usr/bin/env python """ Program to run different multiple sequence alignment programs. Requirement: mafft - http://mafft.cbrc.jp/alignment/server/index.html clustalw2 - http://www.ebi.ac.uk/Tools/msa/clustalw2/ install these packages and set the path correctly if it is not a standard one. """ impo...
#!/usr/bin/env python import os import glob import shutil from distutils.core import setup, Command from test.all import run_all_tests if os.name == 'nt': import py2exe #@UnresolvedImport @UnusedImport from foobnix.version import FOOBNIX_VERSION VERSION = FOOBNIX_VERSION data_files = [ ('share/applicatio...
import web, datetime,sys try: db=web.database(dbn="sqlite",db="IIITMK.db") except: print "Could not connect to database" sys.exit() def getUsers(): return db.select('IIITMKLogin', order='id DESC') def get_posts(): return db.select('OpinionPoll', order='id DESC') def get_post(id): try: return d...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2012 Jérémie DECOCK (http://www.jdhp.org) # 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 witho...
# -*- coding: utf-8 -*- # # sphinxcontrib-httpdomain documentation build configuration file, created by # sphinx-quickstart on Thu Jun 2 13:27:52 2011. # # 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 # autogenera...
# -*- coding: utf-8 -*- import unittest from unittest import skip from gender_bender import gender_bend from gender_bender.gender_tools import _copy_case class TestFlipGender(unittest.TestCase): def test_flip_back_and_forth(self): text = 'himself did not know herself.' result = gender_bend(text)...
# Copyright (c) 2020 Dell Inc. or its subsidiaries. # # 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...
""" dj-stripe Mixin Tests. """ from copy import deepcopy from unittest.mock import patch from django.contrib.auth import get_user_model from django.test.client import RequestFactory from django.test.testcases import TestCase from djstripe.mixins import PaymentsContextMixin, SubscriptionMixin from djstripe.models impo...
# -*- coding: utf-8 -*- class SessionHelper: def __init__(self, app): self.app = app def login(self, username, password): wd = self.app.wd self.app.open_home_page() wd.find_element_by_name("pass").click() wd.find_element_by_id("LoginForm").click() wd.find_elem...
import asyncio import unittest as ut import async_timeout as at import wcpan.worker as ww from . import util as u class TestAsyncQueue(ut.TestCase): @ww.sync async def testImmediatelyShutdown(self): with at.timeout(0.1): async with ww.AsyncQueue(8) as aq: pass @ww.s...
from flask import current_app as app from typing import List, Dict from flask import url_for def websub_discovery_link() -> Dict: """ Creates a WebSub discovery link :return: link as dict """ hub_enabled = app.config.get("HUB_ENABLED", False) if hub_enabled: hub_url = url_for( ...
import typing from . import _iterate, mutate, typings from .attach import attach, detach from .bundle import LilyPondFormatBundle from .duration import Duration from .overrides import LilyPondLiteral, tweak from .parentage import Parentage from .pitch.sets import PitchSet from .score import Chord, Container, Note, Voi...
# Fuck you Disyer. Stealing my fucking paypal. GET FUCKED: toontown.suit.SuitDNA from panda3d.core import Datagram, DatagramIterator, VBase4 import random from direct.directnotify.DirectNotifyGlobal import * from toontown.toonbase import TTLocalizer, ToontownGlobals import random from direct.distributed.PyDatagra...
# -*- coding: iso-8859-1 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Conector para modovideo # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import re, urlparse, urllib, urllib2 import os from ...
# -*- coding: utf-8 -*- # # Copyright (C) 2007-2013 by Erwin Marsi and TST-Centrale # # This file is part of the DAESO Framework. # # The DAESO Framework 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 ...
# -*- coding: utf-8 -*- # # COPYRIGHT (C) 2016-2017 Michael Labouebe <gfarmerfr@free.fr> # COPYRIGHT (C) 2016-2018 Mutnick <mutnick@techie.com> # COPYRIGHT (C) 2013 eL_vErDe <gandalf@le-vert.net> # COPYRIGHT (C) 2008-2012 Quinox <quinox@users.sf.net> # COPYRIGHT (C) 2009 Hedonist <ak@sensi.org> # COPYRIGHT (C) 2006-200...
""" Other than changing the load commands in such a way that they do not contain the load command itself, this is largely a by-hand conversion of the C headers. Hopefully everything in here should be at least as obvious as the C headers, and you should be using the C headers as a real reference because the documentati...
import os import sys from ctypes import * dll_filename = "vJoyInterface.dll" dll_path = os.path.dirname(__file__) + os.sep + dll_filename try: _vj = cdll.LoadLibrary(dll_path) except OSError: sys.exit("Unable to load vJoy SDK DLL. Ensure that %s is present" % dll_filename) def vJoyEnabled(): """...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # ML Insights documentation build configuration file, created by # sphinx-quickstart on Wed Nov 9 13:32:07 2016. # # 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 ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import argparse import collections import contextlib import functools import itertools import json import math import os import random import signal import time import redis import pymysql try: import httplib except ImportError...
# Django imports from django.conf import settings from django.test import TestCase from django.utils import timezone from model_bakery import baker # Devilry imports from devilry.devilry_group import devilry_group_baker_factories from devilry.devilry_group.feedbackfeed_builder import builder_base from devilry.devilry_...
#!/usr/bin/env python2 from __future__ import print_function import argparse, json, sys, time, os import yaml VERBOSITY = 1 def info(*substrs): print('[INFO]: ', end='', file=sys.stderr) print(*substrs, file=sys.stderr) def warn(*substrs): print('[WARNING]: ', end='', file=sys.stderr) print(*substrs, file=sy...
import click import os import subprocess import json import datetime from kamcli.cli import pass_context from kamcli.iorpc import command_ctl @click.command( "pstrap", short_help="Store runtime details and gdb full backtrace for all Kamailio processes to a file", ) @click.option( "all", "--all", "...
# Copyright 2015, Kay Hayen, mailto:kay.hayen@gmail.com # # Python tests originally created or extracted from other peoples work. The # parts were too small to be protected. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the ...
# This file is part of Buildbot. Buildbot is free software: you can # redistribute it and/or modify it under the terms of the GNU General Public # License as published by the Free Software Foundation, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
#!/usr/bin/python from BeautifulSoup import BeautifulSoup as bsoup import BeautifulSoup from shutil import copyfile import argparse import requests import re import os # Miscellaneous variables TMP_DOCKER_DIR = os.path.join('/tmp', 'docker', "{{ rand_dir }}") LATEST = '2016.11' check_steps = [] os_tabs = ['tab1-deb...
from django.core.exceptions import ValidationError from django.db.utils import IntegrityError from oppia.test import OppiaTestCase from profile.models import UserProfile, CustomField, UserProfileCustomField class ProfileCustomFieldsTest(OppiaTestCase): fixtures = ['tests/test_user.json', 'tests/t...
""" Functions for visualizing system load over time in a Unicode graph. The one you probably want to call is get_load_string(). """ import os from . import px_cpuinfo from . import px_terminal import sys if sys.version_info.major >= 3: # For mypy PEP-484 static typing validation from six import text_type #...
import random def miller_rabin(n, k = 100): if n > 31: for p in [3, 5, 7, 11, 13, 17, 19, 23, 29, 31]: if n % p == 0: return False d=n-1 s=0 while d & 1 == 0: d = d >> 1 s += 1 for i in range(k): a = random.randint(2,n-1) x = pow...
"""Testing error cases related to file formats. - Each file contains the same, valid geometry. Thus the various formatting options and errors are tested. - Invalid schema or geometry definitions, eg invalid CityGML """ ## 901 import pytest import os.path #---------------------------------------------------------...
# -*- coding: utf-8 -*- import six from django.core.paginator import InvalidPage, Page, Paginator from rest_framework import status from rest_framework.response import Response STATUS_CODES = { 'created': status.HTTP_201_CREATED, 'updated': status.HTTP_200_OK, 'accepted': status.HTTP_202_ACCEPTED } cla...
# Virtual memory analysis scripts. # Developed 2012-2014 by Peter Hornyack, pjh@cs.washington.edu # Copyright (c) 2012-2014 Peter Hornyack and University of Washington # Python script to run another Python script as a test application. # # Build + setup instructions: do these once / occasionally by hand, not # done a...
# EFILTER Forensic Query Language # # Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Un...
"""Generate the IEMRE hourly analysis file for a year""" import datetime import sys import os import geopandas as gpd import numpy as np from pyiem import iemre from pyiem.grid.zs import CachingZonalStats from pyiem.util import get_dbconn, ncopen, logger LOG = logger() def init_year(ts): """ Create a new Ne...
# -*- coding: utf-8 -*- """ Created on Mon Dec 19 10:57:30 2016 @author: jmaunon """ # 10 minutes to pandas #============================================================================== #%% Libraries #============================================================================== import pandas as pd ...
import greenlet import wsgiref, wsgiref.headers import datetime import logging #import In.nabar import In.core.response import In.core.action as action from In.core.asset import Asset from In.core.cookie import Cookie from In.html.menu import PageMenuTab class ContextEnd(RuntimeError): '''Context ha...
"""API functionality for setting the state of an application""" import os import random from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.contenttypes.models import ContentType from django.core.exceptions import ValidationError from django.core.files import File from d...
import re import collections import json import sys sys.path.append(sys.path[0]+"/../../") from modules.utils.helper import * from modules.db import DBops as dbops ##TODO remove sqlite and create dbops import sqlite3 result = {'status': True, 'message': '', 'cmd_results': '', 'errors': []} def vol_pslist(project):...
# -*- encoding: UTF-8 -*- # # Form based authentication for CherryPy. Requires the # Session tool to be loaded. # import cherrypy SESSION_KEY = '_cp_username' def check_credentials(username, password): """Verifies credentials for username and password. Returns None on success or a string describing the error...
from ex import * from ex.ioo.FITS import FITS import multiprocessing as mp import sdss.utils as utils import sdss_iii.settings as settings def usage(): print(''' transform the data into standard form python proc_transform_data.py --input_files={input_files} --npixel=[500] --nproc=[1] ''') sys.exit(1) def Fi...
import time class ReceiveRequest(object): """ A ReceiveRequest is generated every time the first packet from a message is received. The ReceiveRequest then keeps track of all of the message's packets that have already ben received. """ def __init__(self, inital_packet, (host, port)): s...
"""Provides the Objector class.""" import re from .exceptions import APIException class Objector(object): """The objector builds :class:`.RedditBase` objects.""" @staticmethod def _camel_to_snake(name): """Return `name` converted from camelCase to snake_case. Code from http://stackoverf...
from datetime import datetime # import dbsettings from functools import partial from uuid import uuid4 from django.contrib import admin from django.contrib.admin.widgets import FilteredSelectMultiple from django.core.exceptions import PermissionDenied from django.db.models import Q from django.dispatch import receive...
""" Copyright (c) 2017, 2018 Genome Research Ltd. Authors: * Christopher Harrison <ch12@sanger.ac.uk> * Simon Beal <sb48@sanger.ac.uk> 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 v...
# coding=utf-8 __author__ = "Gina Häußge <osd@foosel.net>" __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html' import time import datetime import threading import copy import os #import logging, logging.config import octoprint.util.comm as comm import octoprint.util as util from ...
from __future__ import unicode_literals from tablib import Dataset from django.conf import settings from django.contrib import admin, messages from django.core.urlresolvers import reverse from django.http import HttpResponse from django.shortcuts import redirect, render from django.utils import timezone from django.u...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution, third party addon # Copyright (C) 2016- Vertel AB (<http://vertel.se>). # # This program is free software: you can redistribute it and/or modify # it under the terms of th...
import logging from decimal import Decimal from .ewsdatetime import EWSDateTime from .properties import EWSElement, ExtendedFieldURI from .util import create_element, add_xml_child, get_xml_attrs, get_xml_attr, set_xml_value, value_to_xml_text, \ xml_text_to_value, is_iterable, TNS log = logging.getLogger(__name_...
# Copyright (C) 2020-2021 The Software Heritage developers # See the AUTHORS file at the top-level directory of this distribution # License: GNU General Public License version 3, or any later version # See top-level LICENSE file for more information from collections import Counter from contextlib import contextmanager...
# 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 ...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html' __copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License" from flask_login im...
import pyrat import glob, os import logging import copy import numpy as np from PyQt5 import QtCore, QtWidgets # from pyrat.load import RatFile from pyrat.lib.ste import RatFile, Xml2Py from pyrat.viewer.Dialogs import FlexFilesel from pyrat.viewer.Widgets import HLine, CropBoxWidget, BoolWidget, FileselWidget, Produc...
from __future__ import unicode_literals from django.conf import settings, global_settings from django.contrib.auth.models import Group, AnonymousUser from django.core.exceptions import PermissionDenied from django.db.models.base import ModelBase from django.http import HttpRequest from django.http import HttpResponse f...
# 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 ...