text
stringlengths
1
1.05M
#!/bin/bash python test_wiki_facts.py
var _tensor_test_8cpp = [ [ "BOOST_AUTO_TEST_CASE", "_tensor_test_8cpp.xhtml#aa08fb9adf6eaf05fd4a3698880c1c292", null ], [ "BOOST_AUTO_TEST_CASE", "_tensor_test_8cpp.xhtml#a67f451b173e1cea17e907085cb967184", null ], [ "BOOST_AUTO_TEST_CASE", "_tensor_test_8cpp.xhtml#a60cf24873ff60e391417efc873e9c55e", null ...
package com.freud.db.derby; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import org.springframework.web.bind.annotation.RequestParam; public class Test { public static void main(@RequestParam("AA") String[] args) throws Exception { Class.forName("org.apache.derby.jdbc.Cli...
// Backend code const express = require('express'); const bodyParser = require('body-parser'); const MongoClient = require('mongodb').MongoClient; const server = express(); const port = 8000; // Parse requests with JSON server.use(bodyParser.json()); // Connect to MongoDB const mongoURL = 'mongodb://localhost:27017...
<reponame>jinjuan-li/iot-suite-server package com.tuya.iot.suite.web.Interceptor; import com.alibaba.fastjson.JSON; import com.tuya.iot.suite.core.constant.ErrorCode; import com.tuya.iot.suite.core.constant.Response; import com.tuya.iot.suite.core.model.UserToken; import com.tuya.iot.suite.core.util.ContextUtil; impor...
<reponame>SynthSys/BioDare2-BACK /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package ed.biodare2.backend.security.dao.db; import ed.biodare2.Fixtures; import ed.biodare2....
<filename>src/main/java/com/stylefeng/guns/modular/manage/service/IDispatchingService.java<gh_stars>0 package com.stylefeng.guns.modular.manage.service; import com.stylefeng.guns.modular.manage.transfer.DispDto; /** * 配送管理Service * * @author nxj * @Date 2018-01-30 09:04:41 */ public interface IDispatchingService...
<reponame>Zhangoufei/NotePractice<gh_stars>100-1000 // 雪花特效 (function () { var style = document.createElement("style"); style.innerText = "body .snow{position: fixed;color: #fff;line-height: 1;text-shadow: 0 0 .2em #ffffff;z-index: 2;}"; document.getElementsByTagName("head")[0].appendChild(style); var...
/* Author: <NAME> */ import React, { Component } from 'react'; import { Platform, StyleSheet, Text, View, AsyncStorage, TouchableHighlight, Image, } from 'react-native'; import { Actions } from 'react-native-router-flux' import {queryAll, deleteSurvey, queryAllSubscribers, deleteSubscriber} from '../data...
import random def generate_random_nums(n,min_val,max_val): output = [] for i in range(n): output.append(random.randint(min_val,max_val)) return output if __name__ == '__main__': n = 10 min_val = 1 max_val = 100 print(generate_random_nums(n,min_val,max_val))
import React from 'react'; import SEO from '../components/SEO'; import Header from "../partials/header/Header"; import WelCome from '../container/Welcome/Welcome'; import Footer from '../container/Footer/Footer'; import ScrollToTop from '../components/ScrollToTop.jsx'; const Welcome = () => { return ( <React.Fra...
import scipy.signal as signal from concurrent.futures import ProcessPoolExecutor import torch import torch.nn as nn import numpy as np import torch.nn.functional as F from torch.distributions import Categorical import cy_heuristics as cy_heu import sched INPUT_SIZE = 10 N_WORKERS = 8 executor = ProcessPoolExecutor(ma...
#!/bin/sh # Remove golangci-lint DOT_DIR="${HOME}/wsl-dotfiles" CACHE_DIR="${HOME}/.cache" . "${DOT_DIR}/etc/lib/sh/has.sh" if has "golangci-lint"; then echo "Remove golangci-lint ..." rm -f "${CACHE_DIR}/mygo/bin/golangci-lint" else echo "golangci-lint is already removed" fi
package io.github.cottonmc.epicurean.block; import net.fabricmc.fabric.api.block.FabricBlockSettings; import net.fabricmc.fabric.api.container.ContainerProviderRegistry; import net.fabricmc.fabric.api.tools.FabricToolTags; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.b...
#!/bin/sh # This is a generated file; do not edit or check into version control. export "FLUTTER_ROOT=/Users/albertm/Development/SDK/flutter" export "FLUTTER_APPLICATION_PATH=/Users/albertm/Development/Projects/flutter_course/dicee-flutter" export "FLUTTER_TARGET=lib/main.dart" export "FLUTTER_BUILD_DIR=build" export "...
<reponame>yenbekbay/anvilabs-scripts const {hasAnyDep} = require('anvilabs-scripts-core/utils'); module.exports = { presets: [ [ 'env', { targets: { node: '8.8.0', }, }, ], ], plugins: [ hasAnyDep(['lodash', 'ramda']) ? ['lodash', {id: ['lodash', 'ram...
#!/bin/bash # Function to list all available chaincodes listChaincodes() { # Add code to list all available chaincodes echo "Available chaincodes: chaincode1, chaincode2, chaincode3" } # Verify the specified chaincode verifyChaincode() { chaincode=$1 version=$2 channel=$3 cli=$4 peer=$5 # Add code to...
from flask import Flask import requests app = Flask(__name__) @app.route('/currency/<string:iso_code>', methods=['GET']) def get_currency(iso_code): url = 'http://data.fixer.io/api/latest?access_key={key}&base={base}' currency_data = requests.get(url.format(key='yourkey', base=iso_code)).json() return currency_dat...
package com.acmvit.acm_app.pref; import android.annotation.SuppressLint; import android.content.Context; import android.content.SharedPreferences; import android.util.Log; import androidx.annotation.MainThread; import androidx.annotation.NonNull; import androidx.lifecycle.LiveData; import androidx.lifecycle.MutableLiv...
# Copy Node Exporter to Pods kubectl cp prometheus/node_exporter-0.17.0-rc.0.linux-amd64/ flume-0:/ kubectl cp prometheus/node_exporter-0.17.0-rc.0.linux-amd64/ kafka-0:/ kubectl cp prometheus/node_exporter-0.17.0-rc.0.linux-amd64/ zk-0:/ kubectl cp prometheus/node_exporter-0.17.0-rc.0.linux-amd64/ monitor-server-0:/ ...
#ifndef STRF_DETAIL_SINGLE_BYTE_CHARSETS_HPP #define STRF_DETAIL_SINGLE_BYTE_CHARSETS_HPP // Copyright (C) (See commit logs on github.com/robhz786/strf) // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #incl...
/* icmp.c * * Copyright 2019 AOL Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this Software 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...
#!/bin/bash rm -fr re-encoded/ text/ #mkdir re-encoded/ text/ ./reenc.bash ./extract.py ./fixes.bash
import * as types from './mutation_types' export default { }
package de.unibi.agbi.biodwh2.ndfrt; import de.unibi.agbi.biodwh2.core.DataSource; import de.unibi.agbi.biodwh2.core.etl.GraphExporter; import de.unibi.agbi.biodwh2.core.etl.Parser; import de.unibi.agbi.biodwh2.core.etl.RDFExporter; import de.unibi.agbi.biodwh2.core.etl.Updater; import de.unibi.agbi.biodwh2.ndfrt.etl....
<gh_stars>0 package com.ylesb.test; /** * @title: testRocketMQSendMessageTest * @projectName springcloud-alibaba * @description: TODO * @author White * @site : [www.ylesb.com] * @date 2022/1/1314:24 */ import org.apache.rocketmq.client.producer.DefaultMQProducer; import org.apache.rocketmq.client.producer.SendR...
<gh_stars>0 from connectfour.agents.monte_carlo import Node from connectfour.board import Board class TestNode: board = Board() def test_add_child(self): node = Node(self.board) child_state = self.board # TODO really should be a different board state move = 3 nod...
// Static // Acessar métodos ou atributos sem instanciar // Exemplo 1 // Em funções 'use strict'; function Person() {} Person.walk = function() { console.log('walking...'); } console.log(Person.walk()); // walking... // Em classes 'use strict'; class Perso...
macro_rules! error { ($typ:ty) => { impl ::std::error::Error for $typ { } }; } macro_rules! from { ($src:ty, $target:ty) => { impl From<$src> for $target { fn from(err: $src) -> Self { // Convert the source error to the target error type /...
#!/bin/sh cd ${GIT_EXPORT_DIR}/recipe-based/frontend/ # Update webservice endpoint reported in urls for result, images, etc. sed -ir "s/(ENDPOINT *= *\").*/\1${WEBSERVICE_ENDPOINT}\"/" config.py exec "$@"
<filename>src/net/abi/abisEngine/math/vector/Vector3i.java /******************************************************************************* * Copyright 2020 <NAME> | ABI INC. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You ...
// import alias from 'rollup-plugin-alias' // import commonjs from 'rollup-plugin-commonjs' import resolve from 'rollup-plugin-node-resolve' import vue from 'rollup-plugin-vue' const isProduction = !process.env.ROLLUP_WATCH export default { external: ['vue'], output: { globals: {vue: 'Vue'} }, plugins: [ ...
import { Injectable } from '@angular/core'; import { HttpClient, HttpParams } from '@angular/common/http'; import { LoginUser } from './login-user.model'; import { ConfigService } from '../config/config.service'; import { Usuario } from './usuario.model'; import { SessionService } from '../session/session.service'; imp...
<filename>Source Codes/Android App Interface/js/plot.js //////////////////////////////////////////////////////////////////////////////////////////////////////// ////// created by <NAME>, <EMAIL>, http://mathmed.blox.pl 100% opensource ////// ////////////////////////////////////////////////////////////////////////////...
package org.joeffice.desktop; /** Localizable strings for {@link org.joeffice.desktop}. */ @javax.annotation.Generated(value="org.netbeans.modules.openide.util.NbBundleProcessor") class Bundle { /** * @return <i>Appearance</i> * @see AppearanceOptionsPanelController */ static String AdvancedOptio...
<gh_stars>100-1000 // // CBZVectorSplashView.h // Telly // // Created by <NAME> on 8/7/14. // Copyright (c) 2014 Telly, Inc. All rights reserved. // #import "CBZSplashView.h" /** * VectorSplash uses a UIBezierPath to carve a mask in the middle that expands while revealing the content behind it. */ @interface C...
<gh_stars>0 const TextModel = require('../model/Text'); const conection = require('../helper/conection'); class CreateTextService{ async execute(texto){ const textModel = new TextModel(texto); await conection('texto').insert(textModel); return textModel; } } ...
<filename>tests/cmd_app_touch/touch/src/ux/parse/Reader.js Ext.define('Ext.ux.parse.Reader', { extend: 'Ext.data.reader.Json', alias: 'reader.parse', getResponseData: function(response) { if(response instanceof Parse.Relation) { return null; } if (response instanceof Parse.Collect...
<gh_stars>0 #include "ObjectPrueba.h" #ifndef STACK_H #define STACK_H #define stack(T) \ typedef struct Stack_##T##Private Stack_##T##Private; \ \ typedef struct stack_##T \ { \ Object object; \ private(Stack_##T); \ void (*Push)(T *); \ T *(*Pop)(void); \ ...
package com.uber.nullaway; import org.junit.Test; public class NullAwayBytecodeInteractionsTests extends NullAwayTestsBase { @Test public void typeUseJarReturn() { defaultCompilationHelper .addSourceLines( "Test.java", "package com.uber;", "import com.uber.lib.*;", ...
python transformers/examples/language-modeling/run_language_modeling.py --model_name_or_path train-outputs/512+0+512-rare/13-model --tokenizer_name model-configs/1024-config --eval_data_file ../data/wikitext-103-raw/wiki.valid.raw --output_dir eval-outputs/512+0+512-rare/13-512+0+512-N-VB-IP-first-256 --do_eval --per_d...
#!/usr/bin/env bash set -xe ENV_FILE="${1}"; shift # path to environment yaml or lock file NEW_ENV="${1}"; shift # true or false indicating whether env update should occur # Capture last optional arg or set a ENV_NAME. This can be changed but be # careful... setting the path for both the dockerfile and runtime contai...
#!/bin/sh wget http://www.saxonica.com/download/SaxonPE9-4-0-4J.zip unzip SaxonPE9-4-0-4J.zip mv saxon9pe.jar lib/ rm saxon*.jar rm SaxonPE9-4-0-4J.zip wget http://jdbc.postgresql.org/download/postgresql-9.1-902.jdbc4.jar mv postgresql-9.1-902.jdbc4.jar lib/postgresql-9.1-902.jdbc4.jar
import numpy as np def add(x, y): # adds two matrices x and y return np.add(x, y) def subtract(x, y): # subtracts two matrices x and y return np.subtract(x, y) def multiply(x, y): # multiplies two matrices x and y return np.matmul(x, y) def transpose(x): # transpose a matrix x return...
/* global chrome */ chrome.runtime.onInstalled.addListener((details) => { if (details.reason === 'install') { chrome.runtime.openOptionsPage() } })
<gh_stars>100-1000 import checkThreshold, { checkPercentage, checkValue, isPercentage, percentToNumber } from './threshold'; describe('@modus/gimbal-core/utils/threshold', (): void => { describe('checkPercentage', (): void => { describe('lower mode', (): void => { it('should succeed', (): void => { ...
#!/bin/bash # v1.0.0 #------------------------------------------------------------------------------ # print the specs for the create-full-7z-package functionality #------------------------------------------------------------------------------ doSpecCreateFull7zPackage(){ doLog "INFO ::: START ::: create-full-7z-pa...
package nsq import ( "context" "log" "os" "os/signal" "sync" "syscall" "time" "github.com/nsqio/go-nsq" ) // Consumer instance type Consumer struct { listenAddress []string prefix string handlers []ConsumerHandler nsqConsumers []*nsq.Consumer stopTimeout time.Duration } // ConsumerConfig c...
#!/bin/bash # # test case 6.1 # # xfer funds between lite accounts # ids, amount and server IP:Port needed # # set cli command and see if it exists # export cli=../cmd/cli/cli if [ ! -f $cli ]; then echo "cli command not found in ../cmd/cli, attempting to build" ./build_cli.sh if [ ! -f $cli ];...
#!/bin/sh # G O U R C E . S H # BRL-CAD # # Published in 2021 by the United States Government. # This work is in the public domain. # # ### # Note - for current gource git log formatting, see: # # gource --log-command git STARTDATE=2019-11-01 STARTSHA1=$(git rev-list -n1 --before="$STARTDATE" ma...
window.onload = () => { // Creating helper function to set multiple attributes function setAttribute(elmName,attribute){ for(let key in attribute){ elmName.setAttribute('elmName','attribute[key]'); } } var html = document.getElementsByTagName('html'); html.style.innerText = `font-si...
#!/bin/bash # Project: Game Server Managers - LinuxGSM # Author: Daniel Gibbs # License: MIT License, Copyright (c) 2020 Daniel Gibbs # Purpose: Travis CI Tests: Minecraft | Linux Game Server Management Script # Contributors: https://linuxgsm.com/contrib # Documentation: https://docs.linuxgsm.com # Website: https://lin...
#!/bin/sh # # Copyright (c) 2007, Cameron Rich # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, # this list of cond...
package com.pickth.comepennyrenewal.net.service; import okhttp3.ResponseBody; import retrofit2.Call; import retrofit2.http.DELETE; import retrofit2.http.Field; import retrofit2.http.FormUrlEncoded; import retrofit2.http.GET; import retrofit2.http.POST; import retrofit2.http.PUT; import retrofit2.http.Path; import retr...
# |source| this file to enable metrics in the current shell echoSafecoinMetricsConfig() { declare metrics_config_sh metrics_config_sh="$(dirname "${BASH_SOURCE[0]}")"/lib/config.sh if [[ ! -f "$metrics_config_sh" ]]; then echo "Run start.sh first" >&2 return 1 fi ( # shellcheck source=/dev/null ...
// app.js const express = require('express'); const path = require('path'); const cors = require('cors'); const helmet = require('helmet'); const bodyParser = require('body-parser'); const logger = require('morgan'); function normalizePort(val) { const port = parseInt(val, 10); if (Number.isNaN(port)) { return val...
from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class UserPermissionManager: class Scope: READ = 'read' WRITE = 'write' def __init__(self): self.permissions = set() def add_scope(self, scope): self.permissions.add(scope) def remove_scope(sel...
<reponame>vicsmr/customers-and-orders<filename>product-backend/src/main/java/io/eventuate/examples/tram/sagas/ordersandcustomers/products/domain/Product.java package io.eventuate.examples.tram.sagas.ordersandcustomers.products.domain; import javax.persistence.*; import java.util.Collections; import java.util.Map; @En...
//##################################################################### // Copyright 2009, <NAME>, <NAME> // This file is part of PhysBAM whose distribution is governed by the license contained in the accompanying file PHYSBAM_COPYRIGHT.txt. //##################################################################### // Cla...
import numpy as np from math import comb import pickle as pkl from tqdm import tqdm def give_possible_options(combs, num_arrivals, num_services, arrivals, services, combnum, curr_comb, pkl_name_inter_depart): if services == 1: curr_comb = np.append(curr_comb, arrivals) with open(pkl_name_inter_...
# #----------------------------------------------------------------------- # # This file defines a function that creates a model configuration file # in the specified run directory. # #----------------------------------------------------------------------- # function create_model_configure_file() { # #-----------------...
<reponame>ceumicrodata/respect-trade-similarity import glob import pandas as pd file_list = glob.glob('../temp/index/data/*') #Select those which contain the import data file_list = [db for db in file_list if "IMP" in db] df = pd.concat([pd.read_csv(f).drop('Unnamed: 0',axis=1).rename(columns=lambda x: x.split('_'...
// Swift Package.swift import PackageDescription let package = Package( name: "FluentDarkModeKit", platforms: [.iOS(.v11)], products: [ .library(name: "FluentDarkModeKit", targets: ["DarkModeCore", "FluentDarkModeKit"]), ], targets: [ .target(name: "DarkModeCore", cSettings: [.defi...
from sklearn.cluster import DBSCAN import numpy as np import firebase_admin from firebase_admin import credentials from firebase_admin import firestore # Use the application default credentials cred = credentials.ApplicationDefault() firebase_admin.initialize_app(cred, { 'projectId': "covid-cluster", }) store = fir...
import dbAPI from '../api/dataBroker.js' import moment from 'moment' import { create } from 'apisauce' import { storeData } from '../redis/waterworks/usage.js' const timeTables = [ // //Today // { // from: moment().startOf('d').format('YYYY-MM-DD').format('YYYY-MM-DD'), // to: moment().endOf('d').format('YYYY-MM...
<gh_stars>10-100 /** * @file : sysparam.h * @brief : Physical parameters of the system header file, in C++11/14, * @details : as a struct, have total energy E, total magnetization M, temperature of entire system T (in energy units) * * @author : <NAME> <<EMAIL>> * @date : 20171229 * @ref : <NAME>...
<reponame>seratch/junithelper package org.junithelper.core.util; import org.junithelper.core.exception.JUnitHelperCoreException; public final class Assertion { private String name; private Assertion(String name) { if (name == null || name.length() == 0) { throw new JUnitHelperC...
/*\ title: $:/plugins/sq/streams/filters/get-stream-nodes.js type: application/javascript module-type: filteroperator \*/ (function(){ /*jslint node: true, browser: true */ /*global $tw: false */ "use strict"; /* Export our filter function */ exports["get-stream-nodes"] = function(source,operator,options) { var res...
<reponame>smagill/opensphere-desktop package io.opensphere.core.util.fx.tabpane; import javafx.beans.InvalidationListener; import javafx.beans.WeakInvalidationListener; import javafx.scene.Node; import javafx.scene.control.Tab; import javafx.scene.layout.StackPane; /** A region for each tab to contain the tab's conte...
<filename>mybatis-plus-generator/src/test/java/com/baomidou/mybatisplus/test/generator/GeneratorTest.java package com.baomidou.mybatisplus.test.generator; import java.util.Scanner; /** * <p> * Generator test * </p> * * @author hubin * @since 2018-01-11 */ public class GeneratorTest { /** * <p> ...
def drop_duplicates(lst): new_list = [] for i in lst: if i not in new_list: new_list.append(i) return new_list
<reponame>onearmbandit/MTAV require('../../scss/website/whathavewedone-page.scss'); (function ($) { })(jQuery);
#!/bin/bash cd sfja yarn && yarn start
//============================================================================ // Copyright 2009-2020 ECMWF. // This software is licensed under the terms of the Apache Licence version 2.0 // which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. // In applying this licence, ECMWF does not waive the privil...
<gh_stars>0 package io.github.cottonmc.component.energy.impl; import io.github.cottonmc.component.UniversalComponents; import io.github.cottonmc.component.energy.CapacitorComponent; import io.github.cottonmc.component.energy.type.EnergyType; import nerdhub.cardinal.components.api.ComponentType; import nerdhub.cardinal...
#/bin/bash cp -r build/html/* ../../ECPy-doc/
#!/bin/bash set -e set -o pipefail # Uncomment for testing purposes: #GITHUB_TOKEN=YOUR_TOKEN_HERE #GITHUB_REPOSITORY=invertase/extensions-release-testing # ------------------- # Functions # ------------------- json_escape () { printf '%s' "$1" | python -c 'import json,sys; print(json.dumps(sys.stdin.read()))...
#!/bin/bash # # vi: expandtab tabstop=4 shiftwidth=0 set -o errexit set -o pipefail if [ "$DEBUG" == "true" ]; then set -ex ;export PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }' fi readlink_mac() { cd `dirname $1` TARGET_FILE=`basename $1` # Iterate down a (possible) chain of symli...
# https://developer.zendesk.com/rest_api/docs/voice-api/phone_numbers#show-phone-number zdesk_channels_voice_phone_number_show () { method=GET url="$(echo "/api/v2/channels/voice/phone_numbers/{id}.json" | sed \ -e "s/{id}"/"$1"/ \ )" shift }
// (C) 2019-2020 GoodData Corporation import { AttributeGranularityResourceAttribute } from "@gooddata/api-client-tiger"; import { DateAttributeGranularity } from "@gooddata/sdk-model"; import { NotSupported } from "@gooddata/sdk-backend-spi"; type TigerToSdk = { [key in AttributeGranularityResourceAttribute]: Dat...
var structCatch_1_1Matchers_1_1Vector_1_1UnorderedEqualsMatcher = [ [ "UnorderedEqualsMatcher", "structCatch_1_1Matchers_1_1Vector_1_1UnorderedEqualsMatcher.html#ab78e6bbbad05472815a695650edc062c", null ], [ "describe", "structCatch_1_1Matchers_1_1Vector_1_1UnorderedEqualsMatcher.html#a33b685a1505a0afe06ded7e0d...
aws appmesh create-virtual-node --cli-input-json file://v2/customer-v2-vn.json
package com.jinjunhang.contract.controller; import android.app.AlertDialog; import android.app.Dialog; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.v4.app.DialogFragment; import android.support.v4.app...
<filename>priest-satellite-manager/src/main/java/com/kinstalk/satellite/service/impl/ReportLastHoursApiServiceImpl.java package com.kinstalk.satellite.service.impl; import com.google.common.collect.Iterables; import com.kinstalk.satellite.dao.ReportLastHoursApiDao; import com.kinstalk.satellite.domain.ReportLastHoursA...
import { IncludeStyles, getRegisteredTypes, getStyleModulesFor, resetIncludeStyles } from './include-styles'; describe('styles', () => { describe('modules', () => { describe('IncludeStyles', () => { afterEach(() => { resetIncludeStyles(); }); describe('.getRegisteredTypes()', (...
#!/bin/bash # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy of # the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distribute...
fn vertical_lifting_base( left: &mut [&mut [i16]], middle: &mut [&mut [i16]], right: &mut [&mut [i16]], step: usize, ) { for i in 0..middle.len() { let middle_len = middle[i].len(); for j in 0..middle_len { let avg = (left[i][j] + right[i][j]) / 2; middle[i][j...
@interface VolumeControl : NSObject - (void)increaseVolume; - (void)decreaseVolume; @end
package org.hammerlab.bam.check.eager import caseapp._ import hammerlab.cli._ import org.hammerlab.args.{ FindReadArgs, LogArgs, PostPartitionArgs } import org.hammerlab.bam.check.indexed.IndexedRecordPositions import org.hammerlab.bam.check.{ Blocks, CallPartition, CheckerApp, eager, seqdoop } object CheckBam exte...
using System; using System.Windows; using System.Windows.Interop; public interface IWindowInteropHelper { IntPtr Handle { get; } bool EnsureHandle(); } public class WindowInteropHelperWrapper : IWindowInteropHelper { private readonly WindowInteropHelper _windowInteropHelper; public WindowInteropHelpe...
#!/bin/bash dashing build Axis
// // EFLaceView.h // EFLaceView // // Created by MacBook Pro ef on 01/08/06. // Copyright 2006 <NAME>. All rights reserved. // Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: // // - Redistributions of source code must r...
#!/bin/bash # # Copyright (C) 2016 The CyanogenMod Project # Copyright (C) 2017 The LineageOS Project # # 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/L...
AUTHOR='@xer0dayz' VULN_NAME='Telerik File Upload Web UI' URI='/Telerik.Web.UI.WebResource.axd?type=rau' METHOD='GET' MATCH="RadAsyncUpload\ handler\ is\ registered\ succesfully" SEVERITY='P2 - HIGH' CURL_OPTS="--user-agent '' -s -L --insecure" SECONDARY_COMMANDS='' GREP_OPTIONS='-i'
/* * Copyright (c) 2018 https://www.reactivedesignpatterns.com/ * * Copyright (c) 2018 https://rdp.reactiveplatform.xyz/ * */ package chapter03; import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; // 代码清单3-8 public class UsingMapFunction { public static void main(String[] args)...
#!/bin/bash set -e ./build.sh bin_file=twemproxy if [[ ! -z "$1" && "$1" == "abtest" ]]; then bin_file=twemproxy-abtest fi output_dir=../twemproxy_bin/bin if [[ -d $output_dir && -w $output_dir ]]; then cp -rvp ./src/nutcracker $output_dir/$bin_file echo "cp bin finished" else echo "$output_dir not e...
import React from 'react'; class WebcamCaptureButton extends React.Component { constructor() { super(); this.onClick = this.onClick.bind(this); } onClick(e) { if (this.props.onClick) { this.props.onClick(e); } } render() { return ( <React.Fragment> <style jsx> ...
<reponame>Changliu52/UnicornTeensyDrone #ifndef LPS331_h #define LPS331_h #include <Arduino.h> // for byte data type // SA0 states #define LPS331_SA0_LOW 0 #define LPS331_SA0_HIGH 1 #define LPS331_SA0_AUTO 2 // register addresses // Note: Some of the register names in the datasheet are inconsistent // between Tabl...
def print_dict_keys_alphabetically(mydict): sorted_keys = sorted(mydict.keys()) for k in sorted_keys: print(k)
import numpy as np from sklearn.linear_model import LinearRegression # Prepare the data x = np.arange(1, 100) y = x * x * x * x * x # Fit the regression model model = LinearRegression() model.fit(x.reshape(-1,1), y) # Predict the function's value x_new = np.array([[105]]) prediction = model.predict(x_new)[0] print...