code
stringlengths
1
199k
def parse_commandline_options(): from optparse import OptionParser parser = OptionParser() parser.add_option("-s", "--stack", action='store_true', dest="stack", help="produces stack trace for each running component") parser.add_option("-l", "--last_line", type='int', dest="line", help="prints n last lin...
from django.test import TestCase, tag from edc_constants.constants import YES, NO from ..lab import AliquotType, Process, ProcessingProfile from ..lab import Specimen as SpecimenBase, SpecimenNotDrawnError from ..lab import SpecimenProcessor from ..lab import AliquotCreator as AliquotCreatorBase from ..identifiers impo...
map = {"1":({'Biome': None, 'Name': None}, [[ ['#18', '326', '326', '326', '#18', '#18', '#18', '#18', '#18', '#18'], ['#18', '326', '326', '326', '#18', '#18', '#18', '#18', '#18', '#18'], ['#18', '326', '326', '326', '#18', '#18', '#18', '#18', '#18', '#18'], ['#18', '326', '326', '326', '#18', '#18', '#18', '#18', '...
""" - ``FIT_METHOD_CROP_SMART`` (string) - ``FIT_METHOD_CROP_CENTER`` (string) - ``FIT_METHOD_CROP_SCALE`` (string) - ``FIT_METHOD_FIT_WIDTH`` (string) - ``FIT_METHOD_FIT_HEIGHT`` (string) - ``DEFAULT_FIT_METHOD`` (string) - ``FIT_METHODS_CHOICES`` (tuple) - ``FIT_METHODS_CHOICES_WITH_EMPTY_OPTION`` (list) - ``IMAGES_U...
from django.db import models class Hash(models.Model): info_hash = models.CharField(max_length=40, unique=True) category = models.CharField(max_length=20) data_hash = models.CharField(max_length=32) name = models.CharField(max_length=255) extension = models.CharField(max_length=20) classified = ...
import re import sys import zmq import time from idx import WMDIndex from threading import Event from threading import Thread WMD_SUB_RETRY_INTERVAL = 1 # sec sys.path.append('../../lib') from default import WMD_HEARTBEAT_INTERVAL, WMD_HEARTBEAT_PORT from default import zmqaddr, getdef from log import log, log_err impo...
import hello_ext print hello_ext.greet() def pygreet(): print "py wicked greet\n" def draw(x): return x + 6
import logging import sys from datetime import timedelta import xbmc import xbmcaddon import api import read_embyserver as embyserver import playbackutils as pbutils import embydb_functions as embydb import musicutils as musicutils from utils import settings, dialog, language as lang from dialogs import context, resume...
from __future__ import division from util import * def bin_date(timestamp): # return timestamp.replace(microsecond=0, second=0, minute=0, hour=0, day=1) return timestamp.replace(microsecond=0, second=0, minute=0, hour=0) def extract_binned_posts_replies(log_filename, net_filename=None, core=0, sample_size=-1): ...
"""convert an OpenOffice.org (SDF) localization file to Gettext PO localization files See: http://translate.sourceforge.net/wiki/toolkit/oo2po for examples and usage instructions """ import sys from translate.storage import po from translate.storage import oo class oo2po: def __init__(self, sourcelanguage, targetla...
import errno import os import stat import tempfile import threading import time from twisted.internet import defer, reactor, threads, abstract from flumotion.common import log, common from flumotion.component.misc.httpserver import cachestats from flumotion.component.misc.httpserver import cachemanager from flumotion.c...
# ---------------------------------------------------------------------------- # "THE BEER-WARE LICENSE" (Revision 42): # @Daddy_Blamo wrote this file. As long as you retain this notice you # can do whatever you want with this stuff. If we meet some day, and you think # this stuff is worth it, you can buy me a be...
from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers from common.drf.serializers import AdaptedBulkListSerializer from ..models import Node, AdminUser from orgs.mixins.serializers import BulkOrgResourceModelSerializer from .base import AuthSerializer, AuthSerializerMixin class ...
import timeit import math import sys from euler import * def run(): # n = 10 n = 20 # 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 # 1, 2, 6, 12, 60, 60, 420, 840, 2520 total = 1 for i in range(2, n + 1): total = lcm(total, i) print(total) print timeit.timeit(run, number=1)
import nltk guns_laws = '../../Data/Chapter09/ST_gunLaws.txt' with open(guns_laws, 'r') as f: article = f.read() sentencer = nltk.data.load('tokenizers/punkt/english.pickle') tokenizer = nltk.RegexpTokenizer(r'\w+') stemmer = nltk.PorterStemmer() lemmatizer = nltk.WordNetLemmatizer() sentences = sentencer.tokenize(...
import sys,os,time,locale import cPickle as p from datetime import date, timedelta, datetime YR=time.strftime('%Y')#'2013' MONTHS=['January', 'February', 'March', 'April', 'May', 'June',\ 'July', 'August', 'September', 'October', 'November', 'December'] SMONTHS=['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', ...
from flask_restful import Resource, reqparse, marshal_with from flask_restful_swagger import swagger from app.mod_shared.models import db from app.mod_profiles.models import * from app.mod_profiles.resources.fields.profileFields import ProfileFields parser = reqparse.RequestParser() parser.add_argument('last_name', typ...
from django.shortcuts import render def books(request): pass def book_details(request, *args, **kwargs): pass def books_by_genre(request, *args, **kwargs): pass def books_by_author(request, *args, **kwargs): pass def search_book(request, *args, **kwargs): pass def top_ten_books(request): pass
from io import StringIO from meresco.core import Observable from seecr.test import SeecrTestCase, CallTrace from weightless.core import be, compose from lxml.etree import parse, _ElementStringResult, _ElementUnicodeResult, XML from meresco.components import lxmltostring from meresco.components import XmlPrintLxml, XmlP...
DATA=[ 0x08,0x02,22,97,38,15,0x00,40,0x00,75,0x04,0x05,0x07,78,52,12,50,77,91,0x08, 49,49,99,40,17,81,18,57,60,87,17,40,98,43,69,48,0x04,56,62,0x00, 81,49,31,73,55,79,14,29,93,71,40,67,53,88,30,0x03,49,13,36,65, 52,70,95,23,0x04,60,11,42,69,24,68,56,0x01,32,56,71,37,0x02,36,91, 22,31,16,71,51,67,63,89,41,92,36,54,22,40...
__package__ = "pyfros"
from __future__ import absolute_import from testutil.dott import feature, sh, testtmp # noqa: F401 feature.require(["py2"]) sh % "hg init repo" sh % "cd repo" sh % "touch a" sh % "hg add a" sh % "hg ci -m a" sh % "echo 123" > "b" sh % "hg add b" sh % "hg diff --nodates" == r""" diff -r 3903775176ed b --- /dev/...
""" Norwegian-Specific classes for relationships. """ from __future__ import unicode_literals from gramps.gen.lib import Person import gramps.gen.relationship _cousin_level = [ "", "", #brother/sister, fetter/kusine -- these are taken care of separately "tremenning", "firemenning", "femmenning", "seksmenning", "sjumenn...
import mock from mock import patch from mock import call from .test_helper import raises from kiwi.system.uri import Uri from kiwi.system.root_import.oci import RootImportOCI from kiwi.exceptions import KiwiRootImportError class TestRootImportOCI(object): @patch('os.path.exists') @patch('kiwi.system.root_import...
import mock from mock import patch from mock import call from collections import namedtuple import kiwi from .test_helper import raises from kiwi.boot.image.builtin_kiwi import BootImageKiwi from kiwi.xml_description import XMLDescription from kiwi.xml_state import XMLState from kiwi.exceptions import KiwiConfigFileNot...
"""mirror_client.py - Clinet for oVirt CI transactional mirrors """ from six.moves import StringIO, range from six.moves.configparser import RawConfigParser from six.moves.urllib.parse import urlparse, urljoin from six import MAXSIZE, iteritems, string_types import requests from requests.exceptions import ConnectionErr...
from functions import * def test_pretty_date_no_arg(): out = pretty_date() assert type(out) == type('') def test_pretty_date_ISO_8601_date(): out = pretty_date('2012-08-15') assert type(out) == type('')
""" Resources for Byro """
from vsg import token from vsg.rules import spaces_before_and_after_tokens_when_bounded_by_tokens as Rule lTokens = [] lTokens.append(token.mode.inout_keyword) lBetween = [token.port_clause.open_parenthesis, token.port_clause.close_parenthesis] class rule_009(Rule): ''' This rule checks for spaces before and af...
import sys, os, platform if os.path.isfile(sys.path[0]): subdownloader_folder = os.path.dirname(sys.path[0]) else: subdownloader_folder = sys.path[0] import logging from optparse import OptionParser sys.path.append(os.path.join(sys.path[0], 'modules') ) import modules.configuration as conf from modules ...
import logging import os.path from edalize.edatool import Edatool logger = logging.getLogger(__name__) class Ghdl(Edatool): tool_options = {'lists' : {'analyze_options' : 'String', 'run_options' : 'String'}} argtypes = ['vlogparam'] def configure_main(self): (src_f...
from datetime import datetime from django.conf import settings from django.contrib import messages from django.core.exceptions import PermissionDenied from django.db import transaction from django.http import Http404, StreamingHttpResponse, HttpResponse from django.shortcuts import render, get_object_or_404, redirect f...
import os import sys import glob import itertools import click def locate_file(what, locations, quiet=False): """ Try and find a file in multiple locations. Return the path of the first one that exists """ locations = map(os.path.expanduser, locations) for location in locations: if os.pa...
import os import shutil import subprocess import listDirRecursive import copyAll import bruteIO import string def addToStringIfNotPresent(baseString, stringToAdd): if (string.find(baseString, stringToAdd) == -1): return baseString + stringToAdd; else: return baseString def executeUnrealscriptTes...
from keras.models import Sequential, Graph from keras.layers import Dense, Dropout, Activation, Merge from keras.layers.recurrent import LSTM, GRU from keras.optimizers import SGD from keras.datasets import reuters from keras.callbacks import Callback,ModelCheckpoint import conllutil from sklearn.feature_extraction imp...
import unittest import phone class TestPhoneNumberFormattingTransform(unittest.TestCase): def test_phone(self): transformer = phone.PhoneNumberFormattingTransform() tests = [ # input, format, expected output, region ('8005551212', '0', '+18005551212', 'US'), ('800...
from .client import UserClient, AdminClient, APIException, RoomNotFoundAPIException __all__ = ['UserClient', 'AdminClient', 'APIException', 'RoomNotFoundAPIException']
import cgi, cgitb import sys, json import subprocess """ Main function. """ def main(): # Get JSON data = sys.stdin.read() data_json = json.loads(data) # Get value JSON username = data_json['username'] password = data_json['password'] # Send response send_response(check_login(username, password)) """ This funct...
import sys from galaxy import eggs from galaxy.datatypes.util.gff_util import read_unordered_gtf try: set() except: from sets import Set as set assert sys.version_info[:2] >= ( 2, 4 ) in_fname = sys.argv[1] out_fname = sys.argv[2] out = open( out_fname, 'w' ) for feature in read_unordered_gtf( open( in_fname, '...
"""Configuration file for CV Repository.""" try: import sphinx_rtd_theme except ImportError: sphinx_rtd_theme = None try: from sphinxcontrib import spelling except ImportError: spelling = None extensions = [ ] if spelling is not None: extensions.append('sphinxcontrib.spelling') templates_path = ['_s...
from api import generator, osu, ripple, tillerino, twitch, mysql import json import asyncio import bottom import requests import pymysql import re with open("/home/aiae/r/config.json", "r") as f: config = json.load(f) connection = pymysql.connect(host=config['host'], user=config['user'], passwd=config['password'], ...
import ctypes from introspection import Type class Reference (object): def __init__ (self, value, atom = None): # convert python types if type(value) is bool: self.__type__ = Types.type_bool() self.__instance__ = ctypes.c_bool (value) # set the right integer type ...
from django.contrib import admin from django.db.models import Count from django.utils.html import format_html from django.utils.translation import ugettext as _ from mptt.admin import DraggableMPTTAdmin from apps.photos.models import Category, Photo class CategoryAdmin(DraggableMPTTAdmin): list_display = ["tree_act...
from pyraklib.server import ServerInstance class Handler(ServerInstance): def openSession(self, identifier, address, port, clientID): print(identifier, address, port, clientID) def closeSession(self, identifier, reason): print(identifier, reason) def handleEncapsulated(self, identifier, packet, fl...
from gnuradio import eng_notation from gnuradio import gr from gnuradio import uhd from gnuradio.eng_option import eng_option from gnuradio.gr import firdes from grc_gnuradio import wxgui as grc_wxgui from optparse import OptionParser import gnuradio.extras as gr_extras import wx class cw(grc_wxgui.top_block_gui): def...
from django.db import models class User(models.Model): username = models.CharField( primary_key = True, max_length = 50 ) password = models.CharField( max_length = 50 )
import game
from dynamic_reconfigure.encoding import extract_params inf = float('inf') config_description = {'upper': 'DEFAULT', 'lower': 'groups', 'srcline': 246, 'name': 'Default', 'parent': 0, 'srcfile': '/opt/ros/lunar/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py', 'cstate': 'true', 'parentname...
import sys from pyAMI import * class amiUpdateProductionStep: def __init__(self): return def command(self , argv): argument = [] argument.append("UpdateProductionStep") argument.extend(argv) return argument def main(argv): try: pyAMI_setEndPointType(argv) ...
import sys import os from optparse import OptionParser from pprint import pprint import logging import os.path import uuid import json import threading import hashlib import tornado.escape import tornado.ioloop import tornado.options import tornado.web import tornado.websocket from tornado.options import define, option...
import os import re import sys import shutil import argparse import pymongo from pymongo import MongoClient try: from mod_python import apache from mod_python.util import redirect except: pass sys.path.append('/home/institut/rawdata/www/lib') import Laser.base import Laser.Util.web from Sat.sentinel2_aws im...
""" Miniproject Histograms """ import pandas from pathlib import Path from matplotlib.pyplot import figure, show from argparse import ArgumentParser from matplotlib.ticker import MaxNLocator Y = 5 def main(): p = ArgumentParser() p.add_argument('fn', help='path to .xlsx') p = p.parse_args() fn = Path(p....
from timetools.synchronization.compliance.frequency.masks import *
try: from setuptools import setup except ImportError: from distutils.core import setup requires = ['qhue', 'numpy'] setup( name='ip_hue', install_requires=requires, license='GPL2', )
import cairo import math def to_cr(cr, fill=False): if fill: cr.fill() else: cr.stroke() cr.restore() def simple_rect(cr, rect, fill=False): cr.save() cr.rectangle(rect[0], rect[1], rect[2], rect[3]) to_cr(cr, fill) def rounded_rect(cr, rect, radius, position, fill=False): if...
import time def count_time( function , *args ): t0 = time.clock( ) function( *args ) t1 = time.clock( ) return t1 - t0
from __future__ import print_function import os import codecs import os import re from distutils.core import setup, Command from setuptools import setup here = os.path.abspath(os.path.dirname(__file__)) class PyTest(Command): user_options = [] def initialize_options(self): pass def finalize_options(...
from . import _prefer exception = None for module in _prefer: if module=='pyside': try: from PySide.QtWidgets import * except Exception as e: if exception is None: exception = e else: exception = None break try: ...
import logging from pycolorizer import Color from yoda import find_path from yoda import Repository from yoda import RepositoryError from yoda.subcommands import Subcommand class Update(Subcommand, object): def setup(self, name, config, subparser): self.subparser = subparser self.logger = logging.ge...
""" Activity coefficients in liquids [Mixed Organic systems] """ from __future__ import ( unicode_literals, absolute_import, print_function, division, ) str = type('') from itertools import chain, product from ..forms import ( Form, SMILESDictField, FloatRangeField, CoreAbundanceFiel...
from datetime import datetime from flask import request from hashlib import md5 from indico.modules.groups import GroupProxy from pytz import timezone from sqlalchemy.orm import joinedload import string import StringIO from lxml import etree import MaKaC.conference as conference import MaKaC.webinterface.urlHandlers as...
import json cells_lon = 6 cells_lat = 4 center_lon = 14.443 center_lat = 50.078 lon_size = 0.025 lat_size = 0.025 login_offset = 0 base_lat = center_lat - lat_size * (float(cells_lat-1) / 2) base_lon = center_lon - lon_size* (float(cells_lon-1) / 2) entries = [] with open('accounts.txt') as acc_file: while login_of...
import numpy as np import struct from matplotlib import mlab from contextlib import closing import wave class Audio(object): def __init__(self, audio, framerate): self.audio = audio self.framerate = framerate self._specgrams = {} self.specgram_nfft = None self.specgram_overla...
from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('tutu', '0004_switch_capacity'), ] operations = [ migrations.RenameField( model_name='switch', old_name='capacity', new_name='...
from django.dispatch import Signal mask_on = Signal(providing_args=['mask_username',]) mask_off = Signal(providing_args=['mask_username',])
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('consent', '0014_contactrequest_rdbm_to_contact_pt'), ] operations = [ migrations.AddField( model_name='contactrequest', name='clinician_signatory_name', fiel...
import argparse import enum import itertools import logging import json import pickle import sys class Format(enum.Enum): JSON = "json" PICKLE = "pickle" def prepare_parser(): parser = argparse.ArgumentParser(description="Compiles the shingle list from a set of headers") parser.add_argument("headers", help="Fil...
from datetime import datetime import hashlib from . import login_manager, db from werkzeug.security import generate_password_hash, check_password_hash from flask.ext.login import UserMixin, AnonymousUserMixin from itsdangerous import TimedJSONWebSignatureSerializer as Serializer from flask import current_app class Perm...
import ns.plc import ns.core import ns.spectrum import ns.network def startTx(phy,p): phy.StartTx(p) def sendRedundancy(phy): phy.SendRedundancy() def receiveSuccess(packet): print "\n*** Packet received ***\n" def main(dummy_argv): ## Enable logging ns.core.LogComponentEnableAll(ns.core.LOG_PREFIX_...
"""Package with classes for processing data from files."""
"""A plugin for pylint to identify imports and functions which should not be used.""" from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os import astroid from pylint.checkers import BaseChecker from pylint.interfaces import IAstroidChecker ANSIBLE_TEST_MODULES_PATH = os.envi...
BOT_NAME = 'learningPoint' SPIDER_MODULES = ['learningPoint.spiders'] NEWSPIDER_MODULE = 'learningPoint.spiders' ROBOTSTXT_OBEY = True
"""Constants and LaTeX-related stuff.""" from .attr_list import AttrList, OptionsList from .commands import Command, DocumentClass, UsePackage, UseTikzLibrary DEFAULT_FONT_SIZES = [r'\tiny', r'\scriptsize', r'\footnotesize', r'\small', r'\normalsize', r'\large', r'\Large', r'\LARGE', ...
import nltk import types from nltk import tag, chunk class Chunkerator: def __init__(self, rules, nounChunking): self.chunkParser = nltk.RegexpParser(rules) self.chunksSeen = dict() self.nounChunking = nounChunking def initial_tag(self,sentence): ''' Uses the basic nltk t...
""" my.backend.status STATUS FYI, nearly every call to server requires a token. The token is sent to the client as part of the reponse to a client's attempt to log into the dollhouse. So, let's say the client sends message '_login' CPU temperature, workload, etc. Major functions:- get_procstat_dct() read /pr...
''' python-libtorrent for Kodi (script.module.libtorrent) Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman 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 rest...
from dataclasses import dataclass from typing import List import re @dataclass class Sample: before: List[int] instructions: List[int] after: List[int] regex = r'.+: +\[(\d), (\d), (\d), (\d)\]' samples = [] with open('./16/input1') as f: lines = f.readlines() for index in range(0, len(lines), 4): ...
from Tank import Tank, TankType from Config import TANK_WIDTH, TANK_HEIGHT, ARMOR_TANK_SPEED, ARMOR_TANK_ARMOR, ARMOR_TANK_ATTACK from Resources import ARMOR_TANK_UP, ARMOR_TANK_RIGHT, ARMOR_TANK_DOWN, ARMOR_TANK_LEFT class ArmorTank(Tank): # self, x, y, width, height, resources, speed, armor, attack, object_id, li...
"""Find company for lonely nodes A command meant to follow ``lonelynodes``. Given a list of tax_ids produced by ``taxit lonelynodes``, produces another list of species tax_ids that can be added to the taxtable that would render those tax_ids no longer lonely. """ import argparse import logging from taxtastic import lon...
from array import array from gimpfu import * gettext.install("gimp20-python", gimp.locale_directory, unicode=True) def no_dither(dst_pxl, colours, width, height, pxl_size, strength, serpent, dither): for y in range(0, height): # Update progress bar gimp.progress_update(float(y) / heigh...
from rambutan3.check_args.base.RAbstractTypeMatcher import RAbstractTypeMatcher from rambutan3.check_args.set.RRangeSizeSetOfMatcher import RRangeSizeSetOfMatcher from rambutan3.check_args.set.RSetEnum import RSetEnum def RANGE_SIZE_BUILTIN_FROZENSET_OF(type_matcher: RAbstractTypeMatcher, *, min_size: int=-1, max_size:...
"""Memory collector collects allocations of C/C++ functions, target addresses of allocations, type of allocations, etc. The collected data are suitable for visualiation using e.g. :ref:`views-heapmap`. """ COLLECTOR_TYPE = 'memory' COLLECTOR_DEFAULT_UNITS = { 'memory': 'B' } __author__ = 'Radim Podola'
import db if __name__ == "__main__": cyp = db.Cyp()
""" This module contains supporting classes for CVS. To get a cross-repository revision number a la Subversion, the implementation uses `cvsps` to fetch the changes from the upstream repository. """ __docformat__ = 'reStructuredText' from vcpx import TailorException from vcpx.repository import Repository from vcpx.shwr...
from __future__ import ( unicode_literals, absolute_import, print_function, division, ) str = type('') try: range = xrange except NameError: pass from math import ceil from itertools import chain, groupby from operator import itemgetter import pdb from . import data def matches(patterns, com...
import marshal import struct import sys import zlib if sys.version_info[0] == 2: import thread else: import _thread as thread CRYPT_BLOCK_SIZE = 16 PYZ_TYPE_MODULE = 0 PYZ_TYPE_PKG = 1 PYZ_TYPE_DATA = 2 class FilePos(object): """ This class keeps track of the file object representing and current positio...
""" goog-dns goog-dns is a python program to update Google Dynamic DNS. Useful for cronjob or some other automated mechanism. Licence : GPL v3 or any later version 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 ...
class Odeconfig(): def __init__(self): self.cgen_num = 0 self.reset() def reset(self): # General stuff self.tlist = None # evaluations times self.ntraj = None # number / list of trajectories self.options = None # options for odesolvers self...
from __future__ import absolute_import import os from ..libcnml import logger import datetime try: from lxml import etree from lxml.etree import XMLSyntaxError LXML = True logger.info('Using lxml which is more efficient') except ImportError: import xml.dom.minidom as MD LXML = False logger.i...
from django.contrib.auth.decorators import login_required from django.http import HttpResponse from django.template import RequestContext from django.shortcuts import render_to_response from openipmap.models import * from openipmap.utils import * from openipmap.forms import ContributionUploadForm from openipmap.seriali...
import sys, smtplib, json, time, socket, types, string __doc__ = """ The reporter module defines a simple interface to report errors that may occur during program execution. Errors are composed of the following property: - 'message' which is the textual description of the error - 'component' which is the textual iden...
from tkinter import * import tkinter.messagebox as box window = Tk() window.iconbitmap("favicon.ico") window.title("Erin Hunter Book Chooser") label = Label( window, font = ("architects daughter", 11, "normal"), text = "\n\n\n\nWelcome to the Erin Hunter Book Chooser.\nPlease select your favorite animal below and the a...
def basic_op(operator, a, b): return {'+': a + b, '-': a - b, '*': a * b, '/': a / b}[operator]
'''Pychemqt, Chemical Engineering Process simulator Copyright (C) 2009-2017, Juan José Gómez Romera <jjgomera@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 3 of the License...
""" Module containing methods to processes a single block saved on Tue Apr 25 15:06:59 2017 @author: ukalwa """ from __future__ import division, generators import os import sys try: import configparser except ImportError: import ConfigParser as configparser import cv2 import numpy as np from src.utilities impor...
import socket import sys messages = ["HELP", "LOGIN MTECH GITRDONE", "STATUS", "START", "STOP", "LOGOUT"] sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) server_address = (sys.argv[1], 4547) commands = [] commands.append(sys.argv[2]) if len(sys.argv) > 3: commands.append(sys.argv[3]) for command in commands...
withFocus = mc.getPanel(wf=True) mel.eval("lookThroughModelPanel persp %s;" %(withFocus))
import sys, os, uuid from itertools import takewhile from perseuspy import pd, nx, write_networks, read_networks import numpy as np import perseuspy.parameters as params import phos.data.network as networker import phos.algo.anat as anat import phos.algo.activity as activity from joblib import Parallel, delayed def spl...
import os import re import sys import urlparse from channels import renumbertools from core import config from core import logger from core import scrapertools from core.item import Item CHANNEL_HOST = "http://animeid.io/" CHANNEL_DEFAULT_HEADERS = [ ["User-Agent", "Mozilla/5.0"], ["Accept-Encoding", "gzip, def...
import datetime import json import os import pywikibot import random import re import time import types import urllib.parse import urllib.request def addsection(title, summary, text): page = pywikibot.Page(site, title) result = pywikibot.site.APISite.editpage( site, page=page, summary=su...