text
stringlengths
2
999k
from engine import * chingyatsikpingwu = [] chingyatsikpingwu.append(SimpleTile(2, 'Man')) chingyatsikpingwu.append(SimpleTile(3, 'Man')) chingyatsikpingwu.append(SimpleTile(4, 'Man')) chingyatsikpingwu.append(SimpleTile(1, 'Man')) chingyatsikpingwu.append(SimpleTile(2, 'Man')) chingyatsikpingwu.append(SimpleTile(3, ...
# Generated by Django 3.1.3 on 2020-12-09 01:27 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('soulcalibur_vi', '0019_auto_20201205_0415'), ] operations = [ migrations.AlterField( model_name='move', name='attack...
""" Django settings for beekeeper project on Heroku. For more info, see: https://github.com/heroku/heroku-django-template For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settin...
from maza.core.exploit import * from maza.core.telnet.telnet_client import TelnetClient from maza.resources import wordlists class Exploit(TelnetClient): __info__ = { "name": "Telnet Default Creds", "description": "Module performs dictionary attack with default credentials against Telnet service. ...
# Copyright (c) 2016 Universidade Federal Fluminense (UFF) # Copyright (c) 2016 Polytechnic Institute of New York University. # This file is part of noWorkflow. # Please, consult the license terms in the LICENSE file. """Trial Dot Object""" from __future__ import (absolute_import, print_function, ...
import pytest import datetime #from datetime import datetime from freezerstate.statusupdate import StatusUpdate @pytest.fixture def statusobj(): obj = StatusUpdate(True, '8:00,9:30,21:00,26:99') return obj def test_update_initialization(statusobj): assert len(statusobj.notification_times) == 3 def test_...
import argparse import asyncio import html import json import logging import os import textwrap import time import xmltodict from aiohttp import ClientSession, ClientConnectorError, ServerDisconnectedError, ContentTypeError from articlemeta.client import RestfulClient from datetime import datetime from json import JSO...
# Written by Nikhil D'Souza # Data from http://lib.stat.cmu.edu/datasets/boston # This neural network predicts the values of houses in Boston based on: # 1. per capita crime rate by town # 2. proportion of residential land zoned for lots over 25,000 sq.ft. # 3. proportion of non-retail business acres per town # 4. Cha...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
# -*- coding: utf-8 -*- import numpy as np import tensorflow as tf # Default hyperparameters hparams = tf.contrib.training.HParams( # Comma-separated list of cleaners to run on text prior to training and eval. For non-English # text, you may want to use "basic_cleaners" or "transliteration_cleaners". clean...
API_GET_TOKEN = 'http://sign.vsdouyin.com/api/token/gen/' API_EP_DOUYIN = "https://sign.vsdouyin.com/api" API_DEVICE_REGISTER = "https://log.snssdk.com/service/2/device_register/" #生成签名服务器专用token ROUTE_GEN_TOKEN = "token/gen" ROUTE_INFO_TOKEN = "token/info" # 抖音相关入口 ROUTE_SIGN_DOUYIN = "653d33c/sign" ROUTE_CRYPT_DOUY...
#!/usr/bin/env python import json import os import re import sys import tarfile from urllib.request import urlretrieve def main(): # Read in given out_file and create target directory for file download with open(sys.argv[1]) as fh: params = json.load(fh) target_directory = params['output_data'][0...
# # This file is part of LiteX-Boards. # # Copyright (c) 2018-2019 Rohit Singh <rohit@rohitksingh.in> # Copyright (c) 2019 Florent Kermarrec <florent@enjoy-digital.fr> # SPDX-License-Identifier: BSD-2-Clause from litex.build.generic_platform import * from litex.build.xilinx import XilinxPlatform from litex.build.openo...
#!/usr/bin/env python """Cloudflare API code - example""" from __future__ import print_function import os import sys sys.path.insert(0, os.path.abspath('..')) import CloudFlare def main(): """Cloudflare API code - example""" cf = CloudFlare.CloudFlare() zones = cf.zones.get(params={'per_page':50}) ...
from django.contrib.auth.models import User from django.core.paginator import Paginator from django.shortcuts import render from blog.models.clasDict import classes from blog.models.post import Post from django.template.defaulttags import register from django.contrib.auth.mixins import LoginRequiredMixin, UserPassesTes...
#!/usr/bin/env python3 import sys from PySide2 import QtCore, QtWidgets, QtGui from os.path import exists, join, abspath from os import remove import tweepy from auth.auth import AuthData from tweet.tweet import getTweetsKeyword, tweetRandom, OutputerInterface import types class AuthDataInput(QtWidgets.QWidget): d...
import pandas as p import numpy as np from file_setup_helper import FileSetupHelper as fsh from preprocess_data import PreprocessData as pd from model_export import ModelExport as me import sys from sklearn.linear_model import Ridge def main(): #call for file download with given date file_name = fsh(sys.argv[1...
from .models import Stock, Tag, Product from rest_framework import viewsets from rest_framework.permissions import AllowAny from .serializers import ( StockSerializer, TagSerializer, ProductSerializer ) class StockViewSet(viewsets.ModelViewSet): """ API endpoint that allows stock to be viewed or e...
# 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...
# Create your views here. from rest_framework.views import APIView from .serializers import UserSerializer, LoginSerializer from ..utils.helpers.json_helpers import generate_response, raise_error, add_token_to_response, validate_url, validate_confirmation_request from ..utils import success_messages from ..utils.error...
from metricsML.NormalizationType import NormalizationType import numpy as np import math def normalization(normalization, train_data, test_data, validation_data=None): if not isinstance(normalization, NormalizationType): print("Unknown normalization specified, use " + str(NormalizationType.PERCENTAGE) + " ...
from setuptools import setup setup_kwargs = dict( name='netsuite-bbc-python', version='1.0.1', description='Wrapper around Netsuite SuiteTalk Web Services', packages=['netsuite_bbc'], include_package_data=True, author='Jacob Magnusson', author_email='m@jacobian.se', url='https://github....
#!/usr/bin/env python3 # # This file is part of LiteX-Boards. # # Copyright (c) 2019 Antony Pavlov <antonynpavlov@gmail.com> # SPDX-License-Identifier: BSD-2-Clause import os import argparse from migen import * from migen.genlib.resetsync import AsyncResetSynchronizer from litex.build.io import DDROutput from lite...
from django_filters import rest_framework as filters from rest_framework.filters import SearchFilter, OrderingFilter from . import models class SearchFilter(SearchFilter): """ A Filter backend """ class DjangoFilterBackend(filters.DjangoFilterBackend): """ A Filter backend """ class Order...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest # test_records = frappe.get_test_records('Appraisal') class TestAppraisal(unittest.TestCase): pass
#! /usr/bin/env python # Copyright 2019 # # This file is part of WarpX. # # License: BSD-3-Clause-LBNL import sys sys.path.insert(1, '../../../../warpx/Regression/Checksum/') import numpy as np import yt yt.funcs.mylog.setLevel(50) import re import checksumAPI from scipy.constants import c # Name of the last plotfil...
from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, SubmitField, SelectField from wtforms.validators import DataRequired, Email, Length, EqualTo from app.models.Model import Category def get_categories(): categories_query = Category.query.all() categories = [] for category in c...
# RT Lib - Setting from typing import ( TYPE_CHECKING, TypedDict, Optional, Union, Literal, Dict, Tuple, List, overload, get_origin, get_args ) from discord.ext import commands import discord from collections import defaultdict from aiohttp import ClientSession from functools import partial from datetime imp...
import time from threading import Event, RLock from mltk.utils import hexdump from .device_interface import DeviceInterface, MAX_BUFFER_SIZE WAIT_FOREVER = 4294967.0 class JLinkDataStream(object): """JLink data stream""" def __init__( self, name:str, mode:str, ifc: Dev...
import rstools from tkinter import * from functools import partial class mainWindow: def __init__(self,master) -> None: self.master = master self.constraint = IntVar() self.constring = [] Label(self.master , text="Revised Simplex Method", font=("Arial",25)).pack() ...
import struct from hsdecomp import ptrutil def read_arg_pattern(settings, address): num_args = read_num_args(settings, address) func_type = read_function_type(settings, address) assert num_args >= len(func_type) return func_type + 'v' * (num_args - len(func_type)) def read_num_args(settings, address)...
"""Utilities functions for setting up test fixtures.""" import tempfile from pathlib import Path import shutil import json from uuid import uuid4 import pandas as pd import numpy as np from iblutil.io.parquet import uuid2np, np2str import one.params def set_up_env(use_temp_cache=True) -> tempfile.TemporaryDirectory...
#!/usr/bin/env python # 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...
from django.conf.urls import url from django.contrib import admin from mixpanel_django_graphos.views import ReportActivityView admin.site.index_template = 'admin/index.html' admin.autodiscover() def get_admin_urls(urls): """ Extend admin to include additional urls """ def get_urls(): my_url...
import pytest import numpy as np from numpy.testing import assert_allclose import keras from keras.utils.test_utils import layer_test from keras.utils.test_utils import keras_test from keras.layers import recurrent from keras.layers import embeddings from keras.models import Sequential from keras.models import Model f...
from django import forms from django.core.validators import MinValueValidator from django.utils.translation import gettext_lazy as _ from .models import DayType, Day class DayTypeForm(forms.ModelForm): class Meta: model = DayType fields = '__all__' class DayForm(forms.ModelForm): class Meta...
# 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, ...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt """ globals attached to frappe module + some utility functions that should probably be moved """ from __future__ import unicode_literals, print_function from six import iteritems, binary_type, text_type, string_types fr...
# 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...
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # 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 applicab...
import os import sqlite3 from typing import List, Optional from .storage_base import Storage class SqliteStorage(Storage): def __init__(self, db_path): """ Init table "data" with the attribute "key" being the primary key :param db_path: str. Path to database file """ super(...
''' Serve up a fake REST server acting as device REST API ''' import sys import argparse from pathlib import Path import ssl import logging from aiohttp import web import xmltodict def get_filename_from_cmd(cmd_dict: dict) -> str: """Build filename from an xml command""" keys = [] def recursive_items(c...
# -*- coding: utf-8 -*- ''' otsu.fun - SSWA Resources Docs String @version: 0.1 @author: PurePeace @time: 2020-01-07 @describe: docs string for api resources!!! ''' demo = \ ''' 演示接口 传参:{ foo } --- - Nothing here ``` null ``` ''' # run? not. if __name__ == '__main__': print('only docs...
# _*_ coding: utf-8 _*_ """ ------------------------------------------------- File Name: __init__.py.py Description : Author : ericdoug date:2021/3/7 ------------------------------------------------- Change Activity: 2021/3/7: created ------------------------------------------------- """ from...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # # Copyright (c) 2020 University of Dundee. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # Redistributions of source code must retain the above copyright not...
# 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 warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
from .checker import CSPChecker from .checkerro import CSPReportOnlyChecker from securityheaders.checkers import Finding,FindingType,FindingSeverity class CSPReportOnlyNoCSPChecker(CSPReportOnlyChecker, CSPChecker): def check(self, headers, opt_options=dict()): rocsp = CSPReportOnlyChecker.getcsp(self,head...
from corehq.apps.app_manager.dbaccessors import ( get_brief_apps_in_domain, get_latest_released_app, get_latest_released_app_versions_by_app_id, ) from corehq.apps.linked_domain.models import DomainLink from corehq.apps.linked_domain.remote_accessors import ( get_brief_apps, get_latest_released_vers...
import numpy as np import matplotlib.pyplot as plt import WDRT.shortTermExtreme as ecm import WDRT.fatigue as fatigue method = 1 # 1 - All peaks Weibull # 2 - Weibull tail fit # 3 - Peaks over threshold # 4 - Block maxima GEV # 5 - Block maxima Gumbel # load global peaks t_peaks = np.loadtxt(r'C:\full\filepath\...
from .nginx import Nginx, NginxConfig from . import tfserving_pb2 as tfserving_config from . import tfserving_api from ._base import TFSModelVersion, TFSModelConfig from .tfserving_pb2 import TFSConfig from .tfserving_api import TFSModelEndpoint, TFServeModel __all__ = [ 'Nginx', 'NginxConfig', 'tfserving...
print("We Created Sub_Package for Numbers")
import itertools import pandas as pd from typing import Dict, Set, Hashable def upset_from_dict_of_sets(inputs: Dict[Hashable, Set[Hashable]]): ''' Given a dictionary of sets, produce input ready for `upsetplot` python package We produce this input by computing set intersections of all relevant combinations of...
#FUPQ tenha uma lista chamada números e duas funções chamadas sorteio() e somaPar(). A primeira função vai sortear 5 números e vai colocá-las dentro da lista e a segunda função vai mostrar a soma entre todos os valores PARES sorteados pela função anterior. #def sorteio(numeros): # for i in range(0,5): # nume...
import numpy as np import cv2 import os from sklearn.model_selection import train_test_split import matplotlib.pyplot as plt from keras.preprocessing.image import ImageDataGenerator from keras.utils.np_utils import to_categorical from keras.models import Sequential from keras.layers import Dense from keras.optimizers i...
""" CryptoAPIs Crypto APIs 2.0 is a complex and innovative infrastructure layer that radically simplifies the development of any Blockchain and Crypto related applications. Organized around REST, Crypto APIs 2.0 can assist both novice Bitcoin/Ethereum enthusiasts and crypto experts with the development of thei...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
from drink_robot.controllers.index import bp as index from drink_robot.controllers.recipe import bp as recipe from drink_robot.controllers.bottle import bp as bottle from drink_robot.controllers.pour import bp as pour import pigpio def init_pins(app): if app.config['DEBUG']: return gpio = pigpio.pi() ...
from setuptools import setup __version__ = "1.0.0" with open('README.rst') as f: long_description = f.read() setup( name = "django-spgateway", version = __version__, description = 'Django support for Spgateway', keywords = "django, spgateway", url = "https://github.com/superbil/django-spgatew...
"""Setup titiler.""" from setuptools import find_packages, setup with open("README.md") as f: long_description = f.read() inst_reqs = [ "brotli-asgi>=1.0.0", "cogeo-mosaic>=3.0.0rc2,<3.1", "fastapi==0.63.0", "geojson-pydantic", "jinja2>=2.11.2,<3.0.0", "morecantile", "numpy", "pyd...
# # Copyright 2019 Xilinx Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
from string import ascii_lowercase from itertools import product import gizeh import numpy as np import random random.seed(1234) alphabet = ascii_lowercase + "_" bigrams = [''.join(bigram) for bigram in product(alphabet, repeat=2)] random.shuffle(bigrams) scale = 2 width = 512 * scale height = 512 * scale def draw...
# Copyright 2019-present MongoDB Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
import math import chainer import chainer.functions as F import chainer.links as L import numpy as np from .sn_convolution_2d import SNConvolution2D, SNDeconvolution2D from .sn_linear import SNLinear def _upsample(x): h, w = x.shape[2:] return F.unpooling_2d(x, 2, outsize=(h * 2, w * 2)) def _downsample(x): ...
#!/usr/bin/env python3 """Combine logs from multiple swyft nodes as well as the test_framework log. This streams the combined log output to stdout. Use combine_logs.py > outputfile to write to an outputfile.""" import argparse from collections import defaultdict, namedtuple import heapq import itertools import os imp...
# 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: release-1.21 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import si...
""" Copyright (c) 2020 Autonomous Vision Group (AVG), Max Planck Institute for Intelligent Systems, Tuebingen, Germany 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, includin...
""" Definition for RHEAS Datasets decorators. .. module:: datasets.decorators :synopsis: Definition of the Datasets decorators .. moduleauthor:: Kostas Andreadis <kandread@jpl.nasa.gov> """ from functools import wraps import tempfile import shutil import urllib from datetime import datetime from ftplib import FT...
"""Tests the `debug_print` option for Nonlinear solvers.""" import os import re import sys import shutil import tempfile import unittest from distutils.version import LooseVersion from io import StringIO import numpy as np import openmdao.api as om from openmdao.test_suite.scripts.circuit_analysis import Circuit f...
import logging import os import shutil import sys from string import Template from galaxy import eggs eggs.require( 'MarkupSafe' ) import markupsafe from galaxy.util import nice_size, unicodify log = logging.getLogger( __name__ ) CHUNK_SIZE = 2 ** 20 # 1Mb INSTALLATION_LOG = 'INSTALLATION.log' # Set no activity ti...
# pylint: disable=invalid-name import glob import os import re import time import torch import pytest from allennlp.common.testing import AllenNlpTestCase from allennlp.training.trainer import Trainer, sparse_clip_norm, is_sparse from allennlp.data import Vocabulary from allennlp.common.params import Params from alle...
# pylint: disable=redefined-outer-name from mock import MagicMock import pytest import posixpath import ftplib from ftplib import FTP from kiwi.store.artifact.artifact_repository_registry import get_artifact_repository from kiwi.store.artifact.ftp_artifact_repo import FTPArtifactRepository @pytest.fixture def ftp_mo...
import os import librosa import numpy as np import soundfile as sf import torch from tqdm import tqdm from utils import data, spectrogram, spectrogram_clean from models.hifi_gan import Generator from models.wavenet import WaveNet from utils.hparams import hparams as hp def inference(audio_clip): original_file =...
from AbstractRequest import AbstractRequest class SearchRequest(AbstractRequest): name = "" sequence = "" sequence_option = "" sequence_length = "" n_terminus_id = "" c_terminus_id = "" target_group_id = "" target_object_id = "" synthesis_type = "" kingdom_id = "" bond_id =...
# TRAINS - Example of Plotly integration and reporting # from trains import Task import plotly.express as px task = Task.init('examples', 'plotly reporting') print('reporting plotly figures') # Iris dataset df = px.data.iris() # create complex plotly figure fig = px.scatter(df, x="sepal_width", y="sepal_length", c...
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2021, John McNamara, jmcnamara@cpan.org # from ..excel_comparison_test import ExcelComparisonTest import codecs from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparison...
# Copyright (c) 2017 Michel Betancourt # # This software is released under the MIT License. # https://opensource.org/licenses/MIT """ menu.py Created by Michel Betancourt on 2017. Copyright (c) 2017 MIT. All rights reserved. """ from math import floor, ceil from tebless.utils.styles import red from teb...
import os from typing import Dict import numpy as np from utils.log import logger def write_results(filename, results_dict: Dict, data_type: str): if not filename: return path = os.path.dirname(filename) if not os.path.exists(path): os.makedirs(path) if data_type in ('mot', 'mcmot', ...
import rhinoscriptsyntax as rs from compas.datastructures import Mesh from compas.geometry import add_vectors from compas.geometry import centroid_points from compas.geometry import subtract_vectors from compas.geometry import mesh_smooth_area from compas.geometry import mesh_smooth_centroid from compas_rhino.helpe...
import copy from typing import List, Optional, Tuple from . import boards, enums, moves JournalEntry = Tuple[Optional[moves.Move], boards.Board] class Journal: """A journal of all previous Move and Board states.""" def __init__(self, board: boards.Board): """ Create a journal. :par...
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2021-03-30 10:49 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('orchestration', '0008_auto_20190805_1134'), ] operations = [ migrations.Ren...
"""Tests for module bregman on OT with bregman projections """ # Author: Remi Flamary <remi.flamary@unice.fr> # Kilian Fatras <kilian.fatras@irisa.fr> # # License: MIT License import numpy as np import ot import pytest def test_sinkhorn(): # test sinkhorn n = 100 rng = np.random.RandomState(0) ...
from django.shortcuts import render, get_object_or_404 from .models import Post, Comment from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from .forms import EmailPostForm, CommentForm, SearchForm from django.core.mail import send_mail from taggit.models import Tag from django.db.models import Co...
## - ## - asSeq2Int ## - ## - Created by Chris Ng 20201214 ## - input the user SoI here: - ## ## - post-CIBR version will prompt the user in the terminal for an SoI user_input_SoI = "mxxt" ## - The following can be used to test the code ## SxSxSSXXSXSS ## s.sXs ## S.s ## m.xT ## - #### Initialize empty lists lst_raw...
# Copyright 2018 Tensorforce Team. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
#!/usr/bin/env python3 import pandas as pd import sys input_file = sys.argv[1] output_file = sys.argv[2] data_frame = pd.read_csv(input_file) data_frame['Cost'] = data_frame['Cost'].str.strip('$').astype(float) data_frame_value_meets_condition = data_frame.loc[(data_frame['Supplier Name']\ .str.contains('Z')) | (dat...
import os import random import shutil # TASK_DEV_SIZES = {"boolq": 500, "cb": 50, "copa": 50, "multirc": 50, "record": 7500, "rte": 250, "wic": 100, "wsc": 50} TASK_DEV_SIZES = {"BoolQ": 500, "CB": 50, "COPA": 50, "MultiRC": 50, "ReCoRD": 7500, "RTE": 250, "WiC": 100, "WSC": 50} def file_len(fname): count = 0 ...
# -*- coding: utf-8 -*- from PyQt5 import QtWidgets, QtCore from PyQt5.QtCore import Qt from PyQt5.QtGui import QCursor from PyQt5.QtWidgets import QVBoxLayout, QToolBar, QSplitter from src.constant.conn_dialog_constant import ADD_CONN_MENU, EDIT_CONN_MENU from src.constant.main_constant import LOCATION_BUTTON, TAB_ID...
# Copyright 2010-2011, RTLCores. All rights reserved. # http://rtlcores.com # See LICENSE.txt from VerilogSim import VerilogSim class IcarusVerilog(VerilogSim): """ Icarus Verilog class to build a compile command and a simulation command. Inherits VerilogSim Defaults: TIMESCALE : 1ns / 10ps...
CLIENT_ID = "a126d5791c694dac84956d88bdeab74f" CLIENT_SECRET = "18f7ba3185ae43df90092e87aedf0b31" REDIRECT_URI = "http://127.0.01:8000/spotify/redirect"
from numpy.testing import assert_equal from spacy.language import Language from spacy.training import Example from spacy.util import fix_random_seed, registry SPAN_KEY = "labeled_spans" TRAIN_DATA = [ ("Who is Shaka Khan?", {"spans": {SPAN_KEY: [(7, 17, "PERSON")]}}), ( "I like London and Berlin.", ...
import time from optparse import OptionParser def build_option_parser(): parser = OptionParser() parser.add_option("-t", "--time", dest="given_time", type="string", help="Use HH:MM format for timer") return parser.parse_args() def countdown_timer(given_time_seconds): while given_time_seconds: ...
from django import forms from .utils import PYTHON_PATH class EditorForm(forms.Form): code = forms.CharField( widget=forms.Textarea, required=False, ) file_name = forms.CharField( required=False, ) dir_name = forms.CharField( required=False, ) select_python...
#/usr/bin/env python import QtTesting object1 = 'pqClientMainWindow/menubar/menuSources' QtTesting.playCommand(object1, 'activate', 'RTAnalyticSource') object2 = 'pqClientMainWindow/propertiesDock/propertiesPanel/Accept' QtTesting.playCommand(object2, 'activate', '') object3 = 'pqClientMainWindow/menubar/menuFilters/...
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: pyatv/protocols/mrp/protobuf/RemoteTextInputMessage.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool from google.p...
from flask import Blueprint from werkzeug.exceptions import NotFound, InternalServerError, TooManyRequests from mldictionary_api.const import API_PREFIX from mldictionary_api.resources.response import ResponseAPI from mldictionary_api.resources.const import ( ENGLISH_REPR, ENGLISH_TO_PORTUGUESE_REPR, PORTU...
import sys import os import configparser import requests import pandas as pd import hashlib from io import StringIO from datetime import datetime, timezone ## Django Setup import django import pymysql pymysql.install_as_MySQLdb() conffile = os.path.join(os.path.dirname(__file__), "../../conf/insert2db.conf") conf = co...
import os from celery import Celery from celery.schedules import crontab # set the default Django settings module for the 'celery' program. os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'reminders.settings') app = Celery('reminders') # Using a string here means the worker doesn't have to serialize # the configur...
def rotcir(ns): lista = [ns] for i in range(len(ns) - 1): a = ns[0] ns = ns[1:len(ns)+1] ns += a lista.append(ns) return(lista) def cyclic_number(ns): rotaciones = rotcir(ns) for n in range(1, len(ns)): Ns = str(n*int(ns)) while len(Ns) != len(ns): Ns = '0' + Ns if Ns not in rotaciones: ret...
""" Do not change anything if you dont have enough knowledge how to handle it, otherwise it may mess the server. """ from navycut.core import AppSister from navycut.utils import path __basedir__ = path.abspath(__file__).parent class AniketSister(AppSister): name = "aniket" template_folder = __basedir__ / ...
#!/usr/bin/env python3 # # wikipedia.py """ Sphinx extension to create links to Wikipedia articles. .. versionadded:: 0.2.0 .. extensions:: sphinx_toolbox.wikipedia Configuration -------------- .. latex:vspace:: -5px .. confval:: wikipedia_lang :type: :class:`str` :required: False :default: ``'en'`` The Wiki...