text stringlengths 3 1.05M |
|---|
"""
Utilities for creating template scripts.
Author: Valtteri Rajalainen
"""
import os
import sys
import shutil
import subprocess as subp
import tempfile
import typing as types
running = False
working_dir: str = os.getcwd()
template_info: types.Dict[str, types.Optional[str]] = {
'name': 'UNKNOWN',
... |
'use strict';
'use strict';
(function (scope) {
/**
* InkPaper
*
* @class InkPaper
* @param {Element} element
* @param {Object} [options]
* @param {Function} [callback] callback function
* @param {Object} callback.data The recognition result
* @param {Object} callback.err Th... |
const Koa = require('koa');
const views = require('koa-views');
const {join} = require('path');
const router = require('./router/router');
const static = require('koa-static');
const app = new Koa;
app.use(views(join(__dirname,'views'),{
extension:'pug'
}));
//引入css样式时,public文件夹就是根了
app.use(static(join(__dirname... |
/*!
* smoothState.js is jQuery plugin that progressively enhances
* page loads to behave more like a single-page application.
*
* @author Miguel Ángel Pérez reachme@miguel-perez.com
* @see http://smoothstate.com
*
*/
;(function ( $, window, document, undefined ) {
'use strict';
/** Abort if browser ... |
// @flow
import HiddenString from '../util/hidden-string'
import capitalize from 'lodash/capitalize'
import type {PlanLevel} from './settings'
import type {TypedAction, NoErrorTypedAction} from '../constants/types/flux'
export type UpdateBillingArgs = {
planId?: string,
cardNumber: HiddenString,
nameOnCard: Hi... |
/* global describe, it */
/* eslint no-undefined: 0 */
import { expect } from 'chai';
import { List } from 'immutable';
import { parseResponse } from '../../../src/mpdMiddleware/utils';
import { MPD_PLCHANGES, MPD_PLCHANGESPOSID } from '../../../src/server/actions/commands';
import reducer from '../../../src/server/red... |
//1. try this
//var greet = "Hello";
//
//function greet(){
// return 'Hi';
//}
//
//console.log(typeof greet);
//2. try this
var greet = "Hello";
var greet = function(){
return 'Hi';
}
console.log(typeof greet);
|
import React from 'react'
import { Link } from 'gatsby'
const Menu = (props) => (
<div className="menu">
<div className="side-menu">
<div className="term">
<p className="fas fa-bars fa-lg"></p>
</div>
<h3><Link to="/">P... |
({"EUR_displayName":"Eurob","CHF_displayName":"Swiss Franci","CAD_displayName":"Canadian Dollari","GBP_displayName":"British Ponds","JPY_displayName":"Japanese Yenni","AUD_displayName":"Australian Dollari","CNY_displayName":"Chinese Yuan Renminbi","USD_displayName":"US Dollari","USD_symbol":"US$","CAD_symbol":"CA$","GB... |
var DEBUG=true
function debug(msg){
if(DEBUG){
console.log(msg)
}
}
function play_video(video_id){
debug("play_video called with video_id: "+ String(video_id));
$("#" + String(video_id)).get(0).play();
}
|
import random
class int_generator:
def __init__(self, lb=1, ub=10, seed=None):
"""Return int between lb and ub (including both end points) for every call
Args:
lb (int, optional): lower bound. Defaults to 1.
ub (int, optional): upper bound. Defaults to 10.
"""
... |
from rubygems_utils import RubyGemsTestUtils
class RubyGemsTestrubygems_aws_sdk_s3control(RubyGemsTestUtils):
def test_gem_list_rubygems_aws_sdk_s3control(self):
self.gem_is_installed("aws-sdk-s3control")
def test_load_aws_sdk_s3control(self):
self.gem_is_loadable("aws-sdk-s3control")
|
import React from 'react';
import { useStaticQuery, graphql } from 'gatsby';
import { createUseStyles } from 'react-jss';
import { CookieConsent, Link } from 'components';
const useStyles = createUseStyles((theme) => ({
inner: {
display: 'none',
minHeight: 40,
color: theme.palette.grey[700],
textDec... |
/*
Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'table', 'it', {
border: 'Dimensione bordo',
caption: 'Intestazione',
cell: {
menu: 'Cella',
insertBefore: 'Inserisci Cella ... |
module.exports = new Date(2019, 11, 11)
|
'use strict';
angular.module('landingPage', ['resources']);
|
var fs = require('fs');
var path = require('path');
var sheller = require('sheller');
var log4js = require("log4js");
var cp = require('child_process');
var socket = require('../socket.js');
var configManager = require('../../configManager');
function Task(){
this.logger = console;
this.init();
}
Task.prototy... |
define(["jquery", "comm", "client", "./ui", "./enums", "./cell_renderer",
"./util", "./scroller", "./tileinfo-main", "./tileinfo-gui", "./tileinfo-player"],
function ($, comm, client, ui, enums, cr, util, scroller, main, gui, player) {
"use strict";
function fmt_body_txt(txt)
{
return txt
... |
from Tkinter import *
import Tkinter as tk
import ttk
class edit(object):
def __init__(self,current,db):
self.current = current
self.newval = ""
self.ttt = Tk()
self.ttt.wm_title("Edit Bookmarks")
self.ttt.geometry("+90+90")
self.a =1
if self.current[0]==0:
#folder
self.get_folder(self.ttt)
sql ... |
import React from "react";
import PropTypes from "prop-types";
const Article = props => {
const { children, theme } = props;
return (
<React.Fragment>
<article className="article">{children}</article>
{/* --- STYLES --- */}
<style jsx>{`
.article {
padding: ${theme.space.i... |
import frappe
from frappe import _
from frappe.database.schema import DBTable
class MariaDBTable(DBTable):
def create(self):
additional_definitions = ""
engine = self.meta.get("engine") or "InnoDB"
varchar_len = frappe.db.VARCHAR_LEN
# columns
column_defs = self.get_column_definitions()
if column_defs:
... |
const Command = require('../../Command');
const yargs = require('yargs');
const Manager = require('../../../../logic/cli-config/Manager');
const { outputCliConfig } = require('../../helpers/cli-config');
const cliConfig = new Command({
root: true,
command: 'cli-config',
requiresAuthentication: false,
... |
#!/usr/bin/env python3
# Copyright (c) 2015-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the prioritisetransaction mining RPC."""
import time
from test_framework.messages import COIN, M... |
import _plotly_utils.basevalidators
class XValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="x", parent_name="scatterpolargl.marker.colorbar", **kwargs
):
super(XValidator, self).__init__(
plotly_name=plotly_name,
parent_name=pare... |
# -*- coding: utf-8 -*-
COMPLETENESS_LEVELS = [10, 15, 20, 50, 100]
COMPLETENESS_COLUMNS = ["completeness_{}".format(level) for level
in COMPLETENESS_LEVELS]
STAT_COLUMNS = ['mean_coverage'] + COMPLETENESS_COLUMNS
|
/*
* <<
* Davinci
* ==
* Copyright (C) 2016 - 2017 EDP
* ==
* 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 b... |
define({
'zh_cn': {
'Allowed values:' : '允许值:',
'Compare all with predecessor': '与所有较早的比较',
'compare changes to:' : '将当前版本与指定版本比较:',
'compared to' : '相比于',
'Default value:' : '默认值:',
'Description' : '描述'... |
/* @flow strict */
import babel from 'rollup-plugin-babel'
const pkg = require('./package.json')
export default [
{
input: 'src/index.js',
output: [{file: pkg['module'], format: 'es'}],
plugins: [
babel({
plugins: ['@babel/plugin-proposal-class-properties'],
presets: ['@babel/pres... |
"""This defines a basic set of data for our Star Wars Schema.
This data is hard coded for the sake of the demo, but you could imagine fetching this
data from a backend service rather than from hardcoded JSON objects in a more complex
demo.
"""
from typing import Awaitable, Collection, Iterator
__all__ = ["get_droid"... |
export const FETCH_BEGIN = 'FETCH_BEGIN';
export const FETCH_DATA_SUCCESS = 'FETCH_SUCCESS';
export const FETCH_DATA_FAILURE = 'FETCH_DATA_FAILURE';
export const LOGIN_BEGIN = 'LOGIN_BEGIN';
export const LOGIN_SUCCESS = 'LOGIN_SUCCESS';
export const LOGIN_ERROR = 'LOGIN_ERROR';
export const USER_PRESENT = 'USER_PRESENT... |
import {
utils,
ADDRESS_PAD,
EMPTY_ADDRESS,
DELEGATOR_STATUS,
TRANSCODER_STATUS,
VIDEO_PROFILE_ID_SIZE,
VIDEO_PROFILES,
} from '@livepeer/sdk'
/**
* Mock SDK Interface
*/
const livepeer = {
config: {
eth: {
net_version: async () => '1',
},
contracts: {},
},
constants: {
ADD... |
class Script(object):
START_MSG = """<b>Hy {},
I'm an advanced filter bot with many capabilities!
There is no practical limits for my filtering capacity :)i am a Bot of @pushpa_Reju My:Owner is my devloper Dont🚫use me for Bad thing as porn spam
See <i>/help</i> for commands and more details.</b>
"""
HELP... |
# at cycle:
# @PiThon Protectors @Python Vipers @Eco Hero
import pygame, sys, objects, MapLoader, mathsets, rubato, music
mathsets.LoadMath()
from GameFunctions import *
from constants import *
import constants
pygame.init()
# Game Name: H@LLOW VALLEYs
objects.reports_on and objects.update_log.addMessage("REPORT: Wel... |
from nba_api.stats.endpoints._base import Endpoint
from nba_api.stats.library.http import NBAStatsHTTP
from nba_api.stats.library.parameters import GameScopeDetailed, LeagueID, PlayerOrTeam, PlayerScope, Season, SeasonType, Stat
class LeadersTiles(Endpoint):
endpoint = 'leaderstiles'
expected_data = {'AllTime... |
// Deprecated GPU.js version - only keep temporarily for reference
const {GPU} = require('gpu.js');
const PYRAMID_NUM_SCALES_PER_OCTAVES = 3;
const PYRAMID_MIN_SIZE = 8;
const LAPLACIAN_SQR_THRESHOLD = 3 * 3;
const MAX_SUBPIXEL_DISTANCE_SQR = 3 * 3;
const EDGE_THRESHOLD = 4.0;
const EDGE_HESSIAN_THRESHOLD = ((EDGE_T... |
'use strict';
var main2 = require('./chunk-main2-72ffade3-cjs.js');
module.exports = main2.log;
|
eval(function(t,i,c,k,e,r){e=function(c){return(c<i?'':e(parseInt(c/i)))+((c=c%i)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])t=t.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);for(v... |
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-ca8049da"],{"6d68":function(e,t){e.exports.id="ace/mode/javascript_worker",e.exports.src='"no use strict";!function(window){function resolveModuleId(id,paths){for(var testPath=id,tail="";testPath;){var alias=paths[testPath];if("string"==typeof alias)return ali... |
import styled from 'styled-components';
const Form = styled.form`
background-color: #223055;
margin: 2rem 10em;
color: #fff;
padding: 1rem;
border: 2px solid black;
`
export default Form; |
(function (nx, ui, toolkit, annotation, global) {
var template = nxex.struct.Template.template, binding = nxex.struct.Binding.binding;
var INDICATOR_RADIUS = 5;
var EXPORT = nx.define("nxex.common.graph.stage.StageControllerScaler", nxex.graph.Node, {
events: ["scaling"],
struct: {
... |
// ## Globals
var argv = require('minimist')(process.argv.slice(2));
var autoprefixer = require('gulp-autoprefixer');
var browserSync = require('browser-sync').create();
var changed = require('gulp-changed');
var concat = require('gulp-concat');
var flatten = require('gulp-flatten');
var gulp ... |
# Copyright 2015-present The Scikit Flow 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 require... |
#!/usr/bin/env python3
#
# Copyright 2021 Graviti. Licensed under MIT License.
#
# pylint: disable=invalid-name
# pylint: disable=missing-module-docstring
import csv
import os
from ...dataset import Data, Dataset, Segment
from ...label import LabeledBox2D
from .._utility import glob
DATASET_NAME = "LISATrafficSign"... |
jQuery(document).ready(function($) {
//set your google maps parameters
var latitude = 40.7128,
longitude = -74.0060,
map_zoom = 5;
//google map custom marker icon - .png fallback for IE11
var is_internetExplorer11 = navigator.userAgent.toLowerCase().indexOf('trident') > -1;
var marker_url = (is_inter... |
jQuery.sap.declare('sap.ui.layout.library-all');if(!jQuery.sap.isDeclared('sap.ui.layout.BlockLayout.designtime')){
/*!
* UI development toolkit for HTML5 (OpenUI5)
* (c) Copyright 2009-2017 SAP SE or an SAP affiliate company.
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
*/
jQuery.sap.declare... |
/* eslint global-require: 0 */
import React, { Component } from 'react';
import { Grid } from '@icedesign/base';
import IceContainer from '@icedesign/container';
const { Row, Col } = Grid;
const navigation = [
{
title: '今日工作',
color: '#58ca9a',
count: '160',
},
{
title: '今日任务',
color: '#ee70... |
const { createParser, Command } = require('../../src')
const parser = createParser()
parser.addCommand(new Command('list', 'List files', null, { alias: 'ls' }))
it('should find top level command by alias', async () => {
const context = await parser.parse(['ls'])
expect(context).toHaveProperty('group', undefined)
... |
define([], function () {
function Curve(hitObject) {
this.hitObject = hitObject;
}
Curve.lerp = function lerp(a, b, t) {
return a * (1 - t) + b * t;
}
return Curve;
}); |
from tkinter import *
window = Tk() # instantiate an instance of a window
window.geometry("420x420")
window.title("TreviIt first GUI program")
icon = PhotoImage(file=logo.png)
window.iconphoto(True, icon)
window.config(background="black")
window.mainloop() # place window on computer screen, listen for events
|
# coding: utf-8
import wx
from functools import wraps
def only_when_reader_ready(f):
"""Execute this function only if the reader is ready."""
# XXX We don't need this any more, remove it gradually!
@wraps(f)
def wrapper(self, *a, **kw):
if not self.reader.ready:
arg = None if not ... |
import datetime
format = "%a %b %d %H:%M:%S %Y"
today = datetime.datetime.today()
print('ISO :', today)
s = today.strftime(format)
print('strftime:', s)
d = datetime.datetime.strptime(s, format)
print('strptime:', d.strftime(format))
|
import React, {PropTypes} from 'react';
import { View, Text, ActivityIndicator, TextInput } from 'react-native';
import CreateHeader from './../CreateHeader';
import CreateSubmit from './../CreateSubmit';
export default class Completed extends React.Component {
static propTypes = {
state: PropTypes.object... |
from .dialogModels import * |
console.log('Running solution for Problem 0206...');
console.time('run time');
let searchStart = 1389026623; // sqrt of 1929394959697989990, pattern with all nines
let searchStop = 1010101010; // sqrt of 1020304050607080900, pattern with all zeros
let answer = 0;
for (var i = searchStart; i >= searchStop; i--) {
... |
var Emitter = require('component-emitter');
var Response = require('./response').Response;
var querystring = require('querystring');
var WebSocket;
var createWebSocket;
if (global.WebSocket) {
WebSocket = global.WebSocket;
createWebSocket = function (uri, options) {
return new WebSocket(uri);
};
} else {
W... |
def sam2fq(sam_in_dir,fq_out_dir):
fi=open(sam_in_dir)
fo=open(fq_out_dir,'w')
for line in fi:
seq=line.rstrip().split('\t')
if line[0] !='@':
# if len(bin(int(seq[1])))>=9 and bin(int(seq[1]))[-7]=='1':
# seq[0]=seq[0][0:-2]+'_1'
# elif len(bin(int(seq[1])))>=10 and bin(int(seq[1]))[-8]=='1':
# seq[0... |
import { NodeContext } from "djedi-react";
import NextLink from "next/link";
import PropTypes from "prop-types";
import React from "react";
// This component is just like "next/link" except it maintains the `?language`
// query parameter.
Link.propTypes = {
...NextLink.propTypes,
// This version of `<Link>` only ... |
import os
import re
import textwrap
from collections import OrderedDict
import pytest
from mock import DEFAULT, patch
from pytest import raises
from readthedocs.config import (
ALL,
PIP,
SETUPTOOLS,
BuildConfigV1,
BuildConfigV2,
ConfigError,
ConfigFileNotFound,
ConfigOptionNotSupported... |
module.exports = function (grunt) {
grunt.config('connect', {
local: {
options: {
hostname: '127.0.0.1',
port: 1031,
base: '.',
directory: '<%= env.localhost %>',
middleware: function (connect, options) {
... |
# Copyright 2016 Google 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 writing,... |
import {
container,
title,
description,
section,
btnLink,
twitterColor,
dribbbleColor,
instagramColor,
grayColor,
} from "styles/jss/nextjs-material-kit-pro.js";
import imagesStyles from "styles/jss/nextjs-material-kit-pro/imagesStyles.js";
const style = {
...imagesStyles,
container,
title,
... |
var Incident = require('../incident');
var Query = require('../query');
var util = require('util');
var _ = require('underscore');
var IncidentQuery = function(options) {
this.title = options.title;
this.locationName = options.locationName;
this.assignedTo = options.assignedTo;
this.status = options.status;
... |
"""Tools for manipulating of large commutative expressions. """
from __future__ import print_function, division
from sympy.core.add import Add
from sympy.core.compatibility import iterable, is_sequence, SYMPY_INTS, range
from sympy.core.mul import Mul, _keep_coeff
from sympy.core.power import Pow
from sympy.core.basi... |
import React, { useContext, createContext } from 'react';
import Button from '../Button';
import { Box, Flex } from '../Base';
import Option from '../Option';
import Stack from '../Stack';
const MultipleSelectContext = createContext({
selected: [],
eliminated: [],
isGroupDisabled: false,
onClear: () => {},
o... |
import Taro from '@tarojs/taro'
import { View, Button, Text } from '@tarojs/components'
import PropTypes from 'prop-types'
import classNames from 'classnames'
import _isFunction from 'lodash/isFunction'
import AtModalHeader from './header/index'
import AtModalAction from './action/index'
import AtModalContent from '... |
from .core.router import RouterDict
from typing import Callable
class Router:
def __init__(self) -> None:
"""
router is what we serve.
client is what we make a call.
"""
self.router_dict = RouterDict()
self.is_registered = False
def api(self, path: str, name: s... |
/*For converting into JSON Format*/
$.fn.serializeObject = function () {
var o = {};
var a = this.serializeArray();
$.each(a, function () {
if (o[this.name] !== undefined) {
if (!o[this.name].push) {
o[this.name] = [o[this.name]];
... |
from _ctypes.basics import (
_CData, _CDataMeta, cdata_from_address, ArgumentError, keepalive_key,
is_struct_shape, sizeof)
from _ctypes.primitive import SimpleType, _SimpleCData
from _ctypes.builtin import get_errno, set_errno, get_last_error, set_last_error
import _rawffi
from _rawffi import alt as _ffi
from ... |
import React from "react"
import SEO from "../components/seo"
const About = () => (
<>
<SEO title="About" />
<h1>About</h1>
</>
)
export default About
|
import FWCore.ParameterSet.Config as cms
from RecoMuon.TrackingTools.MuonServiceProxy_cff import *
MuonMiniAOD = cms.EDAnalyzer("MuonMiniAOD",
MuonServiceProxy,
MuonCollection = cms.InputTag("slimmedMuons"),
VertexLabel ... |
import NodesList from 'node/lists/Nodes-List'
import NODE_TYPE from "node/lists/types/Node-Type"
import NODE_CONSENSUS_TYPE from "node/lists/types/Node-Consensus-Type"
import consts from 'consts/const_global'
import Blockchain from "main-blockchain/Blockchain"
const MAX_NUMBER_OF_BACKED_BY_FULL_NODE = 30;
const MAX_NU... |
import React from "react";
import classNames from "classnames";
import toNumber from "lodash.tonumber";
/**
* You can use the `Progress` component to display simple or complex progress bars.
*/
const Progress = props => {
const {
children,
className,
barClassName,
value,
max,
animated,
... |
require("dotenv").config();
const express = require("express");
const cors = require("cors");
const http = require("http");
const { Server } = require("socket.io");
const axios = require("axios");
const admin = require("firebase-admin");
const serviceAccount = require("./serviceAccountKey.json");
admin.in... |
# -*- coding: utf-8 -*-
from PyQt4.QtCore import *
from PyQt4.QtGui import *
import ui_fileSetDlg
import neuropype.nodes.FileSet as fls
col2name = {2:'title', 3:'unit', 4: 'gain', 5:'maxval', 6:'samplingInterval',
7:'t0', 8:'length', 9: 'path'}
class fileSetDlg(QDialog, ui_fileSetDlg.Ui_fileSetDialog):
... |
/*
Template Name: Golden-Xchange - Responsive Admin Dashboard Template build with Twitter Bootstrap 3 & 4
Version: 4.0.0
Author: Sean Ngu
Website: http://www.seantheme.com/color-admin-v4.0/admin/
*/
var handleDataTableRowReorder = function() {
"use strict";
if ($('#data-table-rowreorder').length !== 0) {
... |
import React from 'react';
import VideoListItem from './video_list_item';
const VideoList = (props) => {
const videoItems = props.videos.map( (video) => {
return (
<VideoListItem
onVideoSelect={props.onVideoSelect}
key={video.etag}
video={video} />
)
})
return (
<ul cl... |
from django.urls import path
from .views import AuthorViewSet
single_view = AuthorViewSet.as_view(actions={
'get': 'get_my_details',
'post': 'create_author'
})
urlpatterns = [
path('', single_view),
]
|
// https://stackoverflow.com/questions/7616461/generate-a-hash-from-string-in-javascript-jquery
export default function hashcode(str="") {
const length = str.length;
var hash = 0, i, chr;
if (length === 0) return hash;
for (i = 0; i < length; i++) {
chr = str.charCodeAt(i);
hash = ((hash << 5) - hash) + ch... |
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/* tslint:disable:max-file-line-count */
// todo: should we support enforce focus in?
// todo: in original bs there are was a way to prevent modal from showing
/... |
const mix = require('laravel-mix');
const tailwindcss = require('tailwindcss');
mix.react('resources/js/app.js', 'public/js')
.sass('resources/sass/app.scss', 'public/css')
.options({
processCssUrls: false,
postCss: [ tailwindcss('./tailwind.config.js') ],
});
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2020 Intel Corporation
#
# 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
#
# Unl... |
import mongoose from 'mongoose'
import options from '../config'
export const connect = (url = options.dbUrl, opts = {}) => {
return mongoose.connect(url, { ...opts, useNewUrlParser: true })
}
|
/**
* filter-test
**/
describe('Filter Methods', () => {
describe('Not', () => {
it('should return a subset of non-matching elements', () => {
let list = _('#traversing-list li');
let notApples = list.not('.apple').addClass('.not-apples');
expect(notApples.length).to.... |
__NUXT_JSONP__("/60/13", (function(a,b,c,d,e,f){return {data:[{metaTitle:b,metaDesc:c,verseId:13,surahId:60,currentSurah:{number:"60",name:"الممتحنة",name_latin:"Al-Mumtahanah",number_of_ayah:"13",text:{"1":"يٰٓاَيُّهَا الَّذِيْنَ اٰمَنُوْا لَا تَتَّخِذُوْا عَدُوِّيْ وَعَدُوَّكُمْ اَوْلِيَاۤءَ تُلْقُوْنَ اِلَيْهِمْ بِا... |
const { get, set } = require('lodash');
module.exports.parseErrors = (errors, response) => ({
actual: mapValuesByDataPath(errors, response),
expected: mapErrorsByDataPath(errors),
});
function mapValuesByDataPath(errors, response) {
return errors && errors.reduce((prev, error) => {
if (!error.dataPath) {
... |
Proj4js.defs["EPSG:31969"] = "+proj=utm +zone=15 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs " |
import os
import random
import json
from googlesearch import search
import nltk
from nltk.stem.lancaster import LancasterStemmer
import numpy
import tflearn
import tensorflow
import pickle
import warnings
warnings.simplefilter("ignore")
TEMP_DIRECTORY = 'poc/pybot/knowledge/' # this directory is used to dump model... |
from tensorboardX import SummaryWriter
class MyWriter(SummaryWriter):
def __init__(self, logdir):
super(MyWriter, self).__init__(logdir)
def log_training(self, train_loss, step):
self.add_scalar('loss/train_loss', train_loss, step)
def log_evaluation(self, test_loss, accuracy, step):
... |
import store from 'store'
import actions from './actions'
const STORED_SETTINGS = storedSettings => {
const settings = {}
Object.keys(storedSettings).forEach(key => {
const item = store.get(`app.settings.${key}`)
settings[key] = typeof item !== 'undefined' ? item : storedSettings[key]
})
return setting... |
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v6.2.1
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : ... |
import React from 'react';
import {Link} from 'react-router-dom';
const VList = props => {
//{props.food.foodType} = name of the foodType in the array
//{props.food.id} = id of the food in the array
//{props.userId} = id of the current logged-in user
return (
<Link to={`/volunteer/pickups/${pro... |
pkgname = "Test-Pod"
|
from awscrt.auth import AwsCredentialsProvider
from awscrt.io import ClientBootstrap, DefaultHostResolver, EventLoopGroup
from awsiot import mqtt_connection_builder
import boto3
import botocore.exceptions
import os
import unittest
import shutil
import tempfile
import uuid
import warnings
TIMEOUT = 100.0
PROXY_HOST = o... |
export { Login } from './login';
export { Todos } from './todos';
export { Register } from './register';
export { Home } from './home';
|
# -*- coding: utf-8 -*-
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
"""
Common data processing utilities that are used in a
typical object detection data pipeline.
"""
import logging
import numpy as np
import torch
from fvcore.common.file_io import PathManager
from PIL import Image
from det... |
"use strict";
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a... |
from enum import Enum, unique
@unique
class Usage(Enum):
ExclusivelyKana = "?ExclusivelyKana"
ExclusivelyKanji = "?ExclusivelyKanji"
Giku = "?Gikun"
IrregularKana = "?IrregularKana"
IrregularKanji = "?IrregularKanji"
IrregularOkurigana = "?IrregularOkurigana"
IrregularVerb = "?IrregularVer... |
from covid_test_1.get_covid_data import get_covid_data
import pandas as pd
import pytest
def test_get_covid_data():
"""Test the get_covid_data() function"""
# Tests that the function returns the correct data for given arguments
test_df = pd.DataFrame({'cases': [698], 'cumulative_cases': [161969], 'date_... |
'use strict';
angular.module('appApp')
.controller('AnalisecurriculoCtrl', ['$scope', '$stateParams', 'AnaliseCurriculo',
function($scope, $stateParams, AnaliseCurriculo) {
function init() {
AnaliseCurriculo.getList($stateParams.email).then(function(data) {
$... |
var syrup = require('stf-syrup')
var execSync = require("child_process").execSync
var SubpPocess = require("teen_process").SubProcess
var util = require("util")
var EventEmitter = require('events').EventEmitter;
var Promise = require('bluebird');
var lifecycle = require('../../../util/lifecycle')
var path = require('p... |