text stringlengths 3 1.05M |
|---|
def warn(*args, **kwargs):
pass
import warnings
warnings.warn = warn
import os
import zipfile
from os.path import join
from urllib.error import HTTPError
from sklearn.model_selection import StratifiedKFold
import pandas as pd
from quapy.data.base import Dataset, LabelledCollection
from quapy.data.preprocessing im... |
import json
import os
import argparse
def change_names(dataset, start, extension):
cnt = start
for image in dataset['images']:
new_name = "{}.{}".format(cnt, extension)
os.rename(image['file_name'], new_name)
image['file_name'] = new_name
image['flickr_url'] = new_name
... |
# Copyright 2020-2022 OpenDR European 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 applicable law or agree... |
import logging
from ibmsecurity.utilities import tools
logger = logging.getLogger(__name__)
# URI for this module
uri = "/wga/kerberos/config/domain_realm/"
requires_modules = ['wga']
requires_version = None
def get_all(isamAppliance, recursive='yes', includeValues='yes', check_mode=False, force=False):
"""
... |
const Product = require('./Product');
const Category = require('./Category');
const Tag = require('./Tag');
const ProductTag = require('./ProductTag');
Product.belongsTo(Category);
Category.hasMany(Product);
Product.belongsToMany(Tag, {
through: ProductTag,
foreignKey: 'product_id',
});
Tag.belongsToMany(Product... |
#!/usr/bin/env node
'use strict';
// 因为 webpackLauncher.config 需要用到,所以要放在最前面
process.env.NODE_ENV = 'development';
process.env.BABEL_ENV = 'development';
const { appDllBuild, dllEntry } = require('../config/webpackLauncher.config');
const { shouldBuildDll } = require('webpack-launcher-utils/dllEntryUtils');
if (shou... |
let express = require('express');
let router = express.Router();
require('./status')(router);
require('./auth')(router);
module.exports = router; |
'use strict';
// Declare app level module which depends on views, and components
angular.module('auther', [
'ngRoute',
'ngResource',
'auther.clients',
'auther.auth'
]).
config(['$locationProvider', '$routeProvider', function($locationProvider, $routeProvider) {
$locationProvider.hashPrefix('!');
$routeP... |
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# Martin Luessi <mluessi@nmr.mgh.harvard.edu>
# Eric Larson <larson.eric.d@gmail.com>
# Denis Egnemann <denis.engemann@gmail.com>
# License: BSD Style.
import os
import os.path as op
import shutil
import tarfile
import s... |
var path = require('path')
var webpack = require('webpack')
module.exports = {
entry: './src/main.js',
output: {
path: path.resolve(__dirname, './dist'),
publicPath: '/dist/',
filename: 'build.js'
},
module: {
rules: [
{
test: /\.css$/,
use: [
'vue... |
const path = require('path');
const GroupHelper = require('../utils/GroupHelper');
class OutputGroup extends GroupHelper {
constructor(options) {
super(options);
this.opts = {
options: {
output: {},
},
};
this.strategy = {
'output... |
# Copyright 2012 OpenStack Foundation
# 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 requ... |
define({chooseTheme:"Chủ đề",customTheme:"Tùy chỉnh",resetTheme:"Thiết lập lại",backToMainThemePanel:"Quay lại",customPaletteTitle:"Tùy chỉnh màu sắc bảng màu",customFontsetTitle:"Tùy chỉnh thiết lập phông chữ",customAppElementsTitle:"Thành phần ứng dụng"}); |
import hw0
from cse163_utils import assert_equals
def test_total():
# The regular case
assert_equals(15, hw0.total(5))
# Seems likely we could mess up 0 or 1
assert_equals(1, hw0.total(1))
assert_equals(0, hw0.total(0))
def main():
test_total()
if __name__ == '__main__':
main()
... |
import torch
from tqdm import tqdm
def evaluate(model, data_loader, metrics, device):
if model.training:
model.eval()
summary = {metric: 0 for metric in metrics}
for step, mb in tqdm(enumerate(data_loader), desc="steps", total=len(data_loader)):
qa_mb, qb_mb, y_mb = map(lambda elm: elm.t... |
var path = require('path');
var webpack = require('webpack');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var merge = require('extendify')({ isDeep: true, arrays: 'concat' });
var devConfig = require('./webpack.config.dev');
var prodConfig = require('./webpack.config.prod');
var isDevelopment = proc... |
'use strict';
function caml_int_compare(x, y) {
if (x < y) {
return -1;
} else if (x === y) {
return 0;
} else {
return 1;
}
}
function caml_bool_compare(x, y) {
if (x) {
if (y) {
return 0;
} else {
return 1;
}
} else if (y) {
return -1;
} else {
return 0;
... |
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {batchActions} from 'redux-batched-actions';
import {ViewTypes} from 'app/constants';
import {ChannelTypes, RoleTypes, GroupTypes} from '@mm-redux/action_types';
import {
fetchMyChannelsAndMembe... |
import React, { useState } from "react"
import { Link } from "gatsby"
const BurgerMenu = () => {
const [isOpen, setIsOpen] = useState(false)
return (
<>
<div
className={`burger ${isOpen ? "burger__change" : ""}`}
onClick={() => setIsOpen(!isOpen)}
onKeyDown={() => setIsOpen(!isOp... |
from Game.World import World
if __name__ == '__main__':
world = World() |
/*eslint-disable*/
import React from "react";
import { Link } from "react-router-dom";
import IndexNavbar from "components/Navbars/IndexNavbar.js";
import Footer from "components/Footers/Footer.js";
import Form from "components/Form.js";
import * as Scroll from 'react-scroll';
var scroll = Scroll.animateScroll;
... |
/*
* Copyright (c) 2015-2016 PointSource, LLC.
* MIT Licensed
*
* This file defines the controller for the adding page.
*/
(function() {
angular
.module('app.add')
.controller('AddController', AddController);
AddController.$inject = [
'$rootScope',
'$timeout',
'$do... |
import React, { Component } from "react";
import { Link } from "react-router-dom";
import "./Footer.scss";
import smallherralogo from "../../assets/smallherralogo.png";
import { HashLink } from "react-router-hash-link";
class Footer extends Component {
render() {
return (
<div className="footer-wrapper">
... |
const { parse } = require('url');
const visit = import('unist-util-visit').then((m) => m.visit);
const internalUrls = ['sdk.apify.com'];
/**
* @param {import('url').UrlWithStringQuery} href
*/
function isInternal(href) {
return internalUrls.some(
(internalUrl) => href.host === internalUrl
|... |
// import config from './config'
import '@babel/polyfill'
import { getConfig } from './utils/configs'
import commander from 'commander'
import PackageConfig from '../package'
import { getValidPort } from './utils/portInUsed'
import loadPlugins from './utils/loadPlugins'
import PluginsRouter from './router/plugins'
impo... |
import sys
from chromie.parser import parse_args
from chromie.commands import (
do_init,
do_pack,
do_preview,
do_preview,
do_config,
do_upload,
do_update,
do_publish,
)
def main(argv=None):
args = parse_args(argv)
if args.command == "init":
do_init(args)
elif arg... |
# Copyright 2021 The Cirq Developers
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... |
import copy
import random
from hypothesis import given, example
from hypothesis.strategies import integers, lists, text, fixed_dictionaries, sampled_from, none, one_of
from kubedifflib._diff import diff_lists, list_subtract, Difference
from kubedifflib._kube import KubeObject
@given(path=text(), xs=lists(integers(... |
from tkinter import *
import mainmenu
import area
import volume
import derivative
import basiccalc
def page():
# ploting the graphing
graphing = Tk()
graphing.title("Math Lab")
graphing.geometry("1400x1000")
graphing.configure(background = "MistyRose2")
heading = Label(graphing, text="Welcome ... |
// artDialog - 默认配置
define({
/* -----已注释的配置继承自 popup.js,仍可以再这里重新定义它----- */
// 对齐方式
//align: 'bottom left',
// 是否固定定位
//fixed: false,
// 对话框叠加高度值(重要:此值不能超过浏览器最大限制)
//zIndex: 1024,
// 设置遮罩背景颜色
backdropBackground: '#000',
// 设置遮罩透明度
backdropOpacity: 0.7,
// 消... |
var express = require("express");
var ejs = require("ejs");
var app = express();
app.set('view engine','ejs');
app.use(express.static(__dirname + '/public'));
data = {"title":"YMKJ"}
app.get("/",function(req, res){
res.render("index", data);
})
app.listen(process.env.PORT || 5000);
|
import os
class DirWalk:
def __init__(self, root='app'):
self.root = root
# returns a list of flienames
def walk(self):
project_files = []
internal_packages = []
for dir_, subdir_, files in os.walk(self.root):
internal_packages += subdir_
for fnam... |
# -*- coding: utf-8 -*-
import itertools
if __name__ == "__main__":
"""Day17: Combinations"""
available_containers = [43,
3,
4,
10,
21,
44,
4,
6,
47,
41,
34,
17,
17,
44,
36,
31,
46,
9,
27,
38]
available_containers.sort()
target_volume = 150
print(available_containers)
nu... |
'use strict'
const { date: toDate, isUrl, isMime } = require('@metascraper/helpers')
const { get, split, nth, castArray, forEach } = require('lodash')
const { TAGS: URL_TAGS } = require('html-urls')
const replaceString = require('replace-string')
const isHTML = require('is-html-content')
const cssUrl = require('css-ur... |
import metablock from "rollup-plugin-userscript-metablock";
import typescript from "@rollup/plugin-typescript";
import ejs from "rollup-plugin-ejs";
import url from "@rollup/plugin-url";
import { nodeResolve } from "@rollup/plugin-node-resolve";
import { terser } from "rollup-plugin-terser";
import { readFileSync } fr... |
import React from 'react';
import styles from './call-to-action.module.scss';
import arrowCallout from '../../assets/arrow-callout.png';
import vrUser from '../../assets/happy-vr-user.png';
const CallToAction = () => (
<article className={styles.callToAction}>
<section className={styles.textWrapper}>
<h2 c... |
/*
*
* OwnershipDropdown constants
*
*/
export const DEFAULT_ACTION = 'app/OwnershipDropdown/DEFAULT_ACTION';
export const GET_MASTER_DATA = 'app/OwnershipDropdown/GET_MASTER_DATA';
export const GET_MASTER_DATA_SUCCESS =
'app/OwnershipDropdown/GET_MASTER_DATA_SUCCESS';
export const GET_MASTER_DATA_ERROR =
'app... |
import React from 'react'
import withData from '../lib/apollo/withData'
import withT from '../lib/withT'
import Frame from '../components/Frame'
import Portrait from '../components/Portrait'
import ImageCover from '../components/ImageCover'
import { Lead } from '@project-r/styleguide'
import team from '../lib/team'
... |
var HashDoWeb = require('hashdo-web'),
Handlebars = require('handlebars'),
FS = require('fs'),
Path = require('path'),
_ = require('lodash');
module.exports = function (req, res) {
var template = Handlebars.compile(FS.readFileSync(Path.join(__dirname, '../templates/packs.hbs')).toString());
var html = temp... |
const fs = require('fs');
const path = require('path');
const readableStream = fs.createReadStream(path.join(__dirname, 'text.txt'));
readableStream.on('data', chunk => console.log(chunk.toString())) |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
# Since the user model for UserFitbit is allowed to be user set, the app
# that contains the model must be migrated before this.
... |
import React, { Component, PropTypes } from 'react' // eslint-disable-line import/no-unresolved
import PureRenderMixin from 'react-addons-pure-render-mixin'
import shouldUpdate from './shouldUpdate'
import raf from 'raf'
const noop = () => {}
export default class Headroom extends Component {
static propTypes = {
... |
"""
qmpy.data.strings
Contains useful functions for string manipulation. Some important conventions
observed throughout qmpy that are particularly relevent here:
names are of the form: is FeO2 Ni3B
formula are of the form: Fe,O2 Ni3,B
comp are of the form: {'Fe':1, 'O':2} {'Ni':3, 'B':1}
latex are of t... |
import React, { Component } from 'react';
import { Link } from 'react-router-dom';
class Homepage extends Component {
render() {
return (
<div>
<div className="bd-example">
<div id="carouselExampleCaptions" className="carousel slide" data-ride="carousel">
... |
const { __countingsort } = require('./countingsort')
const { __copy } = require('../../copy')
const { clone } = require('../../clone')
const __recurse1a = (a, start, end, fn, depth, cutoff, takeover) => {
// console.group({ depth, start, end, a })
if (depth > 31) { return }
if (end - start <= cutoff) {
const _fn... |
from helpers import (
BesspinTestApiBaseClass,
create_featureModel,
create_reportJob,
create_sysConfig,
create_vulnerabilityConfig,
create_workflow,
DEFAULT_HEADERS
)
import json
from datetime import datetime
from app.models import (
FeatureModel,
JobStatus,
SystemConfigurationI... |
import React from "react";
import Profile from "./profile/Profile";
import FriendList from "./friendList/FriendList";
import TransactionHistory from "./transactionHistory/TransactionHistory";
import Statistics from "./statistics/Statistics";
import user from "./data/user.json";
import statisticalData from "./data/stati... |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import sys
from books_library.books.models import Category
reload(sys)
sys.setdefaultencoding('utf-8')
from allauth.socialaccount.models import SocialAccount
from django.contrib.auth.decorators import login_required
from django.contrib... |
const Eris = require("eris");
// Replace TOKEN with your bot account's token
const bot = new Eris.CommandClient("Bot TOKEN", {}, {
description: "A test bot made with Eris",
owner: "somebody",
prefix: "!"
});
bot.on("ready", () => { // When the bot is ready
console.log("Ready!"); // Log "Ready!"
});
b... |
import logging
from collections import OrderedDict
from pathlib import Path
from typing import List, Sequence, Tuple
from cv2 import transform
import h5py
import numpy as np
import torch
import torchio as tio
import torchvision.transforms as transforms
from preprocess import mean, std, preprocess_input_function
from t... |
export * from "./fellows-profile";
export * from "./fellows-link-list";
|
import React from 'react';
import PropTypes from 'prop-types';
/**
* Renders one line information with key and value separated
* by colon
*
* @param {Object} props - component props
* @param {string} label - label of basic detail item
* @param {string} value - value of basic detail item
* @param {boolean} block... |
/**
* Pivot Table Virtual Scrolling Sample.
*/
this.default = function () {
ej.base.enableRipple(false);
var customername = ['TOM', 'Hawk', 'Jon', 'Chandler', 'Monica', 'Rachel', 'Phoebe', 'Gunther',
'Ross', 'Geller', 'Joey', 'Bing', 'Tribbiani', 'Janice', 'Bong', 'Perk', 'Green', 'Ken', 'Adams'];
... |
/* eslint-disable import/no-extraneous-dependencies */
import React from 'react';
import { storiesOf } from '@storybook/react';
import { withInfo } from '@storybook/addon-info';
import Avatar from 'blockdemy-ui/avatar';
import Tooltip from 'blockdemy-ui/tooltip';
import Box from 'blockdemy-ui/box';
import { brandColor... |
"""
You must put all includes from others libraries before the include of pygin
and put all include of other files after the include of pygin
"""
# Other Libraries includes:
import random
from pygame.math import Vector2
# pygin includes:
from pygin import *
# files includes:
class ObstaclePulsingAnimation(Animation):... |
const Note = require('lib/models/Note.js');
const Folder = require('lib/models/Folder.js');
const ArrayUtils = require('lib/ArrayUtils.js');
const defaultState = {
notes: [],
notesSource: '',
notesParentType: null,
folders: [],
tags: [],
masterKeys: [],
notLoadedMasterKeys: [],
searches: [],
selectedNoteIds: ... |
(function() {
'use strict';
var CND, E, alert, as_list_of_flags, badge, cast, debug, defaults, echo, freeze, help, info, isa, lets, misfit, parse_argv, pluck, rpr, thaw, type_of, urge, validate, validate_optional, warn, whisper;
//##################################################################################... |
/*
* Globalize Culture es-SV
*
* http://github.com/jquery/globalize
*
* Copyright Software Freedom Conservancy, Inc.
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* This file was generated by the Globalize Culture Generator
* Translation: bugs found in this file need t... |
import React from 'react';
// nodejs library that concatenates classes
import classNames from 'classnames';
// nodejs library to set properties for components
import PropTypes from 'prop-types';
// @material-ui/core components
import { makeStyles } from '@material-ui/core/styles';
// core components
import styles from... |
import clone from 'lodash/clone'
import {
GraphQLObjectType,
GraphQLSchema,
} from 'graphql'
import mutations from './graphql/mutations'
import queries from './graphql/queries'
class SchemaManager {
constructor() {
this.init()
}
async init() {
this.queryFields = clone(queries)
this.mutationFie... |
/*
* Copyright (c) 2019 Johannes Fischer <fischer.jh@gmail.com>
* 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,... |
#
# Copyright (C) 2019 Databricks, 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 i... |
export { default } from './PageViews';
|
"""
Admin site bindings for profiles
"""
from django.contrib import admin
from django.db import models
from django.forms import TextInput
from mitxpro.utils import get_field_names
from mitxpro.admin import AuditableModelAdmin, TimestampedModelAdmin
from .models import (
Program,
ProgramRun,
Course,
C... |
/*!
* Copyright 2014 Apereo Foundation (AF) Licensed under the
* Educational Community 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://opensource.org/licenses/ECL-2.0
*
* Unless required by applicab... |
// basic top-most entry file
import React from "react"
import Home from "./home/home"
import ComingSoon from "./coming-soon/landing"
const IndexPage = () => (
<div>
<ComingSoon />
</div>
)
export default IndexPage
|
const Test3 = () => <h1>SSR Test 3</h1>
export async function getServerSideProps() {
const doAsyncWork = () => Promise.reject(new Error('SSR Test 3'))
doAsyncWork()
return { props: {} }
}
export default Test3
|
#!/usr/bin/env python
import os
from setuptools import setup, find_packages
description = "GTK gamma adjustment GUI powered by xrandr"
def read(fname):
with open(os.path.join(os.path.dirname(__file__), fname)) as file:
return file.read()
def get_version():
from subprocess import Popen, PIPE
try:
... |
export const syntaxExpected = (filename, lineNo, what) => {
throw new SyntaxError(`${filename}:${lineNo}\n${what} is expected`);
};
export const invalidChain = (name) => {
throw new Error(`Unknown chain ${name}`);
};
export const invalidFunction = (name) => {
throw new Error(`Unknown function ${name}`);
};
exp... |
module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
grunt.initConfig({
browserify: {
dist: {
options: {
transform: [
["babelify", {
sourceMap: true,
presets: ['babel-preset-es2015']
}]
]
},
files: {
// if the source file has an extension of... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const path_1 = require("path");
const localfs_1 = require("apollo-codegen-core/lib/localfs");
const fg = require("glob");
const minimatch = require("minimatch");
const graphql_1 = require("graphql");
const load_schema_1 = require("./load-schem... |
define( [
"jquery",
"ui/widgets/slider"
], function( $ ) {
var element, options;
function handle() {
return element.find( ".ui-slider-handle" );
}
module( "slider: options" );
test( "disabled", function( assert ) {
expect( 8 );
var count = 0;
element = $( "#slider1" ).slider();
element.on( "slidestart", fun... |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
#ref para binaryfiled de https://docs.djangoproject.com/en/1.11/ref/models/fields/ em 17/06/2018
# Create your models here.
class Partido (models.Model):
idPartido = models.IntegerField(primary_key=True)
nome = models.CharFi... |
import { getCategorizedProducts } from 'interface/simaProInterface';
import { processingIndustrialApplications } from 'store/slices/industrialApplicationsSlice';
import { processingGeneration } from 'store/slices/generationSlice';
import { processingTransmission } from 'store/slices/transmissionSlice';
export const lo... |
import React, { useState, useContext, useEffect } from 'react';
import { Link } from 'react-router-dom';
import SideScrollContainer from '../../components/SideScrollContainer';
import MediaCard from '../../components/MediaCard';
import HeaderCard from '../../components/HeaderCard';
import MenuOption from '../../compone... |
"""
Provide a transparent abstraction for interacting with virtualizers.
"""
from abc import ABCMeta, abstractmethod
import logging
import re
import subprocess
import sys
from vmupdate.constants import *
log = logging.getLogger(__name__)
def get_virtualizer(name, path):
"""
Return an instance of a ... |
$(document).ready(function() {
$("#PaymentTable #search td").each(function() {
var title = $(this).text();
$(this).html(
'<div class="PaymentSearchbox"><input type="text" placeholder="' +
title +
'" /></div>'
);
});
var table = $("#PaymentTable").DataTable({
process... |
e = input()
set_e = set(map(int, input().split(' ')))
f = input()
set_f = set(map(int, input().split(" ")))
print(len(set_e ^ set_f))
|
"""Define package errors."""
class KnmiError(Exception):
"""Define a base error."""
pass
class InvalidApiKey(KnmiError):
"""Define an error related to invalid or missing API Key."""
pass
class RequestError(KnmiError):
"""Define an error related to invalid requests."""
pass
class Result... |
import numpy as np
# class definition
class ParticleFilter:
# class constructor
def __init__(self, M = None):
# system covariance
self.cov_x = np.array([[0.03], [0.03], [0.005], [0.005]])
# measurement covariance
self.cov_z = np.array([[0.05], [0.05], [0.05]])
# part... |
# Copyright 2016-2017 Capital One Services, LLC
#
# 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 ... |
import React, {Component} from 'react';
import {Table, Card, Button, Breadcrumb, Popconfirm,Modal,Form} from 'antd';
import ShopNew from "./ShopNew";
const data=[];
for (let i=1;i<10;i++){
data.push({
key:i,
name:`新奥餐厅${i}`,
address:`莲花路${i}`,
state:'a'?"营业":'休息'
})
}
@Form.create()
ex... |
!function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.d... |
const { app, BrowserWindow } = require('electron');
let win;
const createWindow = () => {
win = new BrowserWindow({
width: 814,
height: 657,
webPreferences: {
nodeIntegration: true,
},
});
win.loadFile('index.html');
//win.webContents.openDevTools();
win.on('closed', () => {
win = null;
});
}
a... |
/*! For license information please see 2.eadb0de0.chunk.js.LICENSE.txt */
(this["webpackJsonpgrocer-frontend"]=this["webpackJsonpgrocer-frontend"]||[]).push([[2],[function(e,t,n){"use strict";e.exports=n(316)},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(6);function o(e,t){var n=Object.keys(e)... |
from nba_api.stats.endpoints._base import Endpoint
from nba_api.stats.library.http import NBAStatsHTTP
from nba_api.stats.library.parameters import LeagueID, SeasonYearNullable
class DraftHistory(Endpoint):
endpoint = 'drafthistory'
expected_data = {'DraftHistory': ['PERSON_ID', 'PLAYER_NAME', 'SEASON', 'ROUN... |
# Copyright 2012 OpenStack Foundation
# 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 requ... |
"""Generate the invariant verifiers from the intermediate representation."""
import io
import textwrap
from typing import (
Tuple,
Optional,
List,
Sequence,
Set,
Mapping,
Union,
)
from icontract import ensure, require
from aas_core_codegen import intermediate, specific_implementations, nam... |
define(function () {
// Add some polyfills & helpers.
Array.prototype.findIndex = Array.prototype.findIndex || function(callback, thisArg) {
var i;
for (i = 0; i < this.length; i++) {
if (callback.call(thisArg, this[i], i, this)) {
return i;
}
}
... |
/*!
* jQuery JavaScript Library v2.0.1 -event-alias,-ajax,-ajax/script,-ajax/jsonp,-ajax/xhr,-offset
* http://jquery.com/
*
* Includes Sizzle.js
* http://sizzlejs.com/
*
* Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date... |
/*
action = {
type:'ACTION_TYPE',
model:Model,
data:{}
id:0
}
*/
import { myToast } from '../../hook/after';
import { PURCHASE } from '../../model/model-mode';
import { PURCHASE_NAME } from '../../model/model-name';
const MODE = PURCHASE;
const NAME = PURCHASE_NAME;
const iniState = {
mode:MODE,
nam... |
import os.path
import unittest.mock as mock
from datetime import datetime
from pathlib import Path
from typing import List
import pytest
from freezegun import freeze_time
from bandersnatch.package import Package
EXPECTED_REL_HREFS = (
'<a href="../../packages/2.7/f/foo/foo.whl#sha256=e3b0c44298fc1c149afbf4c8996f... |
# -*- coding:utf8 -*-
import cv2
import os
import shutil
def get_frame_from_video(video_name, interval):
"""
Args:
video_name:输入视频名字
interval: 保存图片的帧率间隔
Returns:
"""
# 保存图片的路径
save_path = video_name.split('.mp4')[0] + '/images/'
is_exists = os.path.exists(save_path)
... |
// deploy/00_deploy_your_contract.js
const { ethers } = require("hardhat");
module.exports = async ({ getNamedAccounts, getChainId, deployments }) => {
const frontendAddress = process.env.FRONTENDADDRESS;
const receiverAddress = process.env.RECEIVERADDRESS;
const { deploy } = deployments;
const { deployer } ... |
game.SpendExp = me.ScreenObject.extend({
/**
* action to perform on state change
*/
onResetEvent: function() {
me.game.world.addChild(new me.Sprite(0, 0, me.loader.getImage('exp-screen')), -10); // TODO
me.input.bindKey(me.input.KEY.F1, "F1");
me.input.bindKey(me.input.KEY.F... |
"""The Test file for CLI (General)."""
import configparser
import tempfile
import os
import shutil
import json
from unittest.mock import MagicMock, patch
import yaml
import subprocess
import chardet
import sys
# Testing libraries
import pytest
from click.testing import CliRunner
# We import the library directly her... |
/*!
* UPDATES AND DOCS AT: https://github.com/BNDong
* https://www.cnblogs.com/bndong/
* @author: BNDong, dbnuo@foxmail.com
**/
if (initCheck()) {
var sidebarHtml =
'<div class="container">' +
' <div class="menu-wrap optiscroll" id="menuWrap" style="display:none">' +
' <nav cla... |
const _ = require('lodash')
const categories = [
{
idCategoria:1,
nombre:"Electrodemesticos",
categoriaPadre: false
},
{
idCategoria:2,
nombre:"Hogar",
categoriaPadre: false
},
]
let categoriesService ={
findCategories: (category) =>{
return categories;
}
}
module.exports ... |
import React from 'react'
import Container from './components/Container/index'
import Grid from './components/Grid/index'
import Card from './components/Card/index'
export {
Container,
Grid,
Card
};
|
"use strict";var precacheConfig=[["./index.html","76ba6a2a8f5f343c4eac71683a5b08fd"],["./static/css/main.d41d8cd9.css","f0c753866484ee7c4f835badbb0dec7b"],["./static/js/main.318eb3b4.js","2fe5d271a520a93578723e9f96b1f2af"]],cacheName="sw-precache-v3-sw-precache-webpack-plugin-"+(self.registration?self.registration.scop... |