text
stringlengths
3
1.05M
export default [ 'Glide', 'Abstyles', 'AFL-1.1', 'AFL-1.2', 'AFL-2.0', 'AFL-2.1', 'AFL-3.0', 'AMPAS', 'APL-1.0', 'Adobe-Glyph', 'APAFML', 'Adobe-2006', 'AGPL-1.0', 'Afmparse', 'Aladdin', 'ADSL', 'AMDPLPA', 'ANTLR-PD', 'Apache-1.0', 'Apache-1.1', 'Apache-2.0...
const Voting = artifacts.require("Vote"); const { expect } = require('chai'); const { assert } = require('console'); const { BN } = require('@openzeppelin/test-helpers'); contract("Vote", (accounts) => { const admin = accounts[0]; const voter1 = accounts[1]; const voter2 = accounts[2]; const voter3 = a...
/* http://keith-wood.name/calendars.html Islamic calendar for jQuery v1.1.4. Written by Keith Wood (kbwood{at}iinet.com.au) August 2009. Dual licensed under the GPL (http://dev.jquery.com/browser/trunk/jquery/GPL-LICENSE.txt) and MIT (http://dev.jquery.com/browser/trunk/jquery/MIT-LICENSE.txt) licenses. ...
'use strict'; var path = require('path'); /** * Will return the path and default bitcore-node configuration on environment variables * or default locations. * @param {Object} options * @param {String} options.network - "testnet" or "livenet" * @param {String} options.datadir - Absolute path to bitcoin database d...
module.exports = /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId])...
# -*- coding:utf-8 -*- # import re # phone = '123-4567-1234' # new_phone = re.sub('\D', '', phone) # print (new_phone) # 12345671234 # a = 'one11two2three3' # infos = re.search('\d+', a) # print (infos.group()) # # 11 # infoss = re.findall('\d+', a) # print (infoss) # (.*?)表示()内的内容作为返回结果 # b = 'xxIxxjshdxxlovexxsff...
document.addEventListener('DOMContentLoaded', function () { // Get all "navbar-burger" elements var $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll('.navbar-burger'), 0); // Check if there are any navbar burgers if ($navbarBurgers.length > 0) { // Add a click event on each of them ...
from __future__ import absolute_import, division, print_function # LIBTBX_SET_DISPATCHER_NAME cxi.pixel_histograms # LIBTBX_PRE_DISPATCHER_INCLUDE_SH export PHENIX_GUI_ENVIRONMENT=1 # LIBTBX_PRE_DISPATCHER_INCLUDE_SH export BOOST_ADAPTBX_FPE_DEFAULT=1 import sys from libtbx import easy_pickle from libtbx.option_parse...
frappe.ui.form.on('Opportunity', { refresh(frm) { // your code here setTimeout(function(){ frm.remove_custom_button('Lost'); frm.remove_custom_button('Close'); frm.remove_custom_button('Reopen'); frm.remove_custom_button('Quotation', "Create"); },600); ...
const firebase = require("firebase-admin"); var serviceAccountSource = require("./globalnl-members-service-account.json"); // source DB key var serviceAccountDestination = require("./globalnl-database-test-service-account"); // destination DB key const sourceAdmin = firebase.initializeApp({ credential: firebase.cre...
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); 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)) { target[key] = source[key]; } }...
module.exports = function(sequelize, Datatypes) { var Requests = sequelize.define( "Requests", { name: { type: Datatypes.STRING }, email: { type: Datatypes.STRING }, message: { type: Datatypes.STRING } }, { //Timestamps timestamps...
const app=require('./app'); app.listen(3000,()=>{ console.log("Server executando com sucesso"); })
const express = require('express'); const { getUser } = require('../lib/user'); const router = express.Router(); /** * Endpoint to check wether a given username already exists in the database and returns a bool * * query: username */ router.get('/uniqueUsername', async (req, res) => { const { username } = req.q...
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnPrope...
#!/usr/bin/env python ''' Generate valid and invalid base58 address and private key test vectors. Usage: gen_base58_test_vectors.py valid 50 > ../../src/test/data/base58_keys_valid.json gen_base58_test_vectors.py invalid 50 > ../../src/test/data/base58_keys_invalid.json ''' # 2012 Wladimir J. van der Laan # Re...
import TaskLoop from '../task-loop'; import { FragmentState } from './fragment-tracker'; import { BufferHelper } from '../utils/buffer-helper'; import { logger } from '../utils/logger'; export const State = { STOPPED: 'STOPPED', STARTING: 'STARTING', IDLE: 'IDLE', PAUSED: 'PAUSED', KEY_LOADING: 'KEY_LOADING'...
/*! For license information please see 693.0f267284.chunk.js.LICENSE.txt */ "use strict";(self.webpackChunkUnion_front_end=self.webpackChunkUnion_front_end||[]).push([[693],{30907:function(t,n,e){function r(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}e.d(n,{Z:function(...
# If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. from sys import path as sys_path from os.path import abspath from pathlib import ...
#!/usr/bin/env python """ lru_cache.py: Implementation of an LRU cache. """ from __future__ import absolute_import, print_function import sys class Node(object): next = None prev = None def __init__(self, data): self.data = data class Cache(object): """ { 'key': { ...
export { default } from './ScopedCssBaseline'; export { default as scopedCssBaselineClasses } from './scopedCssBaselineClasses'; export * from './scopedCssBaselineClasses';
# Copyright 2019 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...
export const RETRO_STATUS = { IN_PROGRESS: 'in_progress', VOTING: 'voting', LOCKED: 'locked', };
const erp_usuarios = require('../models/erp_usuario'); //const UsuForn = require('../models/erp_fornecedor_usuario'); const sequelize = require("sequelize"); const erp_fornecedor_usuario = require('../models/erp_fornecedor_usuario'); const md5 = require('md5'); const Op = sequelize.Op; module.exports = { async ind...
import os from PIL import Image from ....EEnum.EImageFrom import ImageFrom from ..YImage import YImage from ...Animation.alpha import fadein from ...Animation.size import grow cursor = "cursor" cursormiddle = "cursormiddle" cursortrail = "cursortrail" def prepare_cursor(scale, settings): """ :param settings: :p...
import logging import os from os.path import join from sys import stdout from config import * def setup_logger(name, log_file, level=logging.INFO): formatter = logging.Formatter('%(asctime)s| %(message)s') file_handler = logging.FileHandler(log_file) file_handler.setFormatter(formatter) stdout_hand...
// Copyright 2016 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 ap...
from zeroos.zerohub import Client as ZHubClient from Jumpscale import j JSConfigClient = j.application.JSBaseConfigClass class ZeroHubClient(JSConfigClient): """ Provide an easy way to communicate and do some actions on the ZeroHub like uploading or listing flists """ _SCHEMATEXT = """ @url = j...
initSidebarItems({"struct":[["Delay","Rust Embedded HAL interface for Mynewt Delay"],["GPIO","Rust Embedded HAL interface for Mynewt GPIO"],["SPI","Rust Embedded HAL interface for Mynewt SPI"]]});
/** * Framework7 Vue 3.6.3 * Build full featured iOS & Android apps using Framework7 & Vue * http://framework7.io/vue/ * * Copyright 2014-2018 Vladimir Kharlampidi * * Released under the MIT License * * Released on: December 27, 2018 */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?modul...
""" Copyright 2020 The OneFlow 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 law or agr...
/** * unit tests for EDDGraphingTools.js */ describe('Test EDDGraphingTools', function() { var unitTypes = {1:{"id":1,"name":"n/a"},2:{"id":2,"name":"hours"}}, dataTest = {UnitTypes: {1:{"id":1,"name":"n/a"},2:{"id":2,"name":"hours"}}, MeasurementTypes: {3:{name: "Optical Density"}...
/* eslint-disable */ describe('Receipt Message Components', function() { var ReceiptModel, ProductModel, ChoiceModel, LocationModel; var conversation, message; var testRoot; var client; beforeEach(function() { jasmine.clock().install(); restoreAnimatedScrollTo = Layer.UI.UIUtils.animatedScrollTo; ...
var HelloWorld = React.createClass({ render: function() { return ( <div id="hello"> <h3>Hello World!</h3> </div> ); } }); React.render(<HelloWorld />, document.getElementById('hello'));
const inRange = (n, start, end = null) => { if (end && start > end) end = [start, (start = end)][0]; return end == null ? n >= 0 && n < start : n >= start && n < end; }; module.exports = inRange;
require('dotenv').config(); const bodyParser = require('body-parser'); const express = require('express'); const jwt = require('jsonwebtoken'); const Sequelize = require('sequelize'); const { spawn } = require('child_process'); const app = express(); const port = 3000; const sequelize = new Sequelize({ dialect: ...
/** * 格式化后的 router */ // base import Login from '../views/Login.vue'; import Register from '../views/Register.vue'; import FindPassword from '../views/FindPassword.vue'; // 动态 import feed from './feed/feed.router'; // 我 import mine from './mine/mine.router'; // 圈子 import group from './group/group.router'; import o...
export const packageCountryData = country => { const { country_name, cases, active_cases, deaths, total_recovered } = country; return { title: country_name, cases, active: active_cases, deaths, recovered: total_recovered }; }; export const packageProvinceData = province => { const { province: name, confi...
import React, { Component, memo, useState } from 'react'; import { connect } from 'react-redux'; import { compose } from 'redux'; import { createStructuredSelector } from 'reselect'; import { makeSelectQuickPanelOpen, makeSelectQuickPanelBody } from 'containers/App/selectors'; import { TOGGLE_QUICK_PANEL } from 'contai...
var getMapData = require("./_getMapData"); /** * Removes `key` and its value from the map. * * @private * @name delete * @memberOf MapCache * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function mapCacheDelete(key) { var r...
(function( $ ) { 'use strict'; var datatableInit = function() { var $table = $('#datatable-ajax'); $table.dataTable({ bProcessing: true, sAjaxSource: $table.data('url') }); }; $(function() { datatableInit(); }); }).apply( this, [ jQuery ]);
!function(e){function t(r){if(n[r])return n[r].exports;var a=n[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,t),a.l=!0,a.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return ...
function learn(something) { console.log(something); } function my(callback, something) { something += ' is cool.'; callback(something); } my(learn, 'nodejs');
import $ from 'jquery'; // Core Foundation Utilities, utilized in a number of places. /** * Returns a boolean for RTL support */ function rtl() { return $('html').attr('dir') === 'rtl'; } /** * returns a random base-36 uid with namespacing * @function * @param {Number} length - number of random base-36 ...
import ExponentGyroscope from './ExponentGyroscope'; import ThreeAxisSensor from './ThreeAxisSensor'; export default new ThreeAxisSensor(ExponentGyroscope, 'gyroscopeDidUpdate'); //# sourceMappingURL=Gyroscope.js.map
(function() {var implementors = {}; implementors["epicbox"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.56.1/core/marker/trait.Freeze.html\" title=\"trait core::marker::Freeze\">Freeze</a> for <a class=\"enum\" href=\"epicbox/broker/broker_protocol/enum.BrokerRequest.html\" title=\"enum epicb...
import numpy as np import unittest import os import openmdao.api as om from openmdao.utils.assert_utils import assert_rel_error from example_cycles.high_bypass_turbofan import HBTF class CFM56DesignTestCase(unittest.TestCase): def setUp(self): self.prob = om.Problem() des_vars = self.prob.mo...
import mongoose, {Schema} from 'mongoose' import timestamps from 'mongoose-timestamp' import uniqueValidator from 'mongoose-unique-validator' const CategorySchema = new Schema({ name: { type: String, required: 'Enter category', unique: true, index: true }, icon: { type: String, default: '...
//Global vs Local Scope in Functions: https://www.freecodecamp.com/challenges/Global-vs-Local-Scope-in-Functions //It is possible to have both local and global variables with the same name. When you do this, the local variable takes precedence over the global variable. In this example: The function myFun will return "...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
"""Contains various plotting methods (both main plot functions and their specific rendering and annotation behaviors) for Orbit-derived objects in 2d (i.e., ground track) and 3d (i.e., orbital) plots. """ import numpy from math import pi from mpl_toolkits import mplot3d from matplotlib import pyplot, image from ...
import React from 'react'; import {StyleSheet, TouchableOpacity, Text, View} from 'react-native'; import {Styles} from './Styles'; import Ionicons from 'react-native-vector-icons/Ionicons'; class PaletteButton extends React.Component { render() { return ( <TouchableOpacity onPress={this.props.action} style...
// All code points in the Combining Half Marks block as per Unicode v3.2.0: [ 0xFE20, 0xFE21, 0xFE22, 0xFE23, 0xFE24, 0xFE25, 0xFE26, 0xFE27, 0xFE28, 0xFE29, 0xFE2A, 0xFE2B, 0xFE2C, 0xFE2D, 0xFE2E, 0xFE2F ];
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-webview-webview"],{"12dc":function(e,n,t){"use strict";var u;t.d(n,"b",(function(){return r})),t.d(n,"c",(function(){return i})),t.d(n,"a",(function(){return u}));var r=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("v-uni-view",[t("v-...
import { sortBy } from 'lodash/collection' import Point from 'ol/geom/Point' import MultiPoint from 'ol/geom/MultiPoint' import LineString from 'ol/geom/LineString' import MultiLineString from 'ol/geom/MultiLineString' import { MapEventInteraction } from './MapEventInteraction' /** * @typedef {MapEventInteractionOpt...
(function () { 'use strict'; const rows = 4; const cols = 7; const plan = document.getElementById('plan'); const form = document.getElementById('settings'); function createForm(prop, x, y) { const label = prop.toLowerCase().replace(' ', '-'); const template = ` <div class="table...
(window.MIP=window.MIP||[]).push({name:"mip-lightbox",func:function(){define("mip-lightbox/mip-lightbox",["require","customElement","fixed-element","util"],function(t){function e(){var t=this;t.open=!1,t.id=this.element.id,p.css(t.element,{position:"fixed","z-index":10001,top:0,right:0,left:0,transition:"opacity 0.1s e...
import * as KEYS from '../keys'; import * as AlertTypes from '../../models/alerts/AlertTypes'; export default { [KEYS.GENERIC_New]:`Nuevo`, [KEYS.GENERIC_Save]:`Guardar`, [KEYS.GENERIC_Ignored]:`Ignorado`, [KEYS.GENERIC_Wallet]:`Identidad`, [KEYS.GENERIC_Contract]:`Contrato`, [KEYS.GENERIC_Acti...
from constants import * def mix_colors(start_color, final_color, ratio=0.5): """ Given two colors, mix their values by proportions weighted by percentage. """ start_color_tuple = start_color.to_rgb() final_color_tuple = final_color.to_rgb() mixed_color = [] # Mix the R, G, and B compone...
/*! blanket - v1.1.5 */ (function(define){ /* Copyright (C) 2012 Ariya Hidayat <ariya.hidayat@gmail.com> Copyright (C) 2012 Mathias Bynens <mathias@qiwi.be> Copyright (C) 2012 Joost-Wim Boekesteijn <joost-wim@boekesteijn.nl> Copyright (C) 2012 Kris Kowal <kris.kowal@cixar.com> Copyright (C) 2012 Yusuke Suzuk...
# -*- coding: utf-8 -*- """Migration to change sr-Cyrl locale to sr locale""" from __future__ import unicode_literals from django.db import models, migrations def change_locale_sr_Cyrl_to_sr_forwards(apps, schema_editor): WikiMetric = apps.get_model("dashboards", "WikiMetric") WikiMetric.objects.filter(locale='sr...
if (typeof __coverage__ === 'undefined') { __coverage__ = {}; } if (!__coverage__['build/aui-tooltip-base/aui-tooltip-base.js']) { __coverage__['build/aui-tooltip-base/aui-tooltip-base.js'] = {"path":"build/aui-tooltip-base/aui-tooltip-base.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0...
import numpy as np import pandas as pd from rdkit import Chem from src.drugexr.models.predictor import Predictor from src.drugexr.utils.fingerprints import get_fingerprint from src.drugexr.utils.sorting import nsgaii_sort, similarity_sort class Environment: def __init__(self, objs, mods, keys, ths=None): ...
export const TYPES = { SUCCESS: 'SUCCESS', ERROR: 'ERROR' }; const INITIAL_STATE = { message: '', type: '' }; export const DISPLAY_MESSAGE = Symbol('DISPLAY_MESSAGE'); export const HIDE_MESSAGE = Symbol('HIDE_MESSAGE'); export function displayMessage (type, message) { return (dispatch) => { dispatch({ ...
/* Copyright 2020-2021 Lowdefy, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wri...
(function($) { var Alpaca = $.alpaca; Alpaca.Fields.SelectField = Alpaca.Fields.ListField.extend( /** * @lends Alpaca.Fields.SelectField.prototype */ { /** * @see Alpaca.Field#getFieldType */ getFieldType: function() { return "select"; ...
from flask import Flask, request import urllib.request, json, base64, sys, time, os, shutil, sqlite3, socket app = Flask(__name__) # CORS (Cross-Origin Resource Sharing)対策 from flask_cors import CORS CORS(app) @app.route('/get_click', methods=['GET']) def get_click(): print('get_click') return {'data': 'Hel...
describe("", function() { var rootEl; beforeEach(function() { rootEl = browser.rootEl; browser.get("build/docs/examples/example-ng-selected/index-jquery.html"); }); it('should select Greetings!', function() { expect(element(by.id('greet')).getAttribute('selected')).toBeFalsy(); element(by....
'use strict'; var _chai = require('chai'); var _esprima = require('../third_party/esprima'); var _ = require('..'); describe('nodejsScope option', function () { it('creates a function scope following the global scope immediately', function () { var ast = (0, _esprima.parse)('\n \'use strict\'...
data = ( 'Chey ', # 0x00 'Thak ', # 0x01 'Thak ', # 0x02 'Thang ', # 0x03 'Thayk ', # 0x04 'Thong ', # 0x05 'Pho ', # 0x06 'Phok ', # 0x07 'Hang ', # 0x08 'Hang ', # 0x09 'Hyen ', # 0x0a 'Hwak ', # 0x0b 'Wu ', # 0x0c 'Huo ', # 0x0d '[?] ', # 0x0e '[?] ', #...
import React, { Component } from 'react'; import '../../assets/chat.scss'; import PropTypes from 'prop-types'; import ChatHeader from '../ChatHeader'; import ChatItem from '../ChatItem'; import InputArea from '../InputArea'; import { toNormalTime } from '../../utils/transformTime'; export default class Robot extend...
(window.webpackJsonp=window.webpackJsonp||[]).push([[20],{246:function(a,e,o){"use strict";o.r(e);var r=o(0),t=Object(r.a)({},function(){var a=this,e=a.$createElement,o=a._self._c||e;return o("ContentSlotsDistributor",{attrs:{"slot-key":a.$parent.slotKey}},[o("h1",{attrs:{id:"arvore-de-decisao"}},[a._v("Árvore de Decis...
CKEDITOR.plugins.setLang("devtools","bg",{title:"Информация за елемента",dialogName:"Име на диалоговия прозорец",tabName:"Име на таб",elementId:"ID на елемента",elementType:"Тип на елемента"});
/* @generated */ // prettier-ignore if (Intl.DisplayNames && typeof Intl.DisplayNames.__addLocaleData === 'function') { Intl.DisplayNames.__addLocaleData({"data":{"zh-Hans-HK":{"types":{"language":{"long":{"aa":"阿法尔语","ab":"阿布哈西亚语","ace":"亚齐语","ach":"阿乔利语","ada":"阿当梅语","ady":"阿迪格语","ae":"阿维斯塔语","af":"南非荷兰语","afh":"阿弗...
import styled from "styled-components" export const PostHeader = styled.header` color: #fff; margin: auto; max-width: 70rem; padding: 5rem 5rem 0; ` export const PostTitle = styled.h1` font-size: 4rem; font-weight: 700; padding: 0 1.4rem; margin: 1rem auto; ` export const PostDescription = styled.h2`...
define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.supportType="align-content|align-items|align-self|all|animation|ani...
/* 活动地址为:https://cjhydz-isv.isvjcloud.com/wxTeam/activity?activityId=xxxxx 一共有2个变量 jd_cjhy_activityId 活动ID 必需 jd_cjhy_activityUrl 活动地址 必需 cron:10 10 10 10 * ============Quantumultx=============== [task_local] #CJ组队瓜分京豆 1 1 1 1 * jd_cjzdgf.js, tag=CJ组队瓜分京豆, enabled=true */ let jd_cjhy_activityId="2584bc5fb137415c87c...
module.exports = { collectCoverageFrom: ['src/**/*.js'], setupFilesAfterEnv: ['./setupTests.js'], coverageThreshold: { global: { branches: 100, functions: 100, lines: 100, statements: 100, }, }, }
import Backbone from 'backbone'; const inputProp = 'contentEditable'; export default Backbone.View.extend({ template() { const { pfx, model, config } = this; const label = model.get('label') || ''; return ` <span id="${pfx}checkbox" class="${pfx}tag-status" data-tag-status></span> <span id=...
import { get, computed } from "@ember/object"; import ModelMixin from "splittypie/mixins/model-mixin"; import Model from "ember-data/model"; import attr from "ember-data/attr"; import { belongsTo } from "ember-data/relationships"; export default Model.extend(ModelMixin, { name: attr("string"), event: belongsTo...
import { Prefab } from './prefab'; export class Spawner extends Prefab { constructor( game_state, name, position, properties ) { super( game_state, name, position, properties ); this.pool = this.game_state.groups[ properties.pool ]; this.spawn_time = p...
import collections from pbge import Singleton from . import color from . import jobs from . import tags import random from . import personality FR_ENEMY = "ENEMY" class Faction(Singleton): name = "Faction" factags = () mecha_colors = (color.AceScarlet, color.CometRed, color.HotPink, color.Black, color.Lu...
import React from "react"; import { Translator } from '../../../components/utils' const HeaderButton = () => { return ( <button className='ss_tag active' > <Translator string = 'home' /> </button> ); }; export default HeaderButton;
import url from 'url'; import { app, remote } from 'electron'; import { resolve } from 'path'; export const isURL = (s) => { const pattern = /^(?:\w+:)?\/\/([^\s.]+\.\S{2}|localhost[:?\d]*)\S*$/; if (pattern.test(s)) { return true; } return pattern.test(`http://${s}`); }; export const first = (input) =>...
import unittest import pygame import time Clock = pygame.time.Clock class ClockTypeTest(unittest.TestCase): def test_construction(self): """Ensure a Clock object can be created""" c = Clock() self.assertTrue(c, "Clock cannot be constructed") def test_get_fps(self): """ test_...
'use strict'; describe('Controller: ApplicantServicesCtrl', function () { // load the controller's module beforeEach(module('mpstdServiceDemoApp')); var ApplicantServicesCtrl, scope; // Initialize the controller and a mock scope beforeEach(inject(function ($controller, $rootScope) { scope = $rootScope...
const cbor = require('cbor'); const Long = require('long'); const BlockchainState = require('./BlockchainState'); class BlockchainStateLevelDBRepository { /** * * @param {LevelUP} stateLevelDB */ constructor(stateLevelDB) { this.db = stateLevelDB; } /** * Store blockchain state * * @par...
import styled from "styled-components"; import Heading from "../Typography/Heading"; import { mq, theme } from "../../constants/theme"; import SubmitButton from "../Button/SubmitButton"; const { colors } = theme; export const Background = styled.div` width: 95%; @media screen and (min-width: ${mq.tablet.narrow.min...
// kubeapps icon. Extends mxShape. function mxShapeKubeappsIcon(bounds, fill, stroke, strokewidth) { mxShape.call(this); this.bounds = bounds; this.fill = fill; this.stroke = stroke; this.strokewidth = (strokewidth != null) ? strokewidth : 1; }; mxUtils.extend(mxShapeKubeappsIcon, mxShape); mxShapeKubeappsIcon....
import React from "react"; import { storiesOf, action } from "@storybook/react"; import styled from "styled-components"; import TableInput from "../TableInput"; const Container = styled.div` width: 240px; background: #222; `; const types = [ { id: "string", label: "String" }, { id: "boolean", ...
# https://www.mapd.com/docs/latest/mapd-core-guide/tables/ # https://www.mapd.com/docs/latest/mapd-core-guide/views/ # https://www.mapd.com/docs/latest/mapd-core-guide/data-definition/ # https://www.mapd.com/docs/latest/mapd-core-guide/loading-data/#copy-from _ddl = frozenset( { 'alter', # database, table,...
'use strict'; /** * Module dependencies */ var acl = require('acl'); // Using the memory backend acl = new acl(new acl.memoryBackend()); /** * Invoke Products Permissions */ exports.invokeRolesPolicies = function() { acl.allow([{ roles: ['admin', 'user'], allows: [{ resources: '/api/products', ...
#!/usr/bin/env python3 import subprocess import sys import time host = sys.argv[1] num_boots = sys.argv[2] command_line = [ "ssh", "-o", "ConnectTimeout=1", "-o", "StrictHostKeyChecking=no", "-o", "UserKnownHostsFile=/dev/null", "-o", "ServerAliveCountMax=3", "-o", "ServerA...
!function(a,b,c){function d(a){var c,d,e,f=b.createElement("canvas"),g=f.getContext&&f.getContext("2d"),h=String.fromCharCode;if(!g||!g.fillText)return!1;switch(g.textBaseline="top",g.font="600 32px Arial",a){case"flag":return g.fillText(h(55356,56806,55356,56826),0,0),f.toDataURL().length>3e3;case"diversity":return g....
import pytest @pytest.fixture(scope="session") def splinter_webdriver(): """Splinter webdriver name.""" return "chrome" @pytest.fixture(scope="session") def splinter_headless(): return True # Make all splinter files go into test-results @pytest.fixture(scope="session") def splinter_screenshot_dir(): ...
const { getMessages, getChannels, getUserById, getChannelById, getUsers, postChannel, postMessage } = require('../controllers/messages') // Message schema const Message = { type: 'object', properties: { channelId: { type: 'integer'}, message: { type: 'string'}, ...
const autoPreprocess = require('svelte-preprocess'); module.exports = { preprocess: autoPreprocess({ scss: { includePath: ['src'], }, postcss: { plugins: require['autoprefixer'], }, }), };
"""Module containing factory class for building uvicorn app for Galaxy. Information on uvicorn, its various settings, and how to invoke it can be found at https://www.uvicorn.org/. Galaxy can be launched with uvicorn using the following invocation: :: uvicorn --app-dir lib --factory galaxy.webapps.galaxy.fast_f...
# 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...
import React, { memo } from 'react'; import PropTypes from 'prop-types'; import { makeStyles } from '@material-ui/core'; import { compose } from 'redux'; import { withRouter, NavLink } from 'react-router-dom'; import { connect } from 'react-redux'; import { createStructuredSelector } from 'reselect'; import { darken } ...