src
stringlengths
721
1.04M
from __future__ import division from random import uniform from pyglet import clock, window from pyglet.gl import * import primitives class Entity(object): def __init__(self, id, size, x, y, rot): self.id = id self.circle = primitives.Circle(x=0, y=0, z=0, width=100, color=(1, 0, 0, 1), stroke=5...
# ID-Fits # Copyright (c) 2015 Institut National de l'Audiovisuel, INA, All rights reserved. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 3.0 of the License, or (at...
#!/usr/bin/env python import json import time import urllib2 import re from subprocess import call,check_output redfg = '\x1b[38;5;196m' bluefg = '\x1b[38;5;21m' darkgreenfg = '\x1b[38;5;78m' darkbluefg = '\x1b[38;5;74m' winefg = '\x1b[38;5;118m' yellowfg = '\x1b[38;5;226m' redbg = '\x1b[48;5;196m' greenbg = '\x1b[4...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Ref: # - http://doc.qt.io/qt-5/modelview.html#3-4-delegates # - http://doc.qt.io/qt-5/model-view-programming.html#delegate-classes # - http://doc.qt.io/qt-5/qabstractitemdelegate.html#details # - http://doc.qt.io/qt-5/qitemdelegate.html#details # - http://doc.qt.io/qt-5...
# -*- coding: utf-8 -*- # # Web Profiler documentation build configuration file, created by # sphinx-quickstart on Tue Jul 8 17:09:00 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. ...
# $Id: ScrolledList.py,v 1.61.2.6 2007/03/26 11:44:41 marcusva Exp $ # # Copyright (c) 2004-2007, Marcus von Appen # 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 co...
import numpy from convenience import reduce_h, find_pcts_multi from deuces.deuces import Deck, Card from itertools import combinations, product import random all52 = Deck.GetFullDeck() all_hole_explicit = [] for h in combinations(all52, 2): all_hole_explicit += [list(h)] deck_choose_2 = len(all_hole_explicit) asse...
import os import pwd import shutil import socket import tempfile from osgtest.library import core from osgtest.library import osgunittest SOURCE_PATH = '/usr/share/osg-test/test_gridftp_data.txt' class TestGSIOpenSSH(osgunittest.OSGTestCase): hostname = socket.getfqdn() temp_dir = None remote_path = No...
# -*- coding: utf-8 -*- # Copyright (C) 2014-present Taiga Agile LLC # # This program 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 ver...
# oppia/profile/forms.py import hashlib import urllib from django import forms from django.conf import settings from django.contrib.auth import (authenticate, login, views) from django.core.urlresolvers import reverse from django.core.validators import validate_email from django.contrib.auth.models import User from dj...
#!/usr/bin/env python # Copyright 2016 Criteo # # 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 agree...
# This Source Code Form is subject to the terms of the Mozilla Public # License, v2.0. If a copy of the MPL was not distributed with this # file, you can obtain one at http://mozilla.org/MPL/2.0/. from kivy.base import EventLoop from kivy.graphics import Color, Rectangle from kivy.uix.button import Button from kivy.uix...
# Copyright (c) 2020 DDN. All rights reserved. # Use of this source code is governed by a MIT-style # license that can be found in the LICENSE file. """ The service `job_scheduler` handles both RPCs (JobSchedulerRpc) and a queue (NotificationQueue). The RPCs are used for explicit requests to modify the system or run ...
from django.db import models from asset.models import Host # Create your models here. # ####ceph########## status_level = ( ("up", "up"), ("warning", "warning"), ("down", "down"), ) mode_status_level = ( ("up", "up"), ("warning", "warning"), ("critical", "critical"), ("down"...
import tkinter as tk import tkinter.filedialog as fdialog def OpenFile(): global filename text.delete(0.0, tk.END) inputFile = fdialog.askopenfile() filename = inputFile.name with open(filename, 'r+') as f: data = f.read() text.insert(0.0,data) def SaveFile(): global filename ...
from django.contrib.auth.models import User from django.core import serializers from django.http import JsonResponse, HttpResponse from django.apps import apps from vod.models import Data_Cleansing_Template, Data_Cleansing_Template_Field def validate_username(request): username = request.GET.get('username', None)...
from vnpy.trader.constant import Offset, Direction, OrderType from vnpy.trader.object import TradeData, OrderData, TickData from vnpy.trader.engine import BaseEngine from vnpy.app.algo_trading import AlgoTemplate class DmaAlgo(AlgoTemplate): """""" display_name = "DMA 直接委托" default_setting = { ...
# -*- coding: utf-8 -*- __author__ = 'ke4roh' # Copyright © 2016 James E. Scarborough # # 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, or # (at your option) any...
from math import * from util import format_number class Vector3(object): __slots__ = ('_v',) def __init__(self, *args): """Creates a Vector3 from 3 numeric values or a list-like object containing at least 3 values. No arguments result in a null vector. ...
from __future__ import print_function from time import sleep, localtime from weakref import WeakKeyDictionary from time import time import sys from PodSixNet.Server import Server from PodSixNet.Channel import Channel class LagTimeChannel(Channel): """ This is the server representation of a single connected c...
#!/usr/bin/env python # 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. """Seek performance testing for <video>. Calculates the short and long seek times for different video formats on different network...
""" kombu.transport.beanstalk ========================= Beanstalk transport. :copyright: (c) 2010 - 2012 by David Ziegler. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import socket from Queue import Empty from anyjson import loads, dumps from beanstalkc import Connectio...
# coding: utf-8 import re from itertools import chain, repeat import chainer import chainer.functions as F from chainer import Initializer from chainer import cuda class DeepEmbeddedClustering(chainer.ChainList): def __init__(self, chains): l1, l2, l3, l4 = chains super(DeepEmbeddedClustering, se...
import os from datetime import datetime from math import floor from typing import Generator, Set, Union from urllib.parse import urljoin import matplotlib import requests from PIL import Image, ImageDraw, ImageFont from bs4 import BeautifulSoup, SoupStrainer matplotlib.use('Agg') from wordcloud import STOPWORDS, Wor...
# peppy Copyright (c) 2006-2010 Rob McMullen # Licenced under the GPLv2; see http://peppy.flipturn.org for more info """ Managing user config files and directories. """ import os, os.path, types from ConfigParser import ConfigParser import cPickle as pickle import wx from peppy.lib.userparams import * from peppy.deb...
# -*- coding: utf-8 -*- # Copyright (C) 2015 Canonical # # Authors: # Didier Roche # # 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; version 3. # # This program is distributed in the hope that ...
# pylint: disable=no-self-use,invalid-name import codecs from deep_qa.data.data_indexer import DataIndexer from deep_qa.data.datasets import TextDataset from deep_qa.data.instances.text_classification.text_classification_instance import TextClassificationInstance from ..common.test_case import DeepQaTestCase class T...
#!/usr/local/bin/python #CHIPSEC: Platform Security Assessment Framework #Copyright (c) 2010-2015, Intel Corporation # #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; Version 2. # #This pr...
# -*- coding: utf-8 -*- # Copyright 2011-2012 Florian von Bock (f at vonbock dot info) # # gDBPool - db connection pooling for gevent __author__ = "Florian von Bock" __email__ = "f at vonbock dot info" __version__ = "0.1.3" import gevent from gevent import monkey; monkey.patch_all() import psycopg2 import sys, tra...
from __future__ import division import json import os import pickle import pprint from random import shuffle import numpy import patterny.semafor.frame as _frame from patterny.db import dao from patterny.config import Config from patterny.ml.similarity import ProblemSimilarity from patterny.semafor.adapter import Se...
import pygame, sys from pygame.locals import * import random WIDTH = 640 HEIGHT = 480 screen = pygame.display.set_mode((WIDTH, HEIGHT), 0, 32) pygame.display.set_caption("PongAI") clock = pygame.time.Clock() balls = [] for _ in range(500): ball = { "x": random.randrange(0, WIDTH), "y": random.randrange(0, HEIG...
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
#!/usr/bin/python # -*- coding: utf-8 -*- import sys, string, pickle, os, copy, threading #from qt import * from main import * from xmlInfo import * from parcoursRep import createRomsInfosListFromRep, extractFromPathAndCrc from config import Config from tableauLangues import * from tableauLocations import * from thre...
# # 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...
#!/usr/bin/env python2 # Copyright (c) 2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test mulitple rpc user config option rpcauth # from test_framework.test_framework import BitcoinTestFrame...
# 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 u...
# Copyright 2014 OpenStack Foundation # 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 requi...
import pandas as pd from fireant.dataset.fields import Field from fireant.utils import ( alias_for_alias_selector, immutable, ) from fireant.queries.builder.query_builder import QueryBuilder, QueryException, add_hints from fireant.queries.execution import fetch_data class DimensionLatestQueryBuilder(QueryBui...
"""Automate WinRAR evaluation copy We hit a few dialogs and save XML dump and screenshot from each dialog. Specify a language at the command line: 0 Czech 1 German 2 French More then likely you will need to modify the apppath entry in the 't' dictionary to where you have extracted the WinRAR ...
# Copyright (C) 2003-2005 Peter J. Verveer # # 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 following d...
""" Starts the remote control worker. """ import os import logging import argparse from workers.controller import Controller def parse_args(): parser = argparse.ArgumentParser(description='Starts the remote control worker.') parser.add_argument('--logpath', default=os.path.expanduser('~/logs/arr.log'), ...
#from sequences.id_feature import IDFeatures from sequences.id_feature_bigram import IDFeatures from sequences.label_dictionary import * import os, sys import re, string import pdb, ipdb import unicodedata path_utils = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.append(path_utils) from util...
# # Copyright 2010 Free Software Foundation, Inc. # # This file was generated by gr_modtool, a tool from the GNU Radio framework # This file is a part of gr-display # # SPDX-License-Identifier: GPL-3.0-or-later # # """ Utilities for extracting text from generated classes. """ from __future__ import unicode_literals de...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import datetime import urllib2 import re import json from base import Plugin #URL to the ifi news ics file URL = "http://webhelper.informatik.uni-goettingen.de/editor/ical/ifinews.ics" #dateformat used in ics files (date with and without time) ICS_U...
# Example of calling REST API from Python to manage APIC-EM users/roles using APIC-EM APIs. # * THIS SAMPLE APPLICATION AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY # * OF ANY KIND BY CISCO, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED # * TO THE IMPLIED WARRANTIES OF MERCHANTABILITY FITNESS FOR A PA...
import os import shutil from django.template.loader import render_to_string from django.template import Template, Context from django.contrib.auth.models import SiteProfileNotAvailable from django.core.exceptions import ObjectDoesNotExist from django.conf import settings from doc_builder.base import BaseBuilder, rest...
from pymongo import MongoClient import urllib2 import time import datetime import json import sqlite3 import pandas.io.sql as psql from data_utils import retrieve_DBs, extract_data_from_DB mongo_client = MongoClient() mongo_db = mongo_client.incubator measures_collection = mongo_db.measures local_path_SHT1xdb = "/ho...
#!/usr/bin/python import sys from xml.dom.minidom import parse style = '' def parseSignals(dom): sigs = dom.getElementsByTagName('meta_signal') print len(sigs) for s in sigs: c = s.getElementsByTagName('color') if len(c)>0: c0 = int(c[0].getAttribute('rgb')) b = c0%...
""" This file is part of Ludolph: Skeleton plugin Copyright (C) 2015-2017 Erigones, s. r. o. See the LICENSE file for copying permission. """ import time from ludolph.command import CommandError, command from ludolph.plugins.plugin import LudolphPlugin from . import __version__ class HelloWorld(LudolphPlugin): ...
# coding: utf-8 #read in libraries import cPickle as pickle from webcrawler import coredump from dataloader import get_trawled_data, introduce_weighting from ratings import PowerRater from history import historical, model_the_model from predict import predict from oddsmaker import read_odds from betting import wager ...
import binascii import datetime import logging import multiprocessing import os import pickle import random import re import string import sys from logging.handlers import RotatingFileHandler as RFHandler import pytz from kipp.options import opt from kipp.utils import setup_logger from ramjet.engines import thread_exe...
from zeroconf import Zeroconf, ServiceInfo import socket import RemoteDslrApi class AutoAnnounce(object): def __init__(self, port, ssl=False, run=True): """ Announces network settings via mdns :type self: AutoAnnounce :param self: AutoAnnounce :type port: int ...
""" Copyright (c) 2017, 2019 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ from __future__ import absolute_import from copy import deepcopy from atomic_reactor.utils.cachito import CachitoAPI from atomic_react...
# Generated by Django 3.0.8 on 2020-07-04 10:01 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='ProgrammingLanguage', fiel...
#!/usr/bin/env python3 # Copyright (c) 2019 The Navcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. import sys, os #include the parent folder so the test_framework is available sys.path.insert(1, os.path.abspat...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.utils.timezone import model_utils.fields class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Item', f...
from __future__ import absolute_import, print_function, division import warnings import numpy as np import astropy.units as u __all__ = ["_get_x_in_wavenumbers", "_test_valid_x_range"] def _get_x_in_wavenumbers(in_x): """ Convert input x to wavenumber given x has units. Otherwise, assume x is in wavene...
"""Setup script for PetroPy""" from setuptools import setup from os import path from petropy import __version__ with open(path.join(path.dirname(__file__), "requirements.txt"), "r") as f: requirements = f.read().splitlines() with open(path.join(path.dirname(__file__), "README.rst"), "r") as f: long_descripti...
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: ai ts=4 sts=4 et sw=4 nu from __future__ import (unicode_literals, absolute_import, division, print_function) import os import zipfile from django.conf import settings from optparse import make_option from django.core.management.base import ...
#!/usr/bin/python import ConfigParser, inspect, os, importlib import stringbar #Settings args = {'arg_backuppath' : None, 'arg_show' : None, 'arg_sideratio' : None, 'arg_bordersize' : None, 'arg_osn' : None, 'arg_workspacepath' : None, 'arg_rotateleft' : None, 'arg_rotateright' : None, 'arg_pageheight' : None, 'arg_ba...
import requests import json import time import sys from cd_perf_promotion.modules.perftools import PerfTools class WebPageTest(PerfTools): """ Handles all of the WebPageTest API querying/data gathering """ def __init__(self, url, location, runs, api_key): """ Sets up all of the instanc...
import csv def content_loader(lines): """Load datafile from SpectraMax M2. TODO: multilayer Args: lines: lines of input file (or file object) Returns: parsed data """ bs = 20 # block_size bo = 1 # block_offset pr = 16 # plate_rows ro = 2 # row_offset pc =...
from tower import ugettext_lazy as _ # To add a note type: # - assign it a incremented number (MY_NOTE_TYPE = 42) # - give it a translation in NOTE_TYPES # - if adding from amo/log.py, add it to ACTION_MAP # - add the translation to Commbadge settings # Faith of the seven. NO_ACTION = 0 APPROVAL = 1 REJECTION = 2 DI...
#!/usr/bin/env python """ nav_square.py - Version 1.1 2013-12-20 A basic demo of the using odometry data to move the robot along a square trajectory. Created for the Pi Robot Project: http://www.pirobot.org Copyright (c) 2012 Patrick Goebel. All rights reserved. This program is free software; y...
# MIT License # # Copyright (c) 2016 Daily Actie # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, ...
''' dbrev.table can be thought of as a bean or a template. It has only attributes with getters and setters. ''' import logging LOG = logging.getLogger(__name__) # LOG.setLevel(logging.INFO) # Long lines expected. # pylint: disable=C0301 # Cyclic imports protected by functions # pylint: disable=R0401 class Table...
""" Thierry Bertin-Mahieux (2010) Columbia University tb2332@columbia.edu This code demo the use of the track_metadata.db It is almost the same as demo_track_metadata.py in the github repository This is part of the Million Song Dataset project from LabROSA (Columbia University) and The Echo Nest. Copyright 2010, Thi...
from __future__ import unicode_literals from django.template.defaultfilters import slugify from django.contrib.auth.models import User from django.db import models from course.models import Activity,Course,CourseGroup from datetime import datetime # Theory Session table create # have relationship between course gro...
import re import string actual_letter_frequency = {"a":"11.602%", "b":"4.702%", "c":"3.511%", "d":"2.670%", "e":"2.007%", "f":"3.779%", "g":"1.950%", "h":"7.232%", "i":"6.286%", "j":".597%", "k":".590%", "l":"2.705%", "m":"4.374%", "n":"2.365%", "o":"6.264%", "p":"2.545%", "q":".173%", "r":"1.653%", "s":"7.755%", "t":...
#encoding: utf-8 from django.core.exceptions import PermissionDenied from django.contrib import messages from django.shortcuts import redirect from django.contrib.auth import get_user_model from wallet.models import Debit, Deposit, Note from main.utils import get_list_permissions User = get_user_model() def ajax_r...
from lib.common import helpers from termcolor import colored class Stager: def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'XSL Launcher StarFighter', 'Author': ['@CyberVaca'], 'Description': ('Generates a .xsl launcher for Empire.'), 'Com...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Thu Jul 20 11:43:39 2017 @author: agonzalez """ import matplotlib.pyplot as plt import numpy as np import matplotlib import os matplotlib.rcParams.update({'font.size': 18}) matplotlib.rcParams['axes.linewidth'] = 1 #set the value globally plt.rc('font',fa...
from __future__ import division from animation import Animation class Timer(Animation): """A timer implementation that tracks minutes up to an hour""" def __init__(self): Animation.__init__(self) self._start = self._milliseconds() self._hide_until = 0 def get_frame(self): "...
# -*- coding: utf-8 -*- from ui.informform import MainDialog class MainClass(object): def to_log( self, type_message='info', MESSAGE='info', level=None, ): sent_to_log = False self.last_logger = {} if self.logger: type_message = type_messa...
""" Astroid hooks for type support. Starting from python3.9, type object behaves as it had __class_getitem__ method. However it was not possible to simply add this method inside type's body, otherwise all types would also have this method. In this case it would have been possible to write str[int]. Guido Van Rossum pr...
# -*- coding: utf-8 -*- import datetime import logging import bleach from django import http from django.contrib import messages from django.contrib.auth.decorators import login_required from django.core import exceptions from django.shortcuts import get_object_or_404, redirect, render from .forms import AdminEvent...
import tensorflow as tf import time from datetime import datetime import math import argparse import sys from nets.mobilenet import mobilenet, mobilenet_arg_scope import numpy as np slim = tf.contrib.slim def time_tensorflow_run(session, target, info_string): num_steps_burn_in = 10 total_duration = 0.0 total_d...
#coding: utf-8 from waffle import Flag from django_webtest import WebTest from django_factory_boy import auth from django.core.urlresolvers import reverse from . import modelfactories from journalmanager.tests.modelfactories import UserFactory from scielomanager.utils.modelmanagers.helpers import ( _makeUserReque...
#!/usr/bin/python # -*- encoding: utf-8; py-indent-offset: 4 -*- # +------------------------------------------------------------------+ # | ____ _ _ __ __ _ __ | # | / ___| |__ ___ ___| | __ | \/ | |/ / | # | | | | '_ \ / _ \/ __| |/ /...
#!/usr/bin/env python3 import csv import sys import argparse import matplotlib.pyplot as plt import photon_correlation as pc def intensity_from_stream(stream): for line in csv.reader(stream): time_left = int(line[0]) time_right = int(line[1]) counts = map(int, line[2:]) yield(((t...
import pytest import aiohttp_jinja2 import aiohttp_debugtoolbar from aiohttp import web from aiohttp.test_utils import make_mocked_request async def test_render_toolbar_page(create_server, aiohttp_client): async def handler(request): return aiohttp_jinja2.render_template( 'tplt.html', request,...
#!/usr/bin/env python import os import sys from argparse import ArgumentParser from path import path from django.conf import settings from django.core.management import call_command from site_conf import DICT_CONF def conf(): settings.configure(**DICT_CONF) def run_tests(): """ Setup the environment ...
#!/usr/bin/python # # tcpv4connect Trace TCP IPv4 connect()s. # For Linux, uses BCC, eBPF. Embedded C. # # USAGE: tcpv4connect [-h] [-t] [-p PID] # # This is provided as a basic example of TCP connection & socket tracing. # # All IPv4 connection attempts are traced, even if they ultimately fail. # # Copyright (c) 2015...
# Copyright (C) 2010-2013 Claudio Guarnieri. # Copyright (C) 2014-2016 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import datetime import os import sys import socket import struct import pkgutil import logging import hash...
# encoding: utf-8 # Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.canaltp.fr). # Help us simplify mobilit...
############################################################################## # # OSIS stands for Open Student Information System. It's an application # designed to manage the core business of higher education institutions, # such as universities, faculties, institutes and professional schools. # The core ...
from unittest import TestCase from unittest.mock import MagicMock, patch from jasper.feature import Feature from jasper.scenario import Scenario from jasper.steps import Step from jasper.exceptions import ValidationException import asyncio class FeatureTestCase(TestCase): def setUp(self): call_order = []...
# -*- encoding: utf-8 -*- ################################################################################# # # # product_brand for OpenERP # # Copyright (C) 2009 NetAndCo (<http://www.ne...
# Natural Language Toolkit: Corpus Readers # # Copyright (C) 2001-2010 NLTK Project # Author: Edward Loper <edloper@gradient.cis.upenn.edu> # URL: <http://www.nltk.org/> # For license information, see LICENSE.TXT # [xx] this docstring isnt' up-to-date! """ NLTK corpus readers. The modules in this package provide func...
# -*- coding: utf-8 -*- # system import os import sys import socket # graphics interface import gtk import pango import cairo import glib import datetime try: import Image except: from PIL import Image # calculational help import datetime # self made modules import thumbnailer import dialogs import check...
''' Created on November 20, 2019 This file is subject to the terms and conditions defined in the file 'LICENSE.txt', which is part of this source code package. @author: David Moss ''' from intelligence.intelligence import Intelligence import domain import json import utilities.utilities as utilities import signals....
""" The `hsdev` backend. """ from functools import reduce import io import json import os import os.path import pprint import re import subprocess import threading import sublime import SublimeHaskell.hsdev.callback as HsCallback import SublimeHaskell.hsdev.client as HsDevClient import SublimeHaskell.hsdev.result_pa...
__author__ = 'zz' from functools import wraps from requests import Timeout import socket from datetime import datetime import logging timeouts = (Timeout, socket.timeout) def prefix_print(value): def decorator(cls): orig_method = cls.__getattribute__ def new_method(self, name): if ...
# -*- coding: utf-8 -*- """ Created on Mon Oct 31 15:45:22 2016 @author: wang """ #from matplotlib import pylab as plt #from numpy import fft, fromstring, int16, linspace #import wave from read_wav_xml_good_1 import* from matrix_24_2 import* from max_matrix_norm import* import numpy as np # open a wave file filename...
# coding: utf-8 # # Copyright 2018 The Oppia 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 requi...
# This file is part of thermotools. # # Copyright 2015 Computational Molecular Biology Group, Freie Universitaet Berlin (GER) # # thermotools is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either versi...
#!/usr/bin/python3 """ premium question """ from typing import List from collections import defaultdict class Solution: def wordsAbbreviation(self, words: List[str]) -> List[str]: """ Sort the word, check prefix and last word Group by first and last char, group by prefix and last char ...
"""Test wsgi.""" from concurrent.futures.thread import ThreadPoolExecutor import pytest import portend import requests from requests_toolbelt.sessions import BaseUrlSession as Session from jaraco.context import ExceptionTrap from cheroot import wsgi from cheroot._compat import IS_MACOS, IS_WINDOWS IS_SLOW_ENV = IS...
#!/usb/bin/env python # gtec.py # Copyright (C) 2013 Bastian Venthur # # 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....
from collections import abc from itertools import chain, repeat, zip_longest from operator import itemgetter from typing import ( TYPE_CHECKING, Any, Dict, ItemsView, Iterable, Iterator, List, Mapping, MutableSequence, Sequence, Tuple, Union, overload, ) from funcy i...