text
stringlengths
1
1.05M
#!/usr/bin/env bash ############################################################################### # # # `deploy-source.sh` # # This script will check the local `source` directory for any csv files, # gzip them, and upload them to S3 for use with the build script. # #############################################...
#!/bin/bash set -e export VAULT_ADDR="http://$VAULT_HOSTNAME.$DOMAIN:8200" echo "Using Vault Token: $VAULT_TOKEN" config_dir="/etc/consul.d" mkdir -p "$config_dir/ca" response=$(vault write pki/issue/cert -format=json \ common_name=$HOSTNAME.$DOMAIN \ alt_names="server.dc1.consul") for (( i=0; i<$(echo "$respo...
<?php // configuration $from = 'admin@example.org'; $nameFrom = 'Admin'; $to = 'recipient@example.org'; $subject = 'Email Subject'; $templateDirectory = __DIR__ . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR; $templatePath = $templateDirectory . 'email-template.html'; $message = file_get_contents($template...
#!/bin/sh # # Script for starting/stopping LibreOffice without restarting Alfresco # # Copyright 2013-2016 Loftux AB, Peter Löfgren # Distributed under the Creative Commons Attribution-ShareAlike 3.0 Unported License (CC BY-SA 3.0) # ------- # JDK locations export JAVA_HOME="/usr/lib/jvm/java-8-oracle" exp...
#!/usr/bin/env bash set -euo pipefail IFS=$'\n\t' export BUILDCONFIGURATION=Release cd $BUILD_SOURCESDIRECTORY/build # uncomment the following lines to override the installed Xamarin.Android SDK # wget -nv https://jenkins.mono-project.com/view/Xamarin.Android/job/xamarin-android-d16-2/49/Azure/processDownloadRequest...
<filename>modules/redis/example/deps.ts<gh_stars>10-100 export { Application, Context, Controller, Get, isHttpError, Module, NestFactory, send, Status, } from "../../../mod.ts";
function sha() { # usage: sha FILENAME.js tempShaOutput=$(cat $1 | openssl dgst -sha384 -binary | openssl base64 -A) echo sha384-$tempShaOutput } sha keyboard-focus-trap.js
#!/bin/bash # Licensed to Systerel under one or more contributor license # agreements. See the NOTICE file distributed with this work # for additional information regarding copyright ownership. # Systerel licenses this file to you under the Apache # License, Version 2.0 (the "License"); you may not use this # file exc...
<gh_stars>0 export interface TxOutModel { recipient: string; value: number; }
#!/bin/bash export SCRIPTHOME=`pwd` . ./debian-env.sh function createChangelog() { # Debian tooling changelog hints: # - signature line MUST have one whitespace prefix # - signature line MUST have double space between email and timestamp # - traling lines must have exactly one space export MYTS=`date "+%...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ic_circle_notifications = void 0; var ic_circle_notifications = { "viewBox": "0 0 24 24", "children": [{ "name": "path", "attribs": { "d": "M0 0h24v24H0z", "fill": "none" }, "children": [] }, { ...
var _test_dynamic_backend_8cpp = [ [ "BackendFactory", "_test_dynamic_backend_8cpp.xhtml#a6a075b7c32d5511f95903749eef44b22", null ], [ "GetBackendId", "_test_dynamic_backend_8cpp.xhtml#adaff295134ed2825ae43a8e9281b6f2a", null ], [ "GetVersion", "_test_dynamic_backend_8cpp.xhtml#aa8f09f94b0356f870c9bdb9c594c...
<filename>externals/cmsis/CMSIS_5/docs/Driver/html/group__nand__interface__gr_structARM__NAND__CAPABILITIES.js var group__nand__interface__gr_structARM__NAND__CAPABILITIES = [ [ "event_device_ready", "group__nand__interface__gr.html#a5f347e9b63764bbb657f52dc20682128", null ], [ "reentrant_operation", "group__na...
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
#sidebar { float: left; width: 20%; background-color: #eee; } #sidebar ul { margin: 0; padding: 0; list-style-type: none; } #sidebar li a { display: block; padding: 10px; background-color: #ccc; text-decoration: none; color: #222; } #sidebar li a:hover { background-color: #555; color: #fff;...
package libs.trustconnector.scdp.smartcard.application.bl; import libs.trustconnector.scdp.smartcard.application.*; import libs.trustconnector.scdp.smartcard.*; import libs.trustconnector.scdp.util.*; import libs.trustconnector.scdp.smartcard.SmartCardReader; import libs.trustconnector.scdp.smartcard.application.Appl...
function mysqlexec { mysql -u root -p -e "$1"; } function mysql-create-db { mysqlexec "create database \`$1\` CHARACTER SET utf8;"; } function mysql-drop-db { mysqlexec "drop database if exists \`$1\`;"; } function mysql-clear-db { mysqlexec "drop database if exists \`$1\`; create database \`$1\` CHARACTER SET u...
/*==================================================================*\ | EXIP - Embeddable EXI Processor in C | |--------------------------------------------------------------------| | This work is licensed under BSD 3-Clause License | | The full license terms and condit...
<gh_stars>10-100 var path = require('path'); var fs = require('fs'); var browserify = require('browserify'); var fileName = process.env.npm_package_name + '.js'; var srcDir = './src/js'; var distDir = './dist'; var files = [path.join(srcDir, fileName)]; if (!fs.existsSync(distDir)){ fs.mkdirSync(distDir); } va...
def filter_list(arr1, arr2): return [i for i in arr1 if i not in arr2] arr1 = [1, 2, 3, 4] arr2 = [2, 4, 6] filtered_list = filter_list(arr1, arr2) print(filtered_list)
<gh_stars>1-10 package com.lookfor.iwannatravel.dto; import lombok.Getter; import lombok.Setter; import lombok.ToString; @Getter @Setter @ToString public class CountryDto { private String name; private boolean tourism; private String documents; private boolean quarantine; private int quarantineDay...
#!/bin/sh gst=/usr/share/gnome-shell/gnome-shell-theme.gresource workdir=${HOME}/shell-theme for r in `gresource list $gst`; do r=${r#\/org\/gnome\/shell/} if [ ! -d $workdir/${r%/*} ]; then mkdir -p $workdir/${r%/*} fi done for r in `gresource list $gst`; do gresource extract $gst $r >$workdir/${r#\/or...
#!/bin/bash module load ucsc_tools MACS2_DIR=/gpfs/group/pipkin/hdiao/T_Cell_ChIP/2_MACS2 OUT_DIR=/gpfs/group/pipkin/hdiao/T_Cell_ChIP/2_MACS2_bw bdg_name=$MACS2_DIR/2017_PNAS_Li___H3K27Ac_IL2-UP-deletion-CD4_treat_pileup.bdg bdg_srt_name=$MACS2_DIR/2017_PNAS_Li___H3K27Ac_IL2-UP-deletion-CD4_treat_pileup_srt.bdg bw_...
#!/bin/sh # CYBERWATCH SAS - 2017 # # Security fix for DSA-2626-1 # # Security announcement date: 2013-02-17 00:00:00 UTC # Script generation date: 2017-01-01 21:06:29 UTC # # Operating System: Debian 6 (Squeeze) # Architecture: i386 # # Vulnerable packages fix on version: # - lighttpd:1.4.28-2+squeeze1.2 # # Las...
<reponame>DorinR/Politisense const Action = require('../JobAction').AbstractJobAction class BillLinkFetchAdapterAction extends Action { constructor (params) { super() this.params = params } async perform (links) { console.log(`INFO: Retrieved Bill link: ${links.selected[0]}`) return { url:...
require 'rails_helper' RSpec.feature 'Candidate submits the application with full course choice location', skip: true do include CandidateHelper scenario 'The location that the candidate picked is full but others have vacancies' do given_i_complete_my_application and_the_selected_course_options_is_now_ful...
#!/bin/bash set -x version="${1:-1.20.2}" rg=test-aks-$RANDOM location="${location:-eastus}" WINDOWS_USERNAME="azureuser" ADMIN_PASS="${ADMIN_PASS:-changeMe2234}" clustername="$rg-cluster" az group create --name $rg --location $location az aks create \ --resource-group $rg \ --name $clustername \ --nod...
#!/bin/bash ################################################################################ # Copyright (c) 2021 Vladislav Trifochkin # # Unified build script for Linux distributions # # Changelog: # 2021.05.20 Initial version. # 2021.11.07 Added PROJECT_OPT_PREFIX variable. # 2021.11.08 SOURCE_DIR reco...
#!/usr/bin/env bash set -e CONFIG="install.conf.yaml" CONFIG_WSL="install-wsl.conf.yaml" DOTBOT_DIR="dotbot" DOTBOT_BIN="bin/dotbot" BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" cd "${BASEDIR}" git -C "${DOTBOT_DIR}" submodule sync --quiet --recursive git submodule update --init --recursive "${DOTBOT_DIR...
<gh_stars>1-10 package io.github.rcarlosdasilva.weixin.model.response.media; import com.google.gson.annotations.SerializedName; public class MediaAddTemporaryResponse { private String type; @SerializedName("media_id") private String mediaId; @SerializedName("created_at") private long createdAt; ...
<gh_stars>1-10 import React from 'react'; import {BrowserRouter, Switch, Route, Link} from 'react-router-dom'; import Sobre from './paginas/sobre'; import Contato from './paginas/contato'; function Routes(){ return( <BrowserRouter> <Link to="/contato">Contato</Link><br/> <Link to="...
<filename>src/connection_and_streaming/stream_audio.py from mqtt_client import MqttClient import logging import json import time import pyaudio from threading import Thread CHUNK = 2048 FORMAT = pyaudio.paInt16 CHANNELS = 1 RATE = 44100 MQTT_BROKER = "mqtt.item.ntnu.no" MQTT_PORT = 1883 class StreamAudio(): de...
import { BadRequestException } from "@nestjs/common"; import {registerDecorator, ValidationOptions, ValidationArguments} from "class-validator"; export function MoreThen(property?: string, validationOptions?: ValidationOptions) { return function (object: Object, propertyName: string) { registerDecorator({ ...
/* * Copyright 1999-2018 Alibaba Group Holding Ltd. * * 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...
#!/bin/bash DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" rm -rf temp/data/integration-test-base-node mkdir -p temp/data/integration-test-base-node export TARI_BASE_NODE__NETWORK=localnet export TARI_BASE_NODE__LOCALNET__DATA_DIR=localnet export TARI_BASE_NODE__LOCALNET__DB_TYPE=lmdb export T...
<filename>ts/dist/assets/cwa/lib/AvatarGUI.js //-------- js/AvatarGUI.js -------- // Generated by CoffeeScript 1.12.2 (function () { var AvSpeedController, AvatarGUI, Config, HTMLForAvatarGUI, SigningAvatar, console, cwaenv, document, log, setTimeout, theConfig, theSToCA, bind = function (fn, me) { ...
class Program { static double RandomNumber(int min, int max) { double randomNumber = min - 0.5 + (double) r.Next(max - min + 1); return randomNumber; } public static void Main() { int min = 0; int max = 5; Console.WriteLine(RandomNumber(min, max)); } }
const autocomplete = require('autocomplete'); const app = express(); app.get('/autocomplete', (req, res) => { const word = req.query.word; const result = autocomplete(word); res.status(200).json({ autocomplete: result }); }) if (name === 'main') { app.listen(3000); }
import arbolDistanciaGenetica2 as ae # arbolEspecie import mapa import individuo import planta import random report = open("report.log", "w") #Crear territorio territorios = [] granValle = mapa.Territorio(50,True,0,[]) territorios.append(granValle) #DawkinsEEE maynard = ae.ArbolEspecie() cromosoma0 = { 'fuerza' : ...
#!/bin/bash sudo rm -rf WeexiOSSDK/ sudo rm -rf Benmu-iOS-Library/ #sudo rm -rf Podfile.lock #sudo rm -rf Pods/ git clone https://github.com/bmfe/WeexiOSSDK.git #cd WeexiOSSDK #git checkout 0.18.0 #cd ../ git clone https://github.com/bmfe/Benmu-iOS-Library.git #cd Benmu-iOS-Library #git checkout 1.1.8 pod update e...
#!/bin/bash # ***************************************************************************** # ***************************************************************************** # # testLmsRDomXPathN.bash # # ***************************************************************************** # # @author Jay Wheeler. # @version ...
#!/bin/bash # Copyright 2019 Google LLC. # This script builds DeepVariant binaries and runs DeepVariant for exome. # Main purpose of this script is to evaluate the total runtime of DeepVariant on # different computer (cloud instance) types. # Runtime measurements do not include the time for building binaries and # loca...
#!/bin/bash inspec check .
/** * Copyright © 2014-2021 The SiteWhere Authors * * 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...
#!/bin/sh # pictures directory XDG_PICTURES_DIR="${XDG_PICTURES_DIR:-$HOME/Pictures}" # take a screenshot using gnome-screenshot gnome-screenshot -w -f /tmp/sharexin_img.png # launches ruby script ruby ./Picture.rb # date and time for naming date=$(date +%Y-%m-%d) time=$(date +%T) # copies to permanent location cp...
<filename>arrays/intersection_two_arr.py<gh_stars>0 """ 349. Intersection of Two Arrays https://leetcode.com/problems/intersection-of-two-arrays/ Given two arrays, write a function to compute their intersection. Example: Input: nums1 = [1,2,2,1], nums2 = [2,2] Output: [2] """ # Runtime: 44ms class Solution: de...
export type MTradeClassicTab = 'charts' | 'trade' | 'open-orders';
#!/bin/sh build_dir=build-msvc15 set -e dir="$(dirname -- "$0")" cd "$dir/.." pushd "./$build_dir" >/dev/null cmake --build . --target i18n >/dev/null popd >/dev/null rel="$(git describe --tag --alw)" rm -f "$rel" find . -wholename "?*/lang/stub.ts" | zip -q9 "$build_dir/$rel-i18n-stub.zip" -@
import numpy as np import tensorflow as tf # Input Data X_data = np.array([[ length, number_of_compartments, number_of_axles, passenger_capacity ] for sample in samples]) # Labels Data y_data = np.array([[1 if sample contains a bus else 0] for sample in samples]) # Create model model = tf.keras.models.Sequen...
package co.binapp.android.data; public class AnimationConstants { public static class Transitions { public static final int FROM_RIGHT = 1; public static final int FROM_BOTTOM = 2; } }
#!/bin/bash echo "" echo "Applying migration $className;format="snake"$" echo "Adding routes to conf/app.routes" echo "" >> ../conf/app.routes echo "GET /:srn/new-return/$className;format="decap"$ controllers.$className$Controller.onPageLoad(mode: Mode = NormalMode, srn: String)" >> ../conf/a...
#!/bin/bash # shellcheck source=/usr/local/pengwin-setup.d/common.sh source "$(dirname "$0")/common.sh" "$@" if (confirm --title "ANSIBLE" --yesno "Would you like to download and install Ansible?" 8 55); then echo "Installing ANSIBLE" install_packages ansible else echo "Skipping ANSIBLE" fi
package org.nem.core.connect; import org.apache.http.HttpResponse; import org.apache.http.client.methods.HttpRequestBase; /** * Strategy for coercing an HTTP response into a specific type. * * @param <T> Type of response. */ public interface HttpResponseStrategy<T> { /** * Coerces a result of type T given the...
from . import program from . import formatting
#!/bin/bash echo "Replacing local files with combined jsdelivr." find . -maxdepth 1 -type f -name '*.html' -print0 | while IFS= read -r -d $'\0' line; do sed -n -i '/lib\/jquery.js/!p' $line sed -n -i '/lib\/list.js/!p' $line sed -n -i '/lib\/elasticlunr.js/!p' $line # Lots of messy esca...
import { Injectable, HttpService, HttpException, HttpStatus } from '@nestjs/common' import { map } from 'rxjs/operators' import * as DTO from './banner.interface' @Injectable() export class BannerService { constructor(private readonly httpService: HttpService) {} //代理bing壁纸 async nodeBanner() { try { return a...
<reponame>werdck/imgbrd-grabber<filename>src/gui/src/monitoring-center.cpp #include "monitoring-center.h" #include <QEventLoop> #include <QSettings> #include <QSystemTrayIcon> #include <QTimer> #include "downloader/download-query-group.h" #include "downloader/download-queue.h" #include "downloader/image-downloader.h" #...
package com.androidapp.cachewebviewlib.utils; import java.io.BufferedInputStream; import java.io.InputStream; public class InputStreamUtils { private InputStream mInputStream; private String mEncoding = "UTF-8"; private int mEncodeBuffer = 500; public InputStreamUtils(InputStream inputStream){ ...
package cn.springmvc.model; public class PaymentDetail { private String order_no; private String item_name; private String ORDER_CREATE_TIME; public String getOrder_no() { return order_no; } public void setOrder_no(String order_no) { this.order_no = order_no; } public String getItem_name() { ret...
<filename>test/shared/test_web_cc_sample.rb<gh_stars>1-10 require 'shared/web_cc_sample.rb' require 'test/unit' class TestWebCCSample< Test::Unit::TestCase def setup @unit = WebCCSample.new end def test_data_map @unit = WebCCSample.new expected_map = {:name=>nil, :status => nil, :last_failed => nil...
import React from 'react'; import './styles/style_index.css'; import './styles/modal.css'; import 'bootstrap/dist/css/bootstrap.css'; import 'bootstrap/dist/js/bootstrap.bundle.min.js'; import img1 from '../../assets/images/5.jpg'; import img2 from '../../assets/images/11.jpg'; import img3 from '../../assets/images/14....
let arr = [2, 4, 7, 5]; let max = Math.max(...arr); console.log(max);
#!/bin/bash if [ "$TRAVIS_REPO_SLUG" == "icoretech/audiobox-jlib" ] && [ "$TRAVIS_JDK_VERSION" == "oraclejdk7" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "master" ]; then echo -e "Publishing javadoc...\n" cp -R build/docs/apidocs $HOME/javadoc-latest cd $HOME git config --global use...
#!/bin/sh # vim:sw=2:ts=2:sts=2:et set -eu LC_ALL=C ME=$( basename "$0" ) PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin [ "${NGINX_ENTRYPOINT_WORKER_PROCESSES_AUTOTUNE:-}" ] || exit 0 touch /etc/nginx/nginx.conf 2>/dev/null || { echo >&2 "$ME: error: can not modify /etc/nginx/nginx.conf (read-on...
psiturk -e "server off" exit
#!/usr/bin/env bash set -x set -e function checkenv() { if [ "${BUILDER}" == make ];then make --version fi cmake --version if [ "${BUILDER}" == cmake ] || [ "${LANGUAGE}" != cc ]; then swig -version fi if [ "${BUILDER}" == cmake ] || [ "${LANGUAGE}" == python3 ];then python3.7 --version python3.7 -m ...
#!/bin/bash # 每五分鐘更新一次選手的積分 clear while true; do /usr/bin/python3 -m tracking.query.opgg sleep 300 done
<gh_stars>0 package com.nostalgia.resource; import com.nostalgia.*; import java.awt.image.RenderedImage; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.StringWriter; import java.nio.charset.Charset; import java.security.GeneralSecurityException; import java.security.MessageDigest; imp...
package xyz.zkyq.repository; import org.springframework.data.jpa.repository.JpaRepository; import xyz.zkyq.entity.User; /** * JpaRepository<实体类T, T中被映射为主键的数据类型> * * @author zkyq * @date 1/5/20 */ public interface UserRepository extends JpaRepository<User, Integer> { }
def mergeSort(arr): if len(arr) >1: mid = len(arr)//2 L = arr[:mid] R = arr[mid:] mergeSort(L) # Sorting the first half mergeSort(R) # Sorting the second half i = j = k = 0 # Copy data to temp arrays L[] and R[] while i < len(L) and j < len(R): if L[i] < R[j]: arr[k] = L[i] i+...
package com.mcgrady.xtitlebar.interf; import android.view.View; import com.mcgrady.xtitlebar.TitleBarClickAction; /** * <p>类说明</p> * * @author: mcgrady * @date: 2019/1/25 */ public interface OnTitleBarDoubleClickListener { void onDoubleClick(View view, TitleBarClickAction action); }
import { browser, by, element, promise } from 'protractor'; export class AppPage { navigateToHome(): promise.Promise<any> { return browser.get('http://localhost:9000'); }; getCurrentUrl() { return browser.getCurrentUrl(); } getTitle(): promise.Promise<string> { return brow...
#pragma once #include <flowi_core/image.h> #include <flowi_core/render_commands.h> #include "types.h" struct Atlas; struct FlContext; struct NSVGimage; struct NSVGrasterizer; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// typedef struct ImageP...
<gh_stars>0 from django.db import models # Create your models here. class Employee(models.Model): eno=models.IntegerField() ename=models.CharField(max_length=100) esal=models.FloatField() eaddr=models.CharField(max_length=300)
#ifndef FT_PRINTF_H # define FT_PRINTF_H # include <stdio.h> # include <unistd.h> # include <stdarg.h> //for such as va_start # include <stdlib.h> //for free(), malloc # include <limits.h> // for INT_MAX //# include <stdint.h> # include "libft.h" # define ON 1 # define OFF 0 typedef struct list { char *buffer; s...
#!/bin/bash module load libraries/openmpi-2.0.1-gcc-5.4.0 module load mpi/openmpi-x86_64 echo "Rulare Bandwidth Timing Test" mpirun --mca btl_tcp_if_include eth0 -np 4 ./mpi_bandwidth echo "Rulare Round Trip Latency Timing Test" mpirun --mca btl_tcp_if_include eth0 -np 4 ./mpi_latency echo "Rulare Matrix Multiply" ...
package org.quark.microapidemo.config; /** * 全局配置 */ public class GlobalConfig { public class WebConfig { public static final double REDIS_SUBSCRIBER_EXPIRE_HOUR = 0.50; public static final String PASSWORD_NOSECURITY = "NONE"; public static final String DEFAULT_ROLE = "DEFAULT"; ...
#!/usr/bin/env bash OLD_USER_Name="pi" OLD_PASSWD_Name="raspberry" USER_Name="chell" PASSWD_Name="portal"
package com.cgfy.user.base.bean; import lombok.Data; import lombok.ToString; import java.text.SimpleDateFormat; import java.util.Date; @Data @ToString public class Comment { private String id; private String content; private String noBtnOpinion; private String action; private Integer actionId; private String c...
#!/usr/bin/env python ############################################################################## # # tk.py -or- tk.pyw # # 1. Globally replace "MYAPP" with the symbol name of the new application. # 2. Update "application info" at the top of MYAPP class. # # http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/index.ht...
package dataTypes; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; import java.util.stream.IntStream; public class Matrix extends Vector<DoubleVector> { private final List<Integer> vectorsDimensions; public Matrix() { super(); vectorsDimensions = null;...
// Problem 1. Format with placeholders function solve(args) { String.prototype.format = function (options) { var prop, result = this; for (prop in options) { result = result.replace(new RegExp('#{' + prop + '}', 'g'), options[prop]); } return result; };...
# compute mean total = 0 for num in nums: total += num mean = total/len(nums) # compute median sorted_nums = sorted(nums) if len(sorted_nums) % 2 == 0: median = (sorted_nums[len(nums)//2] + sorted_nums[len(nums)//2 - 1]) / 2 else: median = sorted_nums[len(nums)//2] # compute mode from collections import C...
import React from 'react'; import { useStaticQuery, graphql } from 'gatsby'; import BigList from '../Common/BigList/BigList'; import BigListItem from '../Common/BigList/BigListItem'; const query = graphql` query { work: allProjectYaml(sort: {fields: order}) { nodes { id title type...
def extract_topics(metadata): topics_frequency = {} for data in metadata: topics = data.split("::") for topic in topics[1:]: topic = topic.strip() if topic in topics_frequency: topics_frequency[topic] += 1 else: topics_frequency...
function processCardEffect(status, language) { const cardEffect = { effect: { en: "Your opponent’s Active Pokémon is now Asleep.", fr: "Le Pokémon Actif de votre adversaire est maintenant Endormi.", es: "El Pokémon Activo de tu rival pasa a estar Dormido.", it: "Il Pokémon attivo del tuo a...
<filename>make_palettes.h #ifndef MAKE_PALETTES_H #define MAKE_PALETTES_H void SetupRandom16Palette() { for (int i = 0; i < 16; i++) targetPalette[i] = CHSV(random8(), random8(192,255), random8(128,255)); } // SetupRandom16Palette() void SetupRandom4Palette() { targetPalette = CRGBPalette16(CHSV(random8(), 255...
import logging log = logging.getLogger('deepthought.datasets') # Helper function to generate hdf5 subsets def get_dataset(hdf5name, selectors=None, sources=('features', 'targets', 'subjects')): if selectors is None: selectors = {} # load metadata import deepthought.util.fs_util as fs_util bas...
<reponame>direkshan-digital/light-eventuate-4j package com.networknt.eventuate.common; /** * Base interface for event sourcing events * * <p>Each aggregate typically defines an interface that is the base interface for all of it's event classes. * For example: * * <pre class="code"> * &#064;EventEntity(entity="i...
# download pre-processed dataset (NELA-17 based) # whole-type data (253 MB) wget http://milabfile.snu.ac.kr:16000/detecting-incongruity/data-processed-nela-17.tar.gz tar xzvf data-processed-nela-17.tar.gz rm data-processed-nela-17.tar.gz
<filename>li-apache-kafka-clients/src/test/java/com/linkedin/kafka/clients/consumer/MockLiKafkaConsumer.java /* * Copyright 2019 LinkedIn Corp. Licensed under the BSD 2-Clause License (the "License").
 See License in the project root for license information. */ package com.linkedin.kafka.clients.consumer; import ja...
package tools.claimr.reactnativeclient; import android.location.GnssClock; import android.location.GnssMeasurement; import android.os.Build; import android.os.SystemClock; import androidx.annotation.RequiresApi; public class GnssLoggerUtil { private static final String COMMENT_START = "# "; private static f...
#!/bin/bash # Copyright 2020 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 ...
#!/bin/bash # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. # A copy of the License is located at # # http://aws.amazon.com/apache2.0 # # or in the "license" file ...
class Prot: class STATES: playerWon = "playerWon" enemyWon = "enemyWon" def determineOutcome(state): if state == Prot.STATES.playerWon: return 1 elif state == Prot.STATES.enemyWon: return 0 else: return -1
<reponame>amelvill-umich/libbat<filename>parallel_io/mpi_send_recv.h #pragma once #include <memory> #include <mpi.h> #include "abstract_array.h" #include "borrowed_array.h" #include "owned_array.h" struct ISend { ArrayHandle<uint8_t> data; MPI_Request request = MPI_REQUEST_NULL; int count; MPI_Dataty...
import React from 'react'; import Home from "./views/Home" import Bridges from "./views/Bridges"; import Bridge from "./views/Bridge"; import Map from "./views/Map"; import Schedule from "./views/Schedule"; import { Route, HashRouter as Router} from "react-router-dom"; import './App.scss'; function App() { return ( ...
#!/bin/bash # GNU GPL v3 # 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 3 of the License, or #(at your option) any later version. # # This program is distributed in the hope tha...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
<gh_stars>0 /* * BackoffLock.java * * Created on January 20, 2006, 11:02 PM * * From "Multiprocessor Synchronization and Concurrent Data Structures", * by <NAME> and <NAME>. * Copyright 2006 Elsevier Inc. All rights reserved. */ package tamp.ch07.Spin.spin; /** * Exponential backoff lock * * @author <NAME>...