text
stringlengths
3
1.05M
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { propTypes } from 'redux-form/immutable'; import { Field } from 'redux-form/immutable'; import { ConfirmDiscardFormChanges } from 'modules/SharedComponents/ConfirmDiscardFormChanges'; import { ContentIndicatorsField, showCont...
export function a () { console.log(1)} export function b () { console.log(2)} export function c () { console.log(3)}
# -*- coding: utf-8 -*- # Copyright (C) 2010 - 2013 by Pedro Mendes, Virginia Tech Intellectual # Properties, Inc., University of Heidelberg, and The University # of Manchester. # All rights reserved. # Copyright (C) 2008 - 2009 by Pedro Mendes, Virginia Tech Intellectual # Properties, Inc., EML Research, gGmbH, ...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # Pre-caching steps used internally by the IDL compiler # # Design doc: http://www.chromium.org/developers/design-documents/idl-build { 'includes': [ ...
#include "sys.h" void WFI_SET(void) { __ASM volatile("wfi"); } // Close all interupts void INTX_DISABLE(void) { __ASM volatile("cpsid i"); } // Open all interupts void INTX_ENABLE(void) { __ASM volatile("cpsie i"); } // Set stack-top pointer // addr: Stack-top pointer __asm void MSR_MSP(u32 addr) { MSR...
""" The entry point for the discord bot. You can add modules by adding them to the MODULES variable. """ import importlib import sys from discord.ext import commands from shared_state import SharedState # add your module name here once completed MODULES = ["help"] def main(): """ The first function that r...
import uuid from 'uuid/v4' import types from './types' import { saveState } from '../user/actions' export const loadAccounts = (accounts) => { return { type: types.LOAD_ACCOUNTS, payload: accounts } } export const afterAccountsChanged = async () => { await saveState() } export const createAccount = (account) => ...
import functools from resources.test_support.helpers import waiter, watch, resource from contextlib import contextmanager import signal import logging from contextlib import contextmanager from tango import DeviceProxy # pre cheks def check_going_out_of_empty(): ## Verify the Subarray obstate = EMPTY resource(...
import json import logging import boto3 import botocore from botocore.exceptions import ClientError from crhelper import CfnResource logger = logging.getLogger(__name__) sm = boto3.client("sagemaker") # cfnhelper makes it easier to implement a CloudFormation custom resource helper = CfnResource() # CFN Handlers ...
# @lc app=leetcode id=235 lang=python3 # # [235] Lowest Common Ancestor of a Binary Search Tree # # https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree/description/ # # algorithms # Easy (52.57%) # Likes: 3338 # Dislikes: 137 # Total Accepted: 522.3K # Total Submissions: 987.9K # Testcase...
# coding: utf-8 # Import Python libs from __future__ import absolute_import import json import yaml import os # Import Salt Testing Libs from salttesting.unit import skipIf from salttesting.helpers import ensure_in_syspath ensure_in_syspath('../../..') import integration # pylint: disable=import-error # Import Salt...
(function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global.vueIonicons = factory()); }(this, (function () { 'use strict'; var A_ROTATE = 'rotate'; var A_BEAT = 'beat'; var A...
// Custome Colors export const bodyColor = '#fafafa'; export const borderColor = '#e0e0e0'; export const buttonGrey = '#bdbdbd'; export const buttonRed = '#dc3545'; export const codeGrey = '#eceff1'; export const commentHeaderColor = '#f6f8fa'; export const darkTextColor = '#263238'; export const errorRed = '#c62838'; ...
require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)...
# -*- coding: UTF-8 -*- """ Author:wistn since:2020-10-17 LastEditors:Do not edit LastEditTime:2021-06-12 Description: """ from .conf import __version__ # 该文件里面有配置 from .lib.org_noear_siteder_App import App from .lib.org_noear_siteder_dao_engine_DdSource import DdSource from .lib.org_noear_siteder_viewModels_site_Main...
process.env.AUTH_TYPE = 'basic'; const mongoose = require('mongoose'); const { Mockgoose } = require('mockgoose'); const mockgoose = new Mockgoose(mongoose); const request = require('supertest')('http://localhost:3099'); let conf = null; describe('Tenant Routes', () => { // Token will be set via Login and is val...
/* * This header is generated by classdump-dyld 1.0 * on Saturday, June 1, 2019 at 6:52:55 PM Mountain Standard Time * Operating System: Version 12.1.1 (Build 16C5050a) * Image Source: /System/Library/PrivateFrameworks/RelevanceEngine.framework/RelevanceEngine * classdump-dyld is licensed under GPLv3, Copyright © 2013-...
import os import random import xml.etree.ElementTree as ET from utils.utils import get_classes #--------------------------------------------------------------------------------------------------------------------------------# # annotation_mode用于指定该文件运行时计算的内容 # annotation_mode为0代表整个标签处理过程,包括获得VOCdevkit/VOC2007/Ima...
import Rx from 'rx/dist/rx.testing'; import request from 'core/services/request'; import travisRequests from 'services/travis/travisRequests'; describe('services/travis/travisRequests', () => { const onNext = Rx.ReactiveTest.onNext; const onCompleted = Rx.ReactiveTest.onCompleted; const settings = { ...
# -*- coding: utf-8 -*- import pandas as pd import os import re import time import jieba import numpy as np import sys, getopt import math import gc from Auto_NLP.DeepBlueAI.tf_model import * # fixme #from Auto_NLP.DeepBlueAI.get_embedding import GET_EMBEDDING import warnings warnings.filterwarnings('ignore') try: ...
import React, {useEffect} from 'react'; import MovieList from "../MovieList/MovieList"; import {useDispatch} from "react-redux"; import {fetchAsyncMovies} from "../../redux/cinema/cinemaSlice"; import './MoviesPage.css' const MoviesPage = () => { const dispatch = useDispatch() const movieText = 'Zombie' us...
# Generated by Django 3.0.5 on 2020-06-10 11:36 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Entry', fields=[ ('id', mod...
// // Copyright (c) 2019 by Oracle company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You ma...
declare module "gapi.client.content" { declare var npm$namespace$gapi: { client: typeof npm$namespace$gapi$client }; declare var npm$namespace$gapi$client: { load: typeof gapi$client$load, accounts: typeof gapi$client$accounts, accountstatuses: typeof gapi$client$accountstatuses, accounttax: ...
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 = "MovingAverage", cycle_length = 12, transform = "BoxCox", sigma = 0.0, exog_count = 20, ar_order = 12);
import { useState, useEffect } from 'react'; export default function useElementPosition(el) { function getElement(x, y) { return { x: x, y: y, }; } const [elementPosition, setElementPosition] = useState(getElement); useEffect(() => { function handlePosition() { let element = el.c...
"""Factory for and registration of model elements.""" from __future__ import annotations import uuid from collections import OrderedDict from contextlib import contextmanager from typing import ( TYPE_CHECKING, Callable, Dict, Iterator, List, Optional, Type, TypeVar, Union, ove...
/* * Web Experience Toolkit (WET) / Boîte à outils de l"expérience Web (BOEW) * wet-boew.github.io/wet-boew/License-en.html / wet-boew.github.io/wet-boew/Licence-fr.html */ /* ----- Hungarian dictionary (il8n) --- */ ( function( wb ) { "use strict"; /* main index */ wb.i18nDict = { "lang-code": "hu", "lang-nativ...
// flow-typed signature: 428f48c94e1ec1dd7a8dae75a2f6a045 // flow-typed version: <<STUB>>/@babel/preset-env_v^7.7.7/flow_v0.98.0 /** * This is an autogenerated libdef stub for: * * '@babel/preset-env' * * Fill this stub out by replacing all the `any` types. * * Once filled out, we encourage you to share your ...
/** * isArrayLengthOdd(numbers): * - receives array `numbers` * - returns true if array has an odd number of elements * - returns false otherwise * * e.g. * isArrayLengthOdd([1, 2, 3]) -> true * isArrayLengthOdd([1, 2, 3, 4]) -> flase */ let isArrayLengthOdd = (numbers) => { if ((numbers.length%2) === 1){ ...
""" ASGI config for poligonosapp_with_django_folium project. It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ....
#!/usr/bin/env python3 # Copyright (c) 2015-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the preciousblock RPC.""" from test_framework.test_framework import MERICATestFramework from test...
//put your generic js functon here let whenDocumentReady = (f) => { /in/.test(document.readyState) ? setTimeout('whenDocumentReady(' + f + ')', 9) : f() } whenDocumentReady(isReady = () => { })
import tensorflow as tf import numpy as np import pickle import math import random import ast import sys sys.path.append( "./util" ) sys.path.append( "./util/bert" ) import modeling import tokenization from data_storage import DataStorage from db_meta import * from sqlgen import SQLGen fr...
####################################### # IMPORTS ####################################### from strings_with_arrows import * ####################################### # CONSTANTS ####################################### DIGITS = '0123456789' ####################################### # ERRORS ###############...
import React from 'react'; import { act } from 'react-dom/test-utils'; import { Route } from 'react-router-dom'; import { createMemoryHistory } from 'history'; import { InstancesAPI, InstanceGroupsAPI } from 'api'; import { mountWithContexts, waitForElement, } from '../../../../testUtils/enzymeHelpers'; import In...
////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////// //|************************************************************|// //| |// //| ROUTES TO MAIN VIEWS ...
""" This program implements two algorithms for converting a discrete probability distribution into an epsilon-soft probability distribution with minimal KL-divergence from the original. The function `soften` does this directly and the function `tf_soften` does this implicitly using gradient descent to provide evidence...
# Copyright 2017 The TensorFlow 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 applica...
import sys, logging, os, random, math, open_color, arcade #check to make sure we are running the right version of Python version = (3,7) assert sys.version_info >= version, "This script requires at least Python {0}.{1}".format(version[0],version[1]) #turn on logging, in case we have to leave ourselves debugging messa...
from setuptools import setup setup( name='judgment_aggregation', version='0.1', description='A package for judgment aggregation', url='https://github.com/jeroenstalenburg/judgment-aggregation', author='Jeroen Stalenburg', author_email='jeroenstalenburg@gmail.com', license='Apache', pack...
def is_pandigital(first: int, second: int, third: int) -> bool: final_val = str(first) + str(second) + str(third) return ''.join(sorted(final_val)) == '123456789' def find_pandigital_numbers() -> int: products = [] for i in range(2, 100): for j in range(1234 if i <= 9 else 123, 10000//i + 1)...
define({ status: '${start} - ${end} od ${total} rezultatov', gotoFirst: 'Pojdi na prvo stran', gotoNext: 'Pojdi na naslednjo stran', gotoPrev: 'Pojdi na prejšnjo stran', gotoLast: 'Pojdi na zadnjo stran', gotoPage: 'Pojdi na stran', jumpPage: 'Skoči na stran', rowsPerPage: 'Število vrstic na stran' });
# -*- coding: utf-8 -*- """Create worksets from Excel. NOTE: Excel should contain at least Name of the worksets. """ __author__ = "nWn" __title__ = "Worksets\n from Excel" # Import from pyrevit import revit, DB from pyrevit import script from pyrevit import forms # Import libraries import clr clr.AddReference("Micr...
/* * Core.js * @author: Fede91 * Github: https://github.com/Fede91 * * Made available under a MIT @license: * http://www.opensource.org/licenses/mit-license.php * * Core.js Copyright Fede91 2014. */ define(function (require, exports) { "use strict"; var AppInit = brackets.getModule("utils/AppInit"); ...
from sqlalchemy import Column, String, create_engine, Integer from sqlalchemy.orm import sessionmaker from sqlalchemy.ext.declarative import declarative_base import transinfo_pb2_grpc import transinfo_pb2 import logging import grpc import time from concurrent import futures def insert(dic, session): new_pkg = Pkg...
""" This file offers the methods to automatically retrieve the graph sc-pkustk13. The graph is automatically retrieved from the NetworkRepository repository. References --------------------- Please cite the following if you use the data: ```bib @inproceedings{nr, title = {The Network Data Repository with Inter...
/* * This header is generated by classdump-dyld 1.0 * on Sunday, June 7, 2020 at 11:25:29 AM Mountain Standard Time * Operating System: Version 13.4.5 (Build 17L562) * Image Source: /System/Library/PrivateFrameworks/IMSharedUtilities.framework/IMSharedUtilities * classdump-dyld is licensed under GPLv3, Copyright © 2013...
import itertools import logging from det3d.utils.config_tool import get_downsample_factor tasks = [ dict(num_class=1, class_names=["car"]), dict(num_class=2, class_names=["truck", "construction_vehicle"]), dict(num_class=2, class_names=["bus", "trailer"]), dict(num_class=1, class_names=["barrier"]), ...
"""Test the Plugwise config flow.""" from Plugwise_Smile.Smile import Smile import pytest from homeassistant import config_entries, data_entry_flow, setup from homeassistant.components.plugwise.const import ( DEFAULT_PORT, DEFAULT_SCAN_INTERVAL, DOMAIN, ) from homeassistant.config_entries import SOURCE_USE...
/*! For license information please see app-c39495535db7d7187f2c.js.LICENSE.txt */ (window.webpackJsonp=window.webpackJsonp||[]).push([[2],{"+ZDr":function(t,e,n){"use strict";var r=n("TqRt");e.__esModule=!0,e.withPrefix=h,e.withAssetPrefix=function(t){return h(t,m())},e.navigateTo=e.replace=e.push=e.navigate=e.default=...
""" Implementation of attack methods. Running this file as a program will apply the attack to the model specified by the config file and store the examples in an .npy file. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import tensorfl...
/* * Diagnostic utility for ethernet cards using Garrett's drivers. * * Copyright (c) 2001-2005 by Garrett D'Amore <garrett@damore.org>. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: ...
from __future__ import absolute_import import requests import waffle from django import http from django.conf import settings from django.contrib import messages from django.contrib.staticfiles.views import serve from django.http import Http404 from django.shortcuts import ( get_object_or_404, redirect, ...
import { resolve } from 'path'; import express from 'express'; import routes from './routes'; import './config/dotenv'; import './database'; class App { constructor() { this.server = express(); this.middlewares(); this.routes(); } middlewares() { this.server.use(express.json()); this.serv...
/** * @see http://www.chaijs.com/guide/styles/#should */ 'use strict'; const should = require('chai').should(); import '../src/js/is-object.js'; describe('is-object', function() { it('should exists', function() { should.exist(Object.prototype.isObject); }); // ... });
NetworkController //@ sourceURL=mod.js NetworkController.$inject = ['$scope', '$http', '$targets']; function NetworkController($scope, $http, $targets) { $scope.devInfo = function(){ $.get("devInfo",function(data){ // 获取config文件内容 $scope.devIp = data.ip; // 文件中的配置 $scope.devMac = data.m...
function buildComponentIndex() { let query = `import React, { Component } from 'react'; // Styling import './index.css'; // Components class Index extends Component { constructor(props) { super(props); this.state = {}; } render() { return ( <div class="pageWrapper"> ...
from keras.layers import Lambda, Dense, Activation, Input, Concatenate from keras.models import Model import keras.backend as K from ..models import GResNet class SliceAE(object): model_name="DuplexAE" def __init__(self,input_shape, layer_units=[3000,2000], y_dim=10, ...
const addContext = require('../src/addContext'); function retObj() { return { employees: { employee: [ { id: '1', firstName: 'Tom', lastName: 'Cruise', }, { id: '2', firstName: 'Maria', lastName: 'Sharapova', }, ...
(window.webpackJsonp=window.webpackJsonp||[]).push([[47],{2362:function(t,e,r){"use strict";r.r(e);var v=r(18),i=Object(v.a)({},(function(){var t=this,e=t.$createElement,v=t._self._c||e;return v("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[v("h1",{attrs:{id:"px4-vision-视觉自主开发套件"}},[v("a",{staticCla...
__author__ = 'mpetyx' from django.db import models from OPENiapp.APIS.Context.models import OpeniContextAwareModel class OpeniFile(OpeniContextAwareModel): # id is missing because it is the default url = models.TextField() object_type = models.TextField() service = models.TextField() From = model...
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ Orchestrating the BOLD-preprocessing workflow ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. autofunction:: init_func_preproc_wf .. autofunction:: init_func_derivatives_wf """ from ... import config...
const vscode = require('vscode'); const { logger } = require('./logger'); class Button { constructor(props) { this.iconPath = props.iconPath, this.tooltip = props.tooltip, this.func = null } bindAction(func) { this.func = func; } } class InputStep { constructor(props...
const WebpackRedisClient = require('./index'), redis = require('redis'), fs = require('fs'); let plugin, listener, client, compilation; beforeEach(() => { plugin = new WebpackRedisClient(); redis.createClient = jest.fn(() => client); fs.readFileSync = jest.fn(p => { switch (p) { case './asse...
from binascii import hexlify from functools import wraps from logging import error from os import urandom from random import randint from flask import render_template from werkzeug.exceptions import Forbidden from werkzeug.exceptions import Gone from werkzeug.exceptions import InternalServerError from werkzeug.excepti...
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; import _extends from "@babel/runtime/helpers/esm/extends"; import _inheritsLoose from "@babel/runtime/helpers/esm/inheritsLoose"; import _isNil from "lodash/isNil"; import _isFunction from "lodash/isFunction"; import _i...
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.FileItem import FileItem from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.ZhimaCreditEpDataapiMigrationQueryModel import ZhimaCreditEpDataapiMigrationQueryModel class ZhimaCreditEpDataapiMigrationQueryReque...
/* * Copyright 2004-2015 Cray Inc. * Other additional copyright holders may be indicated within. * * The entirety of this work is 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 * ...
import { LitElement, html } from '@polymer/lit-element'; class MyHeader extends LitElement { render() { return html` <header>header</header> `; } } customElements.define('my-header', MyHeader);
# SPDX-License-Identifier: Apache-2.0 # # Copyright (C) 2017, Arm Limited and contributors. # # 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 # # ...
import sys sys.path.insert(0, '../') import os os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'meiduo_mall.settings.dev') # 初始化django import django django.setup() from django.template import loader from django.conf import settings from goods.models import SKU from goods.utils import get_categories, get_goods_and_s...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.rewriteErrorMessage = rewriteErrorMessage; exports.captureStackTrace = captureStackTrace; exports.splitErrorMessage = splitErrorMessage; var _path = _interopRequireDefault(require("path")); var _stackUtils = _interopRequireDefault...
import math def count_set_bits(n): """ >>> count_set_bits(8) 1 >>> count_set_bits(7) 3 >>> count_set_bits(2.5) Traceback (most recent call last): ... ValueError: The input should be positive integer >>> count_set_bits(-2) Traceback (most recent call last): ... ...
/* eslint-disable no-use-before-define */ const winston = require('winston'); const Q = require('q'); const request = require('request'); const keys = require('../config/keys.js'); const dbaccessModel = require('../model/dbAccess.js'); module.exports = { createAccessUrl(userId, appId) { const deferred = Q.defer...
(function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global.vueIonicons = factory()); }(this, (function () { 'use strict'; var A_ROTATE = 'rotate'; var A_BEAT = 'beat'; var A...
import _ from 'lodash' import React, { Component } from 'react'; import ReactDOM from 'react-dom' import YTSearch from 'youtube-api-search'; import SearchBar from './components/search_bar'; import VideoList from './components/video_list'; import VideoDetail from './components/video_detail'; const API_KEY = 'AIzaSyA9I...
#pragma once /* RPi 2 is ARM v7, and has DMB instruction for memory barriers. Older RPis are ARM v6 and don't, so a coprocessor instruction must be used instead. However, not all versions of gcc in all distros support the dmb assembler instruction even on compatible processors. This test is so any ARMv7 or...
from glob import glob from setuptools import setup package_name = 'building_map_tools' setup( name=package_name, version='0.0.0', packages=[ 'building_crowdsim', 'building_crowdsim.navmesh', 'building_crowdsim.config', 'building_map', 'building_map.doors', '...
import React, { PropTypes } from 'react'; import IconButton from 'material-ui/lib/icon-button'; import Badge from 'material-ui/lib/badge'; import MenuItem from 'material-ui/lib/menus/menu-item'; import DropDownMenu from 'material-ui/lib/DropDownMenu'; import RaisedButton from 'material-ui/lib/raised-button'; import Too...
""" Generic Multivariable Polynomial Fit Using Least Squares Regression With full control Of interaction terms And constraint capabilities This module contains functions to calculate the polynomial coefficients for a an arbitrary order polynomial curve fit to a dataset with an arbitrary number of independent variabl...
import { expect } from 'chai'; import { audioContext, getBeat, bassDrum, getBufferList } from '../euclidean.js'; import 'web-audio-test-api'; describe('Euclidean Rhythms', () => { it('has a default 4/4 beat', () => { expect(getBeat()).to.eql([1, 1, 1, 1]); }); it('has an audio context', () => { expect(a...
""" Pytest configuration that spins up a single localstack instance that is shared across test modules. See: https://docs.pytest.org/en/6.2.x/fixture.html#conftest-py-sharing-fixtures-across-multiple-files It is thread/process safe to run with pytest-parallel, however not for pytest-xdist. """ import logging import mu...
// @flow import assert from 'assert'; import extend from '../util/extend'; import ParsingError from './parsing_error'; import ParsingContext from './parsing_context'; import EvaluationContext from './evaluation_context'; import CompoundExpression from './compound_expression'; import Step from './definitions/step'; im...
#!/usr/bin/python import sys import os import traceback from optparse import OptionParser from androlyze import * from permissions import * from androguard.decompiler.dad import decompile from androguard.core.analysis.analysis import * from xmlparse import get_exploitable_methods from codeparse import get_permission_a...
from .base import * # noqa from .base import env # GENERAL # ------------------------------------------------------------------------------ # https://docs.djangoproject.com/en/dev/ref/settings/#debug DEBUG = env.bool('DJANGO_DEBUG', default=True) # https://docs.djangoproject.com/en/dev/ref/settings/#secret-key SECRET...
/* * Copyright 2010-2017, Tarantool AUTHORS, please see AUTHORS file. * * 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 notice, this lis...
from __future__ import absolute_import, unicode_literals from argparse import ArgumentTypeError from collections import OrderedDict from .base import ComponentBuilder class ActivationSelector(ComponentBuilder): def __init__(self, interpreter, parser): self.default = None possible = OrderedDict( ...
import json from datetime import datetime,date import pyrebase def attcheck(j): if j<minatt: print("YOU NEED TO ATTEND ",minatt-j,"MORE LECTURES TO HAVE REQUIRED MINIMUM 75% ATTENDANCE") elif j==minatt: print("YOUR ATTENDANCE IS 75% OF REQUIRED MINIMUM ATTENDANCE\nATTEND MORE LECURES SO...
if __name__ == '__main__': product_price = input('Type the product price: ') product_price = float(product_price) value_added_tax = 24 / 100 * product_price print('The product price is: ' + str(product_price)) monthly_instalment_price = (product_price + value_added_tax) / 10 print('The monthly...
from __future__ import division import cv2 import numpy as np import scipy.io import scipy.ndimage def padding(img, shape_r=240, shape_c=320, channels=3): img_padded = np.zeros((shape_r, shape_c, channels), dtype=np.uint8) if channels == 1: img_padded = np.zeros((shape_r, shape_c), dtype=np....
""" Test twin sac against various environments. """ import gym from rlkit.data_management.env_replay_buffer import EnvReplayBuffer from rlkit.launchers.launcher_util import run_experiment import rlkit.torch.pytorch_util as ptu from rlkit.samplers.data_collector import MdpPathCollector from rlkit.samplers.data_collector...
const { sep } = require("path"); const { log, run } = require("../utils/action"); const commandExists = require("../utils/command-exists"); const { initLintResult } = require("../utils/lint-result"); const { capitalizeFirstLetter } = require("../utils/string"); const PARSE_REGEX = /^(.*):([0-9]+):[0-9]+: (\w*) (.*)$/...
import json import sys import os data_file = os.path.join(sys.argv[1], 'desc.json') with open(data_file, 'r') as fh: data = json.load(fh) for entry in data['test']: print("%s (%s)" % (entry['trans'], entry['id']))
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file '/Users/Colin/Documents/hackedit/data/forms/dlg_select_workspaces.ui' # # Created by: PyQt5 UI code generator 5.6 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Dialog(object): ...
const express = require("express"); const _ = require("lodash"); const path = require("path"); const { getMongoDBConnectionURL } = require("../utils"); const constants = require('../utils/constants'); function indexRouter({ baseRetailerService, indexOptions } = {}) { function initRouter({ baseRetailerService, indexO...
from __future__ import print_function import sys, codecs from setuptools import setup, find_packages with open('requirements.txt') as f: INSTALL_REQUIRES = [l.strip() for l in f.readlines() if l] try: import numpy except ImportError: print('numpy is required during installation') sys.exit(1) try: ...
// constants import Web3EthContract from "web3-eth-contract"; import Web3 from "web3"; import SmartContract from "../../contracts/PHC.json"; // log import { fetchData } from "../data/dataActions"; const connectRequest = () => { return { type: "CONNECTION_REQUEST", }; }; const connectSuccess = (payload) => { ...
# Copyright 2020-2021 Hewlett Packard Enterprise Development LP # # 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, ...
from collections import OrderedDict import torch import torch.nn as nn import torch.nn.functional as F from torch.nn.modules.normalization import LayerNorm class Conv1d(nn.Module): # the same as stack frames def __init__(self, d_input, d_hidden, n_layers, w_context, pad='same', name=''): super().__ini...