text stringlengths 3 1.05M |
|---|
import os
result = os.getenv("OS", '1')
from functools import partial
def start():
pass
partial(start)
import importlib
pickle = importlib.import_module(name='pickle')
value = pickle.dumps(dict(name="test", age=10))
print(value)
print(os.fspath("/Volumes"))
print(os.getppid())
|
"""This module provides classes that make up an issue report."""
import logging
import json
import operator
from jinja2 import PackageLoader, Environment
from typing import Dict, List, Any, Optional
import hashlib
from mythril.laser.execution_info import ExecutionInfo
from mythril.solidity.soliditycontract import Soli... |
export const mockImgCover = (index) => `/static/mock-images/covers/cover_${index}.jpg`;
export const mockImgProduct = (index) => `/static/mock-images/products/product_${index}.jpg`;
export const mockImgAvatar = (index) => `/static/mock-images/avatars/avatar_${index}.jpg`;
|
#from decimal import Decimal as D, getcontext
from math import sqrt
#getcontext().prec = 40
from PySigmoid import *
D = Posit
set_posit_env(128, 4)
def area(a, b, c):
s = (a + b + c) / D(2)
return sqrt(s) * sqrt(s-a) * sqrt(s-b) * sqrt(s-c)
a = D(7)
b = D(7) / D(2) + D(3) * D(2)**D(-111)
c = b
k = area(a,b,c)... |
// Expenses Reducer
const expensesReducerDefaultState = [];
const expensesReducer = (state = expensesReducerDefaultState, action) => {
switch (action.type) {
case 'ADD_EXPENSE':
return [
...state,
action.expense
];
case 'REMOVE_EXPENSE':
return state.filter(({ id }) => id !... |
/**
* Kendo UI v2016.1.412 (http://www.telerik.com/kendo-ui)
* Copyright 2016 Telerik AD. All rights reserved. ... |
import Struct from '~/classes/Struct';
export default new Struct().fromSchema1([
{ child: { type: Number, name: 'nIndex', len: 32 } },
{ child: { type: String, name: 'strCode', len: 64 } },
{ child: { type: Boolean, name: 'bExist', len: 32 } },
{ child: { type: String, name: 'strModel', len: 64 } },
{ child:... |
var express = require('express')
const zlib = require("zlib")
const fs = require("fs")
const queryString = require('query-string')
const parse = require('url-parse')
const cookiejar = require('cookiejar')
const {CookieAccessInfo, CookieJar, Cookie} = cookiejar
let config = {
httpprefix: 'https', port: 443,
se... |
import React, { Component } from 'react'
import Note from './Note'
class NoteVisualizer extends Component {
render() {
const items = this.props.notes.map(e => {
return <Note key={e.title} title={e.title} content={e.content} completed={e.completed} delete={(e) => this.props.delete(e)} onComple... |
import { useMemo } from 'react'
import { format as d3Format } from 'd3-format'
import { timeFormat as d3TimeFormat } from 'd3-time-format'
export const getValueFormatter = format => {
// user defined function
if (typeof format === 'function') return format
if (typeof format === 'string') {
// time... |
# coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen
https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.14.4
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
... |
'use strict'
const test = require('ava')
const handlers = require('../../handlers/auth')
test('auth handlers test', t => {
t.truthy(handlers.doSignIn, 'handler has method doSignIn')
t.truthy(handlers.doSignOut, 'handler has method doSignOut')
})
|
import {get} from "ember-metal/property_get";
import EmberObject from "ember-runtime/system/object";
QUnit.module('EmberObject.extend');
test('Basic extend', function() {
var SomeClass = EmberObject.extend({ foo: 'BAR' });
ok(SomeClass.isClass, "A class has isClass of true");
var obj = new SomeClass();
equal(... |
# Copyright (c) 2020 PaddlePaddle 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... |
const { ModalBody } = require('react-bootstrap');
const request = require('supertest');
const assert = require('assert');
const server = 'http://localhost:3000';
const itineraryController = require('../server/controllers/itineraryController');
describe('Route integration', () => {
// This will test servers root rou... |
'use strict';
exports.onMessageDelete = async(botClient, network, channelsCache, msg) => {
if (!msg.author || msg.author.discriminator === '0000' || !msg.channel.guild) {
return;
}
const cur = network[msg.channel.id];
if (!cur) {
return;
}
if (msg.author.bot && cur.ignoreBots ... |
import React from "react";
const Dashboard = React.lazy(() => import("./modules/dashboard/Dashboard"));
const CategoryList = React.lazy(() =>
import("./modules/category/CategoryList")
);
const CategoryForm = React.lazy(() =>
import("./modules/category/CategoryForm")
);
const OrderList = React.lazy(() => import("... |
import sys
import discord
import asyncio as aio
import aioconsole
import os
import json
import random
import time
import atexit
import schedule
import time
import threading
import functools
import datetime
schedStop = threading.Event()
def timer():
while not schedStop.is_set():
schedule.run_pendin... |
# Quantos dias se passaram?
# Faça uma função que recebe uma data, representada por uma string, e devolve a quantidade de dias que já se passaram desde o início daquele ano. As datas sempre serão representadas por uma string contendo dois dígitos para o dia, dois dígitos para o mês e 4 dígitos para o ano. Você pode ass... |
/*eslint-env browser */
/*global ace, PHP */
/*eslint-disable no-console */
var editor = ace.edit("editor");
editor.setTheme("ace/theme/github");
editor.session.setMode("ace/mode/php");
editor.setShowPrintMargin(false);
var default_code = "<?php\n" + document.getElementById('features_example').innerText;
var query = ... |
// docs_style
// Compile and export minified theme + docs SASS to the docs CSS ('docs/css/')
const gulp = require('gulp');
const sass = require('gulp-sass');
const postcss = require('gulp-postcss');
const flexibility = require('postcss-flexibility');
const rename = require('gulp-rename');
const autoprefixer = require(... |
import User from '../models/User';
import Files from '../models/files';
class ProviderCotroller {
async index(req, res) {
const providers = await User.findAll({
where: {
provider: true,
},
attributes: ['name', 'email', 'avatar_id'],
include: [
{
model: Files,
... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.transformArguments = void 0;
function transformArguments() {
return ['ACL', 'SAVE'];
}
exports.transformArguments = transformArguments;
|
from cleo.helpers import option
from .installer_command import InstallerCommand
class LockCommand(InstallerCommand):
name = "lock"
description = "Locks the project dependencies."
options = [
option(
"no-update", None, "Do not update locked versions, only refresh lock file."
... |
var game = new Phaser.Game(700, 500, Phaser.AUTO, "gamebox", {preload: preload, create: create, update:update});
function equipe_bots(){
//--------- Bot 1 ----------//
bot1_equip = true;
bot1_name = "None Bot1";
// -- Create Function --
/// bot1_create()
// -- Update Functions --
//... |
module.exports = {
"stories": [
"../src/**/*.stories.mdx",
"../src/**/*.stories.@(js|jsx|ts|tsx)"
],
"addons": [
"storybook-css-modules-preset",
"@storybook/addon-links",
"@storybook/addon-essentials"
]
}
|
// Intl.~locale.ar-TN
IntlPolyfill.__addLocaleData({locale:"ar-TN",date:{ca:["gregory","buddhist","chinese","coptic","dangi","ethioaa","ethiopic","generic","hebrew","indian","islamic","islamicc","japanese","persian","roc"],hourNo0:true,hour12:true,formats:{short:"{1} {0}",medium:"{1} {0}",full:"{1} {0}",long:"{1} {0}"... |
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Refl... |
const expect = require('chai').expect;
// const G6 = require('../../../src');
const G6 = require('../../../src');
// const data = require('./data');
const div = document.createElement('div');
div.id = 'dagre';
document.body.appendChild(div);
const data = {
nodes: [
{
id: '2',
type: 'alps',
nam... |
Elm.Native.Time = {};
Elm.Native.Time.make = function(localRuntime) {
localRuntime.Native = localRuntime.Native || {};
localRuntime.Native.Time = localRuntime.Native.Time || {};
if (localRuntime.Native.Time.values) {
return localRuntime.Native.Time.values;
}
var Signal = Elm.Signal.make(lo... |
"""
PRIVATE MODULE: do not import (from) it directly.
This module contains functionality for ``datetime`` related stuff.
"""
from datetime import datetime, timezone, timedelta, time, date
from typing import Union
RFC3339_DATE_PATTERN = '%Y-%m-%d'
RFC3339_TIME_PATTERN = '%H:%M:%S'
RFC3339_DATETIME_PATTERN = '{}T{}'.fo... |
import FuiModuleModifier from "./fui-module";
export default class FuiProgressModifier extends FuiModuleModifier {
semanticModuleName = "progress";
}
|
import torch
from util.torch.activations import mish
from util.torch.initialization import weights_init
class Discriminator64(torch.nn.Module):
def __init__(self, h_size, use_bn=False, use_mish=False, n_channels=1, dropout=0.0, use_logits=True):
super().__init__()
self.use_logits = use_logits
... |
import { TemplateLite } from '@tjmonsi/element-lite/mixins/template-lite.js';
import { render, html } from 'lit-html';
import { template } from './template.js';
import style from './style.styl';
// import '../../smart-components/navigation-loader/index.js';
// import '../../components/side-navigation/index.js';
const {... |
(function () {
var doc = document.documentElement;
doc.classList.remove('no-js');
doc.classList.add('js');
}());
|
# Copyright 2019, OpenTelemetry 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 applicable law or agreed to i... |
import styles from './CustomMonthPicker.less';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import getYearOptions from './getYearOptions';
import Dropdown from '../../Dropdown/Dropdown';
import FieldLabel from '../../FieldLabel/FieldLabel';
import ScreenReaderOnly from '../../ScreenR... |
define(
"dojox/atom/widget/nls/th/FeedEntryEditor", ({
doNew: "[สร้างใหม่]",
edit: "[แก้ไข]",
save: "[บันทึก]",
cancel: "[ยกเลิก]"
})
);
|
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
import nu... |
const mongoose = require('mongoose')
const schema = new mongoose.Schema({
// 广告位名字
name:{type:String},
// 轮播图的图片+url
items:[{
image:{type:String},
url:{type:String}
}],
// 快递运费
delivery:{type:String},
// 活动
activities:[{
item:{type:String}
}],
// 微信好... |
var UIHelpers = function () {
return {
BeginServiceCall: function() {
UIHelpers.DisplayAjax();
},
EndServiceCall: function () {
UIHelpers.HideAjax();
},
PostAjax: function (action, data, callback) {
var jqxhr = $.post(action, data,... |
var callbackArguments = [];
var argument1 = function callback(){callbackArguments.push(arguments)};
var argument2 = null;
var argument3 = "";
var argument4 = function callback(){callbackArguments.push(arguments)};
var argument5 = function callback(){callbackArguments.push(arguments)};
var argument6 = true;
var ar... |
var pad = require('./pad');
module.exports = function lrpad(str, length, padStr) {
return pad(str, length, padStr, 'both');
};
|
export default {
akash: 1
}; |
var invokePath = require('../internal/invokePath'),
restParam = require('../function/restParam');
/**
* Creates a function that invokes the method at `path` on a given object.
* Any additional arguments are provided to the invoked method.
*
* @static
* @memberOf _
* @category Utility
* @param {Array|string}... |
from django.urls import path
from . import views
urlpatterns = [
path('', views.index, name='index'),
path('cv', views.cv, name='cv'),
path('success', views.successView, name='success'),
#path('cv', views.cv.as_view(), name='cv'),
] |
// 1. Book Class: Represents a Book
class Book {
constructor(Subject, Message, Name, Phone, Email) {
this.Subject = Subject;
this.Message = Message;
this.Name = Name;
this.Phone = Phone;
this.Email = Email;
}
}
// 2. UI Class: Handle UI Tasks
class UI {
static displayB... |
import React from 'react';
import { render, screen } from '@testing-library/react';
import '@testing-library/jest-dom/extend-expect'
import Home from '../../pages/Home.js';
import { BrowserRouter as Router } from 'react-router-dom';
describe('Homepage', () => {
it('Should render title and sub title', () => {
ren... |
import torch
from . import IqaModel
from .bunches.crop import MultiCropIm2MOS
"""
patch based models
# %% Test forward patch
%matplotlib inline
from fastiqa.basics import *
class TestMultiCropModel(MultiCropModel):
n_crops=4
crop_sz=200
def forward(self, t):
print(t.size())
p = tensor2pa... |
const fileHelper = require('../src/fileHelper.js');
describe('file helper', function() {
beforeEach(function (done) {
fileHelper.recreateFile();
done();
});
it('get the content as a string', function (done) {
fileHelper.getFileContents().should.not.be.null;
done();
})
it('recreates the output file', func... |
import React, {Component} from 'react';
import ReactDOM from 'react-dom';
export default class Footer extends Component {
render() {
return (
<div className="footer">This is footer</div>
);
}
}
if (document.getElementById('footer')) {
ReactDOM.render(<Footer />, document.getEle... |
"""
Used to manage bountytools clients
"""
from flask import Blueprint, request
# DO Library docs: https://github.com/koalalorenzo/python-digitalocean
clients = Blueprint('clients', __name__)
@clients.route('/list', methods=['GET'])
def clients_list():
"""
List available bountytools clients
:return:
... |
module.exports = function({
process,
fs,
rawBody,
jsYaml,
}) {
return function parseInputYaml(file) {
const stream = file ? fs.createReadStream(file) : process.stdin;
return rawBody(stream, {encoding: 'utf-8'})
.then(jsYaml.safeLoadAll);
};
}
|
'''Paint-by-numbers solver.'''
class Puzzle(object):
'''A paint-by-numbers puzzle.'''
def __init__(self, clues):
self.clues = clues
self.num_rows = len(clues['rows'])
self.num_columns = len(clues['columns'])
self.cells = []
for i in range(self.num_rows):
self.cells.append([])
for j... |
const copyFile = require('./copy-file');
const path = require('path');
const templatesDir = {
'app': path.join(__dirname, '../templates/app'),
'page': path.join(__dirname, '../templates/app/.templates/page'),
'component': path.join(__dirname, '../templates/app/.templates/component'),
'plugin': path.joi... |
;(function($B){
var bltns = $B.InjectBuiltins()
eval(bltns)
var object = _b_.object,
str_hash = _b_.str.__hash__,
$N = _b_.None
// dictionary
function $DictClass($keys,$values){
this.iter = null
this.__class__ = dict
dict.clear(this)
var setitem = dict.__setitem__,
i = $keys.length
... |
# 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 math
from typing import Any, Optional
import torch
import torch.onnx.operators
from fairseq import utils
from torch import Tensor, nn
... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[69],{208:function(e,t,r){"use strict";r.r(t),r.d(t,"frontMatter",(function(){return a})),r.d(t,"metadata",(function(){return c})),r.d(t,"rightToc",(function(){return u})),r.d(t,"default",(function(){return p}));var n=r(2),o=r(9),i=(r(0),r(393)),a={},c={id:"version-v0... |
(function( window, undefined ) {
kendo.cultures["ps"] = {
name: "ps",
numberFormat: {
pattern: ["n-"],
decimals: 2,
",": ",",
".": ".",
groupSize: [3],
percent: {
pattern: ["%n-","%n"],
decimals:... |
'use strict';
const { spawn } = require('child_process');
const Rx = require('rxjs');
const { fromReadableStream$ } = require('./stream');
const spawn$ = (command, args, options) => {
try {
const spawned = spawn(command, args, options);
const stdout$ = fromReadableStream$(spawned.stdout, 'data');
cons... |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import itertools
import warnings
import torch
from botorch import fit_gpytorch_model
from botorch.acquisition.object... |
const Terminable = require('./index.js')
const terminable = new Terminable()
const timeoutId = setTimeout(function () {
terminable.delete(timeoutId)
console.log('long running task')
}, 5000)
const state = terminable.add(timeoutId, function () {
clearTimeout(timeoutId)
setTimeout(() => console.log('clean up a... |
let firstItem = 1;
function firstFunction() {
let secondItem = 2;
debugger; // Breakpoint.
function secondFunction() {
let thirdItem = 3;
console.log(firstItem);
console.log(secondItem);
console.log(thirdItem);
}
secondFunction();
}
firstFunction(); |
/// Copyright (c) 2012 Ecma International. All rights reserved.
/// Ecma International makes this code available under the terms and conditions set
/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
/// "Use Terms"). Any redistribution of this code must retain the above
/// copyright an... |
import json
import requests
import base64
import datetime
from binascii import hexlify, unhexlify
from math import floor, ceil, log, atan
def MAIN_NET_VERSION(ver):
return (0x68000000 | ver)
def TEST_NET_VERSION(ver):
return (0x98000000 | ver)
CURRENT_MOSAIC_SINK = 'TBMOSAICOD4F54EE5CDMR23... |
/*
* Copyright (C) 2018 Daniel Anderson
*
* This source code is licensed under the MIT license found in the LICENSE file
* in the root directory of this source tree.
*/
'use strict';
const Pipeline = require('./pipeline');
require('./format')(Pipeline);
require('./output')(Pipeline);
require('./config')(Pipelin... |
/*Copyright 2010-2019 Simplemaps.com
html5countrymapv3.91
Use pursuant to license agreement at https://simplemaps.com/license */
/* shifty - v1.5.3 - 2016-11-29 - http://jeremyckahn.github.io/shifty, embedded within map logic*/
/* Raphaël 2.1.2 (tweaked, always global)- JavaScript Vector Library, Copyright © 2008-201... |
// Gatsby
import { graphql, useStaticQuery } from "gatsby"
const useHome = () => {
const reqGql = useStaticQuery(graphql`
query {
allStrapiPages(filter: { name: { eq: "home" } }) {
edges {
node {
id
name
content
image {
sharp: ... |
const express = require("express");
const cors = require("cors");
const { uuid } = require("uuidv4");
const app = express();
app.use(express.json());
app.use(cors());
const repositories = [];
app.get("/repositories", (request, response) => {
return response.json(repositories)
});
app.post("/repositories", (requ... |
from pybuilder.core import Author, use_plugin, init
use_plugin("python.core")
use_plugin("python.install_dependencies")
use_plugin("pypi:pybuilder_nose")
# use_plugin("python.unittest")
# use_plugin("python.integrationtest")
use_plugin("python.frosted")
use_plugin("python.flake8")
use_plugin("python.pychecker")
use_pl... |
#!/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... |
var searchData=
[
['completed',['COMPLETED',['../classMaison.html#af939aa6abb28e19cace161a1398e4995a3f282b1367f5511485585865d1adaa21',1,'Maison']]]
];
|
from lxml import objectify
from kloppy.domain import (
Period,
PitchDimensions,
Dimension,
Team,
Score,
Ground,
DatasetFlag,
AttackingDirection,
Orientation,
Position,
Point,
Provider,
)
from kloppy.infra.utils import Readable
from .models import *
def noop(x):
re... |
var toggleNav = false;
window.onresize = () => {
if (toggleNav !== false) {
if (window.innerWidth <= 370) {
sideNav.style.width = '100%';
} else {
sideNav.style.width = '370px';
}
}
}
function toggleNavbar() {
let sideNav = document.getElementById('sideNav');
let darkOverlay = document... |
/*
Evolutility UI model for Collection
https://github.com/evoluteur/evolutility-ui-react
*/
module.exports = {
"id": "collection",
"title": "Collection",
"world": "designer",
"name": "collection",
"namePlural": "collections",
"icon": "/designer/collection.png",
"position": 40,
"defaultViewMany": "list",
"... |
import Vue from 'vue'
import 'normalize.css/normalize.css' // A modern alternative to CSS resets
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import locale from 'element-ui/lib/locale/lang/en' // lang i18n
import moment from 'vue-moment'
import '@/styles/index.scss' // global css
... |
# encoding: utf-8
from ckan.common import config
import ckan.lib.base as base
import ckan.lib.helpers as h
import ckan.lib.app_globals as app_globals
import ckan.lib.navl.dictization_functions as dict_fns
import ckan.model as model
import ckan.logic as logic
import ckan.plugins as plugins
from home import CACHE_PARAM... |
/* eslint linebreak-style: ["error", "unix"] */
import React, { Component, Fragment } from 'react';
import { Route, Link, Switch } from 'react-router-dom';
import Menu from './Menu';
import Map from './Map/index';
import Footer from './Footer';
import About from './About';
// import Home from './Home';
class App ext... |
from libft.optimizers.optimizer import Optimizer
from libft.optimizers.rmsprop import RMSprop
from libft.optimizers.sgd import SGD
OPTIMIZERS = {
'rmsprop': RMSprop,
'sgd': SGD,
}
def get(identifier, **kwargs):
"""Optimizer instance getter.
Arguments:
identifier: string or Optimizer
... |
import * as api from '@/api/api'
import { isURL } from '@/utils/validate'
import onlineCommons from '@jeecg/antd-online-mini'
export function timeFix() {
const time = new Date()
const hour = time.getHours()
return hour < 9 ? '早上好' : (hour <= 11 ? '上午好' : (hour <= 13 ? '中午好' : (hour < 20 ? '下午好' : '晚上好')))... |
$(document).ready(function() {
// Get login user profile data
$("#update_notice_form").hide();
// Get login user profile data
var token = localStorage.getItem('u_token');
var url = $(location).attr('href').split( '/' );
notice_id = url[ url.length - 2 ]; // projects
project_id = url[ url.len... |
import React, { Component } from 'react'
import Helmet from 'react-helmet'
import Layout from '../layout'
import Contact from '../components/Contact'
import config from '../../data/SiteConfig'
class NewsletterPage extends Component {
render() {
return (
<Layout>
<Helmet title={`Newsletter – ${confi... |
/*global location */
sap.ui.define([
"./BaseController",
"sap/ui/model/json/JSONModel",
"../model/formatter",
"sap/m/library",
"sap/ui/Device",
"sap/m/MessageToast"
], function (BaseController, JSONModel, formatter, mobileLibrary, Device, MessageToast) {
"use strict";
// shortcut for sap.m.URLHelper
var URLHe... |
//api routes tests
const request = require('supertest');
const app = require('../app');
const { users, userObjectWithToken } = require("./seed/seed");
const SearchHistory = require("../models/search-history");
const { ObjectID } = require("mongodb");
const user = users[0];
const search_history = [
{
_id: new Obje... |
import React from 'react'
import {connect} from 'react-redux'
import PhotoForm from '../photo-form'
import * as util from '../../lib/util.js'
import * as photoActions from '../../action/photo-actions.js'
export class PhotoItem extends React.Component {
constructor(props){
super(props)
this.state = {
... |
module.exports = {
presets: [
"@babel/preset-react",
"@babel/preset-typescript",
[
"@babel/preset-env",
{
targets: {
node: "current",
},
},
],
],
};
|
import FWCore.ParameterSet.Config as cms
from Configuration.Generator.Pythia8CommonSettings_cfi import *
from Configuration.Generator.Pythia8CUEP8M1Settings_cfi import *
generator = cms.EDFilter("Pythia8ConcurrentGeneratorFilter",
pythiaPylistVerbosity = cms.untracked.int32(0),
... |
export { default } from "./GalleryDisplay"; |
import React, {Component} from 'react';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import Link from "next/link";
class GPGalleryThreeSection extends Component {
render() {
return (
<div className="gallery-area pt-120 pb-110">
<div className="container">
<div className="row">
... |
import React, { Component } from 'react';
import * as PropTypes from 'prop-types';
import { Link } from 'react-router-dom';
import { createFragmentContainer } from 'react-relay';
import graphql from 'babel-plugin-relay/macro';
import { withStyles } from '@material-ui/core/styles';
import ListItem from '@material-ui/cor... |
#!/usr/bin/node
require('./index.js')().run(process.env.MARKVIEW_PORT);
|
import Util from '../../../libs/util.js'
export default {
methods:{
//查询以及获取商品列表
getProduct(params){
return Util.get("fresh_show/pr/selectList_back",params)
.then(res => {
if(res.data.code==100000){
return res.data;
}
... |
import React from "react";
import { connect } from "react-redux";
import classnames from "classnames";
import { getWeatherByCoords } from "./../../actions/weatherActions";
import { addError } from "./../../actions/errorActions";
import LoadingSpinner from "./LoadingSpinner";
function MyLocationButton({ isLoading, erro... |
from pikabot import CMD_LIST
from SysRuntime import *
from pikabot.main_plugs.plug import *
import sys
from telethon import events, functions, __version__
@ItzSjDude(outgoing=True, pattern=r"help ?(.*)")
async def cmd_list(event):
if not event.text[0].isalpha() and event.text[0] not in ("/", "#", "@", "!")... |
import unittest
from .. import TEST_DTYPES, TEST_DEVICE
import torch
from pytorch_metric_learning.losses import (
MultipleLosses,
ContrastiveLoss,
TripletMarginLoss,
)
from pytorch_metric_learning.miners import MultiSimilarityMiner
from pytorch_metric_learning.utils import common_functions as c_f
class Te... |
from ..classes import Check
from ..exceptions import CheckError
def is_latitude(check_obj):
check_obj.is_real()
try:
check_obj.is_between(-90.0, 90.0)
return check_obj
except AssertionError:
raise CheckError('{} is not a valid latitude'.format(check_obj.value))
def is_longitude(c... |
/* eslint-disable quotes */
/* globals svgEditor */
svgEditor.readLang({
lang: "nl",
dir: "ltr",
common: {
"ok": "Ok",
"cancel": "Annuleren",
"key_backspace": "backspace",
"key_del": "delete",
"key_down": "omlaag",
"key_up": "omhoog",
"more_opts": "More Options",
"url": "URL",
... |
/* Zed Attack Proxy (ZAP) and its related class files.
*
* ZAP is an HTTP/HTTPS proxy for assessing web application security.
*
* Copyright 2018 the ZAP development team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You m... |
const formatData = (data) => {
const temp = data
if (
Object.prototype.toString.call(temp) === '[object Array]'
|| Object.prototype.toString.call(temp) === '[object Object]'
) {
for (const key in temp) {
if (temp[key] === null || temp[key] === undefined) {
temp[key] = ''
} else {
... |
import { withRouter } from 'next/router';
import { ClientRouter as AppBridgeClientRouter } from '@shopify/app-bridge-react';
function ClientRouter(props) {
const { router } = props;
return <AppBridgeClientRouter history = { router }
/>;
};
export default withRouter(ClientRouter); |