text
stringlengths
3
1.05M
from data.tools import Control from data.states import init, run, halt fuck = Control() fuck.setup_states({'Init': init.Init(), 'Run': run.Run(), 'Halt': halt.Halt() },'Init') fuck.main()
# -*- coding: utf-8 -*- # # google-cloud-websecurityscanner documentation build configuration file # # 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 # autogenerated file. # # All configuration values have a defaul...
/* Copyright 2020 Adobe. All rights reserved. This file is licensed to you 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 agre...
from __future__ import annotations import random from functools import partial from io import BytesIO from typing import Generator from pyaes import AESModeOfOperationECB from pyaes.util import append_PKCS7_padding, strip_PKCS7_padding from . import utils from .common import Cipher from .exceptions import InvalidDat...
# coding: utf-8 import constants as K from django.utils.translation import ugettext as _ class Choices(object): # MSG_MEDIA MSG_MEDIA = ( (K.XIMPIA,'Ximpia'), (K.TWITTER,'Twitter'), (K.FACEBOOK,'Facebook'), (K.LINKEDIN,'LinkedIn'), (K.EMA...
#!/usr/bin/python # fun_coll.py def f(): pass def g(): pass def h(f): print (id(f)) a = (f, g, h) for i in a: print (i) h(f) h(g)
# 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 ...
/* |-------------------------------------------------------------------------- | Session service |-------------------------------------------------------------------------- */ define(['angular', 'services/index'], function (angular, services) { 'use strict'; angular.module(services.name).factory('SessionS...
!function(){var e,t,n;!function(i){function r(e,t){return b.call(e,t)}function a(e,t){var n,i,r,a,s,o,l,c,d,h,u,g=t&&t.split("/"),p=v.map,f=p&&p["*"]||{};if(e&&"."===e.charAt(0))if(t){for(e=e.split("/"),s=e.length-1,v.nodeIdCompat&&j.test(e[s])&&(e[s]=e[s].replace(j,"")),e=g.slice(0,g.length-1).concat(e),d=0;d<e.length...
import React from 'react'; import { Link } from 'react-router-dom'; import { css } from 'glamor'; import { AnimatedRoute } from 'react-router-transition'; import Browser from '../shared/Browser'; import Footer from '../shared/Footer'; const bodyRule = css` display: flex; height: 100%; width: 100%; justify-co...
exports.defineAutoTests = function () { describe('NFC object', function () { it("nfc should exist", function () { expect(nfc).toBeDefined(); }); it("should contain a addNdefListener function", function () { expect(typeof nfc.addNdefListener).toBeDefined(); ...
# Configuration file for lab. from jupyter_server.auth import passwd import os #------------------------------------------------------------------------------ # Application(SingletonConfigurable) configuration #------------------------------------------------------------------------------ ## This is an application. #...
# Copyright (c) 2020 - 2021 Persanix LLC. 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 ...
from thupoll.blueprints.home import blueprint as home_blueprint from thupoll.blueprints.login import blueprint as login_blueprint from thupoll.blueprints.themes import blueprint as themes_blueprint from thupoll.blueprints.namespaces import blueprint as namespaces_blueprint from thupoll.blueprints.polls import blueprint...
# This program generates a assembly code which fills the ghr with zeros from yapsy.IPlugin import IPlugin from ruamel.yaml import YAML import uatg.regex_formats as rf import re import os from typing import Dict, Union, Any, List from uatg.utils import paging_modes class uatg_gshare_fa_ghr_zeros_01(IPlugin): """ ...
import React from "react"; export default ({ size = "24", color = "currentColor", strokeWidth = "1.5", linecap = "round", linejoin = "round", className = "" }) => { return ( <svg xmlns="http://www.w3.org/2000/svg" width={size} ...
/** * * <pre> * Title: 【报表处理】-【报表审核】 * Description: 报表处理-报表审核:主页面 * 此页面提供了报表处理的审核管理功能,可以允许用户单条或批量审核辖内机构的填报数据,并查看处理日志 * </pre> * @author wangxy31 * @version 1.00.00 @date 2020年8月18日 */ var org_no = ""; function AfterInit(){ org_no = CrrsFreeUtil.getOrgNo(str_LoginUserOrgNo); var condition = getQueryCo...
from collections import namedtuple, deque import pytest @pytest.fixture def xlib_mock(stub): class X: GrabModeAsync = 'asy' CurrentTime = 'cut' KeyPressMask = 1 ControlMask = 2 ShiftMask = 3 LockMask = 4 Mod1Mask = 5 Mod2Mask = 6 Mod4Mask ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # aospy documentation build configuration file, created by # sphinx-quickstart on Wed Oct 12 16:24:08 2016. # # 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 # auto...
/** * @file trie tree for words index * @author Haihan Wang(wanghaihan@baidu.com) */ define(function (require, exports) { function TrieTree() { /** * root * @protected * @type {Object} */ this.root = this.newNode(); } TrieTree.prototype = { /*...
$(document).ready(function () { unwrapCardData() // Unwrapping cards into carousel function unwrapCardData() { var card_width = getCardWidth(); var per_slide = Math.floor(12 / card_width) $('#menu_carousel_inner').append('<div class="carousel-item active" style="min-height:400px;"><...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import datetime from reportlab.pdfgen import canvas from reportlab.lib.pagesizes import A4 from reportlab.lib.units import cm from report...
import os import logging import warnings import platform import sys from math import floor import numpy as np from scipy.sparse import lil_matrix, csr_matrix from netCDF4 import Dataset import time as time_lib import yaml import abc from . import shared_tools from . import sed_tools # tools for initiating deltaRC...
/* * Spade GEOADD example */ var log = console.log , util = require( 'util' ) , Spade = require( '../' ) , client = Spade() , cback = function ( err, data, fn ) { log( 'ex.: cback gets:', err, fn( data[ 0 ] ) ); } , key = 'Sicily' , gpoints = [ 13.361389, 38.115556, '...
class UserDTO { constructor({ id, name, age }) { this.id = id; this.name = name; this.age = age; } } export default UserDTO;
import React, { createContext } from 'react'; export const { Provider: ResizeProvider, Consumer: ResizeConsumer } = createContext(); export const withResize = (Component) => { const WrappedComponent = (props) => ( <ResizeConsumer> { resizer => <Component resizer={resizer} {...props} /> } </Res...
"""Basic linear factorizations needed by the solver.""" from scipy.sparse import (bmat, csc_matrix, eye, issparse) from scipy.sparse.linalg import LinearOperator import scipy.linalg import scipy.sparse.linalg try: from sksparse.cholmod import cholesky_AAt sksparse_available = True except ImportError: impor...
#if defined(CLOUD_OFFLINE_RESET) #include "iot_export.h" #include "dm_shadow.h" #include "iotx_system_internal.h" iotx_shadow_attr_t shadow_attr_reset; void offline_reset_handle_callback(struct iotx_shadow_attr_st *pattr) { void *user_callback = NULL; log_info("[RST]", "offline_reset_handle called."); i...
import os, sys, time import torch from torch.autograd import Variable import numpy as np import matplotlib matplotlib.use('agg') import matplotlib.pyplot as plt import torch.nn.functional as F import gco import copy from lapjv import lapjv import itertools from time import time def cost_matrix(width=16, dist=2, devic...
import urlparse from django.core.paginator import EmptyPage, Page, PageNotAnInteger, Paginator from django.http import QueryDict from django.utils.http import urlencode from rest_framework import pagination, serializers class ESPaginator(Paginator): """ A better paginator for search results The normal ...
export default /* @ngInject */ ($stateProvider) => { $stateProvider.state('cda', { url: '/paas/cda', template: '<div data-ui-view="cdaDetails"></div>', translations: { format: 'json', value: ['.'], }, abstract: true, }); };
#!/usr/bin/env python # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, subl...
import os import sys import numpy as np from numpy.lib import index_tricks import raisimpy as raisim import datetime import time import yaml import random import shutil import pickle import matplotlib import matplotlib.pyplot as plt from xbox360controller import Xbox360Controller sys.path.append(os.path.abspath(os.pat...
from wlauto import AndroidDevice class MeizuMX6(AndroidDevice): name = 'meizumx6' @property def is_rooted(self): # "su" executable on a rooted Meizu MX6 is targeted # specifically towards Android application and cannot # be used to execute a command line shell. This makes it ...
from django.db import models from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.fields import GenericForeignKey class Action(models.Model): user = models.ForeignKey( 'auth.User', related_name='actions', db_index=True, on_delete=mod...
import pytz from datetime import datetime, timedelta from unittest import TestCase from zipline.algorithm import TradingAlgorithm from zipline.errors import TradingControlViolation from zipline.sources import SpecificEquityTrades from zipline.utils.test_utils import ( setup_logger, add_security_data, remove_secur...
const fs = require('fs'); const readline = require('readline'); const getPath = readline.createInterface({ input: process.stdin, output: process.stdout }); var first = ""; var folderFirst = ""; getPath.question("Path: ", (path) => { var dir = fs.opendirSync(path); var remaining = true; getPath.question("Recu...
import json # with open('../names', 'r') as f: # names = f.read().splitlines() with open('astrocats/supernovae/output/cache/hostimgs.json', 'r') as f: hostimgs = json.loads(f.read()) count = 0 newhostimgs = [] for ei, entry in enumerate(hostimgs): if entry[1] == 'SDSS': # if entry[0] not in names...
# Copyright 2016 OpenStack Foundation # # 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 ...
// assigning variables const mainHeading = document.querySelector("#mainHeading"); const nameHeading = document.querySelector("#name"); const totalConf = document.querySelector(".totalConf"); const tf = document.querySelector("#tf"); const totalDeath = document.querySelector(".totalDeath"); const td = document.querySel...
from datetime import datetime import requests from src.util.mongodb import MongoDB class WeatherService: def __init__(self, parameters: dict = None): self.parameters = parameters self.base_url = 'http://weather-service:5570/rest/api/v1' def query(self): print(self.parameters) ...
const express = require('express'); const router = express.Router(); const hotels = require('../controllers/hotels'); const catchAsync = require('../utils/catchAsync'); const { isLoggedIn, isAuthor, validateHotel } = require('../middleware'); const multer = require('multer'); const { storage } = require('../cloudinary'...
/********************************************************************** * LeechCraft - modular cross-platform feature rich internet client. * Copyright (C) 2006-2014 Georg Rudoy * * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE...
/* * File: ColVis.js * Version: 1.0.3 * CVS: $Id$ * Description: Controls for column visiblity in DataTables * Author: Allan Jardine (www.sprymedia.co.uk) * Created: Wed Sep 15 18:23:29 BST 2010 * Modified: $Date$ by $Author$ * Language: Javascript * License: LGPL * Proje...
var ErrandsRegisterOutForm=function(c){this.dateId=c;var a=this.setup();var b=new Ext.Window({id:"ErrandsRegisterOutFormWin",title:"外出单详细信息",iconCls:"menu-errands",width:460,height:350,modal:true,layout:"fit",buttonAlign:"center",items:[this.setup()],buttons:[{text:"保存",iconCls:"btn-save",handler:function(){var d=Ext.g...
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch.optim.lr_scheduler f...
import Vue from 'vue' export default function observe(obj, key, desc) { if (!obj.__$$state) { Vue.util.defineReactive(obj, '__$$state', {}) } Vue.set(obj.__$$state, key, desc.initializer()) return Object.getOwnPropertyDescriptor(obj.__$$state, key) }
function saveTextAsFile() { var textToSave = document.getElementById("ul_reponse_apps").value; var textToSaveAsBlob = new Blob([textToSave], {type:"text/plain"}); var textToSaveAsURL = window.URL.createObjectURL(textToSaveAsBlob); var fileNameToSaveAs = "file_convert.txt"; var downloadLink = document.createElemen...
import argparse from pybedtools import BedTool if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("bed12") parser.add_argument("introns") args = parser.parse_args() bed = BedTool(args.bed12) introns = bed.introns() introns.remove_invalid().saveas(args.intron...
export default class Tower { constructor(range, fireRate, damage, cost, typeId) { this.ID, this.level = 1, this.range = range, this.fireRate = fireRate, this.damage = damage, this.typeID = typeId, this.cost = cost, this.value = cost, this.position; this.fullyUpgraded = false; ...
#include "main.h" /** * print_binary - writes unsigned integer to buffer * @inv: the arguments inventory with most commonly used arguments */ void print_binary(inventory_t *inv) { unsigned int n = va_arg(*(inv->args), unsigned int); int i, j; char *binary, *copy; binary = _calloc(33, sizeof(char)); if (binary...
$(function() { consoleInit(main) }); const FARM_ABI = [{"inputs":[{"internalType":"contract Token","name":"_token","type":"address"},{"internalType":"contract TokenMinter","name":"_minter","type":"address"},{"internalType":"address","name":"_devFeeAddr","type":"address"},{"internalType":"uint256","name":"_TokenPerB...
import { parse } from '@clyde-lang/parser'; import { Interpreter } from './interpreter'; describe("Interpreter", () => { describe('lines', () => { it('get lines', () => { const content = parse('Hello!\nHi there.\nHey.#tag\n'); const dialogue = Interpreter(content); expect(dialogue.getContent()...
const mongoose = require('mongoose') const Schema = mongoose.Schema const User = new Schema({ name: { type: String, required: true }, email: { type: String, required: true }, isAdmin: { type: Number, default: 0 }, password: { type: Str...
import numpy as np from itertools import repeat from concurrent.futures import ProcessPoolExecutor as PoolExecutor from xplainet.safe_label_encoder import SafeLabelEncoder from sklearn.impute import SimpleImputer, MissingIndicator from sklearn.preprocessing import QuantileTransformer, KBinsDiscretizer, StandardScaler ...
# -*- coding: utf-8 -*- """Cisco DNA Center GetsTheTemplatesAvailable data model. Copyright (c) 2019-2021 Cisco Systems. 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, inclu...
# 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 ...
const net = require('net') const ProtoDef = require('protodef').ProtoDef const EventEmitter = require('events').EventEmitter class Client extends EventEmitter { constructor (version, isServer = false) { super() this.isServer = isServer const mcp = require(`../../data/${version}/mcp`) this.mcpToServe...
"use strict"; const settings_1 = require("./settings"); const platform_1 = require("./platform"); module.exports = (api) => { api.registerPlatform(settings_1.PLATFORM_NAME, platform_1.GoveeHomebridgePlatform); }; //# sourceMappingURL=index.js.map
from numpy import exp, sqrt, log, cos, sin, isnan, isinf, seterr seterr(over='raise') def _log(x): if x <= 0: return 0 return log(x) def _exp(x): try: return exp(x) except (FloatingPointError): return 1 def _sqrt(x): return sqrt(abs(x)) def _cos(x): return cos(x) def...
import doctest import importlib import pkgutil import sys import unittest import feast def setup_feature_store(docstring_tests): """Prepares the local environment for a FeatureStore docstring test.""" from datetime import datetime, timedelta from feast import ( Entity, Feature, F...
""" Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. SPDX-License-Identifier: Apache-2.0 OR MIT """ def DeleteEntity_UnderAnotherPrefab(): """ Test description: - Creates an entity. - Creates a p...
import angular from 'angular'; angular.element(document).ready(function () { // PostToCodepen var PostToCodepen = (function () { var codepenGroup = document.getElementsByClassName('codepen-group'); var codepens; var codepen; var type; var codeInside; var JSONstring; // Create the Codep...
// グローバル空間にオブジェクトを定義 window.refs = {data: 'global variable'}; let loopFunc = () => { // DOM 生成 let elm = document.createElement('div'); // 現在時のタイムスタンプ elm.textContent = Date.now(); // 生成した DOM にイベントリスナを登録 let clickEventListener = () => { // ★ ここでグローバル空間にいる refs を参照している console.log(window.refs); }; elm.a...
#1-) LIST COMPREHENSIONS ## Take the inputs and by using list compherension, write the inputs as a list into a list. if __name__ == '__main__': x = int(input()) y = int(input()) z = int(input()) n = int(input()) listcomp=[[i,j,k] for i in range(x+1) for j in range(y+1) for k in range(z+1) if i+j+k...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _react = _interopRequireDefault(require("react")); var _StarTwoTone = _interopRequireDefault(require("@ant-design/icons-svg/lib/asn/StarTwoTone")); var _AntdIcon = _interopRequireDefault(require("../componen...
''' Copyright (C) 2021 CG Cookie http://cgcookie.com hello@cgcookie.com Created by Jonathan Denning, Jonathan Williamson 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 ...
define("@ember-data/adapter/error", ["exports", "@ember-data/store/-private"], function (_exports, _private) { "use strict"; Object.defineProperty(_exports, "__esModule", { value: true }); Object.defineProperty(_exports, "errorsHashToArray", { enumerable: true, get: function get() { return _p...
def prime_sieve(maximum) -> list: """Return a list of primes < maximum.""" maximum = int(maximum) prime_list = [] primalities = [1] * maximum for i in range(2, maximum): if primalities[i]: prime_list.append(i) for j in range(i, len(primalities), i): pr...
// Assignment code here // Get references to the #generate element var generateBtn = document.querySelector("#generate"); //various arrays var number = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]; var specialChar = ["!", "@","#", "%", "&","^", ",", "$", "(", ")", "*", "+", "-", ".", "/","[", "]", "<", ">", "?...
# -*- coding: utf-8 -*- from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('xsd_training', '0001_initial'), ('xsd_sites', '0001_initial'), ] ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # _update.py: Fetch the latest data file. # # Copyleft (C) 2014 - huhamhire <me@huhamhire.com> # ===================================================================== # Licensed under the GNU General Public License, version 3. You should # have received a copy of the GNU...
# -*- coding: utf-8 -*- # FLEDGE_BEGIN # See: http://fledge.readthedocs.io/ # FLEDGE_END """ Experimental browser for extracting reading data from the Fledge data buffer Supports a number of REST API: http://<address>/fledge/asset - Return a summary count of all asset readings http://<address>/fledge/asset...
/* * Copyright (C) 2000 David J. Mckay (david.mckay@st.com) * * May be copied or modified under the terms of the GNU General Public * License. See linux/COPYING for more information. * * This file contains the I/O routines for use on the overdrive board * */ #include <linux/config...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # +---------+ # | echo.py | # +---------+ # A simple ICMP-8 ping test. # # @authors: Isis Lovecruft, <isis@torproject.org> # @version: 0.0.2-pre-alpha # @license: copyright (c) 2012 Isis Lovecruft # see attached LICENCE file # import os from twisted.pyth...
// material import PropTypes from 'prop-types'; export default function Grafana(props) { if (props.expand === false) return null; return ( <div> <iframe title="panel" src={props.url} width="100%" height="200px" frameBorder="0" allowtransparency="true" ...
"""Testing a string manipulation helper function.""" from .sdk_assertions import * # noqa def snake_to_camel(snake_case_string: str) -> str: """ Takes in a `snake_case` string and returns a `camelCase` string. :params str snake_case_string: The snake_case string to be converted into camelCase. :...
/* * Copyright (c) Contributors to the Open 3D Engine Project. * For complete copyright and license terms please see the LICENSE at the root of this distribution. * * SPDX-License-Identifier: Apache-2.0 OR MIT * */ #pragma once #include <gmock/gmock.h> #include <AzCore/Component/ComponentApplication.h> #include...
# MIT License # # Copyright (c) 2019 Technion # # https://github.com/tech-srl/code2seq import re import subprocess import sys class Common: internal_delimiter = "|" UNK = "<UNK>" PAD = "<PAD>" SOS = "<S>" @staticmethod def word_not_meta_token(word, token_mapping): if word != token_m...
##################################### # Dependencies # ##################################### from Soldes import Salle import copy ##################################### # Class # ##################################### class Magasin: ##################################...
'use strict'; /** * @ngdoc overview * @name ngRoute * @description * * Module that provides routing and deeplinking services and directives for angular apps. */ var ngRouteModule = angular.module('ngRoute', ['ng']). provider('$route', $RouteProvider); /** * @ngdoc object * @name ngRou...
/*! jCarousel - v0.3.2 - 2015-02-23 * http://sorgalla.com/jcarousel/ * Copyright (c) 2006-2015 Jan Sorgalla; Licensed MIT */ (function(t){"use strict";var i=t.jCarousel={};i.version="0.3.2";var s=/^([+\-]=)?(.+)$/;i.parseTarget=function(t){var i=!1,e="object"!=typeof t?s.exec(t):null;return e?(t=parseInt(e[2],10)||0,e[...
var numero = 10.1; switch (numero) { case 10: console.log("El numero es 10"); document.write("El numero es 10"); break; case 20: console.log("El numero es 20"); document.write("El numero es 20"); break; default: console.log("El numero no es 10 ni 20"...
from __future__ import print_function import roslib roslib.load_manifest('mct_logging') import rospy from mct_msg_and_srv.srv import CommandString def tracking_pts_logger_master_proxy(cmd): srv = '/tracking_pts_logger_master' proxy = rospy.ServiceProxy(srv,CommandString) try: resp = proxy(cmd) ...
# Copyright (C) PyZMQ Developers # Distributed under the terms of the Modified BSD License. import struct import time import zmq from zmq import devices from zmq.tests import PYPY, BaseZMQTestCase, SkipTest if PYPY: # cleanup of shared Context doesn't work on PyPy devices.Device.context_factory = zmq.Context...
#%% """ Created on July 05 2021 Impact of conditional expectation pricing (Black-Scholes with Jump volatility) This code is purely educational and comes from "Financial Engineering" course by L.A. Grzelak The course is based on the book “Mathematical Modeling and Computation in Finance: With Exercises and Pyth...
import React from "react" import { useStaticQuery, graphql } from "gatsby" import BackgroundImage from "gatsby-background-image" export default function Header() { const data = useStaticQuery(graphql` query { imageOne: file(relativePath: { eq: "header.jpg" }) { childImageSharp { fluid(max...
/** * SPDX-FileCopyrightText: © 2019 Liferay, Inc. <https://liferay.com> * SPDX-License-Identifier: BSD-3-Clause */ const path = require('path'); module.exports = { env: { browser: true, jest: true, node: true, }, extends: 'liferay/react', parser: '@typescript-eslint/parser', plugins: ['@typescript-esli...
module.exports = function isLocalContentImage(url, siteUrl = '') { const normalizedSiteUrl = siteUrl.replace(/\/$/, ''); const imagePath = url.replace(normalizedSiteUrl, ''); return /^(\/.*|__GHOST_URL__)\/?content\/images\//.test(imagePath); };
/*! * remark (http://getbootstrapadmin.com/remark) * Copyright 2015 amazingsurge * Licensed under the Themeforest Standard Licenses */ $.components.register("animate-list", { mode: 'init', defaults: { child: '.panel', duration: 250, delay: 50, animate: 'scale-up', fill: 'backwards' }, ...
var config = require('./config.js'); if (config.api_key == 'API_KEY') { console.error('API KEY is not set! Generate your own at https://console.developers.google.com and place in config.js'); process.exit(); } var googleTranslate = require('google-translate')(config.api_key); var text = 'test'; config.langu...
from cffi import FFI from unittest import TestCase source = open("libsec.h", "r").read() ffi = FFI() ffi.cdef(source) ffi.set_source("_libsec", "#include <secp256k1.h>", libraries=["secp256k1"]) ffi.compile(verbose=True)
from __future__ import print_function, division import numpy as np import imgaug as ia import imgaug.augmenters as iaa from .utils import run_and_save_augseq def main(): chapter_augmenters_convolve() chapter_augmenters_sharpen() chapter_augmenters_emboss() chapter_augmenters_edgedetect() chapte...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
''' urlcheck: A quick url page checker. Note that "python setup.py test" invokes pytest on the package. With appropriately configured setup.cfg, this will check both xxx_test modules and docstrings. Copyright 2016, Art Luman. Licensed under MIT. ''' import sys from setuptools import setup, find_packages from setuptoo...
import React, { Component } from "react"; import PhotoDisplay from "./presenter"; class Container extends Component { render() { const { photo, openPhotoDetail } = this.props; return <PhotoDisplay {...photo} openPhotoDetail={openPhotoDetail} />; } } export default Container;
""" Created on May 14, 2016 a rule-based user simulator -- user_goals_first_turn_template.revised.v1.p: all goals -- user_goals_first_turn_template.part.movie.v1.p: moviename in goal.inform_slots -- user_goals_first_turn_template.part.nomovie.v1.p: no moviename in goal.inform_slots @author: xiul, t-zalipt """ import...
import CaToggle from './CaToggle.vue'; CaToggle.install = (Vue) => { Vue.component(CaToggle.name, CaToggle); }; export default CaToggle;
export var dashShaders = { inject: { 'vs:#decl': "\nattribute vec2 instanceDashArrays;\nvarying vec2 vDashArray;\n", 'vs:#main-end': "\nvDashArray = instanceDashArrays;\n", 'fs:#decl': "\nuniform float dashAlignMode;\nvarying vec2 vDashArray;\nfloat mod2(float a, float b) {\n return a - floor(a / b) * b;...
"""Model functions sensitivity analysis clinic at CSDMS 2019. Written by Nathan Lyons, May 2019 """ from os.path import join from landlab import RasterModelGrid from landlab.components import FastscapeEroder, FlowAccumulator, LinearDiffuser from landlab.io import write_esri_ascii import numpy as np import experiment...