text stringlengths 3 1.05M |
|---|
class colors:
'''Colors class:
reset all colors with colors.reset
two subclasses fg for foreground and bg for background.
use as colors.subclass.colorname.
i.e. colors.fg.red or colors.bg.green
also, the generic bold, disable, underline, reverse, strikethrough,
and invisible work with the ma... |
var e=Object.defineProperty,a=Object.defineProperties,s=Object.getOwnPropertyDescriptors,t=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,r=(a,s,t)=>s in a?e(a,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[s]=t,n=(e,a)=>{for(var s in a||(a={}))o.call(a,... |
/**
* Description : This is a test suite that tests an LRS endpoint based on the testing requirements document
* found at https://github.com/adlnet/xAPI_LRS_Test/blob/master/TestingRequirements.md
*
* https://github.com/adlnet/xAPI_LRS_Test/blob/master/TestingRequirements.md
*
*/
(function (process, request, shou... |
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-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.
#ifndef BITCOIN_HASH_H
#define BITCOIN_HASH_H
#include <crypto/ripemd160.h>
#inc... |
#!/usr/bin/env python
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
This module provides the base class for all autonomous agents
"""
from __future__ import print_function
import carla
from srunner.autoagents.sensor_interface import SensorI... |
from numpy.testing import *
import numpy as np
rlevel = 1
class TestRegression(TestCase):
def test_kron_matrix(self,level=rlevel):
"""Ticket #71"""
x = np.matrix('[1 0; 1 0]')
assert_equal(type(np.kron(x,x)),type(x))
def test_matrix_properties(self,level=rlevel):
"""Ticket #12... |
#include "../CML.h"
#include "CMLColorMachineState.h"
#if CML_DEBUG
CML_DEF void cml_Error(const char* functionSymbol, const char* text){
fprintf(stderr, "Error in %s: %s", functionSymbol, text);
// //////////////////////////
// Set a breakpoint in the following line to debug.
// ////////////////... |
# -----------------
# User Instructions
#
# Write a function, readwordlist, that takes a filename as input and returns
# a set of all the words and a set of all the prefixes in that file, in
# uppercase. For testing, you can assume that you have access to a file
# called 'words4k.txt'
def prefixes(word):
"A lis... |
//
// ZZQMenu.h
// FItBodyUser
//
// Created by ben on 17/4/4.
// Copyright © 2017年 张增强. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface ZZQMenu : NSObject
//菜品名称
@property(nonatomic, copy)NSString * name;
//菜品的卡路里数
@property(nonatomic, copy)NSString * calorie;
//价格
@property(nonatomic, copy... |
from flask import Blueprint
from flask import render_template, redirect, url_for, request, session, jsonify
from flask_login import login_user, logout_user, current_user
from app.master import bp
from app.master.model import Department, DepartmentSchema
from app import db, ma
# Emp. Cat Master Routes
@bp.route('/ge... |
/*
AngularJS v1.6.4
(c) 2010-2017 Google, Inc. http://angularjs.org
License: MIT
*/
(function(R,y){'use strict';function Ea(a,b,c){if(!a)throw Oa("areq",b||"?",c||"required");return a}function Fa(a,b){if(!a&&!b)return"";if(!a)return b;if(!b)return a;W(a)&&(a=a.join(" "));W(b)&&(b=b.join(" "));return a+" "+b}function... |
'use strict';
const CachedManager = require('./CachedManager');
const { Error, TypeError, RangeError } = require('../errors');
const BaseGuildVoiceChannel = require('../structures/BaseGuildVoiceChannel');
const GuildMember = require('../structures/GuildMember');
const Role = require('../structures/Role');
const Collec... |
function getEventX(event) {
var posx = 0;
if (event.pageX || event.pageY) {
posx = event.pageX;
}
else if (event.clientX || event.clientY) {
posx = event.clientX + document.body.scrollLeft
+ document.documentElement.scrollLeft;
}
return posx;
}
function getElementX(obj) {
var x = 0;
if (obj.offsetParen... |
from matplotlib import pyplot
import numpy as np
data_name = 'Lorenz1'
experiment_tag = 'experiment_18'
date = '2021_12_07_12_46_16_804693'
## Load Data
f = open('./DeepDMD_results/' + data_name + '_' + experiment_tag + '_' + date + '_error.csv')
f_lines = f.readlines()
len_f = len(f_lines) - 1
## Store Data
data = ... |
#!/usr/bin/env python
# Copyright (C) 2013 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list ... |
import { Meteor } from 'meteor/meteor';
import { Match } from 'meteor/check';
import { RocketChat } from 'meteor/rocketchat:lib';
RocketChat.saveRoomAnnouncement = function(rid, roomAnnouncement, user, sendMessage = true) {
if (!Match.test(rid, String)) {
throw new Meteor.Error('invalid-room', 'Invalid room', { fun... |
$(function() {
consoleInit()
start(main)
})
const BSC_ICE_CHEF_ABI = [
{
inputs: [
{internalType: 'contract IERC20', name: '_ice', type: 'address'},
{internalType: 'uint256', name: '_icePerSecond', type: 'uint256'},
{internalType: 'uint32', name: '_startTime', type: 'uint32'},
],
st... |
#!/usr/bin/env python
"""
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");... |
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_INTL_SUPPORT
#error Internationalization is expected to be enabled.
#endif // V8_INTL_SUPPORT
#ifndef V8_OBJECTS_JS_LOCALE_INL_H_
#define V... |
// TODO: @ flow
// Copyright (c) 2017 Uber Technologies, 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 ap... |
# The essentials
import pandas as pd
import numpy as np
# CLI & Logging
import click
import logging
# tsfresh Feature Extraction
from tsfresh import extract_features
from tsfresh.feature_extraction import EfficientFCParameters
from tsfresh.utilities.dataframe_functions import impute
def encode_categorical(df):
... |
//~ name b603
alert(b603);
//~ component b604.js
|
//= require member-facing
describe("Fundraiser", function() {
var suite = this;
suite.timeout(20000);
before(function() {
suite.validatePath = /\/api\/pages\/[0-9]+\/actions\/validate/;
window.onbeforeunload = function(){
// the javascript has redirects, this prevents them firing if you view the t... |
const Base = 'https://cbsservis.tkgm.gov.tr/megsiswebapi.v3/api';
const Origin = 'https://parselsorgu.tkgm.gov.tr';
module.exports = {
Base,
Origin,
};
|
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.TableDataStore = undefined;
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor ... |
## -*- encoding: latin-1 -*-
from numpy import *
import h5py
class kpath_extract:
def __init__(self,p,h,b,g):
### G function
k_HSP, gkio_HSP = kpath_extract.kpath_extractor(p,\
(trace(g.gkio[b.f_iwn_zero_ind],0,1,2)/3).reshape(p.nk1,p.nk2,p.nk3))
... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import abc
from flask import abort
class RenderParameter:
"""
parameter for render_template
"""
def __init__(self, view: str, **params):
"""
constructor
:param view: view file name
:param params: parameters
"""
... |
var TEMPLATE_TAGS=[{id:1,name:"RId",description:"The unique ID for the recipient."},{id:2,name:"FirstName",description:"The recipient's first name."},{id:3,name:"LastName",description:"The recipient's last name."},{id:4,name:"Position",description:"The recipient's position."},{id:5,name:"From",description:"The address ... |
# -*- coding: utf-8 -*-
# Copyright (c) 2014, Vispy Development Team.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from __future__ import division
import numpy as np
from .shaders import Function, FunctionChain
from ..util import transforms
from ..util.geometry import Rect
from ..util.ev... |
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2002-2018, Industrial Light & Magic, a division of Lucas
// Digital Ltd. LLC
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that th... |
/*
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
* Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der S... |
# -*- coding: utf-8 -*-
# Copyright 2013 Mirantis, 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 requi... |
const gulp = require('gulp');
const plumber = require('gulp-plumber');
const chokidar = require('chokidar');
const vinylPaths = require('vinyl-paths');
const del = require('del');
const size = require('gulp-size');
const config = require('./includes/config.js');
const utils = require('./includes/utilities.js');
const ... |
#MenuTitle: Copy Unicode-Sorted Glyph Name List
# -*- coding: utf-8 -*-
__doc__="""
Creates a glyph list of all encoded glyphs, in Unicode order, and puts in your clipboard for pasting.
"""
import GlyphsApp
from AppKit import *
thisFont = Glyphs.font # frontmost font
listOfEncodedGlyphs = [ g for g in thisFont.glyphs... |
#pragma once
#include "PluginData.h"
namespace ed {
namespace pluginfn {
typedef void (*AddObjectFn)(void* objects, const char* name, const char* type, void* data, unsigned int id, void* owner);
typedef bool (*AddCustomPipelineItemFn)(void* pipeline, void* parent, const char* name, const char* type, void* data, v... |
import React, { Fragment } from "react";
import { graphql } from "gatsby";
import Layout from "../components/Layout";
export const AboutPageTemplate = ({
banner,
overview,
message,
certification
}) => {
return (
<Fragment>
{/* banner goes below */}
<div
style={{
background:... |
"""
Restriction and Interpolation
=============================
This example shows how to use the :py:class:`pylops.Restriction` operator
to sample a certain input vector at desired locations ``iava``. Moreover,
we go one step further and use the :py:class:`pylops.signalprocessing.Interp`
operator to show how we can a... |
from ..manager import FullTextManager, ImageManager
from .settings import SEARCH_PARAMS, SEARCH_FIELDS, SEARCH_URL, PUBLICATION_URL
from .schema import PublishedApplicationSchema, PublishedApplicationImageSchema
from .model import PublishedApplicationResult
class PublishedApplicationManager(FullTextManager):
__sch... |
import AddUser from './AddUser';
import AddTimeSlot from './AddTimeSlot';
const MyDialogs = {
AddUser,
EditUser: AddUser,
AddTimeSlot
};
export default popupName => MyDialogs[popupName];
|
# Generated by Django 3.1.4 on 2021-01-12 06:50
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('user', '0005_auto_20210112_1207'),
]
operations = [
migrations.AlterField(
model_name='profile',
name='gurus',
... |
"""An experiment plotting net worth values over time in all operating currencies.
from: https://github.com/beancount/beanlabs/blob/master/beanlabs/compensation/net-worth-over-time.py
"""
from beancount.parser import options
from beancount.core.number import ZERO
from beancount.core.data import Currency
from beancount.... |
import gc
import numpy as np
import nanogui
import nanogui.nanovg as nvg
from nanogui import *
import manifolds
from misc import *
from modes.raytracing import *
from modes.manifold_exploration import *
from modes.specular_manifold_sampling import *
from scenes import create_scenes
class Input:
def __init__(self... |
#!/usr/bin/env python3
# run BBKNN method
import argparse
import bbknn
import scanpy as sc
import anndata
# save bbknn output
def save_corrected_object(dataset):
dataset.write(args.output_object)
def main(dataset):
'''This function runs PCA, runs BBKNN and saves the corrected object'''
# compute PCA
... |
$(document).ready(function(){$(".play-choice").off("click").on("click",function(){var a=$(this);$("#answer-checker").show();var e="alias="+$("#alias").html()+"&choice="+a.data("choice");$.ajax({type:"POST",url:"/answer",data:e,success:function(e){var c=JSON.parse(e);$(".play-choice").attr("disabled","disabled"),c.corre... |
'use strict';
var config = require('./development');
config.logs = {
pathAccess: config.dir.logPath,
predefined: 'dev',
rotation: '3d'
};
// ======[ DATABASE ]======
config.db.credential = {
database: '<%= dbName %>',
host: 'mongo',
user: '',
pw: '',
port: 27017
};
config.db.cluster = false; // us... |
'use strict'
var _ = require('../util/_')
var bs58 = require('bs58')
var buffer = require('buffer')
/**
* The alphabet for the Bitcoin-specific Base 58 encoding distinguishes between
* lower case L and upper case i - neither of those characters are allowed to
* prevent accidentaly miscopying of letters.
*/
var AL... |
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
function _defineProperties(target, props) {
for(var i = 0; i < props.length; i++){
var descriptor = props[i];
descriptor.enumerabl... |
/* -*- C -*-
*
* $HEADER$
*
* The most basic of MPI applications
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "mpi.h"
int main(int argc, char* argv[])
{
int rank, size;
int errcode;
if (1 < argc) {
errcode = strtol(argv[1], NULL, 10);
} else {
errcode =... |
# Copyright 2018/2019 The RLgraph 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 shaderBuilder, {
vertexShaderBase,
fragmentShaderBase
} from '../shaderBuilder';
import * as vertexShaderSnippets from '../vertexShaderSnippets';
export default () => {
const vertexShader = shaderBuilder(vertexShaderBase);
const fragmentShader = shaderBuilder(fragmentShaderBase);
vertexShad... |
# -*- coding: utf-8 -*-
"""
This module contains the care line highlighter mode
"""
from qtpy import QtGui
from pyqode.core.api.decoration import TextDecoration
from pyqode.core.api.mode import Mode
class LineHighlighterMode(Mode):
""" Highlights a line in the editor."""
@property
def background(self):
... |
from typing import Union, Optional, Any, List, Tuple, Dict, Type, AsyncGenerator
import logging
from urllib.parse import urlparse
import asyncio
from asyncio import Queue
from random import choice
from functools import wraps
from grpclib.client import Channel, Stream
from grpclib.exceptions import StreamTerminatedErr... |
import argparse
from typing import Union
from rasa.cli.arguments.default_arguments import add_model_param, add_endpoint_param
from rasa.core import constants
def set_run_arguments(parser: argparse.ArgumentParser) -> None:
"""Arguments for running Rasa directly using `rasa run`."""
add_model_param(parser)
... |
/*
* LiskHQ/lisk-service
* Copyright © 2021 Lisk Foundation
*
* See the LICENSE file at the top-level directory of this distribution
* for licensing information.
*
* Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation,
* no part of this software, including this file, may be copied, ... |
import ceeFields
import time, os
from datetime import datetime as dt
import json
# The CEE Event Class. Usage pattern is 'myev = CEEEvent(id="<id>",time=<ISO datetime>,action,status)
# You then set any additional attributes. This base class is meant to be expanded and the __str__
# method overriden for the specific... |
// This will take in an array of any ammount of numbers, and if
// the number is divisible by 3, it will console.log Fizz, if it is
// divisible by 5, it will console.log Buzz, and if the number is divisible
// by both 3 and 5, it will console.log "Fizz Buzz". Otherwise the number will be
// console.logged
var fi... |
# check gather_and_parse_imports.sh
from pprint import pprint
from graphviz import Digraph
from typing import List
from enum import Enum
import random
INPUT_FILE = "tmp/imports.log"
OUTPUT_FILE = "tmp/imports.gv"
SVG_COLORS = ["aliceblue", "antiquewhite", "aqua", "aquamarine", "azure", "beige", "bisque"... |
from datetime import datetime
import requests
from voluptuous import Schema, Required, All, Any, Length, Range
class ISS(object):
"""Representation of the ISS details."""
API_URL = "http://api.open-notify.org/"
API_CURRENT_LOCATION = "iss-now.json"
API_PASS_TIMES = "iss-pass.json"
API_PEOPLE = "as... |
const router = require('express').Router();
const User = require('../../models/User');
router.post('/register' , async (req, res) => {
const user = new User({
email: req.body.email,
password: req.body.password
})
try{
const newUser = await user.save();
res.status(201).json(newUser);
} catch (er... |
# coding=utf8
# Copyright 2018 JDCLOUD.COM
#
# 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 ... |
module.exports = {
Workout: require("./workout")
} |
// @flow
import { mockServer, mockList } from '../index';
describe('getDefautMock', () => {
const schemaDefinition = `
schema {
query: Query
}
type Query {
boolean: Boolean
enum: Enum
id: ID
int: Int
float: Float
string: String
listOfObjects: [Object]
... |
#!/usr/bin/env python3
# Copyright (c) 2020 The Plankton Authors.
# All rights reserved.
#
# This source code is derived from UUV Simulator
# (https://github.com/uuvsimulator/uuv_simulator)
# Copyright (c) 2016-2019 The UUV Simulator Authors
# licensed under the Apache license, Version 2.0
# cf. 3rd-party-licenses.txt ... |
import os
os.system('reboot')
|
import re
from string import Template
from webhelpers2.html import HTML, literal
import webhelpers2.html._render as render
from webhelpers2.html.tools import *
# I give up trying to convert all these eq_'s to plain asserts; there's too
# many of them and they're so long.
def eq_(a, b):
assert a == b
class TestT... |
--- chrome/browser/ui/views/chrome_views_delegate.h.orig 2020-11-13 06:36:38 UTC
+++ chrome/browser/ui/views/chrome_views_delegate.h
@@ -44,7 +44,7 @@ class ChromeViewsDelegate : public views::ViewsDelegat
HICON GetSmallWindowIcon() const override;
int GetAppbarAutohideEdges(HMONITOR monitor,
... |
export { default } from './eventDates'
|
from .handler import *
from .helper import *
from .control import *
from .actions import *
from .config import *
from .callbacktags import *
from .Wrapper import * |
from setuptools import setup, find_packages
with open("requirements.txt") as f:
install_requires = f.read().strip().split("\n")
# get version from __version__ variable in zh_pinto/__init__.py
from zh_pinto import __version__ as version
setup(
name="zh_pinto",
version=version,
description="Validation",
author="i... |
(function(angular, window) {
'use strict';
var globalsModule = angular.module('globals', []),
// Local registry of dependencies
registered = {},
// String of the lodash method for matching
// because lodash is defined anonymously
LO_DASH_METHOD = 'function () {\n return _;\n }';
/**
... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from funfact import active_backend as ab
from funfact.util.iterable import as_tuple
class Zeros:
'''Initializes all elements to 0.
Args:
dtype (None): Numerical type of elements.
'''
def __init__(self, dtype=None):
self.dtype = dtype or ab... |
""" This VR hand dexterity benchmark allows the user to interact with many types of objects
and interactive objects, and provides a good way to qualitatively measure the dexterity of a VR hand.
You can use the left and right controllers to start/stop/reset the timer,
as well as show/hide its display. The "overlay togg... |
#!/usr/bin/env python3
'''
Build the combined gencode and repeat data for te_hic
This is for the mm10 genome
'''
from glbase3 import *
rmsk_track_form = {"force_tsv": True, 'loc': 'location(chr=column[5], left=column[6], right=column[7])',
'repName': 10, 'repClass': 11, 'repFamily': 12}
chr_set = frozenset([... |
/*
Highstock JS v9.2.1 (2021-08-19)
Data grouping module
(c) 2010-2021 Torstein Hnsi
License: www.highcharts.com/license
*/
'use strict';(function(d){"object"===typeof module&&module.exports?(d["default"]=d,module.exports=d):"function"===typeof define&&define.amd?define("highcharts/modules/datagrouping",["highch... |
import click
from arbol.arbol import aprint, asection
from dexp.cli.defaults import _default_workers_backend
from dexp.cli.parsing import _get_output_path, _parse_channels, _parse_slicing
from dexp.datasets.open_dataset import glob_datasets
from dexp.datasets.operations.tiff import dataset_tiff
@click.command()
@cli... |
'use strict'
module.exports = {
command: 'key <command>',
description: 'Manage your keys',
builder (yargs) {
return yargs
.commandDir('key')
}
}
|
//
// Copyright (c) Microsoft and contributors. 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... |
[
{
"name": "Afghanistan",
"capital": "Kabul",
"languages": [
"Pashto",
"Uzbek",
"Turkmen"
],
"population": 27657145,
"flag": "https://restcountries.eu/data/afg.svg",
"currency": "Afghan afghani"
},
{
"name":... |
// Declaring class
class Vehicle {
constructor(id, name, batch, price) {
this.id = id;
this.name = name;
this.batchNo = batch;
this.price = price;
this.company = 'move.inc';
}
printVehicle() {
console.log(`${this.id}. ${this.name}, BATCH: ${this.batchNo}, ${this.price}`);
}
... |
from rest_framework import viewsets
from keywords.models import Keyword
from keywords.serializers import KeywordSerializer
from rest_framework.permissions import IsAuthenticatedOrReadOnly
from crawlers.tasks import sync_periodic_crawlers
class KeywordViewSet(viewsets.ModelViewSet):
"""
API endpoint that allo... |
Search.setIndex({docnames:["aws_appendix","aws_index","frontmatter","installing","introduction","last_update_code","manage_nodes","precautions","requirements"],envversion:52,filenames:["aws_appendix.rst","aws_index.rst","frontmatter.rst","installing.rst","introduction.rst","last_update_code.rst","manage_nodes.rst","pre... |
import {Link} from "gatsby";
import React from "react";
const LinkMenu = ({label, link, setActiveMob}) =>
<Link
onClick={() => setActiveMob()}
to={link}>
{label.markdownRemark.frontmatter.crumbLabel}
</Link>;
export default LinkMenu |
#!/usr/bin/env python3
import unittest
from sum_matrix import sum_matrix
class Test_sum_matrix(unittest.TestCase):
def setUp(self):
self.matrix = [[0, 3, 0], [1, 2, 1], [0, 6, 7]]
def test_sum_matrix_result(self):
self.assertTrue(20 == sum_matrix(self.matrix))
def test_sum_matrix_type(... |
import unittest
from streamlink.plugins.tf1 import TF1
class TestPluginTF1(unittest.TestCase):
def test_can_handle_url(self):
# should match
self.assertTrue(TF1.can_handle_url("http://tf1.fr/tf1/direct/"))
self.assertTrue(TF1.can_handle_url("http://tf1.fr/tfx/direct/"))
self.asser... |
import React from "react"
import { useStaticQuery, graphql } from "gatsby"
import Img from "gatsby-image"
const Image = () => {
const data = useStaticQuery(graphql`
query {
placeholderImage: file(relativePath: { eq: "Personal Space/Difficulty Graph.png" }) {
childImageSharp {
fluid(maxWid... |
import json
import os
import shutil
import zipfile
from os.path import join
from bzt import NormalShutdown, ToolError, TaurusConfigError
from bzt.engine import Service, Provisioning, EngineModule
from bzt.modules.blazemeter import CloudProvisioning
from bzt.modules.services import Unpacker, InstallChecker, AndroidEmul... |
/**********************************************************************
* Copyright (c) 2018-2020 Andrew Poelstra, Jonas Nick *
* Distributed under the MIT software license, see the accompanying *
* file COPYING or http://www.opensource.org/licenses/mit-license.php.*
*******************************... |
import React from 'react'
import Header from './Header'
import MemeGenerator from './MemeGenerator'
import About from './About'
import Contact from './Contact'
import Footer from './Footer'
function App(){
return(
<div>
<Header />
<MemeGenerator />
<About />
<Contact />
<Footer />
... |
import React from 'react';
import PropTypes from 'prop-types';
import { Breadcrumb } from 'react-bootstrap';
import { Link } from 'react-router-dom';
const Breadcrumbs = ({ config }) => {
return (
<Breadcrumb>
{config.map((item, index) => {
const { href, label, active } = item || {};
return... |
# Copyright (C) 2018-2020 The python-litecoin-utils developers
#
# This file is part of python-litecoin-utils
#
# It is subject to the license terms in the LICENSE file found in the top-level
# directory of this distribution.
#
# No part of python-litecoin-utils, including this file, may be copied,
# modified, propagat... |
# Author: Peter Hart <pjh6654@rit.edu>
import sys
import numpy as np
from scipy.odr import ODR, Model, RealData
def _chi_values(f, x, y, yerr, params):
# First we need to check if error for the dependent variable is given.
# These errors are necessary for calculating chi-squared values.
# If errors are n... |
import sys, time, itertools
sys.path.append('../')
sys.path.append('../../')
import pylab as p
import numpy as np
import matplotlib._cntr as cntr
import numpy.ma as ma
from scipy.optimize import fsolve
import scipy.optimize.lbfgsb as solver
import scipy.stats as s
from scipy.integrate import dblquad, quad
import scipy... |
const Router = require('koa-router');
const LearningPath = require('../models/learning_path');
const queryStringSearch = require('../middleware/queryStringSearch');
const permController = require('../middleware/userAccessControlMiddleware');
const router = new Router({
prefix: '/paths'
});
async function returnTyp... |
import React from "react";
import PropTypes from "prop-types";
const UndrawAgreement = props => (
<svg
style={{height:props.height, width:'100%'}}
className={props.class}
id="196ecc45-c3c6-4b7d-8685-374129418fe3"
data-name="Layer 1"
xmlnsXlink="http://www.w3.org/1999/xlink"
viewBox="0 0 885 8... |
"""Constants for the Plex component."""
from datetime import timedelta
from homeassistant.const import Platform, __version__
DOMAIN = "plex"
NAME_FORMAT = "Plex ({})"
COMMON_PLAYERS = ["Plex Web"]
TRANSIENT_DEVICE_MODELS = ["Plex Web", "Plex for Sonos"]
DEFAULT_PORT = 32400
DEFAULT_SSL = False
DEFAULT_VERIFY_SSL = T... |
"""Parsing and computing budgets."""
import datetime
from collections import Counter
from collections import defaultdict
from typing import Dict
from typing import List
from typing import NamedTuple
from typing import Tuple
from beancount.core.data import Custom
from beancount.core.number import Decimal
from fava.cor... |
/*
* This header is generated by classdump-dyld 1.0
* on Sunday, September 27, 2020 at 12:33:07 PM Mountain Standard Time
* Operating System: Version 14.0 (Build 18A373)
* Image Source: /System/Library/Accounts/Authentication/YahooAuthenticationPlugin.bundle/YahooAuthenticationPlugin
* classdump-dyld is licensed under ... |
message="这是信息1"
print(message)
message="这是信息2"
print(message) |
import datetime
import logging
import uuid
import warnings
from collections import Callable
from functools import partial
from io import BytesIO
import pandas as pd
from great_expectations.core.batch import Batch, BatchMarkers
from great_expectations.exceptions import BatchKwargsError
from great_expectations.types im... |
import React, { createContext } from "react";
import useAuth from "./useAuth";
const AuthContext = createContext();
const AuthProvider = ({ children }) => {
const { isAuth, loading, handleLogin, handleLogout } = useAuth();
return (
<AuthContext.Provider
value={{ loading, isAuth, handleLogin, handleLogout }}
... |