gt
stringclasses
1 value
context
stringlengths
2.49k
119k
''' lol, i really really wasn't expecting this to turn into a serious disassembler... ''' from . import optable,decoder,modrm # XXX: figure out how to add these explicit imports to the doc output # for this module. (without having to use __all__) from .decoder import isprefix,consume,decodeInteger,encodeIntege...
# coding: utf-8 from __future__ import absolute_import import functools import re from flask.ext import login from flask.ext import wtf from flask.ext.oauthlib import client as oauth from google.appengine.ext import ndb import flask import unidecode import wtforms import cache import config import model import task...
# Copyright 2018 Microsoft Corporation # # 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...
"""Let's Encrypt CLI.""" # TODO: Sanity check all input. Be sure to avoid shell code etc... import argparse import atexit import functools import logging import logging.handlers import os import pkg_resources import sys import time import traceback import configargparse import configobj import OpenSSL import zope.com...
# # Copyright 2017 CNIT - Consorzio Nazionale Interuniversitario per le Telecomunicazioni # # 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/LICE...
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
"""Template helper methods for rendering strings with Home Assistant data.""" from datetime import datetime import json import logging import math import random import base64 import re import jinja2 from jinja2 import contextfilter from jinja2.sandbox import ImmutableSandboxedEnvironment from jinja2.utils import Names...
from common_fixtures import * # NOQA from cattle import ApiError from test_physical_host import disable_go_machine_service # NOQA @pytest.fixture(scope='module') def update_ping_settings(request, super_client): # These settings need changed because they control how the logic of the # ping handlers behave in...
# 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 ...
# ******************************************* # Copyright 2010-2015, Anthony Hand # # # File version 2015.05.13 (May 13, 2015) # Updates: # - Moved MobileESP to GitHub. https:#github.com/ahand/mobileesp # - Opera Mobile/Mini browser has the same UA string on multiple platforms and doesn't differentiate phone vs. tablet...
""" This is a uniform signal sampler. |br| The modules samples the given signals uniformly. |br| *Examples*: Please go to the *examples/acquisitions* directory for examples on how to use the sampler. |br| *Settings*: Parameters of the sampler are described below. Take a look on '__parametersDefine'...
# -*- coding: utf-8 -*- """ Created on Mon Mar 9 14:58:39 2015 @author: jpk This script produces a report of observations taken the last 7 days at SALT and print it out on the terminal and writes it to a file. The script runs from today and queries the sdb for data going back 7 days. """ import os import sys impo...
from datetime import timedelta from django import VERSION as DJANGO_VERSION from django.contrib.auth.models import Group, Permission from django.test import TestCase from django.urls import reverse from django.utils import timezone from freezegun import freeze_time from wagtail.admin.log_action_registry import LogAct...
# -*- coding: utf-8 -*- ''' :maintainer: Evan Borgstrom <evan@borgstrom.ca> Pythonic object interface to creating state data, see the pyobjects renderer for more documentation. ''' from __future__ import absolute_import import inspect import logging from salt.utils.odict import OrderedDict import salt.ext.six as six ...
# orm/relationships.py # Copyright (C) 2005-2013 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Heuristics related to join conditions as used in :func:`.relationship`. Provi...
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import copy import six import warnings from itertools import chain from datetime import datetime try: from collections import OrderedDict except ImportError: from django.utils.datastructures import SortedDict as OrderedDict fro...
from sqlalchemy import Table, ForeignKey, Column, Boolean, Integer, Float, String, TIMESTAMP, LargeBinary, sql from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.ext.hybrid import hybrid_property from sqlalchemy.orm import relationship #Module used to map the tables from Genologics's Postgres inst...
import os, sys; import h5py, user_config, cppext; from numpy import *; from share_fun import val_def; from functions import generate_Umatrix; def init_solver(parms, np): solver_type = parms['SOLVER_TYPE']; print '%s solver is used...'%solver_type; input_args = { 'solver_path' : parms.get('SOLV...
# remote.py # Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors # # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php # Module implementing a remote object allowing easy access to git remotes from exc import GitCommand...
<<<<<<< HEAD <<<<<<< HEAD """ A simple JSON REST request abstraction layer that is used by the ``dropbox.client`` and ``dropbox.session`` modules. You shouldn't need to use this. """ import io import pkg_resources import socket import ssl import sys import urllib.request, urllib.parse, urllib.error try: import js...
r"""Functions for exclusive $B\to V\ell\nu$ decays.""" from math import sqrt, pi, cos, sin import flavio from flavio.physics.bdecays.common import lambda_K, meson_quark, meson_ff from flavio.physics.bdecays.wilsoncoefficients import wctot_dict from flavio.physics import ckm from flavio.classes import AuxiliaryQuantity...
from swift.common.internal_client import InternalClient from swift.common.exceptions import DiskFileXattrNotSupported, DiskFileNoSpace from swift.common.exceptions import DiskFileNotExist from swift.obj.diskfile import get_data_dir as df_data_dir, _get_filename from swift.common.request_helpers import get_name_and_plac...
import calendar import urllib from datetime import timedelta from typing import Any, Dict from unittest.mock import patch import lxml.html import orjson from django.conf import settings from django.http import HttpResponse from django.utils.timezone import now as timezone_now from corporate.models import Customer, Cu...
''' A pure python version of the hdr_histogram code Ported from https://github.com/HdrHistogram/HdrHistogram (Java) https://github.com/HdrHistogram/HdrHistogram_c (C) Written by Alec Hothan Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License...
""" TODO - [ ] Get Fission code working - [ ] Display singles / doubles sinograms and backprojections - [ ] Precalc all the detector probability stuff - [ ] Use precalc if available - [ ] Calculate changing p - [ ] Include changing p calculations """ import numpy as np import matplotlib.pyplot as plt import t...
# django imports from django.contrib.contenttypes.models import ContentType # workflows imports from permissions.models import ObjectPermission from permissions.models import ObjectPermissionInheritanceBlock from workflows.models import StateInheritanceBlock from workflows.models import StateObjectRelation from workfl...
#!/usr/bin/env python ''' By replacing the 1st digit of the 2-digit number *3, it turns out that six of the nine possible values: 13, 23, 43, 53, 73, and 83, are all prime. By replacing the 3rd and 4th digits of 56**3 with the same digit, this 5-digit number is the first example having seven primes among the ten gener...
# NEEDS FIXING # -*- coding: utf-8 -*- ''' fantastic Add-on 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 later versio...
"""Tests for certbot._internal.hooks.""" import unittest try: import mock except ImportError: # pragma: no cover from unittest import mock from certbot import errors from certbot import util from certbot.compat import filesystem from certbot.compat import os from certbot.tests import util as test_util class...
# !/usr/bin/env python3 # Copyright (c) 2019 The NPCcoin developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Covers the scenario of two valid PoS blocks with same height and same coinstake input. ''' from copy import d...
# Copyright 2019 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 agreed to in writing, s...
# -*- coding: utf-8 -*- from __future__ import division from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals import io import six import time import unicodecsv import tableschema from apiclient.http import MediaIoBaseUpload from .mapper import Mapper # ...
#!/usr/bin/env python # -- coding: utf-8 -- # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (th...
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt """Tests for coverage.data""" import glob import os import os.path import re import sqlite3 import threading from unittest import mock import pytest from coverag...
# Copyright (c) 2013 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
# BEGIN_COPYRIGHT # # Copyright 2009-2018 CRS4. # # 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 ...
import argparse import itertools import logging import os import re import simplejson as json from Bio.PDB.PDBParser import PDBParser from Bio.PDB import NeighborSearch from config import PDB_RESIDUE_TYPES_BY_RESIDUE LEVEL_MAP = { 'A': 'atom', 'R': 'residue', 'C': 'chain' } # MATCHES PDB ACCESSIONS # E...
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import json import os from catapult_base.dependency_manager import dependency_info from catapult_base.dependency_manager import exceptions class BaseConfi...
import datetime from django.conf import settings from django.core.exceptions import FieldError from django.db.backends.utils import truncate_name from django.db.models.constants import LOOKUP_SEP from django.db.models.expressions import ExpressionNode from django.db.models.query_utils import select_related_descend, Qu...
# Copyright (c) 2015, BROCADE COMMUNICATIONS SYSTEMS, INC # 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 list...
# $Author: norbert $ # $Date: 2014-08-03 20:34:12 +0200 (So, 03 Aug 2014) $ # $Revision: 252 $ import os import sys import string import argparse import shlex import platform import traceback import subprocess import email import smtplib import itertools import logging import tempfile import locale from email.mime.tex...
from lxml import etree import json import os import tempfile from compare import ensure, expect from django.conf import settings from django.core.urlresolvers import reverse from django.core.files.uploadedfile import TemporaryUploadedFile from django.test import TestCase from django.test.client import Client from nose...
#!/usr/bin/env python # # Copyright 2016 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/licenses/LICENSE-2.0 # # Unless require...
# -*- coding: utf-8 -*- """ Base definitions for models of programs. ** under construction ** """ from __future__ import (absolute_import, division, print_function, unicode_literals) import collections from grako.util import asjson, asjsons, Mapping, builtins from grako.exceptions import Seman...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Plotting terminal based histograms """ from __future__ import print_function from __future__ import division import os import sys import math import optparse from os.path import dirname from .utils.helpers import * from .utils.commandhelp import hist def calc_bins(...
#!/usr/bin/env python # -- coding: utf-8 -- # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (th...
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.utils.rnn as rnn_utils from metal.utils import set_seed class Encoder(nn.Module): """The Encoder implements the encode() method, which maps a batch of data to encoded output of dimension [batch_size, max_seq_len, encoded_size]...
## # Copyright (c) 2005-2014 Apple 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/licenses/LICENSE-2.0 # # Unless required by applicable l...
""" Wrapper for the Evernote Python SDK """ from __future__ import print_function from __future__ import division import datetime from time import sleep import arrow from itertools import islice import logging from evernote.api.client import EvernoteClient from evernote.edam.type.ttypes import Note from evernote.ed...
# -*- coding: utf-8 -*- import pytest import sys from .as_status_codes import AerospikeStatus from .index_helpers import ensure_dropped_index from aerospike import exception as e aerospike = pytest.importorskip("aerospike") try: import aerospike except: print("Please install aerospike python client.") sys...
#!/usr/bin/env python """ Botan install script (C) 2014,2015,2017 Jack Lloyd Botan is released under the Simplified BSD License (see license.txt) """ import errno import json import logging import optparse # pylint: disable=deprecated-module import os import shutil import sys import subprocess import traceback def...
""" Python Character Mapping Codec generated from 'VENDORS/APPLE/ARABIC.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,input,errors='strict'): ...
""" Trains an agent with Deep Q Learning or Double DQN on Breakout. Uses OpenAI Gym. """ import sys import os sys.path.insert(0,os.path.expanduser('~/Library/Python/2.7/lib/python/site-packages/')) import numpy as np import cPickle as pickle import gym from optparse import OptionParser import itertools import random ...
# 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/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
#!/usr/bin/env python3 # # 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 "Li...
# =============================================================================== # Copyright 2012 Jake Ross # # 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/licens...
import unittest import fsm class Test(unittest.TestCase): def setUp(self): self.clr_A() self.clr_B() self.clr_C() self.clr_D() self.clr_E() self.clr_F() def set_A(self, event=None): self.A = True def clr_A(self, event=None): sel...
from flask import render_template, request, redirect, abort, jsonify, url_for, session, Blueprint from CTFd.utils import sha512, is_safe_url, authed, admins_only, is_admin, unix_time, unix_time_millis, get_config, set_config, sendmail, rmdir from CTFd.models import db, Teams, Solves, Challenges, WrongKeys, Keys, Tags, ...
"""Command line wrapper for samtools""" # Last Checked with samtools [0.1.20 and 1.2] # TODO samtools 1.x has additional options over 0.x which # are missing from this wrapper from __future__ import print_function from Bio.Application import _Option, _Argument, _Switch from Bio.Application import AbstractCommandline,...
# coding: utf-8 # Copyright 2017 video++ Project, SJTU MediaLab # # 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 2017 The TensorFlow 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 applica...
# -*- coding: utf-8 -*- """ZeroMQ implementations of the Plaso queue interface.""" from __future__ import unicode_literals import abc import errno import threading import time # The 'Queue' module was renamed to 'queue' in Python 3 try: import Queue # pylint: disable=import-error except ImportError: import queu...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'SpeakerConference' db.create_table(u'p3_speakerconference...
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under...
#!/usr/bin/env python # Copyright 2015 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. """MB - the Meta-Build wrapper around GYP and GN MB is a wrapper script for GYP and GN that can be used to generate build files for se...
# Copyright 2008-2009 Owen Taylor # # This file is part of Reinteract and distributed under the terms # of the BSD license. See the file COPYING in the Reinteract # distribution for full details. # ######################################################################## import os import gobject import gtk import pang...
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "violin" _path_str = "violin.marker" _valid_props = {"color", "line", "opacity", "outliercolo...
from test_map_base import TestMapBase from unittest.mock import call, patch from werkzeug.datastructures import OrderedMultiDict from io import BytesIO from mrt_file_server.utils.nbt_utils import load_compressed_nbt_file, get_nbt_map_value import os import pytest class TestMapUpload(TestMapBase): def setup(self): ...
# Copyright 2007 by Tiago Antao <tiagoantao@gmail.com>. All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. """Utility functions for working with FDist (DEPRECATED).""" from Bio.Po...
__author__ = 'chris' import json import os from txrestapi.resource import APIResource from txrestapi.methods import GET, POST, DELETE from twisted.web import server from twisted.web.resource import NoResource from twisted.web import http from twisted.internet import defer, reactor from binascii import unhexlify from co...
# This file is part of beets. # Copyright 2016, Malte Ried. # # 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, modi...
#!/usr/bin/env python # # GrovePi Python library # v1.2.2 # # This file provides the basic functions for using the GrovePi # # The GrovePi connects the Raspberry Pi and Grove sensors. You can learn more about GrovePi here: http://www.dexterindustries.com/GrovePi # # Have a question about this example? Ask on the for...
from PyQt5 import QtCore, QtWidgets from PyQt5.QtWidgets import QSizePolicy from plotcontrols import PlotControls from matplotlib.backends.backend_qt5 import NavigationToolbar2QT from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg from matplotlib.backend_bases import key_press_handler from matplotlib.figur...
# Copyright 2020 The TensorFlow 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 applica...
# Copyright 2012-2013, Andrey Kislyuk and argcomplete contributors. # Licensed under the Apache License. See https://github.com/kislyuk/argcomplete for more info. from __future__ import print_function, unicode_literals, division, absolute_import import os, sys, argparse, contextlib, subprocess, locale, re import io ...
# Copyright 2015 The TensorFlow 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 applica...
from __future__ import print_function, division import abc import numpy as np from numpy.linalg import slogdet import math from scipy import stats from scipy.special import gammaln, multigammaln LOG2PI = math.log(2*math.pi) LOG2 = math.log(2) LOGPI = math.log(math.pi) class CollapsibleDistribution(object): ""...
#Written by: Holguer A Becerra. #Based on Brian Bennett Visual C++ Code import serial SupportedProgRomBanks=2; SupportedChrRomBanks=1;# DbgPacketOpCodeEcho = 0x00 # echo packet body back to debugger DbgPacketOpCodeCpuMemRd = 0x01 # read CPU memory DbgPacketOpCodeCpuMemWr = 0x02 # wri...
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import datetime import ipaddress from email.utils import parseaddr impo...
import logging import re import sys import html5lib from html5lib.sanitizer import HTMLSanitizer from html5lib.serializer.htmlserializer import HTMLSerializer from encoding import force_unicode from sanitizer import BleachSanitizer VERSION = (1, 1, 1) __version__ = '.'.join(map(str, VERSION)) __all__ = ['clean', '...
"""Elpy backend using the Rope library. This backend uses the Rope library: http://rope.sourceforge.net/ """ import os import time import rope.contrib.codeassist import rope.base.project import rope.base.libutils import rope.base.exceptions import rope.contrib.findit from elpy import rpc import elpy.pydocutils V...
from __future__ import division, print_function, absolute_import import numpy as np import tables import warnings from scipy import sparse try: import pandas as pd _pandas = True except ImportError: _pandas = False from deepdish import six IO_VERSION = 8 DEEPDISH_IO_PREFIX = 'DEEPDISH_IO' DEEPDISH_IO_VER...
""" Support for LED lights that can be controlled using PWM. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/light.pwm/ """ import logging import voluptuous as vol from homeassistant.const import CONF_NAME, CONF_TYPE from homeassistant.components.light ...
"""Basic types for building a reconstruction.""" import numpy as np import cv2 class Pose(object): """Defines the pose parameters of a camera. The extrinsic parameters are defined by a 3x1 rotation vector which maps the camera rotation respect to the origin frame (rotation) and a 3x1 translation vec...
# Copyright (c) 2013 Rackspace Hosting # 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 req...
import logging import numpy as np import threading logger = logging.getLogger(__name__) class Filter: """Processes input, possibly statefully.""" def apply_changes(self, other, *args, **kwargs): """Updates self with "new state" from other filter.""" raise NotImplementedError def copy(se...
__author__ = 'SolarLune' import math import time import collections import operator from bge import logic, constraints, types, render import mathutils from .math import sign lib_new_counter = 0 # Helper classes class Polygon(): def __init__(self, polygon): self.poly_data = polygon self.vert...
# Copyright (c) 2013 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
# # Element generator factory by Fredrik Lundh. # # Source: # http://online.effbot.org/2006_11_01_archive.htm#et-builder # http://effbot.python-hosting.com/file/stuff/sandbox/elementlib/builder.py # # -------------------------------------------------------------------- # The ElementTree toolkit is # # Copyright (...
import csv import gc from multiprocessing import Pool from os.path import dirname, join from random import shuffle import numpy as np from sklearn.cluster import Birch from sklearn.feature_extraction.text import CountVectorizer from sklearn.metrics import precision_recall_fscore_support from sklearn.svm import LinearS...
############################################################################### ## ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## "Redistribution and use in source and binary for...
import asyncio import signal import ssl import threading try: import aiohttp except ImportError: # pragma: no cover aiohttp = None from . import client from . import exceptions from . import packet from . import payload async_signal_handler_set = False def async_signal_handler(): """SIGINT handler. ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest from mock import MagicMock, call, patch from uiautomator import AutomatorDevice, Selector class TestDevice(unittest.TestCase): def setUp(self): self.device = AutomatorDevice() self.device.server = MagicMock() self.device.serve...
#!/usr/bin/env python """Visualizing Character State Reconstruction Results using TreeGraph2 """ ##################### # IMPORT OPERATIONS # ##################### from __future__ import absolute_import from __future__ import print_function import six from collections import OrderedDict as _ordDict from os.path impor...
# -*- coding: utf-8 -*- # # This file is part of PyBuilder # # Copyright 2011-2015 PyBuilder Team # # 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/l...
import json from django.contrib.auth.decorators import user_passes_test from django.core.urlresolvers import reverse from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render_to_response from django.template import RequestContext from crits.core.handlers import get_item_names from...
# -*- coding: utf-8 -*- # # Copyright 2020 BigML # # 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 ag...
# # Poradnia documentation build configuration file, created by # sphinx-quickstart on Fri Feb 12 06:34:12 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. # # All configuration values...
#!/usr/bin/env python # Copyright (c) 2013, Carnegie Mellon University # All rights reserved. # Authors: Michael Koval <mkoval@cs.cmu.edu> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # - Redistributions of source...
# (C) Fractal Industries, Inc. 2016 # (C) Datadog, Inc. 2010-2016 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) # stdlib from copy import deepcopy from datetime import datetime, timedelta from hashlib import md5 from Queue import Empty, Queue import re import ssl import time import traceb...