text stringlengths 3 1.05M |
|---|
const fs = require('fs');
const Contract = require('../contract');
const TestContract = require('./__mocks__/contracts/Test');
const TestContractWithComments = require('./__mocks__/contracts/TestWithComments');
const removeLineBreaks = require('../../../utils/remove-line-breaks');
const Event = require('../event');
con... |
exports.config = {
}
|
import {
Paper, Tab, AppBar,
} from "@mui/material";
import TabPanel from '@mui/lab/TabPanel';
import {useState} from "react";
import {TabContext, TabList} from "@mui/lab";
import Elevation from "./Elevation";
import Speed from "./Speed";
const centerStyle = {
left: "50%",
transform: 'translate(-50%, 0%)'... |
"""
:package: Hestia
:file: task.py
:brief: Task base class.
:author: PiloeGAO (Leo DEPOIX)
:version: 0.0.4
"""
class Task():
"""Task class.
Args:
entityType (str): Entity's type. Defaults to "Assets".
id (str): Entity's ID. Defaults to "".
name (str... |
"""
Copyright (c) 2006 Jan-Klaas Kollhof
This file is part of jsonrpc.
jsonrpc is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later ... |
/**********************************************************************************************
*
* raylib v4.1-dev - A simple and easy-to-use library to enjoy videogames programming (www.raylib.com)
*
* FEATURES:
* - NO external dependencies, all required libraries included with raylib
* - Multiplatfor... |
/**
* Copyright (c) 2016-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE_render file in the root directory of this subproject. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#include "C... |
"use strict"; //eslint-disable-line
require("babel-core/register");
const gulp = require("gulp");
const eslint = require("gulp-eslint");
const del = require("del");
// const mocha = require("gulp-mocha");
const babel = require("gulp-babel");
// const path = require("path");
const sourcemaps = require("gulp-sourcemaps"... |
import os
from fnmatch import fnmatch
from multiprocessing import Pool
import random
import cv2
import tqdm
source_path = "/home/rik/nsfw_classifier/nsfw_data_scraper/source"
save_path = "/home/rik/apps/youtube/nsfw-classifier-demo/data/train/positive"
size = 306
def process_image(image_file):
filename = image... |
import click
import glob
import numpy as np
import geopandas as gpd
import pandas as pd
import matplotlib.pyplot as plt
from copro import utils, evaluation
import os, sys
@click.command()
@click.option('-t0', '--start-year', type=int)
@click.option('-t1', '--end-year', type=int)
@click.option('-c', '--column', help='c... |
var searchData=
[
['name',['name',['../classVinetalk_1_1VineObject_1_1cRep.html#a9008e6230b0294af18708ed27df0e6e4',1,'Vinetalk.VineObject.cRep.name()'],['../structvine__object__s.html#ac0d3e0bed9ca4efb24208d6e89a93db4',1,'vine_object_s::name()'],['../structallocation.html#ace567607042eb16aa3b0629142e5ea25',1,'allocat... |
import unittest
from plugins.sakuralive import SakuraLive
class TestPluginSakuraLive(unittest.TestCase):
def test_can_handle_url(self):
should_match = [
'http://www.sakuralive.com/preview.php?CHANNELNAME',
]
for url in should_match:
self.assertTrue(SakuraLive.can_h... |
import { setRoute } from "egov-ui-kit/utils/commons";
import React from "react";
import {
getEpochForDate, sortByEpoch
} from "../../utils";
import {download} from "egov-common/ui-utils/commons"
export const searchResults = {
uiFramework: "custom-molecules",
componentPath: "Table",
visible: false,
props: {
... |
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[54],{"571d":function(t,e,o){"use strict";o.r(e);var s=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[o("q-input",{staticStyle:{display:"none"},model:{value:t.scaneddata.request_time,callback:function(e){t.$set(t.scaneddata,"request_tim... |
import numpy as np
# Solution Library for problem 045e512c
"""
Solutions by Muhammad Ali Khan (Student ID 20235525)
"""
def get_sub_matrix(row, column, x):
"""Return the 3x3 matrix starting from the given (row, column) square. If the matrix goes beyond dimensions of the main matrix (x)
it fills in the squares ... |
const router = require('express').Router();
const { User, Post, Vote,Comment } = require("../../models");
// GET /api/users
router.get('/', (req, res) => {
// Access our User model and run .findAll() method)
User.findAll({
attributes: { exclude: ['password'] }
})
.then(dbUserData => res.json(dbUserData))... |
const path = require("path")
const Mocha = require("mocha")
const glob = require("glob")
function run() {
// Create the mocha test
const mocha = new Mocha({
ui: "tdd",
color: true,
})
const testsRoot = path.resolve(__dirname, "..")
return new Promise((c, e) => {
glob("**/**.test.js", { cwd: tes... |
from dataclasses import dataclass
from test.pycardano.util import check_two_way_cbor
from typing import Union
import pytest
from pycardano.exception import DeserializeException, SerializeException
from pycardano.plutus import (
COST_MODELS,
ExecutionUnits,
PlutusData,
Redeemer,
RedeemerTag,
pl... |
#!/usr/bin/env python3
import pytest
from typing import TYPE_CHECKING
from pydantic import ValidationError
from binance.client.response import ResponseException
if TYPE_CHECKING:
from binance.client import Client
def test_get_position_mode(client: 'Client'):
if client._api_key is None:
pytest.skip("... |
var storage = require('..')
var fs = require('fs')
var expect = require('chai').expect
var rimraf = require('rimraf')
var path = require('path')
describe('Storage', function () {
var userDir = path.join(__dirname, '..', '.tmp')
var route = [userDir, 'foo', 'bar']
var storageDir = path.join.apply(path, route)
v... |
describe('Core.Palette', () => {
before(() => {
Test.assertSL();
});
describe('Constructor', () => {
let palette;
before(() => {
palette = new Test.Lib.Core.Palette(Test.SL, $.extend({}, Test.Lib.Core.StampLines.DEFAULT.config.Palettes));
});
after(() => {
palette.destroy();
... |
'''
URL: https://leetcode.com/problems/rearrange-string-k-distance-apart
Time complexity: O(n) (would be O(nlogn) but heap has max size of 26 letters here :) )
Space complexity: O(1) (would be O(n) but we have max 26 unique letters :) )
'''
from heapq import heappush, heappop
from collections import defaultdict
class... |
"use strict";
/**
* @class elFinder command "paste"
* Paste filesfrom clipboard into directory.
* If files pasted in its parent directory - files duplicates will created
*
* @author Dmitry (dio) Levashov
**/
elFinder.prototype.commands.paste = function() {
this.disableOnSearch = true;
this.updateOnSelect = ... |
from getpass import getpass
from json import load
import sys
class EmailSettings(object):
""" Create an object with all connection settings """
def __init__(self):
with open("config.json") as config:
config_file = load(config)
# Get username safely
try:
self.... |
/*---------------------------------------------------------------------------
FT1000 driver for Flarion Flash OFDM NIC Device
Copyright (C) 2002 Flarion Technologies, All rights reserved.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public Lice... |
def new_client():
file_client = open('file_client.txt', 'a')
file_client.write(input('DNI:\n'))
file_client.write(';')
file_client.write(input('Name:\n'))
file_client.write(';')
file_client.write(input('Surname:\n'))
file_client.write(';')
file_client.write(input('Address:\n'))
file_... |
/*
* Generated by asn1c-0.9.24 (http://lionet.info/asn1c)
* From ASN.1 module "S1AP-IEs"
* found in "S1AP-IEs.asn"
*/
#ifndef _S1ap_ForbiddenInterRATs_H_
#define _S1ap_ForbiddenInterRATs_H_
#include <asn_application.h>
/* Including external dependencies */
#include <NativeEnumerated.h>
#ifdef __cplusplus
exte... |
#ifndef BIT32_H
#define BIT32_H
#include <stdint.h>
/*
LENG - length of an integer
NBETA - number of parallel betas
NBETA_MAX - align NBETA into "LENG" boundaries
NBETA_PER_WORD - number of betas combined into a word
NWORD - number of words for all betas
must garantee NBE... |
import React from 'react';
import {View, TouchableOpacity} from 'react-native';
import styles from './styles';
import PropTypes from 'prop-types';
import {Image} from '@components';
import {Images, useTheme} from '@config';
export default function Card(props) {
const {colors} = useTheme();
const {style, children, ... |
import axios from 'axios';
const API_KEY = '40377088d000fa327c7b6487e6308e8e';
const ROOT_URL = `http://api.openweathermap.org/data/2.5/forecast?&appid=${API_KEY}`;
export const FETCH_WEATHER = 'FETCH_WEATHER';
export function fetchWeather(city) {
const url = `${ROOT_URL}&q=${city},gb`;
const request = axios.get(... |
# Copyright 2021 MONAI Consortium
# 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, s... |
import matplotlib.pyplot as plt
# The slices will be ordered and plotted counter-clockwise.
labels = 'Frogs', 'Hogs', 'Dogs', 'Logs'
sizes = [15, 30, 45, 10]
colors = ['yellowgreen', 'gold', 'lightskyblue', 'lightcoral']
explode = (0, 0.1, 0, 0) # only "explode" the 2nd slice (i.e. 'Hogs')
plt.pie(sizes, exp... |
from pandac.PandaModules import *
from direct.interval.IntervalGlobal import *
from direct.particles import ParticleEffect
from direct.particles import Particles
from direct.particles import ForceGroup
from PooledEffect import PooledEffect
from EffectController import EffectController
import os
class VoodooAuraHeal(Po... |
/**
* DO NOT EDIT THIS FILE
*
* It is not used to to build anything.
*
* It's just a record of the old flow types.
*
* Use it as a guide when converting
* - static/src/javascripts/projects/common/modules/ui/bannerPicker.js
* to .ts, then delete it.
*/
// @flow
import ophan from 'ophan/ng';
export type Banne... |
# -*- coding: utf-8 -*-
# Copyright 2012 Fanficdownloader team
#
# 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 require... |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Link } from 'react-router';
class Header extends Component {
renderLinks() {
if(this.props.authenticated) {
return (
<li className="nav-item">
<Link className="nav-link" to="/signout">Sign Out</Li... |
import pandas as pd
import re
import requests
from bs4 import BeautifulSoup
from tqdm import tqdm
# Get basic players information for all players
base_url = "https://sofifa.com/players?offset="
columns = ['ID', 'Name', 'Age', 'Photo', 'Nationality', 'Flag', 'Overall', 'Potential', 'Club', 'Club Logo', 'Value', 'Wage'... |
# test
#input = 3 # answer : 638
#real
input = 344 # answer : 996
class Node:
def __init__(self, value, ptr):
self.value = value
self.ptr = ptr
current = Node(0, None)
current.ptr = current
zeroptr = current
for i in range(1, 2018):
# move forward "input" steps
for j in range(input):
... |
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_git_submodule_h__
#define INCLUDE_git_submodule_h__
#include BOSS_LIBGIT2_U_common_h //o... |
""" Download a file from a url.
"""
from __future__ import print_function
import sys
import argparse
from time import monotonic
from six.moves.urllib.request import urlopen
try:
import pasteboard as clipboard
import console
except:
console = None
def main(args):
from progress.bar import ChargingB... |
import { useMutation } from '@redwoodjs/web'
import { toast } from '@redwoodjs/web/toast'
import { Link, routes, navigate } from '@redwoodjs/router'
const DELETE_POST_MUTATION = gql`
mutation DeletePostMutation($id: Int!) {
deletePost(id: $id) {
id
}
}
`
const jsonDisplay = (obj) => {
return (
... |
# coding: utf-8
"""
stash-server
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: v0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
... |
const { GraphQLUpload } = require("graphql-upload")
const { accountResolvers, accountTypeDefs } = require("./Account")
const { categoryResolvers, categoryTypeDefs } = require("./Category")
const { fileResolvers, fileTypeDefs } = require("./File")
const { orderResolvers, orderTypeDefs } = require("./Order")
const {... |
const { NotImplementedError } = require('../extensions/index.js');
/**
* Extract season from given date and expose the enemy scout!
*
* @param {Date | FakeDate} date real or fake date
* @returns {String} time of the year
*
* @example
*
* getSeason(new Date(2020, 02, 31)) => 'spring'
*
*/
const deeperFa... |
var searchData=
[
['netconnector',['NetConnector',['../classcom_1_1android_1_1net_1_1NetConnector.html',1,'com::android::net']]]
];
|
import React from 'react'
const renderCharacterKey = (character, value, onUpdateValue, animated) => {
const onClick = () => {
onUpdateValue(value ? value + character : character)
}
const animations = ['bounceInDown', 'bounceInUp', 'bounceInLeft', 'bounceInRight']
const animation = animated ? `animated ${a... |
import datetime
import itertools
import os
import re
from importlib import import_module
from urllib.parse import ParseResult, quote, urlparse
from django.apps import apps
from django.conf import settings
from django.contrib.admin.models import LogEntry
from django.contrib.auth import (
BACKEND_SESSION_KEY, REDIRE... |
$(function () {
$('.b-team__list').slick({
//arrows: true,
//dots: false,
//infinite: true,
//swipe: false,
//centerMode: true,
//centerPadding: '60px',
slidesToShow: 3
});
}); |
webpackHotUpdate("app",{
/***/ "./src/helpers/alignGrid.ts":
/*!**********************************!*\
!*** ./src/helpers/alignGrid.ts ***!
\**********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\nObject.defineProperty(exports... |
/* vi:set ts=8 sts=4 sw=4 noet:
*
* VIM - Vi IMproved by Bram Moolenaar
*
* Do ":help uganda" in Vim to read copying and usage conditions.
* Do ":help credits" in Vim to see a list of people who contributed.
* See README.txt for an overview of the Vim source code.
*/
/*
* ops.c: implementation of various oper... |
from models import Song
from random import choice
def random_song(genre):
results = Song.query().filter(Song.genre==genre).fetch()
print(results)
songs = choice(results)
random_song = {
"title": songs.song,
"album": songs.album,
"artist": songs.artist.lower(),
"genre": g... |
/**
* Copyright (c) 2013-present, Facebook, Inc.
* 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. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @provides... |
from .job import Job
from .dagman import Dagman
from .visualize import visualize
from . import utils
from .__version__ import __version__
|
# Capture the original matplotlib rcParams
import matplotlib as mpl
_orig_rc_params = mpl.rcParams.copy()
# Import seaborn objects
from .rcmod import *
from .utils import *
from .palettes import *
from .relational import *
from .regression import *
from .categorical import *
from .distributions import *
from .matrix i... |
import '@polymer/iron-flex-layout/iron-flex-layout.js';
import '@polymer/iron-icons/iron-icons.js';
import '@polymer/paper-card/paper-card.js';
import '@polymer/paper-dialog-scrollable/paper-dialog-scrollable.js';
import '@polymer/paper-dialog/paper-dialog.js';
import '@polymer/paper-toast/paper-toast.js';
import '@vaa... |
/*!
Flatdoc (http://ricostacruz.com/flatdoc)
(c) 2013 Rico Sta. Cruz. MIT licensed.
Also includes:
marked
a markdown parser
(c) 2011-2013, Christopher Jeffrey. (MIT Licensed)
https://github.com/chjj/marked
base64.js
http://github.com/dankogai/js-base64
*/
!function($){var exports=this;var marked... |
#!/usr/bin/env python
import os
from setuptools import setup, find_packages
from codecs import open
here = os.path.abspath(os.path.dirname(__file__))
execfile(os.path.join(here, "src/fileseq/__version__.py"))
# Get the long description from the README file
with open(os.path.join(here, 'README.md'), encoding='utf-8'... |
import { mount } from '@vue/test-utils'
import { leftClick, findLabelContainerByNodeId } from './shared'
import Treeselect from '@src/components/Treeselect'
import { UNCHECKED, INDETERMINATE, CHECKED } from '@src/constants'
describe('Single-select', () => {
it('basic', () => {
const wrapper = mount(Treeselect, {... |
"""
Orders in Number Fields
AUTHORS:
- William Stein and Robert Bradshaw (2007-09): initial version
EXAMPLES:
We define an absolute order::
sage: K.<a> = NumberField(x^2 + 1); O = K.order(2*a)
sage: O.basis()
[1, 2*a]
We compute a basis for an order in a relative extension
that is generated by 2 eleme... |
from typing import Optional, Set
import click
import copy
from datetime import datetime
import json
import logging
import os
import subprocess
import sys
import time
import urllib
import urllib.parse
import yaml
from socket import socket
import ray
import psutil
import ray._private.services as services
import ray.ray... |
"""
Feature processing backbones
"""
import torch.nn as nn
from .. import model_util
class FeatureMLP(nn.Module):
def __init__(self, input_size=16, output_size=16, n_layers=2):
super().__init__()
assert n_layers >= 2, "Need at least 2 layers"
layers = [nn.Linear(input_size, output_size)... |
'use strict';
$(document).ready(function() {
setTimeout(function() {
floatchart()
}, 700);
});
function floatchart() {
// [ amount-processed ] start
$(function() {
var options = {
chart: {
type: 'area',
height: 50,
sparkline: {... |
const emailRegex = /[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/;
function validate(email) {
email = email.trim();
if (/[\ \,]/.test(email)) {
return false;
}
if (email.split(/@/).length > 2) {
r... |
# -*- encoding: utf-8 -*-
#
# Copyright © 2021 Mergify SAS
#
# 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 applicabl... |
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... |
/*
Copyright (C) 2008-2010 Association of Universities for Research in Astronomy (AURA)
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright
notice, thi... |
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */
/* LLVM LOCAL test not applicable */
/* { dg-require-fdump "" } */
static const char f[3] = "?";
int foo()
{
int i = 0;
return f[i] != '?';
}
/* { dg-final { scan-tree-dump "return 0;" "optimized" } } */
/* { dg-final { cleanup-tree-dump "o... |
/*
* This header is generated by classdump-dyld 1.0
* on Sunday, June 7, 2020 at 11:15:04 AM Mountain Standard Time
* Operating System: Version 13.4.5 (Build 17L562)
* Image Source: /System/Library/PrivateFrameworks/GeoServices.framework/GeoServices
* classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 by Eli... |
"use strict";
var KTLayoutHeaderMobile = function() {
// Private properties
var _element;
var _object;
// Get height
var _getHeight = function() {
var height;
height = KTUtil.actualHeight(_element);
return height;
}
// Public methods
return {
init: function(id... |
#ifndef NAMEDCOLORS_H
#define NAMEDCOLORS_H
#include "vector.h"
namespace NamedColors
{
#define regcolor3f(name, r, g, b) \
MAYBE_UNUSED_ATTR Q_DECL_CONSTEXPR Vector3f COLOR_##name (r, g, b); \
MAYBE_UNUSED_ATTR Q_DECL_CONSTEXPR Vector4f COLOR4_##name = extendV3_V4(COLOR_##name, 1.0f); \
MAYBE_UNUSED_ATTR const... |
# coding=utf-8
# Copyright 2022 The TensorFlow Datasets 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 appl... |
# Copyright 2020 Ram Rachum and collaborators.
# This program is distributed under the MIT license.
from __future__ import annotations
import abc
import operator as operator_module
from typing import (Iterable, Union, Optional, Tuple, Any, Iterator, Type,
Sequence, Callable, Hashable, Mapping, Typ... |
const resolve = require('path').resolve;
const DOC_TABLE_OF_CONTENTS = require('../docs/table-of-contents.json');
module.exports = {
plugins: [
{
resolve: `gatsby-theme-ocular`,
options: {
logLevel: 1, // Adjusts amount of debug information from ocular-gatsby
// Folders
DIR_N... |
const {
lengthOfLongestSubstring
} = require('../src/3.longest-substring-without-repeating-characters')
describe('longest substring', () => {
test.each([
['abba', 2],
['abcabcbb', 3],
['bbbbb', 1],
['pwwkewr', 4],
['pwwkew', 3]
])('lengthOfLongestSubstring(%s) should output (%i)', (input, expe... |
/*
* Notifier.h
*
* Created on: Apr 21, 2021
* Author: ubuntu
*/
#ifndef PSSC_NOTIFIER_H_
#define PSSC_NOTIFIER_H_
#include <mutex>
#include <condition_variable>
namespace util {
class Notifier
{
std::mutex mtx;
std::condition_variable cv;
public:
template<typename Rep, typename Period>
... |
# 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... |
const packageConfig = {
presets: [
[
'@babel/preset-env',
{
targets: {
browsers: ['>0.2%', 'not dead', 'not op_mini all'],
},
exclude: ['transform-async-to-generator', 'transform-regenerator'],
loose: true,
},
],
'@babel/preset-react',
],
plu... |
# coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 6
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from isi_sdk_8_1_1.models.auth_ac... |
import numpy as np
import dezero
import dezero.functions as F
from dezero import cuda
from dezero.core import Parameter
from dezero.utils import pair
# =============================================================================
# Layer (base class)
# =================================================================... |
/*!
loadCSS: load a CSS file asynchronously.
[c]2015 @scottjehl, Filament Group, Inc.
Licensed MIT
*/
(function(w){
"use strict";
/* exported loadCSS */
var loadCSS = function( href, before, media ){
// Arguments explained:
// `href` [REQUIRED] is the URL for your CSS file.
// `before` [OPTIONAL] is the elemen... |
define(["exports", "./lib/default-template-processor.js", "./lib/template-result.js", "./lib/directive.js", "./lib/dom.js", "./lib/part.js", "./lib/parts.js", "./lib/render.js", "./lib/template-factory.js", "./lib/template-instance.js", "./lib/template.js"], function (_exports, _defaultTemplateProcessor, _templateResul... |
# ------------------------------------------------------------------------
# SeqFormer
# ------------------------------------------------------------------------
# Modified from Deformable DETR (https://github.com/fundamentalvision/Deformable-DETR)
# Copyright (c) 2020 SenseTime. All Rights Reserved.
# ----------------... |
# noqa: E501
# surpress info logs of TF , level 2: no warnings, level 3 no errors
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '1'
import tensorflow as tf
# dynamically allocate GPU memory
physical_devices = tf.config.list_physical_devices('GPU')
try:
tf.config.experimental.set_memory_growth(physical_devices[0], Tr... |
"""Utility and example functions for calculating statistics."""
import numpy
from toolkit.typing import Samples
def mean(samples: Samples) -> float:
"""Calculate sample mean from a dataset."""
# For a sequence of floats numpy.sum will return a float.
return numpy.sum(samples) / len(samples) # type: i... |
# Copyright (c) 2018-2019 Manfred Moitzi
# License: MIT License
from ezdxf.lldxf.types import DXFVertex
def test_init():
v = DXFVertex(10, (1, 2, 3))
assert v.value == (1., 2., 3.)
def test_clone():
v = DXFVertex(10, (1, 2, 3))
v2 = v.clone()
assert v2.code == v.code
assert v2.value == v.val... |
import sys
import os
import cv2
import numpy as np
if __name__ == '__main__':
if len(sys.argv) != 3:
print('Usage: python %s <image directory> <output file>' %
sys.argv[0])
sys.exit(1)
image_dir = sys.argv[1]
output_file = sys.argv[2]
try:
output_fd = open(output_file, 'w')
except Exception as e:
pri... |
/*
* (C) Copyright 2008
* Sergei Poselenov, Emcraft Systems, sposelenov@emcraft.com.
*
* Copyright 2004 Freescale Semiconductor.
* (C) Copyright 2002,2003, Motorola Inc.
* Xianghua Xiao, (X.Xiao@motorola.com)
*
* (C) Copyright 2002 Scott McNutt <smcnutt@artesyncp.com>
*
* See file CREDITS for list of people w... |
import React, { useRef, createRef } from 'react';
import { create } from 'react-test-renderer';
import { renderHook } from '@testing-library/react-hooks';
import ReactDOM from 'react-dom';
import { act } from 'react-dom/test-utils';
import Gauge from '../../src/gauge';
import ChartLoading from '../../src/util/createLoa... |
(function () {
class EventHub {
eventList = new Map();
emit(name, value) {
if (!this.eventList.has(name)) {
return;
}
this.eventList.get(name).forEach((v) => v(value));
}
on(name, callback) {
let callbackList = [];
if (this.eventList.has(name)) {
callbac... |
# Copyright 2017 The Bazel 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 applicable la... |
/* eslint-disable no-unused-expressions, no-magic-numbers */
define([
'app/config',
'app/map/ReferenceLayerToggle',
'dojo/dom-construct',
'dojo/topic',
'dojo/_base/window',
'esri/layers/ArcGISDynamicMapServiceLayer',
'sinon',
'sinon-chai',
'tests/helpers/topics'
], function (
... |
from logging import Logger
import os
import sys
from typing import List
import numpy as np
from tensorboardX import SummaryWriter
import torch
from tqdm import trange
from torch.optim.lr_scheduler import ExponentialLR
from .evaluate import evaluate, evaluate_predictions
from .predict import predict
from .train import... |
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you 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... |
import os
import re
import sys
import xml.etree.ElementTree as ET
import argparse
class FileProcessor(object):
@staticmethod
def get_title():
return 'AIML Utilities'
def create_base_args_parser(self):
parser = argparse.ArgumentParser(description=self.get_title())
parser.a... |
/*
* @Author: djvolz
* @Date: 2016-11-15 00:05:13
* @Last Modified by: djvolz
* @Last Modified time: 2016-11-15 00:05:25
*/
module.exports = {
"chase": "Watch the light run across the room!"
};
|
from config import Config
class Translation(object):
START = str(Config.START) + "\n\nMade with ❤ From @CoderzHEX"
RULES = Config.RULES
LOGIN = """Only for admins for receiving feedbacks"""
ABOUT = """**MY DETAILS:**
```🤖My Name:``` [Feedback Bot](https://t.me/Feedback_Nsbot)
```📝 La... |
import pytesseract
from PIL import Image
import argparse
import cv2
import os
# construct the argument parse and parse the arguments
ap = argparse.ArgumentParser()
ap.add_argument("-i", "--image", required=True,
help="path to input image to be OCR'd")
ap.add_argument("-p", "--preprocess", type=str, default="thresh",
... |
import { render } from 'react-dom';
import PropTypes from 'prop-types';
import React from "react"
import Utils from "utils"
import {makeUrl, A} from "routing"
var createReactClass = require('create-react-class');
var OrderByBox = createReactClass({
displayName: "OrderByBox",
propTypes: {
//the availab... |
"""
4 - Jan - 2018 / H. F. Stevance / fstevance1@sheffield.ac.uk
This is the main module of FUSS. It contains general utility functions, a couple of interactive routines and
also defines a new class: PolData, to deal with specpol data.
All this should make dealing with and analysing specpol data easier.
Functions:
--... |
/* NUGET: BEGIN LICENSE TEXT
*
* Microsoft grants you the right to use these script files for the sole
* purpose of either: (i) interacting through your browser with the Microsoft
* website or online service, subject to the applicable licensing or use
* terms; or (ii) using the files as included with a Microsoft ... |