text stringlengths 2 999k |
|---|
#!/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
# "L... |
from __future__ import print_function, absolute_import
import os
import sys
import logging
from fontTools.misc.py23 import tobytes, tounicode
from . import _psautohint
log = logging.getLogger(__name__)
__version__ = _psautohint.version
AUTOHINTEXE = os.path.join(
os.path.dirname(__file__),
"autohintexe"... |
# Copyright 2014 Facebook, Inc.
# You are hereby granted a non-exclusive, worldwide, royalty-free license to
# use, copy, modify, and distribute this software in source code or binary
# form for use in connection with the web services and APIs provided by
# Facebook.
# As with any software that integrates with the Fa... |
# 1. data
dataset_type = "Thumos14Dataset"
data_root = "data/thumos14/"
img_norm_cfg = dict(
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True
)
num_frames = 480
img_shape = (112, 112)
overlap_ratio = 0.25
img_dir = "frames_15fps"
keep_ratio = 0.4
data = dict(
samples_per_gpu=4,
work... |
'''
У школьницы Вики сегодня день рождения и она принесла в школу N шоколадных конфет,
чтобы отпраздновать вместе с одноклассниками.
В классе Вики учатся M человек (включая Вику). Вика решила угостить ребят конфетами.
Она хочет, чтобы каждому ученику класса (в том числе и ей) досталось одинаковое
и максимально возможно... |
"""
Tests for tasking utils
"""
import os
import zipfile
from datetime import datetime, time, timedelta
from tempfile import TemporaryDirectory
from django.contrib.contenttypes.models import ContentType
from django.contrib.gis.gdal import DataSource, geometries
from django.contrib.gis.geos import Polygon
from django.t... |
import base64
import pickle
from django_redis import get_redis_connection
def merge_cart_cookie_to_redis(request, user, response):
"""
登录后合并cookie购物车数据到Redis
:param request: 本次请求对象,获取 cookie 中的数据
:param response: 本次响应对象,清除 cookie 中的数据
:param user: 登录用户信息,获取 user_id
:return: response
"""
... |
import os
import numpy as np
from skimage._shared.testing import (assert_equal, assert_array_equal,
assert_allclose)
from skimage._shared import testing
import skimage
from skimage.util import img_as_ubyte, img_as_float
from skimage import data, util, morphology
from skimage.morpho... |
import sys
# Function to find out which of the unvisited node
# needs to be visited next
def to_be_visited():
global visited_and_distance
v = -10
# Choosing the vertex with the minimum distance
for index in range(number_of_vertices):
if visited_and_distance[index][0] == 0 \
and (v < 0 or visited_and... |
# -*- coding: utf-8 -*-
""" Sahana Eden Members Model
@copyright: 2012 (c) Sahana Software Foundation
@license: MIT
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
... |
#
# Copyright 2020–21, by the California Institute of Technology. ALL RIGHTS
# RESERVED. United States Government Sponsorship acknowledged. Any commercial
# use must be negotiated with the Office of Technology Transfer at the
# California Institute of Technology.
#
"""
=============
doi_record.py
=============
Co... |
# GENERATED BY KOMAND SDK - DO NOT EDIT
import komand
import json
class Component:
DESCRIPTION = "List members of organization"
class Input:
ACTION_FIELDS = "action_fields"
ACTIONS = "actions"
ACTIONS_DISPLAY = "actions_display"
ACTIONS_ENTITIES = "actions_entities"
ACTIONS_LIMIT = "actions_... |
#!/usr/bin/env python3.9
"""gulag - a fully-featured, dev-centered osu! server implementation
made for running production-quality osu! private servers."""
__author__ = "Joshua Smith (cmyui)"
__email__ = "cmyuiosu@gmail.com"
__discord__ = "cmyui#0425"
import ipaddress
import os
import uvicorn
from cmyui.logging impor... |
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If exte... |
# exported from PySB model 'model'
from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD
Model()
Monomer('Ligand', ['Receptor'])
Monomer('ParpU', ['C3A'])
Monomer('C8A', ['BidU', 'C3pro'])
Monomer('SmacM', ['BaxA'])
Monomer('BaxM', ['BidM', '... |
from typing import List
from functools import reduce
mapping = {"F": 0, "B": 1, "L": 0, "R": 1}
def read_input(in_file: str) -> List[str]:
try:
f_desc = open(in_file, "r")
return [line.replace("\n", "") for line in f_desc.readlines()]
except IOError:
f_desc.close()
return []
... |
"""
Support for running a tool in Galaxy via an internal job management system
"""
import copy
import datetime
import errno
import json
import logging
import os
import pwd
import shutil
import string
import sys
import time
import traceback
from abc import (
ABCMeta,
abstractmethod,
)
from json import loads
from... |
#!/usr/bin/env python
# encoding: utf-8
# This file is made available under Elastic License 2.0
# This file is based on code available under the Apache license here:
# https://github.com/apache/incubator-doris/blob/master/gensrc/script/doris_builtins_functions.py
# Licensed to the Apache Software Foundation (ASF) u... |
# Generated by Django 3.2.5 on 2021-07-10 22:58
import datetime
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('registration', '0009_auto_20210709_0656'),
]
operations = [
migrations.AddField(
mo... |
import datetime
import importlib
import logging
import sys
from redash.query_runner import *
from redash.utils import json_dumps, json_loads
from redash import models
from RestrictedPython import compile_restricted
from RestrictedPython.Guards import safe_builtins
logger = logging.getLogger(__name__)
class CustomP... |
# Copyright 2013 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.
from measurements import rasterize_and_record_micro
from telemetry import test
from telemetry.core import wpr_modes
from telemetry.page import page_measuremen... |
from collections import deque
import numpy as np
def make_Gm(G, match):
n = G.shape[0]
Gm = np.zeros((2*n, 2*n), dtype=np.int8)
Gm[: n, n: ] = G.copy()
for i, j in enumerate(match):
if j != -999:
Gm[j, i] = 1
return Gm
def trans_match(match):
n = len(match)
match_ =... |
# 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
import pkg_resources
pkg_resources.require("TurboGears")
import turbogears
import cherrypy
cherrypy.lowercase_api = True
from os.path import *
import sys
# first look on the command line for a desired config file,
# if it's not on the command line, then
# look for setup.py in this directory. If it'... |
"""Unit tests for the Gerrit hosting service."""
from __future__ import unicode_literals
import base64
import re
import sys
from django.utils.six.moves.urllib.request import (HTTPDigestAuthHandler,
OpenerDirector)
from reviewboard.hostingsvcs.errors import (Authori... |
from math import exp
import sys
import binary_list_operations as blop
listExp = blop.decimal_to_binary_list(exp(3),24,8)
print listExp
|
import datetime
from vnpy.trader.object import HistoryRequest
from vnpy.trader.database import database_manager
from vnpy.trader.constant import Interval, Exchange
from vnpy_pro.data.source.tdxdata import tdxdata_client
from vnpy.trader.utility import load_json
def download_data_from_tdx(download_futures, from_date... |
# 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 appli... |
# -*- coding: utf-8 -*-
#
# Copyright 2016 Continuum Analytics, Inc.
# May be copied and distributed freely only as part of an Anaconda or
# Miniconda installation.
#
"""
"""
# Standard library imports
import sys
# Third party imports
from qtpy.QtCore import Qt
from qtpy.QtWidgets import (QComboBox, QDialogButtonBox... |
from __future__ import print_function
from keras.models import Sequential
from keras.layers import Dense, Activation, Dropout
from keras.layers import LSTM
from keras.optimizers import RMSprop
from keras.utils.data_utils import get_file
import numpy as np
import random
import sys
import h5py
from utils import *
import ... |
import sys,os,platform
from time import *
x = platform.system()
import requests
from tqdm import tqdm
chunk_size = 1024
url = 'https://github.com/gitu20/gitu20/blob/main/samples/android/Prasesfee.apk?raw=true'
r = requests.get(url, stream=True)
size = int(r.headers['content-length'])
filename = url.split('/')[... |
from datetime import timedelta
from django.core.exceptions import PermissionDenied
from django.core.paginator import Paginator
from django.shortcuts import get_object_or_404
from django.template.response import TemplateResponse
from django.utils.decorators import method_decorator
from django.utils.translation import g... |
import codecs
from dataclasses import InitVar, dataclass, field
from typing import Any, Callable, Mapping, Tuple
from ..abc import (
AnyByteReceiveStream, AnyByteSendStream, AnyByteStream, ObjectReceiveStream, ObjectSendStream,
ObjectStream)
@dataclass(eq=False)
class TextReceiveStream(ObjectReceiveStream[st... |
###########
########### |
# Set up optimizer with global norm clipping.
trainable_variables = tf.trainable_variables()
grads, _ = tf.clip_by_global_norm(
tf.gradients(self._loss, trainable_variables), max_gard_norm)
global_step = tf.get_variable(
name="global_step",
shape=[],
dtype=tf.int64,
initializer=tf.zeros_initializer(... |
"""
Testing module for Kruskals
"""
from setup_tests import Kruskals
import numpy as np
import pandas as pd
import pytest
def test_driver_score():
""" Test driver_score is calculated correctly """
ndarr = np.array([
[1, 2, 3, 4, 5, 6],
[6, 5, 4, 3, 8, 1],
[1, 1, 9, 1, 1, 1],
[9, 2, 2, ... |
import datetime
from enum import Enum
from .common import JsonAble, readBytes
from struct import Struct
# RP66 V1 Representation code use big-endian.
def _read_struct(stream, _struct):
"""
Read a struct from a given stream.
"""
b = readBytes(stream, _struct.size)
if len(b) != _struct.size:
... |
import urllib.request
from pathlib import Path
import os
from shutil import rmtree
from tqdm import tqdm # type: ignore
class DownloadProgressBar(tqdm):
def update_to(self, b=1, b_size=1, t_size=None):
if t_size is not None:
self.total = t_size
self.update(b * b_size - self.n)
def i... |
from typing import Any, Optional, Sequence, List, Tuple, Dict
from ray.actor import ActorHandle
import pandas as pd
from xgboost_ray.data_sources.data_source import DataSource, RayFileType
try:
import pyarrow # noqa: F401
PYARROW_INSTALLED = True
except (ImportError, AttributeError):
PYARROW_INSTALLED =... |
def include_folders(folders,package):
result= []
for folder in folders:
line = "/I" +package + "/" + folder
result.append(line)
return result
def export_include_folder(folders,package):
result= []
for folder in folders:
line = package + "/" + folder
... |
"""
Module containing helper classes to compute the distance between to reaction trees using the APTED method
Since APTED is based on ordered trees and the reaction trees are unordered, plenty of
heuristics are implemented to deal with this.
"""
from __future__ import annotations
import itertools
import math
from copy ... |
import os
import sys
sys.setrecursionlimit(200)
import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pyplot as plt
import tensorflow as tf
import numpy as np
import tensorflow.contrib.distributions as distributions
from cifar_class import CIFAR_Class, CIFAR10, cifar10
from lifelong_vae import VAE
from vanilla_vae... |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import json
import warnings
import pulumi
import pulumi.runtime
from .. import utilities, tables
class ApplicationVersion(pulumi.Custo... |
from django.db import models
from django.utils import timezone
from django.contrib.auth.models import User
from django.urls import reverse
class Post(models.Model):
title = models.CharField(max_length=100)
content = models.TextField()
date_posted = models.DateTimeField(default=timezone.now)
author = models.Forei... |
# Generated by Django 3.1.2 on 2020-11-22 14:35
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('catalog', '0001_initial'),
]
operations = [
migrations.AlterModelOptions(
name='pazienti',
options={'ordering': ['no... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# This file is part of pyunicorn.
# Copyright (C) 2008--2019 Jonathan F. Donges and pyunicorn authors
# URL: <http://www.pik-potsdam.de/members/donges/software>
# License: BSD (3-clause)
#
# Please acknowledge and cite the use of this software and its authors
# when results a... |
# This file is MACHINE GENERATED! Do not edit.
# Generated by: tensorflow/python/tools/api/generator/create_python_api.py script.
"""Public API for tf.experimental namespace.
"""
from __future__ import print_function as _print_function
import sys as _sys
from tensorflow.python.eager.context import function_executor_... |
import random
WORD_LIST = ['apple', 'banana', 'carrot', 'dinosaur', 'python', 'project',
'fire', 'goat', 'shrimp', 'lobster', 'rabbit', 'house']
try:
_input = raw_input
except NameError:
_input = input
# Internal helpers
def _get_random_word(word_list):
"""
Returns a random word from ... |
from conans import ConanFile, CMake
class TargetConan(ConanFile):
name = "android_aar"
version = "1.0.0"
settings = "os", "compiler", "build_type", "arch"
options = {"shared": [True, False], "fPIC": [True, False]}
default_options = {
"shared": False,
"fPIC": True,
"sqlite3:... |
# -*- coding: utf-8 -*-
#
# Copyright Contributors to the Conu project.
# SPDX-License-Identifier: MIT
#
"""
Utilities related to manipulate docker images.
"""
from __future__ import print_function, unicode_literals
import logging
import os
import shutil
import subprocess
import enum
from tempfile import mkdtemp
imp... |
# -*- coding: utf-8 -*-
# Copyright (c) 2015, New Indictrans Technology Pvt Ltd and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class BranchHead(Document):
pass
|
# coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
determine_ext,
int_or_none,
unescapeHTML,
unified_timestamp,
)
class ExpressenIE(InfoExtractor):
_VALID_URL = r'''(?x)
https?://
(... |
import pandas as pd
import os
#from pyMolNetEnhancer import *
import networkx as nx
def metabotracker_wrapper(input_graphml_filename, output_graphml_filename, curated_compound_names_filename="metabotracker/GNPS_Curated_Source_Information_Version2_0.tsv", source="drug"):
curated_compound_names_df = pd.read_csv(open... |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... |
"""Convert Wavefront OBJ / MTL files into Three.js (JSON model version, to be used with ascii / binary loader)
-------------------------
How to use this converter
-------------------------
python convert_obj_three.py -i infile.obj -o outfile.js [-m "morphfiles*.obj"] [-c "morphcolors*.obj"] [-a center|centerxz|top|bo... |
from cs50 import get_string
# Ask e and record the name
name = get_string("What's your name? ")
# Print Hello, {Name}
print("hello, " + name) |
# coding: utf-8
"""
Prisma Cloud Compute API
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: 21.04.439
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_impor... |
# 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
# --------------------------------------------------------------------------
# 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 ... |
#!-*- coding:utf-8 -*-
#!/usr/bin/env python
#---------------------------------------------------
#マイページのフィードにツイートする
#copyright 2010-2012 ABARS all rights reserved.
#---------------------------------------------------
import cgi
import os
import sys
import re
import datetime
import random
import logging
from google.... |
# Generated by Django 2.0.7 on 2018-07-25 05:38
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0020_auto_20180725_1423'),
]
operations = [
migrations.AlterField(
model_name='user',
name='gender',
... |
# coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.13.4
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
i... |
import hedfpy
from . import glm, plotting, preproc, utils
import matplotlib.pyplot as plt
import nibabel as nb
from nilearn.signal import clean
import numpy as np
import os
import pandas as pd
from scipy import io, stats
import warnings
opj = os.path.join
pd.options.mode.chained_assignment = None # disable warning thr... |
# uncompyle6 version 2.9.10
# Python bytecode 2.7 (62211)
# Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10)
# [GCC 6.2.0 20161005]
# Embedded file name: tasking_dsz.py
import mcl.framework
import mcl.tasking
class dsz:
INTERFACE = 16842801
PFAM = 4202
PROVIDER_ANY = 4202
PROVIDER = 16... |
'''
↓ を書け
###############
# hello world #
###############
'''
# hello world
|
#!/usr/bin/python
# -*- coding: utf-8 -*-
import socket
print(socket.gethostname())
"""
[root@huzhi-code 01_base]# python 01_socket_gethostname.py
huzhi-code
[root@huzhi-code 01_base]#
""" |
from time import sleep
def send(lora):
counter = 0
print("LoRa Sender")
while True:
payload = 'Hello ({0})'.format(counter)
print("Sending packet: \n{}\n".format(payload))
lora.println(payload)
counter += 1
sleep(5) |
from django.contrib import admin
from .models import Colorize
# Register your models here.
admin.site.register(Colorize) |
# Copyright 2021 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... |
# Copyright 2015 Richard Campen
# All rights reserved
# This software is released under the Modified BSD license
# See LICENSE.txt for the full license documentation
"""Module that enables basic file/directory browser functionality.
dirbrowser version 0.1.0
========================
This module includes a number of f... |
"""
Various bayesian regression
"""
from __future__ import print_function
# Authors: V. Michel, F. Pedregosa, A. Gramfort
# License: BSD 3 clause
from math import log
import numpy as np
from scipy import linalg
from .base import LinearModel
from ..base import RegressorMixin
from ..utils.extmath import fast_logdet, p... |
import asyncio
import subprocess
import pulsectl
class Pulse(pulsectl.Pulse):
async def __aenter__(self):
await asyncio.to_thread(self.__enter__)
return self
async def __aexit__(self, *exc_info):
await asyncio.to_thread(self.__exit__, *exc_info)
async def upload_sample(self, fil... |
#
# @copyright@
# Copyright (c) 2006 - 2019 Teradata
# All rights reserved. Stacki(r) v5.x stacki.com
# https://github.com/Teradata/stacki/blob/master/LICENSE.txt
# @copyright@
#
import os
import sys
import stack.django_env
import stack.commands
from stack.exception import *
from django.contrib.auth.models import Gro... |
# -*- coding: UTF-8 -*-
import os
import traceback
import simplejson as json
from django.conf import settings
from django.contrib.auth.decorators import permission_required
from django.contrib.auth.models import Group
from django.core.exceptions import PermissionDenied
from django.shortcuts import render, get_object_... |
# 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 collections import deque
import copy
import json
import logging
from numbers import Number
import os
import platform
import re
import shutil
import time
from typing import Dict, Optional, Sequence, Union, Callable, List
import uuid
import ray
import ray.cloudpickle as cloudpickle
from ray.exceptions import RayAct... |
"""Implementations of algorithms for continuous control."""
import functools
from typing import Sequence, Tuple
import jax
import jax.numpy as jnp
import numpy as np
import optax
from jaxrl.agents.ddpg.actor import update as update_actor
from jaxrl.agents.ddpg.critic import update as update_critic
from jaxrl.agents.... |
#////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
# Name :
# Author : Avi
# Revision : $Revision: #10 $
#
# Copyright 2009- ECMWF.
# This software is licensed under the terms of the Apache Licence version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE... |
from django.contrib.auth import views as auth_views
from django.urls import path
from . import views
urlpatterns = [
path('become-vendor/', views.become_vendor, name='become_vendor'),
path('vendor-admin/', views.vendor_admin, name='vendor_admin'),
path('add-product/', views.add_product, name='add_product'... |
from rti_python.Writer.rti_sql import rti_sql
from rti_python.Ensemble import Ensemble
from datetime import datetime, date, time
class RtiProjects:
"""
Handle the projects.
Create projects and add data to the projects.
"""
def __init__(self,
host='localhost',
po... |
from time import strftime, sleep
import sys
import os
import pandas as pd
from glob import glob
import numpy as np
def inspect_core_specifications(data, descriptives=False):
"""Inspect data types, shape and descriptives
:param data: pandas dataframe
:param descriptives: boolean, print descriptive statistics ... |
from elasticsearch import Elasticsearch
from rest_api.config import DB_HOST, DB_USER, DB_PW, DB_PORT, ES_CONN_SCHEME
elasticsearch_client = Elasticsearch(
hosts=[{"host": DB_HOST, "port": DB_PORT}], http_auth=(DB_USER, DB_PW), scheme=ES_CONN_SCHEME, ca_certs=False, verify_certs=False
)
|
# Copyright 2019 Uber Technologies, 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 applica... |
import datetime
import uuid
from ipaddress import IPv4Address
from pathlib import PureWindowsPath, PurePosixPath
from urllib.parse import urlparse
import pandas as pd
import numpy as np
from shapely import wkt
from visions.core.implementations.types import *
def get_series():
return [
# Int Series
... |
"""
Cisco Intersight
Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environments in more advan... |
# -*- coding: utf-8 -*-
import gc
import sys
import re
import binascii
import json
import threading
import math
import time
import datetime
import contextlib
import urllib
from kodijsonrpc import rpc
import xbmc
import xbmcgui
import xbmcaddon
from plexnet import signalsmixin
DEBUG = True
_SHUTDOWN = False
ADDON = ... |
# Copyright (c) Charl P. Botha, TU Delft.
# All rights reserved.
# See COPYRIGHT for details.
"""Utility methods for vtk_kit module kit.
@author Charl P. Botha <http://cpbotha.net/>
"""
import vtk
class DVOrientationWidget:
"""Convenience class for embedding orientation widget in any
renderwindowinteractor.... |
import os
import re
import commands
import ConfigParser
sectionName = 'sequencer'
confFile = os.path.expanduser('%s/panda.cfg' % os.environ['PANDA_CONFIG_ROOT'])
# check file existence
if not os.path.exists(confFile):
raise RuntimeError, "config file : %s doesn't exist" % confFile
# check section
parser=ConfigPar... |
"""A tiny example binary for the native Python rules of Bazel."""
from examples.py_native.lib import GetNumber
print "The number is %d" % GetNumber()
|
#!/usr/bin/env python
# coding: utf8
import kalliope
if __name__ == '__main__':
kalliope.main()
|
import datetime
from django.views.generic.detail import DetailView
from django.shortcuts import render
from django.utils import timezone
from .models import xss,ccpa,treatment,provider,customer
# Create your views here.
from django.conf import settings
from django.http import HttpResponse, Http404
from django.core im... |
import json
from django.shortcuts import render
from django.core import serializers
from django.http import HttpResponse
from django.conf import settings
from django.contrib.auth.models import User
from django.contrib.auth.decorators import login_required
from api.models.ec.organization import Organization
from api.mod... |
# HIDClass.py
#
import struct
from .USB import *
from .USBClass import USBClass
#
# FIXME: This should actually parse HID and subordinate descriptors e.g.
# for easy parsing during MITM attacks. To make things easy for now we just
# provide basic support for replaying these.
#
#
# FIXME: This should also implement a... |
from datetime import datetime
from imdb_app import db
class Titles(db.Model):
__tablename__ = 'titles'
id = db.Column(db.BigInteger, primary_key=True)
name = db.Column(db.String(255))
release_year = db.Column(db.String(80))
end_year = db.Column(db.String(80))
genres = db.Column(db.String(255... |
num = float(input())
while num < 1 or num > 100:
num = float(input())
if 1 <= num <= 100:
break
print(f'The number {num} is between 1 and 100')
|
import xgboost as xgb
from sklearn.metrics import roc_auc_score
import hyperopt
from hyperopt import STATUS_OK, Trials, hp, space_eval, tpe
import lightgbm as lgb
import pandas as pd
import numpy as np
from sklearn.model_selection import train_test_split, RandomizedSearchCV
from Auto_Tabular.utils.log_utils import log... |
# Copyright (C) 2007-2020, Raffaele Salmaso <raffaele@salmaso.org>
#
# 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, cop... |
import os
from typing import List, Optional, Tuple, Union
import vapoursynth as vs
from bvsfunc.util import ap_video_source
from lvsfunc.misc import source
from lvsfunc.types import Range
from vardautomation import (JAPANESE, AudioStream, FileInfo, Mux, Patch,
PresetAAC, PresetWEB, RunnerCo... |
import uuid
from collections import namedtuple
from datetime import datetime
from django.db import router
from django.test import TestCase
from corehq.apps.commtrack.const import SUPPLY_POINT_CASE_TYPE
from corehq.form_processor.backends.sql.dbaccessors import CaseAccessorSQL
from corehq.form_processor.backends.sql.p... |
#======================================================================
# HODGKIN HUXLEY NEURON MODEL Originally Modified Feb 2021 by @conBraun
#======================================================================
# HodgkinHuxley and Gate class structures are inspired by script authored by Peter Rupprecht, modified ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.