text
stringlengths
12
6.59M
import os import struct import logging from twisted.internet.protocol import Factory, Protocol from twisted.internet import reactor from constants import * from packets import SSTPDataPacket, SSTPControlPacket from utils import hexdump from ppp import PPPDProtocol def parseLength(s): s = chr(ord(s[0]) & 0x0f) + ...
#! /usr/bin/python ''' use the classes in sisxmlparser2_0 to generate an ExtStationXML file from regular stationxml. ''' import checkNRL as checkNRL import sisxmlparser2_0 as sisxmlparser import uniqResponses as uniqResponses import argparse import datetime import dateutil.parser import sys USAGE_TEXT = """ Usage: p...
""" The GeometryColumns and SpatialRefSys models for the PostGIS backend. """ from django.db import models from django.contrib.gis.db.backends.base import SpatialRefSysMixin from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class GeometryColumns(models.Model): """ The...
version = '1.3.0'
""" sqldiff.py - Prints the (approximated) difference between models and database TODO: - better support for relations - better support for constraints (mainly postgresql?) - support for table spaces with postgresql - when a table is not managed (meta.managed==False) then only do a one-way sqldiff ? show differ...
""" sqldiff.py - Prints the (approximated) difference between models and database TODO: - better support for relations - better support for constraints (mainly postgresql?) - support for table spaces with postgresql - when a table is not managed (meta.managed==False) then only do a one-way sqldiff ? show differ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django import template from django.contrib.sites.models import Site from django.db.models import Model from django.template.defaultfilters import urlencode try: from django_bitly.templatetags.bitly import bitlify DJANGO_BITLY = True except I...
from optparse import make_option import pprint import requests from django.core.management.base import BaseCommand from mkt.prices.models import Price, PriceCurrency domains = { 'prod': 'https://marketplace.firefox.com', 'stage': 'https://marketplace.allizom.org', 'dev': 'https://marketplace-dev.allizo...
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' [WIP] Extract and convert CSA format kifu's from kifu's of kifu-paste threads (htm format) crawled from website ''' import os import re import sys import pandas as pd sys.path.append('./../../../') from pyogi.kifu import Kifu from pyogi.threadcrawler import extract_k...
from lib.common import helpers class Stager: def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'regsvr32', 'Author': ['@subTee', '@enigma0x3'], 'Description': ('Generates an sct file (COM Scriptlet) Host this anywhere'), 'Comments': [ ...
#!/usr/bin/env python # # Copyright 2018 Red Hat 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...
#!/usr/bin/env python # -*- coding: utf-8 -*- import logging import re import requests from dateutil import parser from lxml import html # from db import create_or_update_db_item from db.common import session_scope from db.player import Player from db.team import Team from db.contract import Contract from db.contrac...
from django.http import HttpResponse, HttpResponseForbidden, HttpResponseNotFound from django.views.decorators.csrf import csrf_exempt from uwsgi_it_api.decorators import need_basicauth, api_auth from uwsgi_it_api.utils import spit_json, check_body, dns_check from uwsgi_it_api.models import * from uwsgi_it_api.config ...
from urlparse import urlparse import urllib import httplib as http import json from QiType import QiType from QiStream import QiStream from QiStreamBehavior import QiStreamBehavior from QiNamespace import QiNamespace from QiError import QiError from JsonEncoder import Encoder import requests import time ...
#!/usr/bin/env python # Copyright 2014 Open Connectome Project (http://openconnecto.me) # # 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 # #...
#!/usr/bin/python # Author: Disa Mhembere, Johns Hopkins University # Separated: 10/2/2012 # Plot all .np arrays in a common dir on the same axis & save # 1 indexed import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt import pylab as pl import numpy as np import os import sys import glob import a...
#!/usr/bin/python # Author: Disa Mhembere, Johns Hopkins University # Separated: 10/2/2012 # Plot all .np arrays in a common dir on the same axis & save # 1 indexed import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt from matplotlib.backends.backend_pdf import PdfPages import pylab as pl import ...
# Copyright (c) 2011-2013 Peng Sun. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the COPYRIGHT file. # parse drl result for plotting def main(): logFile = open('drldata/drl_throughput.txt', 'r') logs = logFile.read().split('\n') logFile.close() ...
""" This module defines a generic session class. All connection instances (both on Portal and Server side) should inherit from this class. """ from builtins import object import time #------------------------------------------------------------ # Server Session #-----------------------------------------------------...
#!/usr/bin/env python #for controls import argparse import sys import numpy import numpy.random import scipy.stats import os import pystan import pickle import logging from hashlib import md5 import luxrep_routines if __name__ == '__main__': parser = argparse.ArgumentParser(description='LuxRep') parser.add_argume...
## # Copyright (c) 2011 Sprymix Inc. # All rights reserved. # # See LICENSE for details. ## import types import decimal import collections import weakref from metamagic.utils.functional.dispatch import TypeDispatcher from .. import elements from metamagic import exceptions from metamagic.utils.markup.format import ...
import os import sys from os.path import join, isdir, exists from .shortcuts import Shortcut import traceback def discover_plugins(): import snaked.plugins result = {} for p in snaked.plugins.__path__: print p for n in os.listdir(p): if isdir(join(p, n)) and exists(join...
import json import re from textwrap import wrap from django.contrib import admin from django.db import transaction from django.db.models import TextField, Q from django_ace import AceWidget from jingo import env, load_helpers from jinja2.meta import find_undeclared_variables from snippets.base import LANGUAGE_VALUES...
from django.http import Http404 from django.core.exceptions import PermissionDenied from django.views.generic import DetailView, TemplateView, UpdateView from bakery.views import BuildableDetailView from reversion import revisions from reversion.models import Version from rest_framework import viewsets from rest_frame...
import logging from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.auth.models import AnonymousUser from django.core.exceptions import PermissionDenied from django.http import Http404 from django.urls import reverse from django.views.generic import UpdateView from baker...
#!/usr/bin/env python # encoding: utf-8 # Jérôme Carretero, 2013 (zougloub) """ reStructuredText support (experimental) Example:: def configure(conf): conf.load('rst') if not conf.env.RST2HTML: conf.fatal('The program rst2html is required') def build(bld): bld( features = 'rst', type = 'rst2htm...
#!/usr/bin/env python3 """ The main entry point of wallabag-cli. """ import getopt import platform import subprocess from sys import argv from sys import exit import conf from wallabag_help import show as help import wallabag_add import wallabag_config import wallabag_delete import wallabag_export import wallabag_list ...
import numpy as np from pandas import DataFrame, Series import scipy.sparse as sparse from sqlalchemy.sql import bindparam, select import inspect from .features import get_span_feats from .models import ( GoldLabel, GoldLabelKey, Label, LabelKey, Feature, FeatureKey, Candidate, Marginal ) from .models.meta imp...
import numpy as np import matplotlib as mpl import matplotlib.pylab as pl from matplotlib.gridspec import GridSpec from peri.mc import sample class OrthoManipulator(object): def __init__(self, state, size=8, cmap_abs='bone', cmap_diff='RdBu', incsize=18.0, orientation=None, vrange_img=1.0, vrange_diff...
import collections import json import logging import multiprocessing import os import socket import subprocess import sys import traceback import time import signal import platform import six from six.moves import queue import yaml import wandb from wandb.apis import InternalApi from wandb.wandb_config import Config ...
""" This contains the base class for the geometry engine, which proposes new positions for each additional atom that must be added. """ from simtk import unit import numpy as np import collections import functools from perses.storage import NetCDFStorage, NetCDFStorageView ###########################################...
"""Virtual Socket implementation, unifies all the Transports into one single interface, and abstracts the work of the long-polling methods. This module also has the ``default_error_handler`` implementation. You can define your own so that the error messages are logged or sent in a different way :copyright: 2012, Alex...
""" Probabilistic decision making by slow reverberation in cortical circuits. X.-J. Wang, Neuron 2002. http://dx.doi.org/10.1016/S0896-6273(02)01092-9 """ from collections import OrderedDict import random as pyrand # Import before Brian floods the namespace # Once your code is working, turn units off for speed # im...
""" This contains the base class for the geometry engine, which proposes new positions for each additional atom that must be added. """ from collections import namedtuple import perses.rjmc.topology_proposal as topology_proposal import parmed import simtk.unit as units import logging import numpy as np from perses.rjmc...
import pandas as pd from igf_data.igfdb.pipelineadaptor import PipelineAdaptor from ehive.runnable.IGFBaseJobFactory import IGFBaseJobFactory class PipeseedFactory(IGFBaseJobFactory): ''' Job factory class for pipeline seed ''' def param_defaults(self): return { 'seed_id_label':'seed_id', 's...
from __future__ import unicode_literals import functools import threading import coid import flask import ohmr __version__ = '0.0.6' class Petitioner(threading.local): def __init__(self, tracer_header_name, tracer_prefix, app=None): super(Petitioner, self).__init__() self.tracer_header_name = ...
#!/usr/bin/env python import os,tarfile,fnmatch,datetime from ehive.runnable.IGFBaseProcess import IGFBaseProcess from igf_data.utils.fileutils import get_temp_dir,remove_dir from igf_data.utils.igf_irods_client import IGF_irods_uploader from igf_data.igfdb.projectadaptor import ProjectAdaptor class UploadFastqToIrods...
"""**simulation.py** contains the Simulation class. This is a 'God class' which collects all of Phaseflow's primary data and methods. """ import fenics import numpy import phaseflow.helpers import tempfile import pprint import h5py class Simulation: def __init__(self): self.end_time = None ...
#!/usr/bin/env python3 import sys from datetime import datetime import time import asyncio from concurrent import futures from phasortoolbox.message import Command from phasortoolbox import Parser, PDC, DevicesControl import uvloop asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) class Client(object): """A...
import time import types import uuid import warnings from functools import wraps from typing import Tuple, Callable, Dict, Generic, List, TypeVar, Any import numpy as np from . import _ops as math from ._ops import choose_backend_t, zeros_like, all_available, print_, reshaped_native, reshaped_tensor, stack, to_float ...
import json import spacy import copy import itertools FLAG_DICT = { "18": spacy.attrs.FLAG18, "19": spacy.attrs.FLAG19, "20": spacy.attrs.FLAG20, "21": spacy.attrs.FLAG21, "22": spacy.attrs.FLAG22, "23": spacy.attrs.FLAG23, "24": spacy.attrs.FLAG24, "25": spacy.attrs.FLAG25, "26": s...
# Copyright (C) 2012 Atsushi Togo # All rights reserved. # # This file is part of phonopy. # # 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 # notic...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module provides models for doing PSF/PRF-fitting photometry. """ import copy import itertools import warnings from astropy.modeling import Fittable2DModel, Parameter from astropy.nddata import NDData from astropy.utils.exceptions import AstropyW...
# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software 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 of conditions ...
############################################################################### # Caleydo - Visualization for Molecular Biology - http://caleydo.org # Copyright (c) The Caleydo Team. All rights reserved. # Licensed under the new BSD license, available at http://caleydo.org/license ######################################...
from __future__ import unicode_literals import datetime import importlib import json import uuid from abc import ABCMeta, abstractmethod from collections import namedtuple import dateutil.parser import six from eventsourcing.domain.model.entity import EventSourcedEntity from eventsourcing.domain.model.events import ...
#!/usr/bin/env python # 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 # # Authors: # - Tobias Wegner, tobias.wegner@cern.ch, 2017-2018 # - Alexey An...
#!/usr/bin/env python # 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 # # Authors: # - Paul Nilsson, paul.nilsson@cern.ch import subprocess from os...
import os import getpass import subprocess import click import time from click import echo from clint.textui import indent, puts, prompt, progress from ..utils import write, retrieve, success, error, info, requirements, spinner @click.argument('names', nargs=-1, metavar='<package(s)>') @click.command('install', short_...
import os import re import json from copy import copy import base64 import yaml import logging import tornado import filelock from uuid import uuid4 from datetime import datetime from pipelines.pipeline.exceptions import PipelineError from schema import SchemaError from yaml import YAMLError from concurrent.futures i...
import os import re import json from copy import copy import yaml import logging import tornado import filelock from uuid import uuid4 from datetime import datetime from pipelines.pipeline.exceptions import PipelineError from schema import SchemaError from yaml import YAMLError from concurrent.futures import ThreadPo...
#!/usr/bin/env python #A script for creating an application in spinnaker. #Simply looks to see if the application already exists, if not, creates import argparse import configparser import json import logging import os import sys from jinja2 import Environment, FileSystemLoader import requests class SpinnakerApp: ...
# Copyright (c) 2014-present PlatformIO <contact@platformio.org> # # 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 appli...
# Copyright (c) 2014-present PlatformIO <contact@platformio.org> # # 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 appli...
""" The code structures for procedural text generation. """ import sys import re import hashlib import struct import ast import twcommon.misc import tornado.gen # Check whether a string starts with a vowel. re_vowelstart = re.compile('^[aeiou]', re.IGNORECASE) # Used as a placeholder for the root argument of recur...
from __future__ import division, print_function import math import os import re from pathlib import Path from io import BytesIO import astropy.constants as const import astropy.units as u import EXOSIMS.PlanetPhysicalModel.Forecaster import json import numpy as np import pandas as pd import pickle import requests impo...
from os.path import join import tensorflow_hub as hub import tensorflow as tf import numpy as np import pytest from os import environ from pliers.tests.utils import get_test_data_path from pliers import config from pliers.extractors import (TensorFlowKerasApplicationExtractor, TFHubExtrac...
# Copyright (c) 2016 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. import math import copy import io import xml.etree.ElementTree as ET import uuid from UM.Resources import Resources from UM.Logger import Logger from UM.Util import parseBool from cura.CuraApplication import CuraApplicatio...
import cherrypy import datetime import logging import six from six.moves import urllib from girder import auditLogger from girder.models.model_base import Model from girder.api.rest import getCurrentUser from girder.plugin import GirderPlugin class Record(Model): def initialize(self): self.name = 'audit_l...
# Copyright (C) Ivan Kravets <me@ikravets.com> # See LICENSE for details. import atexit import platform import re import threading import uuid from sys import argv as sys_argv from time import time import click import requests from platformio import __version__, app from platformio.util import exec_command, get_syst...
### # Imports ### from __future__ import unicode_literals from slackclient import SlackClient import yaml ### # Constants ### COMMAND_LIST = 'list' COMMAND_ADD_JEWEL = 'jewel' COMMAND_ADD_SAND = 'sand' COMMAND_RESTART_GAME = 'restart' COMMAND_SULTAN = 'sultan' COMMAND_SULTANESS = 'sultaness' AVAILABLE_COMMANDS = [...
# IPython log file import numpy as np import serial import struct import time import pandas as pd from itertools import zip_longest from tqdm import tqdm, trange from collections import namedtuple ser = serial.Serial('/dev/serial/by-id/usb-FTDI_UM245R_FTE03K4V-if00-port0') ser.timeout = 1 commands = {'reset': 0, 'rea...
import sqlite3 import os import logging from plexcleaner import LOG from exception import PlexCleanerException __author__ = 'Jean-Bernard Ratte - jean.bernard.ratte@unary.ca' class Database(object): _uncommited = False _database_path = 'Library/Application Support/Plex Media Server/Plug-in Support/Databases...
import collections import numbers import os import re import typing as typ import uuid from contextlib import contextmanager from copy import deepcopy from importlib import import_module from pprint import pprint from urllib import parse import numpy as np from plotly.offline import plot as plotlypy_plot from traitlet...
# -*- coding: utf-8 -*- # # gpx_to_json.py # # purpose: Convert the first track of a gpx file to geojson # author: Filipe P. A. Fernandes # e-mail: ocefpaf@gmail # web: http://ocefpaf.github.io/ # created: 08-Sep-2013 # modified: Mon 09 Sep 2013 12:44:08 PM BRT # # obs: Assumes only one track and that track...
"""Configurator is a program that integrates device discovery and telnet commands to ease configuration and management of AMX DXLink devices. The MIT License (MIT) Copyright (c) 2014 Jim Maciejewski Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated document...
import discord import discord.voice_client import asyncio import permissions import commands import time import re from youtube_dl import YoutubeDL import json import subprocess cd = 2 lastTime = time.time() - cd # for cooldowns def voiceCommandExclusive(func): global player global voice...
#!/usr/bin/python3 ''' Provides IPython console widget. @author: Eitan Isaacson @organization: IBM Corporation @copyright: Copyright (c) 2007 IBM Corporation @license: BSD All rights reserved. This program and the accompanying materials are made available under the terms of the BSD which accompanies this distributio...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe, erpnext import frappe.defaults from frappe import _ from frappe.utils import cstr, cint, flt, comma_or, getdate, nowdate, formatdate, for...
#! /usr/bin/python # -*- coding: utf8 -*- import numpy as np import tensorflow as tf import tensorlayer as tl import time from keras import backend as K from keras.layers import * from tensorlayer.layers import * X_train, y_train, X_val, y_val, X_test, y_test = \ tl.files.load_mnist_dataset(shape=(-1,...
#!/usr/bin/env python from time import sleep import RPiShift import RPi.GPIO as GPIO import random GPIO.setmode(GPIO.BOARD) GPIO.setup(23, GPIO.IN) Shiftr = RPiShift.Shiftr(15,11,13) # Make sure everything is hooked up def testFunc(): # Test byte writing by counting up and down in binary for i in range(256**S...
# -*- coding: utf-8 -*- import copy import threading import time from xml.etree import ElementTree import requests from plexapi import (BASE_HEADERS, CONFIG, TIMEOUT, X_PLEX_ENABLE_FAST_CONNECT, X_PLEX_IDENTIFIER, log, logfilter, utils) from plexapi.base import PlexObject from plexapi.client impor...
# -*- coding: utf-8 -*- import datetime import logging import os import re import base64 import tempfile import pytz from sqlalchemy import desc, func, sql, case, cast, Float, Integer from sqlalchemy.sql.expression import nullslast from sqlalchemy.orm import backref, joinedload, validates from flask import url_for f...
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
#!/usr/bin/env python # Copyright (C) 2013 Fredrik Lindberg <fli@shapeshifter.se> # # 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. # # This program is distrib...
# Copyright 2019 The Sonnet 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 applicable l...
# -*- coding: utf-8 -*- import copy import threading import time from xml.etree import ElementTree import requests from plexapi import (BASE_HEADERS, CONFIG, TIMEOUT, X_PLEX_ENABLE_FAST_CONNECT, X_PLEX_IDENTIFIER, log, logfilter, utils) from plexapi.base import PlexObject from plexapi.client impor...
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
# coding: utf-8 from __future__ import print_function from __future__ import unicode_literals from collections import defaultdict, Counter, namedtuple import sys from . import rhyme from .syllables import count_syllables NormalizedLine = namedtuple('NormalizedLine', ['text', 'info']) class Poet(object): """Po...
"""CSS matcher.""" from datetime import datetime from . import util import re from .import css_types as ct import unicodedata import bs4 # Empty tag pattern (whitespace okay) RE_NOT_EMPTY = re.compile('[^ \t\r\n\f]') RE_NOT_WS = re.compile('[^ \t\r\n\f]+') # Relationships REL_PARENT = ' ' REL_CLOSE_PARENT = '>' REL...
from __future__ import with_statement import collections import os import signal import sys import thread import time import argparse from plop import platform class Collector(object): MODES = { 'prof': (platform.ITIMER_PROF, signal.SIGPROF), 'virtual': (platform.ITIMER_VIRTUAL, signal.SIGVTALRM),...
import asyncio from aiohttp import helpers from aiohttp.connector import Connection, TCPConnector from aiohttp.errors import ClientOSError, ClientTimeoutError class TimedConnection(Connection): def __init__(self, *args, time=None, **kwargs): super().__init__(*args, **kwargs) self._time = time or ...
#!/usr/bin/env python3 # Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. """...
#!/usr/bin/python3 import matplotlib.pyplot as plt import matplotlib as mpl from matplotlib.ticker import NullLocator, NullFormatter from mpl_toolkits.mplot3d import Axes3D, proj3d from matplotlib.patches import FancyArrowPatch import numpy as np import h5py import argparse class Arrow3D(FancyArrowPatch): """From ...
import copy import pybotics as py import numpy as np # set numpy print options np.set_printoptions(precision=3) np.set_printoptions(suppress=True) # create robot model = np.loadtxt('ur10-mdh.csv', delimiter=',') robot = py.Robot(model) print('Robot Model:\n{}\n'.format(robot.robot_model)) # demonstrate forward kin...
#!/usr/bin/env python # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ ============================ fMRI: OpenfMRI.org data, FSL ============================ A growing number of datasets are available on `OpenfMRI <http://openfmri.org>`_. This script...
#!/usr/bin/env python '''Display an image. Usage:: display.py <filename> A checkerboard background is visible behind any transparent areas of the image. ''' import sys from pyglet.gl import * from pyglet import window from pyglet import image if __name__ == '__main__': if len(sys.argv) != 2: prin...
from __future__ import print_function, division import numpy as np import theano import theano.tensor as T import matplotlib.pyplot as plt from scipy.stats import norm import lasagne from lasagne.utils import floatX from lasagne.layers import InputLayer, RecurrentLayer, ReshapeLayer, DenseLayer from lasagne.nonlineari...
# __init__.py: pomegranate # Contact: Jacob Schreiber <jmschreiber91@gmail.com> """ For detailed documentation and examples, see the README. """ import os from .base import * from .parallel import * from .distributions import * from .kmeans import Kmeans from .gmm import GeneralMixtureModel from .NaiveBayes import...
#!/usr/bin/env python """Status/config and exposure windows for Agile. History: 2008-10-24 ROwen 2009-01-28 ROwen Put all Agile controls in one window. Added gain, read rate and extSync controls. """ import RO.Alg import TUI.Inst.ExposeWdg import TUI.Inst.StatusConfigWdg import StatusConfigInput...
# -*- coding: utf-8 -*- """ Written by Daniel M. Aukes. Email: danaukes<at>seas.harvard.edu. Please see LICENSE.txt for full license. """ import sys import os import PySide.QtCore as qc import PySide.QtGui as qg import glob import imp import popupcad from popupcad.filetypes.design import Design from popupcad.support...
""" This forms.py contains base forms that applications/views.py will use to generate the actual forms filled in by users in making requests for partner content. For usability reasons, we only want users to have to fill in one form at a time (even if they are requesting access to multiple partners' resources), and we ...
#!/usr/bin/env python """Sample script of recurrent neural network language model. This code is ported from following implementation written in Torch. https://github.com/tomsercu/lstm """ import argparse import math import sys import time import numpy as np import six import chainer from chainer import cuda import ...
"""The big text widget in the middle of the editor.""" from functools import partial # not "import functools" to avoid long lines import re import tkinter as tk from porcupine import utils from porcupine.settings import config, color_themes def spacecount(string): """Count how many spaces the string starts wi...
# -*- coding: utf-8 -*- import html import random import urllib from datetime import date, timedelta from dateutil.relativedelta import relativedelta from itertools import chain from unittest.mock import patch import reversion from urllib.parse import urlparse from django import forms from django_comments import get_f...
from functools import wraps from flask import request, abort, redirect, flash, url_for, render_template from flask.ext.login import current_user from flask_login import login_user from portality.api.v1.common import Api401Error from portality.core import app from portality.models import Account def swag(swag_summar...
#!/usr/bin/env python3 # coding: utf-8 """ Mastodon -> Twitter cross-poster """ import time import re import requests import html import tempfile import os import mimetypes import sys import getpass from builtins import input from mastodon import Mastodon import twitter # Enable repost on services POST_ON_MASTODON ...
import os, sys, glob, subprocess from buildtools.bt_logging import log from buildtools.os_utils import cmd_output, Chdir, cmd from logging import critical class Git(object): @classmethod def GetCommit(cls, ref='HEAD', short=True, quiet=True): try: addtl_flags = [] if short: add...
#------------------------------------------------------------------------------ # Copyright (c) 2007, Riverbank Computing Limited. # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in enthought/LICENSE.txt and may be redistributed only # under the condit...
import json, urllib.request, urllib.error, urllib.parse from flask import Blueprint, request, abort, make_response from flask_login import current_user from portality import util from portality.bll.doaj import DOAJ from portality.bll import exceptions blueprint = Blueprint('query', __name__) # pass queries direct t...