text
stringlengths
3
1.05M
import { JSONResponse } from '../utils/json-response.js' import * as cluster from '../cluster.js' import { validate } from '../utils/auth-v1.js' import { parseCidPinning } from '../utils/utils.js' import { toPinsResponse } from '../utils/db-transforms.js' /** @type {import('../utils/router.js').Handler} */ export asyn...
# qubit number=5 # total number=63 import cirq import qiskit from qiskit import IBMQ from qiskit.providers.ibmq import least_busy from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import FakeVigo from ma...
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- from collections import OrderedDict import numpy as np from astropy.modeling import models from astropy.modeling.core import Model from astropy.utils.misc import isiterable from asdf.tags.core.ndarray import NDArrayType from asdf_...
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = undefined; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { ...
from .user import UserSerializer from .branch import BranchSerializer from .branch_schedule import BranchScheduleSerializer __all__ = ['UserSerializer', 'BranchSerializer', 'BranchScheduleSerializer']
var searchData= [ ['info_5farch_29',['info_arch',['../_c_make_c_compiler_id_8c.html#a59647e99d304ed33b15cb284c27ed391',1,'info_arch():&#160;CMakeCCompilerId.c'],['../_c_make_c_x_x_compiler_id_8cpp.html#a59647e99d304ed33b15cb284c27ed391',1,'info_arch():&#160;CMakeCXXCompilerId.cpp']]], ['info_5fcompiler_30',['info_c...
// // Generated by class-dump 3.5 (64 bit) (Debug version compiled Mar 11 2021 20:53:35). // // Copyright (C) 1997-2019 Steve Nygard. // #import <Flexo/FFShareDestination.h> @interface FFShareLoadingDestination : FFShareDestination { } + (id)sharedShareLoadingDestination; - (BOOL)isEditable; - (void)dealloc; - ...
/* Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.dialog.add( 'checkbox', function( editor ) { return { title : editor.lang.checkboxAndRadio.checkboxTitle, minWidth : 350, minHeight : 140, onShow : function...
# flake8: noqa from typing import Dict, List, Any, Optional, cast, TYPE_CHECKING import pystac from pystac.serialization.identify import STACVersionID, identify_stac_object from pystac.validation.schema_uri_map import OldExtensionSchemaUriMap from pystac.utils import make_absolute_href if TYPE_CHECKING: from pyst...
/** * @license Angular v7.2.13 * (c) 2010-2019 Google LLC. https://angular.io/ * License: MIT */ import { NoopAnimationPlayer, ɵAnimationGroupPlayer, ɵPRE_STYLE, AUTO_STYLE, sequence, style } from '@angular/animations'; import { Injectable } from '@angular/core'; /** * @fileoverview added by tsickle * @suppress...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from shop.models import order class OrderShipping(order.BaseOrderShipping): """Default materialized model for OrderShipping"""
const mongoose = require('mongoose'); const Phase = require('../models/Phase'); exports.getPhaseTypeNameForMatchId = async (tournamentId, matchId) => { const identifier = await Phase.findOne({ tournamentId: mongoose.Types.ObjectId(tournamentId), 'matches._id': matchId } ); r...
"""Tests for the PiCN Interfaces"""
# units.py # Jacob Hummel """ Physical cgs unit conversions for analyzing my Gadget2 HDF5 snapshot data. """ ### Unit Selection Dictionaries class Units(object): def __init__(self, **unitargs): super(Units,self).__init__() ### Code units: UnitMass_in_g = unitargs.pop('UnitMass_in_g', 1.9...
""" The rest framework provides us with a base class that we use to make custom permissions classes""" from rest_framework import permissions class UpdateOwnProfile(permissions.BasePermission): """allow users to edit their own profile""" # we add has_object_permissions function , it gets called every ...
import { combineReducers } from 'redux'; // needs to be named `form` or be ready for errors down the road import { reducer as form } from 'redux-form'; import client from './components/Client/reducer'; import signup from './components/Signup/reducer'; import login from './components/Login/reducer'; import chatMessages ...
'use strict'; var regTransformTypes = /matrix|translate|scale|rotate|skewX|skewY/, regTransformSplit = /\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/, regNumericValues = /[-+]?(?:\d*\.\d+|\d+\.?)(?:[eE][-+]?\d+)?/g; /** * Convert transform string to JS representation. * * @param {...
import React from "react"; function ListItem(props) { return ( <li> <img src={props.image} alt={props.alt} /> <h3>{props.heading}</h3> <p>{props.content}</p> </li> ); } export default ListItem;
#!/usr/bin/python import sys import IPO import random #objectiveType = 'weights' #objectiveType = 'random' #objectiveType = '0/1-random' objectiveType = '0/-1-random' objectiveZeroProbability = 0.5 N = 10000 V = range(10) E = [ (i,j) for i in xrange(len(V)) for j in xrange(i+1,len(V)) ] # Write LP. fileName = '/t...
/* * GridGain Community Edition Licensing * Copyright 2019 GridGain Systems, Inc. * * Licensed under the Apache License, Version 2.0 (the "License") modified with Commons Clause * Restriction; you may not use this file except in compliance with the License. You may obtain a * c...
/* * This file is part of the MicroPython project, http://micropython.org/ * * The MIT License (MIT) * * Copyright (c) 2016 Scott Shawcroft * * 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 S...
import threading from typing import Callable class Animation(threading.Thread): LOCK = threading.Lock() def __init__(self, draw_function: Callable[[], None]): super().__init__() self.__draw_function: Callable[[], None] = draw_function def draw_screen(self): if self.LOCK.acquire(b...
# This file is where you keep secret settings, passwords, and tokens! # If you put them in the code you risk committing that info or sharing it secrets = { 'ssid' : 'CHANGE ME', 'password' : 'CHANGE ME', # leave blank or use timezone from # http://worldtimeapi.org/timezones 'timezone' : '', 'aio_us...
from typing import Callable, Generator, Tuple def get_run_generator(test_data: Tuple[str]) -> Callable[[], str]: test_data_gen: Generator[str, None, None] = (line for line in test_data) def generate_input() -> str: return next(test_data_gen) return generate_input
from bangtal.game import EventID from bangtal.game import MouseAction from bangtal.game import GameOption from bangtal.game import GameServer from bangtal.scene import Scene from bangtal.object import Object from bangtal.object import ObjectManager from bangtal.timer import Timer from bangtal.sound import Sound class...
# -*- coding: utf-8 -*- # @Time : 19-8-28 上午9:59 # @Author : Redtree # @File : s_game_play_stage1.py # @Desc : 选择移动对象阶段 from logic import loader from data import player_runtime from data import color_rgb import pygame import random def dojob(x,y,is_mouse_down,cheros,keys): # 结果显示在左下角 csz = pygame.tr...
"use strict"; function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.ap...
# 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 ...
import React, {Suspense} from 'react'; import logo from './logo.svg'; import './App.css'; // import User from "./User"; const User = React.lazy(() => import('./User')); function App() { return ( <div className="App"> <header className="App-header"> <img src={`${process.env.REACT_APP_CONTENT_HOST}...
from flask import Flask, request, jsonify from pyknow import Fact from maximum_example import compute_max from robot_example import TrafficLight, robot app = Flask(__name__) @app.route('/example/robot/', methods=['POST']) def pyknow_example(): """ Receives a traffic light color and passes it to the robot e...
from django.conf.urls import url from . import views from django.conf.urls.static import static from django.conf import settings urlpatterns=[ url('^$',views.home_page,name = 'home_page'), url(r'^edit$', views.edit, name='edit_profile'), url(r'^upload/$', views.upload_business, name='upload_business'), ...
# # This file is part of LiteSPI # # Copyright (c) 2020 Antmicro <www.antmicro.com> # SPDX-License-Identifier: BSD-2-Clause import unittest from migen import * from litespi.core.mmap import LiteSPIMMAP from litespi.common import * from litespi.opcodes import SpiNorFlashOpCodes as Codes from litespi.spi_nor_flash_mod...
#! /usr/bin/env python # File: curly.py # Author: Mae Morella # # A very simple HTTPS client, using the Python requests module # Extends the code in requests_client.py import sys import requests import argparse import logging import pprint # Take URL and file input by parsing command-line args parser = argparse.Argu...
deepmacDetailCallback("5c857e200000/28",[{"d":"2020-05-20","t":"add","s":"ieee-mam.csv","a":"Limited Flat/RM 705A, 7/F, New East Ocean Centre No. 9 Science Museum Road Kowloon Hong Kong CN 000000","c":"CN","o":"mobilogix HongKong"}]);
import asyncio import pytest from click.testing import CliRunner pytest.importorskip("requests") import os import socket from multiprocessing import cpu_count from time import sleep import requests import distributed.cli.dask_worker from distributed import Client, Scheduler from distributed.compatibility import LI...
require('./lib/build');
import flask from flask_coralillo import Coralillo import unittest class InitTestCase(unittest.TestCase): def setUp(self): self.app = flask.Flask(__name__) def test_constructor(self): """Test that a constructor with app instance will initialize the connection""" coralillo = C...
var Parse = require('parse').Parse; var ParseReact = require('parse-react'); var appConstants = require('../constants/appConstants'); var sessionUtils = require('./sessionUtils'); var githubUtils = require('./githubUtils'); var https = require('https'); var parseUtils = { // function for server side code // to cal...
// Execute the callback for each property in source then return a new object with the same properties as source. export const map = (source, callback) => Object.keys(source).reduce((reducer, prop) => { reducer[prop] = callback(source[prop], prop); return reducer; }, {}); // For each property in source, execute...
/** * Please refer to the following files in the root directory: * * README.md For information about the package. * LICENSE For license details, copyrights and restrictions. */ import { BaseCalc, WtCalculatorError } from './baseCalc'; /** * O'Conner 1RM calculator. */ export default class OCon...
from __future__ import absolute_import from __future__ import division import torch from torch import nn from torch.nn import functional as F import torchvision __all__ = ['ResNet50', 'ResNet101', 'ResNet50M'] class ResNet50(nn.Module): def __init__(self, num_classes, loss={'xent'}, **kwargs): super(Re...
import logging, copy import mythril.laser.ethereum.util as helper class TaintRecord: """ TaintRecord contains tainting information for a specific (state, node) the information specifies the taint status before executing the operation belonging to the state """ def __init__(self): """ Buil...
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE124_Buffer_Underwrite__char_alloca_cpy_68a.c Label Definition File: CWE124_Buffer_Underwrite.stack.label.xml Template File: sources-sink-68a.tmpl.c */ /* * @description * CWE: 124 Buffer Underwrite * BadSource: Set data pointer to before the allocated memory buffer ...
import shutil import os import logging from packaging import version import unittest import numpy as np import bilby import scipy from scipy.stats import ks_2samp, kstest def ks_2samp_wrapper(data1, data2): if version.parse(scipy.__version__) >= version.parse("1.3.0"): return ks_2samp(data1, data2, alter...
""" Work with subtractions in the database. """ import asyncio import glob import shutil from typing import Any, Dict, List, Optional from sqlalchemy.ext.asyncio import AsyncEngine import virtool.utils from virtool.config.cls import Config from virtool.db.utils import get_new_id, get_one_field from virtool.subtracti...
""" Scatter Plot with Minimap ------------------------- This example shows how to create a miniature version of a plot such that creating a selection in the miniature version adjusts the axis limits in another, more detailed view. """ # category: scatter plots import altair as alt from vega_datasets import data sourc...
#pragma once enum class ClassId { C4 = 34, Chicken = 36, CSPlayer = 40, Deagle = 46, Knife = 107, KnifeGG, PlantedC4 = 128, Aug = 231, Awp, Elite = 238, FiveSeven = 240, G3sg1, Glock = 244, P2000, P250 = 257, Scar20 = 260, Sg553 = 264, Ssg08 = 266, Tec9 = 268 };
import React from "react"; import { render } from "@testing-library/react"; import { ThemeContext } from "./context/contexts"; import UserContext, { ANONYMOUS_USER } from "./context/user/context"; function MutationObserver(callback) { this.observe = jest.fn(); this.disconnect = jest.fn(); this.takeRecords = j...
/** * Renders a markdown string as html. */ import Remarkable from 'remarkable'; const md = constructRemarkableRenderer(); export default function renderMarkdown(string) { return md.render(string); } function constructRemarkableRenderer() { const md = new Remarkable({ linkify: true }); md.use(inlineYo...
import { h } from 'vue' export default { name: "Toggle2Off", vendor: "B", type: "", tags: ["toggle2","off"], render() { return h( "svg", {"xmlns":"http://www.w3.org/2000/svg","width":"16","height":"16","fill":"currentColor","class":"v-icon","viewBox":"0 0 16 16","data-name":"b-toggle2-off","in...
from django.contrib import admin from django.contrib.auth.admin import UserAdmin as BaseAdmin from django.utils.translation import gettext as _ from core import models class UserAdmin(BaseAdmin): ordering = ['id'] list_display = ['email', 'name'] fieldsets = ( (None, {'fields': ('email', 'passwor...
/** * SEO component that queries for data with * Gatsby's useStaticQuery React hook * * See: https://www.gatsbyjs.org/docs/use-static-query/ */ import { graphql, useStaticQuery } from 'gatsby' import PropTypes from 'prop-types' import React from 'react' import Helmet from 'react-helmet' function SEO({ descripti...
/* * ESPRESSIF MIT License * * Copyright (c) 2021 <ESPRESSIF SYSTEMS (SHANGHAI) CO., LTD> * * Permission is hereby granted for use on all ESPRESSIF SYSTEMS products, in which case, * it is free of charge, to any person obtaining a copy of this software and associated * documentation files (the "Software"), to de...
// Setup the network sockets for the different platforms. #ifndef SOCKETX_H #define SOCKETX_H #ifdef _WIN32 #include <winsock.h> #pragma comment(lib, "ws2_32.lib") // Include the wsock32 (version 2) library, automatically on Windows builds. typedef int socklen_t; #pragma warning(disable: 4127) // incompatible with FD_...
/** @license React v0.13.4 * scheduler.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use strict';Object.defineProperty(exports,"__esModule",{value:!0});var d...
''' Progress class for modules. Represents where a student is in a module. For most subclassing needs, you should only need to reimplement frac() and __str__(). ''' import numbers class Progress: # pylint: disable=eq-without-hash '''Represents a progress of a/b (a out of b done) a and b must be numeric,...
import logging from gym.envs.registration import register logger = logging.getLogger(__name__) register( id="EnFrSNmtEnv-v0", entry_point="fairseq.RL.env:SNmtEnv" )
#ifndef Podd_BdataLoc_h_ #define Podd_BdataLoc_h_ ////////////////////////////////////////////////////////////////////////// // // BdataLoc // ////////////////////////////////////////////////////////////////////////// #include "THaAnalysisObject.h" #include "TString.h" #include <vector> #include <cassert> #include <s...
/** @jest-environment jsdom */ import { shallow } from '@vue/test-utils'; import PostCss from './fixtures/VuePostCss'; describe('processes .vue file with PostCSS style', () => { it('does not error on pcss/postcss', () => { const wrapper = shallow(PostCss); expect(wrapper.classes()).toContain('testPcss'); ...
import urllib.request, urllib.parse, urllib.error import xml.etree.ElementTree as ET url='http://py4e-data.dr-chuck.net/comments_128455.xmls' uh=urllib.request.urlopen(url) data=uh.read() tree = ET.fromstring(data) counts=tree.findall('comments/comment') print(len(counts)) sum=0 for item in counts: ...
""" Benchmark linalg.sqrtm for various blocksizes. """ from __future__ import division, absolute_import, print_function import numpy as np from numpy.testing import assert_allclose import scipy.linalg class Sqrtm(object): params = [ ['float64', 'complex128'], [64, 256], [32, 64, 256] ...
from dagster import execute_pipeline def test_example_shell_command_solid(): from .example_shell_command_solid import pipe res = execute_pipeline(pipe) assert res.success assert res.result_for_solid('a').output_value() == 'hello, world!\n' def test_example_shell_script_solid(): from .example_sh...
var express = require("express"); var PORT = process.env.PORT || 8080; var app = express(); var dotenv = require("dotenv").config(); app.use(express.static("public")); app.use(express.urlencoded({ extended: true })); app.use(express.json()); var exphbs = require("express-handlebars"); app.engine("handlebars", exphb...
/*++ Copyright (c) 1986-1997 Microsoft Corporation Module Name: stireg.h Abstract: This module contains the STI registry entries Author: Revision History: --*/ #ifndef _STIREG_ #define _STIREG_ #include <winapifamily.h> #pragma region Desktop Family #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESK...
/** * @fileoverview added by tsickle * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ import { Component, EventEmitter, forwardRef, Host, Input, Output } from '@angular/core'; import { Raster } from 'ol/source'; import { RasterOpe...
""" WSGI config for games_logger 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/3.1/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_...
''' @Params: directory of json files and directory of corresponding frames. Make sure that json files has name like <number>.json for example: 897.json and the corresponding image file has name frame_897.jpg TO RUN command: python classify_data_by_angle.py -j <json_files_directory> -f <frames_directory> OUTPU...
# This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild from pkg_resources import parse_version import kaitaistruct from kaitaistruct import KaitaiStruct, KaitaiStream, BytesIO if parse_version(kaitaistruct.__version__) < parse_version('0.9'): raise Exception("Incompati...
from ._abstract import AbstractScraper class Cybercook(AbstractScraper): @classmethod def host(cls): return "cybercook.com.br" def title(self): return self.schema.title() def description(self): return self.schema.description() def total_time(self): return self.sc...
import boto3 import logging import datetime import json from datetime import datetime, timezone from aws_session_management.aws_session_management import AwsSessionManagement logger = logging.getLogger(__name__) class KinesisDataStreamHandler(logging.StreamHandler): def __init__(self, kinesis_stream_name, subsys...
from datetime import date from typing import List, Optional from pydantic import BaseModel, EmailStr, HttpUrl class Model(BaseModel): class Config: @classmethod def alias_generator(cls, value: str) -> str: [word, *words] = value.split("_") return "".join([word] + [word.cap...
#!/usr/bin/env python # Lint as: python3 # -*- encoding: utf-8 -*- """Tests for CSV output plugin.""" from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import csv import io import os import zipfile from absl import app import yaml from grr_response_core.li...
from unittest import TestCase from grab import Grab from grab.error import GrabTooManyRedirectsError from .tornado_util import SERVER from .util import GRAB_TRANSPORT, only_transport class RedirectController(object): def __init__(self, counter): self.setup_counter(counter) def setup_counter(self, cou...
const postController = require('./post') const commentController = require('./comment') const userController = require('./user') const homeController = require('./home') const threadController = require('./thread') const messageController = require('./message') const graphController = require('./graph') module.exports...
# 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 removeLeafNodes(self, root: TreeNode, target: int) -> TreeNode: if not root: return...
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. 'use strict'; var assert = require('chai').assert; var sinon = require('sinon'); var EventEmitter = require('events').EventEmitter; var Amqp = require('../dist/amqp.js...
/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */ (function() {'use strict';function i(a){throw a;}var r=void 0,v=!0,aa=this;function y(a,c){var b=a.split("."),e=aa;!(b[0]in e)&&e.execScript&&e.execScript("var "+b[0]);for(var f;b.length&&(f=b.shift());)!b.length&&c!==r?e[f]=c:e=e...
const ADD_MESSAGE = 'ADD_MESSAGE' const FETCH_MESSAGE = 'FETCH_MESSAGE' const UPDATE_MESSAGE = 'UPDATE_MESSAGE' const DELETE_MESSAGE = 'DELETE_MESSAGE' const FETCH_ALL_CONTACT_MESSAGES = 'FETCH_ALL_CONTACT_MESSAGES' export { ADD_MESSAGE, FETCH_MESSAGE, UPDATE_MESSAGE, DELETE_MESSAGE, FETCH_ALL_CONTACT_MESSAG...
/* eslint-disable */ var icon = require('vue-svgicon') icon.register({ 'dealerships/entertainment': { width: 32, height: 32, viewBox: '0 0 32 32', data: '<path pid="0" d="M15.868 19.874h7.463c.422 0 .643.526.332.811-1.074.977-2.53 1.589-4.063 1.589s-2.989-.612-4.063-1.589c-.312-.286-.091-.811.331-.811...
import { h, Component } from 'preact'; import { Router } from 'preact-router'; import Helmet from 'preact-helmet'; import AppLayout from '../app-layout'; import DrawerFrame from '../../routes/drawer-frame'; import TopAppBarFrame from '../../routes/top-app-bar-frame'; if (module.hot) { require('preact/debug'); } fun...
// Copyright (c) 2011-2017 The Cryptonote developers // Copyright (c) 2017-2018 The Circle Foundation & Conceal Devs // Copyright (c) 2018-2021 Conceal Network & Conceal Devs // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #...
# 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...
ace.define("ace/ext/menu_tools/element_generator",["require","exports","module"], function(require, exports, module) { 'use strict'; module.exports.createOption = function createOption (obj) { var attribute; var el = document.createElement('option'); for(attribute in obj) { if(obj.hasOwnProperty(att...
import mything.microfrontends.hello import mything.microfrontends.counter
from mc.utils.mc_sandbox import McSandbox def main(): sandbox = McSandbox() flow_spec = generate_flow_spec() sandbox.flow_record_client.create_flow_record_from_flow_spec( flow_spec=flow_spec) while sandbox.has_incomplete_items(): sandbox.flow_runner.tick() claimed_jobs = sandbo...
#include <gwrom.h> #include <string.h> #include <errno.h> /* internal flags (1 << 16 to 1 << 23) */ #define GWROM_FREE_DATA ( 1 << 16 ) /****************************************************************************** zlib ******************************************************************************/ #ifdef GWROM_US...
const defaultTheme = require('tailwindcss/defaultTheme'); module.exports = { mode: 'jit', purge: [ './vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php', './vendor/laravel/jetstream/**/*.blade.php', './storage/framework/views/*.php', './resources/vie...
exports.up = function (knex) { return knex.schema.createTable('templates', function (table) { table.increments(); table.string('title').nullable(); table.string('description').nullable(); table.string('before_instructions').nullable(); table.text('instructions').nullable(); table.string('after_instructions')....
import numpy as np import torch from sklearn.metrics import auc import torch.nn.functional as F from explainable_ai_image_measures.irof import IrofDataset from explainable_ai_image_measures.pixel_relevancy import PixelRelevancyDataset class Measures: def __init__(self, model, ba...
// Copyright 2020 Maxime ROUFFET. All Rights Reserved. #pragma once #include <SPlanner/AI/Task/SP_TaskImpl.h> #include "SP_ChainTask.generated.h" /** * Chain of Tasks. */ UCLASS(BlueprintType, Blueprintable, ClassGroup = "SPlanner|Task") class SPLANNER_API USP_ChainTask : public USP_TaskImpl { GENERATED_BODY() p...
#ifndef XMCOMP_NETWORK_H #define XMCOMP_NETWORK_H #include "common.h" typedef struct { int socket; BOOL connected; } Socket; BOOL net_connect(Socket *, char *, int); int net_send(Socket *, char *, int); int net_recv(Socket *, char *, int); void net_disconnect(Socket *); BOOL net_stream(Socket *sock, char *from, c...
from __future__ import unicode_literals, division, absolute_import import logging from flexget import plugin from flexget.event import event from flexget.utils.log import log_once try: from flexget.plugins.api_rottentomatoes import lookup_movie, API_KEY except ImportError: raise plugin.DependencyError(issued_...
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-733c35b2"],{"294d":function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticStyle:{"line-height":"1.8"}},[1==e.qType||2==e.qType?i("div",{directives:[{name:"loading",rawName:"v-loading",value:e.qLo...
""" Closuers Free variables and closures Remember: Functions defined inside another function can access the outer (nonLocal) variables """ def outer(): x = 'python' / this x refers to the one in outer's scope', this nonlocal variable x is called a free varia...
import random from eth2spec.test.helpers.block import ( build_empty_block_for_next_slot, ) from eth2spec.test.helpers.state import ( state_transition_and_sign_block, transition_to, ) from eth2spec.test.helpers.constants import ( MAINNET, MINIMAL, ) from eth2spec.test.helpers.sync_committee import ( ...
export default (() => { let o; return Jymfony.Component.VarExporter.Internal.Hydrator.hydrate( o = [ (new ReflectionClass('Jymfony.Component.DateTime.Internal.RuleSet')).newInstanceWithoutConstructor(), (new ReflectionClass('Jymfony.Component.DateTime.Internal.Rule')).newInstance...
import React from 'react'; import styles from '../css/banner.module.css'; const Banner = ({ title, info, children }) => { return ( <div className={styles.banner}> <h1>{title}</h1> <p>{info}</p> {children} </div> ); }; export default Banner;
"""******************************************************* A python implementation of catsHTM.m ******************************************************""" #print __doc__ import math import tqdm import numpy as np from . import celestial import scipy.io as sio from . import params import os.path import h5py from . impo...
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from gaebusiness.business import Command, CommandSequential, CommandParallel from gaebusiness.gaeutil import SaveCommand, ModelSearchCommand, SingleModelSearchCommand from gaeforms.ndb.form import ModelForm from gaegraph.business_base impo...
from struct import pack, unpack def bit_bool(value): return pack('?', value) def to_bool(value): return unpack('?', value)[0] def sint16(value): return pack('i', value) def to_int(value): return unpack('i', value)[0]