text stringlengths 3 1.05M |
|---|
/**
* controller 的集合,所有 controller 都在这里进行统一管理
*/
const MAPPING = {};
const { Mark } = Coralian.constants;
const ERROR_NAME = "/error";
function putContoller(ctrlerName, ctrler) {
let instance = ctrler;
let route = ctrlerName.split(Mark.SLASH);
let outRoute = [];
for (let i = 0, len = route.length; i < len; i++... |
/* Based on Cendors copy command for QuestMUD */
/* Evil hax0r bulut */
#define PATH this_player()->query_path()
#define WIZARD_DIR "/wizards/"
status copy_file(string in, string out) {
int f_size, current_byte,path;
int max_byte;
string txt,tmp;
tmp = extract(out,0,0);
if(tmp != "/") {
out = "/"+... |
const { RESTDataSource } = require("apollo-datasource-rest");
class LaunchAPI extends RESTDataSource {
constructor() {
super();
this.baseURL = "https://api.spacexdata.com/v2/";
}
async getAllLaunches() {
const resp = await this.get("launches");
return Array.isArray(resp)
? resp.map((launch... |
import { Vue } from 'ui.vue';
import { Loc } from 'main.core';
import 'bootstrap';
import './style.css';
Vue.component('vue-cart-detail-total-buttons', {
data() {
return {
customSubmitButtonHTML: null,
}
},
props: ['basketError'],
computed: {
localize() {
... |
import logging
__all__ = (
"logger", "set_verbosity_level"
)
logging.basicConfig(
stream=None, level=logging.CRITICAL,
format="%(asctime)s - %(name)s (%(levelname)s): %(message)s"
)
logger = logging.getLogger("siliqua")
def set_verbosity_level(verbosity_level=0):
"""
Set the logging verbosity l... |
/**
* A class which provides a reliable callback using either
* a Web Worker, or if that isn't supported, falls back to setTimeout.
*/
var Ticker = /** @class */ (function () {
function Ticker(callback, type, updateInterval) {
this._callback = callback;
this._type = type;
this._updateInte... |
import { useMutation, useFlash } from '@redwoodjs/web';
import { navigate, routes } from '@redwoodjs/router';
import SocialHandleForm from 'src/components/SocialHandleForm';
import { QUERY } from 'src/components/SocialHandlesCell';
const CREATE_SOCIAL_HANDLE_MUTATION = gql`
mutation CreateSocialHandleMutation($inpu... |
#!/usr/bin/env python
#
# A library that provides a Python interface to the Telegram Bot API
# Copyright (C) 2015-2017
# Leandro Toledo de Souza <devs@python-telegram-bot.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser Public License as published by
#... |
from django.contrib import admin
from django.urls import reverse
from django.utils.html import format_html
from typeidea.custom_site import custon_site
from .models import Category, Tag, Post
from .adminforms import PostAdminForms
from typeidea.base_admin import BaseUseradmin
# Register your models here.
class Ca... |
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from base_reporter import BaseReporter
import json
from pathlib import Path
class JSONReporter(BaseReporter):
def __in... |
# -*- coding: utf-8 -*-
from yookassa.domain.common.response_object import ResponseObject
from yookassa.domain.response.refund_response import RefundResponse
class RefundListResponse(ResponseObject):
__type = None
__next_cursor = None
__items = None
@property
def type(self):
return sel... |
"""Binary sensor platform for Pandora Car Alarm System."""
__all__ = ["ENTITY_TYPES", "async_setup_entry"]
import logging
from asyncio import run_coroutine_threadsafe
from functools import partial
from typing import Any
from homeassistant.components.switch import SwitchEntity, DOMAIN as PLATFORM_DOMAIN, ENTITY_ID_FOR... |
var Twig = Twig || requireUncached("../twig"),
twig = twig || Twig.twig;
describe("Twig.js Filters ->", function() {
// Encodings
describe("url_encode ->", function() {
it("should encode URLs", function() {
var test_template = twig({data: '{{ "http://google.com/?q=twig.js"|url_encode() ... |
"""
Módulo que representa um entidade no Movidesk (Tickets, Persons ou Services).
Exemplo de uso.
>>> from pyvidesk.tickets import Tickets
>>> tickets = Tickets(token="my_token")
>>> ticket = ticket.get_by_id(3)
>>> print(ticket)
... <Model for Ticket(id=3)>
>>> print(ticket.id)
... 3
>>> print(ticket.subject)
... '... |
export default {
getAmountInBaseCurrency: (state, getters, rootState) => ({ amount, currency }) => {
const fixed = rootState.currencies.base === 'RUB' ? 0 : 2
const baseValue = (amount / rootState.currencies.rates[currency]).toFixed(fixed)
return Number(baseValue)
}
}
|
/*
*/
#include <stdio.h>
#ifdef _OPENMP
#include <omp.h>
#endif
float x;
int y;
int main (int argc, char * argv[])
{
#ifdef _OPENMP
omp_set_num_threads(4);
#endif
x=1.0;
y=1;
#pragma omp parallel private(x)
{
printf("x=%f, y=%d\n",x,y);
}
return 0;
}
|
/* File: universal_memory_output_stream_test.h; Copyright and License: see below */
#ifndef UNIVERSAL_MEMORY_OUTPUT_STREAM_TEST_H
#define UNIVERSAL_MEMORY_OUTPUT_STREAM_TEST_H
/*!
* \file
* \brief UNITTEST for universal_memory_output_stream
*/
#include "test_suite.h"
test_suite_t universal_memory_output_stream... |
/*
* This file is derived from the MicroPython project, http://micropython.org/
*
* Copyright (c) 2018, Pycom Limited and its licensors.
*
* This software is licensed under the GNU GPL version 3 or any later version,
* with permitted additional terms. For more information see the Pycom Licence
* v1.0 document su... |
# -*- coding: utf-8 -*-
"""The Arakawa-C Grid"""
import numpy as np
class Arakawa1D(object):
def __init__(self, nx, Lx):
super(Arakawa1D, self).__init__()
self.nx = nx
self.Lx = Lx
# Arakawa-C grid
# +-------+ * (nx) phi points at grid centres
# u phi u *... |
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import 'ngreact';
import { InfluencersCell } from './influencers_cell';
... |
# Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the 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.
import torch
from torch.autograd i... |
# Run this with:
# python setup.py install --install-lib=.
from distutils.core import setup, Extension
from rdkit import RDConfig
# force the use of g++ please
from distutils import sysconfig
save_init_posix = sysconfig._init_posix
def my_init_posix():
print('my_init_posix: changing gcc to g++')
save_init_posi... |
def pageview(
path=None, host_name=None, location=None,
title=None, language=None, referrer=None,
**extra_data):
payload = {'t': 'pageview'}
if location:
payload['dl'] = location
if host_name:
payload['dh'] = host_name
if path:
payload['dp'] = path
i... |
import numpy as np
import cv2 as cv
feature_params = dict( maxCorners = 10,
qualityLevel = 0.98,
minDistance = 100,
blockSize = 8 )
lk_params = dict( winSize = (10,10),
maxLevel = 5,
criteria = (cv.TERM... |
import cv2
import gym
import numpy as np
from brawl_stars_gym.try_brawler import TryBrawler
class RandomAgent(object):
"""The world's simplest agent!"""
def __init__(self, action_space):
self.action_space = action_space
def act(self, observation, reward, done):
return self.action_space.s... |
const $ = (str) => {
return document.querySelector(str);
};
const setRotate = (dom, rotate) => {
dom.style.webkitTransform = "rotate(" + rotate + "deg)";
};
let roateBox = $("#rotateBox");
// 旋转按钮代码
// 获取方形中心坐标点即坐标轴原点
let centerPointX =
roateBox.getBoundingClientRect().left +
roateBox.getBoundingClientRect().w... |
//>>built
define(
"dojox/editor/plugins/nls/ja/TextColor", //begin v1.x content
({
"setButtonText": "設定",
"cancelButtonText": "キャンセル"
})
//end v1.x content
);
|
var express = require('express'),
http = require('http'),
path = require('path'),
twilio = require('twilio'),
tyrion = require('./lib'),
pkg = require('./package.json'),
config = require('./config'),
mongoose = require('mongoose');
//Initialize the MongoDB connection
mongoose.connect(config... |
import {Box2} from 'three/src/math/Box2';
import {BufferGeometry} from 'three/src/core/BufferGeometry';
import {FileLoader} from 'three/src/loaders/FileLoader';
import {Float32BufferAttribute} from 'three/src/core/BufferAttribute';
import {Loader} from 'three/src/loaders/Loader';
import {Matrix3} from 'three/src/math/M... |
import gwpy
import numpy as np
def compute_asd(signal):
asd = signal.spectrogram2(fftlength=4, overlap=2, window='hanning') ** (1/2.)
asd = asd.percentile(50)
return asd
def load_asd_from_file(filename):
asd = np.loadtxt(filename)
f = asd[:,0]
asd = asd[:,1]
asd= gwpy.frequencys... |
'use strict';
var util = require('./util.js');
module.exports = function(client){
var marketplace = {};
/**
* Copy the getInventory function from the user module
*/
marketplace.getInventory = require('./user.js')(client).getInventory;
/**
* Get a marketplace listing
* @param {(number|... |
from flask import Flask, send_file, request
from generator import gen
app = Flask(__name__)
@app.route('/api/v1/generator', methods=['GET'])
def gen_meme():
try:
base = request.args['base']
logo = request.args['logo']
logo_pos = request.args['logo_pos']
text = request.args['text']
me... |
exports.seed = function(knex) {
return knex("role")
.del()
.then(function() {
return knex("role").insert([
{ name: "admin" },
{ name: "individuel" },
{ name: "prepose" },
{ name: "ti" },
{ name: "service" },
{ name: "direction" },
{ name: "directio... |
import pytest
from plenum.common.messages.fields import SerializedValueField
validator = SerializedValueField()
def test_non_empty_string():
assert not validator.validate("x")
def test_empty_string():
assert validator.validate("")
def test_non_empty_bytes():
assert not validator.validate(b"hello")
... |
"""Course description Coloumn now uses TEXT instead of VARCHAR
Revision ID: 04ac99d8a7ab
Revises: 35195e81a197
Create Date: 2022-03-16 20:31:14.198726
"""
import sqlalchemy as sa
from alembic import op
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = "04ac99d8a7ab"
down_revis... |
import traceback
import cea.inputlocator
from legacy.arcgis import arcpy
import pandas as pd
__author__ = "Jimeno A. Fonseca"
__copyright__ = "Copyright 2013, Architecture and Building Systems - ETH Zurich"
__credits__ = ["Jimeno A. Fonseca", "Daren Thomas"]
__license__ = "MIT"
__version__ = "0.1"
__maintainer__ = "Da... |
#pragma once
#include <string>
#include <iostream>
using namespace std;
enum eHidStatus;
/// <summary>
/// Stores and retrieves information about the currently focused window
/// </summary>
class CFocusAppInfo
{
public:
CFocusAppInfo(void);
~CFocusAppInfo(void);
public:
/// <summary>
/// A handle to the window... |
from .roleerror import RoleError
class PasswordError(RoleError):
'''
Password exception class
'''
|
from .triangle import Triangle |
import getpass
import json
import sys
import warnings
import click
from . import main
from .pretty import print_done, print_error, print_fail, print_warn
from .. import __version__
from ..config import get_config, local_state_path
from ..exceptions import BackendClientError
from ..session import Session
@main.comma... |
export const USER_LOGIN = 'USER_LOGIN';
export function userLogin(user) {
return {
type: USER_LOGIN,
user
};
}
export const USER_LOGOUT = 'USER_LOGOUT';
export function userLogout() {
return {
type: USER_LOGOUT
};
}
|
"""
Add the exit_code column to the Job and Task tables.
"""
import logging
from sqlalchemy import (
Column,
Integer,
MetaData,
Table,
)
log = logging.getLogger(__name__)
metadata = MetaData()
# There was a bug when only one column was used for both tables,
# so create separate columns.
exit_code_jo... |
/**
* Copyright (c) 2015-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.
*/
var React ... |
"""MobileNet and MobileNetV2."""
import torch
import torch.nn as nn
from core.nn import _ConvBNReLU, _DepthwiseConv, InvertedResidual
__all__ = ['MobileNet', 'MobileNetV2', 'get_mobilenet', 'get_mobilenet_v2',
'mobilenet1_0', 'mobilenet_v2_1_0', 'mobilenet0_75', 'mobilenet_v2_0_75',
'mobilenet0_... |
'''
Module used to validate the input
'''
# validate fields
from validators import ipv4, domain
# used to get the current public IP
from json import load
from urllib2 import urlopen
# colors
from vars import ccolors
# validate the input based on the passed args
def validateInput(args):
if not args.victim or no... |
"use strict";
require("should");
function customImporter(path, prev) {
path.should.equal("import-with-custom-logic");
prev.should.match(/(sass|scss)[/\\]custom-importer\.(scss|sass)/);
this.should.have.property("options"); // eslint-disable-line no-invalid-this
return customImporter.returnValue;
}
... |
#!/usr/bin/python
#
# Copyright (C) 2009 Google 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 ... |
import pytest
import json
from hamcrest import *
from vinyldns_python import VinylDNSClient
def test_list_group_members_success(shared_zone_test_context):
"""
Test that we can list all the members of a group
"""
client = shared_zone_test_context.ok_vinyldns_client
saved_group = None
try:
... |
"""Configuration Addon."""
# Copyright 2015-present Scikit Flow 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-... |
import request from '@/utils/request'
export function fetchList(data) {
return request({
url: '/vue-admin-template/user/list',
method: 'post',
data
})
}
export function createListItem(data) {
console.log(data)
return request({
url: '/vue-admin-template/user/create',
method: 'post',
dat... |
export default {
name: 'Funnel',
props: [
{
name: 'data',
type: 'Array',
defaultVal: 'undefined',
isOptional: false,
desc: {
'en-US': 'The source data, in which each element is an object.',
'zh-CN': '输入数据,现在支持的类型是对象数组。',
},
format: [
'[{ name: \'... |
import csv
import numpy as np
import matplotlib.pyplot as plt
markers = {
'heuristic': { 'x': [], 'y': [] },
'optimal': { 'x': [], 'y': [] },
'normal': { 'x': [], 'y': [] }
}
with open('./time-data.csv', 'r') as csvfile:
reader = csv.reader(csvfile, delimiter="\t")
for row in reader:
marke... |
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
** Software License B, Version 1.1 (the "License"), the contents of this
** file are subject only to the provisions of the License. You may not use
** this file except in co... |
;(function () {
let mtButton = mtComponents.mtButton
let mtButtonWrapper = mtComponents.mtButtonWrapper
Mt_Util.router.addTag = Vue.extend({
name: 'addTag',
template: `
<div class="addTag">
<div class="addTagBox">
<p class="title">企业标签</p>
<div v-for="it... |
import unittest
import query
import re
#
# unit tests for query parser
#
class TestQueryParser(unittest.TestCase):
def setUp(self):
self.seq = range(10)
def test_valid(self):
queries = {'mass~gt~0~and~mass~lt~100~or~atomCount~gt~2': {'$or': [{'$and': [{'properties.mass': {'$gt': 0}},{'propert... |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from frappe import _
def get_data():
return [
{
"module_name": "Frappe Barcode",
"color": "grey",
"icon": "octicon octicon-file-directory",
"type": "module",
"label": _("Frappe Barcode")
}
]
|
const users = require('../../app/controllers/users.server.controller.js');
const passport = require('passport')
module.exports = app => {
app
.route('/signup')
.get(users.renderSignup)
.post(users.signup);
app
.route('/signin')
.get(users.renderSignin)
.post(passport.authenticate('local', ... |
# -*- coding: utf-8 -*-
#
# Copyright 2019 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... |
import stateFactory from '../state'
const RB_CONTEXT = {
getModule: (type) => {
if (type === 'asUtils') {
return {
getAuth: () => {
return {}
}
}
}
}
}
describe('custom/as/stores/auth/state', () => {
it('should render correctly', async () => {
const state = awai... |
from dcard import Dcard
import json, sys
topic = sys.argv[1]
num = int(sys.argv[2])
dcard = Dcard()
ariticle_metas = dcard.forums(topic).get_metas(num=num, sort='new')
articles = dcard.posts(ariticle_metas).get()
with open('result.json', 'w', encoding='utf-8') as f:
json.dump(articles.result(), f, ensure_ascii=Fal... |
//
// YWP2PConversation.h
//
//
// Created by huanglei on 14/12/17.
// Copyright (c) 2014年 taobao. All rights reserved.
//
#import "YWConversation.h"
@class YWPerson;
@class YWIMCore;
/**
单聊会话
*/
@interface YWP2PConversation : YWConversation
/**
* 获取某个单聊会话
* @param WXOPerson 会话对象
* @param aCreateIfNotE... |
/*
* This header is generated by classdump-dyld 1.0
* on Saturday, June 1, 2019 at 6:49:01 PM Mountain Standard Time
* Operating System: Version 12.1.1 (Build 16C5050a)
* Image Source: /System/Library/PrivateFrameworks/FitnessUI.framework/FitnessUI
* classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 by Elia... |
from os.path import isfile
from netCDF4 import Dataset as netCDF4_Dataset
from ..constants import _file_to_fh
from ..functions import open_files_threshold_exceeded, close_one_file
#from ..read_write.umread_lib.umfile import File #, UMFileException
from ..umread_lib.umfile import File #, UMFileException
#if 'netCDF'... |
import pyhiveapi
import getpass
import json
from pyhiveapi.helper.hive_exceptions import NoApiToken
username = input("Username: ")
password = getpass.getpass('Password:')
auth = pyhiveapi.Auth(username, password)
session = auth.login()
if session.get("ChallengeName") == pyhiveapi.SMS_REQUIRED:
# Complete SMS 2FA... |
/* net/atm/clip.c - RFC1577 Classical IP over ATM */
/* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
#define pr_fmt(fmt) KBUILD_MODNAME ":%s: " fmt, __func__
#include <linux/string.h>
#include <linux/errno.h>
#include <linux/kernel.h> /* for UINT_MAX */
#include <linux/module.h>
#include <linux/init.h>
#... |
const mongoose = require("mongoose");
const { isEmail } = require("validator");
const bcrypt = require("bcrypt");
const userSchema = new mongoose.Schema({
email: {
type: String,
required: [true, "email is required"],
unique: true,
lowercase: true,
validate: [isEmail, "Please... |
import os
import yaml
import abc
import inspect
from gym import spaces
from gym_mupen64plus.envs.mupen64plus_env import Mupen64PlusEnv
class Mario64_Env(Mupen64PlusEnv):
__metaclass__ = abc.ABCMeta
def __init__(self, save_state=None):
self.save_state = None
if save_state:
self.s... |
! function(t, e) {
"use strict";
"function" == typeof define && define.amd ? define(function() {
return e()
}) : "object" == typeof module && module.exports ? module.exports = e() : t.getSize = e()
}(window, function() {
"use strict";
function t(t) {
var e = parseFloat(t),
... |
import _extends from "@babel/runtime/helpers/extends";
import _objectSpread from "@babel/runtime/helpers/objectSpread";
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
import _createClass from "@babel/runtime/helpers/createClass";
import _possibleConstructorReturn from "@babel/runtime/helpers/possi... |
const ethers = require('ethers');
const RFOX_UTILITY_ABI = require('./abi');
const RFOX_UTILITY_CONTRACT = "0xD82F7e3956d3FF391C927Cd7d0A7A57C360DF5b9"
module.exports = (api) => {
api.eth.rfox = {}
api.setGet('/eth/rfox/estimate_gas_claim_account_balances', async (req, res, next) => {
try {
res.send(J... |
#! /usr/bin/env python2
import os
from roboTraining.analysis import *
if __name__ == "__main__":
# Create Analysis object and load results folder
an = Analysis(root=".", folder="CMA4")#cl/Machine-7/20161123_212706/")
an.load()
# General plots
# for u in ["score", "distance", "power"]:
# an.plot_all_raws(unit... |
import numpy as np
import matplotlib.pyplot as plt
import os
figures_i = 0
figures_N = 100
FOLDER = ""
rocket_length = 0.2
thrust_length = 0.1
def my_plot(fig):
global figures_i
X = np.loadtxt(f"{FOLDER}/{figures_i}/X.txt", delimiter=",")
U = np.loadtxt(f"{FOLDER}/{figures_i}/U.txt", delimiter=",")
... |
import unittest
import collections
from typing import Type, NamedTuple
from gym_jsbsim.assessors import AssessorImpl, ContinuousSequentialAssessor
from gym_jsbsim.tests import stubs as stubs
class TestAssessorImpl(unittest.TestCase):
def setUp(self):
pass
def get_class_under_test(self):
retu... |
#!/usr/bin/python
# custom_dialect.py
import csv
csv.register_dialect("hashes", delimiter="#")
f = open('items3.csv', 'w')
with f:
writer = csv.writer(f, dialect="hashes")
writer.writerow(("pencils", 2))
writer.writerow(("plates", 1))
writer.writerow(("books", 4))
|
/* $Id: VBoxVgaFont-8x16.h 48674 2013-09-25 08:26:15Z vboxsync $ */
/** @file
* VGA-ROM.F16 from ftp://ftp.simtel.net/pub/simtelnet/msdos/screen/fntcol16.zip .
* The package is (C) Joseph (Yossi) Gil.
* The individual fonts are in the public domain.
*/
/*
* This file was automatically generated
* from VGA-ROM.F1... |
var Election = artifacts.require("./Election.sol");
contract("Election", function(accounts) {
it("initializes with two candidates", function() {
return Election.deployed().then(function(instance) {
return instance.candidatesCount();
}).then(function(count) {
assert.equal(co... |
var searchData=
[
['adv_5fflux_2ec',['adv_flux.c',['../adv__flux_8c.html',1,'']]],
['al_2eh',['al.h',['../al_8h.html',1,'']]],
['al_5falloc_2ec',['al_alloc.c',['../al__alloc_8c.html',1,'']]],
['al_5fboundary_2ec',['al_boundary.c',['../al__boundary_8c.html',1,'']]],
['al_5fcodes_2eh',['al_codes.h',['../al__cod... |
import React from "react";
import { useSelector } from "react-redux";
import styled from "styled-components";
import { selectUser } from "../features/userSlice";
import db from "../private/firebase";
import StartImage from "./start.png";
import * as objectData from "../data/data.json";
function StartGamePopup({ setSta... |
'use strict';
const terminus = require('@godaddy/terminus');
const { expect } = require('chai');
const sinon = require('sinon');
const createSlayTerminus = require('./');
describe('slay-terminus', () => {
let app;
let createTerminusStub;
let doneStub;
beforeEach(() => {
app = sinon.mock();
app.serv... |
import Vue from 'vue'
import VueI18n from 'vue-i18n'
Vue.use(VueI18n)
function loadLocaleMessages() {
const locales = require.context('./locales', true, /[A-Za-z0-9-_,\s]+\.json$/i)
const messages = {}
locales.keys().forEach(key => {
const matched = key.match(/([A-Za-z0-9-_]+)\./i)
if (matched && matche... |
<<<<<<< HEAD
module.exports={A:{A:{"1":"E A B","2":"P F D rB"},B:{"1":"C I J K L M N v s Q VB GB"},C:{"1":"0 1 2 3 4 5 6 7 8 9 G T P F D E A B C I J K L M N U V W X Y Z a b c d e f g h i j k l m n o p q r R t u O w x y z SB WB AB BB CB DB EB H FB MB NB OB PB QB RB IB TB UB v s Q kB","2":"uB LB jB iB"},D:{"1":"0 1 2 3 4... |
# -*- coding: utf-8 -*-
# Copyright 2019 Mateusz Klos
#
# 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 a... |
# (c) 2019 Red Hat Inc.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = """
---
author: Ansible Security Automation Team
httpapi : qradar
short_description: HttpApi Plugi... |
import pytest
import factrank
@pytest.fixture
def model():
return factrank.get_model()
def test_inference_positive_example(model):
(prob, sentence), = model.checkworthyness("Het aantal mensen dat sterft aan covid blijft zorgwekkend oplopen.")
assert prob > 0.9
def test_inference_negative_example(model... |
export { default as activeIntimationReducer } from './activeIntimationReducer';
|
"""
OpenAPI definition
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v0
Contact: support@gooddata.com
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sy... |
import pytest
import pickle
import ray
from ray.dag import (
DAGNode,
PARENT_CLASS_NODE_KEY,
PREV_CLASS_METHOD_CALL_KEY,
)
@ray.remote
class Counter:
def __init__(self, init_value=0):
self.i = init_value
def inc(self):
self.i += 1
def get(self):
return self.i
@ray.... |
/*
All of the code within the ZingChart software is developed and copyrighted by ZingChart, Inc., and may not be copied,
replicated, or used in any other software or application without prior permission from ZingChart. All usage must coincide with the
ZingChart End User License Agreement which can be requested by email... |
#!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
def ge... |
/*
* Copyright 2010-2017 Amazon.com, Inc. or its affiliates. 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.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" fil... |
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file ex... |
/*
* Kendo UI v2014.3.1411 (http://www.telerik.com/kendo-ui)
* Copyright 2015 Telerik AD. All rights reserved.
*
* Kendo UI commercial licenses may be obtained at
* http://www.telerik.com/purchase/license-agreement/kendo-ui-complete
* If you do not own a commercial license, this file shall be governed by the trial lice... |
// Copyright IBM Corp. 2014,2016. All Rights Reserved.
// Node module: strong-remoting
// This file is licensed under the Artistic License 2.0.
// License text available at https://opensource.org/licenses/Artistic-2.0
var g = require('strong-globalize')();
/*!
* Expose `HttpInvocation`.
*/
module.exports = HttpInvoc... |
$("#modal-close").click(function() {
$(".modal").removeClass("is-active");
});
$("#location-info").click(function() {
$(".modal").addClass("is-active");
});
let incrementButton = $(".increment-button");
let decrementButton = $(".decrement-button");
let index=-1;
let queryURL = "https://developer.nps.g... |
define(
({
_widgetLabel: "Beeldmeting"
})
); |
from system_simulator import SystemSimulator
from behavior_model_executor import BehaviorModelExecutor
from system_message import SysMessage
from definition import *
import datetime
class Generator(BehaviorModelExecutor): #오토마타 구현
def __init__(self, instance_time, destruct_time, name, engine_name):
... |
import re
import constants
class CC(object):
def __init__(self, clusters):
self.ccs = clusters.replace(constants.CONSONANT_SYMBOL,
constants.CONSONANTS).replace(
constants.TONE_SYMBOL,
cons... |
try:
from detect_simd.core import detect
except ImportError:
raise ImportError("Run setup.py to build library before importing.")
__all__ = ["detect_simd.core"]
|
// const express = require("express");
// const webpackDevMiddleware = require("webpack-dev-middleware");
// const webpack = require("webpack");
// const webpackConfig = require("./webpack.development.config");
//
// const app = express();
// const compiler = webpack(webpackConfig);
// const port = 5003;
//
// app.use(... |
#!/usr/bin/env python
# coding: utf-8
# coding: utf-8
import numpy as np
import matplotlib.pylab as plt
from gradient_2d import numerical_gradient
def gradient_descent(f, init_x, lr=0.01, step_num=100):
x = init_x
x_history = []
for i in range(step_num):
x_history.append( x.copy() )
gra... |