text
stringlengths
1
1.05M
// Copyright (c) 2015-2016, ETH Zurich, <NAME>, Zurich Eye // 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 // noti...
/* * 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 ma...
/** * Zen */ // environment var env = process.env.NODE_ENV || 'development'; /** * Log error using console.error. */ function logerror(err){ if (env !== 'test') console.error("Error:",err.stack || err.toString()); } /** * Default error handler */ var errorHandler = function error(/*args,*/ /*err*/) { var err=(...
#!/bin/bash set -e # Add the path of habitat to PATH PATH=$PATH:/opt/sd/bin # Install kmod if ! [ -e /bin/kmod ]; then hab pkg install core/kmod hab pkg binlink core/kmod kmod ln -sf kmod /bin/lsmod ln -sf kmod /bin/modprobe fi # Install iptables which is needed for dockerd if ! [ -e /bin/iptables ]; then ...
<filename>src/main/java/com/modesteam/urutau/model/Epic.java package com.modesteam.urutau.model; import javax.persistence.Entity; @Entity public class Epic extends Requirement { private String content; public String getContent() { return content; } public void setContent(String content) { this.content = con...
public TimeSpan GetServerPageTimeLimit(ClassInstance classInstance) { try { JCObject val = (JCObject)classInstance.Get("ServerPageTimeLimit"); return new TimeSpan(val); } catch (JCNativeException jcne) { throw translateException(jcne); } }
python transformers/examples/language-modeling/run_language_modeling.py --model_name_or_path train-outputs/1024+0+512-N/model --tokenizer_name model-configs/1536-config --eval_data_file ../data/wikitext-103-raw/wiki.valid.raw --output_dir eval-outputs/1024+0+512-N/512+512+512-shuffled-N-1 --do_eval --per_device_eval_ba...
public class DelegateManager { public void ExecuteAction(ActionCall action) { action(); } public void ExecuteAction<T1>(ActionCall<T1> action, T1 arg1) { action(arg1); } public void ExecuteAction<T1, T2>(ActionCall<T1, T2> action, T1 arg1, T2 arg2) { action(arg1...
#!/bin/ksh #remove result files cat values.txt | awk '{print $2}' | xargs -t -I{} sh -c 'rm -fr work/{}/*/*/*.nwk' cat values.txt | awk '{print $2}' | xargs -t -I{} sh -c 'rm -fr work/{}/*/*/*.r8s' cat values.txt | awk '{print $2}' | xargs -t -I{} sh -c 'rm -fr work/{}/*/*/*.cfg'
import React from 'react' class DateComponent extends React.Component { render() { const today = new Date(); const month = today.toLocaleString('default', { month: 'long' }); const day = today.getDate(); const year = today.getFullYear(); return <span>{`${month} ${day}, ${year}`}</span> } }
<filename>app/src/main/java/test/singleton/TestOfSingleton3.java package test.singleton; /** * @Class: TestOfSingleton3 * @Description: java类作用描述 * @Author: hubohua * @CreateDate: 2018/8/28 */ /** * 单例模式-懒汉模式2 * 我们使用synchronized关键字对getInstance方法进行同步。 * 但是缺点就是效率太低,是同步运行的,下个线程想要取得对象, * 就必须要等上一个线程释放,才可以继续执行。 *...
package com.dongql.mybatis.tenant.enums; import com.dongql.mybatis.tenant.enums.base.BaseEntityEnum; public enum VipLevel implements BaseEntityEnum { NORMAL(1, "普通"), GOLD(2, "黄金"), DIAMOND(3, "钻石"); private int code; private String description; VipLevel(int code, String description) { ...
# Turn on "strict mode." See http://redsymbol.net/articles/unofficial-bash-strict-mode/. # -e: exit if any command unexpectedly fails. # -u: exit if we have a variable typo. # -o pipefail: don't ignore errors in the non-last command in a pipeline set -euo pipefail function hide_output { # This function hides the outp...
def levenshtein_distance(str1, str2): m = len(str1) n = len(str2) dp = [[0 for x in range(n+1)] for x in range(m+1)] for i in range(m + 1): for j in range(n + 1): if i == 0: dp[i][j] = j elif j == 0: dp[i][j] = i ...
<filename>test/index.test.ts import request from 'supertest' import mongoose from 'mongoose' import app from '../src/app' const api = request(app) const initialUsers = [ { username: 'MrKrrot', password: <PASSWORD>', name: '<NAME>', }, { username: 'Oddy', ...
<filename>client/components/Default.js import React from 'react'; import styled from 'styled-components'; const Default = () => { return ( <> <DefaultDiv> <div className="container"> <div className="row"> <div className="col">One of three columns</div> <div classNa...
import React from 'react'; import Container from '@material-ui/core/Container'; function TemplateFooterBar(){ return( <div style={{backgroundColor: "#eee", padding: 10, textAlign: 'center'}}> <Container> <small style={{fontFamily: 'arial'}}>Fans - Copyright @ 2019 - `R</small> </Container> </...
#!/bin/bash cd ~ echo "stopping hsd and hscli" pkill hsd pkill hscli sleep 3 GENESIS_FILE_URL='https://github.91chifun.workers.dev/https://github.com//orientwalt/htdf/releases/download/v2.0.1/genesis.json.tar.gz' HSD_RELEASE='https://github.91chifun.workers.dev/https://github.com//orientwalt/htdf/releases/download/v...
class Word attr_accessor(:word, :id, :definitions) @@dictionary = [] define_method (:initialize) do |attributes| @word = attributes.fetch(:word) @id = @@dictionary.length+1 @definitions = [] end define_singleton_method (:all) do @@dictionary end define_method(:save) do @@dictionary....
import {expect} from 'chai'; import {spec} from '../../../modules/projectLimeLightBidAdapter.js'; describe('ProjectLimeLightAdapter', function () { const bid1 = { bidId: '2dd581a2b6281d', bidder: 'project-limelight', bidderRequestId: '145e1d6a7837c9', params: { host: 'ads.project-limelight.com'...
#! @runtimeShell@ # shellcheck shell=bash if [ -x "@runtimeShell@" ]; then export SHELL="@runtimeShell@"; fi; set -e set -o pipefail shopt -s inherit_errexit export PATH=@path@:$PATH showSyntax() { exec man nixos-rebuild exit 1 } # Parse the command line. origArgs=("$@") copyClosureFlags=() extraBuildFlag...
# -------------------------------------------------------------------------------------- # Certificate Authority (CA) # https://superuser.com/questions/738612/openssl-ca-keyusage-extension # Creating our root PRIVATE Key openssl genrsa -out saevon.root.key 4096 # Add this if you want to encrypt the key as well (wi...
#pragma GCC optimize("O3") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx") #define __USE_MINGW_ANSI_STDIO 0 #include <bits/stdc++.h> #define TASK "zak" #define pb push_back #define fi first #define se second #define sz(a) (int)(a.size()) using namespace std; #ifdef LOCAL #define eprintf(...) fprintf(s...
import React from 'react'; import {connect} from 'react-redux' import {addTodo, fetchingCurrentUser} from '../BucketListActions' class BucketListForm extends React.Component{ state = { description: '', completed: false, } componentDidMount(){ this.props.fetchingCurrentUser(); }...
import nltk from nltk.sentiment.vader import SentimentIntensityAnalyzer def sentimentClassifcation(tweet): # Create a SentimentIntensityAnalyzer object sid = SentimentIntensityAnalyzer() # Get the sentiment scores scores = sid.polarity_scores(tweet) # Get the compound score compound = scores['c...
<gh_stars>0 /** * @athenna/ioc * * (c) <NAME> <<EMAIL>> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ export class StringHelper { constructor() {} }
token = '<KEY>' import lyricsgenius genius = lyricsgenius.Genius(token) muzik = input("Şarkı sözü ara:") song = genius.search_song(muzik) print(song.lyrics)
import tweepy import config import csv class IDPrinter(tweepy.StreamingClient): def on_tweet(self, tweet): tweet_text = tweet.text tweet_text = tweet_text.replace(",", " ") if tweet.referenced_tweets == None: # result = str(tweet.referenced_tweets).find("retweeted") ...
#!/bin/sh ## input: # $1 - harness file path r_lparen='\(' r_rparen='\)' r_ws_opt='\s*' r_c_comment='\/\/' r_py_comment='#' r_sq="\\'" r_dq="\\\"" r_q="[${r_sq}${r_dq}]" r_qname="${r_ws_opt}${r_q}${r_lparen}.*${r_rparen}${r_q}${r_ws_opt}" r_destination_pattern="^${r_ws_opt}destination(${r_qname})" r_source_pattern...
from unittest.mock import MagicMock def simulate_auth_flow(): mock_prompt_toolkit = MagicMock() responses = {} # Simulate user interaction responses["continue"] = input("Continue? (True/False): ").lower() == "true" responses["method"] = input("Method? (oauth/api_key): ") responses["bundled"] =...
// calculate area of triangle func TriangleArea(base float64, height float64) float64 { return 0.5 * base * height } func main() { base := 4.5 height := 3.0 area := TriangleArea(base, height) fmt.Println("Area of the triangle is", area) }
#include <memory> #include <vector> #include "DocumentRetriever.h" class CommitAndWaitDocumentRetriever : public DocumentRetriever { private: std::unique_ptr<DocumentRetriever> _retriever; public: CommitAndWaitDocumentRetriever(std::unique_ptr<DocumentRetriever> retriever) : _retriever(std::move(retri...
echo '================================' echo 'Installing XP' echo '' # Variables profile_file=~/.profile xp_directory=$(PWD) xp_script=$xp_directory/src/xp.py xp_autocomplete_script=$xp_directory/src/autocompletion_xp.sh echo ' ' >> $profile_file echo '# XP: Script for Component Management ' >> $profile_file echo '...
const { Book } = require('../models'); const bookData = [ { title: "Flowers for Algernon", description: "Oscar-winning film <NAME>arring <NAME> and <NAME>-a mentally challenged man receives an operation that turns him into a genius...and introduces him to heartache.", image_link: "http://bo...
<reponame>zhunrong/myServer<gh_stars>0 import { getRepository } from 'typeorm'; import UserPicture from '../entity/entity.userPicture'; export function getPictures() { const repository = getRepository(UserPicture); return repository.find(); } interface ISave { uid: string; directory: string; filename: strin...
/* Jameleon - An automation testing tool.. Copyright (C) 2003-2007 <NAME> (<EMAIL>) This library 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 Licens...
public class ReverseString { public static String reverseString(String str) { StringBuilder sb = new StringBuilder(); for (int i = str.length() - 1; i >= 0; i--) { sb.append(str.charAt(i)); } return sb.toString(); } }
module.exports = { env: { browser: true, es2021: true, node: true, }, extends: [ 'eslint:recommended', 'plugin:@typescript-eslint/recommended', ], parser: '@typescript-eslint/parser', parserOptions: { ecmaVersion: 'latest', sourceType: 'module', }, plugins: [ '@typescript-eslint', 'svelte3', ...
<gh_stars>0 package org.apache.tapestry5.ioc.internal; public interface ToStringService { @Override String toString(); }
#!/bin/bash set -e export RISCV=$1 export MARCH=$2 export MABI=$3 export ITER=$4 export PYTHON=$5 export OFFSET=$6 export BASEDIR=$7 export AAPG=$8 export CONFIG=$9 ELF2COE=$BASEDIR/soft/py/elf2coe.py ELF2DAT=$BASEDIR/soft/py/elf2dat.py ELF2MIF=$BASEDIR/soft/py/elf2mif.py ELF2HEX=$BASEDIR/soft/py/elf2hex.py if [ ! -...
# Copyright (c) 2020 Qualcomm Innovation Center, Inc. All Rights Reserved. # SPDX-License-Identifier: BSD-3-Clause-Clear # weston.sh: script to start weston display server cp weston.sh /data # TFLite posenet model cp posenet_mobilenet_v1_075_481_641_quant.tflite /data/misc/camera
#!/bin/bash # Copyright 2017 The Openstack-Helm 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 require...
#! /bin/sh -e distDir=/data/webserver/dist/tarballs find "$1" -name "*.nix" | while read fn; do grep -E '^ *url = ' "$fn" | while read line; do if url=$(echo "$line" | sed 's^url = \(.*\);^\1^'); then if ! echo "$url" | grep -q -E "www.cs.uu.nl|nixos.org|.stratego-language.org|java.sun.com|...
sed -r 's/ +/,/g' results_abs_atk_def_sensor.txt > abs_atk_def_sensor.txt sed -r 's/ +/,/g' results_abs_atk_no_def_sensor.txt > abs_atk_no_def_sensor.txt sed -r 's/ +/,/g' results_atk_def_sensor.txt > atk_def_sensor.txt sed -r 's/ +/,/g' results_no_atk_sensor.txt > no_atk_sensor.txt sed -r 's/ +/,/g' results_no_def_sen...
import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; const routes: Routes = []; import { QuoteDetailComponent } from './quote-detail/quote-detail.component'; @NgModule({ declarations: [ AppComponent, QuoteComponent, QuoteDetailComponent ], imports: [ ...
json.extract! vertex, :id, :created_at, :updated_at json.url vertex_url(vertex, format: :json)
#!/bin/sh profile=${1:-default} cd $(dirname $0) # Move to test directory if [ ! $SCRIPTS_DIR ]; then # assume we're running standalone export SCRIPTS_DIR=../../scripts/ fi . $SCRIPTS_DIR/setenv.sh # Warning: tests args are now set in profiles $SCRIPTS_DIR/run_c_files.sh $profile prio-preempt
package ru.job4j.analysis; import org.junit.Test; import static org.junit.Assert.assertThat; import static org.hamcrest.Matchers.is; import java.util.ArrayList; import java.util.List; /** * AnalysisTest. * @author <NAME> (<EMAIL>) * @version $Id$ * @since 0.1 */ public class AnalysisTest { List<Analysis.Use...
<filename>src/network_flow/Boj1298.java<gh_stars>1-10 package network_flow; import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Arrays; import java.util.StringTokenizer; /** * * @author minchoba * 백준 1298번: 노트북의 주인을 찾아서 * * @see https://www.acmicpc.net/p...
#!/bin/bash set -o nounset set -o errexit set -o pipefail # List of exclude tests from conformance/serial suite if [ "${TEST_TYPE}" == "conformance-serial" ]; then cat > "${SHARED_DIR}/excluded_tests" << EOF "[sig-imageregistry][Serial][Suite:openshift/registry/serial] Image signature workflow can push a signed ...
#!/bin/bash -xe # 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 # distrib...
/* © 2017 Goalify * @author Thanh */ import { Meteor } from 'meteor/meteor'; import { ReduceStore } from 'flux/utils'; import { Songs, AppStates, Rooms, Messages } from '../collections'; import AppDispatcher from './AppDispatcher'; import * as AppActions from './AppActions'; if (Meteor.isClient) { Meteor.subscribe...
/* Copyright (c) 2015-2016 Skyward Experimental Rocketry * Authors: <NAME>, <NAME> * * 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...
import sys option = 0 if len(sys.argv) > 1 and sys.argv[1] == "new" else 1 out_file = sys.argv[1] if len(sys.argv) == 2 else "performance.txt" TEST_SIZE = 5
#!/bin/bash # # Copyright IBM Corp. All Rights Reserved. # # SPDX-License-Identifier: Apache-2.0 # jq --version > /dev/null 2>&1 if [ $? -ne 0 ]; then echo "Please Install 'jq' https://stedolan.github.io/jq/ to execute this script" echo exit 1 fi starttime=$(date +%s) # Print the usage message function printHelp ...
#!/bin/bash source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh" trap os::test::junit::reconcile_output EXIT # Cleanup cluster resources created by this test ( set +e oc delete all,templates,secrets,pods,jobs --all oc delete image v1-image oc delete group patch-group oc delete project test-project-adm...
#!/usr/bin/env bash installType='yum -y install' removeType='yum -y remove' upgrade="yum -y update" echoType='echo -e' cp=`which cp` # 打印 echoColor(){ case $1 in # 红色 "red") ${echoType} "\033[31m$2 \033[0m" ;; # 天蓝色 "skyBlue") ${echoType} "\033[36m$2 \...
<reponame>vvydier/misk-web<gh_stars>10-100 import * as React from "react" import { Row } from "../Table" export const Rows = (props: { data: any; range: number[] }) => { const { data, range } = props return ( <tbody> {data.slice(...range).map((row: any, index: number) => ( <Row key={`row${index}`...
package container_runtime import ( "github.com/docker/docker/api/types" "github.com/flant/werf/pkg/image" ) type BuildOptions struct { IntrospectBeforeError bool IntrospectAfterError bool } type ImageInterface interface { Name() string SetName(name string) Pull() error Untag() error // TODO: build specif...
package simulation import ( "math/rand" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/cosmos/cosmos-sdk/x/simulation" "github.com/tendermint/farming/app/params" "github....
public class WhileLoopExample { public static void main(String[] args) { int i = 0; while (i <= 10) { System.out.print(i + " "); i++; } } }
#!/bin/sh prog=svcasc2Abcd_test.m depends="svcasc2Abcd_test.m test_common.m butter2pq.m pq2svcasc.m \ pq2blockKWopt.m KW.m optKW2.m optKW.m svcasc2Abcd.m Abcd2tf.m" tmp=/tmp/$$ here=`pwd` if [ $? -ne 0 ]; then echo "Failed pwd"; exit 1; fi fail() { echo FAILED ${0#$here"/"} $prog 1>&2 cd $here ...
#!/bin/bash Green_font_prefix="\033[32m" && Red_font_prefix="\033[31m" && Green_background_prefix="\033[42;37m" && Red_background_prefix="\033[41;37m" && Font_color_suffix="\033[0m" Info="${Green_font_prefix}[Installed]${Font_color_suffix}" Error="${Red_font_prefix}[Not Installed]${Font_color_suffix}" cek=$(netstat -nt...
//============================================================================== // WIT // // Based On: //============================================================================== // Constrained Materials Management and Production Planning Tool // // (C) Copyright IBM Corp. 1993, 2020 All Rights Reserved //======...
package org.insightcentre.nlp.saffron.topic.topicsim; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class TermSimilarityApplication { /** * The entry point of application. * * @param args the i...
package com.school.domain.entities; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; @Getter @NoArgsConstructor @AllArgsConstructor public class Student { private String name; private Integer id; private String address; }
#!/bin/bash # # Takes a list of tweet-IDs # - Extracts the tweets using https://github.com/docnow/twarc # - Extract image-URLs from the tweets # - Downloads the images # - Generates a collage using the images with links back to the tweets # # The format of the tweet-ID-file is a list of tweetIDs (numbers), one per li...
#!/bin/bash #Version 3 #Hecho por José Arizaga #Formato e indentaciones por José Arizaga #Este script despliega los logs de intentos de sesion (exitosos o fallidos) let opc=10 while [ $opc != 0 ] do clear echo "Menu de Logs" echo "1- Ver historico de usuarios logeados" echo "2- Ver intentos de log fallidos...
#!/bin/bash echo "Restoring node..." cp etc/moximo/scripts/moximo-setup.sh /etc/moximo/scripts/. systemctl stop kube-apiserver.service kube-controller-manager.service kube-proxy.service kube-scheduler.service kubelet.service systemctl disable kube-apiserver.service kube-controller-manager.service kube-proxy.serv...
var _cl_layer_support_tests_8cpp = [ [ "BOOST_FIXTURE_TEST_CASE", "_cl_layer_support_tests_8cpp.xhtml#ac71500cd7f2194b59ae1173c90d292d8", null ], [ "BOOST_FIXTURE_TEST_CASE", "_cl_layer_support_tests_8cpp.xhtml#aaa616ce0e224c6321469548c54561030", null ], [ "BOOST_FIXTURE_TEST_CASE", "_cl_layer_support_tests...
from setuptools import Extension from setuptools.command.build_ext import build_ext as build_ext_orig from distutils.file_util import copy_file class CMakeExtension(Extension): def __init__(self, name, sources=None, build_directory='', build_options=None): """ Initialize the CMakeExtension. ...
<reponame>payhawk/travelperk-integration<filename>src/store/PgStore.ts import * as fs from 'fs'; import * as moment from 'moment'; import { Pool } from 'pg'; import { ILogger } from '@utils'; import { SCHEMA } from './Config'; import { IInvoicesSyncHistoryItemRecord, INewUserTokenSetRecord, ISchemaStore, IUserTokenS...
!#/bin/bash mkdir -v -p dist/web-${BUILD_ENV} godot -v --export "HTML5" dist/web-${BUILD_ENV}/index.html
package de.ids_mannheim.korap.user; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import lombok.Getter; import lombok.Setter; @Getter @Setter public class KorAPUser extends User { private static Logger jlog = LogManager.getLogger(KorAPUser.class); private static final lo...
const adder = (initial = 0) => ({ value: initial, steps: [initial], add(value) { this.steps.push(value); this.value += value; return this; } }); const Adder = class { constructor(initial = 0) { this.value = initial; this.steps = [initial]; return thi...
import os import subprocess import time from itertools import chain, repeat from mock import patch import pytest from pytest import raises from pytest_server_fixtures.xvfb import XvfbServer def test_construct(xvfb_server): assert xvfb_server.display def test_connect_client(): with XvfbServer() as ser...
<gh_stars>1-10 import {Overlay, OverlayRef} from '@angular/cdk/overlay'; import {ComponentPortal} from '@angular/cdk/portal'; import {Injectable} from '@angular/core'; import {SpinnerOverlayComponent} from '../spinner-overlay/spinner-overlay.component'; @Injectable({ providedIn: 'root', }) export class SpinnerOverla...
/* * Tencent is pleased to support the open source community by making Blueking Container Service available. * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. * Licensed under the MIT License (the "License"); you may not use this file except * in compliance with the License. You may obta...
<filename>src/db/get_images_by_tag.sql SELECT Id, Origin, Filter FROM Image_Tag LEFT JOIN Image ON Image = Id WHERE Tag = :tag;
def parseStr(input_str): # Convert the input string to lowercase to make it case-insensitive input_str = input_str.lower() # Initialize an empty dictionary to store the character counts char_count = {} # Iterate through each character in the input string for char in input_str: ...
const formatDate = () => { const date = new Date(); const year = date.getFullYear(); let month = date.getMonth() + 1; let dt = date.getDate(); if (month < 10) month = '0' + month; if (dt < 10) dt = '0' + dt; return year + '-' + month + '-' + dt; }; // Example: formatDate(); // 2020-09-09
<gh_stars>10-100 package chylex.hee.world.end.gen; import java.util.EnumSet; import java.util.Random; import net.minecraft.init.Blocks; import chylex.hee.system.util.MathUtil; import chylex.hee.world.end.EndTerritory; import chylex.hee.world.end.TerritoryGenerator; import chylex.hee.world.feature.noise.GenerateIslandNo...
template<int SZ> struct BCC { int N; vpi adj[SZ], ed; vi disc, low, par, art; vector<vector<int>> bcc; stack<int> stk; void addEdge(int u, int v) { adj[u].pb({v,sz(ed)}), adj[v].pb({u,sz(ed)}); ed.pb({u,v}); } void dfs(int u, int p, int &time) { disc[...
#!/bin/bash echo "Running go generate..." go generate echo "Running go fmt..." gofmt -s -w ./.. echo "Running unit tests..." go test ./... || exit echo "Building application..." go build -ldflags="-s -w" || exit GREEN='\033[1;32m' RED='\033[0;31m' NC='\033[0m' if ./hashit --not-a-real-option > /dev/null ; then ...
#!/bin/bash nmap -sn 192.168.1.0/24 raspberrypi=$(arp -n | grep -w -i 'b8:27:eb:ab:aa:26' | awk 'NR == 1' | awk '{print $1}') #arp -n | grep -w -i 'b8:27:eb:ab:aa:26' | awk '{print $1}') fpga=$(arp -n | grep -w -i '00:00:F3:BE:EF:02' | awk '{print $1}') projector=$(arp -n | grep -w -i 'cc:4b:73:b5:4b:da' | awk '{prin...
#!/bin/bash set -o xtrace set -o errexit APACHE=$(command -v apache2 || command -v /usr/lib/apache2/mpm-prefork/apache2) || true if [ -n "$APACHE" ]; then APACHE_CONFIG=apache24ubuntu161404.conf else APACHE=$(command -v httpd) || true if [ -z "$APACHE" ]; then echo "Could not find apache2 binary" ...
#!/bin/bash # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. set -ex set -o pipefail if [[ $GROUP != nonode ]]; then python -c "from jupyterlab.commands import build_check; build_check()" fi if [[ $GROUP == python ]]; then # Run the python tests py.te...
#!/bin/bash if [[ -z "$RESET_PIN" ]]; then echo "No RESET_PIN environment variable set, skipping the pin reset. If you experience problem with starting the concentrator please set this variable to your manufacturer reset pin" else echo "Resetting the pin" ./reset_lgw.sh stop $RESET_PIN ./reset_lgw.sh s...
// Type definitions for lib/Detector/Detector.js // Project: [LIBRARY_URL_HERE] // Definitions by: [YOUR_NAME_HERE] <[YOUR_URL_HERE]> // Definitions: https://github.com/borisyankov/DefinitelyTyped declare namespace Detector{ // Detector.getWebGLErrorMessage.!ret /** * */ interface GetWebGLErrorMessageRet { ...
package malte0811.controlengineering.blockentity.bus; import blusunrize.immersiveengineering.api.TargetingInfo; import blusunrize.immersiveengineering.api.wires.ConnectionPoint; import blusunrize.immersiveengineering.api.wires.LocalWireNetwork; import blusunrize.immersiveengineering.api.wires.WireType; import blusunri...
#!/bin/sh #SBATCH --time=4:00:00 #SBATCH --nodes=1 #SBATCH --ntasks=1 #SBATCH --ntasks-per-node=1 #SBATCH --cpus-per-task=24 #SBATCH --exclusive #SBATCH --partition=haswell #SBATCH --mem-per-cpu=2500M #SBATCH --comment="cpufreqchown" #SBATCH -J "lulesh_sacct" #SBATCH -A p_readex #SBATCH --reservation=READEX #SBATCH --o...
<filename>ui/src/app/lib/atlasmap-data-mapper/components/line-machine.component.spec.ts<gh_stars>1-10 /* tslint:disable:no-unused-variable */ import { ChangeDetectorRef } from '@angular/core'; import { TestBed, async, inject } from '@angular/core/testing'; import { LineMachineComponent } from './line-machine.component...
var util = require('../../utils/utils.js'); const db = wx.cloud.database() const _ = db.command; Page({ data: { qian: '签到', userTang: 0, }, qiandao: function(){ if(this.data.qian == '签到'){ var newTang = this.data.userTang + 1 //调用云函数,修改糖果数量,向云函数传值 wx.cloud.callFunction({ nam...
export function getFlash() { return window.flash ; }
<reponame>DjangoCrypto/django-crypto-extensions import datetime from django.test import TestCase from django_crypto_extensions.django_fields import ( CryptoTextField, ) from django_crypto_extensions.tests.models import ( CryptoTextModel, CryptoTextModelPassword, CryptoAllFieldModel, CryptoTextModel...
<filename>src/components/blog-preview/index.js<gh_stars>1-10 import React from 'react'; import AniLink from 'gatsby-plugin-transition-link/AniLink'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faClock, faShare } from '@fortawesome/free-solid-svg-icons'; import { toast } from 'react-toasti...
<reponame>belo355/omnistack11 const request = require('supertest'); const app = require('../../src/app'); const connection = require('../../src/database/connection'); describe('ONG', () => { beforeEach(async () => { await connection.migrate.rollback(); await connection.migrate.latest(); });...
<gh_stars>10-100 #include <bits/stdc++.h> using namespace std; int fact(int n) { if (n < 2) return 1; else return n * fact(n - 1); } int pascalTriangle(int n, int r) { return fact(n) / (fact(r) * fact(n - r)); } int main() { int no_of_rows; cin >> no_of_rows; for (int row = 0;...
def add_from_n_to_m(n, m): """This function takes two numbers, `n` and `m`, and returns the results of adding all the numbers from `n` to `m`.""" total = 0 for i in range(n, m+1): total += i return total n = 2 m = 5 print(add_from_n_to_m(n, m))
#!/bin/bash # This script needs to be run after cmake on BG/Q systems to filter out # unwanted X11 dependencies that CMake places in the link line. # Filter the engine link line so it will not include X11 libraries. CMake is adding # them even though we don't want them. Also get rid of extra static/dynamic # link ke...