text stringlengths 3 1.05M |
|---|
if (self.CavalryLogger) { CavalryLogger.start_js(["TYAI+"]); }
__d("GroupSellProductDetailsEvent",[],(function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={PHOTO_CLICK:"photo_click",SHOW_DIALOG:"show_dialog",HIDE_DIALOG:"hide_dialog",PROFILE_LINK_CLICK:"profile_link_click",GROUP_LINK_CLICK:"group_lin... |
// this helper can add/remove node classnames
// and provides saving classname while 2+ modals are opening and closing
// based on https://github.com/reactjs/react-modal/blob/master/src/helpers/classList.js
const classPoll = {};
const incrementReference = (poll, className) => {
if (!poll[className]) {
poll[clas... |
# -*- coding: utf-8 -*-
"""Warning : this file has been generated, you shouldn't edit it"""
from os import linesep
from pyleecan.Classes.check import check_init_dict, check_var, raise_
from pyleecan.Functions.save import save
from pyleecan.Classes.SlotWind import SlotWind
# Import all class method
# Try/catch to remo... |
$(function(){
var $btn=$('input'),
timer,
i = 6;
timer = setInterval(function(){
i--;
if(i === 0){
clearInterval(timer);
$btn.val('同意');
$btn.removeAttr('disabled');
}else{
$btn.val('同意('+i+'s)');
}
},1000);
$btn.click(function(){
alert('就知道你会同意的');
});
})
|
var originalWebsocket = require('faye-websocket');
var proxyquire = require('proxyquire');
// Firebase has strict requirements about the hostname format. So we provide a dummy
// hostname and then change the URL to localhost inside the faye-websocket's Client
// constructor.
var firebase = proxyquire('firebase', {
'... |
$("#selall").click(function () {
if (!$("#selall").is(":checked")){
$(".checkbox").prop('checked', false);
}
else{
$(".checkbox").prop("checked","checked");
}
});
|
import { shallowMount } from '@vue/test-utils';
import Component from '@/pages/index.vue';
describe('Страница index', () => {
test('Корректно отображается заголовок', () => {
const wrapper = shallowMount(Component);
expect(wrapper.find('h1').text()).toBe('Главная страница');
});
});
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Meneame scraper
Usage:
scrap.py [options]
Options:
-h, --help show this screen.
--version show version.
-o DIRECTORY output directory [default: meneame].
--start START specify start page [default: 0].
--timeout TIME specify time... |
GoogleElectionMap.shapeReady({name:"19_86",type:"state",state:"19_86",bounds:[],centroid:[],shapes:[
{points:[
{x:31.2460155449588,y: 30.0489645822852}
,
{x:31.2459525127125,y: 30.0480376169998}
,
{x:31.246562154679,y: 30.0480530114094}
,
{x:31.2465802196485,y: 30.0482130556618}
,
{x:31.2462791277066,y: 30.048230829249... |
/**************************************************************************//**
* @file core_cm7.h
* @brief CMSIS Cortex-M7 Core Peripheral Access Layer Header File
* @version V5.0.3
* @date 09. August 2017
******************************************************************************/
/*
* Copyright ... |
import os
import pprint
from dbt.adapters.factory import load_plugin
from dbt.clients.system import load_file_contents
from dbt.clients.yaml_helper import load_yaml_text
from dbt.contracts.project import ProfileConfig
from dbt.exceptions import DbtProfileError
from dbt.exceptions import DbtProjectError
from dbt.except... |
var searchData=
[
['december',['December',['../namespace_tool_box.html#a02b7f221324576ea6af4c3a320dfd804a82331503174acbae012b2004f6431fa5',1,'ToolBox']]]
];
|
from django.core.management.base import BaseCommand, CommandError
from charts.models import ChartConfig
class Command(BaseCommand):
help = "Delete all ChartConfig objects"
def handle(self, *args, **options):
all = ChartConfig.objects.all()
self.stdout.write("{} ChartConfig Type objects will... |
from aioauth_client import OAuth2Client
class DiscordClient(OAuth2Client):
access_token_url = 'https://discordapp.com/api/oauth2/token'
authorize_url = 'https://discordapp.com/api/oauth2/authorize'
base_url = 'https://discordapp.com/api/v6/'
name = 'discord'
user_info_url = 'https://discordapp.com/... |
import threading
from MvCameraControl_class import *
def Save_jpg(cam, stOutFrame, buf_cache):
if buf_cache is None:
return
buf_save_image = None
file_path = str(stOutFrame.stFrameInfo.nFrameNum) + ".jpg"
n_save_image_size = stOutFrame.stFrameInfo.nWidth * stOutFrame.stFrameInfo.nHeight * 3 + ... |
/**
* Copyright IBM Corp. 2019, 2020
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*
* Code generated by @carbon/icon-build-helpers. DO NOT EDIT.
*/
'use strict';
var Icon = require('../Icon-1083255b.js');
var React = require... |
import pytest
from syft.frameworks.torch.he.fv.util.numth import is_prime
from syft.frameworks.torch.he.fv.util.operations import multiply_many_except
from syft.frameworks.torch.he.fv.modulus import CoeffModulus
from syft.frameworks.torch.he.fv.encryption_params import EncryptionParams
from syft.frameworks.torch.he.fv... |
from django.contrib.admin import SimpleListFilter
class InputFilter(SimpleListFilter):
template = 'input_filter.html'
def lookups(self, request, model_admin):
return ((),)
def choices(self, changelist):
all_choice = next(super().choices(changelist))
all_choice['query_parts'] = (
... |
from dynaconf import settings
print(
'settings from sff file\n',
open(settings.find_file('settings.sff')).read()
)
assert settings.NAME == "Bruno Rocha"
assert settings.EMAIL == 'bruno@rocha.com.from_env'
print("Name is:", settings.NAME)
print("Email is:", settings.EMAIL)
print(settings.get_fresh('NAME'))
|
from aliexpress.api.base import RestApi
class AliexpressOfferRedefiningCopysizetemplateRequest(RestApi):
def __init__(self, domain="gw.api.taobao.com", port=80):
RestApi.__init__(self, domain, port)
self.size_template_id = None
self.target_leaf_id = None
def getapiname(self):
... |
def sum_pairs(ints, s):
map = {}
n = len(ints)
index1 = n
index2 = n
checked = set()
for i in range(n):
map[ints[i]] = i
m = n
i = 0
while i < m:
num = ints[i]
dif = s - num
if dif in map and map[dif] != i and num not in checked:
... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from hcalendar import hCalendar
try:
import urllib.request as urllib2
except:
import urllib2
def parsePage(url):
... |
//===--------------------------------------------------------------------------------*- C++ -*-===//
// _
// | |
// __| | __ ___ ___ ___
// / _` |/ _` \ \ /\ / / '_ |
// | (_| | (_| |\ V V /| | | |
// ... |
import rangeModule from '../translators/range';
import { getDateFormatByDifferences } from '../../format_helper';
import dateUtils from '../../core/utils/date';
import { extend } from '../../core/utils/extend';
import { generateDateBreaks } from './datetime_breaks';
import { noop } from '../../core/utils/common';
impor... |
import {useState} from 'react';
import From from './creation/from/From';
import TopBar from './TopBar/TopBar';
import Drawer from './Drawer/Drawer';
import './App.css';
import Interval from './creation/interval/Interval';
import Welcome from './welcome/Welcome';
import Map from './operators/map/Map';
import Scan from '... |
!function(){function t(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.construct... |
import logging
import json
import gevent
import redis
import redis.connection
redis.connection.socket = gevent.socket # make redis play well with gevent
from aspireblock.lib import config, util
DEFAULT_REDIS_CACHE_PERIOD = 60 # in seconds
logger = logging.getLogger(__name__)
block_info_cache = {}
##
# REDIS-RELAT... |
# coding: utf-8
"""
Talend Management Console Public API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: 2.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import abs... |
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
"""Tests for coverage.py's results analysis."""
import pytest
from coverage.results import Numbers, should_fail_under
from tests.coveragetest import CoverageTest... |
/**
* eZmax API Definition (Full)
* This API expose all the functionnalities for the eZmax and eZsign applications.
*
* The version of the OpenAPI document: 1.1.7
* Contact: support-api@ezmax.ca
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-gener... |
#pragma once
#include "DrawableObjectGroup.h"
/*
UNO
CardBackObjectGroup class:
Creates a visual representing the back of a card.
@author Peter Mitchell
@version 2022.1
*/
class CardBackGroupObject
: public DrawableObjectGroup
{
public:
// Initialises the generic Card back visual.
CardBackGroupObject(const sf::V... |
from operator import attrgetter
from django.test import TestCase
from robber import expect
from data.factories import OfficerFactory, AllegationFactory
from search.queries import BaseModelQuery, OfficerQuery, CrQuery, TrrQuery
from trr.factories import TRRFactory
class BaseModelQueryTestCase(TestCase):
def tes... |
'use strict';
const externalHelpers = require('handlebars-helpers')(['comparison']);
function moveNumberToEnd(str) {
if (str && str.replace) {
return str.replace(/^(\d+) ([^\d]+)$/, '$2 $1');
}
return str;
}
module.exports = { ...externalHelpers, moveNumberToEnd };
|
import sys
from data_formatting_utils import subtokenize_code, subtokenize_comment
sys.path.append('../')
sys.path.append('../comment_update')
from data_utils import DiffASTExample
from diff_utils import compute_minimal_comment_diffs, compute_code_diffs
# NOTE: Javalang will need to installed for this
def build_test... |
#!/usr/bin/env python
# -*- coding:utf-8 -*-
from setuptools import setup
setup(name='jiagu',
version='0.1.8',
description='Jiagu Natural Language Processing',
author='Yener(Zheng Wenyu)',
author_email='help@ownthink.com',
url='https://github.com/ownthink/Jiagu',
license='MIT',
... |
#!/usr/bin/env python3
# Uncomment the following to lazily import everything.
from ev3dev2.auto import *
#from ev3dev2 import get_current_platform, Device, list_device_names, list_devices
#from ev3dev2.motor import OUTPUT_A, OUTPUT_B, OUTPUT_C, OUTPUT_D
#from ev3dev2.motor import LargeMotor, MediumMotor, MoveTank, Mo... |
/*
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'horizontalrule', 'no', {
toolbar: 'Sett inn horisontal linje'
} );
|
'''
core script of psii system
Created on Jan 12, 2017
@author: Zongyang
'''
import os, sys, json
import numpy as np
from PIL import Image
from matplotlib import pyplot as plt
def main():
in_dir = '/Users/nijiang/Desktop/pythonTest/PSII_clowderTest/t1'
hist_path = os.path.join(in_dir, 'hist.png')
... |
__author__ = 'Lin, Ke-fei, Samuel Gratzl'
__authoremail__ = 'kfei@kfei.net, samuel_gratzl@gmx.at'
__version__ = '0.4.0'
|
# Copyright 2016 The TensorFlow 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 applica... |
"""
excel2py - turn a spreadsheet open in Excel into a Python program
It is controlled by a config file, traditionally a yaml file with
the same name as the Excel file. This tells it which sheets are
inputs, outputs and calculations.
By Michael Grazebrook of Joined Up Finance Ltd
21 Aug 2018
"""
from excel2py.config... |
import pytest
from wemake_python_styleguide.compat.constants import PY38
from wemake_python_styleguide.violations.refactoring import (
NestedTernaryViolation,
)
from wemake_python_styleguide.visitors.ast.compares import (
WrongConditionalVisitor,
)
wrong_compare1 = 'x > (a if b else c)'
wrong_compare2 = '(a i... |
/**
* book list Page script
*/
import pageData from '../../lib/freeData.js'
Page({
data: {
pageData: pageData
},
onLoad(){
console.log(pageData);
}
}) |
# creating a comand line interface
import argparse
from urllib.request import Request, urlopen
from bs4 import BeautifulSoup
import pandas as pd
from datetime import datetime
import sys
dic = {'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36'}
no... |
from flask import Flask
app = Flask(__name__)
@app.route("/hello")
def hello():
return "hello"
|
/*
jCanvas v16.06.06
Copyright 2016 Caleb Evans
Released under the MIT license
*/
(function(g,U,J){"object"===typeof module&&"object"===typeof module.exports?module.exports=function(g,U){return J(g,U)}:J(g,U)})("undefined"!==typeof window?window.jQuery:{},"undefined"!==typeof window?window:this,function(g,U){fu... |
import React from "react";
import axios from "axios";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { withRouter } from "react-router";
import { NavLink } from "react-router-dom";
const NavigationComponent = props => {
const dynamicLink = (route, linkText) => {
return (
<div clas... |
import React from "react";
// @material-ui/core components
import { makeStyles } from "@material-ui/core/styles";
// @material-ui/icons
import Face from "@material-ui/icons/Face";
import Chat from "@material-ui/icons/Chat";
import Build from "@material-ui/icons/Build";
// core components
import GridContainer from "com... |
from .django_tool_provider import DjangoToolProvider
|
# -*- coding: utf-8 -*-
"""
Created on Sat Aug 31 15:13:13 2019
@author: Christian
"""
import numpy as np
import matplotlib.pyplot as plt
import hysteresis as hys
from OpenSeesAnalysis import runAnalysis
from scipy.interpolate import interp1d
# Here we get our data from
# Run an opensees analysis using the runAnal... |
#pragma once
namespace DAVA
{
class FilePath;
class Scene;
class FBXImporter
{
public:
static Scene* ConstructSceneFromFBX(const FilePath& fbxPath);
static bool ConvertToSC2(const FilePath& fbxPath, const FilePath& sc2Path);
static bool ConvertAnimations(const FilePath& fbxPath);
};
}; |
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _createSvgIcon = _interopRequireDefault(require("./utils/createSvg... |
/**
*
* File Name: libkern/stdlib/free.c
* Title : Kernel Library
* Project : PINE64 ROCK64 Bare-Metal
* Author : Copyright (C) 2021 Johannes Krottmayer <krjdev@gmail.com>
* Created : 2021-01-25
* Modified :
* Revised :
* Version : 0.1.0.0
* License : ISC (see LICENSE.txt)
*
* NOTE: This code is... |
#asyncio2.py to build and run coroutines in parallel
import asyncio
import time
async def say(delay, msg):
await asyncio.sleep(delay)
print(msg)
async def main ():
task1 = asyncio.create_task( say(1, 'Good'))
task2 = asyncio.create_task( say(1, 'Morning'))
print("Started at ", time.strftime("%X"))... |
/*
* Copyright 2009-2017 Alibaba Cloud 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... |
import unittest
from django.apps import apps
from django.contrib.sites.models import Site
from allauth import app_settings as allauth_app_settings
from rest_framework.test import APIClient
from rest_framework.authtoken.models import Token
from main.models import Profile, University, Course
class UserViewTest(unitt... |
/*
** SQLCipher
** crypto.h developed by Stephen Lombardo (Zetetic LLC)
** sjlombardo at zetetic dot net
** http://zetetic.net
**
** Copyright (c) 2008, ZETETIC LLC
** All rights reserved.
**
** Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the follo... |
/*
* Elliptic curve J-PAKE
*
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
* SPDX-License-Identifier: Apache-2.0
*
* 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
... |
print (_('Guess the number'))
|
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: tbreader/proto/tensor.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_databas... |
/* This file is generated by createIcons.js any changes will be lost. */
import createIcon from '../createIcon';
const WeightIcon = createIcon({
name: 'WeightIcon',
height: 512,
width: 512,
svgPath: 'M448 64h-25.98C438.44 92.28 448 125.01 448 160c0 105.87-86.13 192-192 192S64 265.87 64 160c0-34.99 9.56-67.72 2... |
let data = {
"body": "<path d=\"M880 298.4H521L403.7 186.2a8.15 8.15 0 0 0-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z\" fill-opacity=\".8\" fill=\"currentColor\"/><path d=\"M372.5 256H184v512h656V370.4H492.1... |
#!/usr/bin/python
#
# File: plotSpeedups.py
#
from ROOT import TCanvas, gROOT, TGraphErrors, TPaveText, TLatex, TFile, gStyle
from PerfHistoryTools import readPerformanceData
### these are the full series
commits = ["68c48276","4e5928c1","019d29a0","b356bad1","2c007289",
"298df455","a860eea3","e569cfb7","9... |
#include "luat_base.h"
#include "luat_fs.h"
#include "luat_spi.h"
#include "luat_malloc.h"
#define LUAT_LOG_TAG "vfs.lfs2"
#include "luat_log.h"
#ifdef LUAT_USE_FS_VFS
// #ifdef LUAT_VFS_USE_LFS2
#include "lfs.h"
FILE* luat_vfs_lfs2_fopen(void* userdata, const char *filename, const char *mode) {
lfs_t* fs = (... |
# 3rd party
from coincidence import AdvancedDataRegressionFixture
from domdf_python_tools.paths import PathPlus
# this package
from imgsorter import sort_images
example_photos = PathPlus(__file__).parent / "example_photos"
def test_sort_images(
tmp_pathplus: PathPlus,
advanced_data_regression: AdvancedDataRegre... |
peso = float(input('Qual é seu poso em kg? '))
h = float(input('Qual sua altura em metros? '))
imc = peso / (h ** 2)
print(f'O IMC da pessoa é de {imc:.1f}')
if imc <= 18.5:
print('Você está ABAIXO DO PESO normal!')
elif 18.5 < imc <= 25:
print('Você está no PESO IDEAL!')
elif 25 < imc <= 30:
print... |
class SenderKeyName(object):
def __init__(self, groupId, senderAxolotlAddress):
self.groupId = groupId
self.sender = senderAxolotlAddress
def getGroupId(self):
return self.groupId
def getSender(self):
return self.sender
def serialize(self):
return "%s::%s::%s" ... |
'use strict';
const webpack = require('webpack');
const config = require('./config');
config.assetUrl = "uiProject/bin-release/web/game/resource/"
const webpackConfig = require('./webpack.config.dev');
const utils = require('./utils');
const merge = require('webpack-merge');
const FriendlyErrorsPlugin = require('friend... |
// Imports
const Discord = require("discord.js");
const Compute = require("@google-cloud/compute");
const discordConfig = require("./discord-config.json");
const gcpConfig = require("./GCP_config.json");
// Initialize
const client = new Discord.Client();
const compute = new Compute({
projectId: gcpConfig.project_id,... |
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2020 Lucian Copeland for Adafruit Industries
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Softwar... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[357],{419:function(e,t,n){"use strict";n.r(t),n.d(t,"frontMatter",(function(){return c})),n.d(t,"metadata",(function(){return i})),n.d(t,"rightToc",(function(){return l})),n.d(t,"default",(function(){return s}));var r=n(3),a=n(7),o=(n(0),n(440)),c={id:"mfa",title:"Th... |
/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/**
* @fileOverview Defines the {@link CKEDITOR.scriptLoader} object, used to load scripts
* asynchronously.
*/
/**
* Load scripts asynchronously.
* @namespace
* @exa... |
/*
_ ___ ___ _ _ ___ _ _ ___ _ ___ ___
/_\ | _ \ \| | | |_ _| \| |/ _ \| | / _ \ / __|
/ _ \| / |) | |_| || || .` | (_) | |_| (_) | (_ |
/_/ \_\_|_\___/ \___/|___|_|\_|\___/|____\___/ \___|
Log library for Arduino
version 1.0.3
https://github.com/thijse/Arduino-Log
Licensed under the... |
// Avoid `console` errors in browsers that lack a console.
(function() {
var method;
var noop = function () {};
var methods = [
'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',
'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',
'markTimeline', 'profile',... |
import dbus
session_bus = dbus.SessionBus()
dbus_object = session_bus.get_object(bus_name='com.skontar.HexChat', object_path='/com/skontar/HexChat')
interface = dbus.Interface(object=dbus_object, dbus_interface='com.skontar.HexChat')
interface.create_notification('fenikso', 'freenode', '#fedora', 'Title',
... |
import pandas as pd
import math
import numpy as np
from sklearn.preprocessing import MinMaxScaler
from sklearn.metrics import mean_squared_error
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import LSTM, Dense, Dropout
from tensorflow.keras.callbacks import CSVLogger
scaler = MinMaxScaler... |
module.exports = {
'extends': [
// 'airbnb',
'prettier',
'prettier/react',
],
'settings': {
'import/resolver': {
'node': {
'paths': ['.']
}
}
},
'env': {
'browser': true,
'node': true,
'jasmine': true
},
'parser': 'babel-eslint',
'plugins': [
'reac... |
"""
Django settings for sopot project.
Generated by 'django-admin startproject' using Django 3.1.5.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
from pathlib i... |
//
// YYHDetailOfStoreFrame.h
// XiaoChengJia
//
// Created by yyh2016 on 16/10/12.
// Copyright © 2016年 yyh2016. All rights reserved.
//
#import "YYHBaseModel.h"
#include "YYHDetailOfStoreModel.h"
@interface YYHDetailOfStoreFrame : YYHBaseModel
@property(nonatomic,strong) YYHDetailOfStoreModel *detailStoreModel;... |
import streamlit as st
import pickle
import numpy as np
from PIL import Image
model2=pickle.load(open('modellr.pkl','rb'))
model4=pickle.load(open('modelrf.pkl','rb'))
model3=pickle.load(open('modellr.pkl','rb'))
model1=pickle.load(open('modellr.pkl','rb'))
def predict_cancer_svm(mean_radius,mean_texture,mean_perimet... |
const session = require('express-session');
const cookieparser = require('cookie-parser');
const passport = require('passport');
const LocalStrategy = require('passport-local').Strategy;
const db = require('./models');
// export a function that receives the Express app we will configure for Passport
module.exports = (... |
/* testDynArray.c
* Author: Chris Kearns
* Date: 23 Aug 2016
* This file is used for testing the dynamicArray.c file.
* This test suite is by no means complete or thorough.
* More testing is needed on your own.
*/
#include <stdio.h>
#include <stdlib.h>
#include "dynArray.h"
void assertTrue(int predicate, char ... |
#!/bin/env python
import os
import sys
import pandas as pd
import sqlite3
def create_connection(db_file):
""" create a database connection to the SQLite database
specified by db_file
:param db_file: database file
:return: Connection object or None
"""
conn = None
try:
conn = sql... |
'''
setup.py - a setup script
Author: Xinyu Wang
'''
from setuptools import setup, find_packages
import os
import sys
# import BGP_Forecast_Modules
try:
setup(
name='BGP_Forecast_Modules',
version='BGP_Forecast_Modules',
author='Xinyu Wang',
author_email='xinyuwang1209@gmail.com',
description = ("BGP Fore... |
import React from "react";
import "./style.css";
function Jumbotron({ children }) {
return (
<div className="jumbotron d-flex align-items-center">
<div className="container text-center">
{children}
</div>
</div>
);
}
export default Jumbotron; |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 5/15/20 4:49 PM
# @File : grover.py
# qubit number=4
# total number=19
import cirq
import cirq.google as cg
from typing import Optional
import sys
from math import log2
import numpy as np
class Opty(cirq.PointOptimizer):
def optimization_at(
... |
import React from "react";
import Dialog from "@material-ui/core/Dialog";
import FileCopyOutlinedIcon from "@material-ui/icons/FileCopyOutlined";
import Tooltip from "@material-ui/core/Tooltip";
import DialogActions from "@material-ui/core/DialogActions";
import DialogContent from "@material-ui/core/DialogContent";
imp... |
'use strict';
var express = require('express');
var controller = require('./user.controller');
var config = require('../../config/environment');
var auth = require('../../auth/auth.service');
var router = express.Router();
/**
* @apiDefine UserNotAuthorized
*
* @apiError User not authenticated
*
* @apiErrorExam... |
export { default as default } from './modules/ReactTimeAgo.js'
|
const { readFile } = require( 'fs' ).promises;
const { resolve: resolvePath } = require( 'path' );
const { ESLint } = require( 'eslint' );
const defaultConfig = require( '../index' );
describe( 'eslint-config', () => {
const fixturesPath = resolvePath( __dirname, '__fixtures__' );
it( 'fails on incorrect code', cre... |
#
# Collective Knowledge (platform - GPGPU)
#
# See CK LICENSE.txt for licensing details
# See CK COPYRIGHT.txt for copyright details
#
# Developer: Grigori Fursin, Grigori.Fursin@cTuning.org, http://fursin.net
#
cfg={} # Will be updated by CK (meta description of this module)
work={} # Will be updated by CK (tempora... |
from programs.schema.attributes.abstractattribute import AbstractAttribute
from constants import CC
class RelGQAttr(AbstractAttribute):
@staticmethod
def getName():
return CC.ATTR_RELGQ
@staticmethod
def getLevels():
return {
"Householder living alone" ... |
import json
import logging
import os
import shutil
from collections import OrderedDict
from typing import List, Dict, Tuple, Iterable, Type, Union, Callable
from zipfile import ZipFile
import requests
import numpy as np
from numpy import ndarray
import transformers
import torch
from torch import nn, Tensor, device
from... |
from dispike.errors.events import InvalidEventType
import typing
from loguru import logger
import inspect
from enum import Enum
class EventTypes(str, Enum):
COMMAND = "command"
COMPONENT = "component"
MESSAGE_COMMAND = "message_command"
USER_COMMAND = "user_command"
|
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import ast
import os
import re
from argparse import ArgumentError, ArgumentParser, Namespace
from dataclasses import _MISSING_TYPE, MISSING
fr... |
# Definition for singly-linked list.
from typing import Optional
class ListNode:
def __init__(self, val=0, next=None):
self.val = val
self.next = next
class Solution:
def reorderList(self, head: Optional[ListNode]) -> None:
"""
Do not return anything, modify head in-place ins... |
'use strict'
var npm = require('../../lib/npm.js')
var log = require('npmlog')
var test = require('tap').test
var mockLog = {
finish: function () {},
silly: function () {}
}
var actions
test('setup', function (t) {
npm.load(function () {
log.disableProgress()
actions = require('../../lib/i... |
/* eslint-disable import/prefer-default-export */
import {
FETCH_CONTENT_START,
FETCH_CONTENT_SUCCESS,
FETCH_CONTENT_ERROR,
} from '../constants';
import { selectContent } from '../reducers/content';
const query = `
query($path:String!,$locale:String!) {
content(path:$path,locale:$locale) {
title,c... |
/**
* @license Apache-2.0
*
* Copyright (c) 2018 The Stdlib Authors.
*
* 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... |
/**
* jQuery-csv (jQuery Plugin)
*
* This document is licensed as free software under the terms of the
* MIT License: http://www.opensource.org/licenses/mit-license.php
*
* Acknowledgements:
* The original design and influence to implement this library as a jquery
* plugin is influenced by jquery-json (http://c... |