text stringlengths 3 1.05M |
|---|
const WOQLTableConfig = require("./tableConfig");
const UTILS = require('../utils');
const WOQLRule = require('../woqlRule');
const WOQLResult = require('../woqlResult');
/**
* @file WOQL Table
* @license Apache Version 2
*/
function WOQLTable(client, config){
this.client = client;
this.config = (config ? conf... |
# Copyright 2018 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... |
import { v4 as uuid } from "uuid";
import {
UPDATE_AUTH,
SET_EXPIRED_SESSION,
REMOVE_AUTH,
UPDATE_ANILIST,
} from "../actions";
// make UUIDs noticeable
const genUUID = () => {
let id = uuid();
const parts = id.split("-");
parts[1] = "NANI";
return parts.join("-");
};
const initialState = {
token: "... |
# coding: utf-8
"""
anchore_engine.services.policy_engine
This is a policy evaluation service. It receives push-events from external systems for data updates and provides an api for requesting image policy checks
OpenAPI spec version: 1.0.0
Contact: zach@anchore.com
Generated by: https://github.c... |
/**
* Add collapseable boxes to our editor screens.
*/
postboxes.add_postbox_toggles(pagenow);
/**
* The rest of our customizations.
*/
(function($) {
if ('edit' === getParameterByName('action')) {
// Store our original slug on page load for edit checking.
var original_slug = $('#name').val();
... |
"""客户端上传客户端号和分数(注意:并不会上传排名,客户端无法上传排名),同一个客户端可以多次上传分数,取最新的一次分数"""
def uploading():
"""客户端上传客户编号和分数"""
client_no = input("请输入您的客户编号:")
score = int(input("请输入您的分数:"))
return client_no, score
uploading()
# 创建客户表,存储客户编号,分数和排名
class Client(BaseModel): |
# Copyright (c) 2020, Michael Boyle
# See LICENSE file for details:
# <https://github.com/moble/quaternionic/blob/master/LICENSE>
"""Essential functions for quaternion algebra.
These functions form the basic algebraic behavior of quaternions — addition,
multiplication, exp, log, etc.
Each function takes one or two a... |
/* eslint import/no-extraneous-dependencies: 0, no-console: 0 */
import express from 'express';
import webpack from 'webpack';
const { webpackPort, webpackHost } = require('../config/env');
const webpackConfig = require('../config/webpack-dev.config');
const compiler = webpack(webpackConfig);
const serverOptions = {
... |
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef __cplusplus
# error This header can only be compiled as C++.
#endif
#ifnd... |
# Copyright 1999-2020 Alibaba Group Holding Ltd.
#
# 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 a... |
const flickr = { flickr: { width: 1536, height: 1792, paths: [{ d: 'M1248 128q119 0 203.5 84.5t84.5 203.5v960q0 119-84.5 203.5t-203.5 84.5h-960q-119 0-203.5-84.5t-84.5-203.5v-960q0-119 84.5-203.5t203.5-84.5h960zM698 896q0-88-62-150t-150-62-150 62-62 150 62 150 150 62 150-62 62-150zM1262 896q0-88-62-150t-150-62-150 62-6... |
from typing import Union
from jsonrpcclient.requests import Request
class Engine:
def __init__(self, client):
self.client = client
def get_coinbase(self):
payload = Request("engine_getCoinbase")
response = self.client.send(payload)
return response.data.result
def get_bl... |
const { Client } = require("@elastic/elasticsearch");
const client = new Client({ node: "http://localhost:9200" });
async function run() {
// Let's start by indexing some data
await client.index({
index: "game-of-thrones",
body: {
character: "Ned Stark",
quote: "Winter is coming.",
},
});
... |
"""
Django settings for myproject project.
Generated by 'django-admin startproject' using Django 2.0.3.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.0/ref/settings/
"""
import os
... |
r"""
Solve S-unit equation x + y = 1
Inspired by work of Tzanakis--de Weger, Baker--Wustholz and Smart, we use the LLL methods in Sage to implement an algorithm that returns all S-unit solutions to the equation $x + y = 1$.
REFERENCES:
- [MR2016]_
- [Sma1995]_
- [Sma1998]_
- [Yu2007]_
- [AKMRVW]_
AUTHORS:
- Al... |
import React from 'react';
import Text from '../../components/Text';
import Link from '../../components/Link';
import { List, ListItem } from '../../components/List';
const list = [
{ kind: 'simple', heading: 'Ordered lists' },
{ kind: 'unordered', heading: 'Bullet lists' },
{ kind: 'ordered', heading: 'Ordered ... |
export default Object.assign ||
function(target, ...sources) {
sources.forEach((source) => {
Object.keys(source).forEach((key) => (target[key] = source[key]));
});
return target;
};
|
import discord
COR = 0x690FC3
msg_id = None
msg_user = None
client = discord.Client()
@client.event
async def on_ready():
print('BOT ONLINE !')
print(client.user.name)
print(client.user.id)
print('------Vagner Tutorial----')
print('------LabNegro-------')
print('-----Tutorial Cargo Custom Emo... |
/**
* Created by dengchongjing on 2017/5/11.
*/
import * as types from '../types'
import { getTopic } from '@/api'
const state = {
article: {}
}
const actions = {
getTopic ({commit}, id) {
getTopic(id).then(data => { commit(types.UPDATE_TOPIC_DATA, data.data) })
}
}
const mutations = {
// 更新当前文章
[typ... |
/*
* Copyright (C) 2017, Axis Communications AB, LUND, SWEDEN
*/
/*
* Simple example application that demonstrates how axoverlay is used.
*/
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <glib.h>
#include <glib-unix.h>
#include <cairo/cairo.h>
#include <axoverlay.h>
#define OVERLAY_WIDTH 144... |
/******************************************************************************
Copyright (c) 2000 Microsoft Corporation
Module Name:
ProjectConstants.h
Abstract:
This file contains contants common to the whole project.
Revision History:
Davide Massarenti (Dmassare) 03/20/2000
cre... |
import re
from mat.utils.utils import Utils, Issue
class Issue(Issue):
TITLE = 'SSL Pinning Check'
DESCRIPTION = 'Checks if SSL Pinning is not implemented'
ID = 'ssl-pinning'
ISSUE_TITLE = 'Application Does Not Implement SSL Pinning'
FINDINGS = 'The Team found the application d... |
from typing import Optional
import aiohttp
from apple.rpc.full_node_rpc_client import FullNodeRpcClient
from apple.util.byte_types import hexstr_to_bytes
from apple.util.config import load_config
from apple.util.default_root import DEFAULT_ROOT_PATH
from apple.util.ints import uint16
from apple.util.misc import forma... |
# This file is part of Indico.
# Copyright (C) 2002 - 2020 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from __future__ import unicode_literals
import textwrap
from sqlalchemy import DDL
from indico.core imp... |
import * as React from 'react';
import createSvgIcon from './utils/createSvgIcon';
import { jsx as _jsx } from "react/jsx-runtime";
export default createSvgIcon( /*#__PURE__*/_jsx("path", {
d: "M20 10h-3V8.86c1.72-.45 3-2 3-3.86h-3V4c0-.55-.45-1-1-1H8c-.55 0-1 .45-1 1v1H4c0 1.86 1.28 3.41 3 3.86V10H4c0 1.86 1.28 3.41... |
function accepts(file, acceptedFiles) {
if (file && acceptedFiles) {
const acceptedFilesArray = Array.isArray(acceptedFiles)
? acceptedFiles
: acceptedFiles.split(",");
const fileName = file.name || "";
const mimeType = file.type || "";
const baseMimeType = mimeType.replace(/\/.*$/, "");
... |
import os
import argparse
from ConfigParser import SafeConfigParser
import sys
import logging
#sys.path.append('/home/zhengc/NRC-LIMS-dataDownloader')
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from nrc_ngs_dl.lims_database import LimsDatabase
from nrc_ngs_dl.web_parser import WebParser
def set_up_... |
from . import problem, user, submit
|
from contextlib import suppress
import awxkit.exceptions as exc
from awxkit.api.pages import base, WorkflowJobTemplate, UnifiedJobTemplate, JobTemplate
from awxkit.api.mixins import HasCreate, DSAdapter
from awxkit.api.resources import resources
from awxkit.utils import update_payload, PseudoNamespace, random_title
fr... |
/*global window, console, document */
/*
* Speaker represents the volume icon that will be shown in the mediaPlayer, for example.
* It manages the volume level of the media tag given in the constructor.
* Every Speaker is a View.
* Ex.: var speaker = Speaker({elementID: element, media: mediaTag, id: id});
*/
var E... |
module.exports = function(grunt) {
grunt.initConfig({
exec: {
build: {
cmd: 'jekyll build'
},
serve: {
cmd: "jekyll serve --watch --baseurl=''"
},
deploy: {
cmd: 'echo This is hosted on GitHub Pages. Push to deploy.'
}
}
});
grunt.loadNpmTasks('grunt-exec');
grunt.regist... |
/* istanbul instrument in package npmdoc_eslint */
/*jslint
bitwise: true,
browser: true,
maxerr: 8,
maxlen: 96,
node: true,
nomen: true,
regexp: true,
stupid: true
*/
(function () {
'use strict';
var local;
// run shared js-env code - pre-init
(function () {
/... |
import React, { useState } from "react";
import "./main.css";
import axios from "axios";
import { useHistory } from "react-router-dom";
import { setCountry } from "../../actions/country";
import { setRegion } from "../../actions/region";
import { connect } from "react-redux";
const Main = ({ setCountry, setRegion }) ... |
/**
* @file Make component support data operation like Vue for ant mini program
* @author sparklewhy@gmail.com
*/
'use strict';
import observable, {setObservableContext} from '../base';
import {observableArray, overrideArrayMethods} from '../array';
import {component as antApi, array as antArray} from './array';
... |
const path = require("path");
const { DefinePlugin } = require("webpack");
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
const isProd = process.env.NODE_ENV !== "development";
module.exports = {
mode: isProd ? "production" : "development",
devtool: isProd ? "source-map" : "eval-source-map",
en... |
"""
Copyright (c) 2012-2014, Austin Benson and David Gleich
All rights reserved.
This file is part of MRTSQR and is under the BSD 2-Clause License,
which can be found in the LICENSE file in the root directory, or at
http://opensource.org/licenses/BSD-2-Clause
"""
"""
Mapper and reducer implementation... |
import {
primaryColor,
dangerColor,
successColor,
grayColor,
defaultFont
} from "./material-dashboard-react";
const customInputStyle = {
disabled: {
"&:before": {
backgroundColor: "transparent !important"
}
},
underline: {
"&:hover:not($disabled):before,&:before": {
borderColor:... |
// For discussion and comments, see: http://remysharp.com/2009/01/07/html5-enabling-script/
/*@cc_on'abbr article aside audio canvas details figcaption figure footer header hgroup mark menu meter nav output progress section summary time video'.replace(/\w+/g,function(n){document.createElement(n)})@*/
var addEvent = (f... |
import logging
import os
import random as rd
import click
import mne
import pandas as pd
import numpy as np
from scipy.signal import welch
import matplotlib.pyplot as plt
from config import CHANNEL_NAMES, DATA_ROOT, PROCESSED_ROOT, RAW_ROOT
from data.utils import df_from_fif, df_from_tdt, get_sampling_frequency
from ... |
'''
LPD-Net Model: FN-SF-VLAD
Feature Network + FN-Parallel structure (P) + Series-FC structure (SF)
# Thanks to Mikaela Angelina Uy, modified from PointNetVLAD
author: suo_ivy
created: 10/26/18
'''
import os
import sys
import tensorflow as tf
#Taken from Charles Qi's pointnet code
MODELS_DIR = os.... |
from django.contrib.auth.models import User
from rest_framework import serializers
from mainstore.models import Catalog, Product
# hyperlinkedmodelserializer
#view_name='api:product-detail'
class UserSerializer(serializers.HyperlinkedModelSerializer):
url = serializers.HyperlinkedIdentityField(view_name='api:us... |
var fs = require('fs')
var path = require('path')
var mkdirp = require('mkdirp')
var mr = require('npm-registry-mock')
var osenv = require('osenv')
var rimraf = require('rimraf')
var test = require('tap').test
var common = require('../common-tap')
var server
var pkg = path.resolve(__dirname, 'prune')
va... |
const s3 = require("../config/aws");
module.exports = key => {
var params = {
Bucket: process.env.ResumeBucketName,
Key: key
};
s3.deleteObject(params, (err, data) => {
if (err) {
console.log(err);
}
console.log(`Resume ${key} deleted`);
});
};
|
/* Copyright (C) 2002-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published b... |
'''
filename = urls.py
author = LJH
date = 2019/08/19
'''
from django.conf.urls import url
from django.views.generic import TemplateView
from . import views
from django.views.static import serve
from games.settings import MEDIA_ROOT
urlpatterns = [
# 个人资料
url(r'^profile/$', views.ProfileView.as_view(), name='... |
import os
import yaml
import hashlib
import importlib
import sys
import argparse
from time import sleep
from pathlib import Path
from pymongo import MongoClient
from feed import mainCaller
from database_connector import mongo_update
from front_end_scorer import pre_scorer
try:
p = Path(__file__).parents[1]
s... |
import asyncio
import copy
import json
import logging
import ssl
import time
from decimal import Decimal
from typing import Any, Dict, List, Optional
import aiohttp
from hummingbot.client.config.fee_overrides_config_map import fee_overrides_config_map
from hummingbot.client.config.global_config_map import global_conf... |