text
stringlengths
2
999k
# 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 # *** 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 typing import Union from .. import utilities, tables class Replic...
from enum import IntEnum from typing import Dict, Union, Callable, Any from cereal import log, car import cereal.messaging as messaging from common.realtime import DT_CTRL from selfdrive.config import Conversions as CV from selfdrive.locationd.calibrationd import MIN_SPEED_FILTER AlertSize = log.ControlsState.AlertSi...
# -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2018-12-05 13:19 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('syapp', '0003_logs'), ] operations = [ migrations.CreateModel( ...
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. from typing import Any, Dict, Sequence, List from .zmq_wrapper import ZmqWrapper from .lv_types import CliSrvReqTypes, ClientServerRequest, DefaultPorts from .lv_types import VisArgs, PublisherTopics, ServerMgmtMsg, StreamCreateRequest from .stre...
#!/usr/bin/env python # coding: utf-8 # In[ ]: # This Python 3 environment comes with many helpful analytics libraries installed # It is defined by the kaggle/python docker image: https://github.com/kaggle/docker-python # For example, here's several helpful packages to load in import numpy as np # linear algebra i...
#!/home/moringaschool/Documents/Core/Pitch/venv/bin/python3 # $Id: rst2xetex.py 7847 2015-03-17 17:30:47Z milde $ # Author: Guenter Milde # Copyright: This module has been placed in the public domain. """ A minimal front end to the Docutils Publisher, producing Lua/XeLaTeX code. """ try: import locale locale...
""" Test AnsibleGate State Module """ import os import shutil import tempfile import pytest import salt.utils.files import salt.utils.path import yaml from tests.support.case import ModuleCase from tests.support.helpers import ( SKIP_IF_NOT_RUNNING_PYTEST, destructiveTest, flaky, requires_system_grain...
# Copyright 2016 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.apache.org/licenses/LICENSE-2.0 # # Unless required by...
from typing import Dict, List from gramat.expressions import RuleExp, ReferenceExp class LinkContext: def __init__(self): self.rule_map: Dict[str, RuleExp] = {} self.rule_hits: Dict[str, int] = {} self.references: List[ReferenceExp] = [] def register_rule(self, rule: RuleExp): ...
import pytest def test_backends(): from aio_databases.backends import BACKENDS assert BACKENDS db_types = set(b.db_type for b in BACKENDS) assert 'mysql' in db_types assert 'sqlite' in db_types assert 'postgresql' in db_types assert 'odbc' in db_types def test_database(): from aio_d...
from site import findsite scrapper = findsite() list = scrapper.findArticle("bitcoin") for i in list: print(i) print(f"\n sites: {str(len(list))}")
# -*- coding: utf-8 -*- from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('services', '0029_auto_20171203_1624'), ] operations = [ migrations.RemoveField( model_name='webserviceharvestlayersjob', name='service', ...
#!/usr/bin/env python # vim: tabstop=4 shiftwidth=4 softtabstop=4 """ Name : server_manager_status.py Author : Abhay Joshi Description : This file contains code that provides REST api interface to configure, get and manage configurations for servers which are part of the cont...
# decorators/syntax.py # This is not a valid Python module - Don't run it. # ONE DECORATOR # from symbol import decorator from symbol import decorator def func(arg1, arg2, ...): pass func = decorator(func) # is equivalent to the following: @decorator def func(arg1, arg2, ...): pass # TWO DECORATORS def ...
# pylint: disable=too-many-lines # 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) AutoRe...
from cs_kit import CoreTestFunctions from cs_config import functions, helpers import copy OK_ADJUSTMENT = { "policy": { "STD": [ {"MARS": "single", "year": 2019, "value": 0}, {"MARS": "mjoint", "year": 2019, "value": 1}, {"MARS": "mjoint", "year": 2022, "value": 10} ...
# coding: utf-8 """tests for dict_to_h5py""" import os import unittest import numpy as np from cpylog import get_logger try: import h5py # pylint: disable=unused-import IS_H5PY = True except ImportError: # pragma: no cover IS_H5PY = False if IS_H5PY: from pyNastran.utils.dict_to_h5py import load_obj...
import random from grid import * from player import Player from procedures import Procedures from turn import Turn from victory import tic_tac_toe_victory class Boardgame: piece_marker_dict = {0: " "} max_number_players = 0 players = [] type = "" # Options: "2048-like" or "tic-tac-toe-like" length...
import pytest from common import RETRY_COUNTS, RETRY_INTERVAL from common import client, volume_name # NOQA from common import check_volume_data, cleanup_volume, \ create_and_check_volume, get_longhorn_api_client, get_self_host_id, \ wait_for_volume_detached, wait_for_volume_degraded, \ wait_for_volume_he...
#!/usr/bin/env python import rospy from styx_msgs.msg import TrafficLightArray from sensor_msgs.msg import Image from styx_msgs.msg import Lane from geometry_msgs.msg import PoseStamped import yaml import numpy as np from scipy.spatial import KDTree from cv_bridge import CvBridge, CvBridgeError import cv2 import os c...
''' This module holds calibrated parameter dictionaries for the cAndCwithStickyE paper. It defines dictionaries for the six types of models in cAndCwithStickyE: 1) Small open economy 2) Small open Markov economy 3) Cobb-Douglas closed economy 4) Cobb-Douglas closed Markov economy 5) Representative agent economy 6) Mar...
"""Add state, city, and county name to PublishedAwardFinancialAssistance table Revision ID: 0bf2ed508f33 Revises: 2c2b9b1ff0e5 Create Date: 2017-07-21 13:05:06.714431 """ # revision identifiers, used by Alembic. revision = '0bf2ed508f33' down_revision = '2c2b9b1ff0e5' branch_labels = None depends_on = None from ale...
import argparse import os import random import shutil import time import warnings import torch import torch.nn as nn import torch.nn.parallel import torch.backends.cudnn as cudnn import torch.distributed as dist import torch.optim import torch.multiprocessing as mp import torch.utils.data import torch.utils.data.distr...
# Time complexity: O(n) # Approach: Save level order traversal and reverse the needed. # Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.right = right class Solution: def traverse(self, r...
import javalang import javalang.tree class JavaFile: """ Class of a java source file. """ def __init__(self, **kwargs): self.__class_name = kwargs.get("class_name", None) if self.__class_name is None: raise ValueError("Java class name must be specified.") ...
# 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 core import perf_benchmark from measurements import page_cycler import page_sets from telemetry import benchmark class _PageCycler(perf_benchmark.Per...
import numpy as np np.random.seed(0) x1=np.random.randint(10, size=6) x2=np.random.randint(10, size=(3,4)) x3=np.random.randint(10, size=(3,4,5)) print("------------------------------------------") print(x3) print("------------------------------------------") print("x3 ndim: ", x3.ndim) print("x2 shape: ", x3.shape)...
# Copyright (c) 2018 Hedvig, 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...
# coding=utf-8 # Copyright 2021 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
# animation of explosion using 2D sprite sheet import simplegui # load 81 frame sprite sheer for explosion - image generated by phaedy explosion generator, source is hasgraphics.com EXPLOSION_CENTER = [50, 50] EXPLOSION_SIZE = [100, 100] EXPLOSION_DIM = [9, 9] explosion_image = simplegui.load_image("http://co...
# Generated by Django 3.2.5 on 2021-08-02 12:44 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('app', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='measurement', name='value', ), ...
from keras.optimizers import Adam from keras.callbacks import TensorBoard, CSVLogger, ModelCheckpoint from lipnet.lipreading.generators import BasicGenerator from lipnet.lipreading.callbacks import Statistics, Visualize from lipnet.lipreading.curriculums import Curriculum from lipnet.core.decoders import Decoder from l...
import pytest import re import shlex from time import sleep commands_without_input = shlex.split( """ close_and_remove close_or_remove false list_commands list_keybinds list_monitors list_rules lock mouseunbind quit reload remove rotate stack true unl...
import os.path import tempfile from unittest import TestCase from unittest.mock import MagicMock, mock_open, patch from parameterized import param, parameterized from salt.exceptions import CommandExecutionError import salt.renderers.jinja import salt.renderers.yaml import salt.utils.files import yaml from _modules i...
""" A generic bitemporal model built on HDF5 (h5py) Model ----- The basic model for a bitemporal is an HDF5 dataset that is extensible along a single dimension with named columns and different dtypes for each column. In-memory, this will be represented by a numpy structured array. We will call this structure a *Table...
from flowRelated import * import os import sys sys.path.append(os.getcwd()) import torch from torch import nn import numpy as np import utils import flow import source def test_bijective(): p = source.Gaussian([1,4,4]) BigList = [] for _ in range(2*2*2): maskList = [] for n in range(4): ...
import ipaddress import netifaces import os import socket import subprocess import yaml from glob import glob from path import Path from urllib.parse import urlparse from charms import layer from charmhelpers import fetch from charmhelpers.core import hookenv, unitdata from charmhelpers.core.host import ( chdir, ...
from algo_battle.domain.algorithmus import Algorithmus from algo_battle.domain import FeldZustand, Richtung class MeinAlgorithmus(Algorithmus): def __init__(self): super().__init__("Alexander") self.meine_richtung = Richtung.Rechts self.zeahler = 10 def _gib_richtung(self,...
from exit_methods import * try: import itertools import shutil import sys import warnings from os.path import exists from os import mkdir import numpy as np from table_utils import * except ImportError as e: print("Ein Import Fehler ist aufgetreten: " + str(e)) input("Drücke Enter, um das Program...
import re import time def validate_passports(data): passports = [0, 0] for line in data: if 'byr' in line and \ 'iyr' in line and \ 'eyr' in line and \ 'hgt' in line and \ 'hcl' in line and \ 'ecl' in line and \ ...
#!/usr/bin/python3 # -*- coding: utf-8 -*- # ----------------------------------------------------------- # logger # created 01.10.2021 # Thomas Kaulke, kaulketh@gmail.com # https://github.com/kaulketh # ----------------------------------------------------------- import errno import logging import os from logging.config...
# -*- coding: utf-8 -*- # CLAB3 import numpy as np from PIL import Image import matplotlib.pyplot as plt import time import cv2 I = Image.open('stereo2012a.jpg'); plt.imshow(I) uv = plt.ginput(12) # Graphical user interface to get 6 points #xyz coordinates (world coordinates) xyz = np.asarray([[7, 7, 0],...
# Package Control import os import sublime PCKGCTRL_SETTINGS = "Package Control.sublime-settings" TABLE_PACKAGE = "Table Editor" PS_PACKAGE = "PowerShell" # support the languages and grammars we support. def IsInstalled(pkg): settings = sublime.load_settings(PCKGCTRL_SETTINGS) return pkg in set(sett...
#!/usr/bin/python # # Copyright 2020 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 ag...
import os from collections import defaultdict from os.path import relpath, join, abspath, basename, isdir, isfile import shutil from ...providers.Provider import Provider from ...exceptions import InvalidPackageName from ...utils.location import ( base_path, config_path, views_path, migrations_path, ...
# Copyright (c) 2017-2018 Neogeo-Technologies. # 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...
from typing import Union, Tuple, Dict, Any import gym import copy import torch import torch.nn.functional as F from ....memories.torch import Memory from ....models.torch import Model from .. import Agent CEM_DEFAULT_CONFIG = { "rollouts": 16, # number of rollouts before updating "percenti...
import unittest import pymongo import logging logging.basicConfig(level=logging.DEBUG) from mongomodels import connections, MongoModel, String, Integer, \ Column, or_, ValidationError, Boolean, belongs_to class Category(MongoModel): name = Column(String, required=True) belongs_to('category', rel_column='...
# Basic setup for allowing users to sign up using a username and a password from django.conf.urls import url from django.contrib.auth.views import LoginView, LogoutView from .views import signup urlpatterns = [ url(r'^signup/$', signup, name='signup'), url(r'login$', LoginView.as_view( template_name="...
from bots_detector.models.base_model import Model class CoinModel(Model): def predict(self, profile): return sum(profile['StakeEntryStats'].values()) > 0
""" lib for arcus services """ from voithos.lib.docker import env_string, volume_opt from voithos.lib.system import shell from voithos.constants import DEV_MODE def start( release, openstack_vip, sql_pass, sql_ip, rabbit_ips_list, rabbit_pass, enable_ceph, kolla_ansible_dir, cloud...
import numpy as np import torch from torch.optim import Adam import gym import time import spinup.algos.pytorch.ppo.core as core from spinup.utils.logx import EpochLogger from spinup.utils.mpi_pytorch import setup_pytorch_for_mpi, sync_params, mpi_avg_grads from spinup.utils.mpi_tools import mpi_fork, mpi_avg, proc_id,...
# test syntax errors def test_syntax(code): try: exec(code) print("no SyntaxError") except IndentationError: print("IndentationError") except SyntaxError: print("SyntaxError") # non-newline after line-continuation character (lexer error) test_syntax("a \\a\n") # dedent mis...
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import copy import logging import os import re import sys from contextlib import contextmanager from dataclasses import dataclass from datetime import datetime from enum import Enum from os.path import splitext from pathlib import Path from textwrap...
from datetime import datetime, date from marqeta.response_models import datetime_object import json import re class ClearingRetryModel(object): def __init__(self, json_response): self.json_response = json_response def __str__(self): return json.dumps(self.json_response, default=self.json_seri...
import multiprocessing import traceback class Process(multiprocessing.Process): def __init__(self, *args, **kwargs): multiprocessing.Process.__init__(self, *args, **kwargs) self._pconn, self._cconn = multiprocessing.Pipe() self._exception = None def run(self): try: ...
from django.urls import path, include # from rest_framework.routers import DefaultRouter from backend.api.product.api.views import ProductList, ProductDetail, CategoryList, CategoryDetail # router = DefaultRouter() # router.register("", ProductList) urlpatterns = [ path('category/', CategoryList.as_view(), name...
""" Sage Intacct custom reports """ from typing import Dict from .api_base import ApiBase class CustomReports(ApiBase): """Class for Expense Reports APIs.""" def __init__(self): super().__init__(dimension='custom_reports') #post_legacy_method='create_invoice') # def update_attachment(self, key: ...
import math class DLP: def __init__(self): self._p = 5682549022748424631339131913370125786212509227588493537874673173634936008725904358935442101466555561124455782847468955028529037660533553941399408331331403379 # p-1 的素因子为: self._p1_prime_factors = [2,2154937333,481006989528686211893,6023840...
from typing import List, Union, Dict, Tuple import torch from torch.nn.utils.rnn import pad_sequence from preprocessing.main_preprocess import MISSING_SIGN_CHAR class DataCollatorForLanguageModelingAkkadian: """ Data collator used for language modeling. - collates batches of tensors, honoring their token...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Provides values which would be available from /proc which are not fulfilled by other modules. """ from __future__ import print_function from __future__ import unicode_literals import functools import sys from types import ModuleType import gdb import pwndbg.memoize im...
"""Implement Agents and Environments (Chapters 1-2). The class hierarchies are as follows: Thing ## A physical object that can exist in an environment Agent Wumpus Dirt Wall ... Environment ## An environment holds objects, runs simulations XYEnvironment VacuumEnvironment W...
"""Auto-generated file, do not edit by hand. TT metadata""" from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_TT = PhoneMetadata(id='TT', country_code=1, international_prefix='011', general_desc=PhoneNumberDesc(national_number_pattern='(?:[58]\\d\\d|900)\\d{7}', possible_lengt...
""" Code here relates to extraction of values from ABF1 and ABF2 file headers. A purist interested in replicating (or porting) core functionality of ABF reading code may desire to start here. Only standard libraries are used. Variable names were chosen to be consistent with common names found in header files released w...
import numpy as np class VVSystem: """ Calculate VV transfer rate coefficient """ def __init__(self, w_ei, x_ei, w_ej, x_ej, c, S, sigma, rm): """ param w_ei: The energy spacing between the vobrational energy levels for species i. Correspond to index v. [K] ...
"""Example showing how you can transfer a big file to the instrument and from the instrument with showing the progress. Since the SMW is quite fast on data transfer, we slow it down by waiting for 100ms between each chunk transfer (1MB) This way we see the transfer progress better and we do not need a file that is so b...
""" Generator """ import asyncio import logging import re import sys from argparse import ArgumentParser from collections import namedtuple, OrderedDict from datetime import datetime, date from inspect import getfile from os.path import basename, join from pathlib import Path from re import findall from jinja2 import ...
import os import sys import PyFBA import argparse parser = argparse.ArgumentParser(description='Find reactions associated with a compound') parser.add_argument('-c', help='compound name', required=True) args = parser.parse_args() compounds, reactions, enzymes = PyFBA.parse.compounds_reactions_enzymes('gramnegative...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class LandedCostPurchaseReceipt(Document): pass
"""authentik deny stage app config""" from django.apps import AppConfig class AuthentikStageDenyConfig(AppConfig): """authentik deny stage config""" name = "authentik.stages.deny" label = "authentik_stages_deny" verbose_name = "authentik Stages.Deny"
""" Test parsers """ from __future__ import print_function import unittest import filecmp import sys import os import glob import json import shutil from mock import patch, Mock, mock_open from pyingest.parsers import aps from pyingest.parsers import arxiv from pyingest.parsers import atel from pyingest.parsers impor...
all_lines = list(open("guide.md", "r", encoding="utf-8")) new_lines = "" for line in all_lines: if "**Capital:**" in line: sp = line.strip().split(" ", 1) if "http" in sp[1]: new_lines += line else: new_lines += sp[0] + " [" + sp[1] + "]" \ + ...
# =============================================================================== # # # # This file has been generated automatically!! Do not change this manually! # # ...
""" Class that represents the execution level of nsight @author: Alvaro Saiz (UC) @date: Jul 2021 @version: 1.0 """ import locale from abc import ABC, abstractmethod # abstract class import os, sys, inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os...
from .models import * from .client import Client
from flask_restful import Resource from Model.Calc_bmi import calc_bmi as c_bmi from flask import request class Calculate(Resource): def post(self): req = request.get_json(force = True) req_id = req["id"] calc_func = req["func"] if calc_func == "bmi": return c_bmi(req)
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.9.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys im...
import re import math import random PREAMBLE = """ # WARNING: This file is auto-generated. Do NOT modify it manually, but rather # modify the generating script file. Otherwise changes will be lost! """[1:] class CaseGroup(object): def __init__(self, name, description, children): self.name = name self.descripti...
#!/usr/bin/env python3 # encoding: utf-8 import sys import npyscreen from requests import get import inputForm import profileSelector # GLOBALS ATTRIBUTES APP = None GATEWAY = None THREADS = list() VM = None VMs = None SECURITY_GROUP = None SECURITY_RULE = None IP = get("https://api.ipify.org").text # Because it's c...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
######################################################################## # 08/02/2015 # ng-demo_02-2016/data-post.py # ID, Vcc, T, RH, A(x,y,z), P, Vpd, Status # http://data.sparkfun.com/streams/RM89ZKdGNxsx0zR9XNDo ######################################################################## import RPi.GPIO as GPI...
from django.apps import AppConfig class SolipagesConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'solipages'
import os import sys import math import tkinter as tk from tkinter import ttk from PIL import Image, ImageTk class App(tk.Frame): def __init__(self, path, master=None, width=400, height=300, padx=0, pady=0): super().__init__(master) self._geom = '{0}x{1}+{2}+{3}'.format(width, height, padx, pady) ...
import pytest from aiohttp import web from aiohttp_apiset import SwaggerRouter, middlewares from aiohttp_apiset.middlewares import Jsonify, jsonify @pytest.mark.parametrize('middlewares', [ [], [jsonify], ]) async def test_spec(loop, aiohttp_client, middlewares): router = SwaggerRouter( search_di...
from contextlib import contextmanager from sqlalchemy.orm.session import Session from sqlalchemy.engine import create_engine class Marcotti(object): def __init__(self, config): self.engine = create_engine(config.DATABASE_URI) self.connection = self.engine.connect() def create_db(self, base)...
from allauth.socialaccount.providers.oauth2_provider.urls import default_urlpatterns from .provider import FigmaProvider urlpatterns = default_urlpatterns(FigmaProvider)
import os import warnings from mlchain.base.serializer import JsonSerializer, MsgpackSerializer, MsgpackBloscSerializer, JpgMsgpackSerializer, PngMsgpackSerializer import mlchain class ClientBase: """ Mlchain Client base class """ def __init__(self, api_key = None, api_address = None, serializer = 'm...
import numpy as np from matplotlib import pyplot as plt def display(X, T, L, S, Ts, peaks=None, plot_peak_height=10, s_max=10): n = X.shape[1] + 1 if peaks is None else X.shape[1] + 2 plt.figure(figsize=(12, n*2.5+0.25)) for i in range(X.shape[1]): plt.subplot(n, 1, i+1) ...
from django.contrib.auth import get_user_model from django.db import models from django.utils.translation import gettext_lazy as _ from .abstract.mixins import FullTimeStampMixin from .car import Car class Rating(FullTimeStampMixin): """ Rating Model that is extension of FullTimeStamp Mixing. Rating stores i...
# Generated by Django 3.0.6 on 2020-05-09 14:12 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
from pynput import keyboard import time import threading import re kb = keyboard.Controller() slot_time_raw = 0.6 def play_notes(): #str = "12311231345_345_56543_1_56543_1_2_5-_1_0_2_5-_1_0_"#two tigers fo = open('wind.txt', 'r') slot_time = 0.18 str = fo.read() str = re.sub(r'^//.*\n...
from pathlib import Path import xml.etree.ElementTree as ET from xml.dom import minidom def obj_to_urdf(obj_path, urdf_path): obj_path = Path(obj_path) urdf_path = Path(urdf_path) assert urdf_path.parent == obj_path.parent geometry = ET.Element('geometry') mesh = ET.SubElement(geometry, 'mesh') ...
/home/runner/.cache/pip/pool/4d/e4/6c/00383b799375770eda19ea5b3886686c69a22b375d4fe6ca119f7b6d02
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- """Train a Fast R-CNN network.""" import caffe from fast_rcnn.config i...
# Copyright 2013-2020 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) import platform import sys import os from spack import * import llnl.util.tty as tty class Namd(MakefilePackage): ""...
# 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 applicable ...
# Special thanks to eDivorce for this. import logging from django.conf import settings from .efiling_resources import EFilingResources logger = logging.getLogger(__name__) class EFilingPackaging: def __init__(self): self.app_name = settings.EFILING_APP_NAME self.court_level = settings.EFILING_COU...
# -*- encoding: utf-8 -*- # Copyright (c) 2015, Nicolas Despres # Relevant documentation used when writing this file: # https://docs.python.org/3/library/distutils.html # http://www.diveinto.org/python3/packaging.html # http://www.scotttorborg.com/python-packaging/ # and of course several example projects such a...
from django.db import models # Create your models here. class Employee(models.Model): eno=models.IntegerField() ename=models.CharField(max_length=64) esal=models.FloatField() class StaffingMaster(models.Model): Eno =models.CharField(max_length=64) Ename =models.CharField(ma...