text stringlengths 3 1.05M |
|---|
# Generated by Django 3.0.5 on 2020-08-04 07:35
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('experts', '0003_expert_picture'),
]
operations = [
migrations.AddField(
model_name='expert',
name='featured',
... |
# Copyright (c) 2020-20201, LE GOFF Vincent
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions... |
#!/usr/bin/python
#
# Copyright 2016 Red Hat | Ansible
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = '''
---
module: docker_image
short_description: Manage docker imag... |
/**
* @author MPanknin / http://www.redplant.de/
* @author alteredq / http://alteredqualia.com/
*/
THREE.AreaLight = function ( color, intensity ) {
THREE.Light.call( this, color );
this.type = 'AreaLight';
this.normal = new THREE.Vector3( 0, - 1, 0 );
this.right = new THREE.Vector3( 1, 0, 0 );
this.intens... |
"""
Module to handle reading/writing/consistency of DSS keywords
in FITS files.
author(s): M. Kerr, T. Burnett
"""
__version__ = '$Revision: 1.8 $'
#$Header: /nfs/slac/g/glast/ground/cvs/pointlike/python/uw/data/dssman.py,v 1.8 2016/06/22 17:02:50 wallacee Exp $
from astropy.io import fits as pyfits
from collections... |
export default {
route: {
dashboard: '首页',
introduction: '简述',
documentation: '文档',
guide: '引导页',
order: '订单管理',
userOrder: '用户订单',
afterSaleOrder: '售后订单',
sellerOrder: '商户订单',
avatarUpload: '头像上传',
dropzone: 'Dropzone',
sticky: 'Sticky',
countTo: 'CountTo',
statist... |
import requests
from bs4 import BeautifulSoup
from requests.exceptions import ConnectionError, TooManyRedirects
from raccoon_src.utils.web_server_validator import WebServerValidator
from raccoon_src.utils.request_handler import RequestHandler
from raccoon_src.utils.help_utils import HelpUtilities
from raccoon_src.utils... |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
import subprocess
import unittest
from pybsd import Executor
class TestExecutor(Executor):
ezjail_admin_list_output = (0,
"""STA JID IP Hostname Root Directory\... |
"""Module for interacting with the InfluxDB database"""
from typing import List
from influxdb_client import InfluxDBClient
from influxdb_client.client.write_api import SYNCHRONOUS
from homeflux.utils import timer
from homeflux import environment, log
from homeflux.data import data_types
def write(values: List[data_... |
from __future__ import unicode_literals
from documents.models import Document
from documents.permissions import permission_document_create
from documents.tests import (
GenericDocumentViewTestCase, TEST_SMALL_DOCUMENT_PATH,
)
from sources.models import WebFormSource
from sources.tests.literals import (
TEST_SO... |
/**
* Copyright (c) 2006-2015, JGraph Ltd
* Copyright (c) 2006-2015, Gaudenz Alder
*/
/**
* Class: mxSwimlaneOrdering
*
* An implementation of the first stage of the Sugiyama layout. Straightforward
* longest path calculation of layer assignment
*
* Constructor: mxSwimlaneOrdering
*
* Creates a cycle remov... |
const config = require('config');
const jwt = require('jsonwebtoken');
const _ = require('lodash');
const moment = require('moment');
const { cache, binance, mongo, PubSub, slack } = require('../../helpers');
const isValidCachedExchangeSymbols = exchangeSymbols =>
_.get(
exchangeSymbols,
[Object.keys(exchang... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{"0427f930b2f19a25b61d":function(t,e,r){"use strict";r.d(e,"a",function(){return a});var i,n=r("e8e740b3fab0642e6a30"),s=r("b82d2ea0c8dcd2b25103");function a(t,e){this.center=void 0!==t?t:new s.a,this.radius=void 0!==e?e:0}Object.assign(a.prototype,{set:function(t... |
const config = require("../../config.json"), { app, oauth, guilds, channels, emojis } = require("../constants"), { appeals, appealbanned, tokenToUser } = require("../database"), fs = require("fs"), { join } = require("path");
const
formFile = fs.readFileSync(join(__dirname, "../web/appeals/form.html"), "utf8").repla... |
'use strict';
var ctrlFactory = require('restitute').controller;
function listController() {
ctrlFactory.list.call(this, '/rest/admin/types');
this.controllerAction = function() {
this.jsonService(this.service('admin/types/list'));
};
}
listController.prototype = new ctrlFactory.list();
funct... |
/**
* Extend module's NODE_PATH
* HACK: temporary solution
*/
require('node-path')(module);
/**
* Module dependencies.
*/
var mongoose = require('mongoose');
var Comment = mongoose.model('Comment');
var utils = require('lib/utils');
var pluck = utils.pluck;
var config = require('lib/config');
var t = require('t... |
'use strict';
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var React = _interopDefault(require('react'));
var _extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (v... |
import ethUtil from 'ethereumjs-util'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { ENVIRONMENT_TYPE_NOTIFICATION } from '../../../../app/scripts/lib/enums'
import { getEnvironmentType } from '../../../../app/scripts/lib/util'
import ConfirmPageContainer, { ConfirmDetailRow } from... |
import './index.css';
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
ReactDOM.render(
<App />,
document.getElementById('root')
); |
deepmacDetailCallback("988bad000000/24",[{"d":"2011-08-27","t":"add","a":"Ashford Mill\nStation Road\nFordingbridge Hampshire SP6 1DZ\n","c":"UNITED KINGDOM","o":"Corintech Ltd."},{"d":"2015-08-27","t":"change","a":"Ashford Mill Fordingbridge Hampshire GB SP6 1DZ","c":"GB","o":"Corintech Ltd."}]);
|
jest.mock('./../../../src/infrastructure/config', () => require('./../../utils').configMockFactory());
jest.mock('./../../../src/infrastructure/logger', () => require('./../../utils').loggerMockFactory());
jest.mock('login.dfe.policy-engine');
jest.mock('./../../../src/infrastructure/organisations');
jest.mock('./../.... |
# https://leetcode.com/problems/cousins-in-binary-tree/
class Solution:
def isCousins(self, root: Optional[TreeNode], x: int, y: int) -> bool:
queue = deque()
queue.append(root)
parent = {}
found = 0
while queue:
levelSize = len(queue)
... |
#5
def isAbundant(input_no):
#6
total = 0
#7
for i in range(1,input_no):
#8
if(input_no % i == 0):
#9
total = total + i
if(total > input_no):
return True
#10
if(total > input_no):
return True
else :
return False
#1
no = 1
while(True):
#2
if(isAbundant(no) and no%2 != 0):
#3
prin... |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
__author__ = 'Guy Kisel'
__email__ = 'guy.kisel@gmail.com'
__version__ = '4.2.0'
|
import React, { useEffect, useContext, useState } from "react";
import { Context } from "../../Context";
import { likedByAuthor } from "../../ApiUtils";
import LikeComponent from "../Likes/LikeComponent";
const LikedByAuthor = (props) => {
const context = useContext(Context);
const [likes, updateLikes] = useState(... |
# Copyright 2013-2019 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 *
class Charliecloud(MakefilePackage):
"""Lightweight user-defined software stacks for HPC."""
... |
/**
* Caches the passed value in the passed class instance, so that it doesn't have
* to be recomputed. Note that the `propertyName` must be the same as the getter,
* so that the getter is overwritten.
* @example
* ```js
* class Example {
* get myProperty() {
* const result = someExpensiveComputation();
... |
import { getApp, _getProvider, _registerComponent, registerVersion } from '@firebase/app';
import { Component } from '@firebase/component';
import { __awaiter, __generator, __spreadArray, __read, __values, __assign } from 'tslib';
import { ErrorFactory, FirebaseError } from '@firebase/util';
import { openDb } from 'idb... |
import stat from '../stat'
describe('stat', () => {
it('should be function', () => {
expect(typeof stat).toBe('function')
})
it('should have sync function', () => {
expect(typeof stat.sync).toBe('function')
})
})
|
import config from 'config';
import moment from 'moment';
import winston from 'winston';
// Log levels:
// { error: 0, warn: 1, info: 2, verbose: 3, debug: 4, silly: 5 }
function timestamp() {
return moment().format('YYYY-MM-DD HH:mm:ss.SSS Z');
}
function loggerFactory(label) {
return new winston.Logger({
t... |
'use strict';
/**
* Module dependencies.
*/
var should = require('should'),
mongoose = require('mongoose'),
User = mongoose.model('User'),
Location = mongoose.model('Location');
/**
* Globals
*/
var user, lction;
/**
* Unit tests
*/
describe('Location Model Unit Tests:', function() {
beforeEach(function(do... |
import "core-js/modules/es.array.map.js";
import "core-js/modules/es.array.filter.js";
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
import { invalidSimpleCellAddress } from './Cell';
import { NamedExpressionDependency } from './parser';
import { AbsoluteCellRange } from './AbsoluteCellRa... |
import { mapActions } from 'vuex';
const install = function(Vue, options = {}) {
Vue.mixin({
methods: {
...mapActions({
$delSession: 'delSession'
}),
$closeView() {
return this.$delSession(this.$route);
}
}
});
};
export default {
name: 'close-view',
install
}... |
import * as React from 'react';
export function VideoChatImage() {
return (
<svg viewBox="0 0 807.0639 517.11635">
<rect
x="0.34446"
y="0.45733"
width="806.71944"
height="516.65902"
fill="#e6e6e6"
/>
<rect x="15.46842" y={48} width="776.47152" height={456... |
var __extends=this&&this.__extends||function(){var e=function(t,i){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)if(t.hasOwnProperty(i))e[i]=t[i]};return e(t,i)};return function(t,i){e(t,i);function n(){this.constructor=t}t.prototype=i===null?Object.... |
from flask import *
app = Flask(__name__)
import RPi.GPIO as GPIO
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BCM)
# leds
amarillo = 17
verde = 18
GPIO.setup(amarillo, GPIO.OUT)
GPIO.output(amarillo, GPIO.LOW)
GPIO.setup(verde, GPIO.OUT)
GPIO.output(verde, GPIO.LOW)
@app.route('/')
def home():
templateData = {
'... |
import unittest
from pathlib import Path
from cw.flex_file import flex_load, flex_dump, determine_serialization
from cw.rm import rm, rrmdir
from cw.object_hierarchies import object_hierarchy_equals
from cw.serializers import yaml, msgpack
from cw.test import test_path
from itertools import product
import pickle
impo... |
var appInstance = getApp();
function request(params) {
if (!_validateAttr(params.url)) {
params.fail();
return;
}
var requestUrl = params.url;
if (requestUrl.substr(0, 4) != 'http') {
requestUrl = appInstance.globalData.baseUrl + params.url;
}
if (!_validateAttr(params.me... |
const Product = require("./Product");
const UpdateProduct = require("./UpdateProduct");
class CarInsurance {
constructor(products) {
this.products = products;
}
updatePrice() {
const products = []
for (const product of this.products) {
products.push(new UpdateProduct(product).execute());
}
... |
import React, { useEffect, useState, useRef } from 'react'
import Form from '../../components/Forms/form'
import { useHistory, useParams } from 'react-router-dom'
import { CKEditor } from '@ckeditor/ckeditor5-react';
// import ClassicEditor from '@ckeditor/ckeditor5-build-classic';
import { Editor as TinyMCE } from '@... |
import React from 'react';
import Slideshow from '../components/Slideshow';
import Tweet1 from '../static/images/tweet1.png';
import Tweet2 from '../static/images/tweet2.png';
import Tweet3 from '../static/images/tweet3.png';
import Tweet4 from '../static/images/tweet4.png';
import Tweet5 from '../static/images/tweet5.... |
'use strict';
const TerserPlugin = require('terser-webpack-plugin');
const {CleanWebpackPlugin} = require('clean-webpack-plugin');
module.exports = {
mode: 'production',
context: `${__dirname}/src/`,
entry: {
'autocomplete-cpnt': './autocomplete-cpnt.js',
'autocomplete-cpnt.min': './auto... |
async function editFormHandler(event) {
event.preventDefault();
const title = document.querySelector('input[name="post-title"]').value.trim();
const category_name = document.querySelector('select[name="post-category"]').value;
const post_url = document.querySelector('input[name="post-url"]').value;
... |
/* istanbul ignore else */
if (process.env.NODE_ENV === 'test')
var configPath = './testing_config.js';
else
var configPath = './config.js';
var config = require(configPath);
var strings = require('./strings.js');
var restify = require('restify');
var fs = require('fs');
var path = require('path');
var FORBIDDEN... |
import { useState, useEffect, useCallback } from 'react'
function useLocalStorage(key, initialValue) {
const [sortLocalStorageValue, setSortLocalStorageValue] = useState(() => {
try {
let value = window.localStorage.getItem(key)
return value ? JSON.parse(value) : initialValue
} catch (error) {
console.lo... |
from functools import update_wrapper
from django import forms
from django.contrib import admin, messages
from django.template import loader
from django.utils.decorators import method_decorator
from django.views.decorators.debug import sensitive_post_parameters
from django.core.exceptions import PermissionDenied
from d... |
const IF = async (d) => {
const interpreter = require("../../interpreter.js");
let code = d.code;
let message = d.message;
let client = d.client;
let args = d.args;
if (code.toLowerCase().includes("$if[")) {
for (let statement of code
.split(/\$if\[/gi)
.slice(1)
... |
import React from 'react';
import {Animated, View, FlatList, Text, TouchableOpacity, I18nManager} from "react-native";
const KeyboardView = ({keyboardOnPress, pinLength, onComplete, bgColor, returnType, textColor, animatedDeleteButton, deleteText, animatedDeleteButtonOnPress, styles}) => {
let data;
if(I18nManager... |
/**
* Provides drop down menus for list of action links.
*
* @module moodle-course-management
*/
/**
* Management JS console.
*
* Provides the organisation for course and category management JS.
*
* @namespace M.course.management
* @class Console
* @constructor
* @extends Base
*/
Console = function() {
... |
def create_table(table, headers=None):
if headers:
headerstring = "\t{}\t" * len(headers)
print(headerstring.format(*headers))
rowstring = "\t{}\t" * len(table[0])
for row in table:
print(rowstring.format(*row))
|
# ---
# jupyter:
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---
# %%
cat = 42
|
/*Author: Xterminator
NPC Name: Mr. Goldstein
Map(s): Victoria Road : Lith Harbour (104000000)
Description: Extends Buddy List
var status = 0;
function start() {
status = -1;
}
/*
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (status == 0 && mod... |
import React, { useMemo } from 'react';
import { View, StyleSheet } from 'react-native';
import TransactionShape, { TransactionKind } from '../../data/model-shapes/Transaction';
import { ListItem, Icon } from 'react-native-elements';
import Colors from '../../utils/styling/Colors';
const TransactionListItem = ({ trans... |
import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(React.createElement(React.Fragment, null, React.createElement("path", {
d: "M21.5 4c-.83 0-1.5.67-1.5 1.5v5c0 .28-.22.5-.5.5s-.5-.22-.5-.5v-8c0-.83-.67-1.5-1.5-1.5S16 1.67 16 2.5v8c0 .28-.22.5-.5.5s-.5-.22-.5-.5... |
from cryptowatch.utils import log
from cryptowatch.auth import read_config
from cryptowatch.requestor import Requestor
from cryptowatch import stream
from cryptowatch.resources.assets import Assets
from cryptowatch.resources.instruments import Instruments
from cryptowatch.resources.exchanges import Exchanges
from crypt... |
"""[Default values]
What happens at run time...
When modules are loaded: All the code is executed immediately.
Module Code
a = 10 the interger object 10 is created and a references it.
def func(a): the function object is created, and func references it.
print(a)
... |
from devices.boolean_sensor import BooleanSensor
class ContactSensor(BooleanSensor):
def __init__(self, alias, value_key, device_name_suffix = ''):
super().__init__(alias, value_key, BooleanSensor.SENSOR_TYPE_CONTACT, device_name_suffix)
|
const webpack = require('webpack')
const paths = require('./paths')
module.exports = {
mode: 'development',
output: {
filename: '[name].js',
path: paths.outputPath,
chunkFilename: '[name].js',
},
performance: {
hints: 'warning',
maxAssetSize: 450000,
maxEntrypointSize: 8500000,
ass... |
var myImage = document.querySelector('img')
var myRequest = new Request('flowers.jpg')
fetch(myRequest).then(function(response) {
return response.blob()
}).then(function(response) {
var objectURL = URL.createObjectURL(response)
myImage.src = objectURL
}) |
DD_ORIGIN = "_dd_origin"
AUTO_REJECT = 0
AUTO_KEEP = 1
USER_KEEP = 2
SAMPLE_RATE_METRIC_KEY = "_sample_rate"
SAMPLING_PRIORITY_KEY = "_sampling_priority_v1"
|
# -*- coding: utf-8 -*-
"""Converter for WikiPathways."""
import logging
from typing import Iterable
import bioversions
from .gmt_utils import parse_wikipathways_gmt
from ..constants import SPECIES_REMAPPING
from ..struct import Obo, Reference, Term, from_species
from ..struct.typedef import has_part
from ..utils.p... |
var _extend = require("../../core/utils/extend").extend,
inArray = require("../../core/utils/array").inArray,
_each = require("../../core/utils/iterator").each,
rangeCalculator = require("./helpers/range_data_calculator"),
typeUtils = require("../../core/utils/type"),
vizUtils = require("../core/uti... |
var validation__mode_8h =
[
[ "EnableBitfieldOperators< ValidationMode >", "structktt_1_1_enable_bitfield_operators_3_01_validation_mode_01_4.html", "structktt_1_1_enable_bitfield_operators_3_01_validation_mode_01_4" ],
[ "ValidationMode", "validation__mode_8h.html#a3baf318a03750f7418a5faa051967c04", [
[ ... |
const express = require('express');
const Notes = require('./trip_notesModel.js');
const router = express.Router();
/******************GETS************* */
router.get('/', (req,res)=>{
console.log(req.body)
Notes.find()
.then(notes=>{
res.json(notes)
})
.catch(err=>{
res.status(5... |
# Generated by Django 3.0.8 on 2020-08-16 18:03
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('app_jumanji', '0006_auto... |
let fs = require('fs');
let Eos = require('eosjs');
let httpEndpoint = 'https://api-kylin.eosasia.one';
let chainId = '5fff1dae8dc8e2fc4d5b23b2c7665c97f9e9d8edf2b6485a86ba311c25639191';
var secret = fs.readFileSync('buy/key.txt', {encoding: 'utf8'});
let keyProvider = [secret];
let eos = Eos({httpEndpoint, chainId, k... |
"""
WSGI config for household_budget project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.s... |
import argparse
import pandas as pd
if __name__ == "__main__":
parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument("--tip-attributes", required=True, help="table of tip attributes from one or more timepoints")
parser.add_argument("--output", require... |
const submitForm = () => {
const regex = new RegExp(
/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/gi
);
const value = document.getElementById("input").value;
if (value.match(regex)) {
document.getElementById("submit").innerHTML = ... |
from django.apps import AppConfig
class HouseplantsApiConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'houseplants_api'
|
/* */
"format cjs";
import { DOM } from 'angular2/src/platform/dom/dom_adapter';
/**
* A service that can be used to get and set the title of a current HTML document.
*
* Since an Angular 2 application can't be bootstrapped on the entire HTML document (`<html>` tag)
* it is not possible to bind to the `text` ... |
function ShapePath(){
this.c = false;
this._length = 0;
this._maxLength = 8;
this.v = createSizedArray(this._maxLength);
this.o = createSizedArray(this._maxLength);
this.i = createSizedArray(this._maxLength);
}
ShapePath.prototype.setPathData = function(closed, len) {
this.c = closed;
this.setLength(len);
var... |
import React, { useRef, useState, useEffect} from 'react';
import panzoom from 'panzoom';
import { Paper, Box, Stack, Button, Typography } from '@mui/material';
import PanZoomModal from '../components/PanZoomModal'
import * as utl from './svg_utils'
import FullscreenIcon from '@mui/icons-material/Fullscreen';
import... |
import os.path
import sys
import numpy as np
try:
import matplotlib.pyplot as plt
except:
print("Error importing pyplot from matplotlib, please install matplotlib package first...")
sys.tracebacklimit=0
raise Exception("Importing matplotlib failed")
if __name__ == '__main__':
#b = np.loadtxt('/ho... |
gXMLBuffer="<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?><pk><wd nm=\"rintermark\" rd=\"1223,0:9847,9932:0\"/><wd nm=\"rintername\" rd=\"227,0:860,1027,1074:0|248,0:7934:0|894,0:1663:0|895,0:1460,1667,1833,1987:0|1084,0:6854:0|1130,0:97602,97656,97871:0|1223,8:371,7689,7992,13215,19627,19754,19800,19965,... |
import Home from './pages/home'
export default {
pages: () => [
{
label: 'Home',
path: '',
component: Home,
},
{
label: "Hackathon",
children: [
{
label: 'Schedule',
children: ['Event', 'Location', 'Tag']
},
{
label: 'Con... |
/**
* cn - 可展开(受控)
* -- 当传入一个expandKeys时,展开会变成受控的,需要自行在column里面的onClick去处理
* en - Expand(controlled)
* -- When an expandKeys is provided, the expansion becomes controlled and needs to be processed by the onClick in the column.
*/
import React from 'react'
import { Table } from 'shineout'
import { fetchSync }... |
"""
Tests for the swflows.py module
"""
from datetime import datetime
from pathlib import Path
import numpy as np
import pandas as pd
import pytest
from mfobs.obs import get_spatial_differences, get_temporal_differences
from mfobs.swflows import get_flux_obs
@pytest.fixture
def flux_obs_input(shellmound_data_path):
... |
module.exports = {
env: {
es6: true,
node: true,
},
extends: ['eslint:recommended', 'plugin:prettier/recommended'],
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
rules: {
indent: ['error', 2, { SwitchCase: 1 }],
'linebreak-st... |
/**
* Bootstrap Table Afrikaans translation
* Author: Phillip Kruger <phillip.kruger@gmail.com>
*/
(function ($) {
'use strict';
$.fn.bootstrapTable.locales['af-ZA'] = {
formatLoadingMessage: function () {
return 'Besig om te laai, wag asseblief ...';
},
format... |
/*
* Copyright (C) 2015. The CloudKit Open Source Project
*
* 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 a... |
"""
ntpc9
OMP_NUM_THREADS 1
MKL_NUM_THREADS 1
nt
3.2839200710877776
[3.289062741678208, 3.2875119652599096, 3.277139882091433]
librosa
1.6728829271160066
[1.6732992688193917, 1.663632761221379, 1.6640413324348629]
scipy
3.2334349588491023
[3.255621672142297, 3.2345176991075277, 3.2378146476112306]
python_speech_fea... |
const avatars = [
"/home/pringon/dev/workshops/frontend/vanilla/icons/alek.jpg",
"/home/pringon/dev/workshops/frontend/vanilla/icons/dan.png",
"/home/pringon/dev/workshops/frontend/vanilla/icons/nicky.jpg",
"/home/pringon/dev/workshops/frontend/vanilla/icons/velina.jpg",
];
function addAvatars(labels) {
retu... |
/* this 是函数的运行上下文 */
let log = console.log;
function bbb() {
log(this);
}
let objA = {
b: bbb,
c: {
d: bbb
}
};
bbb(); // this -> window
objA.b(); // this -> objA
objA.c.d(); // this -> objA.c |
var path = require("path");
/**
* OPTIONS /coursereserves/courses?query=courseListingId=="79702b52-0d7e-48ea-b7ef-a4e74289f000" not (id=="c62e7511-dbe4-44e5-8592-9777d409ed42")
*
* connection: keep-alive
* host: folio-snapshot-okapi.dev.folio.org
* proxy-connection: keep-alive
* accept: * / *
* access-control-r... |
def extractHakushakuToYousei(item):
"""
Parser for 'Hakushaku to Yousei'
"""
vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title'])
if not (chp or vol) or 'preview' in item['title'].lower():
return None
if 'WATTT' in item['tags']:
return buildReleaseMessageWithType(item, 'WATTT', vol, chp, ... |
import {
createStore, combineReducers,
} from 'redux';
import app from './models/app/model';
import book from './models/book/model';
import DevTool from './DevTool';
import { destruct } from '../src/index';
const store = createStore(() => {}, {}, DevTool().instrument());
const { reducers, connect } = destruct(store)... |
# coding: utf-8
# -----------------------------------------------------------------------------------
# <copyright company="Aspose Pty Ltd">
# Copyright (c) 2003-2021 Aspose Pty Ltd
# </copyright>
# <summary>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and ass... |
"""Utility meter from sensors providing raw data."""
from datetime import date, timedelta
from decimal import Decimal, DecimalException
import logging
import voluptuous as vol
from homeassistant.components.sensor import SensorEntity
from homeassistant.const import (
ATTR_UNIT_OF_MEASUREMENT,
CONF_NAME,
EV... |
"""Utilities for input validation"""
# Original authors from Sckit-Learn:
# Olivier Grisel
# Gael Varoquaux
# Andreas Mueller
# Lars Buitinck
# Alexandre Gramfort
# Nicolas Tresegnie
# Sylvain Marie
# License: BSD 3 clause
# This code originates from the... |
import itertools
import warnings
# 3rd-party modules
import holoviews as hv
from holoviews import opts, dim
from holoviews.operation.datashader import datashade, bundle_graph
import networkx as nx
import pandas as pd
# My handwritten modules
from .s3_utils import savefig
from . import knn
from . import sourmash_utils... |
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.metadataConfig = exports.lyricConfig = exports.cliOptions = void 0;
const yargs_1 = __importDefa... |
/* eslint-disable */
var path = require("path");
var express = require("express");
var webpack = require("webpack");
var config = require("./webpack.config");
var app = express();
var compiler = webpack(config);
var serverPort = process.env.PORT || 3000;
app.use(require("webpack-dev-middleware")(compiler, {
publi... |
/*!
* fullpage.js Reset Scroll Overflow 0.0.3 for fullPage.js v3
* https://github.com/alvarotrigo/fullPage.js
*
* @license This code has been bought from www.alvarotrigo.com/fullPage/extensions/ and it is not free to use or distribute.
* Copyright (C) 2016 alvarotrigo.com - A project by Alvaro Trigo
*/
window.fp_... |
/**
* Created by Игорь on 14.09.2018.
*/
var cache=require('../../lib/cache');
var request=require('request');
var moment=require('moment')
var path=require('path');
var zlib = require('zlib');
var isWin = /^win/.test(process.platform);
/*if(!isWin){
var mongoose = require('mongoose');
var Account=mongoose.mo... |
import cv2
import numpy as np
img=cv2.imread("face1.jpg",1)
print(img) |
(window.webpackJsonp=window.webpackJsonp||[]).push([[62],{222:function(t,a,s){"use strict";s.r(a);var r=s(0),e=Object(r.a)({},function(){this.$createElement;this._self._c;return this._m(0)},[function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("div",{staticClass:"content"},[s("h1",{attrs:{id:"props"}},[s("... |
from numpy import *
from pylab import *
import postgkyl
import scipy.optimize
style.use('../code/postgkyl.mplstyle')
def func(an, f0, f1):
g0 = an[0]; g1 = an[1]
rhs0 = ((exp(g1+g0))/(g1)-(exp(g0-g1))/(g1))/(sqrt(2.0))
rhs1 = (sqrt(3)*(((exp(g0)*g1-exp(g0))*exp(g1))/(g1**2)+((exp(g0)*g1+exp(g0))*exp(-g1)... |
/* @flow */
import { inBrowser } from './dom'
import { saveScrollPosition } from './scroll'
// 判断浏览器是否支持pushState方法
export const supportsPushState = inBrowser && (function () {
const ua = window.navigator.userAgent
// 这些浏览器都支持
if (
(ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) &&
... |
import dataclasses
import pandas as pd
from lib.akibasouken.scrape.anime import Anime
def long_text_to_df(anime: Anime) -> pd.DataFrame:
data = {
'anime_id': anime.anime_id,
**dataclasses.asdict(anime.long_text),
}
return pd.Series(data).to_frame().T
|