gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
# 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 2012 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 ... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compli... | |
#!/usr/bin/env python
from argparse import ArgumentParser
import logging
import os
import shutil
import subprocess
import sys
import tempfile
import warnings
import django
from django import contrib
from django.apps import apps
from django.conf import settings
from django.db import connection
from django.test import T... | |
# graphicsUtils.py
# ----------------
# Licensing Information: Please do not distribute or publish solutions to this
# project. You are free to use and extend these projects for educational
# purposes. The Pacman AI projects were developed at UC Berkeley, primarily by
# John DeNero (denero@cs.berkeley.edu) and Dan Klei... | |
#!/usr/bin/env python
"""Tests reparenting is picked up in topology."""
import json
import threading
import time
import numpy
import logging
import base_end2end_test
import utils
import vtctl_helper
from vtproto import topodata_pb2
from vttest import sharding_utils
def setUpModule():
pass
def tearDownModule(... | |
from datetime import datetime
from datetime import timedelta
import json
import unittest
from bson.objectid import ObjectId
from flask import url_for
from flask.ext import testing
from flask.ext import pymongo
import logcas.bootstrap
import db
class IndexTestCase(testing.TestCase):
def create_app(self):
... | |
#
# handlers.py
# Handling for actual web server bits
#
import socket, sys, json, os, time
from BaseHTTPServer import BaseHTTPRequestHandler
from sendfile import sendfile
# When moving data ourselves, how much to move at a time
Bufsize = 64*1024
# Tell if this pathname looks questionable
def sketchy(fn):
# No ch... | |
# Lint as: python3
# Copyright 2018 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 ... | |
from datetime import datetime
from Queue import Queue, Empty
from flask import request, jsonify, Response
from flexget.options import get_parser
from flexget.api import api, APIResource
from flexget.utils import json
from json import JSONEncoder
from flexget.event import event
from flexget.utils.lazy_dict import Lazy... | |
#!/usr/bin/env python2.7
import h5py, os, sys
import cStringIO as StringIO
from Bio import SeqIO
from fast5tools.f5class import *
from fast5tools.f5ops import *
import argparse
from glob import glob
#################################################
## Argument Parser
#################################################... | |
# Spam detection algorithm in spirit of belief propagation (like Karger's algo).
# Use's reliability is computed using Dirichlet dist.
import numpy as np
ALGO_DIRICHLET_KARMA_USER_VOTE = 0.1
DEBUG = False
def compute_percentile_dirichlet(neg, pos, percentile):
""" Numerically computes percentile of Dirichlet di... | |
#!/usr/bin/env python
# Copyright 2017 Balazs Nemeth
#
# 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... | |
# 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 ... | |
"""Generic Z-Wave Entity Class."""
from __future__ import annotations
import logging
from zwave_js_server.client import Client as ZwaveClient
from zwave_js_server.const import NodeStatus
from zwave_js_server.model.value import Value as ZwaveValue, get_value_id
from homeassistant.config_entries import ConfigEntry
fro... | |
# 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
# distrib... | |
# 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... | |
#!/usr/bin/env python3
import unittest
import socket
import binascii
from framework import VppTestCase, VppTestRunner
from scapy.packet import Raw
from scapy.layers.l2 import Ether
from scapy.layers.inet6 import IPv6, UDP, TCP
from util import ppp
from template_classifier import TestClassifier
class TestClassifier... | |
# coding: utf-8
"""
Talon.One API
The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the other operations are used to manage applications and campaigns. #... | |
import fnmatch
import importlib
from datetime import datetime
from typing import Any, Callable, Dict, List, Optional, Union
from urllib.parse import unquote
from django.http import HttpRequest
from django.utils.translation import gettext as _
from zerver.lib.actions import (
check_send_private_message,
check_... | |
##
# Copyright 2016 Sagnik Ghosh, licensed under the Apache 2.0 License.
#
# GooPyCharts: an interface between Python and Google Charts API. Written to serve as a simple substitute
# for matplotlib. Syntax is similar to MATLAB figures.
##
# Python3 compatibility
import sys
python_version = sys.version_info[0]
if pytho... | |
from __future__ import absolute_import
import os
import logging
import pickle
import oboe
from datetime import datetime as dt
from seabus.common.database import db
from seabus.common.memcached import mc_client
from seabus.common.errors import InvalidBeaconError
log = logging.getLogger(__name__)
log.setLevel(logging.... | |
# Copyright 2018 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 Tkinter import *
import random
from basics import *
from node import *
import timeManager
# Some ugly constants to control some behavior
WINDOW_WIDTH = 1000
WINDOW_HEIGHT = 600
BORDER_MARGIN = 5
TARGET_UPDATE_INTERVAL = 500
PACKET_GENERATION_INTERVAL = 500
CLICK_RADIUS = 9
# Keeping track of an ugly global s... | |
#!/usr/bin/env python
# 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 (the
# "License"); you ma... | |
#!/usr/bin/env python
# Copyright 2012 The Swarming Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0 that
# can be found in the LICENSE file.
"""Runs the whole set of swarming client unit tests on swarming itself.
This is done in a few steps:
- Archive the wh... | |
from __future__ import print_function, unicode_literals
import logging
import pkg_resources
import re
import six
import sys
from rbtools.utils.process import die, execute
# The clients are lazy loaded via load_scmclients()
SCMCLIENTS = None
class PatchResult(object):
"""The result of a patch operation.
T... | |
# Django settings for eggtimer project.
import os
from django.utils.dateparse import parse_datetime
import dj_database_url
from email.utils import formataddr
HOME_DIR = os.path.expanduser("~")
BASE_DIR = os.path.realpath(os.path.join(os.path.dirname(__file__), os.path.pardir))
ADMINS = (
(os.environ.get('ADMIN_... | |
"""Support for Dutch Smart Meter (also known as Smartmeter or P1 port)."""
from __future__ import annotations
import asyncio
from asyncio import CancelledError
from contextlib import suppress
from datetime import timedelta
from functools import partial
import logging
from dsmr_parser import obis_references as obis_re... | |
import asyncio
import asyncio.streams
import traceback
import warnings
from collections import deque
from contextlib import suppress
from html import escape as html_escape
from http import HTTPStatus
from logging import Logger
from typing import (
TYPE_CHECKING,
Any,
Awaitable,
Callable,
Optional,
... | |
from django.test import TestCase
from unittest.mock import patch
from wellsfargo.security import (
encrypt_account_number,
decrypt_account_number,
WFRS_SECURITY,
)
from wellsfargo.security.fernet import FernetEncryption
from wellsfargo.security.kms import KMSEncryption
from wellsfargo.security.multi import ... | |
# 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... | |
#!/usr/bin/env python
#This fix db inconsistence, such as vote and tags of linkages (making them the same as sum of included notes)
import sys, os
#TODO: no hardcoding of home_path
#home_path = '/home/leon/projects/notebookWebapp/notebook_src'
from env_settings import HOME_PATH
sys.path.append(HOME_PATH)
from djang... | |
# coding: utf-8
#
# Copyright 2018 The Oppia Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | |
# Copyright 2014 Hewlett-Packard Development Company, L.P.
#
# 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... | |
# "Tiled" TMX loader/renderer and more
# Copyright 2012 Richard Jones <richard@mechanicalcat.net>
# This code is placed in the Public Domain.
# TODO: support properties on more things
import sys
import struct
import collections
import pygame
from pygame.locals import *
from pygame import Rect
from xml.etree import El... | |
# coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import os
from twit... | |
from __future__ import print_function
import logging
import numpy
from six.moves import xrange
import theano
from theano.tensor import as_tensor_variable
from theano.gof import Op, Apply
from theano.gradient import DisconnectedType
from theano.tensor import basic as tensor
logger = logging.getLogger(__name__)
cla... | |
# -*- coding: utf-8 -*-
# Copyright 2022 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... | |
# -*- coding: utf-8 -*-
"""Interface to FTP-servers."""
import ftplib
import tempfile
import os
import stat
from stashutils.core import get_stash
from stashutils.fsi.base import BaseFSI, make_stat, calc_mode
from stashutils.fsi.errors import OperationFailure, IsDir, IsFile
from stashutils.fsi.errors import AlreadyExi... | |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | |
# Copyright 2018 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 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 applica... | |
# Copyright 2017 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... | |
# -*- coding: utf-8 -*-
#
# Copyright 2017 dpa-infocom GmbH
#
# 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... | |
#!/usr/bin/env python2
import argparse
import copy
import pyximport;
pyximport.install()
import os
import itertools
import operator
from model import DupGenome, DupChromosome, Ext
import networkx as nx
from networkx.algorithms import connected_components
import matplotlib.pyplot as plt
# TODO: this is a hack to impor... | |
# 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 ... | |
# -*- coding: utf-8 -*-
from operator import attrgetter
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType
from pyangbind.lib.yangtypes import RestrictedClassType
from pyangbind.lib.yangtypes import TypedListType
from pyangbind.lib.yangtypes import YANGBool
from pyangbind.lib.yangtypes import YANGListTy... | |
#!/usr/bin/python
# Copyright (c) 2011 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.
"""Collection of methods for running perf tests on the legacy browser."""
import collections
import fnmatch
import optparse
import pex... | |
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# 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 ... | |
import os
import sys
import subprocess
import argparse
import json
import psutil
import time
import six
import signal
import pdb
from apscheduler.schedulers.background import BackgroundScheduler
from studio import fs_tracker, model
from studio.util import logs
from studio.queues.local_queue import LocalQueue
from stu... | |
from __future__ import unicode_literals
import datetime
import unittest
import warnings
from decimal import Decimal
import pytest
from django.conf.urls import url
from django.core.exceptions import ImproperlyConfigured
from django.db import models
from django.test import TestCase
from django.test.utils import overrid... | |
from __future__ import unicode_literals
import datetime
import unittest
from decimal import Decimal
from django import forms, test
from django.apps import apps
from django.core import checks, validators
from django.core.exceptions import ValidationError
from django.db import IntegrityError, connection, models, transa... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
A dictionary-like object with SQLite backend
============================================
Python dictionaries are very efficient objects for fast data access. But when
data is too large to fit in memory, you want to keep data on disk but available
for fast random acce... | |
"""
mbed SDK
Copyright (c) 2011-2013 ARM Limited
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 wr... | |
from collections import OrderedDict
from django.core.management import call_command
from django.core.management.base import CommandError
from django.core.urlresolvers import reverse
from django.test import TestCase
from mock import call
from mock import Mock
from mock import patch
from rest_framework.exceptions import... | |
import pygame
import ocempgui.widgets as ow
import ocempgui.widgets.Constants as oc
import ocempgui.events as oe
from lobby_list_item import LobbyListItem
import events as be
class GUI():
"""
User Interface windows.
"""
def __init__(self, renderer):
self.renderer = renderer
self.lobby_visible = False
self... | |
# 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 applica... | |
#!/usr/bin/python
#
# Copyright (c) 2015, Arista Networks, 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,
# t... | |
import copy
import inspect
from django import forms
from django.forms.formsets import all_valid, DELETION_FIELD_NAME
from django.forms.models import inlineformset_factory, BaseInlineFormSet, modelform_defines_fields
from django.contrib.contenttypes.generic import BaseGenericInlineFormSet, generic_inlineformset_factory
... | |
#########################################
# base.py
#
# Author zrong(zengrong.net)
# Creation 2014-12-04
# Modification 2015-11-22
#########################################
import os
import re
import platform
import shutil
from xmlrpc.client import Fault
from string import Template
from datetime import (datetime, time... | |
"""
=============================
Species distribution modeling
=============================
Modeling species' geographic distributions is an important
problem in conservation biology. In this example we
model the geographic distribution of two south american
mammals given past observations and 14 environmental
varia... | |
#!/usr/bin/env python3
# Copyright (c) 2015-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.
"""Test processing of unrequested blocks.
Setup: two nodes, node0+node1, not connected to each other. Nod... | |
"""
tabimport is a Python utility to ease imports of tabular data from CSV, ODF,
XLS or XLSX files.
Usage:
>>> smart_file = FileFactory(file_path)
>>> for data_line in smart_file:
>>> do_something_with(data_line['header'])
"""
import csv
import logging
import tempfile
from collections import OrderedDict
from date... | |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2012 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... | |
import os
import time
import random
import threading
import socket
from TCAction import TCActionBase
from NativeLog import NativeLog
from NativeLog import ThroughputResult
from Utility import RSSICalibrator
LOG_FOLDER = os.path.join("Performance", "Throughput")
AP_PROP_KEY = ("ssid", "password", "apc")
class SendT... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import argparse
import time
import generate_data
import numpy as np
import captcha_input as cap_in
import cnn_model as model
import tensorflow as tf
from tensorflow.contrib import slim
ALPHABET = generate_data.ALPHABET
CAPTCHA_SIZE = generate_data.CAPTCHA_SIZ... | |
# -*- coding: utf-8 -*-
"""
Models
======
Creates a series of relevant Peewee models.
Ex: Game events
http://www.nhl.com/scores/htmlreports/20132014/PL021195.HTM
"""
import logging
from datetime import datetime, timedelta
from .version import __version__
from peewee import BooleanField, CharField, DateField, Dat... | |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import os
import unittest
from monty.serialization import loadfn, dumpfn
from monty.os.path import which
from pymatgen.core.structure import Molecule
from pymatgen.io.qchem.outputs import QCOutput, check_for... | |
from functools import partial
import os
from datetime import datetime, timedelta
import numpy as np
import torch
import neptune
from torch.autograd import Variable
from torch.optim.lr_scheduler import ExponentialLR
from tempfile import TemporaryDirectory
from steppy.base import Step, IdentityOperation
from steppy.ada... | |
# encoding=utf8
from gensim.models import Word2Vec
import numpy as np
from sklearn.preprocessing import LabelEncoder
from sklearn.metrics import accuracy_score
import sys
from sklearn_pandas import DataFrameMapper
import util
import pandas as pd
reload(sys)
sys.setdefaultencoding('utf-8')
features = \
[
"... | |
"""
course_catalog models
"""
from django.contrib.auth.models import User
from django.contrib.contenttypes.fields import GenericForeignKey, GenericRelation
from django.contrib.contenttypes.models import ContentType
from django.contrib.postgres.fields import ArrayField, JSONField
from django.db import models
from django... | |
# Lint as: python3
# Copyright 2021 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 ... | |
# -*- coding: utf-8 -*-
"""
State tracking functionality for django models
"""
import inspect
import sys
from functools import wraps
import django
from django.db import models
from django.db.models.query_utils import DeferredAttribute
from django.db.models.signals import class_prepared
from django_fsm.signals import p... | |
"""Xbox Media Source Implementation."""
from dataclasses import dataclass
from typing import List, Tuple
# pylint: disable=no-name-in-module
from pydantic.error_wrappers import ValidationError
from xbox.webapi.api.client import XboxLiveClient
from xbox.webapi.api.provider.catalog.models import FieldsTemplate, Image
fr... | |
# 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 t... | |
"""
This might look like an SSH protocol implementation. IT IS NOT. It's not even
remotely secure. Nothing is verified, nothing is random. DO NOT USE.
"""
import binascii
import struct
from sshtransport import BinaryPacket
from sshtype import *
SSH_MSG_KEXINIT = 20
SSH_MSG_KEX_DH_GEX_REQUEST_OLD = 30
... | |
from itertools import product
import math
import mpmath
from sympy.utilities.pytest import XFAIL, raises
from sympy import (
symbols, lambdify, sqrt, sin, cos, tan, pi, acos, acosh, Rational,
Float, Matrix, Lambda, Piecewise, exp, Integral, oo, I, Abs, Function,
true, false, And, Or, Not, ITE, Min, Max, f... | |
from TopologyWeigher import utils as topoutils
__author__ = 'ash'
import socket
from struct import *
import pcapy
from time import sleep
from time import time
import shlex
import re
import commands
from subprocess import Popen, PIPE, STDOUT
from threading import Timer
from threading import Thread
from nova.conducto... | |
# vim: expandtab tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2013 VMware, 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... | |
from keras.layers.core import Reshape, Lambda
from keras.layers import TimeDistributed
from keras.models import Sequential,load_model,Model
from keras.layers import Dense, MaxPooling2D, MaxPooling3D, Input, merge, UpSampling2D
from keras.layers.advanced_activations import LeakyReLU
from keras.callbacks import EarlyStop... | |
#!/usr/bin/python3
# ftpClientApp.py
"""
Project : Network Programming Assignment Question
Filename : ftpClientApp.py
Author : Jeffrey Nursalim
Student No: TP031319
Module Code & Title: CE00731-M Network Systems and Technologies
Due Date : 09 December 2013
Tested with ftplib changeset 38db4d0726bd found at
http://hg.... | |
#Copyright ReportLab Europe Ltd. 2000-2008
#see license.txt for license details
__version__=''' $Id$ '''
__doc__=''
#REPORTLAB_TEST_SCRIPT
import sys, copy, os
from reportlab.platypus import *
_NEW_PARA=os.environ.get('NEW_PARA','0')[0] in ('y','Y','1')
_REDCAP=int(os.environ.get('REDCAP','0'))
_CALLBACK=os.environ.ge... | |
from __future__ import division
from sympy import (Symbol, Wild, sin, cos, exp, sqrt, pi, Function, Derivative,
abc, Integer, Eq, symbols, Add, I, Float, log, Rational, Lambda, atan2,
cse, cot, tan, S, Tuple, Basic, Dict, Piecewise, oo, Mul,
factor, nsimplify, zoo)
from sympy.core.basic import _... | |
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2014 Thomas Voegtlin
#
# 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... | |
# Game Architecture Network Layer (ganet)
#
# Copyright (c) 2014 Roman Divotkey, Univ. of Applied Sciences Upper Austria.
# All rights reserved.
#
# This file is subject to the terms and conditions defined in file
# 'LICENSE', which is part of this source code package.
#
# THIS CODE IS PROVIDED AS EDUCATIONAL MATERIAL... | |
# 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 ... | |
import atexit
import glob
import logging
import os
import random
import re
import signal
import subprocess
import sys
import time
import irc.client
class Client(irc.client.SimpleIRCClient):
def __init__(self):
irc.client.SimpleIRCClient.__init__(self)
self.flags = {
'queued': False,
... | |
"""Contains the core functionality that manages merging of assets.
"""
from __future__ import with_statement
import contextlib
try:
from urllib.request import Request as URLRequest, urlopen
from urllib.error import HTTPError
except ImportError:
from urllib2 import Request as URLRequest, urlopen
from ur... | |
# -*- coding: utf-8 -*-
from __future__ import division, print_function
import pytest
import numpy as np
from itertools import product
try:
import cPickle as pickle
except ImportError:
import pickle
import celerite
from celerite import GP, terms
from celerite.solver import get_kernel_value, CARMASolver
__a... | |
#
#
# Copyright (C) 2006, 2007, 2008 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:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of con... | |
"""Test component/platform setup."""
# pylint: disable=protected-access
import asyncio
import os
from unittest import mock
import threading
import logging
import voluptuous as vol
from homeassistant.core import callback
from homeassistant.const import (
EVENT_HOMEASSISTANT_START, EVENT_COMPONENT_LOADED)
import ho... | |
"""
Support for Google travel time sensors.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.google_travel_time/
"""
from datetime import datetime
from datetime import timedelta
import logging
import voluptuous as vol
from homeassistant.components... | |
from __future__ import unicode_literals
import warnings
from django.contrib.contenttypes.models import ContentType
from django.core.exceptions import ImproperlyConfigured, ValidationError
from django.db import models
from django.db.models import signals
from django.utils import six
from django.utils.translation impor... | |
# Copyright (C) 2015 Nippon Telegraph and Telephone 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 appli... | |
#!/usr/bin/env python3
#
# Copyright (c) 2017-2018, The OpenThread Authors.
# 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... | |
# """EasyEngine site controller."""
from cement.core.controller import CementBaseController, expose
from cement.core import handler, hook
from ee.core.variables import EEVariables
from ee.core.domainvalidate import ValidateDomain
from ee.core.fileutils import EEFileUtils
from ee.cli.plugins.site_functions import *
from... | |
# coding=utf-8
# Copyright 2020 The HuggingFace Team 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... | |
from twisted.internet.task import LoopingCall
from twisted.internet import reactor
from minerstat.utils import Config
from minerstat.remote import MinerStatRemoteProtocol
from twisted.internet.protocol import ProcessProtocol
from twisted.internet.error import ProcessExitedAlready
from twisted.internet.error import Proc... | |
#!/usr/bin/python
# Author: Chris Zacharias (chris@imgix.com)
# Copyright (c) 2012, Zebrafish Labs 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 ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.