text stringlengths 3 1.05M |
|---|
# -*- coding: utf-8 -*-
import argparse
import inspect
import os
from pprint import pprint
import sys
# add parent directory to sys path to import relative modules
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(currentdir)
sys.path.insert(0,parentdir... |
import Check from "../Core/Check.js";
import defaultValue from "../Core/defaultValue.js";
import defined from "../Core/defined.js";
import DeveloperError from "../Core/DeveloperError.js";
import getAbsoluteUri from "../Core/getAbsoluteUri.js";
import GltfLoaderUtil from "./GltfLoaderUtil.js";
import hasExtension from "... |
// Works with filtering
filterSelection("recent-project") // Execute the function and show all columns
function filterSelection(c) {
var x, i;
x = document.getElementsByClassName("project");
if (c == "all") c = "";
// Add the "show" class (display:block) to the filtered elements, and remove the "show" c... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[1906],{"/lqo":function(e,t,r){"use strict";var n=r("VHp3");r("O9pe"),r("17x9");var o,c=(o=r("q1tI"))&&"object"==typeof o&&"default"in o?o.default:o,a=c.createElement("path",{d:"M9 13H19V15H9z"}),i=c.createElement("path",{d:"M22.45,21A10.87,10.87,0,0,0,25,14,11,11,0,1... |
module.exports= [
{ "key": "aerialway",
"values" : [ { "@id": "drag_lift"} ,
{ "@id": "chair_lift"} ,
{ "@id": "cable_car"} ,
{ "@id": "aerialway_v_station"} ,
{ "@id": "pylon"} ,
{ "@id": "gondola"} ,
{ "@id": "goods"} ] } ,
{ "key": "aeroway",
"value... |
"""Module for deltakere service."""
import logging
from typing import Any, List
class DeltakereService:
"""Class representing deltakere service."""
async def get_all_deltakere(self, db: Any) -> List:
"""Get all deltakere function."""
deltakere = []
cursor = db.deltakere_collection.fin... |
import subprocess
import os
import ccmlib.repository
from ccmlib.common import is_win, get_version_from_build
class DTestConfig:
def __init__(self):
self.use_vnodes = True
self.use_off_heap_memtables = False
self.num_tokens = -1
self.data_dir_count = -1
self.force_execution... |
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[56],{"8f95":function(e,t){},"920f":function(e,t,a){"use strict";var n=a("8f95"),i=a.n(n);t["default"]=i.a},"95d3":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("transition",{attrs:{appear:""... |
"""Multi-consumer multi-producer dispatching mechanism
Originally based on pydispatch (BSD) http://pypi.python.org/pypi/PyDispatcher/2.0.1
See license.txt for original license.
Heavily modified for Django's purposes.
"""
from dispatch.dispatcher import Signal |
/*
* contrib/intarray/_int_bool.c
*/
#include "postgres.h"
#include "miscadmin.h"
#include "utils/builtins.h"
#include "_int.h"
#include "miscadmin.h"
PG_FUNCTION_INFO_V1(bqarr_in);
PG_FUNCTION_INFO_V1(bqarr_out);
Datum bqarr_in(PG_FUNCTION_ARGS);
Datum bqarr_out(PG_FUNCTION_ARGS);
PG_FUNCTION_INFO_V1(boolop);... |
from mesa import Agent, Model
from mesa.time import RandomActivation
from mesa.space import MultiGrid
from mesa.datacollection import DataCollector
def compute_gini(model):
agent_wealths = [agent.wealth for agent in model.schedule.agents]
x = sorted(agent_wealths)
N = model.num_agents
B = sum(xi * (N ... |
# 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 tensorflow as tf
import numpy as np
import sys
from tensorflow.examples.tutorials.mnist import input_data
sys.path.append("/data")
mnist = input_data.read_data_sets("MNIST_data/", one_hot=True)
print(mnist.train.images.shape, mnist.train.labels.shape)
print(mnist.test.images.shape, mnist.test.labels.shape)
pri... |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'blockquote', 'hr', {
toolbar: 'Blockquote'
});
|
module.exports={A:{A:{"2":"J C G E B A TB"},B:{"2":"D X g H L"},C:{"1":"m n o p q r w x v","2":"0 1 2 4 RB F I J C G E z t s PB OB","132":"L M N O P Q R S T U V W u Y Z a b c d e f K h i j k l","164":"B A D X g H"},D:{"1":"0 2 4 8 h i j k l m n o p q r w x v z t s DB AB SB BB","2":"F I J C G E B A D X g H L M N O P Q R... |
import SwitchComponent from './switch-component.js';
export const SwitchControl = wp.customize.KadenceControl.extend( {
renderContent: function renderContent() {
let control = this;
ReactDOM.render(
<SwitchComponent control={control}/>,
control.container[0]
);
}
} );
|
#!/usr/bin/env node
const childProcess = require('child_process')
const crypto = require('crypto')
const fs = require('fs')
const { hashElement } = require('folder-hash')
const path = require('path')
const unknownFlags = []
const args = require('minimist')(process.argv, {
string: ['runners'],
unknown: arg => unkn... |
#!/usr/bin/env python
import base_filters
COPY_GOOGLE_DOC_KEY = '1DZv9_GXRjZXz4K_EQaQSirSCUuYY9xGv3rwM3c1W304'
USE_ASSETS = False
# Use these variables to override the default cache timeouts for this graphic
# DEFAULT_MAX_AGE = 20
# ASSETS_MAX_AGE = 300
JINJA_FILTER_FUNCTIONS = base_filters.FILTERS
|
#-------------------------------------------------------------------------------
# Copyright 2017 Cognizant Technology Solutions
#
# 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:... |
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @providesModule EventSubscription
* @flow
*/
'use strict';
import type EventSubscriptionVendor from 'EventSubscriptionVendor';
/**
... |
# SPDX-License-Identifier: MIT OR Apache-2.0
# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the MIT License. See the LICENSE file in the root of this
# repository for complete details.
import asyncio
import secrets
import pytest
import structlog
from structlog.contextvars im... |
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import glob
import os.path
class Elfutils(AutotoolsPackage, SourcewarePackage):
"""elfutils is a... |
# from django.urls import path
# from Projeto_Joaninha.pedidos import views as v
# app_name="pedidos"
# urlpatterns=[
# path('',v.pedidos_list,name='pedidos_list'),
# path('<int:pk>/',v.pedidos_detail,name='pedidos_detail'),
# ]
from django.urls import path
from Projeto_Joaninha.pedidos import views as v
ap... |
// SPDX-License-Identifier: GPL-2.0
// Copyright (C) 2005-2017 Andes Technology Corporation
#include <linux/sched.h>
#include <linux/sched/debug.h>
#include <linux/sched/task_stack.h>
#include <linux/delay.h>
#include <linux/kallsyms.h>
#include <linux/uaccess.h>
#include <asm/elf.h>
#include <asm/proc-fns.h>
#include... |
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global.Dashboard20 = factory());
}(this, (function () { 'use strict';
var _20 = {
elem: 'svg',
attrs: {
xmlns: ... |
from typing import Tuple
import jax.numpy as np
from jax.nn import softmax, softplus
from pzflow.bijectors.bijectors import (
Bijector,
Bijector_Info,
Chain,
ForwardFunction,
InitFunction,
InverseFunction,
Roll,
)
from pzflow.utils import DenseReluNetwork
def _RationalQuadraticSpline(
... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""This script provides the common methods and data structures that are generally used in the project."""
import os
import re
import numpy as np
import pandas as pd
import torch
from rdkit import Chem, DataStructs, rdBase
from rdkit.Chem import AllChem
from rdkit.Chem.Sc... |
'use strict'
process.env.BABEL_ENV = 'web'
const path = require('path')
const webpack = require('webpack')
const BabiliWebpackPlugin = require('babili-webpack-plugin')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const HtmlWebpackPlugin = re... |
SMLTOWN.Util = {
getById: function(array, id) {
for (var i = 0; i < array.length; i++) {
if (array[i].id == id) {
return array[i];
}
}
return false;
}
,
getViewport: function() {
// var e = window, a = 'inner';
// ... |
'use strict';
var multer = require('multer');
module.exports = {
app: {
title: 'Time Attendance',
description: '',
keywords: 'Time Attendance',
googleAnalyticsTrackingID: process.env.GOOGLE_ANALYTICS_TRACKING_ID || 'GOOGLE_ANALYTICS_TRACKING_ID'
},
port: process.env.PORT || 3... |
import React from "react";
import TextFieldBase from "./TextFieldBase";
import useTextFieldStyles from "./textFieldStyles";
const SmallTextField = (props) => {
const classes = useTextFieldStyles();
return (
<TextFieldBase
classes={{
root: classes.inputField,
}}
fullWidth
variant="outlined"
Input... |
from unittest import TestCase
from OO.carro import Motor, Direcao
class CarroTestCase(TestCase):
# Motor
def teste_velocidade(self):
motor = Motor()
self.assertEqual(0, motor.velocidade)
def teste_acelerar(self):
motor = Motor()
motor.acelerar()
self.assertEqual(1... |
!function(e){function t(t){for(var o,s,a=t[0],l=t[1],c=t[2],h=0,u=[];h<a.length;h++)s=a[h],Object.prototype.hasOwnProperty.call(i,s)&&i[s]&&u.push(i[s][0]),i[s]=0;for(o in l)Object.prototype.hasOwnProperty.call(l,o)&&(e[o]=l[o]);for(d&&d(t);u.length;)u.shift()();return r.push.apply(r,c||[]),n()}function n(){for(var e,t... |
from __future__ import absolute_import, division, print_function
from collections import namedtuple
from libtbx.phil import parse
from dials.algorithms.refinement import DialsRefineConfigError
from scitbx.array_family import flex
from scitbx import sparse
from dials.algorithms.refinement.restraints.restraints import... |
/**
* \file
*
* \brief SAM Clock Driver
*
* Copyright (C) 2012-2014 Atmel Corporation. All rights reserved.
*
* \asf_license_start
*
* \page License
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met... |
var rulesets = {
'input[type="text"]': {
blur: function(e) { if (this.value == '') this.value = this.defaultValue; },
focus: function(e) { if (this.value == this.defaultValue) this.value = ''; },
change: function(e) { if (this.value == '') this.style.border = '2px solid #f00'; else this.style.cssText = ''; },
... |
# sqlalchemy_teradata/base.py
# Copyright (C) 2015-2016 by Teradata
# <see AUTHORS file>
#
# This module is part of sqlalchemy-teradata and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
import re
from sqlalchemy import *
from sqlalchemy.sql import compiler
from sqlalchemy.engi... |
import torchvision.datasets as datasets
from torch.utils.data import Dataset, DataLoader
from torchvision import transforms
from torchvision.datasets import VisionDataset
import torch
import numpy as np
class MyDataset(Dataset):
def __init__(self, data, target, train, transform=None):
self.data = data
... |
# -*- coding:utf-8 -*-
__author__ = 'Edwin.Wu'
__date__ = '2017/3/11 00:19'
import xadmin
from .models import CityDict, CourseOrg, Teacher
class CityDictAdmin(object):
list_display = ['name', 'desc', 'add_time']
search_fields = ['name', 'desc', 'add_time']
list_filter = ['name', 'desc', 'add_time']
cl... |
// http://mrl.nyu.edu/~perlin/noise/
var ImprovedNoise = function () {
var p = [ 151, 160, 137, 91, 90, 15, 131, 13, 201, 95, 96, 53, 194, 233, 7, 225, 140, 36, 103, 30, 69, 142, 8, 99, 37, 240, 21, 10,
23, 190, 6, 148, 247, 120, 234, 75, 0, 26, 197, 62, 94, 252, 219, 203, 117, 35, 11, 32, 57, 177, 33, 88, 2... |
///////////////////////////////////////////////////////////////////////////
// Copyright © 2014 Esri. 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://w... |
'use strict';
const Header = require('./header.page.js');
class EntertainmentPage extends Header {
constructor() {
super();
this['body header h1'] = element(by.css('h1'));
this['body results'] = element(by.css('#results-wrapper'));
this['path'] = 'en/entertainment.html';
}
}
c... |
/**
* Created by tobias on 14.10.15.
*/
$(function() {
// sets the trigger for the profile modal window
$("#showProfile").on("click", showProfile);
// set the trigger for clicking "Passwort ändern"
$("#showPW").on("click", showPW);
});
/**
* Function shows the user profile modal window and sets fo... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# (c) The James Hutton Institute 2017-2019
# (c) University of Strathclyde 2019-2020
# Author: Leighton Pritchard
#
# Contact:
# leighton.pritchard@strath.ac.uk
#
# Leighton Pritchard,
# Strathclyde Institute for Pharmacy and Biomedical Sciences,
# 161 Cathedral Street,
# ... |
from datetime import timedelta
from allauth.account.models import EmailAddress
from django.contrib.auth.models import User
from django.contrib.messages import constants as message_const
from django.http.response import HttpResponseRedirect
from django.test import TestCase
from django.urls import reverse
from django.u... |
'''While new node types are generally created within the initializePlugin
call of a plugin, there is actually no requirement that this is the case.
Pymel therefore needs to be able to handle nodes created at any time - at least
for pymel.nodetypes.MyNodeType style access - so this plugin allows dynamic
node creation at... |
/****************************************************************************
* Copyright 2017 Gorgon Meducer (Email:embedded_zhuoran@hotmail.com) *
* *
* Licensed under the Apache License, Version 2.0 (the "License"); *
* you m... |
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var config_1 = __importDefault(require("../../config"));
var AWS_DYNAMODB_READ_CAPACITY_UNITS = config_1... |
import os
import re
import sys
import logging
import platform
try:
os.environ['NON_PRODUCTION_CONTEXT']
except:
if platform.system() == 'Darwin':
application = r'Nuke\d+\.\d+v\d+.app'
elif platform.system() == 'Windows':
application = r'Nuke\d+\.\d+.exe'
else:
raise RuntimeError... |
export { default as Image } from './Image'
export { default as Logo } from './Logo'
|
$(document).ready(function(){
$("#formu-editar-grader").submit(function (e) {
e.preventDefault()
var datos = new FormData($(this)[0])
$.ajax({
url: 'ajax/ajaxGrader.php',
type: 'POST',
data: datos,
processData: false,
contentType: false,
success: function(respuesta) {
console.log(respuesta... |
# encoding: utf8
from unittest import TestCase
import alex.applications.PublicTransportInfoCS.hdc_policy as hdc_policy
from alex.utils.config import Config, as_project_path
import alex.applications.PublicTransportInfoCS.directions as directions
import alex.utils
from alex.components.dm.dddstate import DeterministicD... |
import React from 'react';
import {View, Text, StyleSheet} from 'react-native';
const Scaffold = () => {
return (
<View style={styles.container}>
<Text style={styles.text}> Scaffold Screen </Text>
</View>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
... |
from __future__ import division
import numpy as np
import scipy as sp
import cvxpy as cp
import itertools, sys, pdb
class FTOCP(object):
""" Finite Time Optimal Control Problem (FTOCP)
Methods:
- solve: solves the FTOCP given the initial condition x0, terminal contraints (optinal) and terminal cost (optional)
-... |
#pragma once
#include <fcntl.h>
#include <unistd.h>
#include <algorithm>
#include <atomic>
#include <chrono>
#include <csignal>
#include <ctime>
#include <map>
#include <memory>
#include <string>
#include <thread>
#ifndef sighandler_t
typedef void (*sighandler_t)(int sig);
#endif
void set_thread_name(const char* na... |
"""Miscellaneous methods not covered in the documentation."""
class Misc:
def verify(self, case='', level='', **kwargs):
"""Enter the verification run mode.
.. note::
This command is only valid at the ``/BEGIN`` level, obtained
with ``mapdl.finish()``.
Parameters
... |
'use strict'
// Setup
import gravity from './../index-es6.js'
var sun = document.getElementById('sun')
var earth = document.getElementById('earth')
var testCss = 'position:fixed;top:0;left:0;bottom:0;right:0;visibility:hidden;'
var testElId = 'youbemysun-test-el'
var testEl = document.getElementById(testElId)
var step... |
# Copyright 2015-2016 Palo Alto Networks, 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... |
/* select - Module containing unix select(2) call.
Under Unix, the file descriptors are small integers.
Under Win32, select only exists for sockets, and sockets may
have any value except INVALID_SOCKET.
*/
#include "Python.h"
#include <structmember.h>
#ifdef HAVE_SYS_DEVPOLL_H
#include <sys/resource.h>
#incl... |
from graph import Graph
def test_maximum_flow():
""" [2] ----- [5]
/ + / | +
[1] [4] | [7]
+ / + | /
[3] ----- [6]
"""
edges = [
(1, 2, 18),
(1, 3, 10),
(2, 4, 7),
(2, 5, 6),
(3, 4, 2),
(3, 6, 8),
(4, 5, ... |
/**
* Layout component that queries for data
* with Gatsby's useStaticQuery component
*
* See: https://www.gatsbyjs.com/docs/use-static-query/
*/
import * as React from "react"
import PropTypes from "prop-types"
import { useStaticQuery, graphql } from "gatsby"
import Header from "./Header"
import "./layout.css"
... |
module.exports = async () => {
/*******************************************
*** Set up
******************************************/
require("dotenv").config();
const Web3 = require("web3");
const HDWalletProvider = require("@truffle/hdwallet-provider");
// Contract abstraction
const truffleContract = ... |
import React from 'react';
import { useNavigation } from '@react-navigation/native';
import styled from 'styled-components';
import { useDispatch, useSelector } from 'react-redux';
import * as Progress from 'react-native-progress';
import { pickFile } from './uploadMedia';
import { theme } from '../../../../constants/... |
#!/usr/bin/env python3
"""
A tool for extracting useful information from youtube video's, like comments, or subtitles.
Author: Willem Hengeveld <itsme@xs4all.nl>
"""
import urllib.request
import urllib.parse
import http.cookiejar
import re
import json
import sys
import html
import datetime
from collections import de... |
from torch.utils.data import DataLoader, ConcatDataset, Subset
def get_transform(dataset):
if isinstance(dataset, DataLoader):
return get_transform(dataset.dataset)
if isinstance(dataset, ConcatDataset):
return get_transform(dataset.datasets[0])
if isinstance(dataset, Subset):
retur... |
# Builtins
import logging
import copy
# External libs
import numpy as np
# Locals
import oggm.cfg as cfg
from oggm import utils
from oggm import entity_task
import oggm.core.massbalance as mbmods
from oggm.core.flowline import FluxBasedModel
# Constants
# Module logger
log = logging.getLogger(__name__)
def _find_... |
/**
* Functions related to the homepage.
*
* @author Zsolt Molnar <zmolnar@sessiondigital.de>
* */
var _HDM_Productpage = (function($) {
'use strict';
return {
mediaSliderInited: false,
mediaGalleryInited: false,
tabsInited: false,
relatedBoxInited: false,
/* Initia... |
import {createAppContainer} from 'react-navigation';
import {createStackNavigator} from 'react-navigation-stack';
import Main from './pages/Main';
import User from './pages/User';
const Routes = createAppContainer(
createStackNavigator(
{
Main,
User,
},
{
headerLayoutPreset: 'center',
... |
/*
* jQuery UI Button 1.8.2
*
* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
* http://docs.jquery.com/UI/Button
*
* Depends:
* jquery.ui.core.js
* jquery.ui.widget.js
*/
(function(a){var g,i=function(b){a("... |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
DWF Python Example
Modified by: MURAMATSU Atsushi <amura@tomato.sakura.ne.jp>
Revised: 2016-04-21
Original Author: Digilent, Inc.
Original Revision: 8/21/2014
Requires:
Python 2.7, 3.3 or later
"""
import dwf
impor... |
from http.server import BaseHTTPRequestHandler, HTTPServer
import cgi
class webserverHandler(BaseHTTPRequestHandler):
#Handles HTTP requests for HTTPServer
def do_GET(self):
try:
if self.path.endswith("/hello"): #path contains URL sent by the client
self.send_response(200) #response code 200 indicates succ... |
# coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.12.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re... |
"""Utilities that interact with IDA."""
import idaapi
import idc
import idautils
from ._service import Service
from ._comment_handler import CommentHandlers
from ._ctyperewriter import Rewriter
service = Service()
comment = CommentHandlers()
rewriter = Rewriter()
def addresses():
"""Generate all mapped address... |
'use strict'
const Imap = require('imap')
const PROMISIFIED_METHODS = ['openBox', 'search']
const promisify = (fn, self) => (...args) => new Promise((ok, fail) =>
fn.call(self, ...args, (err, res) =>
err ? fail(err) : ok(res)
)
)
module.exports = options => {
const client = new Imap(options)
PROMISIFIED_METHO... |
/* ----------------------------------------------------------------------------
* GTSAM Copyright 2010, Georgia Tech Research Corporation,
* Atlanta, Georgia 30332-0415
* All Rights Reserved
* Authors: Frank Dellaert, et al. (see THANKS for the full author list)
* See LICENSE for the license information
* ----... |
/**
* Copyright 2020 The Magma Authors.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import simplejson as json
from alipay.aop.api.constant.ParamConstants import *
class AlipayTradeFastpayEteDidiPayModel(object):
def __init__(self):
self._body = None
self._extend_params = None
self._login_id = None
self._login_passwd ... |
/**
* @license
* Copyright (c) 2018 amCharts (Antanas Marcelionis, Martynas Majeris)
*
* This sofware is provided under multiple licenses. Please see below for
* links to appropriate usage.
*
* Free amCharts linkware license. Details and conditions:
* https://github.com/amcharts/amcharts4/blob/master/LICENSE
*... |
import { h } from 'vue'
export default {
name: "Rust",
vendor: "Fa",
type: "Brand",
tags: ["rust"],
render() {
return h(
"svg",
{"xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 512 512","class":"v-icon","fill":"currentColor","data-name":"fa-rust","innerHTML":"<path d='M508.52,249.75,486.7,... |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
"""Defines the tabular explainer meta-api for returning the best explanation result based on the given model."""
from .common.base_explain... |
var env = process.env.NODE_ENV || 'local',
multer = require("multer"),
storage = multer.memoryStorage(),
bodyParser = require("body-parser"),
flash = require('connect-flash'),
cookieParser = require("cookie-parser"),
logger = require("morgan"),
session = require("express-session"),
expre... |
# Copyright @ 2019 Alibaba. All rights reserved.
# Created by ruhuan on 2019.08.31
""" python wrapper file for mnn converter tool """
from __future__ import print_function
import os
import argparse
import _tools as Tools
def usage():
""" print usage info """
print("usage: mnnconvert [-h]")
print(" [--fr... |
const {nativeImage} = require('electron')
const {clipboard} = require('electron')
const SimpleEvent = require("./SimpleEvent").SimpleEvent;
class ImageInserter {
constructor(elemModal) {
this.elemModal = $(elemModal);
this.elemModal.attr('tabindex', -1);
this.eventImageInsert = ne... |
async do {
await 42
}
|
/**
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
/**
* @module core/plugincollection
*/
import CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';
import EmitterMixin from... |
"""
Reference
https://github.com/VisionLearningGroup/VisionLearningGroup.github.io/tree/master/M3SDA
"""
import torch.nn as nn
from torch.nn import functional as F
from .build import BACKBONE_REGISTRY
from .backbone import Backbone
class FeatureExtractor(Backbone):
def __init__(self):
super().__init__(... |
"""TODO."""
import os
import re
import getpass
import tempfile
from testplan.testing.filtering import Filter
from testplan.testing.ordering import NoopSorter
from testplan.testing.multitest import MultiTest, testsuite, testcase
from testplan import Testplan, defaults
from testplan.common.entity.base import Environm... |
export default class RetryCountExceededException extends Error {
constructor(requestContext) {
super('Retry count has been exceeded');
this.name = this.constructor.name;
this.requestContext = requestContext;
// Use V8's native method if available, otherwise fallback
if ('captureStackTrace' in Err... |
import { DatabaseSingleton } from "../core/mongo";
let db = DatabaseSingleton.getConnectMain();
class AnimalSchema{};
AnimalSchema.prototype.name = "Animal";
AnimalSchema.prototype.schema = {
type : { type: String, required : true },
name : { type: String, required : true },
weight : { type: Number, r... |
# Copyright 2014 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 required by applicable ... |
//----------------------------------------------------------------------------//
// //
// ozz-animation is hosted at http://github.com/guillaumeblanc/ozz-animation //
// and distributed under the MIT License (MIT). ... |
import { fire } from 'simulant';
import { onWarn, initModule } from '../../helpers/test-config';
import { test } from 'qunit';
export default function() {
initModule('events/touch-events.js');
test("touch events safe to include when they don't exist in browser", t => {
t.expect(1);
onWarn(() => {}); // s... |
import React from 'react';
import {
View,
Text,
Image,
Dimensions,
FlatList,
} from 'react-native';
import { TuyaSceneApi } from '../../../sdk';
import HeadView from '../../common/HeadView'
import BaseComponent from '../../common/BaseComponent'
import CenterItem from '../../common/CenterItem'
const { width } ... |
# for the purpose of creating visualizations
# changed to starcraft_dream
import numpy as np
import gym
import os
import json
from scipy.misc import imresize as resize
from scipy.misc import toimage as toimage
from gym.spaces.box import Box
from gym.utils import seeding
SCREEN_X = 64
SCREEN_Y = 64
FACTOR = 8
with ... |
from django.db.models import fields
from rest_framework import serializers
from profiles_api import models
class HelloSerializer(serializers.Serializer):
"""Serializers a name field for testing our APIView"""
name = serializers.CharField(max_length=10)
class UserProfileSerializer(serializers.ModelSerial... |
"""An implementation of the CASTER model."""
from typing import Tuple
import torch
from chemicalx.data import DrugPairBatch
from chemicalx.models import Model
__all__ = [
"CASTER",
]
class CASTER(Model):
"""An implementation of the CASTER model from [huang2020]_.
.. seealso:: This model was suggested... |
# Copyright (C) 2020 Onepanel Inc.
#
# SPDX-License-Identifier: MIT
from django.urls import path, include
from . import views, views_overrides
from rest_framework import routers
from rest_framework import permissions
from drf_yasg.views import get_schema_view
from drf_yasg import openapi
router = routers.DefaultRout... |
import { stringify } from 'qs'
import { emitter } from '../utils'
import { createPopup } from '../../broker/utils'
export const requestOriginAccess = async ({ state, dispatch, commit }, { origin, chain }) => {
const { requestOriginAccessActive } = state.app
if (!requestOriginAccessActive) {
commit('app/SET_OR... |
/*++
Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies th... |
import sys
import json
import os
import datetime
def mongodb(rs, hosts, out):
os.system('mongodump --host %s/%s --out="%s"' % (rs, ','.join(hosts), out))
def mariadb(host, out):
os.system('mysqldump --host=%s --single-transaction --skip-comments --all-databases > %s' % (host, out))
def archivate(target, o... |