text
stringlengths
3
1.05M
/* * Vector subtraction */ void dvsub(int n, double *x, int incx, double *y, int incy, double *z, int incz) { while( n-- ) { *z = *x - *y; x += incx; y += incy; z += incz; } return; }
# coding=utf-8 # Copyright 2022 The TensorFlow Datasets 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 appl...
const Joi = require('joi'); const { objectId } = require('./custom.validation'); const create = { body: Joi.object().keys({ ten: Joi.string().optional().required(), vungMien: Joi.number().optional().min(1).max(3), }), }; const findByIdAndUpdate = { body: Joi.object().keys({ ten: Joi.string().optiona...
"""Handler for fetching outputs from fully qualified stacks. The `output` handler supports fetching outputs from stacks created within a sigle config file. Sometimes it's useful to fetch outputs from stacks created outside of the current config file. `rxref` supports this by not using the :class:`stacker.context.Conte...
# importing libraries import pandas as pd # custom libraries import config def cataract_or_not(txt): if "cataract" in txt: return 1 else: return 0 def downsample(df): df = pd.concat([ df.query('cataract==1'), df.query('cataract==0').sample(sum(df['cataract']), ...
// // The MIT License(MIT) // // Copyright(c) 2014 Demonsaw LLC // // 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, c...
import { ApolloClient } from 'apollo-client'; import { InMemoryCache } from 'apollo-cache-inmemory'; import { HttpLink } from 'apollo-link-http'; export default new ApolloClient({ link: new HttpLink({ uri: 'https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v2' }), fetchOptions: { mode: 'no-cors' ...
__all__ = [ "resnet_param_groups", "resnet18", "resnet34", "resnet50", "resnet101", "resnet152", "resnext101_32x8d", ] from icevision.imports import * from icevision.utils import * def _resnet_features(model: nn.Module, out_channels: int): # remove last layer (fully-connected) mod...
""" Django settings for animal crossing project. Generated by 'django-admin startproject' using Django 2.2.2. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ impo...
''' Copyright 2018 - LC This file is part of webshscr. webshscr is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. webshscr is distributed in...
import graphene from ...graphql.core.enums import to_enum from ...payment import GATEWAYS_ENUM, ChargeStatus PaymentChargeStatusEnum = to_enum( ChargeStatus, type_name='PaymentChargeStatusEnum') PaymentGatewayEnum = graphene.Enum.from_enum(GATEWAYS_ENUM) class OrderAction(graphene.Enum): CAPTURE = 'CAPTURE'...
from __future__ import absolute_import import jinja2 from jinja2.ext import Extension from .templatetags.wagtailuserbar import wagtailuserbar class WagtailUserbarExtension(Extension): def __init__(self, environment): super(WagtailUserbarExtension, self).__init__(environment) self.environment.gl...
/*! ========================================================= * Argon Design System React - v1.1.0 ========================================================= * Product Page: https://www.creative-tim.com/product/argon-design-system-react * Copyright 2020 Creative Tim (https://www.creative-tim.com) * Licensed under MIT ...
''' Created on 22 Mar 2016 @author: steve ''' import read_file as rf import math def LFC_tracks(in_file_1, in_file_2, chromosome): """ Return a list --> [chr, start, end, LFC] LFC = log2(in_file_1/in_file_2) First and last position in output is LFC=0 """ bin_list=rf.read_bin(in...
#pragma once #include <Python.h> #include <library/cpp/yson/node/node.h> namespace NYT { PyObject* BuildPyObject(const TNode& val); }
import factory import faker fake = faker.Factory.create() class UserFactory(factory.django.DjangoModelFactory): id = factory.LazyAttribute( lambda x: str(fake.random_int( min=1000000000000000000, max=999999999999999999999)) ) access_token = factory.LazyAttribute( lambda x: fak...
import joblib import uuid class Packager(): def __init__(self, model): self.model = model self.function_map = { "sklearn": self.package_sklearn_model, "keras": self.package_keras_model, "pytorch": self.package_pytorch_model } def package_sklearn_mod...
""" Le premier prgramme en Python * utilisation des arguments de la lignne de commande * les listes et la fonction map * les threads * le logger * Producer Consumer @author Dragos STOICA @version 0.5 @date 16.feb.2014 """ import sys, threading, logging, os, Queue class Producer(threading.Thread): """ Produce...
module.exports = { heroHeader: "Let the Nature Unleash Your Beauty", heroText: "Defend. Repair. Hydrate. Stay gorgeous and enhance your skin care routine with our", fromNatureToSkinDesc: "Formulated with extracts from 7 different species of plants, Miracle Radiance targets to rejuvenate your long-lost you...
/** @type {import('@docusaurus/types').DocusaurusConfig} */ module.exports = { title: 'Atlas', tagline: 'Manage your data', url: 'https://atlasgo.io', baseUrl: '/', onBrokenLinks: 'throw', onBrokenMarkdownLinks: 'warn', favicon: 'https://atlasgo.io/uploads/favicon.ico', organizationName: 'ariga', proj...
// Copyright (c) 1991-2018 Roger Allen // // 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, merge, publi...
dojo.provide("dojox.encoding.tests.compression.splay"); dojo.require("dojox.encoding.compression.splay"); dojo.require("dojox.encoding.bits"); (function(){ var msg1 = "The rain in Spain falls mainly on the plain."; var msg2 = "The rain in Spain falls mainly on the plain.1"; var msg3 = "The rain in Spain falls mainl...
const CustomAPIError = require('./custom-error') const { StatusCodes } = require('http-status-codes') class BadRequest extends CustomAPIError { constructor (message) { super(message) this.statusCode = StatusCodes.BAD_REQUEST } } module.exports = BadRequest
/** * 全球热卖搜索商品 */ ymtapp.service("searchCategory",function(){ this.isShowDefault=false; this.isShowSearch=false; this.lastY=0; this.currentY=0; this.isSearchOver=false; this.searchKeyword=""; this.searchNumber=0; //还原方法 this.reduction = function(){}; //打开搜索框 this.openSearchBox=function(){ if(!(this....
import moment from 'moment' export const rolesarray = (arr) => { var emptystring = ''; for (let index = 0; index <= arr.length - 1; index++) { emptystring += arr[index] + ','; } emptystring = emptystring.replace(/,\s*$/, ""); return emptystring; } ///////////////////////////AlterModal//////...
/******************************************************************************/ /* view.js -- Deal with integration views * * Copyright Yahoo Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this Software except in compliance with the License. * You may obtain a copy of...
module.exports = { onInput: function(input) { this.state = { size: input.size || "normal", label: input.label || "(no label)" }; } };
import React from 'react'; import { useGlobal } from 'reactn'; import styled from 'styled-components'; import _ from 'lodash'; import { Card, Value, FlexRow, FlexColumn, Devices } from '../../Common'; import BlockChart from './BlockChart'; import { Link } from 'react-router-dom'; import { timeAgo, getShortHash, formatV...
"""LessonsLearningStylesResources provides an interface of subroutines for the management of LessonsLearningStylesResources models (and thus the entities in the database). Operations in this module refer to operations which are performable on LessonsLearningStylesResources entities or are within reason to do with the d...
//// [parserExportAssignment3.ts] export = //// [parserExportAssignment3.js]
from django.apps import AppConfig class FavoriteConfig(AppConfig): name = 'Favorite'
/*------------------------------------------------------------------------- * * reorderbuffer.c * PostgreSQL logical replay/reorder buffer management * * * Copyright (c) 2012-2019, PostgreSQL Global Development Group * * * IDENTIFICATION * src/backend/replication/reorderbuffer.c * * NOTES * This modu...
/* * Copyright (c) 2002 Bob Beck <beck@openbsd.org> * Copyright (c) 2002 Theo de Raadt * Copyright (c) 2002 Markus Friedl * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistribu...
import libtcodpy as libtcod from objectComponent.fighter import * from objectComponent.equipment import * from fighterAi.basic import * from gameObject import * import xml.etree.ElementTree as ET class AbstractMapGenerator(): def setup_map(self): raise NotImplementedError def place_obje...
define( ({ _widgetLabel: 'ทิศทาง' }) );
const input = document.querySelector("#send"); const text = document.querySelector("#text"); const counter = document.querySelector("#counter") const cleaning = input.addEventListener('click', (e)=> { e.preventDefault(); let palavroes = ['porra', 'caralho', 'corno', 'puto']; let valuetext = text.value.toLowerCas...
import React, { Component } from 'react'; import { Card, CardBody, Col, Row, Table, Button, Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap'; import axios from 'axios' import 'bootstrap/dist/css/bootstrap.min.css' import './manage.css' class Manage extends Component { constructor(props) { sup...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /** * Represents a file within Stryker. Could be a strictly in-memory file. */ var File = /** @class */ (function () { /** * Creates a new File to be used within Stryker. * @param name The full name of the file (inc path) *...
# -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2019-03-08 19:47 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( ...
/* * NB: since truffle-hdwallet-provider 0.0.5 you must wrap HDWallet providers in a * function when declaring them. Failure to do so will cause commands to hang. ex: * ``` * mainnet: { * provider: function() { * return new HDWalletProvider(mnemonic, 'https://mainnet.infura.io/<infura-key>') * }, ...
from django.http import HttpResponse from django.conf import settings from django.views.decorators.http import require_POST from django.views.decorators.csrf import csrf_exempt from checkout.webhook_handler import StripeWH_Handler import stripe @require_POST @csrf_exempt def webhook(request): """ Listen for webh...
from distutils.core import setup setup_parameters = dict( name='Naiad', packages=['naiad'], entry_points={ 'console_scripts': [ 'naiad = naiad.cli:run' ] }, ) setup(**setup_parameters)
/* * StartUp.c * * Author: john@USB-By-Example.com */ #include "Application.h" extern void ApplicationThread_Entry (uint32_t Value); extern CyU3PThread ApplicationThread; // ApplicationDefine function called by RTOS to startup the application threads void CyFxApplicationDefine(void) { void *StackPtr = N...
define([ 'extensions/views/graph/xaxis' ], function (XAxis) { var JourneyXAxis = XAxis.extend({ useEllipses: true, tickValues: function () { return [_.range(this.collection.at(0).get('values').length)]; }, tickSize: 0, tickPadding: 0, tickFormat: function () { var steps = this.co...
from datetime import date from decimal import Decimal import requests from django.conf import settings from django.db import transaction from django.db.models import Sum from rest_framework import serializers from billing.models import Transaction, TransactionEntry, ExchangeRate from billing.constants import USD, SU...
const { QUICK_LPF } = require('../../../constants'); const { getRewardPoolApys } = require('../common/getRewardPoolApys'); const pools = require('../../../data/matic/quickLpPools.json'); const { quickClient } = require('../../../apollo/client'); const { addressBook } = require('../../../../packages/address-book/address...
#include <stdio.h> #include <time.h> #include <assert.h> #include "network_dist.h" #include "image.h" #include "data.h" #include "utils.h" #include "blas.h" #include "crop_layer.h" #include "connected_layer.h" #include "gru_layer.h" #include "rnn_layer.h" #include "crnn_layer.h" #include "local_layer.h" #include "conv...
#!/usr/bin/env python # -*- coding:utf-8 -*- # @Filename: _RESSEL.py # @Author: Daniel Puente Ramírez # @Time: 25/4/22 18:49 import numpy as np import pandas as pd from sklearn.metrics import f1_score class RESSEL: """ de Vries, S., & Thierens, D. (2021). A reliable ensemble based approach ...
let modInfo = { name: "The Xtreme Tree", id: "XR2003", author: "XtremeRusher", pointsName: "points", modFiles: ["layers.js", "tree.js"], discordName: "", discordLink: "", initialStartPoints: new Decimal (0), // Used for hard resets and new players offlineLimit: 1, // In hours } // Set your version in num an...
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.SmoothDnD=t():e.SmoothDnD=t()}(this,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};re...
var expect = require('chai').expect;
#!/usr/bin/env python # -*- coding: utf-8 -*- # (c) Copyright IBM Corp. 2010, 2021. All Rights Reserved. """ setup.py for resilient-circuits Python module """ import io from os import path from setuptools import find_packages, setup this_directory = path.abspath(path.dirname(__file__)) with io.open(path.join(this_...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Ed Mountjoy # import subprocess as sp import os import pandas as pd def perform_conditional_adjustment(sumstats, in_plink, temp_dir, index_var, chrom, condition_on, logger=None): ''' Uses GCTA-cojo to perform conditional analysis Args: sumstats...
/** * Copyright 2016 The AMP HTML 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 require...
import numpy as np def fast_random_choice(weights): """ this is at least for small arrays much faster than numpy.random.choice. For the Gillespie overall this brings for 3 reaction a speedup of a factor of 2 """ cs = 0 u = np.random.rand() for k in range(weights.size): cs +...
// // Generated by class-dump 3.5 (64 bit). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. // #import <Safari/SheetWithTableController.h> #import <Safari/TableViewPlusDataSource-Protocol.h> #import <Safari/TableViewPlusDelegate-Protocol.h> @class NSMutableArray, NSString, ...
# # # Copyright (C) 2012 Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and ...
# Combine individual fiber files into plate files for all eBOSS plates # # Tim Hutchinson, University of Utah, December 2014 # t.hutchinson@utah.edu from os import environ, makedirs, getcwd from os.path import exists, join, basename from time import gmtime, strftime import numpy as n from astropy.io import fits from...
/* Copyright 2013-2015 ASIAL 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/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, so...
import pandas as pd def load(name): df = pd.read_csv('data/' + name + '.csv') return df def getColsValues(df, cols): return df[list(cols)].values def getColValues(df, col): return df[col].values
import { collection } from "firebase/firestore"; import { CollectionActionTypes } from "./collection.types"; const INITIAL_STATE = { collections : [ { id: 1, title : 'Large Household Appliances', routeName : 'largehousehold', items : [ { ...
"use strict"; /* * ATTENTION: An "eval-source-map" devtool has been used. * This devtool is neither made for production nor for readable output files. * It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools. * If you are trying to read the output file, select a dif...
"""This file and its contents are licensed under the Apache License 2.0. Please see the included NOTICE for copyright information and LICENSE for a copy of the license. """ import logging import django_rq import json from django.utils import timezone from django.db import models, transaction from django.utils.translat...
from flask import request, Blueprint, render_template, redirect from services.user import UserServices from services.video import VideoServices video = Blueprint('video', __name__) @video.route('/play') def video_play(): uid = request.cookies.get('uid') if uid is None: return redirect('/user/login',...
// @ts-check // !!! Sharing the dependencies of caz module.paths = require.main.paths const path = require('path') const chalk = require('chalk') const { name, version } = require('./package.json') /** @type {import('caz').Template} */ module.exports = { name, version, metadata: { year: new Date().getFullY...
# Original work Copyright (c) 2016 OpenAI (https://openai.com). # Modified work Copyright (c) Allen Institute for AI # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from typing import Union, Tuple, List, cast, Iterable, Callable from collectio...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Tests for the WinRAR Windows Registry plugin.""" from __future__ import unicode_literals import unittest from dfdatetime import filetime as dfdatetime_filetime from dfwinreg import definitions as dfwinreg_definitions from dfwinreg import fake as dfwinreg_fake from p...
#!/usr/bin/env python3 # Copyright (c) 2013-2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from __future__ import division,print_function,unicode_literals import biplist from ds_store import DSStor...
""" 持久状况承载能力极限状态计算 《公路钢筋混凝土及预应力混凝土桥涵设计规范》(JTG 3362-2018)第5节 """ __all__ = [ 'end_anchorage', 'inner_anchorage', ] from math import pi, sin, cos, acos, sqrt from collections import OrderedDict from calla import abacus, numeric class end_anchorage(abacus): """ 端部锚固区计算 《公路钢筋混凝土及预应力混凝土桥涵设计规范》(JTG ...
import CoreUtils from './core.utils'; import Validators from './core.validators'; /** * Compute/test intersection between different objects. * * @module core/intersections */ export default class Intersections { /** * Compute intersection between oriented bounding box and a plane. * * Returns intersection in ...
// NOTE: the prop internal directive is compiled and linked // during _initScope(), before the created hook is called. // The purpose is to make the initial prop values available // inside `created` hooks and `data` functions. import Watcher from '../../watcher' import config from '../../config' import { assertProp, i...
import RPi.GPIO as GPIO import binascii import time GPIO.setmode(GPIO.BCM) GPIO.setup(12, GPIO.OUT) GPIO.setup(16, GPIO.OUT) GPIO.setup(5, GPIO.OUT) GPIO.setup(6, GPIO.OUT) GPIO.setup(13, GPIO.OUT) GPIO.setup(19, GPIO.OUT) pin = [12, 16, 5, 6, 13, 19] k = 0 st="110101011010111" cols = 6 rows = len(st)/3 arr = [[0]*...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # @Author: Brian Cherinka, José Sánchez-Gallego, and Brett Andrews # @Date: 2017-03-20 # @Filename: conftest.py # @License: BSD 3-clause (http://www.opensource.org/licenses/BSD-3-Clause) # # @Last modified by: Brian Cherinka # @Last modified time: 2018-07-21 21:51:06 i...
# -*- coding: utf-8 -*- """ Internal module for formatting output data in csv, html, and latex files. This module also applies to display formatting. """ from __future__ import print_function from functools import partial import numpy as np from pandas._libs import lib from pandas._libs.tslib import format_array_fr...
import graph def main(): g = graph.Graph()
import React from 'react' import { CFooter } from '@coreui/react' const AppFooter = () => { return ( <></> // <CFooter> // <div> // <a href="https://coreui.io" target="_blank" rel="noopener noreferrer"> // CoreUI // </a> // <span className="ms-1">&copy; 2021 creativeLa...
# Copyright 2021 The Kubeflow 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...
import base64 import logging import random import sweeper.utils as utils import uuid import time from azure.storage import BlobService from azure.servicemanagement import * from azure.storage.fileshareservice import FileShareService from sweeper.resource import Resource, ResourceConfig def filter_any_hosted_service(...
#!/usr/bin/env python3 import argparse import csv import io import os import pathlib import server import signal import socket import sys from data import Data def count_word_occurrences(content): count = dict() for word in content.split(): count[word] = count.get(word, 0) + 1 return count def...
#! /usr/local/bin/python3 """ ------------------------------------------------------------------------------------------------------- Automagically Log Your Bike Trip When You're Logged Onto the Secure Network - Never Miss the Incentive. ---------------------------------------------------------------------------------...
var geheimPopupEl = null; var geheimPopupTarget = null; function geheimPopup(target, settings) { geheimPopupEl = document.getElementById("geheim-popup"); geheimPopupTarget = target; geheimPopupEl.style.display = "inline"; var existingKeys = document.querySelector("#geheim-popup #keys"); // Clear existing keys wh...
gfrom pipeline import pipeline nlp = pipeline("e2e-qg", model="valhalla/t5-base-e2e-qg") qg = pipeline("e2e-qg") qg2 = pipeline("multitask-qa-qg") print("preload finished.")
/** * yox.js v1.0.0-alpha.90 * (c) 2017-2019 musicode * Released under the MIT License. */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global = global || self, global....
import json import sqlite3 import sys import unicodedata import re import pickle import os import logging from urllib.parse import unquote from tqdm import tqdm # input: input_file = sys.argv[1] db_path = sys.argv[2] # output output_file = sys.argv[3] EDGE_XY = re.compile(r'<a href="(.*?)">(.*?)</a>') def get_edg...
from Instrucciones.TablaSimbolos.Instruccion import Instruccion class Undefined(Instruccion): def __init__(self, tipo, valor, strGram, linea, columna): Instruccion.__init__(self, None, linea, columna, strGram) self.tipo = tipo self.valor = valor def ejecutar(self, tabla, arbol): ...
/** * RESTFul API 시작하기 * @author Geunhyeok LEE */ const path = require('path') const colors = require('colors') const express = require('express') const bodyParser = require('body-parser') const paddingNumber = (number, length) => { const sNumber = number.toString(); if (sNumber.length >= length) { return ...
"""profiles_project URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Cl...
import axios from 'axios'; import authHeader from './auth-header'; import storage from '../utils/storage'; class Auth { login = (email, password) => { return axios .post(`${process.env.REACT_APP_BACKEND_URL}/auth/login`, { email: email, password: password ...
/*! * Chart.js v2.9.2 * https://www.chartjs.org * (c) 2019 Chart.js Contributors * Released under the MIT License */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(function() { try { return require('moment'); } catch(e) { } }()) : typeof define...
""" Custom Norm wrappers to enable sync BN, regular BN and for weight initialization """ import torch.nn as nn def Norm2d(in_channels): """ Custom Norm Function to allow flexible switching """ return nn.BatchNorm2d(in_channels) def initialize_weights(*models): """ Initialize Model Weights ...
import os import numpy as np import pandas as pd import seaborn as sn import matplotlib import matplotlib.pyplot as plt import glob from time import gmtime, strftime from datetime import datetime import timeit import yaml import argparse from tensorflow.keras.optimizers import Adam from go_model.evaluate_model import e...
#!/usr/bin/env python3 # Copyright (c) 2012-2018 The Picscoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Extract _("...") strings for translation and convert to Qt stringdefs so that they can be picked up b...
# global import torch from torch import Tensor import typing import math # local import ivy def expm1(x: Tensor)\ -> Tensor: return torch.expm1(x) def bitwise_invert(x: torch.Tensor) \ -> torch.Tensor: return torch.bitwise_not(x) def isfinite(x: Tensor)\ -> Te...
# Iterative approach using stack # 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 mergeTrees(self, root1: TreeNode, root2: TreeNode) -> TreeNode: ...
const {encode} = require('cbor'); const {grpcProxyServer} = require('ln-service/routers'); const moment = require('moment'); const {restrictMacaroon} = require('ln-service'); const base64AsBuf = base64 => Buffer.from(base64, 'base64'); const bufferAsHex = buffer => buffer.toString('hex'); const expiryMs = n => 1000 * ...
#!/usr/bin/python import sys import argparse import terminal_colors as tc import app_ui as ui import os import json #import time #import datetime import wx global app_description, verbose_mode, quiet_mode app_description = None verbose_mode = None quiet_mode = None def get_options(): global app_description, ve...
import random import matplotlib.pyplot as plt from typing import Tuple def trans_1(p: Tuple[float, float]): x, y = p x, y = 0.85*x + 0.04*y, -0.04*x + 0.85*y + 16 return x, y def trans_2(p: Tuple[float, float]): x, y = p x, y = 0.2*x - 0.26*y, 0.23*x + 0.22*y + 1.6 return x, y def trans_3(p...
import os import platform from glob import glob from setuptools import setup from setuptools.extension import Extension from Cython.Distutils import build_ext import numpy VERSION = "3.8.0" NAME = "ms2pip" LICENSE = "apache-2.0" DESCRIPTION = "MS²PIP: MS² Peak Intensity Prediction" AUTHOR = "Sven Degroeve, Ralf Gab...
import axios from 'axios'; import adapter from "axios/lib/adapters/http"; import { Product } from './product'; axios.defaults.adapter = adapter; export class API { constructor(url) { if (url === undefined || url === "") { url = process.env.REACT_APP_API_BASE_URL; } if (url.endsWith("/")) { u...
import { hasInterpolation } from "../utils" /** * Check whether a value is standard * * @param {string} value * @return {boolean} If `true`, the value is a variable */ export default function (value) { // SCSS variable if (value[0] === "$") { return false } // Less variable if (value[0] === "@") { return...