text stringlengths 3 1.05M |
|---|
//=========================================================================
// Copyright (C) 2012 The Elastos Open Source Project
//
// 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
//
// ... |
// Copyright 2020 Google LLC
//
// 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in... |
//******************************************************************************
// SCICHART® Copyright SciChart Ltd. 2011-2018. All rights reserved.
//
// Web: http://www.scichart.com
// Support: support@scichart.com
// Sales: sales@scichart.com
//
// SCIDefaultLegendItemBase.h is part of SCICHART®, High Performance... |
# (C) Datadog, Inc. 2018
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import mock
from datadog_checks.envoy import Envoy
from datadog_checks.envoy.metrics import METRIC_PREFIX, METRICS
from .common import INSTANCES, response
class TestEnvoy:
CHECK_NAME = 'envoy'
def test... |
from SpecImports import *
from toontown.toonbase import ToontownGlobals
CogParent = 110000
BattleCellId = 0
BattleCells = {BattleCellId: {'parentEntId': CogParent, 'pos': Point3(0, 0, 0)}}
CogData = [
{'parentEntId': CogParent, 'boss': 0,
'level': ToontownGlobals.BossbotCountryClubCogLevel - 1,
'battleCell':... |
# -*- coding:utf-8 -*-
# Author: hankcs
# Date: 2020-07-28 14:40
# from hanlp.datasets.parsing.conll_dataset import CoNLLParsingDataset
#
#
# class SemEval15Dataset(CoNLLParsingDataset):
# def load_file(self, filepath: str):
# pass
import warnings
from hanlp_common.constant import ROOT, PAD
from hanlp_comm... |
Clazz.declarePackage ("JS");
Clazz.load (["JS.ScriptExt"], "JS.IsoExt", ["java.lang.Boolean", "$.Float", "$.Short", "java.util.Hashtable", "JU.AU", "$.BS", "$.Lst", "$.M4", "$.P3", "$.PT", "$.Quat", "$.SB", "$.V3", "J.api.Interface", "J.atomdata.RadiusData", "J.c.VDW", "JS.SV", "$.ScriptEval", "$.ScriptInterruption", ... |
# Definition for a binary tree node.
"""
timecomplexity = O(n) spacecomplexity = O(n)
BST could be constructed by preorder or postorder travesal only.
That means that BST structure is already encoded in the preorder or postorder traversal and hence they are both suitable for the compact serialization.
Serialization cou... |
import React from 'react'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
const Scoreboard = props => {
const opponent = props.opponent
const opponentNames = Object.keys(opponent)
return (
<div className="card">
<div className="card-header blue-header">
<h4>SCORE</h4>
... |
var mongoose = require('mongoose');
var uuid = require('node-uuid');
var Schema = mongoose.Schema;
var Provider = require('./provider');
var OperationType = require('./operationType');
var autopopulate = require('mongoose-autopopulate');
// Schemas
var Bill = new Schema({
_id: {
type: String,
default: uuid.v1... |
/**
* Created by caoshuaibiao on 2018/12/8.
* 信息挂件工厂
*/
import React from 'react';
import SimpleTable from './SimpleTable';
import CompositionTabs from './CompositionTabs';
import CompositionCard from './CompositionCard';
import CommonKvList from './CommonKvList';
//卡片
import GridCard from './GridCard';
//Action表单... |
// Swedish
'use strict';
var sv = function() {}
sv.code = 'sv';
sv.data = {
/* Sign Message */
NAV_SignMsg: 'Sign Message',
MSG_message: 'Message',
MSG_date: 'Date',
MSG_signature: 'Signature',
MSG_verify: 'Verify Message',
MSG_info1: 'Include the... |
#pragma warning( disable: 4049 ) /* more than 64k source lines */
/* verify that the <rpcndr.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 500
#endif
/* verify that the <rpcsal.h> version is high enough to compile this file*/
#ifndef __R... |
#!/usr/bin/env python
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""
=================
fMRI: DARTEL, SPM
=================
The fmri_spm_dartel.py integrates several interfaces to perform a first
and second level analysis on a two-subject data set. ... |
require('./Style/component.less')
import FormItem from './FormItem'
import Panel from './Panel'
import CheckBox from './Checkbox'
import FormSet from './FormSet'
import Select from './Select'
import Text from './Text'
import FixTable from './Table/Fixed'
import PlainTable from './Table/Plain'
import Calendar from './C... |
const observableModule = require("tns-core-modules/data/observable");
const SelectedPageService = require("../shared/selected-page-service");
function FeaturedViewModel() {
SelectedPageService.getInstance().updateSelectedPage("Featured");
const viewModel = observableModule.fromObject({
/* Add your vi... |
#!/usr/bin/env python
# author: pharesim@nhzcrypto.org
import json
import urllib
import urllib2
import sqlite3
import math
import ConfigParser
import time
config = ConfigParser.RawConfigParser()
config.read('config.ini')
conn = sqlite3.connect(config.get("pool", "database"))
c = conn.cursor()
def main():
whil... |
import numpy as np
import sys
import traceback
from numba.compiler import compile_isolated, Flags
from numba import jit, types, errors, njit
from numba import unittest_support as unittest
from .support import TestCase
force_pyobj_flags = Flags()
force_pyobj_flags.set("force_pyobject")
no_pyobj_flags = Flags()
clas... |
PACKAGE_NAME = 'PyFlowOpenCv'
from collections import OrderedDict
from PyFlow.UI.UIInterfaces import IPackage
# Pins
from PyFlow.Packages.PyFlowOpenCv.Pins.ImagePin import ImagePin
from PyFlow.Packages.PyFlowOpenCv.Pins.ImagePin import VideoPin
from PyFlow.Packages.PyFlowOpenCv.Pins.ImagePin import GraphElementPin
fr... |
"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", { value: true });
__export(require("./normal"));
__export(require("./standardNormal"));
__export(require("./kolmogorov"));
__export(require("./f"));
__export(requir... |
import sys
import platform
def get_platform() -> str:
"""Get FMU binary platform folder name."""
system = platform.system()
is_64bits = sys.maxsize > 2 ** 32
platforms = {"Windows": "win", "Linux": "linux", "Darwin": "darwin"}
return platforms.get(system, "unknown") + "64" if is_64bits else "32"
... |
import Menu from 'ant-design-vue/es/menu'
import Icon from 'ant-design-vue/es/icon'
const { Item, SubMenu } = Menu
export default {
name: 'SMenu',
props: {
menu: {
type: Array,
required: true
},
theme: {
type: String,
required: false,
default: 'dark'
},
mode: {
... |
from setuptools import setup, find_packages
setup(
name="smtp",
version="2.0.4",
author="Marcus LaFerrera (@mlaferrera)",
url="https://github.com/PUNCH-Cyber/stoq-plugins-public/v2",
license="Apache License 2.0",
description="SMTP Parser Worker",
packages=find_packages(),
include_packag... |
import pytest
_num = 0
def test_incomplete_single(device, config, name, iteration=[1, 2, 3]):
"""Test different sequences of commands, and verify incomplete input.
Args:
device: device fixture
config[]: map of all config chunks:
config[n][0]: list of commands to run before each t... |
$(document).ready(function() {
var date = new Date();
var d = date.getDate();
var m = date.getMonth();
var y = date.getFullYear();
/* className colors
className: default(transparent), important(red), chill(pink), success(green), info(blue)
*/
/* initialize the external events
--... |
import numpy as np
import os, re
import matplotlib
matplotlib.use('agg')
#########################################################################
# Some of these functions have been inspired on a framework by Marius Miron developed for a pydata workshop
# https://github.com/nkundiushuti/pydata2017bcn/blob/master/ut... |
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
union mydata
{
float myval;
char char_val[4];
};
union mydata trans(union mydata data)
{
char a,b,c,d;
a = data.char_val[0];
b = data.char_val[1];
c = data.char_val[2];
d = data.char_val[3];
data.char_val[0] = d;
data.ch... |
// Copyright (c) 2012, The Toft Authors.
// All rights reserved.
//
// Author: CHEN Feng <chen3feng@gmail.com>
#ifndef TOFT_STORAGE_PATH_PATH_H
#define TOFT_STORAGE_PATH_PATH_H
#include <string>
#include "toft/base/static_class.h"
namespace toft {
// Path operation of file system.
class Path {
TOFT_DECLARE_STAT... |
// module.exports = { preset: '../../jest.config.js' };
|
from collections import defaultdict
from typing import Dict, List, Optional
import torch
from allennlp.state_machines import util
from allennlp.state_machines.states import State
from allennlp.state_machines.transition_functions import TransitionFunction
class ConstrainedBeamSearch:
"""
This class implement... |
/***************************************************************************//**
* @file
* @brief Configuration header for bootloader Spi Peripheral Usart Driver
*******************************************************************************
* # License
* <b>Copyright 2021 Silicon Laboratories Inc. www.silabs.com<... |
/*----------- defined in drivers/ms32.c -----------*/
extern void ms32_rearrange_sprites(running_machine *machine, const char *region);
extern void decrypt_ms32_tx(running_machine *machine, int addr_xor,int data_xor, const char *region);
extern void decrypt_ms32_bg(running_machine *machine, int addr_xor,int data_xor, ... |
import pytest
import io
from src.ios import IOs
@pytest.fixture
def instance_fixture():
return IOs()
def test_print_is_wrapper(instance_fixture):
instance_fixture._print = lambda x, y: "Success!"
assert instance_fixture.print("") == "Success!"
def test_prompt_is_wrapper(instance_fixture):
instance_fi... |
# Portions of this code are adapted from MDTraj and are released under the
# following license.
##############################################################################
# MDTraj is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by... |
# Generated by Django 2.2 on 2020-04-09 02:56
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('users', '0018_remove_shoppingcart_quantity'),
]
operations = [
migrations.Al... |
import Plugin from '../src/index';
import {
compile,
getAssetsNameAndSize,
getCompiler,
getErrors,
getWarnings,
} from './helpers/index';
describe('"deleteOriginalAssets" option', () => {
let compiler;
beforeEach(() => {
compiler = getCompiler('./entry.js');
});
it('matches snapshot for `true`... |
# -*- coding: utf-8 -*-
"""Responses.
responses serve both testing purpose aswell as dynamic docstring replacement.
"""
responses = {
"_v3_Order": {
"url": "/openapi/trade/v2/orders",
"body": {
"AccountKey": "Cf4xZWiYL6W1nMKpygBLLA==",
"ManualOrder": False,
"Am... |
import { expect, should } from '@open-wc/testing';
import getProperty from '../src/get-property.js';
describe('getProperty', () => {
it('returns a direct property value', () => {
const obj = {
name: 'Maxwell',
age: 10,
};
expect(getProperty('name', obj)).equal(obj.name);
expect(getPropert... |
import asyncio
import traceback
import pycommons.logger
from seriesdb.client import Client
logger = pycommons.logger.get_instance(__name__)
count = 0
async def destroy_table():
loop = asyncio.get_event_loop()
client = Client("localhost:8888", loop=loop)
while True:
try:
table = "huo... |
import React from "react"
import PropTypes from "prop-types"
import { StaticQuery, graphql } from "gatsby"
import styled from "@emotion/styled"
const Container = styled.div`
text-align: center;
`
const OuterContainer = styled.div`
display: flex;
align-items: center;
justify-content: center;
flex-direction: ... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.componentName = 'schedule';
exports.sampleName = 'timeline-grouping';
exports.diModules = 'TimelineViewsService,TimelineMonthService,ResizeService,DragAndDropService';
exports.packageName = '@syncfusion/ej2-angular-schedule';
exports.l... |
/*!
* froala_editor v2.1.0 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms
* Copyright 2014-2016 Froala Labs
*/
/**
* Bosnian
*/
$.FroalaEditor.LANGUAGE['bs'] = {
translation: {
// Place holder
"Type something": "Ukucajte ne\u0161tp",
// Basic formatting
... |
"""
moment_of_inertia
===============
Autogenerated DPF operator classes.
"""
from warnings import warn
from ansys.dpf.core.dpf_operator import Operator
from ansys.dpf.core.inputs import Input, _Inputs
from ansys.dpf.core.outputs import Output, _Outputs
from ansys.dpf.core.operators.specification import PinSpecificatio... |
const initialState = { message: null, type: null }
const notificationReducer = (state = initialState, action) => {
switch(action.type) {
case 'SHOW':
return { message:action.message, type: action.msgType }
case 'HIDE':
return initialState
default:
return state
}
}
export const addNotification =... |
'''
CHALLENGE #3
TODO MANAGER - READ WRITE FILES
'''
def removeTrailingNewLine(value):
return value.rstrip("\n")
def addTrailingNewLine(value):
return value + ("\n")
def readFileAndGetAsList(pathToFile):
f = open(pathToFile, "r")
if f.mode == 'r':
contents = f.readlines()
f.close()
return list(... |
# Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... |
#!/usr/bin/env python
version = "2.2.9"
requirements = [,
'cloudmesh_base',
'sh',
'docopt',
'pyaml',
'simplejson',
'nose',
'cmd3',
]
import os
from setuptools import setup, find_packages
from setuptools.command.install import install
try:
from cloudmesh_base.util i... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This experiment was created using PsychoPy2 Experiment Builder (v1.90.1),
on Sat Feb 9 17:13:49 2019
If you publish work using this script please cite the PsychoPy publications:
Peirce, JW (2007) PsychoPy - Psychophysics software in Python.
Journal of N... |
# Copyright 2011 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 req... |
# 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 ... |
# Solution to exercise 8-1a:
# Timeout if the poem isn't received after a given period of time
# Fire the deferred's errback with a custom exeption in that case
# Close the connection in that case
import optparse, sys
from twisted.internet import defer
from twisted.internet.protocol import Protocol, ClientFactory
... |
// @flow
import React from 'react';
type Props = {
id: string,
checked: boolean,
onChange: Function,
}
const Switcher = (props: Props) => {
const { id, checked, onChange } = props;
return (
<div className="m-checkbox switch">
<input
type="checkbox"
className="m-checkbox__input m-c... |
# 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 ... |
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.woofmark=e()}}(function(){return function e(t,n,r){fu... |
import strat from '../index'
import test from 'ava'
test('extends arbitrary objects with the `format` method', t => {
const someObject = Object.create(null)
const someFunction = function () {}
t.is(typeof someObject.format, 'undefined')
t.is(typeof someFunction.format, 'undefined')
strat.extend(someObject)... |
/*
* Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contribut... |
from jnpr.junos import Device
from jnpr.junos.utils.config import Config
from jnpr.junos.exception import ConnectError
from jnpr.junos.exception import LockError
from jnpr.junos.exception import UnlockError
from jnpr.junos.exception import ConfigLoadError
from jnpr.junos.exception import CommitError
host = '192.168.1.... |
"""
This code optimizes the offsets on top of SMPL.
This code requires that SMPL be already aligned with the scans.
Author: Bharat
Code taken from: Combining Implicit Function Learning and Parametric Models for 3D Human Reconstruction, ECCV'20
Cite: LoopReg: Self-supervised Learning of Implicit Surface Correspondences,... |
// SPDX-License-Identifier: BSD-2-Clause
/*
* Copyright (c) 2017-2020, STMicroelectronics
*/
#include <arm.h>
#include <boot_api.h>
#include <config.h>
#include <console.h>
#include <drivers/clk.h>
#include <drivers/stm32_etzpc.h>
#include <drivers/stm32_rng.h>
#include <drivers/stm32mp1_pmic.h>
#include <drivers/st... |
"""Annotate TADs with a set of functional annotations."""
# standard libraries
import argparse
import pickle
import pathlib
import yaml
# own libraries
from tadacnv.lib.tad import Tad
import tadacnv.lib.utils as utils
def argparser():
parser = argparse.ArgumentParser(
description="Annotate TADs. Run anno... |
//
// ASampleEntity.h
// Pods-CategoryInvocation
//
// Created by dongshangxian on 2018/4/11.
// Copyright © 2018年 meituan. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface ASampleEntity : NSObject
@property (nonatomic, assign) NSInteger skuNum;
@property (nonatomic, ... |
# Copyright 2021 InfAI (CC SES)
#
# 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... |
from random import uniform
from insomniac.utils import *
MEGABIT = 1000000
SPEED_GOOD = 25 * MEGABIT
SPEED_BAD = 10 * MEGABIT
SPEED_UGLY = 1 * MEGABIT
SPEED_ZERO = 0
# Dict of sleep ranges by Internet speed
SLEEP_RANGE_BY_SPEED = {
SPEED_GOOD: (1, 3),
SPEED_BAD: (2, 5),
SPEED_UGLY: (4, 8),
SPEED_ZERO... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Based on project:
https://github.com/Bertrand256/dash-masternode-tool
"""
from PyQt5.QtCore import QThread
class CtrlObject(object):
pass
class WorkerThread(QThread):
"""
Helper class for running function inside a thread.
"""
... |
# coding: utf-8
from __future__ import absolute_import
# import models into model package
from huaweicloudsdkprojectman.v4.model.add_apply_join_project_for_agc_request import AddApplyJoinProjectForAgcRequest
from huaweicloudsdkprojectman.v4.model.add_apply_join_project_for_agc_response import AddApplyJoinProjectForAg... |
import React, { Component } from "react";
import M from "materialize-css"
import { forgotPassword } from "../auth/index";
class ForgotPassword extends Component {
state = {
email : "",
message : "",
error: ""
}
handleChange = event => {
this.setState({
email: e... |
# SPDX-FileCopyrightText: 2019 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT
# This file is where you keep secret settings, passwords, and tokens!
# If you put them in the code you risk committing that info or sharing it
secrets = {
"ssid": "",
"password": "",
"timezone": "Europe... |
import os
import sys
import io
import pytest
import asyncio
import pygada_runtime
from pygada_runtime import (
PipeStream,
write_packet,
read_packet,
read_json,
write_json,
start_intercom,
test_utils,
)
async def run(
node,
argv=None,
has_stdout: bool = None,
has_stderr: bo... |
class ReviewForm {
get form() { return $("#comment-form"); }
get email() { return $("#review-email"); }
get content() { return $("#review-content"); }
get formError() { return $("p=There are some errors in your review."); }
get emailError() { return $("p=Please enter a valid email address."); }
... |
'use strict'
const path = require('path')
const defaultSettings = require('./src/settings.js')
function resolve(dir) {
return path.join(__dirname, dir)
}
const name = defaultSettings.title || '老街坊' // page title
// If your port is set to 80,
// use administrator privileges to execute the command line.
// For examp... |
/*
Copyright (c) 2009-2017 Dave Gamble and cJSON contributors
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, including without limitation the rights
to use, copy, m... |
import os
from django.conf import settings
from django.shortcuts import get_object_or_404
from rest_framework import status
from rest_framework.authentication import BaseAuthentication
from rest_framework.decorators import (api_view, authentication_classes,
permission_classes)
f... |
(this.webpackJsonpearleatlaw=this.webpackJsonpearleatlaw||[]).push([[232],{511:function(e,t,l){"use strict";l.r(t),l.d(t,"icon",(function(){return i}));var r=l(1);function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var r in l)Object.prototype.hasOwnProperty.call(l... |
import os
case_id_col = {}
activity_col = {}
resource_col = {}
timestamp_col = {}
label_col = {}
pos_label = {}
neg_label = {}
dynamic_cat_cols = {}
static_cat_cols = {}
dynamic_num_cols = {}
static_num_cols = {}
filename = {}
logs_dir = "labeled_logs_csv_processed"
#### Traffic fines settings ####
for formula in r... |
//------------------------------------------------------------------------------
// GB_Adot2B: hard-coded dot2 method for a semiring
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-License-Identifi... |
import {parse} from 'node-sqlparser'
import {Promise} from 'bluebird'
import path from 'path'
import {
coreUtils,
config,
Manager,
cmsData
} from '../../'
/**
* take a string and json to escape sql character and convert to sql like syntax
*
* Example: escapeAbeValuesFromStringRequest('select title from ./ w... |
/**
* Module Imports
*/
const express = require("express")
const app = express()
app.get("/", (req, res) => {
res.send("HELLO CHÚC MỪNG CÓ THỂ BẠN ĐÃ THÀNH CÔNG!!!")
})
app.listen(3000, () => {
console.log("HELLO BẠN CÓ THỂ TÔI ĐÃ HOẠT ĐỘNG NHƯNG HÃY KIỂM TRA LẠI MỘT LẦN NỮA NHÉ!")
})
const { Client, Collection, M... |
#!/usr/bin/env python
# coding: utf-8
# In[3]:
n = int(input())
print("{} minutos".format(n*2))
|
app.controller('RecipeController', ['CONFIG', 'recipeApi', '$scope', function(CONFIG, recipeApi, $scope) {
$scope.base_url = CONFIG.base_url;
$scope.empty_content = CONFIG.empty_content;
$scope.goBack = function() {
window.history.back();
}
// save or update recipe
$scope.formSubmit =... |
import game
import sys
import logging
l = logging.getLogger("PolydungServer")
l.setLevel(logging.DEBUG)
FORMAT = '[%(levelname)s | %(asctime)s] %(message)s'
logging.basicConfig(format=FORMAT)
game.Game(*[eval(x) for x in sys.argv[1:]], logger=l) |
/**
* This script is for internal `react-boilerplate`'s usage. The only purpose of generating all of these templates is
* to be able to lint them and detect critical errors. Every generated component's name has to start with
* 'RbGenerated' so it can be easily excluded from the test coverage reports.
*/
const node... |
#
# Copyright 2020 The FATE 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 ... |
#!/usr/bin/env python
# File name: run_chain_joiner.py
# Author: Matt Robinson
# Date created: 06/09/2017
# Date last modified: 06/09/2017
# Python Version: 3.6
"""
This program uses wget to obtain the files needed for chain_joiner from the PDB website.
It then runs chain_joiner in automodel mode.
usage: python run_c... |
/*
* Wine virtual DOS machine
*
* Copyright 2003 Alexandre Julliard
*
* This library 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 ... |
/*-
* Copyright (c) 2017 Mellanox Technologies. All rights reserved.
*
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the GNU
* General Public License (GPL) Version 2, available from the file
* COPYING in the main directory of this so... |
'''
@author: Devangini Patel
'''
import pydot
import matplotlib.image as mpimg
import matplotlib.pyplot as plt
class TreePlot:
"""
This class creates tree plot for search tree
"""
def __init__(self):
"""
Constructor
"""
self.graph = pydot.Dot(graph_type='graph', dp... |
import response from '../helpers/response.helper';
import UserServices from '../services/user.service';
import accommodationService from '../services/accomodation.service';
import roomService from '../services/room.services';
/**
* Class for users to create trips
*/
class AccomodationMiddleware {
/** checks if the... |
/* crypto/evp/evp_key.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
* This package is an SSL implementation written
* by Eric Young (eay@cryptsoft.com).
* The implementation was written so as to conform with Netscapes SSL.
*
* This library is free for commercial and non-... |
import React, { useCallback, useEffect, useState } from "react"
import CssBaseline from "@material-ui/core/CssBaseline"
import AppBar from "@material-ui/core/AppBar"
import Toolbar from "@material-ui/core/Toolbar"
import Typography from "@material-ui/core/Typography"
import Container from "@material-ui/core/Container"
... |
from __future__ import absolute_import
import json
from coconut.protos.tasks import task_pb2
class Arg(object):
def __init__(self, value, typ=None):
self.name = ''
if isinstance(value, int):
self.type = 'int64'
self.value = value
elif isinstance(value, float):
... |
'''
posttweet.py - tweets the mp4 file that was generated using automate.py
'''
from pathlib import Path
from twython import Twython
import sys, os, json
config_file = open('config.json')
config_values = json.load(config_file)
os.chdir(os.path.dirname(os.path.realpath(__file__))) # Make sure that w... |
export default function converter(value, unit) {
let oper = 0
let result = 0
if (unit == "kg") {
oper = 2.205
result = value * oper
} else if (unit == "lbs") {
oper = 0.454
result = value * oper
} else {
console.log("Ingrese kg o lbs")
}
return resul... |
//
// Copyright IBM Corp. 2020, 2021
//
// This source code is licensed under the Apache-2.0 license found in the
// LICENSE file in the root directory of this source tree.
//
import React, { useState, useRef, forwardRef } from 'react';
import cx from 'classnames';
import {
Button,
ComposedModal,
ModalHeader,
... |
import os
import json
import numpy
from chainer import cuda
class JSONEncoderEX(json.JSONEncoder):
"""Ref: https://stackoverflow.com/questions/27050108/convert-numpy-type-to-python"""
def default(self, obj):
if isinstance(obj, numpy.integer):
return int(obj)
elif isinstance(obj, nu... |
#!/usr/bin/env python
#
# ----------------------------------------------------------------------
#
# Brad T. Aagaard, U.S. Geological Survey
# Charles A. Williams, GNS Science
# Matthew G. Knepley, University of Chicago
#
# This code was developed as part of the Computational Infrastructure
# for Geodynamics (http://ge... |
"""Misc. useful functions that can be used at many places in the program."""
import os
import subprocess as sp
import warnings
import proglog
OS_NAME = os.name
def cross_platform_popen_params(popen_params):
"""Wrap with this function a dictionary of ``subprocess.Popen`` kwargs and
will be ready to work wit... |
// @flow
import invariant from 'tiny-invariant';
import {
createBox,
withScroll,
type BoxModel,
type Spacing,
} from 'css-box-model';
import type {
DropPendingState,
DraggingState,
CollectingState,
DroppableDimension,
DraggableDimension,
Published,
Scrollable,
Displacement,
DragImpact,
Displ... |
define( [
"./core",
"./core/isAttached",
"./var/flat",
"./var/isIE",
"./var/push",
"./core/access",
"./manipulation/var/rtagName",
"./manipulation/var/rscriptType",
"./manipulation/wrapMap",
"./manipulation/getAll",
"./manipulation/setGlobalEval",
"./manipulation/buildFragment",
"./data/var/dataPriv",
".... |
import React from 'react';
import PropTypes from 'prop-types';
const ConsoleIcon = props => {
const { className } = props;
return (
<svg className={className} width="17px" height="17px" viewBox="0 0 17 17" version="1.1">
<title>console</title>
<g id="pages" stroke="none" strokeW... |
# Copyright (C) 2015 Atsushi Togo
# All rights reserved.
#
# This file is part of phonopy.
#
# 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
# notic... |