text
stringlengths
12
6.59M
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015-2018 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. """Version information for Invenio-REST. This file is imported by ``invenio_rest.__i...
#!/usr/bin/env python3 # Copyright (c) 2015 - 2021, Intel Corporation # # 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, thi...
#!/usr/bin/env python3 # local from importer import * import csp import cov_obs import figures_tools from spectrophot import (lumspec2lsun, color, C_ML_conv_t as CML, Spec2Phot, absmag_sun_band as Msun) import utils as ut from fakedata import FakeData, SkyContamination from linalg import * fro...
#!/usr/bin/env python2 """Find most interesting ROI's in a DWI image.""" import os.path import sys import argparse import numpy as np from dwi import asciifile from dwi import fit from dwi import util def parse_args(): """Parse command-line arguments.""" p = argparse.ArgumentParser(description = __doc__) ...
# -*- coding: utf-8 -*- import regex import phonenumbers def all_caps_text(s, site): s = regex.sub("<[^>]*>", "", s) # remove HTML tags s = regex.sub("&\w+;", "", s) # remove HTML entities if len(s) <= 150 and regex.compile(ur"SQL|\b(ERROR|PHP|QUERY|ANDROID|CASE|SELECT|HAVING|COUNT|GROUP|ORDER BY|IN...
# -*- coding: utf-8 -*- import regex import phonenumbers def all_caps_text(s, site): s = regex.sub("<[^>]*>", "", s) # remove HTML tags s = regex.sub("&\w+;", "", s) # remove HTML entities if len(s) <= 150 and regex.compile(ur"SQL|\b(ERROR|PHP|QUERY|ANDROID|CASE|SELECT|HAVING|COUNT|GROUP|ORDER BY|IN...
# -*- coding: utf-8 -*- # noinspection PyCompatibility import math import regex from difflib import SequenceMatcher from urllib.parse import urlparse, unquote_plus from itertools import chain from collections import Counter from datetime import datetime import os.path as path # noinspection PyPackageRequirements impo...
# -*- coding: utf-8 -*- # noinspection PyCompatibility import regex from difflib import SequenceMatcher from urllib.parse import urlparse from itertools import chain from collections import Counter from datetime import datetime import os.path as path # noinspection PyPackageRequirements import tld # noinspection PyPa...
# -*- coding: utf-8 -*- import regex import phonenumbers from bs4 import BeautifulSoup def has_repeated_words(s, site): words = regex.split(r"[\s.,:;!/\()\[\]+_-]", s) words = [w for w in words if w != ""] curr = 0 prev = "" for w in words: if w == prev and w.isalpha() and len(w) > 1: ...
# -*- coding: utf-8 -*- # noinspection PyCompatibility import regex from difflib import SequenceMatcher from urllib.parse import urlparse from itertools import chain from collections import Counter from datetime import datetime import os.path as path # noinspection PyPackageRequirements import tld # noinspection PyPa...
# -*- coding: utf-8 -*- # noinspection PyCompatibility import sys import math import regex from difflib import SequenceMatcher from urllib.parse import urlparse, unquote_plus from itertools import chain from collections import Counter from datetime import datetime import time import os import os.path as path # noinsp...
# -*- coding: utf-8 -*- import regex import phonenumbers from bs4 import BeautifulSoup def has_repeated_words(s, site): words = regex.split(r"[\s.,:;!/\()\[\]+_-]", s) words = [w for w in words if w != ""] curr = 0 prev = "" for w in words: if w == prev and w.isalpha() and len(w) > 1: ...
"""An "actor" on the network, whether remote or local""" # Copyright (C) 2007, Red Hat, Inc. # Copyright (C) 2007, Collabora Ltd. # # 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...
# -*- coding: utf-8 -*- import regex import phonenumbers class FindSpam: bad_keywords = ["baba ?ji", "fifa.*coins?", "fifabay", "Long Path Tool", "fifaodell", "brianfo", "tosterone", "bajotz", "vashi?k[ae]r[ae]n", "kolcak" "porn", "molvi", "judi bola", ...
# -*- coding: utf-8 -*- import regex import phonenumbers def all_caps_text(s, site): s = regex.sub("<[^>]*>", "", s) # remove HTML tags from posts if len(s) <= 150 and regex.compile(ur"SQL|\b(ERROR|PHP|QUERY|ANDROID|CASE|SELECT|HAVING|COUNT|GROUP|ORDER BY|INNER|OUTER)\b").search(s): return False, ""...
"""Basic http server for tests to simulate PyPI or custom indexes """ import urllib2 import sys import time import threading import BaseHTTPServer from BaseHTTPServer import HTTPServer from SimpleHTTPServer import SimpleHTTPRequestHandler class IndexServer(HTTPServer): """Basic single-threaded http server simulati...
# -*- coding: utf-8 -*- # noinspection PyCompatibility import sys import math import regex from difflib import SequenceMatcher/watched ns from urllib.parse import urlparse, unquote_plus from itertools import chain from collections import Counter from datetime import datetime import time import os import os.path as pat...
# XMLRPC-specific code for SFA Client import xmlrpclib from sfa.util.sfalogging import sfa_logger ## # ServerException, ExceptionUnmarshaller # # Used to convert server exception strings back to an exception. # from usenet, Raghuram Devarakonda class ServerException(Exception): pass class ExceptionUnmarshal...
# -*- coding: utf-8 -*- import regex import phonenumbers def all_caps_text(s, site): s = regex.sub("<[^>]*>", "", s) # remove HTML tags s = regex.sub("&\w+;", "", s) # remove HTML entities if len(s) <= 150 and regex.compile(ur"SQL|\b(ERROR|PHP|QUERY|ANDROID|CASE|SELECT|HAVING|COUNT|GROUP|ORDER BY|IN...
# -*- coding: utf-8 -*- import regex import phonenumbers def has_repeated_words(s, site): words = regex.split(r"[\s.,;!/\()\[\]+_-]", s) words = [word for word in words if word != ""] streak = 0 prev = "" for word in words: if word == prev and word.isalpha() and len(word) > 1: ...
import numpy as np import scipy as sp import warnings from tqdm.autonotebook import tqdm from ._explainer import Explainer from ..utils import safe_isinstance from .. import maskers from .. import links class Linear(Explainer): """ Computes SHAP values for a linear model, optionally accounting for inter-feature c...
# -*- coding: utf-8 -*- import regex import phonenumbers from bs4 import BeautifulSoup def all_caps_title(s, site): if regex.compile(ur"SQL|\b(ERROR|PHP|QUERY|ANDROID|CASE|SELECT|HAVING|COUNT)\b").search(s): return False # common words in non-spam all-caps titles return bool(regex.compile(ur"^(?=.*\...
''' Thermodynamic Library ''' from __future__ import division import numpy as np import numpy.ma as ma from sharppy.sharptab.constants import * __all__ = ['drylift', 'thalvl', 'lcltemp', 'theta', 'wobf'] __all__ = ['satlift', 'wetlift', 'lifted'] __all__ += ['ftoc', 'ctof', 'ctok', 'ktoc', 'ftok', 'ktof'] def drylif...
# -*- coding: utf-8 -*- # Copyright (c) 2013-2015, Sebastian Linke # Released under the Simplified BSD license # (see LICENSE file for details). """ Detect terminal width on different platforms. """ import ctypes import os from .. import config __all__ = ['get_terminal_width'] if hasattr(os, 'get_terminal_size'):...
# adapted from firebase/EventSource-Examples/python/chat.py by Shariq Hashme from sseclient import SSEClient import requests from Queue import Queue import json import threading import socket class ClosableSSEClient(SSEClient): def __init__(self, *args, **kwargs): self.should_connect = True super...
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2009-2014: # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # Gregory Starck, g.starck@gmail.com # Hartmut Goebel, h.goebel@goebel-consult.de # # This file is part of Shinken. # # Shinken is free software: you can redis...
# /usr/bin/env python # # downloads mapping from KO to KEGG pathways, modules # # usage: 8 # download_and_parse_kegg_orthologies.py idmapping.dat dbpath genepath ko2pathwayfilepath output.txt # # note: if idmapping.dat file does not exist, will download import os import sys import gzip from collections import default...
#!/usr/bin/env python3 import argparse import os.path import os import logging logging.basicConfig(level=logging.WARNING, format="%(msg)s") LOG = logging.getLogger('logger') def rename(src, dst, args): if args.nop: print('not renaming', os.path.basename(src), os.path.basename(dst)) else: pri...
from twisted.trial import unittest from shtoom.audio.converters import Codecker, _Codec, MediaLayer, DougConverter from shtoom.audio.converters import MulawCodec, NullCodec, PassthruCodec from shtoom.rtp.formats import PT_PCMU, PT_RAW, PT_CN, PT_QCELP, PT_GSM, PT_SPEEX from shtoom.rtp.packets import RTPPacket from s...
from django.conf.urls import url from simplemooc.courses import views urlpatterns = [ url(r'^$', views.index, name='index'), url( r'^cursos/trb/$', views.list_courses_trb, name='list_courses_trb' ), url( r'^cursos/normal/$', views.list_courses_normal, na...
#!/usr/bin/python import json import matplotlib.pyplot as plt import sys, getopt import copy def get_data(file_list, type): mapped_reqs = [] running_reqs = [] refused_reqs = [] mapped_requests_dict = dict() mapped_requests_dict["request_list"] = [] mapped_requests_dict["name"] = "" runnin...
# -*- coding: utf-8 -*- from flask import render_template, request, redirect, \ url_for, flash, session, abort, current_app, jsonify from flask.blueprints import Blueprint from flask.ext.babel import gettext from flask.ext.login import current_user, login_user, logout_user, \ login_required from sqlalchemy.ex...
""" Sile object for reading/writing SIESTA binary files """ from __future__ import print_function import numpy as np try: import _siesta found_module = True except: found_module = False # Import sile objects from .sile import SileBinSiesta from ..sile import * # Import the geometry object from sisl impo...
"""Gaussian process force fields.""" import math import pickle import json import numpy as np from typing import List, Callable from scipy.linalg import solve_triangular from scipy.optimize import minimize from flare.env import AtomicEnvironment from flare.struc import Structure from flare.gp_algebra im...
#!/usr/bin/env python3 import subprocess import os import sys COMMANDS = {'venv': 'virtualenv --no-site-packages venv'} FLASK_DIRECTORIES = ['app/static', 'app/templates'] FLASK_FILES = { 'run.py': '#!/usr/bin/env python\nfrom app import app\n\napp.run(debug=True)', 'app/__init__.py': '''from flask im...
"""Copyright 2011 Herman Sheremetyev. 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 the f...
# coding: utf-8 import re import os import json import threading import traceback import urllib.error from urllib.parse import urlparse import sublime_plugin import sublime from .floo import api from .floo import AgentConnection from .floo.listener import Listener from .floo import msg from .floo import shared as G f...
# coding: utf-8 import Queue import threading import socket import os import select import json import collections import os.path import hashlib import traceback from datetime import datetime import sublime import sublime_plugin import dmp_monkey dmp_monkey.monkey_patch() from lib import diff_match_patch as dmp __VER...
# coding: utf-8 try: unicode() except NameError: unicode = str import sys import os import re import hashlib import imp import json import uuid import binascii import subprocess import traceback import webbrowser import threading from collections import defaultdict import sublime_plugin import sublime PY2 = ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ A raucous ripoff of Flood-It! 2, a game I like to play on my iPhone. """ from termcolor import colored import os import pprint import random BOARD_WIDTH = 12 BOARD_HEIGHT = 12 N_TURNS = 22 class Color(object): COLORS = ( 'r', 'c', 'm',...
# -*- coding: utf-8 -*- """ A Trait Documenter (Subclassed from the autodoc ClassLevelDocumenter) :copyright: Copyright 2012 by Enthought, Inc """ import traceback import sys import collections import inspect import tokenize import token import StringIO from sphinx.ext.autodoc import ClassLevelDocumenter...
#!/usr/bin/env python # Copyright (c) 2010 John McFarland # This program is licensed under the MIT license. See LICENSE.txt # Author: John McFarland # This program will parse a selected set of Fortran source files and # write C++ code to wrap the Fortran derived types in C++ classes # Run fortwrap.py -h for usage...
#!/usr/bin/python3 """ created_by: Ebube Chuba created_date: 3/4/2015 last_modified_by: Ebube Chuba last_modified date: 3/4/2015 """ # imports import json from sql.user import User from sql.question import Question # TODO: Session things (and IP address) - EC # Wait for Micah to finish objects...
#!/usr/bin/env python import os import sympy from MBE.xyz_operations import read_fragment_xyz class Fragment(object): """ A fragment is a molecule that can be combined with another fragment. """ def __init__(self): self.fxyz = "" self.name = "" self.comment = "" s...
'''Base class for client code. Task-specific client classes should derive from :class:`CborRpcClient`. .. This software is released under an MIT/X11 open source license. Copyright 2012-2014 Diffeo, Inc. .. autoclass:: CborRpcClient ''' from __future__ import absolute_import import logging import random import so...
""" fs.zipfs ======== A FS object that represents the contents of a Zip file """ import datetime import os.path from fs.base import * from fs.path import * from fs.errors import * from fs.filelike import StringIO from zipfile import ZipFile, ZIP_DEFLATED, ZIP_STORED, BadZipfile, LargeZipFile from memoryfs import M...
""" A simple command-line utility for fixing text found in a file. Because files do not come with their encoding marked, it first runs the file through `ftfy.guess_bytes`, then runs it through `ftfy.fix_text`. """ from ftfy import fix_file, __version__ import sys ENCODE_STDIO = (sys.hexversion < 0x03000000) ENCODE_...
from galpy.df_src import diskdf from galpy.df_src import surfaceSigmaProfile from galpy.df_src import evolveddiskdf from galpy.df_src import quasiisothermaldf from galpy.df_src import streamdf from galpy.df_src import streamgapdf # # Functions # impulse_deltav_plummer= streamgapdf.impulse_deltav_plummer impulse_deltav_...
import sys import re import json import pickle import netrc import logging import requests from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC __all__ = ['Session', 'get_sess...
# encoding: utf-8 from __future__ import unicode_literals from hashlib import md5, sha256 from hmac import new as hmac from binascii import unhexlify from os import getpid from socket import gethostname from time import time from random import randint from threading import RLock try: from hmac import compare_digest...
import multiprocessing import logging import signal import socket import time import sys import os import datetime from dateutil import tz import copy from cloudscheduler.lib.attribute_mapper import map_attributes from cloudscheduler.lib.db_config import Config from cloudscheduler.lib.ProcessMonitor import ProcessMoni...
""" Filename: calc_climate_index.py Author: Damien Irving, d.irving@student.unimelb.edu.au Description: Calculates the selected climate index """ # Import general Python modules import sys, os import argparse import numpy from cdo import * cdo = Cdo() import pdb import cdms2, cdutil # Import my modules ...
r""" 23andMe genotyping data extraction. Copyright (C) 2014 PersonalGenomes.org This software is shared under the "MIT License" license (aka "Expat License"), see LICENSE.TXT for full license text. May be used on the command line. For example, the following command: python -m data_retrieval.twentythree_and_me <...
import calendar import logging import os import requests import smart_open import sqlalchemy as sa import threading from collections import namedtuple from datetime import datetime from dateutil.relativedelta import relativedelta from flask import g, request from shutil import copyfile from sqlalchemy import func, and...
import os import requests from csv import reader from flask import session, request from datetime import datetime from werkzeug import secure_filename from uuid import uuid4 from sqlalchemy.orm import joinedload from dataactcore.aws.s3UrlHandler import s3UrlHandler from dataactcore.utils.requestDictionary import Reques...
# -*- coding: utf-8 -*- import logging from datetime import datetime from time import sleep from drivers.errors import ReplicationNotRunningError from logical.models import Database from util import build_context_script, exec_remote_command_host, check_ssh from workflow.steps.mongodb.util import build_change_oplogsize_...
# -*- coding: utf-8 -*- import logging from datetime import datetime from time import sleep from drivers.errors import ReplicationNotRunningError from logical.models import Database from util import build_context_script from workflow.steps.mongodb.util import build_change_oplogsize_script from workflow.steps.util.base ...
import logging from arteria.web.handlers import BaseRestHandler from delivery.handlers import * from delivery.exceptions import ProjectNotFoundException log = logging.getLogger(__name__) class BaseStagingHandler(BaseRestHandler): def _construct_status_endpoint(self, status_id): status_end_point = "{...
#!/usr/bin/env python ''' Copyright 2011, 2015, 2016, 2017 (c) Timothy Savannah under LGPLv2.1, All Rights Reserved. If a LICENSE file was not included in this distribution, the license can be found at https://github.com/kata198/GoodTests/blob/master/LICENSE ''' # vim: set ts=4 sw=4 st=4 expa...
#!/usr/bin/env python # # Program for automatically downloading and removing files that are # successfully downloaded from put.io. # import collections import json import datetime import logging import progressbar from putiosync import multipart_downloader from putiosync.dbmodel import DBModelBase, DownloadRecord impor...
import glob import os import textwrap # import platform from cffi import FFI include_dirs = [os.path.join('..', 'src'), os.path.join('..', 'include')] rmath_src = glob.glob(os.path.join('..', 'src', '*.c')) # Take out dSFMT dependant files; Just use the basic rng rmath_src = [f for f in rmath_src if...
""" desisim.bal =========== Functions and methods for inserting BALs into QSO spectra. """ from __future__ import division, print_function import numpy as np class BAL(object): """Base class for inserting BALs into (input) QSO spectra.""" def __init__(self): """Read and cache the BAL template set. ...
# vi: ts=4 expandtab syntax=python ############################################################################## # Copyright (c) 2008 IBM Corporation # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 # which accompanies this distr...
# Copyright (C) 2014 Marc Herndon # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License, # version 2, as published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; wi...
# Copyright (C) 2014 Marc Herndon # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License, # version 2, as published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; wi...
# Copyright (C) 2014 Marc Herndon # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License, # version 2, as published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; wi...
# -*- encoding: utf8 -*- # # Copyright (c) 2007 The PyAMF Project. All rights reserved. # # Nick Joyce # # 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 # wit...
import math import networkx as nx import numpy as np from networkx.algorithms.dag import topological_sort, is_directed_acyclic_graph from pybbn.lg.gaussian import dnorm, dcmvnorm from pybbn.lg.inference import MvnInference from collections import namedtuple from joblib import Parallel, delayed WORK_UNIT = namedtuple...
#! /usr/bin/env python import argparse from functools import wraps import importlib import inspect import logging import os import re import socket from pybot.constants import * logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) console = logging.StreamHandler() console.setLevel(logging.DEBUG) format...
"""This module is making use of the `OPUS API <http://pds-rings-tools.seti.org/opus/api/>`_ to create web requests for OPUS data, metadata, and preview images. """ from __future__ import division, print_function from pathlib import Path import pandas as pd import requests from IPython.display import HTML, display fr...
''' Parse command line options ''' import optparse def parse(): ''' Parse options for a server ''' parser = optparse.OptionParser() parser.add_option( '--server-ip', dest='server_ip', default='127.0.0.1', help='the server ip') parser.add_option(...
import re from decimal import Decimal from typing import Optional, Pattern, Type, Union from uuid import UUID from . import errors from .utils import change_exception, import_string, make_dsn, validate_email from .validators import (anystr_length_validator, anystr_strip_whitespace, decimal_validator, float_validator, ...
"""Objects """ from __future__ import absolute_import import copy from .arrays import flatten from .utilities import identity from .utils import iter_, iter_callback from ._compat import ( iteritems, itervalues, iterkeys, integer_types, string_types, ) def assign(obj, *sources, **kargs): ""...
"""Objects """ from __future__ import absolute_import import copy from .arrays import flatten from .utilities import identity from .utils import iterate, iter_callback, get_item, set_item from ._compat import ( iteritems, itervalues, iterkeys, integer_types, string_types, ) def assign(obj, *sou...
"""String functions. .. versionadded:: 1.1.0 """ from functools import partial import re import pydash as pyd from ._compat import ( html_unescape, iteritems, parse_qsl, PY26, urlencode, urlsplit, urlunsplit ) __all__ = [ 'camel_case', 'capitalize', 'deburr', 'ends_with'...
import setup_py import requirements_txt import re import sys def raw_requirements(rootdir): rawreqs, err = _raw_reqs(rootdir) if err is not None: return None, err return [req_dict(req, None) for req in rawreqs], None def resolved_requirements(rootdir): rawreqs, err = _raw_reqs(rootdir) if ...
"""Core pydoctor objects. The two core objects are L{Documentable} and L{System}. Instances of (subclasses of) L{Documentable} represent the documentable 'things' in the system being documented. An instance of L{System} represents the whole system being documented -- a System is a bad of Documentables, in some sense...
# -*- coding: utf-8 -*- """Define project metadata """ __title__ = 'pyfcm' __summary__ = 'Python client for FCM - Firebase Cloud Messaging (Android & iOS)..' __url__ = 'https://github.com/olucurious/pyfcm' __version__ = '1.0.3' __install_requires__ = ['requests'] __author__ = 'Emmanuel Adegbite' __email__ = 'olucur...
__all__ = ["affine_trans", "ffd_parameters", "file_handler", "free_form"]
#!/usr/bin/env python '''Cached information about version and extensions of current GL implementation. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import warnings # We have to wait until a context is created (with a window) until any # information is available. _have_context = False # The informa...
# -*- coding: utf-8 -*- """ pygments.lexer ~~~~~~~~~~~~~~ Base lexer classes. :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re try: set except NameError: from sets import Set as set from pygments.filter import apply_...
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4i encoding=utf-8 from gsmmodem import GsmModem __doc__ = GsmModem.__doc__ def get_version(): try: # do we have a static version set from an install? from __version__ import VERSION as version except ImportError: # if not, can we figure...
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 import re, datetime, time import errors, message # arch: pacman -S python-pyserial # debian: apt-get install pyserial import serial class GsmModem(object): """pyGSM is a Python module which uses pySerial to provide a nifty interface to send and receive ...
"""Python Utilities developed for/by Iowa Environmental Mesonet Python is an important part of the Iowa Environmental Mesonet (IEM). This package is used by many parts of the IEM codebase and hopefully somewhat useful to others!?!? """ __version__ = '0.6.1'
# -*- coding: utf-8 -*- """Wrapper for setuptools.setup to simplify creating of `setup.py` files. Python `setup.py` files should be short for well-structured projects. `b_setup.setup` assumes there are directories such as `tests`, `docs`, `bin`, etc. PyKern Projects use `py.test` so the appropriate `PyTest` class is p...
# # Copyright (c) SAS Institute 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...
# copyright Chad Dombrova chadd@luma-pictures.com # created at luma pictures www.luma-pictures.com """ ******************************* PyMEL ******************************* PyMEL makes python scripting in Maya work the way it should. Maya's command module is a direct translation of MEL commands into p...
# copyright Chad Dombrova chadd@luma-pictures.com # created at luma pictures www.luma-pictures.com """ ******************************* PyMEL ******************************* PyMEL makes python scripting in Maya work the way it should. Maya's command module is a direct translation of MEL commands into p...
import math import logging from pymoku import ValueOutOfRangeException from ._instrument import * from ._instrument import _usgn, _sgn from . import _frame_instrument log = logging.getLogger(__name__) REG_SG_WAVEFORMS = 96 REG_SG_MODSOURCE = 123 REG_SG_PRECLIP = 124 REG_SG_FREQ1_L = 97 REG_SG_FREQ1_H = 105 REG...
from _pymue import peng, Team, DistanceMatrix, SeenTable, GuestTupleGenerator, GuestPair def pair_pprint(pair): return "(%s, %s)" % (pair.first, pair.second) GuestPair.__repr__ = pair_pprint
#!/usr/bin/env python """Provide a top level interface for master worker computing. """ __author__ = "Eric Heien <e-heien@ist.osaka-u.ac.jp>" __date__ = "10 April 2008" import threading import cPickle import time import os import sys import types import atexit import errno import logging import inspect import signal ...
from time import time from datetime import timedelta from . import api from . import models class Session(object): def __init__(self, facebook_id, facebook_token, proxies=None): self._api = api.TinderAPI(proxies) # perform authentication self._api.auth(facebook_id, facebook_token) ...
# # Copyright (c) 2012 Patrice Munger # This file is part of pynetdicom, released under a modified MIT license. # See the file license.txt included with this distribution, also # available at http://pynetdicom.googlecode.com """ Implementation of Dicom Standard, PS 3.8, section 9.3 Dicom Upper Layer Protocol fo...
#!/usr/bin/env python __author__= "Dariusz Dwornikowski" __email__ = "dariusz.dwornikowski@cs.put.poznan.pl" """ Main file for pyPEPA """ from pprint import pprint from pypepa import PEPAModel from pypepa.utils import pretty_print_vector, pretty_print_performance,\ pretty_print_utilisations...
#!/usr/bin/env python # # Copyright 2014 University of Southern California # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2012 Rackspace # 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/li...
""" BenchBuild supports containerized execution of all experiments. This gives you full control about the environment your [projects](/concepts/projects/) and [experiments](/concepts/experiments/) may run in. The following example uses the latest ``alpine:latest`` Example: ```python ContainerImage().from_('alpine:lat...
import os from flask import Blueprint from flask import json, url_for from flask import g, request, abort, current_app from flask.ext.login import current_user, login_required from werkzeug import secure_filename from ..utils import as_resource, as_collection, jsonify_collection from ..services import models, tags f...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
from rest_framework import generics from rest_framework.views import APIView from rest_framework.response import Response from pybaulicht import BaulichtDbus from main.models import Message from api.serializers import MessageSerializer, ActiveMessageSerializer baulicht = BaulichtDbus() class QueueList(generics.Lis...