text stringlengths 3 1.05M |
|---|
from .roi_head_template import RoIHeadTemplate
from .hh3d_roi_head import HH3DRoIHead
__all__ = {
'RoIHeadTemplate': RoIHeadTemplate,
'HH3DRoIHead': HH3DRoIHead,
}
|
const React = require('react')
const {
default: styled
} = require('styled-components')
const BaseComponent = props => {
return <svg width='100%' height='100%' viewBox='0 0 16 16' preserveAspectRatio='xMidYMid meet' {...props}><rect width='100%' height='100%' id='icon-bound' fill='none' /><path d='M4,2v9h10V2H4z ... |
# This file is part of Indico.
# Copyright (C) 2002 - 2021 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
from indico.modules.bootstrap.controllers import RHBootstrap
from... |
# License: Apache-2.0
from feature_gen_str import contains
from typing import List, Union
import numpy as np
import pandas as pd
import databricks.koalas as ks
from._base_string_feature import _BaseStringFeature
class StringContains(_BaseStringFeature):
"""Create new binary columns.
The value is 1 if the ele... |
../../../GoogleAPIClient/Source/Services/Drive/Generated/GTLDriveFileList.h |
/**
* @license Apache-2.0
*
* Copyright (c) 2020 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... |
/*
* Atheros AR724X PCI host controller driver
*
* Copyright (C) 2011 René Bolldorf <xsecute@googlemail.com>
* Copyright (C) 2009-2011 Gabor Juhos <juhosg@openwrt.org>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as... |
/**
* Welcome to your Workbox-powered service worker!
*
* You'll need to register this file in your web app and you should
* disable HTTP caching for this file too.
* See https://goo.gl/nhQhGp
*
* The rest of the code is auto-generated. Please don't update this file
* directly; instead, make changes to your Wor... |
from genome_integration import gene_regions
import gzip
"""
These classes are intended to easily access and query ensembl genes information,
But they have other uses as well, so it is possible that these will be joined with the ensembl
"""
class EnsemblGene(gene_regions.StartEndRegion):
"""
Contains all the... |
#!/usr/bin/env python
"""
Solution to Day 4 - Puzzle 1 of the Advent Of Code 2015 series of challenges.
--- Day 4: The Ideal Stocking Stuffer ---
Solution must generate sequences of MD5 Hashes in Hex, using the conjugation of a secret key (given in the puzzle) and
a number. The goal is to find the lowest number than... |
import { Web3ContractProvider } from './web3.provider';
import PoetGalleryUserAbi from './abis/PoetGalleryUser.json';
import RoomFactoryAbi from './abis/RoomFactory.json';
import RoomAbi from './abis/Room.json';
import PoemFactoryAbi from './abis/PoemFactory.json';
export const createUser = async (
uri,
role
) => ... |
#!/usr/bin/env python
# -*- coding:utf-8 -*-
# Create Time: 2016/12/05 21:36:47
# Create author: XiaoFengfeng
import os
import binascii
from struct import pack
from xutils import num_bit
def get_bits_randint(nbits):
"""
获得一个随机的nbits位的自然数
>>> get_randint(64)
11911190890459235487
还有一种办法是:integer ... |
#!/bin/python3.5
# -*- coding: utf-8 -*-
#
# MIT License
#
# Copyright (c) 2018 Robert Gustafsson
# Copyright (c) 2018 Andreas Lindhé
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without... |
/*
YUI 3.8.0pr2 (build 154)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
if (typeof _yuitest_coverage == "undefined"){
_yuitest_coverage = {};
_yuitest_coverline = function(src, line){
var coverage = _yuitest_coverage[src];
if ... |
/* crypto/ecies/kdf.h */
/* ====================================================================
* Copyright (c) 2007 - 2015 The GmSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met... |
# Licensed to the .NET Foundation under one or more agreements.
# The .NET Foundation licenses this file to you under the Apache 2.0 License.
# See the LICENSE file in the project root for more information.
from sys import exit, path
orig_syspath = [x.lower() for x in path]
from iptest.assert_util import *
IP_DIR = sy... |
# core/encriptor.py
#----------------------------- Data Security Service ----------------------------------
from base64 import b64decode, b64encode
from cryptography.fernet import Fernet as fn
import asyncio
import sys
class Key:
key_holster: str = None
def __init__(self):
self.load_key()
... |
$(function() {
$("#myform").submit(function(e) {
e.preventDefault();
var womanName = $("#womanName").val();
var womanEmail = $("#womanEmail").val();
var womanSize = $("#womanSize").val();
var womanBrand = $("#womanBrand").val();
var womanColor = $("#womanColor").val();
var woma... |
const { ipcMain } = require("electron");
const uuid = require("uuid");
const executions = { };
const on = ipcMain.on.bind(ipcMain);
// Patch Module._resolveFilename to always require the Electron API when
// require('electron') is done.
const path = require("path");
const demoKitPath = path.join(__dirname, "demokit")... |
#!/usr/bin/env node
'use strict';
var persistence = require('gitter-web-persistence');
var onMongoConnect = require('gitter-web-persistence-utils/lib/on-mongo-connect');
var through2Concurrent = require('through2-concurrent');
var Promise = require('bluebird');
var GitHubOrgService = require('gitter-web-github').GitHu... |
import requests
import json
from collections import namedtuple
class Cryptopia:
def __init__(self):
self.currency = namedtuple("Currency", ["symbol", "exchange", "price", "volume"])
self.api_endpoint = "https://www.cryptopia.co.nz/api/"
def get_products(self):
product_list = []
... |
/**
* Created by zyong on 2016/8/2.
*/
// 生成随机字符串
function randomStr() {
return Math.random().toString(36).substring(2);
}
function render(template, context, tokenReg, hasDollarPrefix, resultProcessor) {
return template.replace(tokenReg, function (word, slash1, token, slash2) {
if (slash1 || slash2) ... |
var assert = require("assert"),
fs = require("fs"),
https = require("https"),
apib2swagger = require("../index.js"),
tv4 = require('tv4');
var remote = 'https://raw.githubusercontent.com/apiaryio/api-blueprint/format-1A9/examples/',
localInput = 'test/input/',
localOutput = 'test/output/',
... |
$(document).on("click", "#live-pagination .lg-next", function(e){
var href = $(this).attr("href");
href = href.split('&');
var rank = href[0].substring(6, 99);
var page = href[1].substring(5, 99);
var i = 0;
e.stopPropagation(); // 드롭박스 클릭시 다시 올라가는거 방지
$.ajax({
headers: {'X-CSRF-T... |
# coding: utf-8
import pytest
from datetime import datetime
import pandas as pd
from dgp.lib import time_utils as tu
def test_leap_seconds():
# TO DO: Test edge cases
gpsweek = 1959
gpsweeksecond = 219698.000
unixtime = 1500987698 # 2017-07-25 13:01:38+00:00
dt = datetime.strptime('2017-07-25 13... |
"""
Large hyperparameter training session
"""
import sys
import os
sys.path.insert(0, os.getcwd())
import numpy as np
import torch
import torch.nn.functional as F
import os
import tqdm
import time
import h5py
import argparse
import json
from collections import defaultdict
import subprocess
import contextlib
@context... |
from ..io.main_legacy import Saveable, get_typemap, loader
from .base import Dprops
# from binned import bindat
class basic(Saveable, Dprops):
@property
def shape(self,):
return self.mpltime.shape
type_map = get_typemap(__name__)
# Get the data classes in the current namespace.
def load(fname, ty... |
traindata_folder = 'dataset/train/'
TRAIN_FULL = 'train/train'
import os
import numpy as np
from tqdm import tqdm
import csv as csv
if __name__ == '__main__':
max_seq_len = 1000
sum_x = np.zeros(102)
sum_x2 = np.zeros(102)
mean = np.zeros(102)
stddev = np.zeros(102)
length = 0
files = os.... |
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
from itertools import product
from typing import Any, Callable
import torch
from common_testing import get_rand... |
const fs = require('fs');
const Web3 = require('web3');
const web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));
console.log("Reading data...")
const address = fs.readFileSync(process.argv[2]+".address").toString().trim()
let abi = false
if(!address){
console.log("Couldn't load "+process.argv... |
const fs = require('fs');
const path = require('path');
const ensurePath = require('../utils/ensure-path');
let config = { };
const init = (args) => {
// get the path (everything before the last '/')
const givenPath = path.dirname(args[0]);
// get the name (the word after the last '/')
const componentName =... |
import urllib.parse
import os
import json
def query_aws(account, query, region=None):
if not region:
file_name = "account-data/{}/{}.json".format(account.name, query)
else:
file_name = "account-data/{}/{}/{}.json".format(
account.name, region.name, query
)
if os.path.is... |
import os
import threading
import logging
import alsaaudio
from pocketsphinx import get_model_path
from pocketsphinx.pocketsphinx import Decoder
import alexapi.triggers as triggers
from .basetrigger import BaseTrigger
logger = logging.getLogger(__name__)
class PocketsphinxTrigger(BaseTrigger):
type = triggers.T... |
# model settings
temperature = 0.2
with_norm = True
query_dim = 128
model = dict(
type='SimSiamBaseSingleTracker',
backbone=dict(
type='ResNet',
pretrained=None,
depth=18,
out_indices=(3, ),
# strides=(1, 2, 1, 1),
norm_cfg=dict(type='SyncBN', requires_grad=True),... |
//
// NSAttributedString+SCBase.h
// Pods
//
// Created by Solo on 17/1/12.
//
// Base
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@class UIColor;
@class UIFont;
@class NSParagraphStyle;
@interface NSAttributedString (SCBase)
#pragma mark - Base
/**
获取NSAttributedString的全范围(NSMakeRange(0, string.... |
import {SpatialAnalystService} from '../../../src/mapboxgl/services/SpatialAnalystService';
import {GeoRelationAnalystParameters} from '../../../src/common/iServer/GeoRelationAnalystParameters';
import {FilterParameter} from '../../../src/common/iServer/FilterParameter';
import {SpatialRelationType} from '../../../src/... |
from app.database.connection import DatabaseConnection
class ScopedSession:
def __init__(self, connection: DatabaseConnection):
self.session = connection.make_session()
def __enter__(self):
return self.session
def __exit__(self, exc_type, exc_val, exc_tb):
if exc_type is not None... |
class Circle {
constructor(radius) {
this.radius = radius;
}
get diameter() {
return this.radius * 2;
}
set diameter(diameter) {
this.radius = diameter / 2;
}
get area() {
return Math.PI * this.radius ** 2;
}
}
let c = new Circle(2);
console.log(`Radiu... |
// @flow
import * as React from 'react';
import { IconButton } from '../../components/buttons';
import { Wrapper, MenuContainer, MenuOverlay, Absolute } from './style';
type Props = {
hasNavBar?: boolean,
darkContext?: boolean,
hasTabBar?: boolean,
children: React.Node,
};
type State = {
menuIsOpen: boolean... |
// Freelancer Theme JavaScript
(function($) {
"use strict"; // Start of use strict
// jQuery for page scrolling feature - requires jQuery Easing plugin
$('.page-scroll a').bind('click', function(event) {
var $anchor = $(this);
$('html, body').stop().animate({
scrollTop: ($($anc... |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from gym.spaces import Discrete
import numpy as np
from scipy.stats import entropy
import tensorflow as tf
import tensorflow.contrib.layers as layers
import ray
from ray.rllib.models import ModelCatalog, Categ... |
import { Workbox, messageSW } from 'workbox-window';
import './views/app/bnb-app';
// HACK(keanulee): The Redux package assumes `process` exists - mock it here before
// the module is loaded.
window.process = {
env: {
NODE_ENV: 'production',
},
};
if ('serviceWorker' in navigator) {
window.addEventListener(... |
import test.test_support, unittest
import sys, codecs, htmlentitydefs, unicodedata
class PosReturn:
# this can be used for configurable callbacks
def __init__(self):
self.pos = 0
def handle(self, exc):
oldpos = self.pos
realpos = oldpos
if realpos<0:
realpos = ... |
# 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 in writing, software
# distributed under t... |
/* Copyright (C) 2013-2015 Free Software Foundation, Inc.
This file is part of GDB.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option... |
"""
=====================================
Streamline length and size reduction
=====================================
This example shows how to calculate the lengths of a set of streamlines and
also how to compress the streamlines without considerably reducing their
lengths or overall shape.
A streamline in Dipy is re... |
"use strict";
exports.rowIndex = function (row) {
return function () {
return row.rowIndex;
};
};
// ----------------------------------------------------------------------------
exports.sectionRowIndex = function (row) {
return function () {
return row.sectionRowIndex;
};
};
// ---------------------... |
from __future__ import print_function
import shutil
import tempfile
from datetime import date
import os
import time
import unittest
from urllib.parse import urlencode
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as ... |
import axios from 'axios';
const API = axios.create({ baseURL: 'http://localhost:5000' });
API.interceptors.request.use((req) => {
if (localStorage.getItem('profile')) req.headers.Authorization = `Bearer ${JSON.parse(localStorage.getItem('profile')).token}`;
return req;
});
export const fetchPosts = () => AP... |
import { SET_ROUTE_BEFORE_REDIRECT } from './mutation-types'
const state = {
routeBeforeRedirect: null
}
export const mutations = {
[SET_ROUTE_BEFORE_REDIRECT](state, value) {
state.routeBeforeRedirect = value
}
}
export default {
state,
mutations
}
|
#-*-coding:utf-8-*-
import re
from gorden_crawler.sizeregex.basestrategy import BaseStrategy
class Thecorner (BaseStrategy):
def transform(self, size, reg, site, key):
return
def getReMap(self):
return |
import pytest
from pytest import approx
import time
import datetime as dt
from ..stopwatch import Stopwatch, _gettime
def test_stopwatch():
"""docstring for test_stopwatch"""
s = Stopwatch()
s.start()
time.sleep(0.1)
assert s.stop() == approx(0.1, rel=0.5)
def test_gettime():
"""Test gettim... |
# coding=utf-8
# ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
from collections import defaultdict
import datetime
import os
import pytest
import platform
import functools
import itertools
import json
import time
fro... |
# Copyright 2021 The Trieste Contributors
#
# 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... |
import { createIcon } from '../createIcon';
export const CloudUploadAltIconConfig = {
name: 'CloudUploadAltIcon',
height: 512,
width: 640,
svgPath: 'M537.6 226.6c4.1-10.7 6.4-22.4 6.4-34.6 0-53-43-96-96-96-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32c-88.4 0-160 71.6-160 160 0 2.7.1 5.4.2 8.1C40.2 219.8 0 ... |
/*
Copyright (c) 2012, Yahoo! Inc. All rights reserved.
Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
*/
var nopt = require('nopt'),
Report = require('../report'),
path = require('path'),
fs = require('fs'),
Collector = require('../collector'),
inpu... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.pathToParts = void 0;
/**
* @memberof module:flat
* @alias PathToPartsOptions
*/
/**
* @load ./path-to-parts.doc.md
* @param {string} propertyPath
* @param {PathToPartsOptions} options
* @returns {PathPar... |
from math import floor
_multipliers = {
0: [
[0.3616, -0.2768, 0.1488, -0.0336, 0.0000],
[0.2640, -0.0960, 0.0400, -0.0080, 0.0000],
[0.1840, 0.0400, -0.0320, 0.0080, 0.0000],
[0.1200, 0.1360, -0.0720, 0.0160, 0.0000],
[0.0704, 0.1968, -0.0848, 0.0176, 0.0000]
],
5:... |
import global_vars
import datetime
import pandas as pd
from pandas.tseries.holiday import USFederalHolidayCalendar
from pandas.tseries.offsets import CustomBusinessDay
# Set up Calendar
jan1_2016 = pd.to_datetime(20160101, format='%Y%m%d', errors='ignore')
dec31_2017 = pd.to_datetime(20171231, format='%Y%m%d', errors... |
//
// HP Inc.
// All rights reserved.
//
// This file, its contents, concepts, methods, behavior, and operation
// (collectively the "Software") are protected by trade secret, patent,
// and copyright laws. The use of the Software is governed by a license
// agreement. Disclosure of the Software to third parties, in an... |
import collections
import json
import copy
KVS_KEY_TERMINATOR = '='
KVS_VALUE_TERMINATOR = ';'
KVS_STRUCT_START = '['
KVS_STRUCT_END = ']'
KVS_META_DATA = '~'
KVS_STATE_KEY = 0
KVS_STATE_VALUE = 1
KVS_STATE_META = 2
class INT(object):
encoding = 'UTF-8'
def __init__(self, init_value):
self.value = ... |
# coding: utf-8
"""
YNAB API Endpoints
Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudge... |
/**
* Layout component that queries for data
* with Gatsby's useStaticQuery component
*
* See: https://www.gatsbyjs.org/docs/use-static-query/
*/
import React from "react"
import PropTypes from "prop-types"
import { useStaticQuery, graphql } from "gatsby"
import Header from "./header"
import "./layout.css"
cons... |
/*
* Copyright (c) 2020 Project CHIP 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.... |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2015, Alcatel-Lucent Inc
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# no... |
import copy, time, traceback, logging
import os
from typing import List, Union, Tuple
import networkx as nx
import numpy as np
import pandas as pd
import psutil
from collections import defaultdict
from autogluon.core.constants import AG_ARGS, AG_ARGS_FIT, BINARY, MULTICLASS, REGRESSION, QUANTILE, REFIT_FULL_NAME, REF... |
Object.defineProperty(exports, "__esModule", { value: true });
var platform_1 = require("../../platform");
var file_system_1 = require("../file-system");
var trace = require("../../trace");
var appCommonModule = require("../../application/application-common");
var qualifier_matcher_1 = require("../../module-name-resolv... |
"""
A collection of functions and objects for creating or placing inset axes.
"""
from matplotlib import cbook, docstring
from matplotlib.offsetbox import AnchoredOffsetbox
from matplotlib.patches import Patch, Rectangle
from matplotlib.path import Path
from matplotlib.transforms import Bbox, BboxTransformTo
... |
let form = document.querySelector("form");
form.addEventListener("submit",(e)=>{
let invis = document.querySelector("#invis");
let btn = document.querySelector("button");
btn.style.display="none";
invis.style.visibility="visible";
setTimeout(function () {
window.location.href = "./successfu... |
/**
* @license Apache-2.0
*
* Copyright (c) 2020 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... |
#!/usr/bin/env python3
# FreeRTOS STM32 Reference Integration
#
# Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the So... |
/*!
* # Semantic UI 2.4.1 - Visibility
* http://github.com/semantic-org/semantic-ui/
*
*
* Released under the MIT license
* http://opensource.org/licenses/MIT
*
*/
;(function ($, window, document, undefined) {
'use strict';
window = (typeof window != 'undefined' && window.Math == Math)
? window
: (typeof... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var React = tslib_1.__importStar(require("react"));
var styled_icon_1 = require("@styled-icons/styled-icon");
exports.AmazonPay = React.forwardRef(function (props, ref) {
var attrs = {
"fill": "curre... |
/* ====================================================================
* File: SceneTaskScheduler.h
* Created: 09/19/10
* Author: Sun Jinbo
* Copyright (c): Tieto, All rights reserved
* ==================================================================== */
#ifndef C_SCENETASKSCHEDULER_H
#define C_SCENETASKSCHED... |
/*
Project Name: NodeUpload
Project Developer: NdT3Development
Project GitHub: https://github.com/NdT3Development/nodeupload
Project Info: https://github.com/NdT3Development/nodeupload#node-upload
Project License:
MIT License
Copyright (c) 2017 NdT3Development
Permission is hereby granted, free of charge, to any per... |
const Log4js = require('log4js');
const moment = require('moment');
Log4js.addLayout('json', function () {
return function (logEvent) {
logEvent.datetime = moment().format('YYYY-MM-DD HH:mm:ss');
for (let key in logEvent.data[0]) {
if (logEvent.data[0].hasOwnProperty(key)) {
logEvent[key] = logE... |
"""
Module for queing telegrams.
When a device wants to sends a telegram to the KNX bus, it has to queue it to the TelegramQueue within XKNX.
The underlaying KNXIPInterface will poll the queue and send the packets to the correct KNX/IP abstraction (Tunneling or Routing).
You may register callbacks to be notified if ... |
import { ActivitySpecialAccess } from '../../../components/d2l-activity-editor/state/activity-special-access.js';
import { ActivitySpecialAccessEntity } from 'siren-sdk/src/activities/ActivitySpecialAccessEntity.js';
import { expect } from 'chai';
import { fetchEntity } from '../../../components/d2l-activity-editor/sta... |
/* Automatically generated by './build/bin/build-entry.js' */
import Pagination from '../packages/pagination/index.js';
import Dialog from '../packages/dialog/index.js';
import Autocomplete from '../packages/autocomplete/index.js';
import Dropdown from '../packages/dropdown/index.js';
import DropdownMenu from '../... |
import os
from maya import cmds
import avalon.maya
import openpype.api
from openpype.hosts.maya.api.lib import extract_alembic
class ExtractAlembic(openpype.api.Extractor):
"""Produce an alembic of just point positions and normals.
Positions and normals, uvs, creases are preserved, but nothing more,
fo... |
var TargetMode;
(function (TargetMode) {
TargetMode[TargetMode["tab"] = 0] = "tab";
TargetMode[TargetMode["self"] = 1] = "self";
TargetMode[TargetMode["blank"] = 2] = "blank";
TargetMode[TargetMode["window"] = 3] = "window";
})(TargetMode || (TargetMode = {}));
var NavbarDefaultOption = /** @class */ (f... |
import mongoose from 'mongoose';
const {
String,
Date,
Boolean,
ObjectId,
Number,
} = mongoose.Schema.Types;
const PostSchema = new mongoose.Schema({
title: String,
author: ObjectId,
previewText: String,
body: String,
category: String,
publishing_date: Date,
published: Boolean,
attachedGalle... |
from typing import Optional
import abjad
from .. import get
from .prettify_rewrite_meter import (
prettify_rewrite_meter as prettify_rewrite_meter_function,
)
def fill_with_rests(container: abjad.Container,
*,
disable_rewrite_meter: bool = False,
prett... |
import glob
import json
import os
from argparse import ArgumentParser
from collections import defaultdict
from copy import deepcopy
from functools import partial
from multiprocessing import Pool
from typing import List, Tuple, Dict, Set
from tqdm import tqdm
from transformers import AutoTokenizer, PreTrainedTokenizer
... |
// MY INFURA_ID, SWAP IN YOURS FROM https://infura.io/dashboard/ethereum
export const INFURA_ID = "f9a97da1bf6249588edd8b0f94d883ce";
// MY ETHERSCAN_ID, SWAP IN YOURS FROM https://etherscan.io/myapikey
export const ETHERSCAN_KEY = "R4JQRKXWQ5YDZWMY83127QCWJJQFX98DTU";
// BLOCKNATIVE ID FOR Notify.js:
export const BL... |
import React from 'react'
import { graphql } from 'gatsby'
import Layout from '../containers/layout'
import GraphQLErrorList from '../components/graphql-error-list'
import SEO from '../components/seo'
import ProductsGrid from '../components/products-grid'
import Cart from '../components/cart'
export const query = grap... |
# -*- coding: utf-8 -*-
"""
asaloader程式CLI介面的進入點。
"""
from asaloader import cli_arg
from asaloader import business
import argparse
import sys
def run():
# CLI 參數解析
parser = argparse.ArgumentParser()
cli_arg.parser_init(parser)
args = parser.parse_args()
# 副命令分發
if args.subcmd == 'print-devic... |
const { getOptions, stringifyRequest } = require('loader-utils');
const path = require('path');
const templateUrlRegex = /templateUrl\s*:\s*['"`](.*?)['"`]\s*([,}\n])/gm;
const DEFAULTS = {
basePath: ''
};
module.exports = function(source) {
const options = Object.assign(
{},
DEFAULTS,
getOptions(this... |
from src.platform.jboss.interfaces import JMXInterface
class FPrint(JMXInterface):
def __init__(self):
super(FPrint, self).__init__()
self.version = "5.1"
|
/* eslint-disable */
var rohrdata = "";
var Rohr_Opt = Object.create(null);
Rohr_Opt.Flag = 100032;
Rohr_Opt.LogVal = "rohrdata";
var screen = {
width: 375,
height: 667,
availWidth: 375,
availHeight: 667,
pixelDepth: 24,
colorDepth: 24
}
var window = {
location: {
href: 'https://activity.waimai.meitua... |
SORT_LATEST = 'latest-adddate'
class BaseRespository(object):
@classmethod
def filter_limit(cls, queryset, limit):
return queryset.limit(limit) if limit else queryset
@classmethod
def filter_offset(cls, queryset, offset):
return queryset.offset(offset) if offset else queryset
@cl... |
var jishu=0;
var addOnoff = true;
//var zouOnoff = false;
/*if(!localStorage.getItem('ceshi')){
localStorage.setItem('ceshi',0);
localStorage[localStorage.getItem('ceshi').toString()]= JSON.stringify({fuid:[{'ziid':'0'},{'xiaoid':'0'}]});
}*/
//console.log(getCookie('cok2'));
fengAjax("post","http://www.buruwo.com/in... |
/** @file -- BaseBinSecurityLib.h
MS_CHANGE_?
Copyright (c) Microsoft Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef _BASE_BIN_SECURITY_LIB_H_
#define _BASE_BIN_SECURITY_LIB_H_
/**
Initialize the security cookie present in this module
This function uses the function bel... |
import datetime
import threading
from django.utils.html import escape as html_escape
from mongoengine import EmbeddedDocument
try:
from mongoengine.base import ValidationError
except ImportError:
from mongoengine.errors import ValidationError
from mongoengine.base.datastructures import BaseList
from mongoengi... |
/** * Imports ***/
const PAKO = require('pako');
import LoadersBase from './loaders.base';
import CoreUtils from '../core/core.utils';
import ModelsSeries from '../models/models.series';
import ModelsStack from '../models/models.stack';
import ModelsFrame from '../models/models.frame';
import ParsersDicom from '../par... |
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
long long sum = 0;
void* sum_runner(void* arg)
{
long long *limit_ptr = (long long*)arg;
long long limit = *limit_ptr;
for(long long i = 0; i <= limit; i++){
sum += i;
}
//sum is global variables
pthread_exit(0);
}
int main(int argc, char**... |
import { test } from "uvu";
// eslint-disable-next-line no-unused-vars
import { equal, is, ok, throws, type, not, match } from "uvu/assert";
import { compare } from "ast-compare";
import { tokenizer as ct } from "../dist/codsen-tokenizer.esm.js";
// css rules
// -------------------------------------------------------... |
from dagster_graphql import dauphin
from dagster import check
from dagster.core.snap import PipelineSnapshot
from dagster.core.types.dagster_type import DagsterTypeKind
from .config_types import DauphinConfigType, to_dauphin_config_type
def config_type_for_schema(pipeline_snapshot, schema_key):
return (
... |
import React from "react"
import { StyledFooter } from "./styles"
const Footer = () => {
return (
<StyledFooter>
<span>© {new Date().getFullYear()}, bulit by Piotr Grzymowicz </span>
<a href="mailto:piotr.grzymowicz1@gmail.com">Contact me</a>
</StyledFooter>
)
}
export default Footer
|
import React, { Component } from 'react';
import { connect } from 'react-redux'
import { isEditor, isAdmin, isOrgAdmin } from '../../../utility'
import fontawesome from '@fortawesome/fontawesome'
import FontAwesomeIcon from '@fortawesome/react-fontawesome'
import { faGlobe, faUsers, faSortDown, faUser } from '@fortawes... |