text stringlengths 3 1.05M |
|---|
import os
import random
from OpenSSL import crypto
from conpaas.core.misc import file_get_contents
from conpaas.core.https import x509
def create_x509_cert(cert_dir, x509_req):
# Load the CA cert
ca_cert = crypto.load_certificate(crypto.FILETYPE_PEM,
file_get_contents(os.path.join(cert_dir, "ca_cert... |
Date.prototype.format = function (format) {
const date = {
"M+": this.getMonth() + 1,
"d+": this.getDate(),
"h+": this.getHours(),
"m+": this.getMinutes(),
"s+": this.getSeconds(),
"q+": Math.floor((this.getMonth() + 3) / 3),
"S+": this.getMilliseconds(),
... |
/* =====================================================================
* Project: PULP DSP Library
* Title: plp_mat_fill_stride_i8.c
* Description: 16-bit integer strided matrix fill glue code
*
* $Date: 17. July 2020
* $Revision: V0
*
* Target Processor: PULP cores
* =================... |
"""Strip empty tags
Improved version of patched_extract()
Status: In Progress
"""
from GDLC import GDLC
from bs4 import BeautifulSoup
# Usage:
def strip_empty_tags(soup:BeautifulSoup):
for item in soup.find_all():
if not item.get_text(strip=True):
item.destroy() # This method to be added to... |
// https://observablehq.com/@tomlarkworthy/viewroutine@304
async function _1(md,FileAttachment){return(
md`# Composing views across time: viewroutine
${await FileAttachment("viewroutine.png").image()}
Sometimes you want to put a sequence of UI steps in a single cell. Using inspiration drawn from Unity and Golang ([_c... |
const colors = require("ansi-colors");
const parseCollection = require("./parseCollection");
const parseItem = require("./parseItem");
const choose = require("../../helperFunctions/enquirerPrompts/choose");
const retry = require("../../helperFunctions/retry");
const getPage = require("../../helperFunctions/blockOnPage"... |
from sympy.core.symbol import symbols
from sympy.matrices.expressions.hadamard import (HadamardPower, HadamardProduct)
from sympy.matrices.expressions.inverse import Inverse
from sympy.matrices.expressions.matexpr import MatrixSymbol
from sympy.matrices.expressions.matpow import MatPow
from sympy.matrices.expressions.s... |
module.exports = {
HOST: "localhost",
PORT: 27017,
DB: "ticTacToe"
}; |
import numpy as np
import torch
from sklearn.externals import joblib
import cv2
import cpe775.utils.img_utils as utils
from .networks.openface import OpenFace
class Base(object):
def __init__(self, net, model, size, cuda=False):
self.net = net
self.model = model
self.cuda = cuda
... |
'use strict';
var gulp = require('gulp');
var rename = require('gulp-rename');
gulp.task('lint', function() {
var jshint = require('gulp-jshint');
gulp.src('./**/*.js')
.pipe(jshint())
.pipe(jshint.reporter('default'));
});
gulp.task('browserify', function() {
var browserify = require('browserify'... |
(function(d){d['ro']=Object.assign(d['ro']||{},{a:"Nu se poate încărca fișierul:",b:"Bară imagine",c:"Bară tabel",d:"Îngroșat",e:"Cursiv",f:"Bloc citat",g:"Tăiere text cu o linie",h:"Alege titlu",i:"Titlu",j:"Subliniat",k:"Inserează imagine sau fișier",l:"Introdu titlul descriptiv al imaginii",m:"widget imagine",n:"Ins... |
# Copyright (c) 2017, The MITRE Corporation. All rights reserved.
# See LICENSE.txt for complete terms.
import unittest
from mixbox.vendor.six import u
from cybox.objects.win_hook_object import WinHook
from cybox.test.objects import ObjectTestCase
from cybox.test.objects.win_handle_test import TestWinHandle
class ... |
# coding: utf8
import numpy as np
import pandas as pd
import nibabel as nib
from os.path import join
__author__ = "Jorge Samper-Gonzalez"
__copyright__ = "Copyright 2016-2019 The Aramis Lab Team"
__credits__ = ["Jorge Samper-Gonzalez", "Simona Bottani"]
__license__ = "See LICENSE.txt file"
__version__ = "0.1.0"
__ma... |
import uuid, re
from sqlalchemy.dialects.postgresql import UUID
from sqlalchemy.orm import validates
from sqlalchemy.schema import FetchedValue
from app.extensions import db
from ....utils.models_mixins import AuditMixin, Base
from ..models.minespace_user_mine import MinespaceUserMine
class MinespaceUser(Base):
... |
from unittest import TestCase
import CalCalc
class CalCalcTestCall(TestCase):
def test_1(self):
"""Test if error is handled for junk without wolfram flag"""
test_str = "some junk"
assert (
CalCalc.calculate(test_str, False)
== test_str
+ " : is not a val... |
//// [parserClassDeclaration1.ts]
class C extends A extends B {
}
//// [parserClassDeclaration1.js]
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function... |
import netflix from "./netflix.png";
import whatsapp from "./whatsApp.jpg";
import air from "./airBnd.png";
import admin from "./admin.jpg";
import gmail from "./gmail.png";
import chat from "./chatUi.png";
import amazon from "./amazon.jpg";
import trans from "./translator.png";
import coin from "./bitcoin.jpg";
import... |
(navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPad/i) || navigator.userAgent.match(/iPod/i)) && ! function(a) {
function h(b, c, d) {
'use strict';
function i() {
g && (g.apply(a, arguments), h || (delete c[f], g = null))
}
var f, g = d[0],
h ... |
import { combineReducers } from "redux";
import ingredientReducer from "./ingredients";
import recipesReducer from "./recipes";
const rootReducer = combineReducers({
recipes: recipesReducer,
ingredients: ingredientReducer
});
export default rootReducer;
|
#include <stdio.h>
#include <3ds.h>
#include <unistd.h>
#include <string.h>
#include "ntr_config.h"
#include "mysvcs.h"
#define CURRENT_PROCESS_HANDLE (0xffff8001)
#define RESULT_ERROR (1) |
#define SQLITE_ENABLE_FTS5
#define SQLITE_ENABLE_PREUPDATE_HOOK
|
#!/usr/bin/env python3
# Plots loss functions of form |x|**q
import matplotlib.pyplot as pl
import numpy as np
from scipy.stats import t, laplace, norm
x = np.linspace(-4, 4, 100)
pl.title('|x|^0.2')
pl.plot(x, np.absolute(x)**.2)
pl.savefig('lossFunctionFig_01.png')
pl.figure()
pl.title('|x|')
pl.plot(x, np.absolu... |
/*
* Kendo UI v2015.1.408 (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 licen... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# thumbor imaging service
# https://github.com/thumbor/thumbor/wiki
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 globo.com thumbor@googlegroups.com
import logging
import logging.config
import os
import sys
import war... |
# common_cli.py는 모든 화면출력과 메뉴선택을 담당하는 곳입니다.
import os
import time
#from pynput.keyboard import Listener, Key
import common_value as val
#by VDoring. 2021.06.19z
#시작화면을 출력하고 메뉴를 선택하게 합니다.
#리턴값: 1,2
def screenMain():
while True:
os.system('mode con cols=40 lines=11') # 타이틀화면 화면 크기 설정
os.... |
exports.config = {
// ====================
// Runner and framework
// Configuration
// ====================
runner: 'local',
framework: 'jasmine',
jasmineNodeOpts: {
// Updated the timeout to 30 seconds due to possible longer appium calls
// When using XPATH
defaultTi... |
#!/usr/bin/env python3
import numpy as np
import csv
import json
import sys
import argparse
import multiprocessing as mp
import glob
import os
from functools import partial
from sofa_print import *
import subprocess
from pwd import getpwuid
import time
def kill_pcm_modules(p_pcm_pcie, p_pcm_memory, p_pcm_numa):
i... |
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { t... |
/*
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'clipboard', 'az', {
copy: 'Köçür',
copyError: 'Avtomatik köçürülməsi mümkün deyil. Ctrl+C basın.',
cut: 'Kəs',
cutError: 'Avtomatik kəsmə mümkün ... |
// __BEGIN_LICENSE__
// Copyright (c) 2009-2013, United States Government as represented by the
// Administrator of the National Aeronautics and Space Administration. All
// rights reserved.
//
// The NGT platform is licensed under the Apache License, Version 2.0 (the
// "License"); you may not use this file excep... |
$(document).ready(function(){
var banner = localStorage.getItem('admin-banner');
if(!banner){
$(".current-banner").text( "Select a Banner" );
$(".banner-icon").removeClass("fa-flag").addClass("fa-exclamation-triangle");
$(".current-banner-anchor").addClass("banner-not-set");
}
console.log('selected ba... |
const STATUS_MAP = {
PENDING: 'pending',
FULFILLED: 'fulfilled',
REJECTED: 'rejected',
};
class CustomPromise {
constructor(executor) {
this.status = STATUS_MAP.PENDING;
this.value = undefined;
this.reason = undefined;
this.resolvedCallbacks = [];
this.rejectedCallbacks = [];
const res... |
/*
* Copyright (c) 1998,1999,2000
* Traakan, Inc., Los Altos, CA
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* ... |
// i18n tables
var i18nTableEn = {
"introduction" : "Rediscover your town with the alternative routes of MoodWalkR !",
"itinerary" : " ITINERARY",
"loop" : " LOOP ROUTE",
"length" : "Shortest path",
"cost_activity" : "Shopping and activities",
"cost_nature" : "Nature",
"cost_culture" : "Culture",
... |
import { useDispatch } from 'react-redux';
import { deleteAnnotation as deleteAnnotationAction } from 'actions/pdfTextAnnotation';
const useDeleteAnnotation = () => {
const dispatch = useDispatch();
const deleteAnnotation = id => {
if (window.confirm('Are you sure?')) {
dispatch(deleteAnno... |
# coding: utf-8
"""
Thola
REST API for Thola. For more information look at our Github : https://github.com/inexio/thola # noqa: E501
OpenAPI spec version: 1.0.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
impor... |
const Koa = require('koa');
const db = require('./db');
const { router } = require('./router');
const app = new Koa();
const port = process.env.MONOTONE_PORT || 3030;
app.use(router);
db.createTable()
.then(() => db.seedTable())
.then(() => {
app.listen(port);
});
|
#ifndef FILAKEY_H
#define FILAKEY_H
#include <iostream>
using namespace std;
class FilaKey {
private:
struct Node {
string value;
Node* next = 0;
};
Node* first;
Node* last;
public:
FilaKey();
bool insert(string val);
bool popFirst(string *val);
int hasValue(string v... |
'use strict'
const { post, put } = require('./api');
const util = require('./utils')
module.exports = async (req, code, config) => {
const instance = {
name: `${req.elementKey}-${Date.now()}`,
tags: [
req.elementKey // tag instances w/ element key to filter out non-relevant instance... |
from django import forms
from django.utils.translation import ugettext_lazy as _
from django.contrib.auth.models import User
from libscampi.core.fields import UserModelChoiceField
from libscampi.contrib.cms.newsengine.models import ArticleTranslation, Story, Publish
class ArticleTranslationForm(forms.ModelForm):
... |
# Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Codec:
def serialize(self, root):
def doit(node):
if node:
vals.append(str(node.val))
... |
# Adopted from PyTorch Lightning Bolts.
# !/usr/bin/env python
import os
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
try:
import builtins
except ImportError:
import __builtin__ as builtins
# https://packaging.python.org/guides/single-sourcing-package-version/
# http... |
/**
******************************************************************************
* @file joystick.c
* @author WILLIAM TUNG-MAO Wu
* @date 1-May-2014
* @brief Joystick initialisation and control
******************************************************************************
*/
#include "netdui... |
"""
Django settings for djangoconnectiondashboard project.
Generated by 'django-admin startproject' using Django 1.8.2.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/... |
window.JitsiMeetJS=window.JitsiMeetJS||{},window.JitsiMeetJS.app=window.JitsiMeetJS.app||{},window.JitsiMeetJS.app.effects=function(t){var e={};function n(r){if(e[r])return e[r].exports;var a=e[r]={i:r,l:!1,exports:{}};return t[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o... |
import vue from 'rollup-plugin-vue';
import buble from 'rollup-plugin-buble';
import filesize from 'rollup-plugin-filesize';
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import { terser } from 'rollup-plugin-terser';
import replace from 'rollup-plugin-replace';
import... |
"""
Convenient shortcuts to manage or check object permissions.
"""
from __future__ import unicode_literals
from django.contrib.auth.models import Group
from django.contrib.auth.models import Permission
from django.contrib.contenttypes.models import ContentType
from django.db import models
from django.db.models import... |
/** @fileOverview Random number generator.
*
* @author Emily Stark
* @author Mike Hamburg
* @author Dan Boneh
*/
/** @namespace Random number generator
*
* @description
* <p>
* This random number generator is a derivative of Ferguson and Schneier's
* generator Fortuna. It collects entropy from various event... |
'use strict'
const {MariaDbManager} = require('../src')
const cfg = require('./cfg')
const manager = new MariaDbManager(cfg)
manager.healthcheck()
.then(() => console.log('OK'))
.catch(err => console.log('NOT OK\n', err))
|
/*
** Copyright 2005-2018 Solarflare Communications Inc.
** 7505 Irvine Center Drive, Irvine, CA 92618, USA
** Copyright 2002-2005 Level 5 Networks Inc.
**
** This program is free software; you can redistribute it and/or modify it
** under the terms of version 2 of the GNU General Public License ... |
import React from 'react';
import { useSelector } from 'react-redux';
import { StatusBar, YellowBox } from 'react-native';
import FlashMessage from 'react-native-flash-message';
import createRouter from './routes';
YellowBox.ignoreWarnings(['Unrecognized WebSocket']);
export default function App() {
const signed =... |
/*
* This header is generated by classdump-dyld 1.0
* on Saturday, August 24, 2019 at 9:50:46 PM Mountain Standard Time
* Operating System: Version 12.4 (Build 16M568)
* Image Source: /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore
* classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 by Elias... |
/**
* @file 处理文档的修改按钮
* @author xuexb <fe.xiaowu@gmail.com>
*/
/* global hexo */
'use strict';
const components = require('../tools/components.js');
hexo.extend.helper.register('raw_link', path => {
// 单独处理组件文档
if (path.indexOf('examples/') === 0) {
const name = path.slice(path.lastIndexOf('/') +... |
from WGALP.workflow import Workflow
from WGALP.blocks.BWA import BWA
from WGALP.blocks.samtools_VSI import samtools_VSI
from WGALP.blocks.recycler import recycler
from WGALP.blocks.bwa_index import bwa_index
# prepare the steps necessary to correctly run recycler
class Recycler(Workflow):
def task(self, args... |
void foobar ( int size, int array[*] );
void foobar ( int sizeXX, int array[sizeXX] )
{
}
void foo ( int sizeYY, int array[sizeYY] )
{
}
|
const express = require('express');
const router = express.Router();
const ArticleState = require("../../models/ArticleState");
router.patch("/", async (req, res) => {
const {validation, trim} = require("../../app/principals");
let param = req.body;
if (!param._id) {
res.send({
code: 500,
message: 'No se... |
/*! For license information please see lab.js.LICENSE.txt */
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define("lab",[],n):"object"==typeof exports?exports.lab=n():t.lab=n()}(window,(function(){return function(t){var n={};function e(r){if(n[... |
import React from 'react';
import classes from './Button.css';
const button = (props) => (
<button
disabled={props.disabled}
className={[classes.Button, classes[props.btnType]].join(' ')}
onClick={props.clicked}
>
{props.children}
</button>
);
exp... |
/*!
* jQuery JavaScript Library v1.9.1
* http://jquery.com/
*
* Includes Sizzle.js
* http://sizzlejs.com/
*
* Copyright 2005, 2012 jQuery Foundation, Inc. and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: 2013-2-4
*/
(function( window, undefined ) {
// Can't do t... |
from django import forms
from django.contrib.auth.models import User
from django.forms import ModelForm
from models import User , UserProfile
class SignUpForm(forms.ModelForm):
class Meta:
model = User
fields = ['username', 'password' , 'email' , 'first_name', 'last_name',]
widgets = {... |
/*
* File: EditorCentralWid.h
* Module:
* Author: james
* Email:
* File Description:
*
* Created on December 23, 2015, 7:13 PM
* Last Modified:
*/
#ifndef EDITOR_CENTRAL_WID_H
#define EDITOR_CENTRAL_WID_H
#include <QWidget>
#include <QTextEdit> //TODO: replace these with a custom textedit from PrettyP... |
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:jsx-a11y/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,... |
from django.urls import path
from sql_api import views
urlpatterns = [
path('info', views.info),
path('debug', views.debug)
]
|
import robothelper
import numpy as np
import cv2
import pickle
import environment.collisionmodel as cm
if __name__ == '__main__':
yhx = robothelper.RobotHelperX(usereal=False)
yhx.pxc.triggerframe()
bgdepth = yhx.pxc.getdepthimg()
pickle.dump(bgdepth, open("../../databackground/bgdepthlow.pkl", "wb"))
... |
/**
* angular-ui-ace - This directive allows you to add ACE editor elements.
* @version v0.1.0 - 2013-12-28
* @link http://angular-ui.github.com
* @license MIT
*/
"use strict";angular.module("ui.ace",[]).constant("uiAceConfig",{}).directive("uiAce",["uiAceConfig",function(a){if(angular.isUndefined(window.ace))thro... |
/*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
//@ sourceMappingURL=jquery-1.10.2.min.map
*/
(function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.2",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b... |
/*! @license Firebase v4.0.0
Build: rev-c054dab
Terms: https://firebase.google.com/terms/ */
/**
* Copyright 2017 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... |
'''
Gesture recognition
===================
This class allows you to easily create new
gestures and compare them::
from kivy.gesture import Gesture, GestureDatabase
# Create a gesture
g = Gesture()
g.add_stroke(point_list=[(1,1), (3,4), (2,1)])
g.normalize()
# Add it to the database
gdb ... |
const path = require('path');
const distPath = path.join(__dirname, '/dist');
const config = {
entry: {
main: './src/index.js'
},
output: {
filename: 'bundle.js',
path: distPath,
libraryTarget: "umd",
globalObject: "this",
},
module: {
rules: [
{
test: /\.js$/,
... |
"""
CryptoAPIs
Crypto APIs 2.0 is a complex and innovative infrastructure layer that radically simplifies the development of any Blockchain and Crypto related applications. Organized around REST, Crypto APIs 2.0 can assist both novice Bitcoin/Ethereum enthusiasts and crypto experts with the development of thei... |
from .http_client_pool_interface import HttpClientPoolInterface
|
import logging
import voluptuous as vol
import esphomeyaml.config_validation as cv
from esphomeyaml.const import CONF_ID, CONF_OTA, CONF_PASSWORD, CONF_PORT, CONF_SAFE_MODE
from esphomeyaml.core import CORE
from esphomeyaml.cpp_generator import Pvariable, add
from esphomeyaml.cpp_types import App, Component, esphomel... |
##############################################################################
#
# Copyright (c) 2003 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOF... |
# Reference: https://infocenter.nordicsemi.com/pdf/nRF24LE1_PS_v1.6.pdf
# Accession: G00035
import os
import math
import asyncio
import logging
import argparse
import struct
from collections import namedtuple
from amaranth.compat import *
from fx2.format import input_data, output_data
from ....support.logging import ... |
def valida_chutes(palavra):
senha = ''
acertos = []
chute = ''
letras = []
index_letras = 0
verifica_acertos = 0
erros = 0
percorre_palavra = ''
encontrou_letras = False
# continua_jogo = False
dica = input('de uma dica: ')
print(f'a dica é {dica} agora tente des... |
from libqtile.config import Key
from libqtile.lazy import lazy
from libqtile.utils import guess_terminal
from grayskull.constants import MOD_KEY
key_bindings = [
# Switch between windows
Key([MOD_KEY], "h", lazy.layout.left(), desc="Move focus to left"),
Key([MOD_KEY], "l", lazy.layout.right(), desc="Move... |
# 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 ... |
from __future__ import unicode_literals
import django
from django.test import TestCase
from storage.configuration.exceptions import InvalidWorkspaceConfiguration
from storage.configuration.json.workspace_config_1_0 import WorkspaceConfigurationV1
from storage.configuration.json.workspace_config_v6 import WorkspaceCon... |
tinymce.addI18n('nl',{
'Insert a Zotonic media item': 'Plaats een Zotonic mediabestand',
'Insert Zotonic media item': 'Plaats Zotonic mediabestand'
});
|
# Generated by Django 3.2.8 on 2021-12-16 15:46
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('profiles', '0006_alter_profile_location'),
]
operations = [
migrations.AddField(
model_name='profile',
name='interna... |
import api from "@/api";
const getCreditAccounts = context => {
api.getUrl(context, "/api/credit-accounts", "CREDIT_ACCOUNTS_UPDATED");
};
const getCreditAccount = context => {
api.getUrl(context, "/api/credit-account", "CREDIT_ACCOUNT_UPDATED");
};
const createCreditAccount = (context, payload) => {
api... |
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
})... |
let CONSTANTS = {
ISLOCALENVIRONMENT: true,
DATABASE: {
URL_LOCAL: 'mongodb://127.0.0.1:27017',
URL_PROD: 'mongodb+srv://motionanalysis:motionanalysis123@cluster0-jcham.mongodb.net/Production',
url: () => { return CONSTANTS.ISLOCALENVIRONMENT? CONSTANTS.DATABASE.URL_LOCAL: CONSTANTS.DATA... |
# from torch import nn
# from Models.LSTM import LSTM
# from torchcrf import CRF
#
#
# class BiLSTM_CRF_V2(nn.Module):
# def __init__(self, vocab_size, nb_labels, emb_dim, hidden_dim, bos_idx, eos_idx, pad_idx, num_lstm_layers, device):
# super().__init__()
# self.lstm = LSTM(
# vocab_si... |
import { createStore, applyMiddleware, compose } from "redux";
import thunk from "redux-thunk";
import rootReducer from "../_reducers";
// export const store = createStore(rootReducer, applyMiddleware(thunk));
// store.dispatch(fetchAllUsers());
export default function configureStore(initialState) {
const finalCrea... |
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
var Controller = {
index: function () {
// 初始化表格参数配置
Table.api.init({
extend: {
index_url: 'app/comment/index' + location.search,
... |
import React, { Suspense } from 'react';
import ReactDOM from 'react-dom';
import { connect, Provider } from 'react-redux';
import { Route, Switch } from 'react-router';
import { ConnectedRouter } from 'connected-react-router';
import 'react-virtualized/styles.css';
import '@blueprintjs/core/lib/css/blueprint.css';
imp... |
try:
from baseline.utils import *
from baseline.w2v import *
from baseline.confusion import *
from baseline.data import *
from baseline.reader import *
from baseline.progress import *
from baseline.reporting import *
from baseline.model import *
from baseline.train import *
except Im... |
//
// TJY_Nation.h
// TJYFoundation
//
// Created by wang_wei on 2018/5/11.
// Copyright © 2018年 wangwei. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface TJY_Nation : NSObject
@property(nonatomic,copy)NSString * Id;
@property(nonatomic,copy)NSString * nation;
@property(nonatomic,copy)NSStr... |
import math
import numpy
from dexp.utils import xpArray
from dexp.utils.backends import Backend, NumpyBackend
def yang_deskew(
image: xpArray,
depth_axis: int,
lateral_axis: int,
flip_depth_axis: bool,
dx: float,
dz: float,
angle: float,
camera_orientation: int = 0,
num_split: in... |
import csv
import boto3
from evaluation_function import evalutate_quantitative
DATA = "E:/workspace/bank-data-challenge/data/small_set.csv"
DYNAMO_TABLE = "ConsumerComplaints"
def main():
print("Starting")
dynamo_client = boto3.client("dynamodb")
with open(DATA, 'r') as csvfile:
reader = csv.DictR... |
/*
==============================================================================
This file is part of the JUCE library.
Copyright (c) 2013 - Raw Material Software Ltd.
Permission is granted to use this software under the terms of either:
a) the GPL v2 (or any later version)
b) the Affero GPL... |
var stats = {
type: "GROUP",
name: "Global Information",
path: "",
pathFormatted: "group_missing-name-b06d1",
stats: {
"name": "Global Information",
"numberOfRequests": {
"total": "10",
"ok": "10",
"ko": "0"
},
"minResponseTime": {
"total": "22",
"ok": "22",
... |
import axios from 'axios';
const config = {
app: {
title: process.env.APP_TITLE || ' | Umana Admin',
environment: process.env.ENVIRONMENT || 'development',
api_url: process.env.API_URL || 'http://localhost:3026/api/v1',
},
};
export default config;
|
class Solution:
def XXX(self, num: int) -> str:
ans = ""
dic = {(0,1):"I",(0,5):"V",(1,1):"X",(1,5):"L",(2,1):"C",(2,5):"D",(3,1):"M"}
for i in range(4):
left = num % 10
num = num // 10
if left==0:
continue
elif left<=3:
... |
import berries from './berries.json';
import contests from './contests.json';
import encounters from './encounters.json';
import evolution from './evolution.json';
import games from './games.json';
import items from './items.json';
import locations from './locations.json';
import machines from './machines.json';
import... |
from collections import OrderedDict
import copy
import os
from dash.development.base_component import _explicitize_args
from dash.exceptions import NonExistentEventException
from ._all_keywords import python_keywords
from .base_component import Component
# pylint: disable=unused-argument
def generate_class_string(ty... |
// Validates various CSS property values
var Splitter = require('../utils/splitter');
var widthKeywords = ['thin', 'thick', 'medium', 'inherit', 'initial'];
var allUnits = ['px', '%', 'em', 'in', 'cm', 'mm', 'ex', 'pt', 'pc', 'ch', 'rem', 'vh', 'vm', 'vmin', 'vmax', 'vw'];
var cssUnitRegexStr = '(\\-?\\.?\\d+\\... |
# -*- coding: utf-8 -*-
# Copyright 2019 Cohesity Inc.
import cohesity_management_sdk.models.file_search_result
class FileSearchResults(object):
"""Implementation of the 'FileSearchResults' model.
Specifies an array of found files and folders. In addition, a count is
provided to indicate if additional r... |
namaPembeli = str(input("nama pembeli: "))
nomorHP = int(input("nomor handphone: "))
kodeJurusan = str(input("Kode Jurusan: "))
jumlahTiket = int(input("Jumlah Tiket: "))
if(kodeJurusan == "SBY" or kodeJurusan == "sby"):
harga_tiket = "300000"
total_harga = harga_tiket * jumlahTiket
if(... |