text
stringlengths
2
999k
# Generated by Django 2.2.14 on 2021-12-03 16:01 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0005_auto_20211203_1544'), ] operations = [ migrations.AlterField( model_name='item', name='category', ...
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/06_data.block.ipynb (unless otherwise specified). __all__ = ['TransformBlock', 'CategoryBlock', 'MultiCategoryBlock', 'RegressionBlock', 'DataBlock'] # Cell from ..torch_basics import * from .core import * from .load import * from .external import * from .transforms imp...
# -*- coding: utf-8 -*- """ Created on Thu Nov 22 15:18:29 2018 @author: Saurav """ def sheetExport(df): #authorization gc = pygsheets.authorize(service_file='/Users/Saurav/Desktop/NSE-Index-8086c5d81c3e.json') #open the google spreadsheet (where 'PY to Gsheet Test' is the name of my sheet) ...
""" ASGI config for django_rest_server project. It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ.setdefault('D...
#!/usr/bin/env python from PyQt4 import QtGui from PyQt4 import QtCore from PyQt4 import Qt import PyQt4.Qwt5 as Qwt import numpy as np import sys class overlayLabel(QtGui.QLabel): def __init__(self, parent=None, text = "", pixelSize=20, r=255,g=255,b=255, underline=True, bold=True): super(ove...
# Original work Copyright 2018 The Google AI Language Team Authors. # Modified work Copyright 2019 Rowan Zellers # # 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/...
from django.conf import settings from django.conf.urls import url from .views import index, login from .api import urlpatterns as api_patterns urlpatterns = [ url(r'login/$', login, name='parakeet_login'), url(r'', index), ] urlpatterns = api_patterns + urlpatterns
import json import pprint import datetime import argparse from path import Path from easydict import EasyDict import basic_train import SSL_train from logger import init_logger if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('-c', '--config', default='configs/sintel_ft.json'...
#!/usr/bin/env python """Main content view notitification tests.""" import unittest from grr_response_core.lib import flags from grr_response_server import aff4 from grr_response_server.aff4_objects import users as aff4_users from grr_response_server.gui import gui_test_lib from grr.test_lib import db_test_lib @db_...
""" Manager and Serializer for Users. """ import logging import sqlalchemy from galaxy import ( exceptions, model, util ) from galaxy.managers import ( api_keys, base, deletable ) from galaxy.security import validate_user_input log = logging.getLogger(__name__) class UserManager(base.ModelM...
import re def save_list(xs, name): "Save a list as text, one entry per line." with open(name, "w") as f: for x in xs: f.write(str(x) + "\n") def load_list(name, convert=lambda x: x): """ Make each line of a file into a list entry. Apply a conversion function to each line (e.g....
import numpy as np import re import unittest from tempfile import TemporaryDirectory import ray import ray.rllib.agents.ddpg as ddpg from ray.rllib.agents.ddpg.ddpg_torch_policy import ddpg_actor_critic_loss as \ loss_torch from ray.rllib.agents.sac.tests.test_sac import SimpleEnv from ray.rllib.execution.replay_b...
import sys import os import math sys.path.append(os.path.join(os.path.dirname(__file__), "..")) from src.SimulationController import SimulationController from src.TrafficMap import TrafficMap from src.Road import Road from src.Intersection import Intersection from src.drivers.DriverTemplate import DriverTemplate from...
#import gobject #from dbus.mainloop.glib import DBusGMainLoop import dbus import json import datetime import couchdb import time from conf import getUsernamePassword #DBusGMainLoop(set_as_default=True) #loop = gobject.MainLoop() bus = dbus.SystemBus() upower = bus.get_object("org.freedesktop.UPower","/org/freedesktop/...
#!/usr/bin/env python from optparse import OptionParser import os import h5py import pysam import basenji.dna_io ################################################################################ # hdf5_bed.py # # Checking that the BED regions output by basenji_hdf5.py match the one hot # coded sequences in the HDF5. ...
from pydantic import BaseModel from typing import List class Category(BaseModel): id: int name: str class Tags(BaseModel): id: int name: str = None class Pet(BaseModel): id: int category: Category = None name: str photoUrls: List[str] tags: List[Tags] status: str def test_g...
from .subgrid import SubGrid from .tile import GridTile from .grid import Grid
# type: ignore #---------------------------------------------------------------------- # Copyright 2007-2011 Mentor Graphics Corporation # Copyright 2007-2010 Cadence Design Systems, Inc. # Copyright 2010 Synopsys, Inc. # Copyright 2019 Tuomas Poikela (tpoikela) # All Rights Reserved Worldwide # # Licensed ...
""" Practice - 6 """ if __name__ == '__main__': A = [ 1, 2, 3, 5, 1, 1, 5, 6, 7, 8, 10, 11, 12, 19, 13, 100, 139, 122, 134, 1001, 12929] B = [12, 45, 122, 11, 1, 3, 5, 6, 7, 100, 10001, 123423] C = [] for x in A: if x in B and x not in C: C.append(x) C.sort() print C
""" This module evaluate the pattern detection in historical data """ import logging from sdm.util.date_utils import date_to_string from sdm.candlestick.parameters import RSI_N import plotly.graph_objects as go from inspect import signature def make_plot_dict(datetime): date_text = date_to_string(datetime) ...
import time import webbrowser import uuid import random import ctypes def waits(sec): time.sleep(sec) # Des idées pour économiser def économie(): economie = input('Séléctionner le prix : ') if int(economie) <= 20: print( "Négocier le prix avec un accent bizzare ou faite semblant de ...
# Generated by Django 3.1.5 on 2021-02-03 14:58 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('comments', '0001_initial'), ('group_members', '0001_initial'), ] operations = [ ...
# 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 -*- # Carlo Pires <carlopires@gmail.com> # forked from: http://pypi.python.org/pypi/hgrecipe/0.9 # Qua 16 Mar 2011 09:09:01 BRT import logging import os import shutil from mercurial import commands, hg, ui class Mercurial(object): """ Buildout Recipe to clone from a Mercurial Repository. ``dir...
# Copyright 2020 The StackStorm Authors. # Copyright 2019 Extreme Networks, 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 ...
from __future__ import division, absolute_import, print_function import sys import math import numpy.core.numeric as _nx from numpy.core.numeric import ( asarray, ScalarType, array, alltrue, cumprod, arange ) from numpy.core.numerictypes import find_common_type, issubdtype from . import function_base import ...
import torch.nn as nn class UserEmbedding(nn.Embedding): def __init__(self, user_size, embed_size=512): super().__init__(user_size, embed_size) # User embedding indexes start at 0 # 0 is not a padding index!
# # discord.py documentation build configuration file, created by # sphinx-quickstart on Fri Aug 21 05:43:30 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration valu...
""" qm_project A package for doing Hartree-Fock/MP2 """ import os import sys import platform from setuptools import setup, find_packages, Extension import versioneer short_description = __doc__.split("\n") # from https://github.com/pytest-dev/pytest-runner#conditional-requirement needs_pytest = {'pytest', 'test', 'pt...
# # Copyright 2012 New Dream Network, LLC (DreamHost) # # 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...
import random import numpy as np import torch import torch.nn as nn from torch.autograd import Variable import torch.nn.functional as F from .attention import Attention if torch.cuda.is_available(): import torch.cuda as device else: import torch as device class DecoderRNN(nn.Module): r""" Provides...
from collections import OrderedDict from rest_framework import serializers from rest_framework.reverse import reverse from rest_framework.validators import UniqueTogetherValidator from taggit_serializer.serializers import TaggitSerializer, TagListSerializerField from dcim.api.nested_serializers import NestedDeviceSer...
""" SLAP Plugin For Userbot usage:- .slap in reply to any message, or u gonna slap urself. """ import sys from telethon import events, functions from uniborg.util import admin_cmd import random from telethon.tl.functions.users import GetFullUserRequest from telethon.tl.types import MessageEntityMentionName from userb...
# coding=utf-8 # # Alternate implementations of the cascading mate queries in mate.py, to go with the FragmentIndex.. # # code by Andreas Windemuth from typing import NamedTuple import numpy as np from .util import Vec class MateQueryParams(NamedTuple): """Collection of all the parameters a query may depend on""...
# Note that IP routes need to be added on the hosts in order for this to run as intended # These instructions can be found in the README import socket, ssl import scrypt, secrets, dpkt import os, sys, time, random, string, csv from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives...
import sys from six import string_types, text_type, PY2 import os import re import json import pytz import shutil import requests from io import open if PY2: from urllib import urlencode, urlretrieve else: from urllib.request import urlretrieve from urllib.parse import urlencode import pycurl import tempfil...
""" Configuration for docs """ # source_link = "https://github.com/[org_name]/nodux_advanced_payment" # docs_base_url = "https://[org_name].github.io/nodux_advanced_payment" # headline = "App that does everything" # sub_heading = "Yes, you got that right the first time, everything" def get_context(context): context....
import plotly.express as px import plotly.graph_objects as go import pandas as pd def graph(x,y, title): fig = px.scatter(x=x, y=y) fig.update_layout( title={ 'text': title, 'x': 0.5, 'y': 1, 'xanchor': 'center', 'yanchor': 'top', ...
#!/usr/bin/env python3 import unittest import numpy as np import robot_interfaces import robot_fingers.pybullet_drivers from trifinger_simulation import finger_types_data class TestPyBulletBackend(unittest.TestCase): """Test using pyBullet in the robot interface backend via Python.""" def _run_position_test...
""" Perform Levenberg-Marquardt least-squares minimization, based on MINPACK-1. AUTHORS The original version of this software, called LMFIT, was written in FORTRAN as part of the MINPACK-1 package by XXX. Craig Markwardt converted the FORTRAN code to IDL. The information for ...
from common import google_cloud class GANTrainParameters(): def __init__(self): self.num_epochs = 2000 self.batch_size = 10000 self.num_steps = 1 self.lr_d = 0.01 self.lr_g = 0.001 if not google_cloud: self.batch_size = 1 training_param = GANTrainPara...
import cv2 import math import argparse import imutils def highlightFace(net, frame, conf_threshold=0.7): frameOpencvDnn=frame.copy() frameHeight=frameOpencvDnn.shape[0] frameWidth=frameOpencvDnn.shape[1] blob=cv2.dnn.blobFromImage(frameOpencvDnn, 1.0, (300, 300), [104, 117, 123], True, False) ne...
# Generated by Django 3.0.2 on 2020-02-04 13:18 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Queue', fields=[ ('id', models.AutoField(au...
# Copyright 2012-2015 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file ac...
from abc import ABCMeta, abstractmethod import six from ..pyutils.cached_property import cached_property from ..language import ast # Necessary for static type checking if False: # flake8: noqa from typing import Dict, Optional, Union, Callable from ..language.ast import Document from ..type.schema impor...
from django.test import TestCase, Client from django.contrib.auth import get_user_model from django.urls import reverse class AdminSiteTests(TestCase): def setUp(self): self.client = Client() self.admin_user = get_user_model().objects.create_superuser( email='id.purwowd@gmail.com', ...
class Location: def __init__(self, name, x, y): self.name = name self.x = x self.y = y self.goods_creation_rate = {} self.goods_consumption_rate = {} self.goods_quantity = {} self.goods_quantity_fractional = {} def step(self, dt): for good in sel...
import inspect import asyncio from rtcbot.subscriptions import EventSubscription class baseReadySubscription: # This subscription is special: it doesn't return anything. It just... fires def __init__(self, evt): self.__evt = evt async def get( self, ): # We want the get to be there ...
''' The MIT License(MIT) Copyright(c) 2016 Copyleaks LTD (https://copyleaks.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 ...
import pandas as pd from lyrics_function import get_genres, get_missing_genres from lyrics_function import get_song_lyrics import pandas as pd import os import unicodedata from tqdm import tqdm GENIUS_API_TOKEN = '8E4NGMZM8KOloJtNlWp8oMjHJtbuAGa07QF-VgjvGzJkEi7l-uUvLI8A4DvhKnuX' #====================================#...
from typing import List from core.shape_abc import Shape, ShapeFactory class Application: def __init__(self, shape_factory: ShapeFactory): self.shape_factory = shape_factory self.shapes: List[Shape] = [] def run(self): while True: self.draw_menu() shape_type = ...
import sys # Remove current dir from sys.path, otherwise setuptools will peek up our # module instead of system's. sys.path.pop(0) from setuptools import setup sys.path.append("..") import sdist_upip setup(name='micropython-pyclbr', version='0.0.0', description='Dummy pyclbr module for MicroPython', ...
import os import util import numpy as np import torch import torch.nn as nn from solutions.torch_modules import AttentionNeuronLayer ACT_DIM = 8 class PIStudent(nn.Module): """Permutation invariant student policy.""" def __init__(self, act_dim, hidden_dim, msg_dim, pos_em_dim): super(PIStudent, se...
# Traffic flow # # Copyright (c) 2018 Yurii Khomiak # # 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, merg...
# -*- coding: utf-8 -*- from math import prod from pyfr.backends.base.generator import BaseKernelGenerator class HIPKernelGenerator(BaseKernelGenerator): block1d = None block2d = None def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) # Specialise if self.nd...
import matplotlib as mpl import matplotlib.pyplot as plt import matplotlib.patches as patches from matplotlib.lines import Line2D import sys, argparse, json, os import numpy as np from copy import copy plt.style.use('classic') def get_chunks(cs, c, R, linewidth): """ Get the list of all rectangles representing...
import math from collections import deque from enum import Enum from typing import Optional import wpilib import ctre import magicbot from utilities.functions import constrain_angle class Index(Enum): # These are relative to the turret, which faces backwards on the robot. NO_INDEX = 0 CENTRE = 1 RIG...
#!/usr/bin/env python3 # # MIT License # # Copyright (c) 2020-2021 EntySec # # 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...
import pytest pytest.importorskip("numpy") import numpy as np import pytest from toolz import concat import dask import dask.array as da from dask.array.core import normalize_chunks from dask.array.utils import assert_eq, same_keys, AxisError from dask.array.numpy_compat import _numpy_117 @pytest.mark.parametrize(...
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # # Copyright 2018-2019 Fetch.AI 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 ...
########################################################################## # # pgAdmin 4 - PostgreSQL Tools # # Copyright (C) 2013 - 2020, The pgAdmin Development Team # This software is released under the PostgreSQL Licence # ########################################################################## """ Implements Pa...
from django.db import models from .base_model import BaseModel from .diocese import Diocese from .period import Period from .site import Site class SiteDiocese (BaseModel): site = models.ForeignKey(Site) diocese = models.ForeignKey(Diocese) period = models.ForeignKey(Period) class Meta: app...
def count_vowels(arr): vowels = ['a','e','i','o','u'] count = 0 for ch in arr.lower(): if ch in vowels: count += 1 return count def count_consonants(arr): vowels = ['a','e','i','o','u'] count = 0 for ch in arr.lower(): if not ch in vowels and ch.isalpha(): ...
#!/usr/bin/python # pylint: disable=too-many-lines # -*- coding: utf-8 -*- # Reason: Disable pylint too-many-lines because we don't want to split up this file. # Status: Permanently disabled to keep this module as self-contained as possible. """Ansible module for retrieving and setting openshift related facts""" # py...
# /usr/bin/env python3 # -*- coding: utf-8 -*- """Runs CoreMark Pro.""" import re import shlex import uuid from datetime import datetime from typing import Dict, Iterable, List from dateutil import tz from snafu.benchmarks import Benchmark, BenchmarkResult from snafu.config import ConfigArgument from snafu.process im...
import os import glob import torch from utils.utils import * from chemdataextractor.nlp.tokenize import ChemWordTokenizer NEW_ENT_TYPE = ['Collection', 'Company', 'Software', 'Info-Type'] WLP_ENT_NAME = ['Amount', 'Reagent', 'Device', 'Time', 'Speed', 'Action', 'Mention', 'Location', 'Numerical', 'M...
#!/usr/bin/env python """ Copyright 2019, Yao Yao, HKUST. Training script. """ from __future__ import print_function import os import time import sys import math import argparse from random import randint import cv2 import numpy as np import tensorflow as tf import matplotlib.pyplot as plt sys.path.append("../") f...
import sys from fontTools.otlLib.optimize import main if __name__ == '__main__': sys.exit(main())
from __future__ import absolute_import, unicode_literals import datetime from django.conf import settings from django.http import Http404 from django.core import paginator from django.db import models from django.db.models.fields import FieldDoesNotExist from django.shortcuts import get_object_or_404 from django.util...
from cyvcf2 import VCF def someFunction(filename): # return tmp return "hello: " + filename # return 'hello from python: " + tmp # print someFunction('hello world')
# Copyright 2022 Rafał Safin (rafsaf). 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 applicabl...
# -*- coding: 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 Apache License, Version 2.0 (the #...
# -*- coding: utf-8 -*- """ codegen ~~~~~~~ Extension to ast that allow ast -> python code generation. :copyright: Copyright 2008 by Armin Ronacher. :license: BSD. """ import ast from mutpy import utils BOOLOP_SYMBOLS = { ast.And: 'and', ast.Or: 'or' } BINOP_SYMBOLS = { ...
#!/usr/bin/env python import matplotlib.pyplot as plt import sys, os, time import numpy as np from numpy import linspace, meshgrid from matplotlib import cm import collections import random sys.path.insert(0, './helpers') from full_mesh_utils import * from utils import * from write_files import * from build_graph_im...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals from efc.interfaces.base import BaseExcelInterface from efc.interfaces.errors import NamedRangeNotFound from efc.utils import datetime_to_openxml, parse_date from openpyxl.utils.cell import coordinate_to_tuple ...
# Copyright The OpenTelemetry 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 ...
#!/usr/bin/env python # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # Michael A.G. Aivazis # California Institute of Technology # (C) 1998-2005 All Rights Reserved # # <LicenseText> # # ~~~~~~~~~~~~~...
# Crichton, Admirable Source Configuration Management # Copyright 2012 British Broadcasting 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/licens...
# Copyright 2019 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...
''' Sets up an instance of TF along by loading standard features + custom ones. ''' from paths import tf_data from tf.app import use from tf.fabric import Fabric standard = ''' pdp vs vt lex language gloss voc_lex voc_lex_utf8 function typ rela code number label book ''' plus = ''' function2 lex_sbl lex_sbl_l g_con...
""" Django settings for fablwriter project. Generated by 'django-admin startproject' using Django 2.0.7. For more information on this file, see https://docs.djangoproject.com/en/2.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.0/ref/settings/ """ import os...
""" """ #| - Import Modules import plotly.graph_objs as go #__| # ######################################################### #| - Main layout object layout = go.Layout( angularaxis=None, annotations=None, annotationdefaults=None, autosize=None, bargap=None, bargroupgap=None, barmode=None, ...
"""mysite URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-bas...
from __future__ import print_function from os import getcwd from os.path import dirname, abspath, isfile from shutil import copyfile from collections import OrderedDict import sys def copySampleAxData(): '''Copies the sample AXIOME data, updating the filepaths in the process''' #Finds the install directory, fr...
import BaseHTTPServer, SimpleHTTPServer import ssl # 0.0.0.0 allows connections from anywhere httpd = BaseHTTPServer.HTTPServer(('0.0.0.0', 443), SimpleHTTPServer.SimpleHTTPRequestHandler) httpd.socket = ssl.wrap_socket (httpd.socket, certfile='./newkey.crt', keyfile='./newkey.key', server_side=True) httpd.serve_forev...
from typing import Dict, Optional, List, Any from overrides import overrides import torch from allennlp.common.checks import check_dimensions_match from allennlp.data import TextFieldTensors, Vocabulary from allennlp.models.model import Model from allennlp.modules import FeedForward from allennlp.modules import Seq2S...
# -*- coding: utf-8 -*- """ message_media_lookups.message_media_lookups_client. """ from .decorators import lazy_property from .configuration import Configuration from .controllers.lookups_controller import LookupsController class MessageMediaLookupsClient(object): config = Configuration @l...
# -*- coding: utf-8 -*- # Copyright 2019 Cohesity Inc. import cohesity_management_sdk.models.data_transfer_to_vault_summary class DataTransferToVaultsSummaryResponse(object): """Implementation of the 'Data Transfer to Vaults Summary Response.' model. Provides summary statistics about the transfer of data fr...
# coding: utf-8 """ Isilon SDK Isilon SDK - Language bindings for the OneFS API # noqa: E501 OpenAPI spec version: 2 Contact: sdk@isilon.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class ChangelistLinsCtime(object...
# -*- coding: utf-8 -*- """ >>> from pyrandwalk import * >>> import numpy as np >>> states = [0, 1, 2, 3, 4] >>> trans = np.array([[1, 0, 0, 0, 0], ... [0.25, 0, 0.75, 0, 0], ... [0, 0.25, 0, 0.75, 0], ... [0, 0, 0.25, 0, 0.75], ... [0, 0, ...
from django.urls import path import blog.views as v urlpatterns = [ path('', v.PublicPostView.as_view(), name='blog-home'), path('post/<int:pk>/', v.PostDetailView.as_view(), name='post-detail'), path('post/new/', v.PostCreateView.as_view(), name='post-new'), path('post/admin_posts/', v.AdminPostView....
load("//:providers.bzl", "CudaInfo") def is_dynamic_input(src): return src.extension in ["so", "dll", "dylib"] def is_object_file(src): return src.extension in ["obj", "o"] def is_static_input(src): return src.extension in ["a", "lib"] def is_source_file(src): return src.extension in ["c...
# PROBLEM LINK:- https://leetcode.com/problems/minimum-depth-of-binary-tree/ class Solution: def minDepth(self, root: Optional[TreeNode]) -> int: if not root: return 0 if None in [root.left, root.right]: return 1 + max(self.minDepth(root.left), self.minDepth(root.ri...
#-*- coding: utf-8 -*- from dbmodel.entity import * class AcompanhanteAlteracao(Entity): __primary_key__ = ['id'] # FIELDS @Int(pk=True, auto_increment=True, not_null=True, precision = 10, scale=0) def id(self): pass @String(max=45) def alt_cod_validacao(self): pass @String(max=45) def alt_campo(self): pa...
#!/usr/bin/env python import vtk from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() # Example demonstrates how to generate a 3D tetrahedra mesh from a volume # # Quadric definition quadric = vtk.vtkQuadric() quadric.SetCoefficients([.5,1,.2,0,.1,0,0,.2,0,0]) sample = vtk.vtkSampleFunction() samp...
#! python3 import argparse import importlib import logging import os import shutil import urllib3 import zipfile import data # Logging console = logging.StreamHandler() console.setLevel(logging.INFO) console.setFormatter(logging.Formatter('[%(asctime)s %(levelname)-3s @%(name)s] %(message)s', datefmt='%H:%M:%S')) l...
# -*- coding: utf-8 -*- # # Services_Twilio documentation build configuration file, created by # sphinx-quickstart on Tue Mar 8 04:02:01 2011. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file....
from typing import Dict, Any from unittest import TestCase from server import app from flask.testing import FlaskClient from werkzeug.test import TestResponse from tests.test_firebaser import get_id_token class TestScansController(TestCase): def setUp(self) -> None: self.app: FlaskClient = app.test_client...
# See # https://github.com/shinh/opbench/blob/0a5d7a92cace9361f206866e2705bc98c9e07973/drivers/trt.py # https://github.com/NERSC/inference_benchmarks/blob/a44d2594ae8daee53165e5f4ae468235ac471002/hep_cnn/onnx/run_tensorrt_onnx.py from PIL import Image import time from collections import namedtuple import utils import ...
from output.models.saxon_data.missing.missing001_xsd.missing001 import ( Bad, Good, ) __all__ = [ "Bad", "Good", ]