text stringlengths 3 1.05M |
|---|
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _styledComponents = require("styled-components");
function _templateObject() {
var data = _taggedTemplateLiteral(["\n*{\n box-sizing:border-box;\n padding:0;\n margin:0;\n}\n"])... |
################################################################################
#
# Copyright (c) 2009 The MadGraph5_aMC@NLO Development team and Contributors
#
# This file is a part of the MadGraph5_aMC@NLO project, an application which
# automatically generates Feynman diagrams and matrix elements for arbitrary
# h... |
# -*- encoding:utf-8 -*-
from __future__ import unicode_literals
MESSAGES = {
"Also available in": "Също достъпно в",
"Archive": "Архив",
"LANGUAGE": "Английски",
"More posts about": "Още публикации относно ",
"Newer posts": "Нови публикации",
"Next post": "Следваща публикация",
"Older post... |
/**
****************************************************************************
* Copyright 2016 IBM
*
* Custom Nodes in Node-RED
*
* By JeanCarl Bisson (@dothewww)
* More info: https://ibm.biz/node-red-custom-nodes
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this fi... |
export const availableLangs = ['es', 'en']
export const messages = {
en: {
// Error messages
'emailRequiredField': "'email' is a required field.",
'emailIsEmail': "This is not a valid email address.",
'passwordRequiredField': "'password' is a required field.",
// Su... |
import React from 'react'
import { connect } from 'react-redux'
import { Jumbotron, Container, Row, Col, Card, Spinner } from 'react-bootstrap'
import { carregarListaCompras } from '../reducers/comprasReducer'
class Historico extends React.Component {
constructor(props) {
super(props)
this.rend... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@author: Frank Nussbaum (frank.nussbaum@uni-jena.de), 2020
Demo for
Nussbaum, F. & Giesen, J. (2020). Pairwise sparse + low-rank models for variables of mixed type.
Journal of Multivariate Analysis, 2020.
If you use this software, please consider citing this article.... |
// Github: https://github.com/shdwjk/Roll20API/blob/master/Torch/Torch.js
// By: The Aaron, Arcane Scriptomancer
// Contact: https://app.roll20.net/users/104025/the-aaron
var Torch = Torch || (function() {
'use strict';
var version = '0.8.9',
lastUpdate = 1478016891,
schemaVersion = 0... |
# -*- coding:UTF-8 -*-
'''
Created on 2014年12月5日
@author: caifh
'''
# import chardet.universaldetector as det_
import creditutils.system_util as mysystem
import chardet
def escape_entire(src):
ch = (ord(c) for c in src)
return ''.join(('\\x%02x' % c) if c <= 255 else ('\\u%04x' % c) for c in ch)
# 将字符串转换... |
/**
* Definition for a binary tree node.
* function TreeNode(val, left, right) {
* this.val = (val===undefined ? 0 : val)
* this.left = (left===undefined ? null : left)
* this.right = (right===undefined ? null : right)
* }
*/
/**
* @param {TreeNode} root
* @param {number} x
* @param {number} y
* ... |
import collections
from datetime import timedelta
import functools
import gc
import json
import operator
import pickle
import re
from textwrap import dedent
from typing import (
TYPE_CHECKING,
Any,
Callable,
Dict,
FrozenSet,
Hashable,
List,
Mapping,
Optional,
Sequence,
Set,
... |
// https://stackoverflow.com/a/3959275
const { isPositiveInteger } = require('./isPositiveInteger');
const handleErrors = (params) => {
if (params.length === 0) throw new Error('Must provide one or more paramters');
if (params.some(param => !Number.isInteger(param))) {
throw new Error('One of your parameters ... |
# Copyright (c) 2019-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the
# NOTICE FILE in the root directory of this source tree.
#
# Translate sentences from the input stream.
# The model will be faster is sentences are sorted by length.
# Input sentences must... |
# file: config.py
# author: mbiokyle29
import configparser
import logging
import os.path as path
from pkg_resources import resource_filename
logger = logging.getLogger("place.lib.config")
class PlaceConfig(object):
""" Encapsulation of configuration options """
RC_FILE_NAME = ".placerc"
def __init__(s... |
try:
from asyncio import run
except ImportError:
import asyncio
def run(main):
loop = asyncio.get_event_loop()
return loop.run_until_complete(main)
from injectify.api import inject
from injectify.injectors import (
HeadInjector,
TailInjector,
ReturnInjector,
FieldInjector,
... |
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif
FOUNDATION_EXPORT double FlowCoreVersionNumber;
FOUNDATION_EXPORT const unsigned char FlowCoreVersionString[];
|
export default ['$scope', '$state', 'configService',
($scope, $state, configService) => {
$scope.page = {
'message': () => `Page 2, id = ${$state.params.id}`
};
}];
|
import{r as t,e as o,h as r,H as a,g as n}from"./p-8dfd188c.js";import{o as i}from"./p-8bf53d8d.js";import{h as e,s}from"./p-09b2e663.js";const d=class{constructor(r){t(this,r),this.bkkrFocus=o(this,"bkkrFocus",7),this.bkkrBlur=o(this,"bkkrBlur",7),this.disabled=!1,this.routerDirection="forward",this.type="button",this... |
//#include <sys/stat.h>
extern char _HeapPlaceholderStart; /* Defined by the linker */
extern char _HeapPlaceholderEnd; /* Defined by the linker */
char *current_heap_end = 0;
char* _sbrk(int incr) {
char* prev_heap_end;
if (current_heap_end == 0) { //Initialize with value from linker
curren... |
import base64
import csv
import datetime
import gzip
import ujson
import logging
import os
import ssl
import subprocess
import uuid
import bson
import pytz
import tzlocal
from typing import Tuple, Optional, Dict, Callable, Any
from pymongo import MongoClient
from pymongo.database import Database
from singer.utils impo... |
/*
* Copyright (c) 2020, salesforce.com, inc.
* All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
/* global jest, describe, expect */
import {PluginError, _} from '../../common/index.js';
import ... |
from big_ol_pile_of_manim_imports import *
from old_projects.div_curl import PureAirfoilFlow
from old_projects.div_curl import move_submobjects_along_vector_field
from old_projects.div_curl import move_points_along_vector_field
from old_projects.div_curl import four_swirls_function
from old_projects.lost_lecture import... |
// @flow
import React from 'react'
import styled from 'styled-components'
import { rgba } from 'styles/helpers'
import Box, { Tabbable } from 'components/base/Box'
type Item = {
label: React$Node,
key: string,
value?: any,
}
type Props = {
items: Array<Item>,
activeKey: string,
onChange: Item => void,
... |
const Index = () =>
<div>
<h2>Hello nextjs !</h2>
</div>
export default Index; |
'use strict';
var bitcore = require('../..');
var BN = require('../../lib/crypto/bn');
var BufferReader = bitcore.encoding.BufferReader;
var BufferWriter = bitcore.encoding.BufferWriter;
var BlockHeader = bitcore.BlockHeader;
var fs = require('fs');
var should = require('chai').should();
// https://insigh... |
import {createMuiTheme} from '@material-ui/core';
import * as _ from 'lodash';
import {legacyTypography} from './overrides/typography';
import {legacyButton, legacyIconButton} from './overrides/button';
import {legacyCheckbox} from './overrides/checkbox';
import {legacyCollapse} from './overrides/collapse';
import {le... |
import torch
import numpy as np
def svd_decomposition(tensor):
if len(tensor.shape) > 2:
raise RuntimeError("Only 2dim tensors can be decomposed with SVD")
if tensor.shape[0] < tensor.shape[1]:
raise RuntimeError(f"SVD requires the number of datapoints ({tensor.shape[0]}) to be larger th... |
/**
* webapi.js 封装app所需的所有web请求
* 供app测试使用,app加入网站后webpai应该由网站通过config,提供给每个app
*/
import { fetch } from 'mk-utils'
export default {
product: {
query: (option) => fetch.post('/v1/product/query', option)
}
} |
/**
* Copyright 2020 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... |
# -*- coding: utf-8 -*-
import hashlib
import json
import uuid
from datetime import datetime, timedelta
from io import BytesIO
import pytest
from mock import patch
from playhouse.test_utils import assert_query_count
from app import docker_v2_signing_key, storage
from data import model
from data.database import (
... |
import sys
import json
import docker
from magiclog import log
handle_types = ['container']
stop_status = ['stop']
container_status = ['start']
log_events = ['config',
'container',
'network',
'secret',
'service',
'volume']
class KzPilot:
def ... |
/**
* @file 小说列表无限下拉滚动异步接口模拟数据
* @author xuexb <fe.xiaowu@gmail.com>
*/
const data = {
"status": 0,
"data": {
"items": [
{
"img": "img/titianxingdao.png",
"author": "石章鱼",
"desc": "风本无形,我欲猎风!九州笑傲,替天行盗! 他风华正茂,她国色天香,他本该书生意气,挥斥方遒,她本该巧笑倩兮,葬花弄... |
from tqdm import tqdm
import numpy as np
from dataclasses import dataclass
from typing import Dict, List, Tuple, Union
import ipdb
import collections
import random
import torch
from copy import deepcopy
from torch.nn.utils.rnn import pad_sequence
from transformers.tokenization_utils_base import BatchEncoding
def _sa... |
// THIS FILE IS AUTO GENERATED
var GenIcon = require('../lib').GenIcon
module.exports.GiMatterStates = function GiMatterStates (props) {
return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 512 512"},"child":[{"tag":"path","attr":{"d":"M288.3 13.4c-12.3-.01-23 6.49-27.3 15.31l-2.9 5.95-6.6-1.01c-5.5-.85-11.3-1.32-17.1-... |
#!/usr/bin/env python3
import argparse
import cubePCA
from astropy.io import fits as pyfits
from tqdm import tqdm
__author__ = "Bernd Husemann"
__copyright__ = "Copyright 2020, Bernd Husemann"
__license__ = "MIT"
__version__ = "1.0"
__maintainer__ = "Bernd Husemann"
__email__ = "berndhusemann@gmx.de"
__status__ = "Pr... |
/*globals describe, before, beforeEach, afterEach, it*/
var testUtils = require('../../utils'),
should = require('should'),
when = require('when'),
_ = require('underscore'),
errors = require('../../../server/errorHandling'),
sinon = require('sinon'),
uuid = require('node-uuid'),
// Stuff w... |
<%_ if (generate_api_doc) { _%>
/**
* @api {DELETE} /api/<%= schema.identifiers.plural.snake %>/:id Destroy
* @APIname Destroy
* @APIgroup <%= schema.identifiers.singular.pascal %> Controller
* @apidescription Destroy a single <%= schema.identifiers.singular.label %>
* @apiSuccess {json} The destroyed <%= schema.identi... |
/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
* Copyright 2004-2015 The OpenLDAP Foundation.
* Portions Copyright 2004 Pierangelo Masarati.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted only a... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ForkBlockchain = void 0;
const block_1 = require("@ethereumjs/block");
const ethereumjs_util_1 = require("ethereumjs-util");
const errors_1 = require("../../../core/providers/errors");
const BlockchainBase_1 = require("../BlockchainBas... |
// @flow
import path from "path";
import gensync, { type Handler } from "gensync";
import Plugin from "./plugin";
import { mergeOptions } from "./util";
import { createItemFromDescriptor } from "./item";
import {
buildRootChain,
type ConfigContext,
type FileHandling,
} from "./config-chain";
import { getEnv } fr... |
function solve(input) {
let distanceInMeters = input
let distanceInKm = distanceInMeters/1000
console.log(distanceInKm.toFixed(2));
}
solve(1852) |
# Copyright 2020 University of New South Wales, University of Sydney, Ingham Institute
# 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
# Unle... |
# -*- coding: utf-8 -*-
"""
Class definition of YOLO_v3 style detection model on image and video
"""
import colorsys
import os
from timeit import default_timer as timer
import numpy as np
from keras import backend as K
from keras.models import load_model
from keras.layers import Input
from PIL import Image, ImageFont... |
/*
FreeRTOS V8.2.1 - Copyright (C) 2015 Real Time Engineers Ltd.
All rights reserved
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under
the... |
import React from "react"
const PlayerTable = ({ players }) => (
<div className="table-container u-grow">
<table className="table is-fullwidth">
<thead>
<tr>
<th>Pos</th>
<th>Name</th>
<th>Sp</th>
<th>S</th>
<th>N</th>
<th>Score</th>
... |
/*!
* OpenUI5
* (c) Copyright 2009-2019 SAP SE or an SAP affiliate company.
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
*/
sap.ui.define(["sap/ui/support/library"],function(e){"use strict";var t=e.Categories,i=e.Severity,a=e.Audiences;var n={id:"exclusiveValueDateValueBindingRule",audiences:... |
from django.conf.urls import include, url
from django.views.generic.base import RedirectView
from api.base import views
from api.base import settings
from api.base import versioning
default_version = versioning.decimal_version_to_url_path(settings.REST_FRAMEWORK['DEFAULT_VERSION'])
# Please keep URLs alphabetized f... |
/*
gpiBuddy.c
GameSpy Presence SDK
Dan "Mr. Pants" Schoenblum
Copyright 1999-2007 GameSpy Industries, Inc
devsupport@gamespy.com
***********************************************************************
Please see the GameSpy Presence SDK documentation for more information
********************************************... |
var ImportDialog = new Class({
MAX_FILE_SIZE: 100 * 1024 * 1024, // 100 MB
INITIAL_CHUNK_READ: 4 * 1024, // 4 KB
initialize: function(root, status) {
this._root = root;
this._status = status;
this._file = null;
this._currentStep = null;
this._lines = null;
this._picked = null;
... |
const axios = require("axios")
class Bridge {
constructor(app) {
this.url = 'https://api.dialog.lk'
this.app = app
}
call(req) {
// PROPS
let payload = {}
// METHOD
payload.method = ( req.method ) ? req.method : 'GET'
// HEADERS
payload.h... |
"""
Forms and validation code for user registration.
"""
from django import forms
from django.utils.translation import ugettext_lazy as _
from django.contrib.auth.models import User
from django.conf import settings
from signbank.settings.server_specific import *
from django.utils.safestring import mark_safe
from djan... |
"""
<name>Undulator</name>
<description>An undulator</description>
<icon>icons/gaussian.svg</icon>
<priority>2</priority>
"""
import sys
from PyQt4.Qt import *
from orangewidget.settings import Setting
from orangewidget import gui
from oasys.widgets import widget
from orangecontrib.wanys.util.OpticalElement import Op... |
# Copyright 2020 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... |
import { ApolloServer, gql } from 'apollo-server';
import mongoose from 'mongoose';
import bcrypt from 'bcrypt';
import jwt from 'jsonwebtoken';
import User from './models/user';
import Employee from './models/employee';
// generate token
const SECRET = 'mysecret';
function generateToken(id, email) {
const token =... |
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const HtmlWebpackPlugin = require('html-webpack-plugin');
const fs = require('fs-extra');
const path = require('path');
const pluginNam... |
#!/usr/bin/env python
# encoding: utf-8
# Ali Sabil, 2007
# Radosław Szkodziński, 2010
"""
At this point, vala is still unstable, so do not expect
this tool to be too stable either (apis, etc)
"""
import os.path, shutil, re
from waflib import Context, Task, Utils, Logs, Options, Errors
from waflib.TaskGen import exte... |
#
# Copyright (c) 2021, NVIDIA CORPORATION.
#
# 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 ... |
from wifi import Wifi
if __name__ == '__main__':
# Show saved Wi-Fi profiles on the system
prof = Wifi.Profile()
ssid = prof.get_ssid()
print(ssid)
print(prof.get_password(ssid[0])) |
const moment = require('moment')
exports.seed = function(knex, Promise) {
// Deletes ALL existing entries
return knex('servers').del()
.then(function () {
// Inserts seed entries
return knex('servers').insert([
{
id: 1,
nam... |
# 1st solution, TLE
class Solution:
def reversePairs(self, nums: List[int]) -> int:
memo = {}
for i in range(len(nums)):
for j in range(i + 1, len(nums)):
if nums[i] > 2 * nums[j]:
memo[i] = max(memo.get(i, 0), memo.get(j, 0)) + 1
return sum([m... |
import os
import tempfile
from exasol_advanced_analytics_framework.deployment.bundle_lua_scripts import \
BundleLuaScripts
def test_bundle_lua_scripts():
lua_bundled_content = BundleLuaScripts.get_content()
assert lua_bundled_content
with tempfile.TemporaryDirectory() as tmp_dir:
lua_bundled... |
/*****************************************************************************\
* ANALYSIS PERFORMANCE TOOLS *
* Extrae *
* Instrumentation package for parallel applications *
**... |
import React from 'react'
import {AppBar, Toolbar, Typography, Tab, Grid, Tabs} from '@material-ui/core'
import {Link, Switch, BrowserRouter, Route} from 'react-router-dom'
import {ThemeProvider, createMuiTheme, responsiveFontSizes, withStyles, makeStyles} from '@material-ui/core/styles'
import Routes from '../../rou... |
'use strict';
import { cardViewModel } from './cardViewModel.js';
import interact from 'interactjs';
// Represents one of the four open playable cards
class playerOpenCardViewModel extends cardViewModel {
constructor(connection, elementId, isPlayer) {
super(connection, elementId);
this.isPlayer =... |
import factory
from surveys.models import Survey
from users.tests.factories import UserFactory
class SurveyFactory(factory.django.DjangoModelFactory):
class Meta:
model = Survey
title = factory.Faker('catch_phrase')
description = factory.Faker('text')
author = factory.SubFactory(UserFactory)
|
from unittest import mock
import pytest
from h.events import AnnotationEvent
from h.services.annotation_delete import annotation_delete_service_factory
class TestAnnotationDeleteService:
def test_it_marks_the_annotation_as_deleted(
self, svc, pyramid_request, factories, annotation
):
ann = a... |
"""
homeassistant.components.notify.pushover
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Pushover platform for notify component.
Configuration:
To use the Pushover notifier you will need to add something like the following
to your config/configuration.yaml
notify:
platform: pushover
api_key: ABCDEFGHJKLMNOPQRS... |
#!/usr/bin/env python
# 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
# di... |
# coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.9.4
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
... |
/*!
=========================================================
* BLK Design System React - v1.2.0
=========================================================
* Product Page: https://www.creative-tim.com/product/blk-design-system-react
* Copyright 2020 Creative Tim (https://www.creative-tim.com)
* Licensed under MIT (htt... |
from selenium.webdriver.chrome.webdriver import WebDriver
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from fixture.session import SessionHelper
from fixture.mk import M... |
import unittest
from unittest.mock import patch
from tmc import points
from tmc.utils import load_module, reload_module, get_stdout, check_source
from functools import reduce
import os
exercise = 'src.same_characters'
@points('4.same_characters')
class SameCharactersTest(unittest.TestCase):
@classmethod
def ... |
const less = require('less')
function loader (source) {
let css
less.render(source, function (err, r) {
css = r.css
})
return css
}
module.exports = loader
|
import UserSidebar from './Component';
import { connect } from 'react-redux';
import { compose } from 'redux';
const mapStateToProps = state => ({
web3: state.web3,
tartarusAddress: state.tartarus.tartarusAddress,
userSettings: state.user.userSettings,
username: state.user.username
});
const enhance = compose... |
const { DataTypes, Model } = require('sequelize');
const sequelize = require('../common/database');
class User extends Model {}
User.init(
{
id: {
type: DataTypes.UUID,
defaultValue: DataTypes.UUIDV4,
primaryKey: true,
},
username: {
type: DataTypes.STRING,
unique: true,
... |
// Set up MySQL connection.
var mysql = require("mysql");
var connection = mysql.createConnection({
host: "l6slz5o3eduzatkw.cbetxkdyhwsb.us-east-1.rds.amazonaws.com",
port: 3306,
user: "zd8r0td4y9w7ftbs",
password: "gz69st69ufa260i1",
database: "x66ijdt1fgvvj992"
});
// Make connection.
connection.connect(f... |
var Hoptoad = {
VERSION : '2.0',
NOTICE_XML : '<?xml version="1.0" encoding="UTF-8"?>\
<notice version="2.0">\
<api-key></api-key>\
<notifier>\
<name>errbit_notifier_js</name>\
<version>2.0</version>\
<url>https://github.com/errbit/errbit</url>\
</notifier>\
<err... |
import pyaf.Bench.TS_datasets as tsds
import pyaf.tests.artificial.process_artificial_dataset as art
art.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "ConstantTrend", cycle_length = 12, transform = "Quantization", sigma = 0.0, exog_count = 100, ar_order = 12); |
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@angular/core"),require("tslib"),require("rxjs"),require("@progress/kendo-angular-l10n"),require("rxjs/operators"),require("@angular/common"),require("@angular/animations")):"function"==typeof define&&define.amd?define(["@angular... |
import axios from 'axios';
/*
* Api Service
* */
const booksListURL = 'http://localhost:3001/booksList';
class ApiService {
getAllBooks() {
return axios.get(booksListURL);
}
getBookById(id) {
return axios.get(`${booksListURL}/${id}`);
}
addBook(book) {
return axios.post(booksListURL, book);
... |
from dataclasses import dataclass, field
from typing import List
__NAMESPACE__ = "NISTSchema-SV-IV-list-duration-pattern-1-NS"
@dataclass
class NistschemaSvIvListDurationPattern1:
class Meta:
name = "NISTSchema-SV-IV-list-duration-pattern-1"
namespace = "NISTSchema-SV-IV-list-duration-pattern-1-N... |
from unittest import TestCase
from vsi.ast import (
AST,
PrintStatement,
Integer,
Float,
Varexpr,
BinOpexpr,
RelOpexpr,
Andexpr,
Orexpr,
Notexpr,
AssignStatement,
IfStatement,
WhileStatement
)
class TestAST(TestCase):
def test___repr___method(self):
ast... |
# -*- coding: utf-8 -*-
#
# 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... |
/* Generated By:JavaCC: Do not edit this line. MyToken.h Version 8.0.0 */
/* JavaCCOptions:STATIC=true,SUPPORT_CLASS_VISIBILITY_PUBLIC=true,INCLUDE_FOR_TOKEN=null,TOKEN_SUPER_CLASS= */
#ifndef JAVACC_MY_TOKEN_H
#define JAVACC_MY_TOKEN_H
#include "JavaCC.h"
#include "Token.h"
namespace FOO {
namespace BAR {
/**
... |
/*
Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/license
*/
CKEDITOR.lang['gl']={"editor":"Editor de texto mellorado","editorPanel":"Panel do editor de texto mellorado","common":{"editorHelp":"Prema ALT 0 para obter axuda","browseServe... |
"use strict";
const fs = require("fs-extra");
const pMap = require("p-map");
module.exports = removeTempLicenses;
function removeTempLicenses(packagesToBeLicensed) {
if (!packagesToBeLicensed.length) {
return Promise.resolve();
}
return pMap(packagesToBeLicensed, pkg => fs.remove(pkg.licensePath));
}
|
import numpy as np
import pandas as pd
import warnings
from scipy import sparse
from sklearn.base import BaseEstimator
from libpysal import weights
from esda.crand import (
crand as _crand_plus,
njit as _njit,
_prepare_univariate,
_prepare_bivariate
)
PERMUTATIONS = 999
class Join_Counts_Local_BV(Ba... |
class PlayerPortraitGameGUI {
static getClassName() {
return "PlayerPortraitGameGUI";
}
static initialize() {
if (Game.debugMode) BABYLON.Tools.Log("Initializing PlayerPortraitGameGUI");
PlayerPortraitGameGUI.playerName = null;
PlayerPortraitGameGUI.playerIcon = null;
... |
/*
* WARNING: do not edit!
* Generated by makefile from include\openssl\x509_vfy.h.in
*
* Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* ... |
import torch.nn as nn
class FCN(nn.Module):
def __init__(self, d_model, n_commands, n_args, args_dim=256):
super().__init__()
self.n_args = n_args
self.args_dim = args_dim
self.command_fcn = nn.Linear(d_model, n_commands)
self.args_fcn = nn.Linear(d_model, n_args * args_d... |
# 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
# distribu... |
// https://leetcode.com/problems/two-sum/description/
/**
* @param {number[]} nums
* @param {number} target
* @return {number[]}
*/
var twoSum = function(nums, target) {
var a = [];
for (var i = 0, len = nums.length; i < len; i++) {
var tmp = target - nums[i];
if (a[tmp] !== undefined) return [a[tmp]... |
"""
Texture atlas for SpriteList
The long term goal is to rely on pyglet's texture atlas, but
it's still unclear what features we need supported in arcade
so need to prototype something to get started.
We're still building on pyglet's allocator.
Pyglet atlases are located here:
https://github.com/einarf/pyglet/blob/... |
'use strict';
angular.module('simple-form', [
'ngRoute',
'angular-repeat-n',
'review-service'
]).
config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/', {
templateUrl: 'templates/home.html',
controller: 'HomeCtrl'
})
.when('/form', {
templateUrl: 'templates/form.html',
... |
// Copyright (c) 2015 Geometry Factory
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org).
// 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) any later... |
#include <Kernel.h>
#include <Shell.h>
bool OnLoad(CWindow *win, CEvent *evt) {
Logger(" OnLoad(%X, %X)\n", win, evt);
if (!win || !evt) return false;
bool status = true;
if (win->CallBack) status = win->CallBack(win, evt);
return status;
} |
import authReducer from './authReducer';
import projectReducer from './projectReducer';
import { combineReducers } from 'redux';
import { firestoreReducer } from 'redux-firestore';
import { firebaseReducer } from 'react-redux-firebase';
const rootReducer = combineReducers({
auth: authReducer,
project: projectR... |
/*
This file is part of Ext JS 4.2
Copyright (c) 2011-2013 Sencha Inc
Contact: http://www.sencha.com/contact
GNU General Public License Usage
This file may be used under the terms of the GNU General Public License version 3.0 as
published by the Free Software Foundation and appearing in the file LICENSE included in... |
const ruleUpdateUtil = require('scripts/ruleUpdateUtil')
const updateUtil = require('scripts/updateUtil')
const loadingHint = "检查规则/脚本更新..."
const sw = $device.info.screen.width
let pm = function (method) {
return new Promise((resolve, reject) => {
method({
handler: res => {
r... |
from setuptools import setup, find_packages
setup(
name='CovidVoting',
version='1.0',
description='This is the setup for CovidVoting Module',
author='Chiaoya Chang, Yanyan Guan. Lindsey Ulmer',
author_email='chiaoya@uw.edu',
LICENSE = "MIT",
url='https://github.c... |