src
stringlengths
721
1.04M
import dis import sys import unittest from io import StringIO import pytest from _pydevd_frame_eval.pydevd_modify_bytecode import insert_code from opcode import EXTENDED_ARG TRACE_MESSAGE = "Trace called" def tracing(): print(TRACE_MESSAGE) def call_tracing(): return tracing() def bar(a, b): return a...
from SimpleCV.base import * from SimpleCV.ImageClass import Image, ImageSet from ..Display.Base.DrawingLayer import DrawingLayer from SimpleCV.Features import FeatureExtractorBase """ This class is encapsulates almost everything needed to train, test, and deploy a multiclass support vector machine for an image classifi...
from toon.anim.interpolators import LERP, SELECT from toon.anim.interpolators import _test as _itest from toon.anim.easing import (LINEAR, STEP, SMOOTHSTEP, SMOOTHERSTEP, QUADRATIC_IN, QUADRATIC_OUT, QUADRATIC_IN_OUT, EXPONENTIAL_...
from ZODB.utils import u64 import unittest from .. import Object from .base import DBSetup class SearchTests(DBSetup, unittest.TestCase): def setUp(self): super(SearchTests, self).setUp() import newt.db self.db = newt.db.DB(self.dsn) self.conn = self.db.open() def tearDown(se...
"""Use the HTMLParser library to parse HTML files that aren't too bad.""" __all__ = [ 'HTMLParserTreeBuilder', ] from HTMLParser import ( HTMLParser, HTMLParseError, ) import sys import warnings # Starting in Python 3.2, the HTMLParser constructor takes a 'strict' # argument, which we'd like to s...
#!/usr/bin/env python import os import sys import time import pdb import json import socket import argparse import tornado.web import tornado.websocket import tornado.httpserver import tornado.ioloop from threading import Timer from heapq import merge from ossie.utils import redhawk from ossie.utils.redhawk.channels...
# -*- coding: utf-8 -*- # transformations.py # Copyright (c) 2006-2013, Christoph Gohlke # Copyright (c) 2006-2013, The Regents of the University of California # Produced at the Laboratory for Fluorescence Dynamics # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modifica...
"""Test the general daemon infrastructure, daemon base classes etc. """ import sys import StringIO from nose.tools import assert_raises from feedplatform.lib import base_daemon from feedplatform import addins from feedplatform import management class dummy_daemon(base_daemon): def __init__(self, output, *a, **kw...
#!/usr/bin/env python __author__ = 'Vladimir Iglovikov' ''' This script will do randomized search to find the best or almost the best parameters for this problem for sklearn package ''' # import xgboost as xgb import pandas as pd import numpy as np from xgboost import XGBRegressor from sklearn import cross_validatio...
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import getdate, nowdate, flt, cstr from frappe import msgprint, _ from erpnext.accounts.report.accounts_receivable.ac...
#! /usr/bin/env python # -*- coding: utf-8 -*- # S.D.G """AAM test for MUCT dataset :author: Ben Johnston :license: 3-Clause BSD """ # Imports import os import menpo.io as mio from aam import AAM from menpofit.aam import HolisticAAM, PatchAAM from sklearn.model_selection import train_test_split MUCT_DATA_FOLDER = ...
# # The OpenDiamond Platform for Interactive Search # # Copyright (c) 2011-2012 Carnegie Mellon University # All rights reserved. # # This software is distributed under the terms of the Eclipse Public # License, Version 1.0 which can be found in the file named LICENSE. # ANY USE, REPRODUCTION OR DISTRIBUTION OF T...
# -*- coding: utf-8 -*- from flask_restplus import fields from api_li3ds.app import api, Resource, defaultpayload from api_li3ds.database import Database nssensor = api.namespace('sensors', description='sensors related operations') sensor_model_post = nssensor.model( 'Sensor Model Post', { 'name': ...
# import re # COMMENT_PATERN = re.compile("([^\\\\])%.*($)", flags=re.MULTILINE) # REDACT = "%" # COMMENT_REPLACE = "\\1{}\\2".format(REDACT) # def strip_comments(document_contents): # return COMMENT_PATERN.sub(COMMENT_REPLACE, document_contents) import strip_comments def strip_latex_comments(document_contents): ...
# -*- coding: utf-8 -*- # # Copyright (C) 2014 by frePPLe bv # # This library is free software; you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # ...
#!/usr/bin/env python import paramiko import requests import sys import time import threading import os import logging from paramiko import SSHException from termcolor import colored logger = logging.getLogger('MasterSSH') logger.setLevel(logging.INFO) logging.basicConfig(format='[%(asctime)s] %(threadName)s: %(mess...
import re import io import shutil import os import typing import MySQLdb from source_map import SourceMap class FileUpdater: """read origin fie and update it inplace. we give it the content and target we want to replace """ def __init__(self, filename, source_map:SourceMap=None, gcs_host=None, commi...
import os from setuptools import setup, find_packages README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name = 'reguser', version = '0.0.2', packages = f...
''' Name: Dallas Fraser Date: 2016-04-12 Project: MLSB API Purpose: Holds data validators ''' import time import datetime from datetime import date from api.variables import BATS, FIELDS def boolean_validator(value): ''' boolean_validator a general function to validate boolean parameter Parame...
from PIL import Image, ImageTk, ImageDraw class Crop: """Object that contains the tools to manipulate a spritesheet""" def __init__(self, file="example.png", cropSize=[64,64], padding=0, offset=[0,0], direction="Both", numberCrops=0, useUserCrops=False): self.direction = direction self.offset = {"x" : offset[0]...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2015 Stephane Caron <stephane.caron@normalesup.org> # # This file is part of pymanoid. # # pymanoid 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 # Foundatio...
# # Copyright (C) 2007-2019 by frePPLe bv # # This library is free software; you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This library is d...
import os from subprocess import Popen, PIPE from setuptools import setup, find_packages, Extension bitap_extension = Extension( 'lhc.misc.bitap', ['lib/bitap/bitapmodule.cpp', 'lib/bitap/bitap.cpp'], include_dirs=['lib/bitap']) with open('README.rst', encoding='utf-8') if os.path.exists('README.rst') e...
import re from streamlink import NoStreamsError from streamlink.exceptions import PluginError from streamlink.plugin import Plugin from streamlink.plugin.api import StreamMapper, http, validate from streamlink.stream import HDSStream, HLSStream, RTMPStream from streamlink.utils import rtmpparse STREAM_API_URL = "http...
from sympy.core.basic import Basic, S, C from sympy.simplify import simplify from sympy.geometry.exceptions import GeometryError from entity import GeometryEntity from point import Point class LinearEntity(GeometryEntity): """ A linear entity (line, ray, segment, etc) in space. This is an abstract class a...
""" This file consists of operation related to gradient descent generally, would be referenced by model.py and implementations.py """ import numpy as np from data_utils import batch_iter from costs import compute_loss def compute_gradient(y, tx, w): """Compute the gradient.""" e = y - (tx).dot(w) N = le...
__author__ = 'Artur Barseghyan <artur.barseghyan@gmail.com>' __copyright__ = 'Copyright (c) 2013 Artur Barseghyan' __license__ = 'GPL 2.0/LGPL 2.1' __all__ = ('BaseReadRSSFeedPlugin',) from django.utils.translation import ugettext_lazy as _ from dash.base import BaseDashboardPlugin from dash.factory import plugin_fac...
"""empty message Revision ID: a726fff4ed59 Revises: 0022_add_pending_status Create Date: 2016-05-25 15:47:32.568097 """ # revision identifiers, used by Alembic. revision = '0022_add_pending_status' down_revision = '0021_add_delivered_failed_counts' from alembic import op import sqlalchemy as sa def upgrade(): ...
# -*- coding: utf-8 -*- ''' Manage Mac OSX local directory passwords and policies. Note that it is usually better to apply password policies through the creation of a configuration profile. Tech Notes: Usually when a password is changed by the system, there's a responsibility to check the hash list and generate hashe...
from bazydanych2.settingsshared import * DEBUG=True TEMPLATE_DEBUG=True STATIC_ROOT = '/tmp/staticfiles' LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'filters': { 'require_debug_false': { '()': 'django.utils.log.RequireDebugFalse' }, 'require_debug_tru...
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2016-2021 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Community module tests.""" import pytest from flask import url_for from invenio_a...
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: ai ts=4 sts=4 et sw=4 nu from __future__ import (unicode_literals, absolute_import, division, print_function) import logging import datetime from py3compat import implements_to_string from django.utils.translation import ugettext_lazy as _ f...
import os import json import stat import tempfile import pkg_resources from buck_tool import BuckTool, Resource SERVER = Resource("buck_server") BOOTSTRAPPER = Resource("bootstrapper_jar") class BuckPackage(BuckTool): def __init__(self, buck_project): super(BuckPackage, self).__init__(buck_project) ...
# -*- coding: utf-8 -*- """ /*************************************************************************** LCCS3_BasicCoder A QGIS plugin The plugin loads a LCCS3 legend, creates a form with all LCCS3 classes and allows the user to code selected polygons ---...
"""Provide methods for texturing the scene for rendering.""" import json import numpy as np import bpy # pylint: disable=import-error from . import helpers class Textures(): """Identify parts by name, organise into texturing groups and texture. Initialise with list of objects to be textured. Run: read ...
# Copyright (c) 2010-2014 OpenStack Foundation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
#!/usr/bin/python # coding: utf8 from __future__ import absolute_import from geocoder.arcgis import Arcgis from geocoder.location import Location class ArcgisReverse(Arcgis): """ ArcGIS REST API ======================= The World Geocoding Service finds addresses and places in all supported countries ...
from __future__ import absolute_import import collections import logging import time import weakref import itertools import numpy import re from mceditlib import cachefunc from mceditlib.block_copy import copyBlocksIter from mceditlib.blocktypes import BlockType from mceditlib.nbtattr import NBTListProxy from mceditl...
import os # ------------------------------------------------------------------------------ # def get_experiment_frames(experiments, datadir=None): """ read profiles for all sessions in the given 'experiments' dict. That dict is expected to be like this: { 'test 1' : [ [ 'rp.session.thinkie.merzky.01...
#!/usr/bin/python ''' DON'T TOUCH THESE FIRST LINES! ''' ''' ============================== ''' from PyoConnect import * myo = Myo(sys.argv[1] if len(sys.argv) >= 2 else None) ''' ============================== ''' ''' OK, edit below to make your own fancy script ^.^ ''' # Edit here: import time import os import tur...
from __future__ import print_function from unittest import TestCase from indexdigest.linters.linter_0092_select_star import check_select_star, is_wildcard_query from indexdigest.test import DatabaseTestMixin, read_queries_from_log class TestLinter(TestCase, DatabaseTestMixin): def test_is_wildcard_query(self):...
"""A table which holds the data of the report.""" __author__ = 'jt@javiertordable.com' __copyright__ = "Copyright (C) 2014 Javier Tordable" class Table(object): """A table which holds the data of the report. The table has a series of rows and columns, the columns have to be defined on construction and the row...
# -*- coding: utf-8 -*- #+---------------------------------------------------------------------------+ #| 01001110 01100101 01110100 01111010 01101111 01100010 | #| | #| Netzob : Inferring communication protocol...
import sqlalchemy.types import sqlalchemy.schema import sqlalchemy.orm import rod.model class Lesson(rod.model.db.Model, rod.model.PersistentMixin): __tablename__ = 'lesson' id = sqlalchemy.schema.Column(sqlalchemy.types.Integer, primary_key=True) time = sqlalchemy.schema.Column(sqlalchemy.types.DateTim...
from PyQt5 import QtWidgets from PyQt5.QtCore import QCoreApplication from matplotlib.backends.backend_qt5agg import (FigureCanvasQTAgg as FigureCanvas) from matplotlib.backends.backend_qt5agg import (NavigationToolbar2QT as ...
# Copyright (C) 2019 ABRT Team # Copyright (C) 2019 Red Hat, Inc. # # This file is part of faf. # # faf 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) ...
# -*- coding: iso-8859-1 -*- #Arquivo contendo as funcoes e respectivas transacoes matrizConflitos = "matrizConflitosLibbs.csv" #matrizConflitos = "matrizConflitos.csv" #matrizConflitos = "matrizConflitosInternet.csv" #matrizConflitos = "matrizConflitosInternet2.csv" transacoes = "transacoes.csv" #Listas e dicionario...
#!/usr/bin/env python import codecs import os import sys import glob from setuptools import setup, find_packages try: # http://stackoverflow.com/questions/21698004/python-behave-integration-in-setuptools-setup-py from setuptools_behave import behave_test except ImportError: behave_test = None dirname = o...
# -*- coding: utf-8 -*- # # Copyright (c) 2015, Alcatel-Lucent Inc, 2017 Nokia # 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 copyrigh...
# 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 u...
from __future__ import absolute_import import ctypes, win32api, win32gui, win32con, pywintypes, win32process, sys, inspect, traceback from . import win32functions from . import win32defines from . import win32structures from . import sysinfo class AccessDenied(RuntimeError): "Raised when we cannot allocate memor...
# -*-coding:Utf-8 -* # Copyright (c) 2010 DAVY Guillaume # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # list...
# -*- coding: utf-8 -*- # # Copyright (c) 2012-2018, CRS4 # # 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, modify...
#!/usr/bin/env python import os import shutil import sys from setuptools import setup, find_packages version = "0.1.0a" def write_version_py(): version_py = os.path.join(os.path.dirname(__file__), "bcbiovm", "version.py") try: import subprocess p = subprocess.Pop...
#!/usr/bin/env python # Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from __future__ import absolute_import from __future__ import division from __future__ import print_fu...
# -*- coding: utf-8 -*- # Scrapy settings for crawler_cinephilia project # # For simplicity, this file contains only settings considered important or # commonly used. You can find more settings consulting the documentation: # # http://doc.scrapy.org/en/latest/topics/settings.html # http://scrapy.readthedocs.or...
#!/usr/bin/python3 ''' Version: 1.0.02 Author: ayy1337 Licence: GNU GPL v3.0 ''' import sys import time import os import datetime import urllib.request import collections from operator import attrgetter from operator import itemgetter import shelve from trexapi import Bittrex condperc = .0...
#!/usr/bin/env python # =============================== NG-Omics-WF ================================== # _ _ _____ ____ _ __ ________ # | \ | |/ ____| / __ \ (_) \ \ / / ____| # | \| | | __ ______| | | |_ __ ___ _ ___ ___ _____\ \ /\...
import datetime from factory import Factory, lazy_attribute_sequence, lazy_attribute from factory.containers import CyclicDefinitionError from uuid import uuid4 from pytz import UTC from xmodule.modulestore import Location from xmodule.x_module import XModuleDescriptor class Dummy(object): pass class XModuleF...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2017 Anmol Gulati <anmol01gulati@gmail.com> # Copyright (C) 2017 Radim Rehurek <radimrehurek@seznam.cz> """ Python wrapper around word representation learning from Varembed models, a library for efficient learning of word representations and sentence class...
# 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 agreed to in writing...
# Copyright 2013 - 2017 Mirantis, 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 ...
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## ...
"""This module handles anything related to the item tracker's state""" import logging import json from game_objects.item import Item, ItemInfo from game_objects.floor import Floor from game_objects.serializable import Serializable class TrackerState(Serializable): """This class represents a tracker state, and han...
import matplotlib as mpl from Scripts.KyrgysHAPH.Util import loadI from Scripts.KyrgysHAPH.Util import methods, POPS mpl.use('TkAgg') import numpy as np; np.set_printoptions(linewidth=200, precision=5, suppress=True) import pandas as pd; pd.options.display.max_rows = 20; pd.options.display.expand_frame_repr = False...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'example12.ui' # # Created: Sun Jan 18 18:25:33 2015 # by: PyQt4 UI code generator 4.9.1 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except Attri...
def checkio(text): text = text.lower() text = [letter for letter in text if letter.isalpha()] d = dict.fromkeys(text, 0) for char in text: d[char] += 1 value = 0 for item in d.items(): if item[1] > value: value = item[1] lesser_keys = [] for item in d.items():...
""" .. See the NOTICE file distributed with this work for additional information regarding copyright ownership. 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....
from functools import partial import json from kivy import Config from kivy.animation import Animation from kivy.clock import Clock from kivy.uix.label import Label from kivy.uix.screenmanager import Screen from kivy.uix.widget import Widget import mopidy import os from threading import Thread import sys from ws4py.cli...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from itertools import product def get_api(): # pragma: no cover import sphinxapi return sphinxapi def get_servers(): from sphinxsearch import SearchServer class MyServer(SearchServer): listen = 'localhost:6543' max_ch...
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
""" Exposes regular shell commands as services. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/shell_command/ """ import asyncio import logging import shlex import voluptuous as vol from homeassistant.exceptions import TemplateError from homeassistant....
# -*- coding: utf8 -*- __author__ = 'shin' import jieba timelist_answer=[] timelist_answer.append('明天') timelist_answer.append('明天') timelist_answer.append('明天') timelist_answer.append('明天') timelist_answer.append('明天') timelist_answer.append('明天') timelist_answer.append('明天。') timelist_answer.append('明天。') timelist...
from nose.plugins.attrib import attr from test.integration.base import DBTIntegrationTest class TestSimpleDependency(DBTIntegrationTest): def setUp(self): DBTIntegrationTest.setUp(self) self.run_sql_file("test/integration/006_simple_dependency_test/seed.sql") @property def schema(self): ...
import os ICON_DATABASE_FOLDER = "../icon-database" def check_for_context_problems(themes): print "Checking the following themes for icons in multiple contexts:" print ", ".join(themes) print Icons = {} for theme in themes: with open(os.path.join(ICON_DATABASE_FOLDER, theme + ".txt")...
# command: python3 download_yt.py <uploads_playlistid> # example: python3 download_yt.py UUcD1pbEB9HNFIVwJih_ZWAA import json import urllib.request import requests import subprocess import os import re import argparse parser = argparse.ArgumentParser() parser.add_argument('channel') args = parser.parse_args() strea...
import logging import claripy from ..storage.memory import SimMemory from ..errors import SimFastMemoryError l = logging.getLogger("angr.state_plugins.fast_memory") l.setLevel(logging.DEBUG) class SimFastMemory(SimMemory): def __init__(self, memory_backer=None, memory_id=None, endness=None, contents=None, width...
# -*- coding: UTF-8 -*- import types import inspect import traceback class _MyAttributeError(Exception): pass def convert_attribute_error(f): def f_(*args, **kwargs): try: return f(*args, **kwargs) except AttributeError, e: print "~" * 78 traceback.print...
# -*- coding: utf-8 -*- # # Copyright 2015-2020 BigML # # 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 ...
import platform from threading import Timer from PyQt5 import QtCore from PyQt5.QtCore import QObject, pyqtSignal from PyQt5.QtWidgets import QHBoxLayout, QVBoxLayout, QTextEdit, QLabel, QSizePolicy, QLineEdit, QApplication, QWidget import sys from NoneGUIComponents import keypress_observer from NoneGUIComponents.dic...
"""View module.""" from .models import ( Account, User, Topic, Event, Space, Vote, Tag, Media, Stat ) from .serializers import ( AccountSerializer, UserSerializer, TopicSerializer, MediaSerializer, EventSerializer, VoteSerializer, TagSerializer, SpaceSerializer, StatSerializer ) from .permissions i...
######### # Copyright (c) 2015 GigaSpaces Technologies Ltd. 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...
#!/usr/bin/env python # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Prints information from master_site_config.py The sole purpose of this program it to keep the crap inside build/ while we're moving...
from django.contrib.contenttypes.models import ContentType from django.db.models import Q from autocomplete_light.generic import GenericModelChoiceField from .model import AutocompleteModel __all__ = ['AutocompleteGeneric'] class AutocompleteGeneric(AutocompleteModel): """ Autocomplete which considers choi...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Screen' db.create_table(u'synch_screen', ( (u'id', self.gf('django.db.models.fie...
import subprocess import common cex = """$D<MOL> /_P<molecule> /_V<Molecule> /_S<1M> /_L<XSMILES> /_X<Molecule represented in XSMILES (Exchange SMILES)> | $MOL<%s> | """ def isAromaticSmiles(smi): N = len(smi) for i in range(N): x = smi[i] if x == ":": return True ...
import base from hiicart.gateway.paypal_express.gateway import PaypalExpressCheckoutGateway STORE_SETTINGS = { 'API_USERNAME': 'sdk-three_api1.sdk.com', 'API_PASSWORD': 'QFZCWN5HZM8VBG7Q', 'API_SIGNATURE': 'A-IzJhZZjhg29XQ2qnhapuwxIDzyAZQ92FRP5dqBzVesOkzbdUONzmOU', 'RETURN_URL': 'http:/...
# UrbanFootprint v1.5 # Copyright (C) 2017 Calthorpe Analytics # # This file is part of UrbanFootprint version 1.5 # # UrbanFootprint is distributed under the terms of the GNU General # Public License version 3, as published by the Free Software Foundation. This # code is distributed WITHOUT ANY WARRANTY, without impl...
#!/usr/bin/env python # encoding=utf8 import json import requests,math from flexbe_core import EventState, Logger from sara_msgs.msg import Entity, Entities """ Created on 05/07/2019 @author: Huynh-Anh Le """ class ClosestObject(EventState): ''' Read the position of a room in a json string ># object ...
import itertools def solution(bunnies,keys_required): answer = [] for i in range(bunnies): answer.append([]) # if keys_required > bunnies: # return None if keys_required == 0: return [[0]] elif keys_required == 1: key = 0 for group in range(bunnies): ...
""" Manages loading of all types of Rez plugins. """ from rez.config import config, expand_system_vars, _load_config_from_filepaths from rez.utils.formatting import columnise from rez.utils.schema import dict_to_schema from rez.utils.data_utils import LazySingleton, cached_property, deep_update from rez.utils.logging_ ...
#!/usr/bin/env python # -*- encoding: utf-8 -*- from __future__ import (absolute_import, print_function) import io import os import re from glob import glob from os.path import (basename, dirname, join, relpath, splitext) from setuptools import (Extension, find_packages, setup) from setuptools.command.build_ext imp...
# ext/compiler.py # Copyright (C) 2005-2014 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 """Provides an API for creation of custom ClauseElements and compilers. Synopsis ====...
''' All data migrate operations for test. @author: Legion ''' import apibinding.api_actions as api_actions import zstackwoodpecker.test_util as test_util import account_operations import apibinding.inventory as inventory def ps_migrage_vm(dst_ps_uuid, vm_uuid, session_uuid=None, withDataVolumes=False, withSnapshots...
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2015, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
#!/usr/bin/python #-*-coding:utf-8 -*- """ It is used to get the detail and total number weekly job. By default,the target date is cur day.of course,you can set the date by you. Usage: job = SeridJob() detailjobs = job.get_week_job() total= job.total """ import cPickle from datetime import date,timedelta...
# -*- coding: utf-8 -*- ''' Get the features data from DB, de-pickle data and store it into array-on-disk. ''' # MIT License # # Copyright (c) 2017 Moritz Lode # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'C:/Users/Zeke/Google Drive/dev/python/zeex/zeex/core/ui/basic/push_grid.ui' # # Created: Mon Nov 13 22:57:17 2017 # by: pyside-uic 0.2.15 running on PySide 1.2.2 # # WARNING! All changes made in this file will be lost! from PySide impo...
# Copyright 2012-2015 MongoDB, 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 writin...
# -*- coding: utf-8 -*- ''' Iteractio diagram computation. Home made test. Reads the interaction diagram obtained in test_interaction_diagram01. ''' from __future__ import division import xc_base import geom import xc from materials.ehe import EHE_materials __author__= "Luis C. Pérez Tato (LCPT)" __copyright__= "Cop...