src
stringlengths
721
1.04M
import numpy as np import pytest from scipy import optimize from sklearn.utils.testing import assert_almost_equal from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_false from sklearn.utils.testing import assert_true from sklearn.utils.testing import assert_array_almost_equal from...
from de.generia.kodi.plugin.frontend.base.Pagelet import Item from de.generia.kodi.plugin.frontend.base.Pagelet import Action from de.generia.kodi.plugin.frontend.base.Pagelet import Pagelet from de.generia.kodi.plugin.frontend.zdf.Constants import Constants class AbstractPage(Pagelet): ...
# Copyright 2021, Kay Hayen, mailto:kay.hayen@gmail.com # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
import numpy as np from numpy.testing import assert_allclose from nose.tools import raises from menpo.shape import PointCloud, TriMesh from menpo.transform import TransformChain, Homogeneous, Translation, Scale from menpo.transform.thinplatesplines import ThinPlateSplines from menpo.transform.piecewiseaffine import P...
import logging import time from Tribler.dispersy.util import blocking_call_on_reactor_thread, call_on_reactor_thread from Tribler.Core.Utilities.tracker_utils import get_uniformed_tracker_url MAX_TRACKER_FAILURES = 5 TRACKER_RETRY_INTERVAL = 60 # A "dead" tracker will be retired every 60 seconds class TrackerMa...
from django.contrib import admin from django.contrib.auth.models import User from songs.models import Genre, Song, TwitterProfile class SongInline(admin.TabularInline): model = Song class GenreAdmin(admin.ModelAdmin): search_fields = ['name'] inlines = [SongInline] class SongAdmin(admin.ModelAdmin): list_display...
# cfgJ2EERolesSocialMail # # Author: Christoph Stoettner # Blog: http://www.stoeps.de # E-Mail: nospam@stoeps.de # # Description: # Script is tested with IBM Connections 4.5 CR2, CR3 # # You can enable and disable Socialmail Integration through J2EE Roles with this script # History: # 20140225 Christoph S...
""" IO PDX Mesh Python module. Supports Maya 2018 and up, supports Blender 2.83 and up. author : ross-g """ from __future__ import unicode_literals import sys import site import json import inspect import logging import zipfile import traceback import os.path as path from imp import reload from collectio...
from django.test import TestCase from rest_framework import status from eszone_ipf.settings import BASE_DIR, API_VERSION_PREFIX class ConfigFileTestCase(TestCase): url = '/{}/api_ipf/config/'.format(API_VERSION_PREFIX) url_act = ''.join([url, 'activate/']) def test_ipf_form_post(self): title = 't...
"""RPC XML base parser. Contains base parser for SDLRPC v1/v2 and JSON RPC XML format. """ import collections import xml.etree.ElementTree from generator import Model class ParseError(Exception): """Parse error. This exception is raised when XML contains errors and can't be parsed. """ pass ...
# Enable plugins c.content.plugins = True # Adjust font and font size c.fonts.completion.category = "bold 16pt monospace" c.fonts.completion.entry = "16pt monospace" c.fonts.debug_console = "16pt monospace" c.fonts.downloads = "16pt monospace" c.fonts.hints = "16pt monospace" c.fonts.keyhint = "16pt monospace" c.fonts...
# -*- coding: utf-8 -*- """ flask.testing ~~~~~~~~~~~~~ Implements test support helpers. This module is lazily imported and usually not used in production environments. :copyright: (c) 2010 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from werkzeug import Client, Envir...
"""Test Utility Encoders.""" # pylint: disable=missing-docstring from chassis import test from chassis.util import validators class TestBaseValidator(test.TestCase): def test_failure(self): validator = validators.BaseValidator() self.assertRaisesWithMessage(validators.ValidationError, ...
""" longdouble_conv Copyright (C) 2013 Eli Rykoff, SLAC. erykoff at gmail dot 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 optio...
''' Copyright (c) 2017 Vanessa Sochat 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, publish, distribute...
#!/usr/bin/python # -*- coding: utf-8 -*- # This file is part of the Gedit Synctex plugin. # # Copyright (C) 2010 Jose Aliste <jose.aliste@gmail.com> # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public Licence as published by the Free Software # Found...
# -*- coding: UTF-8 -*- ## Base modules import scipy.sparse as sp import numpy as np from collections import deque import pandas as pd ## Read a sparese adjacency matrix from a two-column CSV file def __csr_from_csv( file_name, **kwargs ) : return __csr_from_pandas( pd.read_csv( file_name, **kwargs ) ) ## Creates ...
from __future__ import division import multiprocessing as mp import os import sys from random import uniform try: import numpy as np except ImportError: print('This file requires the numpy package to run properly. Please see the readme for instructions on how to install this package.') try: from sympy impor...
import sublime, sublime_plugin def advance_to_first_non_white_space_on_line(view, pt): while True: c = view.substr(pt) if c == " " or c == "\t": pt += 1 else: break return pt def has_non_white_space_on_line(view, pt): while True: c = view.substr(pt) if c == " " or c == "\t": pt += 1 else: ...
#!/usr/bin/env python """Colette search.""" from telegram.ext.dispatcher import run_async from yahoo_finance import Share from google import google class Search: """Do searches for things (google, stocks, images, etc).""" def __init__(self, testing=False): """Assign variables.""" self.testin...
#!/usr/bin/python # logging.basicConfig? # logging.Formatter? # man data or time.strftime(). # https://docs.python.org/2/library/subprocess.html # cronjob or scheduler # import logging.handlers for rest all handlers. from subprocess import Popen,PIPE from logging.handlers import SysLogHandler import logging #logging....
# -*- coding: utf-8 -*- import os import sys import math from pathlib import Path import scipy.misc import h5py import numpy as np import tensorflow as tf import torch import torch.nn as nn import click from models.slim.nets.inception_v3 import ( inception_v3, inception_v3_arg_scope) import inception_v3_fullc...
#!/usr/bin/env python from __future__ import print_function __author__ = "Matija Amidzic <matija.amidzic@sartura.hr>" __copyright__ = "Copyright 2018, Deutsche Telekom AG" __license__ = "BSD 3-Clause" # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance wi...
import unittest from asq.queryables import Queryable __author__ = "Sixty North" class TestSingle(unittest.TestCase): def test_single(self): a = [5] b = Queryable(a).single() self.assertEqual(b, 5) def test_single_empty(self): a = [] self.assertRaises(ValueError, lambd...
""":mod:`numpy.ma..mrecords` Defines the equivalent of :class:`numpy.recarrays` for masked arrays, where fields can be accessed as attributes. Note that :class:`numpy.ma.MaskedArray` already supports structured datatypes and the masking of individual fields. :author: Pierre Gerard-Marchant """ #!!!: * We sho...
from decimal import Decimal as D import uuid from django.contrib.auth.models import AbstractUser from django.db import models from .querysets.loans import * from .abstract import ExtraField, LedgerBalance from ajabsacco.core.codes.loans import * TRANSACTION_TYPES = ( (TRANSACTION_TYPE_LOAN_DISBURSAL, "Loan Disb...
""" Django settings for cart project. Generated by 'django-admin startproject' using Django 1.9.6. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import os from ...
# -*- coding: utf-8 -*- # Copyright 2006-2007 Lukas Lalinsky # # 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 gi....
import pytest from theworldfoundry.modes import ActionMode def test_move(player, courtyard): player.perform("go north") assert player.saw("Courtyard") def test_move_invalid(player, courtyard): player.perform("go fish") assert player.saw("unable") def test_move_sartre(player): player.perform("...
from __future__ import unicode_literals import threading import pkg_resources __version__ = pkg_resources.get_distribution('pyspotify').version # Global reentrant lock to be held whenever libspotify functions are called or # libspotify owned data is worked on. This is the heart of pyspotify's thread # safety. _lo...
# Copied from django with some modifications import copy class MultiValueDict(dict): """ A subclass of dictionary customized to handle multiple values for the same key. >>> d = MultiValueDict({'name': ['Adrian', 'Simon'], 'position': ['Developer']}) >>> d['name'] 'Simon' >>> d.getlist('n...
#!/usr/bin/env python # Copyright 2014, Rackspace US, 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 applicabl...
""" Protocol wire types """ import struct from StringIO import StringIO import logging _LOG = logging.getLogger(__name__) __all__ = [ 'MySQLDataType', 'FixedLengthString', 'RestOfPacketString', 'LengthEncodedString', 'NulTerminatedString', 'FixedLengthInteger', 'LengthEncodedInteger', ...
from ._baseclass import ArtBaseClass import requests try: from thread import start_new_thread, allocate_lock except: from _thread import start_new_thread, allocate_lock import logging from opc.image import Image def position(matrix, image): x = 0 y = 0 while y < (image.height-matrix.height): ...
#!/usr/bin/env python # Check a CSV file for Benford's Law compliance import csv import sys import codecs import cgi import os import cgitb from collections import defaultdict from itertools import imap CSV_DIR = '../csv/' # CSV upload directory GROUPING_DEFAULT = 'todos' # No grouping column # Decimal digits...
# -*- coding: utf-8 -*- # EFILTER Forensic Query Language # # Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/li...
#!/usr/bin/python import numpy as np import matplotlib.mlab as mlab import matplotlib.pyplot as plt #reads a space delimited file with a header and returns a dictionary #attempts to cast dictionary entries into floats, if it fails, leaves as is def readSpaceDelimitedFile(filename): f = open(filename, 'r') hea...
import os from setuptools import find_packages, setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() def requirements(fname): return [line.strip() for line in open(os.path.join(os.path.dirname(__file__), fname))] setup( name="revscoring", version="0...
"""SCons.Tool.rpm Tool-specific initialization for rpm. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. The rpm tool calls the rpmbuild command. The first and only argument should a tar.gz consisting of the sourc...
# -*- coding: utf-8 -*- from django.db import models, migrations import datetime class Migration(migrations.Migration): dependencies = [ ('rules', '0030_auto_20150103_1136'), ] operations = [ migrations.AlterField( model_name='category', name='created_date', ...
# # BigBrotherBot(B3) (www.bigbrotherbot.net) # Copyright (C) 2010 GrosBedo # # 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 ver...
from django.db import models class EncounterManager(models.Manager): def enemy_npcs(self): pass def friendly_npcs(self): pass def players(self): return super(EncounterManager, self).get_queryset().filter(character__player_owned=True) class Encounter(models.Model): name = mo...
from django.db import models # Create your models here. class Publisher(models.Model): name = models.CharField(max_length = 30) address = models.CharField(max_length = 50) city = models.CharField(max_length = 60) state_province = models.CharField(max_length = 30) country = models.CharField(max_len...
# coding: utf-8 from django.test import TestCase from django.conf import settings from django_th.publishing_limit import PublishingLimit class PublishingLimitTestCase(TestCase): def test_settings(self): self.assertTrue('publishing_limit' in settings.DJANGO_TH) def test_get_data(self): cach...
# -*- coding: utf-8 -*- from nettool.hostname import Hostname from nettool.hostname_list import HostnameList from nettool.utilities import raise_type_exception class Host(HostnameList): """ Represents all the names and IPs referring to the same host """ def __init__(self, value, ip=None): super(Host...
#!/usr/bin/env python # Copyright (c) 2014, Paessler AG <support@paessler.com> # All rights reserved. # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the # following conditions are met: # 1. Redistributions of source code must retain the above copyright not...
# WARNING: Do not edit by hand, this file was generated by Crank: # # https://github.com/gocardless/crank # class MandateImportEntry(object): """A thin wrapper around a mandate_import_entry, providing easy access to its attributes. Example: mandate_import_entry = client.mandate_import_entries.get(...
import pytest import sys from tornado import gen _used_fixture = False @gen.coroutine def dummy(io_loop): yield gen.sleep(0) raise gen.Return(True) @pytest.fixture(scope='module') def preparations(): global _used_fixture _used_fixture = True pytestmark = pytest.mark.usefixtures('preparations') ...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
# # Race Capture App # # Copyright (C) 2014-2017 Autosport Labs # # This file is part of the Race Capture App # # This 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 ...
# -*- coding: utf-8 -*- # # LightFM documentation build configuration file, created by # sphinx-quickstart on Thu Apr 21 12:26:52 2016. # # 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. # # A...
import re import xmlrpclib import urllib from backlinks.exceptions import fault_code_to_client_error, \ BacklinkClientError, BacklinkClientRemoteError, \ BacklinkClientConnectionError, BacklinkClientServerDoesNotExist,\ BacklinkClientAccessDenied, BacklinkClientInvalidResponse from backlinks.conf import se...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Application configuration. # Copyright (c) 2009 happychickoo. # # The MIT License # # 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 res...
# -*- coding: utf-8 -*- # Copyright 2020 Google 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...
#!/usr/bin/env python # -*- coding: utf-8 -*- #https://github.com/paramaggarwal/CarND-Advanced-Lane-Lines/blob/master/Notebook.ipynb from __future__ import print_function from __future__ import division import sys import traceback import rospy import numpy as np import cv2 import pickle import glob import time import m...
from LOTlib.Grammar import Grammar from LOTlib.Miscellaneous import q def makeGrammar(objects, nterms=['Tree', 'Set', 'Gender', 'Generation', 'Ancestry', 'Paternity', 'English'], terms=['X', 'objects', 'all'], recursive=False, words=None, compositional=True, abstractP=10.0): """ Define a unif...
import os from glob import glob from setuptools import setup, find_packages from distutils.command.build import build TOP_SRCDIR = os.path.abspath(os.path.dirname(__file__)) def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() def etc_files(): return [(d, [os.path.join(d, f) ...
'''game of mangorona. goal: keep more pawn on the board than your opponent. movement: move your pawn to an unoccupied place. pick: fill or create an empty place beetwen your pawn and your opponent's, and pick all opponent pawn in the same line of movement. ''' import sys import random import time...
# Copyright 2013 OpenStack Foundation # Copyright 2013 Rackspace Hosting # Copyright 2013 Hewlett-Packard Development Company, L.P. # 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 co...
# Copyright 2017 The Forseti Security 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 ap...
# This file is part of xrayutilities. # # xrayutilities 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. # # This program is distributed...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import argparse import copy import numpy as np np.random.seed(0) import chainer import chainer.functions as F import chainer.links as L from chainer import cuda from chainer import optimizers from rlglue.agent.Agent import...
from __future__ import print_function, division import csv import xlsxwriter import StringIO import datetime import simplejson as json from pprint import pformat as pf def export_search_results_csv(targs): table_data = json.loads(targs['export_data']) table_headers = table_data['headers'] table_rows =...
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.8.2 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re ...
# -*- coding: utf-8 -*- import datetime from unittest import TestCase from forgery_py.forgery import date class DateForgeryTestCase(TestCase): def test_day_of_week(self): result = date.day_of_week() assert result in date.DAYS result = date.day_of_week(abbr=True) assert result in...
from rauth import OAuth2Service from flask import current_app, url_for, request, redirect class OAuthSignIn(object): providers = None def __init__(self, provider_name): self.provider_name = provider_name credentials = current_app.config['OAUTH_CREDENTIALS'][provider_name] self.consume...
# # Copyright 2009, Niels Sascha Reedijk <niels.reedijk@gmail.com> # All rights reserved. Distributed under the terms of the MIT License. # # debug from pprint import pprint from pkg_resources import resource_filename from genshi import HTML from genshi.builder import tag from genshi.filters.transform import Tra...
import psycopg2 from flask import Flask from flask import render_template, request from flask import Blueprint, current_app,session,redirect, url_for #declaring sub app with blueprint tags_app = Blueprint('tags_app', __name__) @tags_app.route('/add_tag/<photo_id>/', methods=["POST"]) def add_tag(photo_id): # a po...
# -*- coding: utf-8 -*- # Copyright Puzzlebox Productions, LLC (2010-2012) # # This code is released under the GNU Pulic License (GPL) version 2 # For more information please refer to http://www.gnu.org/copyleft/gpl.html __changelog__ = """\ Last Update: 2012.04.23 """ __todo__ = """ """ ### IMPORTS ### import os, ...
from google.appengine.ext import db from .. import utils from main_handler import Handler class Welcome(Handler): """Handler for welcome page""" def count(self): # Collecting statistics for user # Count blog posts by user p = db.GqlQuery("""SELECT * FROM Posts W...
import toto import zmq import cPickle as pickle import zlib import logging from toto.exceptions import * from toto.workerconnection import WorkerConnection from threading import Thread from tornado.options import options from tornado.gen import Task from collections import deque from zmq.eventloop.ioloop import ZMQPoll...
# -*- coding: utf-8 -*- """ Programmatic integration point for User API Accounts sub-application """ import datetime from pytz import UTC from django.utils.translation import override as override_language, ugettext as _ from django.db import transaction, IntegrityError from django.core.exceptions import ObjectDoesNotE...
# Copyright (c) 2014 Artem Rozumenko (artyom.rozumenko@gmail.com) # # 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 b...
#!/usr/bin/env python # Licensed under a 3-clause BSD style license - see LICENSE.rst # NOTE: The configuration for the package, including the name, version, and # other information are set in the setup.cfg file. import os import sys from setuptools import setup # First provide helpful messages if contributors try...
# -*- coding: utf-8 -*- from __future__ import print_function # pylint: disable-msg=W0612,E1101 from copy import deepcopy from datetime import datetime, timedelta, time import sys import operator import re import csv import nose import functools import itertools from itertools import product from distutils.version imp...
#!/usr/bin/env python """ Duke Simulation for NCEAS FACE experiment Site History: ------------- * Pre-1850 temperate broadleaved deciduous forest * Harvest forest. * Grassland from 1850-1982, mowed (+/- annually - DO NOT SIMULATE MOWING :P) * burnt prior to planting * At start of experiment aboveground biomass 5.5-1...
# Copyright 2012 Nebula, 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 agree...
# -*- coding: utf-8 -*- # Copyright 2017 GIG Technology NV # # 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...
import time import threading # @include class SpellCheckService: w_last = closest_to_last_word = None lock = threading.Lock() @staticmethod def service(req, resp): w = req.extract_word_to_check_from_request() result = None with SpellCheckService.lock: if w == Spell...
# -*-coding:Utf-8 -* # Copyright (c) 2012 LE GOFF Vincent # 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 above copyright notice, this # l...
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2001-2007 Donald N. Allingham # Copyright (C) 2009-2010 Nick Hall # # 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 v...
import logging logger = logging.getLogger(__name__) logger.addHandler(logging.NullHandler()) class DeviceLoader(object): device_classes = { # device_type : getattr(module, class_name) } def load_device_class(self, device_type, device_class): logger.info('Loading class for device type: {d...
"""The graphical representation of connections of nodes""" import math from PyQt4 import QtCore, QtGui from Core.Item import * from Core.globals import options, mainWidgets, defaultOptions class Edge(QtGui.QGraphicsLineItem, Item): def __init__(self, startItem, endItem, parent=None, scene=None): ...
#!/usr/bin/env python import rospy import smach import numpy as np from std_msgs.msg import Float64 from dynamixel_msgs.msg import JointState class OpenGripper(smach.State): def __init__(self): smach.State.__init__(self, outcomes = ['success', 'in_progress', 'fail']) self.joint4 = rospy.Publishe...
from .grids import Simple_Grid class Robot(object): def __init__(self, name, grid=None): self.name = name if grid == None: grid = Simple_Grid(20) self.grid = grid start_pos = self.grid.free_position() if start_pos == None: raise ValueError("No space...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe import HTMLParser import smtplib from frappe import msgprint, throw, _ from frappe.email.smtp import SMTPServer, get_outgoing_email_account from frappe.email.email_b...
import urllib2 import re def convert(input_url): '''return a dictionary as documented in __init__.py ''' # Example higherpraise.com content # <div aligni="center"><!-- #BeginEditable "1" --> # <table attrs=". . . "> # ... # <h1 align="center"><b><font class="default"><u> # Title text </u...
import sys import math """A Shakespeare Compiler written in Python, splc.py This is a compiler that implements the majority of the Shakespeare programming language invented by Kalle Hasselstrom and Jon Aslund, I take no credit for inventing the language. This software is free to edit or use, and though I doubt anyone ...
# Copyright (c) 2016 Sippy Software, Inc. All rights reserved. # # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this ...
#!/usr/bin/env python # Module: paramiko_test1.py # Purpose: test paramiko for SSH connections w/ keyless SSH and exceptions # Date: N/A # Notes: # 1) Paramiko home: # http://www.paramiko.org/ # 2) Multiple SSH discussions about Python # http://stackoverflow.com/questions/3586106/perform-commands-over-...
#!/usr/bin/env python # Copyright 2011 The fast-python-pb Authors. # # 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 a...
# -*- coding: utf-8 -*- # ================================================================= # # Authors: Tom Kralidis <tomkralidis@gmail.com> # Angelos Tzotsos <tzotsos@gmail.com> # # Copyright (c) 2016 Tom Kralidis # Copyright (c) 2015 Angelos Tzotsos # Copyright (c) 2016 James Dickens # Copyright (c) 2016 Ri...
import sys from math import pi def waarde_van_data(): for b in range(1, 10): for i in range(1, 10): digits_used = {b} if i in digits_used: continue i_string = str(i) for g in range(1, 10): digits_used = {b, i} ...
# -*- coding: utf-8 -*- # # hsp/apps.py # # Copyright (C) 2011-19 Tomáš Pecina <tomas@pecina.cz> # # This file is part of legal.pecina.cz, a web-based toolbox for lawyers. # # This application is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published b...
from __future__ import division from sympy import (Add, Basic, S, Symbol, Wild, Float, Integer, Rational, I, sin, cos, tan, exp, log, nan, oo, sqrt, symbols, Integral, sympify, WildFunction, Poly, Function, Derivative, Number, pi, NumberSymbol, zoo, Piecewise, Mul, Pow, nsimplify, ratsimp, trigsimp, rads...
from __future__ import print_function from bitarray import bitarray import pyhuffman.pyhuffman as pyhuffman """ A test case that can also be used as example, about how to build trees. """ def test_valid_dicts(): # example of data: frequencies in the alphabet for typical english text # this data is from: http...
# -*- coding: utf-8 -*- # Copyright © 2006 Steven J. Bethard <steven.bethard@gmail.com>. # # Redistribution and use in source and binary forms, with or without # modification, are permitted under the terms of the 3-clause BSD # license. No warranty expressed or implied. # For details, see the accompanying file LICE...
import numpy as np import pandas as pd import pyflux as pf # Set up some data to use for the tests noise = np.random.normal(0,1,400) y = np.zeros(400) x1 = np.random.normal(0,1,400) x2 = np.random.normal(0,1,400) for i in range(1,len(y)): y[i] = 0.9*y[i-1] + noise[i] + 0.1*x1[i] - 0.3*x2[i] data = pd.DataFrame(...
# -*- coding: utf-8 -*- """ proxy.py ~~~~~~~~ ⚡⚡⚡ Fast, Lightweight, Pluggable, TLS interception capable proxy server focused on Network monitoring, controls & Application development, testing, debugging. :copyright: (c) 2013-present by Abhinav Singh and contributors. :license: BSD, see LICENSE...
AUTH_LOGIN_RESPONSE = { "EZMessage":{ "data":{ "lastName":"Doe", "funded":"true", "nasdaq":{ "professional":"false", "agree":"true" }, "authToken":"b7b426ef-8e20-46f1-bad6-1244f0b6de02", "nyse":{ "professional":"false", ...