gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
#!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# Base class for RPC testing
import logging
import optparse
import os
import sys
import shutil
import te... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2013 Huawei Technologies Co., Ltd.
# Copyright (c) 2012 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
# ... | |
import gevent
import gevent.pool
import gevent.queue
import gevent.monkey; gevent.monkey.patch_all()
import itertools
import optparse
import os
import sys
import time
import traceback
import random
import yaml
import realistic
import common
NANOSECOND = int(1e9)
def reader(bucket, worker_id, file_names, queue, rand)... | |
from functools import partial
import logging
from django.conf import settings
from django.core.cache import caches
from django.core.exceptions import ValidationError, NON_FIELD_ERRORS
from django.db import models
from django.db.models.signals import post_save
from django.urls import reverse
from django.utils.translati... | |
import datetime
import warnings
import json
import mock
import sift
import unittest
import sys
import requests.exceptions
if sys.version_info[0] < 3:
import six.moves.urllib as urllib
else:
import urllib.parse
def valid_transaction_properties():
return {
'$buyer_user_id': '123456',
'$sell... | |
# 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 ... | |
"""
GPS Training GUI
The GPS Training GUI is used to interact with the GPS algorithm during training.
It contains the below seven functionalities:
Action Panel contains buttons for stop, reset, go, fail
Action Status Textbox displays action status
Algorithm Status Textbox displays algorithm st... | |
# -*- coding: utf-8 -*-
# fabfile for Django:
import time
import re
import os
import sys
from contextlib import contextmanager as _contextmanager
from fabric.api import *
from fabric.colors import *
from fabric.state import commands
from fabric.contrib.files import comment, uncomment
if sys.platform.startswith('linu... | |
#---------------------------------------------------------------------------
#
# DEnum: is a 'dynamic enum' trait whose values are obtained from
# another trait on the object.
#
# Caveat:
# The problem with this trait is that the listeners (for changes to
# the valid values) are added only when the attribute is ... | |
# Author: Alexander Fabisch -- <afabisch@informatik.uni-bremen.de>
# Author: Christopher Moody <chrisemoody@gmail.com>
# Author: Nick Travers <nickt@squareup.com>
# License: BSD 3 clause (C) 2014
# This is the exact and Barnes-Hut t-SNE implementation. There are other
# modifications of the algorithm:
# * Fast Optimi... | |
# Copyright (c) 2016-2018, Neil Booth
# Copyright (c) 2017, the ElectrumX authors
#
# All rights reserved.
#
# See the file "LICENCE" for information about the copyright
# and warranty status of this software.
'''History by script hash (address).'''
import array
import ast
import bisect
import time
from collections i... | |
"""
sentry.db.models.manager
~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import with_statement
import hashlib
import logging
import threading
import weakref
from django.conf import settings
from... | |
# 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... | |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module provides the tools used to internally run the astropy test suite
from the installed astropy. It makes use of the `pytest`_ testing framework.
"""
import os
import sys
import pickle
import warnings
import functools
import pytest
from astr... | |
# 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
# d... | |
import colorama
import logging
import os
import sys
import traceback
import warnings
from logging import (getLogger, CRITICAL, ERROR, WARNING, INFO, # noqa: F401
DEBUG)
from traceback import FrameSummary
from .iterutils import tween
from .platforms.host import platform_info
from .safe_str import ... | |
import os
import sys
def main(args):
if len(args) != 2:
print("Usage: python project-diff.py [path-to-project-1] [path-to-project-2]")
return
dir1 = args[0]
dir2 = args[1]
project1 = collect_text_files(dir1)
project2 = collect_text_files(dir2)
files_only_in_1 = []
files_only_in_2 = []
files_... | |
from coapthon.utils import parse_blockwise
from coapthon import defines
from coapthon.messages.option import Option
__author__ = 'Giacomo Tanganelli'
class Message(object):
"""
Class to handle the Messages.
"""
def __init__(self):
"""
Data structure that represent a CoAP message
... | |
"""Provide functionality to TTS."""
import asyncio
import ctypes
import functools as ft
import hashlib
import io
import logging
import mimetypes
import os
import re
from aiohttp import web
import voluptuous as vol
from homeassistant.components.http import HomeAssistantView
from homeassistant.components.media_player.c... | |
import datetime
import hashlib
import logging
import re
import threading
import types
from django.utils.encoding import force_unicode
logger = logging.getLogger(__name__)
class JSVar(unicode):
"""
A JS variable.
This is a simple Unicode string. This class type acts as a marker that this string is a JS ... | |
# -*- coding: utf-8 -*-
import json
import sys
import warnings
from django.conf import settings
from django.contrib.auth.models import AnonymousUser, Permission
from django.contrib.sites.models import Site
from django.core.cache import cache
from django.core.exceptions import ObjectDoesNotExist
from django.core.urlres... | |
# -*- coding: utf-8 -*-
"""
pygments.lexers.ml
~~~~~~~~~~~~~~~~~~
Lexers for ML family languages.
:copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer, include, bygroups, default, words
from... | |
## Copyright (c) 2003 Henk Punt
## 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,
#... | |
# pylint: disable=too-many-lines
"""
Component to interface with cameras.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/camera/
"""
import asyncio
import collections
from contextlib import suppress
from datetime import timedelta
import logging
import h... | |
# Copyright (c) 2013 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... | |
"""Kraken - objects.scene_item module.
Classes:
SceneItem - Base SceneItem Object.
"""
class SceneItem(object):
"""Kraken base object type for any 3D object."""
__maxId = 0
def __init__(self, name, parent=None, metaData=None):
super(SceneItem, self).__init__()
self._parent = parent
... | |
#!/usr/bin/python
"""
Browser.py Providing easy and extended control to the Selenium Webdriver API
This enables to use a selenium webdriver object in an exploit
"""
import os,sys,time,json
from os.path import isfile,isdir,abspath,dirname
import hashlib
import urllib
import platform
from urllib2 import URLError
import ... | |
# Copyright (c) 2017 Dirk Hartmann
#
# 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, distr... | |
#!/usr/bin/env python
# Test Harness to test the Game Controller Functionality
#
import requests # https://github.com/kennethreitz/requests/
import time
import random
#Replace this variables as appropriate
server_url = 'http://192.168.59.103:8080/api'
admin_header = {'X-Auth-Token': '1234'}
# Server Calls ------... | |
import os
import sys
import types
from . import common
from . import overrides
from . import _girepository
# major python version
if sys.version_info[0] == 2:
PY2, PY3 = True, False
elif sys.version_info[0] == 3:
PY2, PY3 = False, True
# cache used for modules and classes
_pygirepository = None
_pygirepository_modu... | |
# Copyright (c) 2014. Mount Sinai School of Medicine
#
# 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... | |
class ProcessTree:
"""ProcessTree encapsulates a process tree. The tree is built from log files
retrieved during the boot process. When building the process tree, it is
pruned and merged in order to be able to visualize it in a comprehensible
manner.
The following pruning techniques a... | |
import cairo
from color import Color, Gradient
# Helpers
def get_view_extents(area_position, area_length, area_total_length, total_items):
scale = float(area_total_length) / total_items
first_item = int(total_items * float(area_position) / area_total_length)
last_item = int(total_items * float(area_posit... | |
"""
what we have:
- show OR draw
- update, remove
- reserved identifiers
What we need:
show1: obj; returns id
show2: obj, id
draw1: obj, bbox; returns id
draw2: obj, bbox, id
draw3: obj, id
update1: id (draw or show)
update2: id, bbox (draw only)
update3: id, parameters (draw or show)
In addition:
boundingboxes... | |
import timeit
import numpy
import os
import sys
import theano
import theano.tensor
from Boards import *
from NeuralNetwork import *
from RuleLearner import RuleLearner
class NeuralNetworkRuleLearner(RuleLearner):
"""Neural network rule learner class
The class is a concrete RuleLearner implementation based o... | |
#!/usr/bin/env python2
#
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
from test_framework.mininode import *
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
import time
'''... | |
import numpy as np
import scipy.stats
import os
import logging
from astropy.tests.helper import pytest, catch_warnings
from astropy.modeling import models
from astropy.modeling.fitting import _fitter_to_model_params
from stingray import Powerspectrum, AveragedPowerspectrum
from stingray.modeling import ParameterEsti... | |
from basescript import BaseScript
import os
import gc
import sys
import json
import time
import code
import inspect
import logging
import resource
import string
import random
import threading
import msgpack
import cStringIO
import traceback
import urlparse
from multiprocessing.pool import ThreadPool
import statsd
imp... | |
# coding: utf-8
"""
Server API
Reference for Server API (REST/Json)
OpenAPI spec version: 2.0.6
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import sys
import os
import re
# python 2 and python 3 compatibility library
from six im... | |
from __future__ import unicode_literals
from datetime import datetime, timedelta
import threading
import warnings
from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned
from django.db import connections, DEFAULT_DB_ALIAS
from django.db import DatabaseError
from django.db.models.fields import F... | |
# Copyright 2016 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 appl... | |
import logging as log
import time
from collections import namedtuple
from tempfile import TemporaryDirectory
from . import batch_job
from . import git
from . import job
from . import merge_request as merge_request_module
from . import single_merge_job
from . import store
from .project import AccessLevel, Project
Merg... | |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
# IMPORTS ----------------------------------------------------------------------
import collections
import os
import re
import syslog
import tempfile
# ------------------------------------------... | |
""" A stylish alternative for caching your map tiles.
TileStache is a Python-based server application that can serve up map tiles
based on rendered geographic data. You might be familiar with TileCache
(http://tilecache.org), the venerable open source WMS server from MetaCarta.
TileStache is similar, but we hope simpl... | |
"""Utilities to evaluate models with respect to a variable
"""
# Author: Alexander Fabisch <afabisch@informatik.uni-bremen.de>
#
# License: BSD 3 clause
import warnings
import numpy as np
from .base import is_classifier, clone
from .cross_validation import _check_cv
from .externals.joblib import Parallel, delayed
fr... | |
# Copyright (C) 2014 Narf Industries <info@narfindustries.com>
#
# 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, m... | |
from __future__ import absolute_import
from mock import patch
from datetime import datetime
from django.core.urlresolvers import reverse
from sentry.models import (
Activity, Environment, File, Release, ReleaseCommit, ReleaseFile, ReleaseProject, ReleaseProjectEnvironment, Repository
)
from sentry.testutils impor... | |
from decimal import Decimal
import boto3
from boto3.dynamodb.conditions import Key
from botocore.exceptions import ClientError
import sure # noqa # pylint: disable=unused-import
import pytest
from moto import mock_dynamodb2
from uuid import uuid4
@mock_dynamodb2
def test_get_item_without_range_key_boto3():
cli... | |
#!/usr/bin/python
import irtk
import sys
import os
import numpy as np
import scipy.ndimage as nd
import cv2
import argparse
#from skimage.filter import denoise_tv_chambolle
#from irtk.ext.patches import extract_oriented_patches2D as extract_patches2D
from irtk.ext.patches import extract_patches2D
from lib.BundledSI... | |
# Copyright 2014 Google 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 writing, ... | |
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.cm as cm
import pandas as pd
from astropy.io import fits
from astropy.table import Table, join
from astropy.coordinates import SkyCoord
from astropy import units as u
from astropy.wcs import WCS
from photutils import aperture_photometry
from photutil... | |
import logging
import asyncio
import traceback
import collections
import time
class TerminateProcessing(Exception):
pass
class Element(object):
def __init__(self, downstream=None, logger=None):
self.logger = logger
self.downstream = downstream
self.profiler = None
def __rshift__... | |
from statsmodels.compat.python import lrange, lzip
from statsmodels.compat.numpy import recarray_select
import numpy as np
import numpy.lib.recfunctions as nprf
import pandas as pd
from pandas import DataFrame
from pandas.tseries import offsets
from pandas.tseries.frequencies import to_offset
from statsmodels.tools.v... | |
#!/usr/bin/env python
# This file is part of ObjectPath released under MIT license.
# Copyright (C) 2010-2014 Adrian Kalbarczyk
import sys, re
from .parser import parse
from objectpath.core import *
import objectpath.utils.colorify as color # pylint: disable=W0614
from objectpath.utils import flatten, filter_dict, t... | |
# pylint: disable=W0611
'''
Utils
=====
The Utils module provides a selection of general utility functions and classes
that may be useful for various applications. These include maths, color,
algebraic and platform functions.
.. versionchanged:: 1.6.0
The OrderedDict class has been removed. Use collections.Ordere... | |
# -*- coding:utf-8 -*-
import json
import time
import app
from app.main.controller import login_required
from elasticsearch.client import IndicesClient
from flask import render_template, session, redirect, url_for, current_app, request, Blueprint
monitorlog_blueprint = Blueprint('monitorlog_blueprint', __name__)
@mo... | |
# -*- coding: utf-8 -*-
"""
hyper/http20/bufsocket.py
~~~~~~~~~~~~~~~~~~~~~~~~~
This file implements a buffered socket wrapper.
The purpose of this is to avoid the overhead of unnecessary syscalls while
allowing small reads from the network. This represents a potentially massive
performance optimisation at the cost o... | |
#!/usr/bin/python
# BY DAVE, FOR TESTING GAITS
import time
import os
import sys
import pygame
import collections
import serial
import struct
EXPAND = 0
CONTRACT = 1
NUM_MOTORS = 4
TRANSMIT_DELAY = 0.8 # SECONDS
# TOGGLED WITH THE <TAB> KEY
CONTROL_MANUAL = 0
CONTROL_TRANSMIT = 1
CONTROL_WALK = 2
# ROBOT MOVING... | |
"""RyuApp shim between Ryu and Valve."""
# Copyright (C) 2013 Nippon Telegraph and Telephone Corporation.
# Copyright (C) 2015 Brad Cowie, Christopher Lorier and Joe Stringer.
# Copyright (C) 2015 Research and Education Advanced Network New Zealand Ltd.
# Copyright (C) 2015--2018 The Contributors
#
# Licensed under th... | |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import fileinput
import re
import subprocess
import os
import sys
import shutil
from pprint import pprint
import datetime
print ("Welcome to preapre ppa package...")
dists = []
# https://wiki.ubuntu.com/Releases
dists.append({
"name": "Ubuntu 16.04.7 LTS (xenial)"... | |
"""Generates API documentation by introspection."""
import rest_framework
from rest_framework import viewsets
from rest_framework.serializers import BaseSerializer
from .introspectors import APIViewIntrospector, \
WrappedAPIViewIntrospector, \
ViewSetIntrospector, BaseMethodIntrospector, IntrospectorHelper, \
... | |
#
# Proximate - Peer-to-peer social networking
#
# Copyright (c) 2008-2011 Nokia Corporation
#
# All rights reserved.
#
# This software is licensed under The Clear BSD license.
# See the LICENSE file for more details.
#
import gtk
import gobject
import proximatestate
from plugins import get_plugin_by_type
from support... | |
"""Allows the creation of a sensor that breaks out state_attributes."""
import logging
from typing import Optional
from itertools import chain
import voluptuous as vol
from homeassistant.core import callback
from homeassistant.components.sensor import (
ENTITY_ID_FORMAT,
PLATFORM_SCHEMA,
DEVICE_CLASSES_SC... | |
#
# 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... | |
# Copyright 2011 Google 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 writing,... | |
#
# Copyright (c) 2008-2015 Citrix Systems, 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 l... | |
# Copyright (C) 2015 Nippon Telegraph and Telephone Corporation.
# Copyright (C) 2015 YAMAMOTO Takashi <yamamoto at valinux co jp>
#
# 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:... | |
#!/usr/bin/env python
from __future__ import print_function
import subprocess
import argparse
import json
import errno
import os
import shutil
import fnmatch
import hashlib
ARDUINO_H = """/**
* This is a generated file required by the Arduino build system."
*/
#include "pumbaa.h"
"""
SIMBA_GEN_C_FMT = """
#incl... | |
#!/usr/bin/env python
# Copyright (c) 2006-2010 Tampere University of Technology
#
# 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 rig... | |
# Copyright 2020 Makani Technologies 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... | |
#
# 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
# ... | |
import unittest
import numpy
import chainer
from chainer import cuda
from chainer import gradient_check
from chainer import links
from chainer import testing
from chainer.testing import attr
from chainer.testing import condition
def _sigmoid(x):
half = x.dtype.type(0.5)
xp = cuda.get_array_module(x)
ret... | |
# Copyright 2014: Mirantis 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 b... | |
"""
Access maven artifacts.
"""
from xml.etree import ElementTree
import xml.dom.minidom as minidom
import requests
import logging as log # TODO
def requests_get_check(*args, **kwargs):
response = requests.get(*args, **kwargs)
response.raise_for_status()
return response
class Artifact:
"""
Represents a M... | |
import datetime
import aiohttp
import asyncio
import praw
import prawcore
import logging
import functools
import re
from errors import RetryRequestLater
log = logging.getLogger(__name__)
def retry(seconds):
def decorator(func):
@functools.wraps(func)
async def wrapped(self, *args, **kwargs):
... | |
"""
SleekXMPP: The Sleek XMPP Library
Copyright (C) 2011 Nathanael C. Fritz, Dann Martens (TOMOTON).
This file is part of SleekXMPP.
See the file LICENSE for copying permission.
"""
from sleekxmpp.plugins import base
from sleekxmpp.plugins.xep_0009.stanza.RPC import RPCQuery, MethodCall, MethodRespons... | |
import functools
import itertools
import warnings
from inspect import getfullargspec
import numpy as np
from ..core.formatting import format_item
from .utils import (
_infer_xy_labels, _process_cmap_cbar_kwargs,
import_matplotlib_pyplot, label_from_attrs)
# Overrides axes.labelsize, xtick.major.size, ytick.m... | |
# Copyright 2013 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 requ... | |
#!/usr/bin/env python3
# Copyright (c) 2010 ArtForz -- public domain half-a-node
# Copyright (c) 2012 Jeff Garzik
# Copyright (c) 2010-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Gulden test ... | |
"""
Line-based and matrix-based plotting commands using MatPlotLib.
Before importing this file, you will probably want to do something
like:
from matplotlib import rcParams
rcParams['backend']='TkAgg'
to select a backend, or else select an appropriate one in your
matplotlib.rc file (if any). There are many back... | |
# Copyright (c) 2019 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... | |
##############################################################
###
# WRESTLER DETAILS
# Contains -
# 1. List of wrestlers
# 2. Wrestler rating
# 3. Wrestler finisher set
# 4. Ratings of the finishers
# 5. Ratings for the non-finisher moves
###
# Complete list of wrestlers
# Given as :
# Wrestler's name, Rating, Fin... | |
# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""This module allows adding and deleting of projects to the local manifest."""
import logging
import platform
import optparse
import os
import sys
i... | |
# -*- coding: utf-8 -*-
# Copyright 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 requi... | |
"""
Python Interchangeable Virtual Instrument Library
Copyright (c) 2017 Alex Forencich
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 righ... | |
# This is a Makefile for the `mk` tool. (Limited) details for that here:
# <http://svn.openkomodo.com/openkomodo/browse/mk>
import sys
import os
from os.path import join, dirname, normpath, abspath, exists, basename
import re
from glob import glob
import codecs
import webbrowser
import mklib
assert mklib.__version_i... | |
'''Example script to run a full analysis with high resolution telescope data + a fast time reference plane + a small device under tests.
The telescope consists of 6 Mimosa26 planes and one FE-I4 with a full size planar n-in-n sensor as a timing reference.
The device under tests is a small passive sensor in LFoundry 15... | |
# Copyright (C) 2011 Google 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:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | |
from django import forms
from django.forms import ModelForm, BaseModelFormSet
from django.forms.models import modelformset_factory
from django.db.models import Q
from django_select2.forms import (
ModelSelect2Widget,
Select2Widget,
ModelSelect2MultipleWidget,
Select2Multi... | |
# -*- coding: utf-8 -*-
"""
httpbin.helpers
~~~~~~~~~~~~~~~
This module provides helper functions for httpbin.
"""
import json
import base64
import re
import time
import os
from hashlib import md5, sha256, sha512
from werkzeug.http import parse_authorization_header
from werkzeug.datastructures import WWWAuthenticate... | |
# -*- coding: utf-8 -*-
import os
import time
import json
import logging
import time
from random import random, randrange
from pokemongo_bot import inventory
from pokemongo_bot.base_task import BaseTask
from pokemongo_bot.human_behaviour import sleep, action_delay
from pokemongo_bot.inventory import Pokemon
from pokem... | |
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-
# 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 Apach... | |
"""
send documents representing object data to elasticsearch for supported file extensions.
note: we truncate outbound documents to DOC_SIZE_LIMIT characters
(to bound memory pressure and request size to elastic)
a little knowledge on deletes and delete markers:
if bucket versioning is on:
- `aws s3api delete-obje... | |
from datetime import datetime
from random import shuffle
import gridfs
import pymongo
import pytz
from bson.codec_options import CodecOptions
from bson.objectid import ObjectId
from langdetect import detect
from upol_search_engine import settings
from upol_search_engine.utils import document, urls
def create_client(... | |
#!/usr/bin/python
# EVRYTHNG API Python Wrapper v0.92 - Vlad Trifa
# Engine 1.17
# Import all basic libs needed
import simplejson as json
import httplib, urllib
import csv
import logging
# Import some tools to measure execution time
import time
import corestats
# Set to 1 to force HTTPS
SECURE=1
# Which API Endp... | |
#!/usr/bin/env python
import calendar
import datetime as dt
import fileinput
import re
import smtplib
import subprocess
import time
from email.mime.image import MIMEImage
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
import urllib2
from bs4 import BeautifulSoup
username = "xxx@y... | |
# Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | |
"""
====================================================================
K-means clustering and vector quantization (:mod:`scipy.cluster.vq`)
====================================================================
Provides routines for k-means clustering, generating code books
from k-means models, and quantizing vectors ... | |
from __future__ import unicode_literals
from __future__ import print_function
import unittest
from moya.context import Context
from moya.context import dataindex
class TestDataIndex(unittest.TestCase):
def test_parse(self):
"""Test dataindex parse"""
tests = [
("", []),
("... | |
# -*- coding: utf-8 -*-
import time
import mock
import unittest
from nose.tools import * # noqa
import webtest
import furl
import itsdangerous
from modularodm import storage
from framework.auth import cas
from framework.auth import signing
from framework.auth.core import Auth
from framework.exceptions import HTTPEr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.