text stringlengths 3 1.05M |
|---|
# Copyright 2016, Kay Hayen, mailto:kay.hayen@gmail.com
#
# Part of "Nuitka", an optimizing Python compiler that is compatible and
# integrates with CPython, but also works on its own.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in complianc... |
#pragma once
#include <cstdint>
#include <array>
namespace scimitar::util {
template <typename> class Function;
template <
typename tReturn,
typename... tArgs
>
struct Function<tReturn(tArgs...)> final {
using FnPtr = tReturn(*)(void*, tArgs&&...); // type-erased function pointer
void* const m_Instanc... |
// You're lucky, no tests for node, do whatever you want!
|
import binascii
class cipher_decimal:
def encrypt(self, data):
result = ''
for char in data:
result += ord(char)
return result
def decrypt(self, data):
result = ''
for num in data:
result += chr(num)
return result
|
webpackJsonp([59],{"009j":function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=t.info={title:"Landscape",preview:"https://didi.github.io/mand-mobile/examples/#/landscape"},a=t.body="<p>To display ads or descriptions in a floating layer</p>\n<h3 id=\"Import\">Import<a href=\"javascript:jumpA... |
# -*- coding: utf-8 -*-
# Copyright 2020 Green Valley Belgium NV
#
# 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... |
import os,sys,platform
import csv
gputype_list = ['M60','K80','T4','V100']
current_dir = os.path.abspath('.')
all_m = ['bert-large','densenet-201','gru','inception-v2','inception-v4','mobilenet-v2','resnet-101','resnet-152-v2','roberta','tacotron2','transformer','vgg16']
all_o = ['add','batch_norm','concat','conv1d','... |
from .hex_dump_parser import *
from .opcode_parser import *
|
# -*- coding: utf-8 -*-
"""
/***************************************************************************
ORStools
A QGIS plugin
QGIS client to query openrouteservice
-------------------
begin : 2017-02-01
git sha ... |
__title__ = 'asana'
__version__ = '0.8.2'
__license__ = 'MIT'
__copyright__ = 'Copyright 2016 Asana, Inc.'
from .client import Client
|
(function ()
{
Tactics.units[7].extend = function (self)
{
var data = Tactics.units[self.type];
$.extend(self,
{
animDeploy:function (assignment)
{
var anim = new Tactics.Animation({fps:10});
$.each(data.frames,function (i) {
anim.addFrame(function ()
{
self.drawFrame(i);
})... |
from __future__ import unicode_literals
from datetime import date
from django.contrib.auth import models, management
from django.contrib.auth.management import create_permissions
from django.contrib.auth.management.commands import changepassword
from django.contrib.auth.models import User
from django.contrib.auth.test... |
"""
Accounts middleware catalog.
"""
# Django
from django.shortcuts import redirect
from django.urls import reverse
from django.contrib import messages
from django.utils.translation import gettext_lazy as _
class ProfileCompleteMiddleware:
"""Profile complete middleware.
Ensures that every user using the ap... |
import babel from 'rollup-plugin-babel'
import VuePlugin from 'rollup-plugin-vue'
export default {
input: 'src/vue-dropdown.vue',
output: {
name: 'Dropdown',
file: 'dropdown.js',
dir: 'dist',
format: 'es'
},
plugins: [
VuePlugin(),
babel({
exclude: 'node_modules/**'
})
]
}
|
"""Simple implementation of the Level 1 DOM.
Namespaces and other minor Level 2 features are also supported.
parse("foo.xml")
parseString("<foo><bar/></foo>")
Todo:
=====
* convenience methods for getting elements and text.
* more testing
* bring some of the writer and linearizer code into conformance with this
... |
/*
* jQuery UI Effects Transfer 1.8.5
*
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Effects/Transfer
*
* Depends:
* jquery.effects.core.js
*/
(function( $, undefined ) {
$.effects... |
import { useCallback } from 'react';
import { useDispatch } from 'react-redux';
export default () => {
const dispatch = useDispatch();
const get = useCallback(
(...params) => {
const promise = (resolve, reject) => {
try {
return resolve(dispatch(...params));
} catch (error) {
... |
# Copyright (c) 2018, NVIDIA CORPORATION.
from contextlib import ExitStack as does_not_raise
import numpy as np
import pandas as pd
import pyarrow as pa
import pytest
from numba import cuda
from librmm_cffi import librmm as rmm
from cudf import concat
from cudf.dataframe import DataFrame, Series
from cudf.dataframe... |
/*
* 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
* "License"); you ma... |
/*
---
name: "App.Light"
description: "LibCanvas.App.Light"
license:
- "[GNU Lesser General Public License](http://opensource.org/licenses/lgpl-license.php)"
- "[MIT License](http://opensource.org/licenses/mit-license.php)"
authors:
- "Shock <shocksilien@gmail.com>"
requires:
- LibCanvas
- App
provides: App.... |
// //*********************************** Get data from HTML Network Chart *****************************************************
var Missionarea = JSON.parse(document.getElementById('missionlist').textContent);
var Collegenames = JSON.parse(document.getElementById('Collegenames').textContent);
// console.log("campus ... |
from datetime import date, datetime
from .types import FractionalYearLike
__all__ = ("datetime_to_fractional_year", "parse_datetime_or_fractional_year")
def datetime_to_fractional_year(input: datetime) -> float:
"""Converts a Python datetime object to a fractional year."""
start = date(input.year, 1, 1).too... |
module.exports = {
extends: ['@mrowa96/eslint-config-react'],
};
|
int lib(int x) {
if (x <= 0)
return -1;
else
return 1;
}
int client(int x){
if (x > 0) {
return lib(x);
}
return x;
} |
module.exports = {
Size: require('./size'),
Types: require('./types')
} |
/**
* \file
*
* \brief SAM D21 Clock configuration
*
* Copyright (C) 2014-2015 Atmel Corporation. All rights reserved.
*
* \asf_license_start
*
* \page License
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:... |
# shows related artists for the given seed artist
import spotipy
from spotipy.oauth2 import SpotifyClientCredentials
import sys
if len(sys.argv) > 1:
artist_name = sys.argv[1]
else:
artist_name = 'weezer'
client_credentials_manager = SpotifyClientCredentials()
sp = spotipy.Spotify(client_credentials_manage... |
import glob
import math
import os
import random
import shutil
import time
from pathlib import Path
from threading import Thread
import cv2
import numpy as np
import torch
from PIL import Image, ExifTags
from torch.utils.data import Dataset
from .utils import xyxy2xywh, xywh2xyxy
help_url = 'https://github.com/ultral... |
# Copyright (c) 2012 OpenStack Foundation.
# 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... |
/*globals define*/
//TODO: used???
define( [
'lodash',
'src/utils/models/Field',
'src/utils/models/ObjectField',
'src/utils/models/DateField'
], function(
_,
Field,
ObjectField,
DateField
) {
'use strict';
var fieldHelper = {};
fieldHelper.createField = function(options) {
var ... |
import cv2
import os
import glob
video_dir = '/media/irelin/data_disk/dataset/afp/noseprint_recognition/videos'
output_dir = '/media/irelin/data_disk/dataset/afp/noseprint_recognition/frames'
for i, vpath in enumerate(glob.glob(os.path.join(video_dir, "*"))):
tmp_output_dir = os.path.join(output_dir, str(i))
o... |
import Enum from '../Enum';
export default new Enum([
'action',
'execute',
'sync',
'initSync',
'syncSuccess',
'initModule',
], 'proxy');
|
mycallback( {"CONTRIBUTOR OCCUPATION": "", "CONTRIBUTION AMOUNT (F3L Bundled)": "125.00", "ELECTION CODE": "", "MEMO CODE": "", "CONTRIBUTOR EMPLOYER": "", "DONOR CANDIDATE STATE": "", "CONTRIBUTOR STREET 1": "755 N 11th St Ste P4200", "CONTRIBUTOR MIDDLE NAME": "", "DONOR CANDIDATE FEC ID": "", "DONOR CANDIDATE MIDDLE... |
import numpy as np
import matplotlib.pyplot as plt
distances = np.linspace(0,0.8,50)
speeds = np.linspace(0,12,12)
plt.plot(speeds/12)
plt.plot(np.exp(-0.05*(speeds-12)**2))
plt.figure()
plt.plot(distances,np.exp(-15.5*distances),label="40.5")
plt.plot(distances,np.exp(-2.5*distances),label="2.5")
plt.plot(di... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""MerakiPII Sample Script.
Copyright (c) 2019 Cisco and/or its affiliates.
This software is licensed to you under the terms of the Cisco Sample
Code License, Version 1.1 (the "License"). You may obtain a copy of the
License at
https://developer.cisco.com/... |
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*/
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distr... |
from dataclasses import dataclass
@dataclass
class Game:
id: int
tier: str
name: str
averageScore: float
description: str
numReviews: int |
#!/usr/bin/python
from __future__ import (absolute_import, division, print_function)
# Copyright 2019 Fortinet, Inc.
#
# 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 Lic... |
# -*- coding: utf-8 -*-
"""
ligninkmc
Kinetic Monte Carlo implementation for creating realistic lignin topologies as described in
https://pubs.acs.org/doi/abs/10.1021/acssuschemeng.9b03534
"""
from setuptools import setup
import versioneer
DOCLINES = __doc__.split("\n")
setup(name='ligninkmc',
author='Mich... |
#!/usr/bin/env python
# Copyright 2015-2016 Yelp Inc.
#
# 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 ... |
from selenium import webdriver
from fixture.session import SessionHelper
from fixture.group import GroupHelper
from fixture.contact import ContactHelper
class Application:
def __init__(self, browser, base_url):
if browser == "firefox":
self.wd = webdriver.Firefox()
elif browser == "chr... |
# -*- coding: utf-8 -*-
import numpy as np
import os
import argparse
import time
import torch
import torch.nn as nn
import torch.backends.cudnn as cudnn
import torchvision.transforms as trn
import torchvision.datasets as dset
import torch.nn.functional as F
from tqdm import tqdm
from models.allconv import AllConvNet
fr... |
# -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making BK-LOG 蓝鲸日志平台 available.
Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
BK-LOG 蓝鲸日志平台 is licensed under the MIT License.
License for BK-LOG 蓝鲸日志平台:
------------------------------------------------... |
#ifndef _GZIPSTREAM_H_
#define _GZIPSTREAM_H_
#include <zlib.h>
#include "Stream.h"
namespace Framework
{
class CGZipStream : public CStream
{
public:
CGZipStream(const char*, const char*);
virtual ~CGZipStream();
void Seek(int64, STREAM_SEEK_DIRECTION);
uint64 Tell();
uint64 Read(v... |
function solve() {
let optionList = document.querySelectorAll('#selectMenuTo')[0]
let button = document.querySelector('#container button')
let input = document.querySelector('#input')
optionList.innerHTML = `
<option selected value=""></option>
<option value="hexadecimal">Hexadecimal</option>
... |
let pallete = ["#F3B4B7", "#FED568", "#67BAB7", "#047073", "#E3535D"];
let cells = 7;
const cols = cells;
const rows = cells;
const offset = 50;
const margin = 2;
let w, h;
let sc;
function setup() {
createCanvas(800, 800);
colorMode(HSB, 360, 100, 100, 100);
angleMode(DEGREES);
noLoop();
sc = color(0, 0, 1... |
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global.LetterTt32 = factory());
}(this, (function () { 'use strict';
var _32 = {
elem: 'svg',
attrs: {
xmlns: '... |
############################ Copyrights and license ############################
# #
# Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> #
# Copyright 2012 Zearin <zearin@gonk.net> ... |
export default function search(value) {
const recursiveSearch = (node) => {
if (!node) {
return false;
}
if (this.aEqualsB(value, node.value)) {
return node.value;
}
if (this.aIsLessThanB(value, node.value)) {
return recursiveSearch(node.left);
}
return recursiveSearch(no... |
integration.whiteRootDomains = ['ln-online.de','ln-jobs.de','immonet.de'];
integration.blackSubDomains = [];
|
/*!
* smooth-scroll v15.1.2
* Animate scrolling to anchor links
* (c) 2018 Chris Ferdinandi
* MIT License
* http://github.com/cferdinandi/smooth-scroll
*/
/**
* closest() polyfill
* @link https://developer.mozilla.org/en-US/docs/Web/API/Element/closest#Polyfill
*/
if (window.Element && !Element.prototype.clos... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{CI9v:function(e){e.exports=JSON.parse('{"af":{"are_you_sure_you_want_to_finish_this_chat_1db5c13b":"Are you sure you want to finish this chat?","are_you_sure_you_want_to_remove_all_of_your_person_426720f1":"Are you sure you want to remove all of your personal dat... |
# Copyright (c) 2018 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 app... |
#!/usr/bin/env python3 -u
"""IMAP Incremental Backup Script"""
__version__ = "1.4h"
__author__ = "Rui Carmo (http://taoofmac.com)"
__copyright__ = "(C) 2006-2018 Rui Carmo. Code under MIT License.(C)"
__contributors__ = "jwagnerhki, Bob Ippolito, Michael Leonhard, Giuseppe Scrivano <gscrivano@gnu.org>, Ronan Sheth, Br... |
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Openipmi(AutotoolsPackage):
"""The Open IPMI project aims to develop an open code base
... |
module.exports = function (router, content) {
// START__####################################################################################################
router.post('/application/_1-adult/_6-impact/se-home-alterations', function (req, res) {
var buttonClicked = req.session.data['buttonClicked'];
if (... |
/*
* Generated by asn1c-0.9.21 (http://lionet.info/asn1c)
* From ASN.1 module "DSRC"
* found in "../downloads/DSRC_R36_Source.ASN"
* `asn1c -fcompound-names`
*/
#ifndef _SpecialLane_H_
#define _SpecialLane_H_
#include <asn_application.h>
/* Including external dependencies */
#include "LaneNumber.h"
#include ... |
import logging
import sys
import click
from click.testing import CliRunner
import rasterio
from rasterio.rio import sample
logging.basicConfig(stream=sys.stderr, level=logging.DEBUG)
def test_sample_err():
runner = CliRunner()
result = runner.invoke(
sample.sample,
['bogus.tif'],
"... |
'use strict';
var express = require('express');
var write = require('./write');
var getFullURL = require('./get-full-url');
module.exports = function (db, name) {
var router = express.Router();
function show(req, res, next) {
res.locals.data = db.get(name).value();
next();
}
function create(req, res... |
from ptrlib import *
def add(schedule):
sock.sendlineafter("> ", "1")
sock.sendafter(">", schedule)
return
def delete(index):
sock.sendlineafter("> ", "2")
sock.sendlineafter("> ", str(index))
return
def show():
sock.sendlineafter("> ", "3")
sock.recvline()
sock.recvline()
retur... |
ace.define("ace/mode/elixir_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var ElixirHighlightRules = funct... |
const MaterialUIComponentsNavigation = {
id: 'material-ui-components',
title: 'Material UI Components',
type: 'collapse',
icon: 'layers',
children: [
{
id: 'accordion',
title: 'Accordion',
type: 'item',
url: '/documentation/material-ui-components/accordion',
},
{
id: ... |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""Tests for the astropylibrarian.workflows.indexjupyterbook module."""
from __future__ import annotations
from typing import Union
import pytest
from astropylibrarian.workflows.indexjupyterbook import (
detect_redirect,
extract_homepage_metada... |
tabby_cat = "\tI'm tabbed in."
persian_cat = "I'm split\non a line."
backslash_cat = "I'm \\ a \\ cat."
fat_cat = '''
I'll do a list:
\t* Cat food
\t* Fishies
\t* Catnip\n\t* Grass
'''
print(tabby_cat)
print(persian_cat)
print(backslash_cat)
print(fat_cat)
|
import alphamap_fragment from './ShaderChunk/alphamap_fragment.glsl.js';
import alphamap_pars_fragment from './ShaderChunk/alphamap_pars_fragment.glsl.js';
import alphatest_fragment from './ShaderChunk/alphatest_fragment.glsl.js';
import alphatest_pars_fragment from './ShaderChunk/alphatest_pars_fragment.glsl.js';
impo... |
"""Support for Vilfo Router sensors."""
from homeassistant.components.sensor import SensorEntity
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from .const import (
DOMAIN,
ROUTER_DEFAULT_MO... |
from selenium.webdriver.common.by import By
class CommonPageLocators(object):
NAME_INPUT = (By.NAME, 'name')
EMAIL_INPUT = (By.NAME, 'email_address')
PASSWORD_INPUT = (By.NAME, 'password')
CONTINUE_BUTTON = (By.CSS_SELECTOR, 'main button.govuk-button')
ACCEPT_COOKIE_BUTTON = (By.CLASS_NAME, 'notif... |
import xml.etree.ElementTree
import fractions
import os
import collections
from collections import defaultdict
import fractions
import midi_to_statematrix
import math
lowerBound = 24
upperBound = 102
numPitches = upperBound - lowerBound
#get the "divisions" which is the number of time
#units per beat
def getDivisio... |
import eventManager from './utils/eventManager';
import { ACTION } from './utils/actions';
export const modal = {
open: (type = '', data = {}, options = { onClose: () => {}, onOpen: () => {}}) =>
eventManager.emit(ACTION.SHOW, type, data, options),
close: () =>
eventManager.emit(ACTION.CLEAR),
... |
// TODO Mark regions
/**
* @file app.c
* @brief Template for a Host Application Source File.
*
*/
#include "../../support/timer.h"
#include <assert.h>
#include <getopt.h>
#include <omp.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
static... |
// 4 may 2014
#include "winiconview.h"
WCHAR *ourawsprintf(WCHAR *fmt, ...)
{
WCHAR *out;
va_list arg;
va_start(arg, fmt);
out = ourvawsprintf(fmt, arg);
va_end(arg);
return out;
}
// HUGE TODO - VISUAL C++ 2010 DOESN'T PROVIDE VA_COPY AND THIS IS A **MAJOR HACK**
#ifndef va_copy
#define va_copy(d, s) ((d) = (... |
#!/usr/bin/python
"""Stock watcher based on yfinance
Created by
Max Rossmannek
2020-05-13
Usage: run python stock_watcher.py
Config:
library.txt: holds one Yahoo Finance symbol per line
"""
from datetime import datetime, timedelta
import os
import pandas as pd
import yfinance as yf
# read library
with open(os.pa... |
/* Magic Mirror
* Calendar Util Methods
*
* By Michael Teeuw https://michaelteeuw.nl
* MIT Licensed.
*/
/**
* @external Moment
*/
const moment = require("moment");
const path = require("path");
const zoneTable = require(path.join(__dirname, "windowsZones.json"));
const Log = require("../../js/logger.js");
cons... |
# Copyright (c) 2018 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 app... |
import json
import aiohttp
async def theoretically_fulfill(resource_manager, data):
rm_ep = resource_manager['endpoint']
url = f"http://{rm_ep}/fulfill/theoretically"
try:
async with aiohttp.ClientSession() as session:
async with session.post(url, data=json.dumps(data), timeout=5) as r... |
export default (elements) => {
return _.map(elements, 'id');
};
|
/*
* FreeRTOS Kernel V10.4.3
* Copyright (C) 2020 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 Software without restriction, ... |
import torch
import torch.nn as nn
from .py_utils import kp_line, AELossLine, _neg_loss, convolution, residual
from .py_utils import TopPool, BottomPool, LeftPool, RightPool
class pool(nn.Module):
def __init__(self, dim, pool1, pool2):
super(pool, self).__init__()
self.p1_conv1 = convolution(3, di... |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import json
import os
import numpy as np
import pycocotools.coco as coco
import torch.utils.data as data
class PascalVOC(data.Dataset):
num_classes = 20
default_resolution = [384, 384]
mean = np.... |
/*
* 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 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will b... |
# File: carbonblack_view.py
# Copyright (c) 2016-2020 Splunk Inc.
#
# Licensed under Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt)
#
import carbonblack_consts as consts
# pylint: disable=E1601
def fill_table(query_type, context, data, result):
# rows is an array or rows :-)
rows = context['... |
import test_data
import json
#Creates and returns a GameLibrary object(defined in test_data) from loaded json_data
def make_game_library_from_json( json_data ):
#Initialize a new GameLibrary
game_library = test_data.GameLibrary()
### Begin Add Code Here ###
#Loop through the json_data
#Create ... |
#!/usr/bin/env python3
import numpy as np
from keras.layers import Input, Dense, Conv2D, MaxPooling2D, GlobalAveragePooling2D, Flatten, Dropout
from keras.layers.merge import concatenate
from keras.models import Model
from keras.optimizers import Adam
from keras.callbacks import ModelCheckpoint, TensorBoard
# import t... |
#!/usr/bin/env python2
#
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
from test_framework.test_framework import ComparisonTestFramework
from test_framework.util import *
from test_framework.comptool import TestManager, T... |
# 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 may ... |
import React, { Component, Fragment } from 'react'
import WalletCreationStepPlate from 'components/WalletCreationStepPlate'
import InputPassword from 'components/InputPassword'
import WalletCreationReminder from 'components/WalletCreationReminder'
import { checkValidPassword } from 'utils/crypto'
import { pipe } from ... |
import inspect
import logging
import os
import importlib
import signal
import socket
import sys
import time
import argparse
import gevent
import locust
from . import events, runners, web
from .core import HttpLocust, Locust
from .inspectlocust import get_task_ratio_dict, print_task_ratio
from .log import console_log... |
import os
import sys
min_seed = 5
max_seed = 15
filename = "test_agents.py"
for i in range(min_seed,max_seed):
print("running script " + filename + " with seed " + str(i))
os.system('python3 ' + filename + " " + str(i))
|
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import shutil
import sys
import tempfile
from observations.r.carrots import carrots
def test_carrots():
"""Test module carrots.py by downloading
carrots.csv and testing shape of
extracted data has 24... |
#!/usr/bin/env python
# coding: utf-8
"""Various small physics functions
Mostly obtained from PyARTS
"""
import logging
import numbers
import datetime
import calendar
import itertools
import numpy
import scipy.interpolate
import matplotlib
import matplotlib.dates
import numexpr
import pyproj
import pint
from .c... |
#%%
import time
import math
import sys
import argparse
import cPickle as pickle
import numpy as np
from chainer import cuda, Variable, FunctionSet
import chainer.functions as F
from CharRNN import CharRNN, make_initial_state
import codecs
#%% arguments
parser = argparse.ArgumentParser()
parser.add_argument('--model'... |
const BaseModel = require('lib/BaseModel.js');
const { Database } = require('lib/database.js');
const { Logger } = require('lib/logger.js');
const SyncTargetRegistry = require('lib/SyncTargetRegistry.js');
const { time } = require('lib/time-utils.js');
const { sprintf } = require('sprintf-js');
const ObjectUtils = requ... |
/*!
* CanJS - 2.3.26
* http://canjs.com/
* Copyright (c) 2016 Bitovi
* Thu, 25 Aug 2016 15:02:02 GMT
* Licensed MIT
* Includes: can/component/component,can/construct/construct,can/map/map,can/list/list,can/compute/compute,can/model/model,can/view/view,can/view/href/href,can/control/control,can/route/route,can/co... |
!function(e){function t(t){for(var n,f,l=t[0],i=t[1],a=t[2],c=0,s=[];c<l.length;c++)f=l[c],Object.prototype.hasOwnProperty.call(o,f)&&o[f]&&s.push(o[f][0]),o[f]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(p&&p(t);s.length;)s.shift()();return u.push.apply(u,a||[]),r()}function r(){for(var e,t... |
import {Button, Col, Container, Form, Row} from "react-bootstrap";
import React, { useState, useRef } from "react";
import axios from 'axios';
import { useHistory } from 'react-router-dom';
import ErrorAlert from "./ErrorAlert";
import InputGroup from "react-bootstrap/InputGroup";
import { clone } from 'ramda'
const A... |
require('proof')(1, prove)
function prove (okay) {
okay(require('..'), 'require')
}
|
//=====================================================================
// This sample demonstrates using TeslaJS
//
// https://github.com/mseminatore/TeslaJS
//
// Copyright (c) 2016 Mark Seminatore
//
// Refer to included LICENSE file for usage rights and restrictions
//===============================================... |
from chatterbot.storage import StorageAdapter
from chatterbot import constants
class DjangoStorageAdapter(StorageAdapter):
"""
Storage adapter that allows ChatterBot to interact with
Django storage backends.
"""
def __init__(self, **kwargs):
super(DjangoStorageAdapter, self).__init__(**kw... |
from datetime import datetime, timedelta, tzinfo
from typing import Optional, Union
from ..abc import Trigger
from ..marshalling import marshal_date, unmarshal_date
from ..validators import as_aware_datetime, as_timezone, require_state_version
class IntervalTrigger(Trigger):
"""
Triggers on specified interva... |
import sys
import time
import argparse
import json
from termcolor import colored,cprint
import colorama
from requests_html import HTMLSession
import warnings
# mat cli design
parser = argparse.ArgumentParser(description='for Mansion-IDPS status verification and health testing.')
parser.add_argument('-t','--target',me... |