text
stringlengths
3
1.05M
/* ========================================================================== Bureau structure. Scripts for `/the-bureau/bureau-structure/`. ========================================================================== */ const BreakpointHandler = require( '../modules/BreakpointHandler' ); const Expandable = re...
/* Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'blockquote', 'vi', { toolbar: 'Khối trích dẫn' } );
import React from "react"; import { renderWithReduxAndRouter, getTestProduct, } from "../../../utils/test-utils"; import ProductsListing from ".."; describe("<ProductsListing />", () => { it("is defined", () => { const handleDownVote = jest.fn(); const handleUpVote = jest.fn(); const handleSetFavor...
/* * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
//Define Colors for the different bins var colors = { "Gelbe Tonne": "yellow", "Biotonne": "chocolate", "Restmüll": "gray", "Altpapiersammlung": "cornflowerblue", "Sondermüll": "red", "Gartenabfälle": "green" }; module.exports = colors;
# Copyright 2020 The HuggingFace Team. 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 applicabl...
""" (C) Copyright 2020 Scott Wiederhold, s.e.wiederhold@gmail.com https://community.openglow.org SPDX-License-Identifier: MIT """ from gfutilities.device.basemachine import BaseMachine from gfutilities.device.emulator import Emulator from gfutilities.service.gfuiservice import GFUIService __all__ = ['GFUIService',...
/** * Copyright (c) 2006-2015 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * ...
#ifndef GSL_MATRIX_H_ #define GSL_MATRIX_H_ #include <algorithm> #include <cstdio> #include <cstring> #include "cblas.h" #include "gsl_vector.h" // Gnu Scientific Library namespace gsl { // Matrix Class template <typename T, CBLAS_ORDER O> struct matrix { size_t size1, size2, tda; T* data; }; template <typenam...
# -*- coding: utf-8 -*- ''' :codeauthor: :email:`Pedro Algarvio (pedro@algarvio.me)` salt.utils.filebuffer ~~~~~~~~~~~~~~~~~~~~~ This utility allows parsing a file in chunks. ''' from __future__ import absolute_import # Import salt libs import salt.ext.six as six import salt.utils from salt.exceptio...
/* ********************************************************************************************************* * uC/FS * The Embedded File System * * Copyright 2008-2021 Silicon Laboratories Inc. www.silabs.com * * ...
from django.shortcuts import render def index(request): return render(request, 'homepage/index.html')
module.exports = new Date(2022, 3, 1)
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Setup file for openeo_processes. This file was generated with PyScaffold 3.0.3. PyScaffold helps you to put up the scaffold of your new Python project. Learn more under: http://pyscaffold.org/ """ import sys from setuptools import setup # Add here con...
# --------------------------------------------------------------------- # OS.Linux.get_vlans # --------------------------------------------------------------------- # Copyright (C) 2007-2011 The NOC Project # See LICENSE for details # --------------------------------------------------------------------- # NOC modules ...
#ifndef incl_HPHP_CURL_MULTI_RESOURCE_H #define incl_HPHP_CURL_MULTI_RESOURCE_H #include "hphp/runtime/ext/extension.h" #include <curl/curl.h> namespace HPHP { ///////////////////////////////////////////////////////////////////////////// // CurlMultiResource struct CurlResource; struct CurlMultiResource : Sweepabl...
from treadmill.infra.setup import base_provision from treadmill.infra import configuration, constants, exceptions, connection from treadmill.api import ipa class LDAP(base_provision.BaseProvision): def setup( self, image, count, key, cidr_block, ...
import React from 'react' import { Item } from 'semantic-ui-react' const ItemExampleHeaders = () => ( <Item.Group> <Item> <Item.Image size='tiny' src='http://semantic-ui.com/images/wireframe/image.png' /> <Item.Content verticalAlign='middle'> <Item.Header as='a'>12 Years a Slave</Item.Header>...
class SlackHelpers { constructor(robot) { this.robot = robot; this.client = this.robot.adapter.client; } async filterUsers(cb) { const { members: users } = await this.client.web.users.list(); return users.filter(cb); } async getUserId(name) { const user = await this.filterUsers((usr) => ...
#include "test_common.h" #include "http_response.h" #include "response_parser.h" #define TEST_NAME "RESPONSE_PARSER" int test_response_parser_init(void) { info("+++ test_init() +++"); http_response_t res; response_parser_t rp; int ret = 0; ret = http_response_init(&res); if (ret != 0) { ...
import enum import json import logging from typing import Any from typing import Dict from typing import List from typing import Tuple import boto3 import neo4j from cartography.intel.aws.permission_relationships import parse_statement_node from cartography.intel.aws.permission_relationships import principal_allowed_...
# Copyright (C) 2003-2009 Robey Pointer <robeypointer@gmail.com> # # This file is part of paramiko. # # Paramiko is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (a...
function Person(n, race) { this.clothing = "nothing/naked"; } var gk = new Person("Gavin", "caucasian"); gk.beCool = function() { this.clothing = "tinfoil"; };
angular.module('replicationConsole').controller('TableController', ['$scope', '$attrs', '$interval', '$uibModal', 'ApiService', function ($scope, $attrs, $interval, $uibModal, ApiService) { //Display error if no path is set if(! $attrs.path){ $scope.errorMessage = "No path set for table resource"; $scope.t...
# Copyright (c) Open-MMLab. All rights reserved. __version__ = '2.20.0' short_version = __version__ def parse_version_info(version_str): version_info = [] for x in version_str.split('.'): if x.isdigit(): version_info.append(int(x)) elif x.find('rc') != -1: patch_versio...
import threading import unittest from unittest import mock import cupy from cupy import testing from cupy_tests.core_tests.fusion_tests import fusion_utils class FusionTestBase(unittest.TestCase): def generate_inputs(self, xp, nargs, dtype): inputs = [ testing.shaped_random((3, 4), xp, dtype,...
import functools import torch import torch.distributed as dist from enum import Enum TORCH_HALF_MIN = torch.finfo(torch.float16).min TORCH_HALF_MAX = torch.finfo(torch.float16).max class DQuantType(Enum): FP16 = "fp16" def __str__(self) -> str: return self.value def _fp32_to_fp16_with_clamp(tens...
#ifndef SPATIAL_VELOCITY_TRACKER_H #define SPATIAL_VELOCITY_TRACKER_H #include "scene/3d/spatial.h" class SpatialVelocityTracker : public Reference { GDCLASS(SpatialVelocityTracker, Reference) struct PositionHistory { uint64_t frame; Vector3 position; }; bool fixed_step; Vector<PositionHistory> position_hi...
const chalk = require('chalk'); const branch = require('git-branch'); const types = require('./types'); const getLongInput = ({ required = false, maxLength = 80 }) => ({ validate: value => { const length = value.trim().length; return required && length <= 0 ? 'required' : length > maxLength ...
#!/usr/bin/env python # coding: utf-8 # In[2]: from collections import defaultdict import csv import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt # ## read data to numpy(not in use) # In[385]: # def readCsvToNumpy(file_name, feat_num): # util_mat = [] # with open...
from replace_expression import main def remove_newlines(lines, file_path): new_lines = [] comment_started = False next_line = "" for line in lines: stripped = line.strip() # special case: /* .... */ style comments if not comment_started and stripped.count("/*") ==...
#!/usr/bin/env python # Copyright (c) 2013-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 __future__ import division,print_function,unicode_literals import biplist from ds_store import DSStore...
# There are various cases of language codes that we want to merge or redirect # to another language code. To promote data alignment, when there is # uncertainty about whether multiple language codes are just variations of the # "same language", we favor treating them as the same language. LCODE_ALIASES = { # Prete...
from __future__ import print_function from __future__ import division from __future__ import unicode_literals import os import subprocess from jupyter_client import KernelManager, kernelspec from nbformat.v4 import output_from_msg from . import misc try: from queue import Empty # Py 3 except ImportError: from...
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.response.AlipayResponse import AlipayResponse class AlipayDataPrinterTokenGetResponse(AlipayResponse): def __init__(self): super(AlipayDataPrinterTokenGetResponse, self).__init__() self._code = None self._data ...
s = input().rstrip() letters = set(list(s)) ans = len(s) for l in letters: frg = s.split(l) ans = min(ans, max([len(x) for x in frg])) print(ans)
from flask import Flask from flask import request from flask import render_template from flask_wtf.csrf import CSRFProtect from flask_wtf import FlaskForm from wtforms import TextAreaField from wtforms.validators import DataRequired from yaml_rulz.validator import YAMLValidator app = Flask(__name__) csrf = CSRFProtect...
# 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
/* st-render.js */ st.render = { init: function() { st.log("render.init"); }, render: function() { st.log("render"); st.render.renderReset(); st.render.renderSpec(); $(".st-page").removeClass("st-initial-state"); }, renderReset: function() { st.log("render reset"); $(".st-page-ft").html(""); }, re...
''' Measures of spread These functions calculate a measure of how much the population or sample tends to deviate from the typical or average values. ''' from statistics import (pstdev, pvariance, stdev, variance) from decimal import Decimal as D from fractions import Fraction as F # Sample data sample = ...
G = { 'nodes': [ {'id': '0', 'pos': [3.70995699,0.08391516]}, {'id': '1', 'pos': [ 0.81382483,-2.92066203]}, {'id': '2', 'pos': [-0.21307061,-3.63721291]}, {'id': '3', 'pos': [-1.2516482 , 0.71659665]}, {'id': '4', 'pos': [3.56304539,0.18452556]}, {'id': '5', 'pos': [-0.50...
module.exports={A:{A:{"1":"H D G E A B","16":"eB"},B:{"1":"0 C p J L N I"},C:{"1":"0 1 2 4 5 7 8 9 F K H D G E A B C p J L N I O P Q R S T U V W X Y Z a c d e f g h i j k l m n o M q r s t u v w x y z AB BB CB","16":"3 cB aB UB"},D:{"1":"1 2 4 5 7 8 9 V W X Y Z a c d e f g h i j k l m n o M q r s t u v w x y z AB BB CB...
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicnVsZS1jb25maWcuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9Acnh3ZWIvcmVhY3RpdmUtZm9ybS12YWxpZGF0b3JzLyIsInNvdXJjZXMiOlsibW9kZWxzL2NvbmZpZy9ydWxlLWNvbmZpZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGludGVyZmFjZSBSdWxlQ29uZm...
'use strict'; var kraken = require('kraken-js'), app = require('express')(), options = require('./lib/spec')(app), port = process.env.PORT || 8000; app.use(kraken(options)); app.listen(port, function (err) { console.log('[%s] Listening on http://localhost:%d', app.settings.env, port); });
import React from 'react'; import { shallow } from 'enzyme'; import {ZeroPad } from '../dist'; const PAD = 4; describe('<ZeroPad />', () => { it('should pad text with zeroes', () => { const wrapper = shallow( <ZeroPad value="ab" pad={PAD} /> ); wrapper.text().should.eq('00ab'); }) it('shoul...
#!/usr/bin/env python3 import sys import argparse import urllib.request import json import time PENDING_TIMEOUT = 300 PENDING_WAIT = 30 # REGISGTRATION_STATES = [ 'NOTSET', 'NEW', 'APPROVED', 'ADMITTED', 'RETIRED', 'FAILED', 'DONE', 'PENDING', 'ONLINE', 'UPGRADING', 'MAINTENANCE' ] COUNT_REGISTRATION_STATES = ['APPR...
import { applyNodeProps, getName, findParentKonva, createListener, updatePicture, findKonvaNode } from '../utils'; const EVENTS_NAMESPACE = '.vue-konva-event'; export default function() { return { render(createElement) { return createElement('div', [this.config, this.$slots.default]); }, ...
import React from 'react'; import renderer from 'react-test-renderer'; import Checkbox from '../../src/checkbox'; test('Normal checkbox renders correctly', () => { const tree = renderer.create( <Checkbox checked /> ).toJSON(); expect(tree).toMatchSnapshot(); }); test('Checkbox with states renders correctly...
/* * This header is generated by classdump-dyld 1.0 * on Sunday, June 7, 2020 at 11:45:10 AM Mountain Standard Time * Operating System: Version 13.4.5 (Build 17L562) * Image Source: /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore * classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 by Elias L...
/* Benjamin DELPY `gentilkiwi` http://blog.gentilkiwi.com benjamin@gentilkiwi.com Licence : https://creativecommons.org/licenses/by/4.0/ */ #pragma once #include "globals.h" #include "modules/kuhl_m_standard.h" #include "modules/kuhl_m_crypto.h" #include "modules/sekurlsa/kuhl_m_sekurlsa.h" #include "mod...
'use strict'; var path = require('path'); var assert = require('yeoman-assert'); var helpers = require('yeoman-test'); describe('generator-sms-boilerplate:app', function () { before(function () { return helpers.run(path.join(__dirname, '../generators/app')) .withPrompts({someAnswer: true}) .toPromise...
#!/usr/bin/python3 database = list() with open("icezero.pcf", "r") as f: for line in f: line = line.split() if len(line) == 3 and line[0] == "set_io" and \ line[1] not in ["clk_100mhz", "led1", "led2", "led3"] and \ not line[1].startswith("sram_"): datab...
"use strict"; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; /*! (C) Andrea Giammarchi - Mit St...
""" Django settings for replay_archive project. Generated by 'django-admin startproject' using Django 1.10.5. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ im...
from http import HTTPStatus from fastapi import HTTPException from starlette.authentication import AuthenticationError class SSOBaseAuthException(AuthenticationError, HTTPException): status_code = HTTPStatus.UNAUTHORIZED detail = "unauthorized" def __init__(self, *args, **kwargs) -> None: status...
/* * OMAP2PLUS DMA channel definitions * * This program is free software; 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 2 of the License, or * (at your option) any later version. * * This program is di...
import os from random import shuffle import random import sys import numpy as np import pandas as pd #import h5py from config import FLAGS def _PrepareData(): data_X = pd.read_hdf(FLAGS.data_path,FLAGS.X_ID).values data_Y = pd.read_hdf(FLAGS.data_path,FLAGS.Y_ID).values X,y = [],[] total_batch = i...
const Command = require('../../structures/Command'); module.exports = class LeaveVoiceChannelCommand extends Command { constructor(client) { super(client, { name: 'leave-voice-channel', aliases: ['leave-vc'], group: 'voice', memberName: 'leave', description: 'Leaves a voice channel, in case the bot g...
module.exports = sigmund function sigmund (subject, maxSessions) { maxSessions = maxSessions || 10; var notes = []; var analysis = ''; var RE = RegExp; function psychoAnalyze (subject, session) { if (session > maxSessions) return; if (typeof subject === 'function' || ty...
var strict = require('./modes/strict'); var OBJECT_REGEX = /\[object (\w+)\]/; /** * Gets the BSON or JS type of a value. * * @param {Any} value - Value to check. * @return {String} * @api private */ module.exports.type = function type(value) { if (value && value._bsontype) { return value._bsontype; } ...
const express = require('express'); const router = express.Router(); const userDao = require('../dao/userDao'); const userCtrl = require('../controller/userCtrl'); /* GET users listing. */ router.get('/', userCtrl.queryUsers); router.get('/addUser', (req, res, next) => { res.render('addUser', { title: '添加用户' }); }...
import os import sys import cv2 import yaml import logging import argparse import os.path as osp import torch import numpy as np sys.path[0] = os.getcwd() from utils.log import logger from utils.meter import Timer import data.video as videodataset from utils import visualize as vis from utils.io imp...
# -*- coding: utf-8 -*- """ This serialiser will output an RDF Graph as a JSON-LD formatted document. See: http://json-ld.org/ Example usage:: >>> from rdflib import Graph >>> testrdf = ''' ... @prefix dc: <http://purl.org/dc/terms/> . ... <http://example.org/about> ... dc:title "Someone'...
/** * First we will load all of this project's JavaScript dependencies which * includes Vue and other libraries. It is a great starting point when * building robust, powerful web applications using Vue and Laravel. */ require('./bootstrap'); window.Vue = require('vue'); /** * The following block of code may be ...
import flask import cv2 from tensorflow.keras.applications.mobilenet_v2 import preprocess_input from tensorflow.keras.preprocessing.image import img_to_array from tensorflow.keras.models import load_model from imutils.video import VideoStream import numpy as np import argparse import imutils import time import cv2 impo...
""" Definition of optical spectrum analyser interfacing commands. """ import time import numpy as np from mqlab.connections import Instrument class OpticalSpectrumAnalyser(Instrument): pass class YokogawaAQ6376(OpticalSpectrumAnalyser): def __init__(self, **kwargs): """ Instantiate Y...
@interface SFAAsyncMultiChunkFileUploader : SFAAsyncUploaderBase - (instancetype)initWithSFAClient:(SFAClient *)client uploadSpecificationRequest:(SFAUploadSpecificationRequest *)uploadSpecificationRequest filePath:(NSString *)filePath fileUploaderConfig:(SFAFileUploaderConfig *)config andExpirationDays:(int)expiratio...
from queue import PriorityQueue import networkx as nx import random import numpy as np import matplotlib.mlab as mlab import matplotlib.pyplot as plt import math import time import sys class Event(object): def __init__(self, state, time, srcNode, targetNode): self.state = state self.time = time ...
/* SPDX-License-Identifier: GPL-2.0-or-later */ /* Signature verification * * Copyright (C) 2014 Red Hat, Inc. All Rights Reserved. * Written by David Howells (dhowells@redhat.com) */ #ifndef _LINUX_VERIFICATION_H #define _LINUX_VERIFICATION_H #include <linux/key.h> /* * Indicate that both builtin trusted keys ...
'use strict' const React = require('react-native'); const { StyleSheet } = React; module.exports = StyleSheet.create({{ container: { flex: 1, flexDirection: 'row', justifyContent: 'center', alignItems: 'center', backgroundColor: '#515154', }, map: { position: 'absolute', top: 0, l...
from math import ceil, floor import re import math from typing import Sequence from .models import PegInput # Input Defaults DEFAULT_PAM = "NGG" DEFAULT_PBS_RANGE = {"start": 8, "stop": 18} # Constants CUT_TO_PAM_LENGTH = 3 SPACER_END_TO_CUT = 3 GUIDE_LENGTH = 20 GUIDE_TEST_LENGTH = GUIDE_LENGTH - 4 TOO_FAR_FROM_CUT ...
import { Tabs } from '../../tabs'; import { mount, later, triggerDrag, mockScrollTop } from '../../../test'; function createWrapper(options = {}) { return mount({ template: ` <van-tabs :color="color" :type="type" :sticky="sticky" :line-width="lineWidth" :lazy-render=...
#!/bin/python3 import math import os import random import re import sys #GREATE EXPLANATION IN A MORE SOFISTICATED WAY TO RESOLVE THE KANGAROO FUNCTION: # ->Product (x2-x1)*(v2-v1) would be >0 when one kangaroo starts ahead of another kangaroo and with greater velocity then another kangaroo. In that case another kang...
import json from elasticsearch import Elasticsearch from tube.etl.outputs.es.timestamp import ( putting_timestamp, get_latest_utc_transaction_time, ) from tube.etl.outputs.es.versioning import Versioning from tube.etl.plugins import post_process_plugins, add_auth_resource_path_mapping from tube.etl.spark_base...
import unittest, time, sys, random sys.path.extend(['.','..','../..','py']) import h2o, h2o_cmd, h2o_glm, h2o_browse as h2b, h2o_import as h2i class Basic(unittest.TestCase): def tearDown(self): h2o.check_sandbox_for_errors() @classmethod def setUpClass(cls): # assume we're at 0xdata with ...
(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)},l,l.ex...
class Solution(object): def longestValidParentheses(self, s): l, r = 0, 0 ans = 0 n = len(s) for i in range(n): if s[i] == "(": l += 1 if s[i] == ")": r += 1 if l == r: ans = max(ans, r + l) elif r > l: l...
// license:BSD-3-Clause // copyright-holders:K.Wilkins /*************************************************************************** namcos2.h Common functions & declarations for the Namco System 2 driver ***************************************************************************/ #include "machine/namco_c139.h"...
/* Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.lang['eu']={"editor":"Testu Aberastuko Editorea","editorPanel":"Rich Text Editor panel","common":{"editorHelp":"ALT 0 sakatu laguntza jasotzeko","browseServer":"Z...
var mongoose = require('mongoose'); var Schema = mongoose.Schema; var passportLocalMongoose = require('passport-local-mongoose'); mongoose.set('useCreateIndex', true) var UserSchema = new Schema(); UserSchema.plugin(passportLocalMongoose, { usernameField : 'email'}, { versionKey: true }); module.exports = mongoose.mo...
//==- llvm/CodeGen/MachineMemOperand.h - MachineMemOperand class -*- C++ -*-==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
import sys import unittest from mock import Mock from sure import expect from social.utils import sanitize_redirect, user_is_authenticated, \ user_is_active, slugify, build_absolute_uri, \ partial_pipeline_data PY3 = sys.version_info[0] == 3 class SanitizeRedirect...
/* SPDX-License-Identifier: Apache-2.0 */ /* * Copyright (C) 2015-2021 Micron Technology, Inc. All rights reserved. */ #include <hse_ut/framework.h> #include <hse_util/hse_err.h> #include <hse_util/inttypes.h> #include <hse_util/logging.h> #include <hse_util/keycmp.h> #include <hse/limits.h> #include <cn/omf.h> ...
import { GET_ITEMS, GET_ITEM, DELETE_ITEM } from "../actions/types"; const initialState = { items: [], item: {}, }; export default function (state = initialState, action) { switch (action.type) { case GET_ITEMS: return { ...state, items: action.payload, }; case GET_ITEM: ...
import logging import os # import pathlib import platform import unittest # from encrypted_config.path_tools import normalize_path from encrypted_config.json_io import json_to_file import numba import numpy as np import timing from transpyle.general import Language, AutoTranspiler from transpyle.general import Binde...
import requests from selenium import webdriver from bs4 import BeautifulSoup import smtplib import time headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:77.0) Gecko/20100101 Firefox/77.0'} url = '' target_price = '' def check_price(): options = webdriver.ChromeOptions() options.add_a...
import sys import re label_text_map = { 'Material': ['SnO 2', 'Graphene', 'graphite oxide', 'graphite', 'SnCl4*5H2O', 'water', 'solution','precipitate', 'RGO', 'SnO2NC@N-RGO', 'mixture', 'suspension', 'SnO2 nanocrystals/graphene oxide', 'hydrazine monohydrate', 'graphene oxide', 'product', 'byproducts', 'SnO2 nanocr...
from conf.settings import * DEBUG = False TEMPLATE_DEBUG = False ALLOWED_HOSTS = [ '*' ]
(function() { 'use strict'; angular .module('ng-countryflags', []); })();
#!/usr/bin/python # -*- coding: utf-8 -*- # Author: violinsolo # Created on 28/09/2018 FILTER_TOKENS = { ' ': '', '\n': '', '\t': '', '\r': '', '󾠮': '', '🏻': '', '🏼': '', '𓆟': '', } def filter_string(target: str, to_removed_tokens: list=None) -> str: """ element-wise doin...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. __all__ = ['synchronized', 'lazy_classproperty', 'lazy_property', 'classproperty', 'conditional', 'lazy'] from functools import wraps from inspect import getsourcefile from json import JSONEncoder class laz...
import pygame from genetic.population import Population # This is the main genetic handler. class Genetic: def __init__(self, screen, size): # Display attributes self.screen = screen self.size = size self.font = pygame.font.Font('ressources/font/DroidSansMono.ttf', 20) se...
// This file is part of the Eccoin project // Copyright (c) 2015-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. #ifndef _BITCOIN_PREVECTOR_H_ #define _BITCOIN_PREVECTOR_H_ #include <stdint.h> #...
(function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('lodash-es'), require('chart.js')) : typeof define === 'function' && define.amd ? define('ng2-charts', ['exports', '@angular/core', 'rxjs', 'lodash-es'...
"use strict"; // taken from TodoMVC function uuid() { var i, random; var result = ''; for (i = 0; i < 32; i++) { random = Math.random() * 16 | 0; if (i === 8 || i === 12 || i === 16 || i === 20) { result += '-'; } result += (i === 12 ? 4 : (i === 16 ? (random & 3 ...
# ----------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # ----------------------------------------------------------------------------- ""...
from magi.projects.drq_v2.configs import default def get_config(): config = default.get_base_config() default.override_medium(config) config.domain_name = "acrobot" config.task_name = "swingup" return config
'use strict'; var dbm; var type; var seed; var fs = require('fs'); var path = require('path'); var Promise; /** * We receive the dbmigrate dependency from dbmigrate initially. * This enables us to not have to rely on NODE_PATH. */ exports.setup = function(options, seedLink) { dbm = options.dbmigrate; type =...
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved. /** * Node which outputs a texture object itself, instead of sampling the texture first. * This is used with material functions to provide a preview value for a texture function input. */ #pragma once #include "Materials/MaterialExpressionTextureBase.h" ...
import argparse import pickle import sys import os sys.path.insert(0, os.path.join( os.path.dirname(os.path.realpath(__file__)), "../../")) import deep_audio_features.combine.feature_extraction def predict(ifile, modification): """ Predicts and prints the predicted class for the input file. Parameter...