text stringlengths 2 999k |
|---|
#!/usr/bin/env python
import os
import re
import unasync # requires pip>=10.0 for PEP 518 support
from setuptools import setup
# Get the version (borrowed from SQLAlchemy)
base_path = os.path.dirname(__file__)
with open(os.path.join(base_path, "src", "urllib3", "__init__.py")) as fp:
version = re.match(r".*__v... |
"""Import tasks for data directly donated to the Open Supernova Catalog."""
import csv
import json
import os
from decimal import Decimal
from glob import glob
from math import floor, isnan
import numpy as np
from astrocats.catalog.photometry import PHOTOMETRY, set_pd_mag_from_counts
from astrocats.catalog.spectrum imp... |
# 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.
# C... |
#!/usr/bin/env python
import contextlib
import functools
import os
import pkgutil
import tempfile
from inspect import signature
from typing import Any, Iterable, List, Callable, Dict, Optional
import docker
import filelock
from sonic_py_common import device_info
from sonic_package_manager import utils
from sonic_pac... |
import csv
import functools
import os
import sys
import tempfile
import time
from datetime import datetime, date
from multiprocessing import Process, Lock
import requests
from elasticsearch import Elasticsearch
from elasticsearch_dsl import Search
from .ioqueue import IOQueueManager
from .unitrefs import UnitHandl... |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.contrib.gis.db.models.fields
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Timezone',
fields=[
... |
from django.conf import settings
from django.conf.urls import include
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import path, re_path
from rest_framework import routers
from app.views import (ChangePasswordHandler, DailyReportHandler, Dashboard,
... |
"""
URL routing schema for tutor-group-system.
"""
from django.urls import path
from . import views
app_name = "tutor-group-system"
urlpatterns = [
path('example', views.example, name='example'),
]
|
import sys
from codecs import open
from os import path
from dsfinvk import version
from setuptools import find_packages, setup
here = path.abspath(path.dirname(__file__))
try:
# Get the long description from the relevant file
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_descr... |
"""
Consolidate Services
Description of all APIs # noqa: E501
The version of the OpenAPI document: version not set
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from argocd_python_client.model_utils import ( # noqa: F401
ApiTypeError,
Mo... |
# Copyright 2021, Kay Hayen, mailto:kay.hayen@gmail.com
#
# Part of "Nuitka", an optimizing Python compiler that is compatible and
# integrates with CPython, but also works on its own.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in complianc... |
# Generated by Django 2.2.1 on 2019-08-13 13:57
from django.db import migrations, models
import django.db.models.deletion
import functools
import src.file_upload.models
import uuid
class Migration(migrations.Migration):
initial = True
dependencies = [
('incidents', '__first__'),
]
operatio... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 5/15/20 4:49 PM
# @File : grover.py
# qubit number=5
# total number=50
import cirq
import cirq.google as cg
from typing import Optional
import sys
from math import log2
import numpy as np
#thatsNoCode
from cirq.contrib.svg import SVGCircuit
# Symbols for... |
a=9938938478374
while 1:
a=a*9999999999999999999999999999294892374827481178246782149999999992347236781678418942718947
print(a) |
# coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v1.20.7
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unitte... |
import os
from cloudify_cli.cli import cfy
from cloudify_cli.table import print_data
from cloudify_cli.exceptions import CloudifyValidationError
LICENSE_COLUMN = ['customer_id', 'expiration_date', 'license_edition', 'trial',
'cloudify_version', 'capabilities', 'expired']
@cfy.group(name='license')... |
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto. Any use, reproduction, disclosure or
# distribution of this software and rel... |
"""
Copyright 2020 The OneFlow 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 applicable l... |
import csv
import xlrd
import xlsxwriter
from datetime import datetime
import os
import sys
import re
import add_coal_plan
FIELD_FILE_1 = "fields_t012331.csv"
STAIONS_FILE = "pp_correspondence.csv"
MONTHES_DICT = {"01":"січня" , "02":"лютого", "03":"березня", "04":"квітня", "05":"травня", "06":"червня", "07":"липня", ... |
# -*- coding: utf-8 -*-
from dateutil import rrule
from datetime import date, datetime, timedelta
from django.conf import settings
from django.db import models
from django.db.models import Q, Case, When, Value
from django.core.exceptions import ValidationError
from django.utils.timezone import make_aware, is_naive, m... |
# -*- coding: utf-8 -*-
#
# AUTOR: Douglas Medeiros Nehme
#
# CONTACT: medeiros.douglas3@gmail.com
#
# CRIATION: fev/2017
#
# LAST MODIFICATION: mar/2017
#
# OBJECTIVE: Manipulating Antartica wind data
import os
import math
import numpy as np
import pandas as pd
import matplotlib as mpl
import matplotlib.pyplot as plt... |
#!/usr/bin/env python3
# Copyright (c) 2020 The Baricoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Script for verifying Bitoin Core release binaries
This script attempts to download the signature file SHA2... |
# #####################################################################################################################
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. #
# ... |
import tensorflow as tf
from tensorflow.python.platform import gfile
with tf.Session() as sess:
model_filename ="frozen_yolo_v3.pb"
with gfile.FastGFile(model_filename, "rb") as f:
graph_def = tf.GraphDef()
graph_def.ParseFromString(f.read())
g_in = tf.import_graph_def(graph_def)
L... |
'''The lib contains exceptions, constants and the sid class'''
import base64
import struct
import binascii
SID_STRING = 0
SID_BINARY = 1
SID_BASE64 = 2
class sidException(Exception):
'''Base exception derived from Exception class'''
pass
class sidExceptionNoSuchType(sidException):
'''No such type exc... |
"""Matplotlib hooks, for what its worth."""
from io import BytesIO
import shutil
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
from xonsh.tools import print_color, ON_WINDOWS
try:
# Use iterm2_tools as an indicator for the iterm2 terminal emulator
from iterm2_tools.images import displa... |
# Copyright (c) 2020 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... |
# Copyright 2019 The Magenta 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 ... |
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... |
"""
Support for Z-Wave climate devices.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/climate.zwave/
"""
# Because we do not compile openzwave on CI
# pylint: disable=import-error
import logging
from homeassistant.components.climate import DOMAIN
from h... |
# Copyright 2019 The Sonnet 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 applicable l... |
#!/usr/bin/env python3
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import argparse
import pathlib
import sys
import typing
import onnx
from util.file_utils import files_from_file_or_dir, path_match_suffix_ignore_case
def _get_suffix_match_predicate(suffix: str):
... |
# Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... |
features = [
's__Abiotrophia_defectiva',
's__Acidaminococcus_fermentans',
's__Acidaminococcus_intestini',
's__Actinomyces_graevenitzii',
's__Actinomyces_odontolyticus',
's__Actinomyces_oris',
's__Actinomyces_turicensis',
's__Actinomyces_viscosus',
's__Adlercreutzia_equolifaciens',
's__Aggregatibacte... |
#
# 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... |
import time
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
chrome_options = Options()
chrome_options.headless = True
# TC10
class TestSaveData(object):
def setup_method(self):
self.driver = webdriver.Chrome(options=chrome_options)
self.driver.get("h... |
def moveDownRight(shift):
hero.moveXY(hero.pos.x + shift, hero.pos.y - shift)
def moveUpRight(shift):
hero.moveXY(hero.pos.x + shift, hero.pos.y + shift)
hunter = hero.findFriends()[0]
route = hunter.route
routeIndex = 0
while routeIndex < route.length:
direction = route[routeIndex]
r... |
# -*- coding: utf-8 -*-
"""
Created on Sun Jun 25 22:02:07 2017
@author: Anthony
"""
import numpy as np
import pandas as pd
df = pd.read_csv("dataset_2.csv")
df['default'].describe()
print(sum(df['default'] == 0))
print(sum(df['default'] == 1))
X = df.iloc[:, 1:6].values
y = df['default'].values
# Splitting the da... |
from __future__ import division
import argparse
from PIL import Image
import numpy as np
import gym
from keras.models import Sequential
from keras.layers import Dense, Activation, Flatten, Convolution2D, Permute
from keras.optimizers import Adam
import keras.backend as K
from rl.agents.dqn import DQNAgent
from rl.po... |
from flask import Blueprint, request
from aleph.model import Role, Permission
from aleph.logic.roles import check_visible
from aleph.logic.permissions import update_permission
from aleph.logic.collections import update_collection
from aleph.views.forms import PermissionSchema
from aleph.views.serializers import Permis... |
# qubit number=4
# total number=45
import cirq
import qiskit
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import BasicAer, execute, transpile
from pprint import pprint
from qiskit.test.mock import FakeVigo
from math import log2
import numpy as np
import networkx as nx
def bitwise_... |
"""
Django views for interacting with Stock app
"""
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.core.exceptions import ValidationError
from django.views.generic.edit import FormMixin
from django.views.generic import DetailView, ListView
from django.forms.models import model_to_dict
fro... |
import time
class ball():
def __init__(self, x = 5, y = 5, sx = 1, sy = 1, sp = 2, w = 10, h = 10):
self.x = x
self.y = y
self.sx = sx
self.sy = sy
self.sp = sp
self.w = w
self.h = h
def move(self):
self.x = self.x + self.sx * self.sp
sel... |
# generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/xavier_ssd/TrekBot/TrekBot2_WS/install/include".split(';') if "/xavier_ssd/TrekBot/TrekBot2_WS/install/include" != "" else []
PROJECT_CATKIN_DEPENDS = "pangolin_catkin".replace(';', ' ')
PKG_CONFIG_LI... |
from __future__ import absolute_import
from django.utils import timezone
from .utils import send_emails
from pyproduction.models import PyProduction
import logging
logger = logging.getLogger(__name__)
def item_production_mailer(*args, **kwargs):
now = timezone.now().date()
queryset = PyProduction.objects.f... |
__version__ = '1.0.3'
KERNEL_NAME = 'spring_kernel'
LANGUAGE = 'Lua'
DISPLAY_NAME= 'SpringRTS'
|
# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
# Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect 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 Lice... |
import os
from .base import CacheBackend
CACHE_BACKEND = os.environ.get('CACHE_BACKEND', 'dummy')
cache: CacheBackend = None
if CACHE_BACKEND == 'disk':
from .disk import DiskCache
cache = DiskCache()
elif CACHE_BACKEND == 's3':
from .s3 import S3Cache
cache = S3Cache()
else:
from .dummy impor... |
# 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... |
from collections import namedtuple
import math
import typing
from unittest.mock import Mock
from unittest.mock import patch
import chainer
import chainer.links as L
from chainer.training import triggers
import numpy as np
import pytest
import optuna
from optuna.integration.chainer import ChainerPruningExtension
from ... |
"""
Testing bebin histogram values.
"""
import numpy as np
from numpy.random import uniform
from numpy.testing import assert_allclose
from scipy.interpolate import splrep, splint
import uncertainties.unumpy as unp
import rebin
from bounded_splines import BoundedUnivariateSpline, BoundedRectBivariateSpline
# -----... |
from flask import Flask, render_template, request, redirect, url_for, flash, jsonify, send_from_directory
import os
from api.apiapp import api
from web.webapp import web
import yara
from git import Repo
from pathlib import Path
import shutil
app = Flask(__name__, static_folder='static', template_folder='templates')
ap... |
from typing import Generator, Iterable, List
from iota import Address, TRITS_PER_TRYTE, TrytesCompatible
from iota.crypto.kerl import Kerl
from iota.crypto.signing import KeyGenerator, KeyIterator
from iota.crypto.types import Digest, PrivateKey, Seed
from iota.exceptions import with_context
__all__ = [
'AddressG... |
# 2019-11-10 17:11:42(JST)
import sys
# import collections
# import math
# from string import ascii_lowercase, ascii_uppercase, digits
# from bisect import bisect_left as bi_l, bisect_right as bi_r
# import itertools
# from functools import reduce
# import operator as op
# from scipy.misc import comb # float... |
#!/usr/bin/python
#
# Copyright (c) 2019 Hewlett Packard Enterprise Development LP
#
# 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 re... |
import copy
import sys
try:
from ..vendor.lexicon import Lexicon
from ..vendor.fluidity import StateMachine, state, transition
except ImportError:
from lexicon import Lexicon
from fluidity import StateMachine, state, transition
from ..util import debug
from ..exceptions import ParseError
def is_flag... |
"""
Support for Nest Thermostat Sensors.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.nest/
"""
from itertools import chain
import logging
import voluptuous as vol
from homeassistant.components.nest import DATA_NEST, DOMAIN
from homeassistant.... |
from rest_framework import routers
from .api import TimelineViewSet
router = routers.DefaultRouter()
router.register('api/timelines', TimelineViewSet, 'timelines')
urlpatterns = router.urls
|
from __future__ import absolute_import
from datetime import datetime
import mock
import pytz
import six
from django.utils import timezone
from exam import fixture
from sentry.api.serializers import serialize
from sentry.incidents.models import Incident, IncidentActivity, IncidentStatus
from sentry.testutils import A... |
"""Convenience functions for dealing with objects' fully qualified names."""
# Copyright Aaron Hosford, 2018
# MIT License
import inspect
import sys
def find_object(name: str, *, auto_import: bool = True):
"""Look up an object by fully qualified name, e.g. module.submodule.class.object."""
if name in sys.mo... |
import numpy as np
import os
from PIL import Image
MatrixA = np.loadtxt('../A_8192.txt')
root = 'selfmadeimg'
new_root = 'selfmadetxt'
folders = ['2']
if not os.path.exists(new_root):
os.mkdir(new_root)
cnt = 0
for folder in folders:
if not os.path.exists('%s/%s'%(new_root, folder)):
os.mkdir('%s/%s... |
from typing import Dict, Union, Any
import mlflow
import hashlib
import json
import os
from contextlib import contextmanager
from mlflow.exceptions import MlflowException
from mlflow.utils.file_utils import TempDir
from mlflow.entities import RunTag
from mlflow.tracking.artifact_utils import _download_artifact_from_uri... |
"""create users table
Revision ID: e3a93a4499c3
Revises:
Create Date: 2020-10-06 15:19:53.345448
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'e3a93a4499c3'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto... |
import math
catetoAdjacente = float(input("Digite um numero..."))
catetoOposto = float(input("Digite outro numero..."))
res = math.hypot(catetoAdjacente,catetoOposto)
print("A hipotenusa tem como valor {}:" .format(res)) |
# Generated by Django 2.2.2 on 2019-08-23 04:29
from django.db import migrations, models
import user.managers
class Migration(migrations.Migration):
initial = True
dependencies = [
('auth', '0011_update_proxy_permissions'),
]
operations = [
migrations.CreateModel(
name=... |
import os,shutil,sys
import numpy as np
from mpi4py import MPI
from pypospack.pyposmat2.data import PyposmatConfigurationFile
from pypospack.pyposmat2.engines import PyposmatIterativeSampler
if __name__ == "__main__":
import Ni__eam__morse_exp_fs_0 as config
pyposmat_filename_in = 'pyposmat.config.in'
#--... |
"""Test AdaNet estimator cluster training support.
Copyright 2019 The AdaNet 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
https://www.apache.org/licenses/LICEN... |
import time
import socket
import select
import threading
import queue
class tsException(Exception):
def __init__(self, msg):
self.msg = msg
class tsConnection:
def __init__(self):
self.socket = None
self.buffer = ''
def connect(self, addr):
if self.socket:
self.disconnect()
self.addr = addr
ip,... |
import logging
import colander
from cornice.validators import colander_validator
from pyramid import httpexceptions
from pyramid.security import NO_PERMISSION_REQUIRED
from kinto.core import Service, errors
from kinto.core.errors import ErrorSchema
from kinto.core.resource.viewset import CONTENT_TYPES
from kinto.core... |
from __future__ import with_statement # this is to work with python2.5
from validation import vworkspace
with vworkspace() as w:
w.activate('must_regions')
w.props.memory_effects_only = False
# Force the loop nest to be parallel :-)
w.fun.main.loops()[0].parallel=True
w.fun.main.loops()[0].lo... |
"""
Şimdi de geometrik şekil hesaplama işlemi yapalım. İlk olarak kullanıcıdan üçgenin mi dörtgenin mi tipini bulmak istediğini sorun.
Eğer kullanıcı "Dörtgen" cevabını verirse , 4 tane kenar isteyip bu dörtgenin kare mi , dikdörtgen mi yoksa sıradan bir dörtgen mi olduğunu
bulmaya çalışın.
Eğer kullanıcı "Üçgen" cev... |
# Copyright 2014 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 telemetry import story
from page_sets import polymer
class PaperCalculatorHitTest(polymer.PolymerPage):
def __init__(self, page_set):
super(Pap... |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 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
#
... |
# Copyright 2004-2008 Roman Yakovenko.
# Distributed under the Boost Software License, Version 1.0. (See
# accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
import os
import sys
import unittest
import fundamental_tester_base
class tester_t(fundamental_tester_base.fundamental_tester_... |
with Pattern(pin_header="swd") as pat:
origen.tester.cc(
"Wrap some of the commonly used tasks into their own methods")
origen.dut.arm_debug.switch_to_swd()
origen.tester.cc("The register model should be available")
origen.dut.arm_debug.dp.idcode.verify(0xDEAD_C0DE)
origen.dut.arm_debug.dp.... |
from utils_lll import create_dataloader, QADataset
from settings_lll import args, TASK_DICT
import pickle as pkl
import re
import os
import json
from multiprocessing import Pool
def serialize_data(redo=True):
print("serializing data ...")
for t in ["train", "eval", "test"]:
for task in TASK_DICT.key... |
# -*- coding: utf-8 -*-
# Copyright (c) 2017 Ansible, Inc.
# All Rights Reserved.
import pytest
from django.apps import apps
from awx.main.models.base import PERM_INVENTORY_SCAN, PERM_INVENTORY_DEPLOY
from awx.main.models import (
JobTemplate,
Project,
Inventory,
Organization,
)
from awx.main.migrat... |
import sys
import webbrowser
from PyQt4 import QtGui
from PyQt4 import QtCore
from buildnotifylib.core.distance_of_time import DistanceOfTime
from preferences import PreferencesDialog
from version import VERSION
class AppMenu:
def __init__(self, app, tray, widget, conf, build_icons):
self.menu = QtGui.QM... |
from reinforcement_learning.market.random_agent import RandomAgent
import sys
sys.path.insert(0, '../../../etf_data')
from etf_data_loader import load_all_data_from_file2
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from datetime import datetime
import seaborn as sns
def gen_random_date(y... |
# -*- coding: utf-8 -*-
from os import environ
from os.path import normpath
from .base import *
#######################
# Debug configuration #
#######################
DEBUG = True
##########################
# Database configuration #
##########################
DATABASES['default']['ENGINE'] = 'd... |
# coding=utf-8
from prototypical_batch_sampler import PrototypicalBatchSampler
from omniglot_dataset import OmniglotDataset
from mini_imagenet_dataset import MiniImagenetDataset
from protonet import ProtoNet
import torch
from prototypical_loss import prototypical_loss as loss, obtain_mean
from torch.autograd import Var... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2017, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... |
from django.conf.urls import url
urlpatterns = [
url(r'^$', lambda x: x, name='name_with:colon'),
]
|
# Libraries
import pytest
import pandas as pd
# DataBlend libraries
from datablend.core.blend.template import BlenderTemplate
from datablend.core.widgets.base import BaseWidget
from datablend.core.widgets.format import RenameWidget
from datablend.core.widgets.format import ReplaceWidget
from datablend.core.widgets.for... |
# Generated by Django 3.1.1 on 2020-10-13 16:28
from django.conf import settings
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AU... |
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class RocmClangOcl(CMakePackage):
""" OpenCL compilation with clang compiler """
homepage =... |
import torch.nn
from src.model_management import models
from torch import optim
from src import signal_functions, metrics
from ray import tune
import numpy as np
from src.model_management.hyperparameter_optimization import optimization_objective
from src.trade_utils import ParallelTrader, Trader
analysis = tune.run(
... |
#!/usr/bin/env python
# Copyright 2019 Google LLC
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
import argparse
import bisect
import codecs
import os
import sys
import yaml
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__... |
# CS60012 A8
# task1
# Ravi Pratap Singh (20CS60R60)
import urllib.request, urllib.error, urllib.parse
import os
import codecs
import re
import sys
def main():
#getting links from text files
if not os.path.exists("./HTML"):
os.mkdir("./HTML")
inputFileName = "rotten tomatoes movie genre link.txt"
with open(inp... |
from django.conf.urls import url
from . import views
app_name = 'label'
urlpatterns = [
url(r'^$', views.index, name='index'),
]
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import csv, os, sys, math, time, random, re
import argparse
import heapq
import subprocess
from enum import Enum
import itertools
import traceback
import json
import numpy as np
## for parallel
from joblib import Parallel, delayed
import multiprocessing as mp
import sock... |
# 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... |
"""
This file offers the methods to automatically retrieve the graph Mycoplasma iowae.
The graph is automatically retrieved from the STRING repository.
References
---------------------
Please cite the following if you use the data:
```bib
@article{szklarczyk2019string,
title={STRING v11: protein--protein assoc... |
#!/usr/bin/env python
#
# sslsniff Captures data on read/recv or write/send functions of OpenSSL,
# GnuTLS and NSS
# For Linux, uses BCC, eBPF.
#
# USAGE: sslsniff.py [-h] [-p PID] [-c COMM] [-o] [-g] [-d]
#
# Licensed under the Apache License, Version 2.0 (the "License")
#
# 12-Aug-2016 Adrian ... |
#
# example.py
# ExpertSystem
#
# Written by Firsov Georgy
# Copyright © 2019 Firsov Georgy. All rights reserved.
# Licensed with MIT
#
from ExpertSystem.Machine import Machine
from Utils.settings import initial_file, rules_file
def main():
try:
machine = Machine(rules_file, initial_file)
machine... |
# Generated by Django 2.2.13 on 2021-03-03 23:01
import django.contrib.postgres.fields
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('reo', '0103_auto_20210223_1608'),
]
operations = [
migrations.CreateModel(
name='NewBoile... |
import unittest
from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import Session
import sys
sys.path.append('../')
from fantasyx.models import *
Base = declarative_base()
class TestDraft(unittest.TestCase):
def setUp(self):
self.engin... |
"""
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TestCase, RequestFactory
try:
# Django >= 1.7
from django.test import override_settings
except ImportError... |
"""
Copyright (C) Microsoft Corporation. All rights reserved.
Microsoft Corporation (“Microsoft”) grants you a nonexclusive, perpetual,
royalty-free right to use, copy, and modify the software code provided by us
("Software Code"). You may not sublicense the Software Code or any use of it
(except to your affi... |
from __future__ import print_function, absolute_import
import os, pydoc
import numpy as np # noqa (API import)
import param
__version__ = param.Version(release=(1,9,2), fpath=__file__,
commit="$Format:%h$", reponame='holoviews')
from .core import archive, config # ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.