text
stringlengths
3
1.05M
import os import re import subprocess import warnings from distutils.version import LooseVersion from typing import Any, Callable, Dict, List, Mapping, Optional, Tuple, Union, cast import torch import torch.distributed as dist import torch.multiprocessing as mp from ignite.distributed.comp_models.base import Computat...
#!/usr/bin/env python3 import glob import csv for path in glob.glob('var/issue/*/*.csv'): seen = {} for row in csv.DictReader(open(path, newline="")): key = row["row-number"] + "," + row["field"] if key in seen: print(path, row) seen[key] = row
import unittest from src.logica.coleccion import Coleccion from src.modelo.album import Album, Medio from src.modelo.declarative_base import Session class AlbumTestCase(unittest.TestCase): def test_prueba(self): self.assertEqual(0, 0) def setUp(self): '''Crea una colección para hacer las pru...
""" Python mapping for the GameController framework. This module does not contain docstrings for the wrapped code, check Apple's documentation for details on how to use these functions and classes. """ import sys import Cocoa import objc from GameController import _metadata from GameController import _GameController...
""" HyperOne HyperOne API # noqa: E501 The version of the OpenAPI document: 0.1.0 Generated by: https://openapi-generator.tech """ import sys import unittest import h1 from h1.model.iam_permission_array import IamPermissionArray from h1.model.tag_array import TagArray globals()['IamPermissionArray...
# coding: utf-8 # Copyright 2015 The Oppia 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 requir...
from .survey import HelmBaseSurvey, Helm2DSurvey, Helm25DSurvey from .problem import HelmBaseProblem, Helm2DProblem, Helm25DProblem from .fields import HelmFields
""" A definition of a decorator that caches data batches on a disk. """ import os import copy import fcntl import hashlib import json import logging import pickle import tempfile LOGGER = logging.getLogger( 'vlne.data.data_generator.base.data_disk_cache_base' ) class DataDiskCacheBase: """A decorator around ...
"""Definition of the Add/Subtract Component.""" import collections import numpy as np from scipy import sparse as sp from six import string_types from openmdao.core.explicitcomponent import ExplicitComponent class AddSubtractComp(ExplicitComponent): r""" Compute a vectorized element-wise addition or subtrac...
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * class AlipayChinareModelResult(object): def __init__(self): self._id = None self._rule_id = None self._rule_result = None self._trans_id = None @property def id...
# Copyright BigchainDB GmbH and BigchainDB contributors # SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0) # Code is Apache-2.0 and docs are CC-BY-4.0 """ BigchainDB: The Blockchain Database For full docs visit https://docs.bigchaindb.com """ from setuptools import setup, find_packages import sys if sys.version...
/* Copyright 2009 University of Toronto Licensed under the Educational Community License (ECL), Version 2.0 or the New BSD license. You may not use this file except in compliance with one these Licenses. You may obtain a copy of the ECL 2.0 License and BSD License at https://github.com/fluid-project/infusion/raw/mast...
from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant import homeassistant.helpers.config_validation as cv from .const import DOMAIN from .bluetooth_tracker import BluetoothTracker CONFIG_SCHEMA = cv.deprecated(DOMAIN) async def async_setup_entry(hass: HomeAssistant, entry:...
# -*- coding: utf-8 -*- # # This program 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. # # This program is distributed in the hope th...
jQuery.noConflict(); /** * File: LeftAndMain.js */ (function($) { // setup jquery.entwine $.entwine.warningLevel = $.entwine.WARN_LEVEL_BESTPRACTISE; $.entwine('ss', function($) { /** * Position the loading spinner animation below the ss logo */ var positionLoadingSpinner = function() { var offset =...
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. """ Base class for some single stage trackers like SiamRPN or SiamFCOS. """ import torch from typing import List from .base_tracker import BaseTracker from ..builder import build_backbone, build_head, build_fusion, build_n...
'use strict'; module.exports = function binarySearch(arr=[], key=0){ //ensures it is a sorted array arr.sort((a, b) => { return a > b ? 1: -1; }); let midIdx = Math.floor(arr.length/2); //function that runs if the key is larger than the value at the current middle index let bottomMiddle = function(st...
(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(); else if(typeof define === 'function' && define.amd) define([], factory); else if(typeof exports === 'object') exports["create-api"] = factory(); else root["cu...
#pragma once namespace SOUI { enum SkinType { color, sys }; struct SkinSaveInf { COLORREF color; SStringW filepath; RECT margin; }; struct SkinLoadInf { COLORREF color; SStringW filepath; RECT margin; }; interface ISetOrLoadSkinHandler { virtual bool SaveSkin(SkinType, SkinSaveInf&) = NU...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright (C) 2020 The F4PGA Authors. # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # # SPDX-License-Identifier: ISC """ Classes for representing and creating a logica...
const _ = require('lodash'); const Model = require('./BaseModel'); class Move extends Model { static tableName = 'moves'; static relationMappings = { allNames: { relation: Model.HasManyRelation, modelClass: require('./MoveName'), join: { from: 'moves.id', to: 'mov...
import React from "react"; import { Image, Text, View, ScrollView, RefreshControl } from "react-native"; import { Card, Button, Icon, Avatar } from 'react-native-elements'; import { connect } from 'react-redux'; import moment from 'moment'; import { Agenda } from 'react-native-calendars'; import LottieView fr...
import os import numpy as np import numpy.ma as ma import h5py from scipy.io import loadmat def trajEnsFromStephensRyu(filename): mat = loadmat(filename) raise NotImplemented()
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # PynamoDB documentation build configuration file, created by # sphinx-quickstart on Wed Jan 22 19:45:33 2014. # # 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 # a...
/* CAB202: Tutorial 1 * Question 2 - Template * * B.Talbot, February 2016 * Queensland University of Technology */ #include <stdio.h> int main() { // Count from 0 to 12 printf("\nFROM 0 TO 12:\n"); // TODO for (int i = 0; i <= 12; i++) { printf("%d\n", i); } // Count from 5 to...
$_L(["$wt.widgets.Item"],"$wt.widgets.TableItem",["$wt.graphics.Color","$.Rectangle","$wt.internal.RunnableCompatibility","$wt.internal.browser.OS","$wt.widgets.Event"],function(){ c$=$_C(function(){ this.parent=null; this.strings=null; this.images=null; this.checked=false; this.grayed=false; this.cached=false; ...
"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { t...
import pathlib from .lib_main import pip_install from .lib_main import pip_update def get_version() -> str: with open(str(pathlib.Path(__file__).parent / 'version.txt'), mode='r') as version_file: version = version_file.readline() return version __title__ = 'configmagick_update' __version__ = get_ve...
// // AFJSONResponseDeserializer.h // NetworkingBlocks // // Created by Tayphoon on 26/09/2017. // Copyright © 2017 Tayphoon. All rights reserved. // #import <AFNetworking/AFNetworking.h> #import "TCResponseDeserialization.h" NS_ASSUME_NONNULL_BEGIN /** @abstract This implementation of the `TCResponseDeseriali...
from collections import OrderedDict from typing import Callable, List, Optional, Union from flytekit.common import constants as _common_constants from flytekit.common.utils import _dnsify from flytekit.core.base_task import PythonTask from flytekit.core.condition import BranchNode from flytekit.core.context_manager im...
/* * Copyright (C) 2010-2011, 2013-2015 ARM Limited. All rights reserved. * * This program is free software and is provided to you under the terms of the GNU General Public License version 2 * as published by the Free Software Foundation, and any use by you of this program is subject to the terms of such GNU licen...
'use strict'; function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } var Icon = require('../Icon-deabd942.js'); var React = _interopDefault(require('react')); require('@carbon/icon-helpers'); require('prop-types'); var LetterFf20 = /*#__PURE__*/ React.forwa...
from django.conf.urls import url from apps.user.views import register, RegisterView, ActiveView, LoginView, LogoutView, UserinfoView, UseraddressView, UserorderView urlpatterns = [ # url(r'^register$', register), url(r'^register$', RegisterView.as_view(), name='register'), # 类视图的方法, 反向解析 url(r'^active/(?P...
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-componentsA-keyboard-index"],{"0cc1":function(t,e,i){var n=i("24fb");e=n(!1),e.push([t.i,'@charset "UTF-8";\r\n/**\r\n * 下方引入的为uView UI的集成样式文件,为scss预处理器,其中包含了一些"u-"开头的自定义变量\r\n * 使用的时候,请将下面的一行复制到您的uniapp项目根目录的uni.scss中即可\r\n * uView自定义的css类名和scss变量,均以"u-...
# coding:utf-8 from django.shortcuts import render,redirect from django.http.response import JsonResponse,HttpResponse,Http404 from django.contrib.auth import authenticate,login,logout # 认证相关方法 from django.contrib.auth.models import User # Django默认用户模型 from django.contrib.auth.decorators import login_required # 登录需求装饰器...
""" This module is designed to validate the correctness of generic field entities in content. """ from demisto_sdk.commands.common.errors import Errors from demisto_sdk.commands.common.hook_validations.content_entity_validator import \ ContentEntityValidator GENERIC_FIELD_GROUP = 4 GENERIC_FIELD_ID_PREFIX = 'gener...
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "MarkIT.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
/* 'use strict'; */ var MYTIMEOUT = 12000; var isWindows = /MSAppHost/.test(navigator.userAgent); var isAndroid = !isWindows && /Android/.test(navigator.userAgent); var isFirefox = /Firefox/.test(navigator.userAgent); var isWebKitBrowser = !isWindows && !isAndroid && /Safari/.test(navigator.userAgent); var is...
from typing import Dict, List, Optional, Union from pydantic import BaseModel from fast_tmp.admin.schema.abstract_schema import BaseAmisModel from fast_tmp.admin.schema.enums import TypeEnum from fast_tmp.admin.schema.forms.enums import ControlEnum, FormWidgetSize, ItemModel # fixme:未来考虑更多的fields类型字段支持 class Column...
from django.test import TestCase from django.utils import timezone from django.db import IntegrityError from django.core.exceptions import MultipleObjectsReturned from core.tests.mommy_utils import make_recipe, make_user from timer.models import Timer class RunningTimerManagerTestCase(TestCase): def test_query_...
require({cache:{ 'dijit/nls/ja/loading':function(){ define( "dijit/nls/ja/loading", //begin v1.x content ({ loadingState: "ロード中...", errorState: "エラーが発生しました。" }) //end v1.x content ); }, 'dijit/nls/ja-jp/loading':function(){ define('dijit/nls/ja-jp/loading',{}); }}}); define("dojox/grid/nls/DataGrid_ja-jp", [], 1);
import logging from django.core.exceptions import ObjectDoesNotExist from django.db import DataError from common.prpcrypt import prpcrypt from HttpApiManager.models import ProjectInfo, ModuleInfo, TestCaseInfo, UserInfo, EnvInfo, TestReports, DebugTalk, \ TestSuite logger = logging.getLogger('MultipleIn...
import PropTypes from 'prop-types'; import React from 'react'; import cx from '../../utils/classnames.js'; export default function SaveButton({canSave, saving, forking, onSave}) { return ( <button type="button" disabled={ !canSave || saving || forking } onClick={onSave}> <i ...
/////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2012-2015 DreamWorks Animation LLC // // All rights reserved. This software is distributed under the // Mozilla Public License 2.0 ( http://www.mozilla.org/MPL/2.0/ ) // // Redistributions of source code must retain the abov...
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
# -*- coding: utf-8 -*- # # Author: Tomi Jylhä-Ollila, Finland 2013-2014 # # This file is part of Kunquat. # # CC0 1.0 Universal, http://creativecommons.org/publicdomain/zero/1.0/ # # To the extent possible under law, Kunquat Affirmers have waived all # copyright and related or neighboring rights to Kunquat. # from P...
# Copyright 2019 the authors. # This file is part of Hy, which is free software licensed under the Expat # license. See the LICENSE. import os import sys import ast import tempfile import runpy import importlib from fractions import Fraction import pytest import hy from hy.lex import hy_parse from hy.errors import ...
module.exports = { root: true, env: { es6: true, node: true, commonjs: true }, rules: { indent: ["error", "tab"], semi: ["error", "always"], quotes: ["error", "double", {avoidEscape: true, allowTemplateLiterals: true}], "no-irregular-whitespace": ["error", {skipStrings: true}], "max-len": ["warn", 1...
import struct import numpy def serialize_matrix(fd, matrix, dtype='f'): dt = numpy.dtype(dtype) matrix = matrix.astype(dt) fd.write(struct.pack('<II', matrix.shape[0], matrix.shape[1])) fd.write(struct.pack('<' + dtype * matrix.size, *matrix.flat)) def deserialize_matrix(fd, dtype='f'): dt = nu...
// File utility.js // // Utile per avere delle utilita' in JavaScript! // Questa funzione mi restituisce l'elemento selezionato // utilizzando una compatibilità migliore, anche per browser // vecchi function myGetElementById(idElemento) { // Elemento da restituire var elemento; // Se esiste il met...
import torch import numpy as np import functools from config import * DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu") def cat(list_of_tensors, dim=0): """ Concatenate a list of tensors. """ return functools.reduce(lambda x, y: torch.cat([x, y], dim=dim), list_of_tensors) def ...
#imports import os import subprocess import re import sys #NOTES ''' [IDEA] Man page --> print whole file (?) [SEARCH] How other programs work with CLI args and settings and print help ''' #global settings min_args = 2 max_args = 2 prog_name = "main2.py" #text output dict def display(text): if(text == 'verbosi...
#ifndef SH_INTC_H #define SH_INTC_H #include "exec/memory.h" typedef unsigned char intc_enum; struct intc_vect { intc_enum enum_id; unsigned short vect; }; #define INTC_VECT(enum_id, vect) { enum_id, vect } struct intc_group { intc_enum enum_id; intc_enum enum_ids[32]; }; #define INTC_GROUP(enum_i...
import networkx as nx from node2vec import Node2Vec g = nx.read_edgelist('edge.dat') node2vec = Node2Vec(g, dimensions=32, p=1, q=1, quiet=True, workers=4, seed=42) model = node2vec.fit() model.wv.save_word2vec_format("n2v-abcd-p1-32") import os import subprocess import xgboost as xgb import igraph as ig from sklearn...
import os import time import datatypes as dt from build import CardDataset from data_utils import load_data,save_all,save_trainset,save_valset if __name__ == "__main__": import argparse parser = argparse.ArgumentParser( description= """ Train and evaluate networks on card representatio...
const router = require("express").Router(); const { notes } = require("../../db/db.json"); const { nanoid } = require("nanoid"); const fs = require("fs"); const path = require("path"); // when a GET request is made, the notes db sends it's information router.get("/notes", (req, res) => { res.json(notes); }); // whe...
/** * A specialized version of `matchesProperty` for source values suitable * for strict equality comparisons, i.e. `===`. * * @private * @param {string} key The key of the property to get. * @param {*} srcValue The value to match. * @returns {Function} Returns the new spec function. */ function matchesStrictCo...
from setuptools import setup, find_packages import os version = '1.0.3-sale' entry_points = { 'openprocurement.api.plugins': [ 'auctions.core = openprocurement.auctions.core:includeme' ] } setup(name='openprocurement.auctions.core', version=version, description="", long_description=...
(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(require("react"), require("moment-jalaali"), require("react-dom")); else if(typeof define === 'function' && define.amd) define("imrc-datetime-picker", ["react", "momen...
from flask_wtf import FlaskForm from wtforms import StringField, BooleanField, SubmitField, IntegerField, SelectField, DateField, MultipleFileField, TextAreaField from flask_wtf.file import FileField, FileRequired, FileAllowed from wtforms.validators import DataRequired, email, optional, required, length from werkzeug....
/* global QUnit */ sap.ui.define([ "sap/ui/core/Control", "sap/ui/fl/write/api/SmartVariantManagementWriteAPI", "sap/ui/fl/Layer", "sap/ui/rta/command/CommandFactory", "sap/ui/thirdparty/sinon-4" ], function( Control, SmartVariantManagementWriteAPI, Layer, CommandFactory, sinon ) { "use strict"; var sandbo...
const input = require("fs").readFileSync("./input.txt", "utf8"); const splinput = input .split("\n") .map((line) => line.split(" | ").map((part) => part.split(" "))); let counter = 0; for (let display of splinput) { for (let digit of display[1]) { switch (digit.length) { case 7: counter++; ...
import"../../../vaadin-lumo-styles/color.js";import"../../../vaadin-lumo-styles/sizing.js";import"../../../vaadin-lumo-styles/spacing.js";import"../../../vaadin-lumo-styles/style.js";import"../../../vaadin-lumo-styles/typography.js";import{css as o,registerStyles as e}from"../../../vaadin-themable-mixin/vaadin-themable...
import logging import os import sys import requests from django.core.management.base import BaseCommand from symposion.schedule.models import Presentation VIDEO_DATA_URL = os.environ["VIDEO_DATA_URL"] STATIC_SITE_WEBHOOK = os.environ.get("STATIC_SITE_WEBHOOK") logging.basicConfig(stream=sys.stdout, level=logging.D...
# -*- coding: utf-8 -*- """ Eve ~~~ An out-of-the-box REST Web API that's as dangerous as you want it to be. :copyright: (c) 2017 by Nicola Iarocci. :license: BSD, see LICENSE for more details. .. versionchanged:: 0.5 'SERVER_NAME' removed. 'QUERY_WHERE' added. 'QUERY_SO...
# Copyright (C) 2014 Kristoffer Gronlund <krig@koru.se> # # 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, ...
import consul import unittest from consul import ConsulException, NotFound from mock import Mock, patch from patroni.dcs.consul import AbstractDCS, Cluster, Consul, ConsulInternalError, \ ConsulError, ConsulClient, HTTPClient, InvalidSessionTTL, InvalidSession from . import SleepExcepti...
//// [baseIndexSignatureResolution.ts] class Base { private a: string; } class Derived extends Base { private b: string; } // Note - commmenting "extends Foo" prevents the error interface Foo { [i: number]: Base; } interface FooOf<TBase extends Base> extends Foo { [i: number]: TBase; } var x: FooOf<Derived> =...
var searchData= [ ['operator_3c_3c_65',['operator&lt;&lt;',['../structsrilakshmikanthanp_1_1ansi_1_1cursor.html#aa8dc2a37ef130e0d3dddd9f52110f920',1,'srilakshmikanthanp::ansi::cursor::operator&lt;&lt;()'],['../structsrilakshmikanthanp_1_1ansi_1_1clrscr.html#a9ff44218d34b187bd3c79d390720f81e',1,'srilakshmikanthanp::an...
from keras import Sequential from keras.layers import Dense import numpy as np import pytest import optuna from optuna.integration import KerasPruningCallback from optuna.testing.integration import create_running_trial from optuna.testing.integration import DeterministicPruner @pytest.mark.parametrize("interval, epo...
import React from "react"; import TableHeader from "./tableHeader"; import TableBody from "./customSuppliersTableBody"; const Table = ({ columns, sortColumn, onSort, data }) => { return ( <table className="table table-bordered table-hover"> <TableHeader columns={columns} sortColumn={sortColumn} onSort={onS...
import graphene from .mutations import ( RiderCreate ) from .resolvers import ( resolve_rider ) from .types import Rider class RiderQueries(graphene.ObjectType): rider = graphene.Field(Rider, id=graphene.ID( ), description="Return information about the rider") riders = graphene.List( Ride...
from .protocol import Protocol class Control: def __init__(self, accel: float = 0, brake: float = 0, clutch: float = 0, gear: int = 1, steering: float = 0, focus: float = 0, meta: int = 0): """ Class representing the available effectors. Parameters: accel (flo...
!function(t,e){if("function"==typeof define&&define.amd)define([],e);else if("object"==typeof module&&module.exports)module.exports=e();else{var i=e();t.Alert=i.Alert,t.Button=i.Button,t.Carousel=i.Carousel,t.Collapse=i.Collapse,t.Dropdown=i.Dropdown,t.Modal=i.Modal,t.Popover=i.Popover,t.ScrollSpy=i.ScrollSpy,t.Tab=i.T...
#include <string.h> #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "esp_log.h" #include "ssd1306.h" #include "font8x8_basic.h" #define tag "SSD1306" void ssd1306_init(SSD1306_t * dev, int width, int height) { if (dev->_address == SPIAddress) { spi_init(dev, width, height); } else { i2c_in...
module.exports = require('./hmip-sth');
#!/bin/env python # -*- coding: utf-8 -*- #SBATCH -J fitpot-GA # job name #SBATCH -A HatD2 # project name #SBATCH -N 32 # number of nodes #SBATCH -n 512 # number of tasks #SBATCH -o out.%j # stdout filename (%j is jobid) #SBATCH -e err.%j # stdout filename (%j is jobid) #SBATCH...
webpackJsonp([5],{NGe8:function(t,e){},aO3w:function(t,e,r){"use strict";var i={data:function(){return{name:"游客你好"}},computed:{username:function(){var t=this.$utils.getCookie("userName");return t||this.name}},methods:{handleCommand:function(t){"loginout"==t&&(localStorage.removeItem("ms_username"),this.$router.push("/l...
#: Default queue for discovery / announce tasks #: myr.discovery consumes this queue by default therefore handling announce #: tasks of myr.base workers and discovery tasks of myr.client discovery_queue = 'myr.discovery'
import numpy as np from ..core import indexing from ..core.utils import Frozen, FrozenDict, close_on_error from ..core.variable import Variable from .common import ( BACKEND_ENTRYPOINTS, AbstractDataStore, BackendArray, BackendEntrypoint, _normalize_path, ) from .file_manager import CachingFileMana...
from bandit.envs.continuous_armed_bandit import ContBanditEnv
/** ****************************************************************************** * @file stm32l0xx_hal_smbus.h * @author MCD Application Team * @brief Header file of SMBUS HAL module. ****************************************************************************** * @attention * * <h2><cen...
// // Generated by classdumpios 1.0.1 (64 bit) (iOS port by DreamDevLost)(Debug version compiled Sep 26 2020 13:48:20). // // Copyright (C) 1997-2019 Steve Nygard. // #import <objc/NSObject.h> #import "APSConnectionDelegate-Protocol.h" @class APSConnection, NSString; @interface MSDPushNotificationHandler : NSO...
''' http://insight.bitpay.com/ ''' import logging from lib import config, util def get_host(): if config.BLOCKCHAIN_SERVICE_CONNECT: return config.BLOCKCHAIN_SERVICE_CONNECT else: return 'http://localhost:3001' if config.TESTNET else 'http://localhost:3000' def check(): result = util.get_...
const Discord = require("discord.js") const { MessageButton } = require('discord-buttons'); const config = require("../config.js") module.exports.run = async (client, message, args, embed) => { var guild = message.guild; var kickleyen = message.author.tag; const user = message.mentions.members.first() || ...
#!/usr/bin/python3 ### ### Automatic seeding over HTTP ### (C) 2016 Alex D. ### ### http://www.gnu.org/licenses/agpl-3.0.en.html ### import os import sys import json import random import platform import urllib.request sources = [''] data = urllib.request.urlopen(random.choice(sources)).readall(); if 'norpc' in s...
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # $Id$ # # Project: GDAL/OGR Test Suite # Purpose: Test read/write functionality for XYZ driver. # Author: Even Rouault <even dot rouault at mines dash paris dot org> # ####################...
""" @author: David Lei @since: 19/10/2017 """ import functools def permuate(string, permutation_holder, call_num): """Order is important in permutations. For a string of length n there are n! permutations. Args: call_num: used to help understand the complexity of the algorithm for each call print...
import datetime import email import ipaddress import pprint from os import environ import jwt import pydantic from api.controllers.student import field_update_controller from api.drivers.student import student_drivers from api.middlewares import authentication_middleware from api.models.student import student_model f...
from ..config import dp from ..lib import handlers from ..lib.habr import Habr @dp.message_handler(commands=["habr"]) @handlers.parse_arguments(2) async def habr(message, params): try: id_ = int(params[1]) except ValueError: await message.reply("Введи валидный id поста") h = Habr() ...
// Copyright 2020 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. #ifndef CHROME_BROWSER_PROFILES_SCOPED_PROFILE_KEEP_ALIVE_H_ #define CHROME_BROWSER_PROFILES_SCOPED_PROFILE_KEEP_ALIVE_H_ class Profile; enum class Profi...
""" WSGI config for galery project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTI...
import os import sys import warnings import numpy.distutils.system_info def _check_python_350(): if sys.version_info[:3] == (3, 5, 0): if not int(os.getenv('CHAINER_PYTHON_350_FORCE', '0')): msg = """ Chainer does not work with Python 3.5.0. We strongly recommend to use another versi...
import React from 'react' import styled from 'styled-components' import { Flex, Box, Card, BackgroundImage, Heading, Text, Button, Divider, Icon } from 'pcln-design-system' import PageTitle from './PageTitle' import Pre from './Pre' import Markdown from './Markdown' import Container from './Container'...
import FWCore.ParameterSet.Config as cms from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer siStripCMMonitor = DQMEDAnalyzer( "SiStripCMMonitorPlugin", #Raw data collection RawDataTag = cms.untracked.InputTag('source'), #Folder in DQM Store to write global histograms to HistogramFolderName = ...
import React from 'react' import Button from './Button' import styled from '@emotion/styled' import { FiMoon, FiSun } from 'react-icons/fi' import { useTheme } from '../Theming' const DarkMode = styled(FiMoon)({ display: 'flex', alignItems: 'center', justifyContent: 'center', margin: '0', }) const DefaultMode...
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
from django.conf.urls import url from views import json_echo_view_function, JsonEchoViewClass # from drf_views import DrfJsonEchoViewClass urlpatterns = [ url(r'^$', json_echo_view_function, name='echo'), url(r'^alt/$', JsonEchoViewClass.as_view(), name='alt'), # url(r'^drf/$', DrfJsonEchoViewClass.as_vie...
import json json_data = {"name": "Midi satin skirt", "price": 89.99, "color": "black", "size": ["XS", "S - Not available I want it!", "M", "L - Not available I want it!", "XL"]} # saving json file with parties dictionary with open("data_test_set.json".format(1), "w", encoding="utf-8") as file: json.dump(json_dat...
from __future__ import annotations from typing import Optional, TYPE_CHECKING from spark_auto_mapper_fhir.fhir_types.list import FhirList from spark_auto_mapper_fhir.fhir_types.string import FhirString from spark_auto_mapper_fhir.extensions.extension_base import ExtensionBase from spark_auto_mapper_fhir.base_types.fh...