src
stringlengths
721
1.04M
#!/usr/bin/python # ***************************************************************************** # # Copyright (c) 2016, EPAM SYSTEMS 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 # #...
#Minecraft Graphics Turtle #Martin O'Hanlon #www.stuffaboutcode.com import minecraft import block import time import math #MinecraftDrawing class. Useful functions for drawing objects. class MinecraftDrawing: def __init__(self, mc): self.mc = mc # draw point def drawPoint3d(self, x, y, z, blockT...
# Pyap - The Python Audio Player Library # # Copyright (c) 2012 Joel Griffith # Copyright (c) 2005 Joe Wreschnig # Copyright (c) 2002 David I. Lehn # Copyright (c) 2005-2011 the SQLAlchemy authors and contributors # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU L...
import sys from setuptools import setup from setuptools.command.test import test as TestCommand install_requires = ['TexSoup==0.1.4', 'pptree==2.0'] tests_require = ['pytest', 'pytest-cov==2.5.1', 'coverage == 3.7.1', 'coveralls == 1.1'] # hack install_requires = install_requires + tests_require class PyTest(TestComm...
from messengerbot.api.messenger_requests.messenger_start_request import MessengerStartRequest from messengerbot.api.messenger_requests.messenger_postback_request import MessengerPostbackRequest from messengerbot.api.messenger_requests.messenger_referral_request import MessengerReferralRequest from messengerbot.api.mess...
"""This section introduces the PointParser class.""" import os import sys sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from point import Point class PointParser(object): """ PointParser class. The PointParser class is used for parsing Point object related expressions. ...
import re import uuid import requests from cloudbot import hook HIST_API = "http://api.fishbans.com/history/{}" UUID_API = "http://api.goender.net/api/uuids/{}/" def get_name(uuid): # submit the profile request request = requests.get(UUID_API.format(uuid)) request.raise_for_status() data = request....
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging from contextlib import contextmanager from functools import wraps import requests import pytz from dateutil.parser import parse from odoo import api, fields, models, registry, _ from odoo.tools import orm...
################################### # Many lines # # Such O(n) # # Very Doge # ################################### # By icydoge <icydoge@gmail.com> # ################################### with open("inputs/day3-1.txt") as f: content = f.readlines() #...
__author__ = 'laurentmeyer' # Set the command type to auto import sys, telnetlib, time MOCK_SERVER = "192.168.2.217" MOCK_SERVER_PORT = 35000 def beginCommunication(telnetaddr = MOCK_SERVER, telnetport = MOCK_SERVER_PORT): telnet = telnetlib.Telnet(telnetaddr, port=telnetport) return telnet def startInfiniteL...
# Copyright 2012 OpenStack 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 writin...
# -*- coding: utf-8 -*- # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). import logging from odoo import api, fields, models _logger = logging.getLogger(__name__) class FamilyAux(models.Model): _inherit = 'clv.family_aux' related...
from . import version import os import sys import logging import trueskill from logging.handlers import RotatingFileHandler from PyQt4 import QtCore trueskill.setup(mu=1500, sigma=500, beta=250, tau=5, draw_probability=0.10) _settings = QtCore.QSettings("ForgedAllianceForever", "FA Lobby") class Settings(object):...
# -*- coding: utf-8 -*- """ handle network sending and receiving data """ import logging from simplecfs.common.parameters import DATA_FRAME_SIZE from simplecfs.message.packet import pack, unpack def send_command(socket_fd, message): """ send command message packet over socket @socket_fd(socket.makefile('...
import gobject import gtk import deskbar.ui.iconentry # Make epydoc document signal __extra_epydoc_fields__ = [('signal', 'Signals')] class CuemiacEntry (deskbar.ui.iconentry.IconEntry): """ For all outside purposes this widget should appear to be a gtk.Entry with an icon inside it. Use it as such - if y...
# Copyright (c) 2013 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 law or agreed to in writ...
# -*- coding: utf-8 -*- # Copyright(C) 2010-2011 Christophe Benz, Romain Bignon # # This file is part of weboob. # # weboob 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 Licen...
# Copyright (c) 2012 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. import logging import multiprocessing from test_result import TestResults def _ShardedTestRunnable(test): """Standalone function needed by multipro...
# -*- coding: utf-8 -*- # # This file is part of the jabber.at homepage (https://github.com/jabber-at/hp). # # This project 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 (...
# coding=utf-8 """ Contains Disk Drive Pages """ from datetime import datetime from PiMFD.Applications.System.ByteFormatting import format_size from PiMFD.UI.Widgets.Charts import BarChart from PiMFD.UI.Panels import StackPanel from PiMFD.UI.Widgets.DashboardWidget import DashboardStatus try: import psutil ...
from __future__ import unicode_literals class YadisServiceManager(object): """Holds the state of a list of selected Yadis services, managing storing it in a session and iterating over the services in order.""" def __init__(self, starting_url, yadis_url, services, session_key): # The URL that was ...
# Copyright (c) 2011 OpenStack, LLC # Copyright (c) 2015 Rushil Chugh # Copyright (c) 2015 Clinton Knight # 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 # # ...
import os # Django settings for horarios project. DEBUG = True TEMPLATE_DEBUG = DEBUG PROJECT_PATH = os.path.realpath(os.path.dirname(__file__)) DEPLOY_SCRIPT = "echo 0> /dev/null" DAO_FACTORY = 'factories.MixedFactory' # or factories.SiaFactory , factories.LocalFactory DATABASES = { 'default': { 'ENGINE'...
from ngspice.syntax import * from functions.science import flatten from rawdata import touchstone from interpolate import interp1d __all__ = ['Nport'] class VCVSx(Netlist): __name__ = "vcvs" __type__ = "instance" __indent__ = "" def __init__(self, name='E1', nodes=('in', 'out', 'sensp', 'sensm...
from datetime import datetime, timedelta from django.conf import settings import jwt from rest_framework.exceptions import AuthenticationFailed from rest_framework_jwt.settings import api_settings from olympia.amo.tests import TestCase from olympia.api import jwt_auth from olympia.api.models import APIKey, SYMMETRIC...
from mongoengine import * from mongoengine.context_managers import switch_db from datetime import datetime import hashlib import uuid from user import User, Users # from comittee import Committee from pprint import pprint from cloudmeshobject import CloudmeshObject from cloudmesh_base.ConfigDict import ConfigDict from ...
# Copyright (c) 2013 - The C3PX authors. # # This file is part of C3PX. # # C3PX 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 versio...
__author__ = 'Andrew J. Lambert, andy@andyroid.co.uk' __author__ = 'Thomas Rueckstiess, ruecksti@in.tum.de' from scipy import reshape, dot, outer, eye from pybrain.structure.connections import FullConnection, FullNotSelfConnection from pybrain.structure.connections.connection import Connection from pybrain.structure....
# -*- coding: UTF-8 -*- # Copyright 2011,2013 Luc Saffre # This file is part of Lino Welfare. # # Lino Welfare 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 y...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2009-2011, Nicolas Clairon # 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 abov...
# # Copyright 2008 Huang Ying <huang.ying.caritas@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # import...
import logging, logging.handlers, os from storitch import config class logger(object): @classmethod def set_logger(cls, filename, to_sentry=False, fmt='[%(levelname)s %(asctime)s.%(msecs)d %(module)s:%(lineno)d]: %(message)s'): logger = logging.getLogger() logger.setLevel(getattr(logging, conf...
# Foremast - Pipeline Tooling # # Copyright 2018 Gogo, 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...
""" Pyjamas UI BuilderPanel: takes a PyJsGlade builder spec and adds widgets requested using the methods just like in any other Panel class. Copyright (C) 2010 Luke Kenneth Casson Leighton <lkcl@lkcl.net> The purpose of this class is to be able to set up a Panel of any type that can be dynamically created using B...
# I wanted to try making some classes as practice. RUNNING = True RESTING = False class Reindeer: def __init__(self, line): """ :param line: Parses line into the class. """ line = line.split() self.speed = int(line[3]) self.running_time = int(line[6]) self...
import conf import numpy as np import random import load import scipy.spatial import hashing def query(q, hashingArray): rank = [scipy.spatial.distance.hamming(q, h) for h in hashingArray] K = len(q) r = 2.0 / len(q) return [idx for idx, val in enumerate(rank) if val <= r] if __name__ == "__main__":...
"""Thread module emulating a subset of Java's threading model.""" import os as _os import sys as _sys import _thread import functools from time import monotonic as _time from _weakrefset import WeakSet from itertools import islice as _islice, count as _count try: from _collections import deque as _deque except Im...
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2017, 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...
# encoding: utf-8 # module gtk._gtk # from /usr/lib/python2.7/dist-packages/gtk-2.0/gtk/_gtk.so # by generator 1.135 # no doc # imports import atk as __atk import gio as __gio import gobject as __gobject import gobject._gobject as __gobject__gobject from ToolItem import ToolItem class ToolButton(ToolItem): """ ...
# -*- coding: utf-8 -*- # vim: ai ts=4 sts=4 et sw=4 nu import os import re import sys import time import shlex import signal import ctypes import tempfile import threading import subprocess import data from util import CLILogger # windows-only flags to prevent sleep on executing thread WINDOWS_SLEEP_FLAGS = { ...
#!/usr/bin/python import httplib2 import pprint from apiclient.discovery import build from apiclient.http import MediaFileUpload from oauth2client.client import OAuth2WebServerFlow # Copy your credentials from the APIs Console CLIENT_ID = "110041408722.apps.googleusercontent.com" CLIENT_SECRET = "IGeDmFs_w1mieqQ_s9...
# Test interfaces to fortran blas. # # The tests are more of interface than they are of the underlying blas. # Only very small matrices checked -- N=3 or so. # # !! Complex calculations really aren't checked that carefully. # !! Only real valued complex numbers are used in tests. from __future__ import divisio...
# -*- coding: utf-8 -*- # This file is part of the Rocket Web Server # Copyright (c) 2010 Timothy Farrell # # See the included LICENSE.txt file for licensing details. # Import System Modules import time import types import socket import unittest import threading try: from queue import Queue except ImportError: ...
from common_fixtures import * # NOQA RCCOMMANDS_SUBDIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'resources/rccmds') logger = logging.getLogger(__name__) start_project_str = "Starting" if_compose_data_files = pytest.mark.skipif( not os.path.isdir(RCCOMMANDS_SUBD...
""" * pyPOS * * Python Version Copyright 2011 Thomas Winningham * Javascript Version and Comments Copyright 2010, Percy Wegmann * Licensed under the LGPLv3 license * http://www.opensource.org/licenses/lgpl-3.0.html Parts of Speech Tagger """ from Lexicon import POSTAGGER_LEXICON def is_number(s): '''Simple ...
#-*- coding:iso-8859-1 -*- """ Clase que modela la información de una cuenta en el sistema """ # NUMERO.SALDO.TIPO_CUENTA,CERRADA,CLIENTE,OFICINA class Cuenta(object): def __init__(self, numero, saldo, tipo_cuenta, cerrada, cliente, oficina): self.numero = numero self.saldo = saldo ...
# -*- coding: utf-8 -*- # vim: ai ts=4 sts=4 et sw=4 # Baruwa - Web 2.0 MailScanner front-end. # Copyright (C) 2010-2015 Andrew Colin Kissa <andrew@topdog.za.net> # # 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 S...
""" URL patterns for Repository """ from django.conf.urls.defaults import * import repository.views as views import repository.views.challenge urlpatterns = patterns('', url(r'^$', views.challenge.index, name='challenge_index'), url(r'^by_pub_date/$', views.challenge.index, {'order_by' : '-pub_date'}, name='c...
from .base import BaseModelView, request from wtforms.ext.appengine.ndb import model_form class ModelEdit(BaseModelView): methods = ['GET', 'POST'] template = 'flaskengine/edit.html' form = None endpoint = '/<key>/edit/' @classmethod def default_form(cls): ''' if self.form not...
# Copyright (c) 2014 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 law or agreed to in writing, ...
# import the main window object (mw) from ankiqt from aqt import mw # import the "show info" tool from utils.py from aqt.utils import showInfo # import all of the Qt GUI library from aqt.qt import * import re # We're going to add a menu item below. First we want to create a function to # be called when the menu item ...
## # Copyright 2009-2020 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (F...
import unittest as real_unittest from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db.models import get_app, get_apps from django.db.models.loading import unregister_app from django.test import _doctest as doctest from django.test.utils import setup_test_environment, ...
# import datetime from django.http import HttpResponse,HttpResponseRedirect from django.shortcuts import render, get_object_or_404 from notification.models import * from django.core.urlresolvers import reverse # Task Created by the manager => send a notification to the task_manager 1 # SubTask Created by...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Processing fastq files """ import os.path as op import sys import re import logging import json import gzip from itertools import islice from Bio import SeqIO from Bio.SeqIO.QualityIO import FastqGeneralIterator from maize.formats.base import must_open, DictFile fr...
#-*- coding: utf8 -* # # Max E. Kuznecov ~syhpoon <syhpoon@syhpoon.name> 2008 # # This file is part of XYZCommander. # XYZCommander is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by # the Free Software Foundation, either version 3 of the Licens...
import networkx as nx import numpy as np import pickle as pkl import sys class SecondSearchIdentifier(object): """ SecondSearchIdentifier Identifies isolates for which a source pair search will be performed. """ def __init__(self, handle, percentile): super(SecondSearchIdentifier, self).__init__() self.han...
""" Este modulo contem as configuracoes da interface grafica da aplicacao e metodos uteis ao processo de analise de palavras-chave. author: Augusto Santos version: 1.0 """ # -*- coding: utf-8 -*- from tkinter import Tk, Button, Label, Entry, messagebox from tkinter.constants import CENTER from wordcountweb....
"""Figuring out noise. This code is lifted from: http://freespace.virgin.net/hugo.elias/models/m_perlin.htm See also: http://mrl.nyu.edu/~perlin/doc/oscar.html http://www.noisemachine.com/talk1 http://webstaff.itn.liu.se/~stegu/TNM022-2005/perlinnoiselinks/perlin-noise-math-faq.html """ import math...
########################################################################## # # Copyright (c) 2011-2012, John Haddon. All rights reserved. # Copyright (c) 2011-2013, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted prov...
import pyck domain = [100.0, 100.0, 500.0] h = domain[0] / 100 smoothingKernelFunc = 2 speedsound = 1 density = 1 shearmodulus = 1 bulkmodulus = 1 # Create a packer, see packers directory for options Hcp = pyck.HcpPacker(domain, h) pack = pyck.StructuredPack(Hcp) tibia_min = [154.2328, 204.0634, -853.9...
import unittest import ccs #################################################################################################################### # BTCCUSD # ##########################################################...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2017-2019 Satpy developers # # This file is part of satpy. # # satpy 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 Licens...
# -*- coding: utf-8 -*- from flask_wtf import Form from wtforms import TextField, SelectField, SelectMultipleField, widgets from wtforms.validators import DataRequired import json import os class MultiCheckboxField(SelectMultipleField): widget = widgets.ListWidget(prefix_label=False) option_widget = widgets.C...
# coding=utf-8 from kg.lang.etish.kyimyl_atooch import KyimylAtooch2 from kg.lang.lang import KyrgyzWord from kg.tests import KGTestCase class KyimylAtooch2Test(KGTestCase): def test_1(self): data = self.get_data() for word, expected_form in data.items(): kyimyl_atooch2 = KyimylAtooch...
"""Django settings for drf_json_schema project.""" import os from typing import List # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Quick-start development settings - unsuitable for production # See https://docs.django...
"""This module contains some diagnostic functions to diagnose the performance of MCMC sample. The two most important functions are :func:`multivariate_ess` and :func:`univariate_ess` to calculate the effective sample size of your samples. """ from collections import Mapping import itertools import numpy as np from num...
# Copyright 2012-2014 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file ac...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import DataMigration from django.db import models import os current_dir = os.path.dirname(__file__) class Migration(DataMigration): def forwards(self, orm): db.execute_many(open("{0}/ods-views.sql".format(current_dir)).read()) ...
# See the file "COPYING" in the main distribution directory for copyright. """ Describes a specification for the ASCII log format. See BroLogSpec for details. """ import bz2 import csv import gzip import itertools import re from BroLogSpec import BroLogSpec from BroLogUtil import BroLogUtil class AsciiLogSpec(BroLog...
import subprocess import zookeeper from twisted.internet.defer import inlineCallbacks, succeed, returnValue from twisted.web import client from juju.errors import JujuError from juju.lib.testing import TestCase from juju.unit.address import ( EC2UnitAddress, LocalUnitAddress, OrchestraUnitAddress, DummyUnitAddres...
# Copyright 2010 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). """Tests for the question module.""" __metaclass__ = type __all__ = [] from zope.security.proxy import removeSecurityProxy from lp.answers.browser.question import QuestionTarge...
# -*- coding: utf-8 -*- import six from pypump.models.collection import Collection from pypump.models.feed import Feed from tests import PyPumpTest class CollectionTest(PyPumpTest): def setUp(self): super(CollectionTest, self).setUp() self.response.data = { "content": "", ...
import collections from supriya.enums import CalculationRate from supriya.ugens.MultiOutUGen import MultiOutUGen class TGrains(MultiOutUGen): """ :: >>> tgrains = supriya.ugens.TGrains.ar( ... amp=0.1, ... buffer_id=0, ... center_pos=0, ... channel_cou...
"""Meson build for radare2""" import argparse import glob import logging import os import re import shutil import subprocess import sys BUILDDIR = 'build' BACKENDS = ['ninja', 'vs2015', 'vs2017'] PATH_FMT = {} MESON = None ROOT = None log = None def set_global_variables(): """[R_API] Set global variables""" ...
# -*- coding: utf-8 -*- import json import logging from tornado.web import authenticated from Handlers.BaseHandler import BaseHandler from Tools import PostgreSQL logger = logging.getLogger(__name__) class ListingHandler(BaseHandler): """Listing Handler which require a connected user""" @authenticated ...
# -*- coding: utf-8 -*- # author : http://github.com/jeonghoonkang import logging #import logging.config from logging.handlers import RotatingFileHandler #logging.config.fileConfig('logging.conf') LOG_FILENAME = "/home/pi/devel/BerePi/logs/berelogger.log" logger = logging.getLogger('BereLogger') logger.setLevel(logg...
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Anders Ingemann <aim@secoya.dk> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Licen...
__author__ = 'alexander' import sys initial_bunnies = long(sys.stdin.readline()) bunnies = dict() bunnies['adults'] = initial_bunnies bunnies['babies'] = long(0) bunnies['juveniles'] = long(0) bunnies['juveniles2'] = long(0) for i in range(0,365,15): if i % 2 == 0: bunnies['babies'] = long(bunnies['babi...
# -*- coding: utf-8 -*- ############################################################################## # # This file is part of mozaik_thesaurus, an Odoo module. # # Copyright (c) 2015 ACSONE SA/NV (<http://acsone.eu>) # # mozaik_thesaurus is free software: # you can redistribute it and/or # modify ...
#!/usr/bin/python -OO from __future__ import print_function import os import sys from custom_handlers import get_script_logger from archivematicaCreateMETS import createFileSec, each_child from archivematicaCreateMETS2 import createDigiprovMD import archivematicaXMLNamesSpace as ns from lxml import etree def crea...
''' Main entrypoint file. To run: $ python serve.py ''' from flask import Flask from flask import request from flask import render_template from flask import json from flask import send_from_directory import importlib import traceback import sys import os # Add current directory to sys.path site_dir = os.path.dir...
from . import base from libqtile.log_utils import logger from six import u, text_type from socket import error as socket_error from mpd import MPDClient, ConnectionError, CommandError # Shortcuts # TODO: Volume inc/dec support keys = { # Left mouse button "toggle": 1, # Right mouse button "stop": 3, ...
import re from streamlink.plugin import Plugin from streamlink.plugin.api import http, validate from streamlink.stream import HTTPStream, HLSStream API_URL = "https://g-api.langlive.com/webapi/v1/room/info?room_id={0}" VOD_API_URL = ( "https://g-api.langlive.com/webapi/v1/replayer/detail?live_id={0}") STATUS_ONLI...
"""Process Capsule: The PExpect Wrapper.""" from errno import ESRCH as NoSuchProcess from os import kill, environ from os.path import join from signal import SIGTERM as CTRL_C from chardet import detect as Chardet from pexpect import ( spawn, TIMEOUT, EOF, ) __author__ = "Minho Ryang (minhoryang@gmail.co...
#!/usr/bin/python import rospy import roslib # Messages from geometry_msgs.msg import Twist from std_msgs.msg import Float32 class CmdVelToDiffDriveMotors: def __init__(self): rospy.init_node('diffdrive_controller') self.cmdvel_sub = rospy.Subscriber('cmd_vel', Twist, self.twistCallback) self.lwheel_tan...
#!/usr/bin/env python import sys import argparse import os import textwrap import ConfigParser from datetime import datetime import socket import traceback # get path to taskmanager. it is assumed that this script is in the bin/python directory of # the taskmanager package. tmpath = os.path.normpath( os.path.join( os...
"""Test Python APIs for working with formatters""" import os, sys, time import unittest2 import lldb from lldbtest import * import lldbutil class SBFormattersAPITestCase(TestBase): mydir = os.path.join("python_api", "formatters") @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") ...
#!/usr/bin/python # -*- encoding: utf-8; py-indent-offset: 4 -*- # +------------------------------------------------------------------+ # | ____ _ _ __ __ _ __ | # | / ___| |__ ___ ___| | __ | \/ | |/ / | # | | | | '_ \ / _ \/ __| |/ /...
from __future__ import unicode_literals import datetime from django.contrib import admin from django.contrib.admin.options import IncorrectLookupParameters from django.contrib.admin.templatetags.admin_list import pagination from django.contrib.admin.tests import AdminSeleniumWebDriverTestCase from django.contrib.admi...
# -*- coding: utf-8 -*- """ direct PAS Python Application Services ---------------------------------------------------------------------------- (C) direct Netware Group - All rights reserved https://www.direct-netware.de/redirect?pas;gapi;core The following license agreement remains valid unless any additions or chan...
#!/usr/bin/python # Copyright 2017-present Open Networking 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 ap...
from flask import render_template, url_for, Response from common.config import read_config from common.utils import concat_url_path from web.content import content @content.route('/jquery', methods=['GET']) def get_jquery(): """ Returns the jQuery.js file """ return render_template('javascript/jquery.js') ...
#!/usr/bin/env python # -*- encoding: utf-8 -*- # copyright 2016 twitter. 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...
import sys import os import time import signal import threading import logging import logging.handlers import yaml import redis class PidfileHelper(object): def __init__(self, pidfile): self._pidfile = pidfile def exist(self): """ Check for a pidfile to see if the daemon already runs ...
#!/usr/bin/env python import sys import os import re import json import traceback import anchore.anchore_utils # main routine try: config = anchore.anchore_utils.init_query_cmdline(sys.argv, "params: <filename> <filename> ...\nhelp: use 'all' to show all content search match filenames") except Exception as err:...
#!/usr/bin/python from macaroon.playback import * import utils sequence = MacroSequence() #sequence.append(WaitForDocLoad()) sequence.append(PauseAction(5000)) # Work around some new quirk in Gecko that causes this test to fail if # run via the test harness rather than manually. sequence.append(KeyComboAction("<Con...
''' This file is part of Habitam. Habitam 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. Habitam is distributed in the hope that ...
""" Hash implementations for Numba types """ from __future__ import print_function, absolute_import, division import math import numpy as np import sys import ctypes from collections import namedtuple import llvmlite.binding as ll import llvmlite.llvmpy.core as lc from llvmlite import ir from numba.extending import ...
import datetime import logging from optparse import make_option from django.contrib.auth.models import User from django.core.management.base import BaseCommand, CommandError from django.db.models import Q from edx_solutions_api_integration.tasks import convert_ooyala_to_bcove from openedx.core.djangoapps.content.cours...