text
stringlengths
1
1.05M
#!/bin/bash -xp ##!/bin/bash ################### # Script: scan_ports.sh # Autor: rolmedo # Fecha: 01/02/19 # Función: Leer los ficheros donde tenemos todas las ip públicas de nuestros # equipos y clientes para poder una serie de escaneos de puertos # abiertos. Estamos estudiando la mejor manera de escanear pue...
lans=("bn" "de" "es" "en" "fa" "hi" "ko" "nl" "ru" "tr" "zh") for i in "${lans[@]}" do python -u parse_text.py --lan "${i}" &> log/${i}_parse_text.log & done
#!/bin/sh # Copyright (c) 2014-2016 The Eurodollar Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. DIR=$(dirname "$0") [ "/${DIR#/}" != "$DIR" ] && DIR=$(dirname "$(pwd)/$0") echo "Using verify-commits data from $...
cat > kubernetes-csr.json <<EOF { "CN": "kubernetes", "key": { "algo": "rsa", "size": 2048 }, "names": [ { "C": "FI", "L": "Tampere", "O": "Kubernetes", "OU": "Kubernetes The Hard Way", "ST": "Pыrkanmaa" } ] } EOF CTRL_1_IP=$(grep controller_1_private_ip ../../in...
#!/usr/bin/env bash # Copyright 2013 The Go Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. # race.bash tests the standard library under the race detector. # http://golang.org/doc/articles/race_detector.html set -e function usage { ...
(function() { 'use strict'; angular .module('naps') .controller('NapsListController', NapsListController); NapsListController.$inject = ['NapsService', 'Authentication', '$window', '$state']; function NapsListController(NapsService, Authentication, $window, $state) { var vm = ...
async function processJishoData(query: string, page: number): Promise<Array<{ jlpt: Record<string, unknown> }>> { try { const response = await fetchFromJisho(query, page); const json = await getJson(response) as JishoJSON; const extractedData = json.data.map(entry => ({ jlpt: entry.jlpt })); return ex...
from urllib.parse import urlparse def parse_admin_url(url_prefix): parsed_url = urlparse(url_prefix) if parsed_url.netloc: # Absolute URL return f"{parsed_url.scheme}://{parsed_url.netloc}/" else: # Relative URL return url_prefix
//Program to print all the prime numbers less than a given element #include<stdio.h> main() { int i,n,p,sum; printf("Enter a number!\n"); scanf("%d",&p); for(n=2;n<=p;n++) { sum=0; for(i=2;i<=n/2;i++) { if(n%i==0) sum=1; } if(sum==0) printf("%d\t",n); } }
<reponame>pladdy/distill package main import ( "strings" "testing" "github.com/pladdy/lumberjack" ) var rawRecord []string = []string{ "TABLE_DUMP2", "1474983369", "B", "172.16.31.10", "8758", "0.0.0.0/0", "8758 6830", "IGP", "172.16.31.10", "0", "0", "8758:110 8758:300", "NAG", "", } // Helper fun...
// https://www.hackerrank.com/challenges/get-the-value-of-the-node-at-a-specific-position-from-the-tail int GetNode(Node *head,int positionFromTail) { Node *current = head; for(int i = 0; i < positionFromTail; i++) current = current->next; if (current->next == NULL) return head->data; return GetNode(head->next, pos...
def iterative_function(n): result = 1 for i in range(2,n + 1): result = result * i return result
package com.wednesday.service; import java.sql.*; import java.util.Properties; public class CSVHandler { // Part 4 private static final String CSV_JDBC_DRIVER = "org.relique.jdbc.csv.CsvDriver"; private static final String CSV_JDBC_HEADER = "jdbc:relique:csv:"; public static final String DEFAULT_DIRECTORY...
import numpy as np # Create a 3x3 array with all elements equal to 0 array = np.zeros((3,3)) print(array) # Output: # [[0. 0. 0.] # [0. 0. 0.] # [0. 0. 0.]]
""" File: rocket.py ----------------------- This program should implement a console program that draws ASCII art - a rocket. The size of rocket is determined by a constant defined as SIZE at top of the file. Output format should match what is shown in the sample run in the Assignment 2 Handout. """ SIZE =...
#!/bin/bash # Extract the version from lerna.json (this was updated by `npm run release:prepare`) VERSION=$(node --eval "console.log(require('./lerna.json').version);") # commit the changes from `npm run release:prepare` git add --all git commit -am "v$VERSION" --no-verify # increment the package.json version to the...
#!/bin/bash # # Auto update themer version main() { program="themer" script="$program.sh" new_version="$program $(git describe --abbrev=0 --tags)\"" current_version=$(grep -oP "$program\sv.*" "$script") sed -i "s/$current_version/$new_version/" "$script" } main "$@"
from flask import Flask, request app = Flask(__name__) @app.route("/calculate", methods=["POST"]) def calculate(): # Get the request data data = request.get_json() # Get the two numbers from the request data a = data.get("a") b = data.get("b") # Calculate the sum, difference, and product sum = a + b diffe...
/**渲染器接口 */ export default interface Render{ /**渲染器缩写名字 */ abbrName: string; /**创建渲染器的根节点 */ createDom: () => HTMLElement; /**打开渲染器 */ open: () => void; /**关闭渲染器 */ close: () => void; /**获取markdow文本 */ getMd: () => string; /** * 设置markdow文本 * @param md markdown文本 ...
<reponame>cdjq/DFRobot_DS323X<filename>Python/RaspberryPi/examples/read_write_SRAM.py #-*- coding: utf-8 -*- ''' @file get_time_and_temp.py @brief Through the example, you can read and write data on DS3232's SRAM @n Experiment phenomenon: There are 236 bytes of SRAM available for reading and writing @n ...
<filename>python_synth/validators.py from typing import TYPE_CHECKING from python_synth.constants import ANALOGUE_MIN, ANALOGUE_MAX from python_synth.exceptions import SynthValidationError if TYPE_CHECKING: from attr import Attribute # noqa from typing import ANY # noqa def validate_analogue(instance, att...
class Point2D: def __init__(self, x, y): self.x = x self.y = y def get_distance(self, other): dx = self.x - other.x dy = self.y - other.y return (dx ** 2 + dy ** 2) ** 0.5
import connector from './EventInviteDialog.connector' import component from './EventInviteDialog' export default connector(component)
# This function takes three parameter and returns a list # of anomalies it has detected def identify_anomalies(data, mean, stdev): anomalies = [] # Iterate through the list and find anomalies for i in data: z_score = (i - mean)/stdev if np.abs(z_score) > 3: anomalie...
const { describe, it } = require('eslint/lib/testers/event-generator-tester'); const { before, after } = require('mocha'); const expect = require('expect.js'); const sinon = require('sinon'); const request = require('supertest-as-promised'); const httpStatus = require('http-status'); const EventsService = require('../....
package sentry import ( "fmt" "runtime" "testing" "github.com/pkg/errors" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestStackTraceGenerator(t *testing.T) { t.Run("getStacktraceFramesForError()", func(t *testing.T) { t.Run("StackTraceableError", func(t *t...
<reponame>berlioz-the/berlioz const _ = require('the-lodash'); module.exports.getNaming = function({entity, scope}) { return [ scope.gcpProjectNumber, scope.deployment, entity.clusterName, scope.shortSourceRegion, entity.sectorName, entity.name]; } module.exports.ma...
<reponame>ljfa-ag/Adventure-Backport package de.ljfa.advbackport; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.F...
var express = require('express'); var path = require('path'); var favicon = require('static-favicon'); var logger = require('morgan'); var cookieParser = require('cookie-parser'); var bodyParser = require('body-parser'); var session = require('express-session'); var routes = require('./r...
<gh_stars>0 function setDate(day, month, year) { const div = document.getElementById("date"); div.textContent = `${day}/${month}/${year}`; } function get12Rotation(int) { const hour = int > 12 ? int - 12 : int; return (360 / 12) * hour; } function get60Rotation(int) { return (360 / 60) * int; } function se...
import { BinaryTree, BinaryTreeNode } from '../' import { BinaryTree as MBinaryTree } from '../../ts-data-structures' function getInstance<T>(): BinaryTree<T> { return new BinaryTree<T>() } describe('BinaryTree', () => { test('exports', () => { expect(MBinaryTree).toBeDefined() expect(MBinaryTree).toBe(Bi...
<gh_stars>10-100 // TODO: Utilize ES6 features (like for loops) import Vector from './Vector'; import CollisionMesh from './CollisionMesh'; // Utility functions: function minAbs(min, ...vals) { let minAbs = Math.abs(min); for (const val of vals) { let argAbs = Math.abs(val); if (argAbs < minA...
#!/bin/bash #./build <BUILD-STAGE> <LOG-LEVEL> <function Name> <S3 Bucket TO PACKCAGE LAMBDA> if [ "$1" != "Test" ] && [ "$1" != "Prod" ] && [ "$1" != "Dev" ]; then echo "You must set Test or Prod or Dev as arg." exit 1 fi if [ "$2" != "INFO" ] && [ "$2" != "ERROR" ] && [ "$2" != "WARNING" ] && [ "$2" != "DEBUG" ...
<reponame>GreyHatBeard/cli-microsoft365<filename>src/m365/spfx/commands/project/project-upgrade/rules/FN014007_CODE_launch_localWorkbench.ts import * as path from 'path'; import { Finding, Occurrence } from "../"; import { Project } from "../../model"; import { JsonRule } from './JsonRule'; export class FN014007_CODE_...
<reponame>bilaleren/mui-tabs export { default as Tab } from './Tab' export type { TabProps } from './Tab' export { default as Tabs } from './Tabs' export type { TabsProps, TabsActionRefAttributes } from './Tabs'
package com.netcracker.ncstore.service.data.category; import com.netcracker.ncstore.exception.CategoryServiceNotFoundException; import com.netcracker.ncstore.model.Category; import java.util.List; /** * Interface for all business services that work with Category Entity */ public interface ICategoryDataService { ...
<filename>frontend/src/types/ModelTypes.ts // type for JWT token export interface JWTTokenUser { _id: string, email: string; name: string; surname: string; organizationId: string; } // types for basic database models export interface IOrganization { _id: string; name: string; archivedIssues: []; } export int...
<gh_stars>0 export class GetFormInstanceDto { public name: string; public ownerId: string; public constructor(name: string, ownerId: string) { this.name = name; this.ownerId = ownerId; } } export default GetFormInstanceDto;
#!/usr/bin/env bash # # This file contains the user's settings. Modified by user_settings.sh. # set -e cd "$(dirname "${BASH_SOURCE[0]}")"/../../ # to the root of the rpi_installer . rpi_installer/common.sh . "$RPI_INSTALLER_DIR"/utils.sh . "$RPI_INSTALLER_DIR"/host_utils.sh . projects/ble_uart/vars.sh SETTINGS_TEM...
<reponame>equant/piecewise_linear_fit<filename>piecewise/plotter.py<gh_stars>0 # 3p import matplotlib.pyplot as plt # prj from piecewise.regressor import piecewise def plot_data_with_regression(t, v, min_stop_frac=0.03): """ Fits a piecewise (aka "segmented") regression and creates a scatter plot of the data...
try: raise ArithmeticError except Exception: print("Caught ArithmeticError via Exception") try: raise ArithmeticError except ArithmeticError: print("Caught ArithmeticError") try: raise AssertionError except Exception: print("Caught AssertionError via Exception") try: raise AssertionError ...
#!/bin/bash ## MyToDoReact version 1.0. ## ## Copyright (c) 2021 Oracle, Inc. ## Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/ echo create frontend LB... kubectl create -f frontend-helidon/frontend-service.yaml -n mtdrworkshop
<reponame>elarivie/atom-editorconfig module.exports = Symbol('Show-EOL');
import React from 'react' import PropTypes from 'prop-types' // import classNames from "./index.module.css"; export const addClass = (element /* : HTMLElement*/, klass /*: string*/) => (element.className += ` ${klass}`) export const removeClass = (element /*: HTMLElement*/, klass /*: string*/) => (element.classNa...
<reponame>amoAHCP/vxms /* * Copyright [2018] [<NAME>] * * 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 applic...
package com.example.ReplyKafka.config; import java.util.concurrent.Executor; import javax.annotation.PostConstruct; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.spring...
<reponame>in1tiate/OoT3D_Randomizer<gh_stars>100-1000 #ifndef _NABOORU_H_ #define _NABOORU_H_ #include "z3D/z3D.h" void EnNb_rDraw(Actor* thisx, GlobalContext* globalCtx); #endif //_NABOORU_H_
<gh_stars>0 from sqlalchemy import create_engine from sqlalchemy.engine.url import URL from models import DeclarativeBase from scrapers import settings # Performs database connection using database settings from settings.py # Variable type of engine: sqlalchemy engine engine = create_engine(URL(**settings.DAT...
<filename>src/main/java/com/gzwl/demo/handler/ExceptionHandler.java package com.gzwl.demo.handler; import java.util.HashMap; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.shiro.authc.IncorrectCredentialsException; import org.apache....
<reponame>ooooo-youwillsee/leetcode /** * @author ooooo * @date 2020/9/25 13:43 */ #ifndef CPP_0012__SOLUTION1_H_ #define CPP_0012__SOLUTION1_H_ #include <iostream> #include <unordered_map> #include <vector> using namespace std; class Solution { public: string intToRoman(int num) { vector<string> vec; i...
<reponame>bossirreplaceable/Studying_View package com.yobo.studying_view.lsn05_recler; import android.content.Context; import android.support.annotation.Nullable; import android.support.v7.widget.RecyclerView; import android.util.AttributeSet; import android.view.View; import java.util.ArrayList; /** * Created by Y...
<gh_stars>100-1000 #include <stdint.h> #include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <assert.h> #include <openssl/rsa.h> #include <openssl/err.h> #include "inc.h" #include "tcpcrypt_ctl.h" #include "tcpcrypt.h" #include "tcpcryptd.h" #include "crypto.h" #in...
<filename>src/main/java/org/olat/modules/curriculum/ui/member/CurriculumMemberListTableModel.java /** * <a href="http://www.openolat.org"> * OpenOLAT - Online Learning and Training</a><br> * <p> * Licensed under the Apache License, Version 2.0 (the "License"); <br> * you may not use this file except in compliance ...
import subprocess import os import click @click.group() def network(): pass @click.command() def ping(host='127.0.0.1'): response = subprocess.call(['ping', '-c 1', host], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) if response != 0: print('Unreachable') os.exit(1) print('...
import {expectType} from 'tsd'; import {htmlEscape, htmlUnescape} from './index.js'; expectType<string>(htmlEscape('🦄 & 🐐')); expectType<string>(htmlUnescape('🦄 &amp; 🐐')); expectType<string>(htmlEscape('Hello <em>World</em>')); const url = 'https://sindresorhus.com?x="🦄"'; expectType<string>(htmlEscape`<a href=...
<reponame>ch1huizong/learning #! /usr/bin/env python3 # -*-coding:utf-8 -*- # @Time : 2019/06/15 19:04:25 # @Author : che # @Email : <EMAIL> import os class Delete(object): def __init__(self, file): self.file = file def interactive(self): choice = input("Do you really want to delete %s...
<gh_stars>0 _base_ = [ './pipelines/fixmatch_pipeline.py' ] __train_pipeline = {{_base_.train_pipeline}} __train_pipeline_strong = {{_base_.train_pipeline_strong}} __test_pipeline = {{_base_.test_pipeline}} seed = 1234 data = dict( samples_per_gpu=64, workers_per_gpu=4, num_classes=100, train=[ ...
#! /bin/bash source $(dirname "$0")/Environment.sh export CC=clang-8 export CXX=clang++-8 # ============================================================================== # -- Parse arguments ----------------------------------------------------------- # ===============================================================...
import { useEffect, useState } from 'react' import { useHistory } from 'react-router-dom' import Card from '../Card' import gameService from '../../services/gameService' import genreService from '../../services/genreService' import devService from '../../services/devService' import './List.css' const List = () =>...
<reponame>manueme/manueme-blog<filename>src/app/components/shared/include-header/include-header.component.ts import { Component, Input, OnInit } from '@angular/core'; @Component({ selector: 'app-include-header', templateUrl: './include-header.component.html', styleUrls: ['./include-header.component.scss'] }) exp...
/* * Copyright (c) 2017 dmfs GmbH * * 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 t...
<filename>lib/controller/handler.go // Copyright (C) The Arvados Authors. All rights reserved. // // SPDX-License-Identifier: AGPL-3.0 package controller import ( "context" "errors" "fmt" "net/http" "net/url" "strings" "sync" "time" "git.arvados.org/arvados.git/lib/controller/api" "git.arvados.org/arvados....
#!/bin/bash # # Projeto: Smart-Infra é uma coleção de scripts em Shell Script para rodar em # Bash facilitando a implantação de infraestrutura de rede em linux. # Hospedado: https://github.com/sandrodias-sysadmin/smart-infra # Autor: Sandro Dias # E-mail: sandrodias.oficiall@gmail.com # # Caminho Absoluto: /smart...
a=$' test0 test1' echo "$a" >> 1
#!/bin/bash cat - <<FIN # # ▄▀▀▄ ▄▀▀▄ # █ █ █ # ▐ █ █ # █ █ buntu # ▀▄▄▄▄▀ # FIN # Start with new file log cd /vagrant/log rm * >> /vagrant/log/ubuntu.log 2>&1 # Updating packages apt-get update >> /vagrant/log/ubuntu.log 2>&1 sudo apt-get install lsb-core -y >> /vagrant/log/ubuntu.log 2>&1 ...
<gh_stars>0 import java.util.ArrayList; /** * Compressor, like Talker, is a class that helps the user edit their file. * Compressor specifically edits .cmp files. It inherits Processor due to their * many shared fields and methods. Compressor first determines the command and * does the next step accordingly. * ...
declare interface Utils { sheet_to_json: (input: any) => any } //declare class ReactPivot extends React.Component<any, any> {} declare module 'xlsx' { export function read(data: string, read_opts?: any): any; export function readFile(filename: string, read_opts?: any): any; export const utils: Utils; //export = an...
package main import ( "context" "net/http" "os" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" restclient "k8s.io/client-go/rest" v1alpha1 "sigs.k8s.io/mcs-api/pkg/apis/v1alpha1" mcsClientset "sigs.k8s.io/mcs-api/pkg/client/clientset/versioned" "github.com/labstack/echo/v4" "github.com/labstack/echo/v4/middl...
package io.github.ibuildthecloud.gdapi.request.handler; import io.github.ibuildthecloud.gdapi.request.ApiRequest; import java.io.IOException; import javax.servlet.ServletException; public interface ApiRequestHandler { void handle(ApiRequest request) throws IOException; default boolean handleException(ApiR...
import tensorflow as tf # create a constant array with 3 values x = tf.constant([1.0, -2.0, 3.0]) # apply the sigmoid function to the array sigmoid = tf.sigmoid(x) # print the result print(sigmoid.numpy()) # [0.7310586, 0.11920292, 0.95257413]
<reponame>ch1huizong/learning #! /usr/bin/env python3 # -*-coding:UTF-8 -*- # @Time : 2019/01/05 11:31:20 # @Author : che # @Email : <EMAIL> import time class Timer(object): def __init__(self, func=time.perf_counter): self.elapsed = 0.0 self._func = func self._start = None def...
<reponame>TIWG/imce.oti.uml.magicdraw.dynamicscripts /* * Copyright 2016 California Institute of Technology ("Caltech"). * U.S. Government sponsorship acknowledged. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obta...
def handler(event, context): print "==> Function ready to listen events..." util_data = False try: if 'op' in event['data']['payload']: util_data = True except: util_data = False if util_data == True: # CREATE operation print("CREATE operation executed") ...
#!/usr/bin/env bash set -e source .env if [[ -z "${XILUTION_ENVIRONMENT}" ]]; then echo "XILUTION_ENVIRONMENT not found in .env" exit 1 fi if [[ -z "${XILUTION_SUB_ORGANIZATION_ID}" ]]; then echo "XILUTION_SUB_ORGANIZATION_ID not found in .env" exit 1 fi if [[ -z "${XILUTION_WEB_CLIENT_ID}" ]]; then echo...
#!/bin/bash set -e ./configure --prefix=/usr \ --host=$LFS_TGT \ --bindir=/bin make && make DESTDIR=$LFS install
#!/usr/bin/env bash export RUN_NAME=HLTRI_RERANK_RQE_25 export EXP_RUN_NAME=HLTRI_RERANK_RQE_21 export SEARCH_RUN=passage-large export RERANK_RUN_NAME=HLTRI_RERANK_15 export DATASET=expert export COLLECTION=epic_qa_prelim export RGQE_THRESHOLD=0.8 export RQE_THRESHOLD=0.005 export RERANK_MODEL_NAME=rerank-expert-${SE...
#!/bin/sh # # basic map-reduce test # RACE= # uncomment this to run the tests with the Go race detector. #RACE=-race # run the test in a fresh sub-directory. rm -rf mr-tmp mkdir mr-tmp || exit 1 cd mr-tmp || exit 1 rm -f mr-* # make sure software is freshly built. (cd ../../mrapps && go build $RACE -buildmode=plug...
#!/bin/bash #SBATCH -J Act_lrelu030_1 #SBATCH --mail-user=eger@ukp.informatik.tu-darmstadt.de #SBATCH --mail-type=FAIL #SBATCH -e /work/scratch/se55gyhe/log/output.err.%j #SBATCH -o /work/scratch/se55gyhe/log/output.out.%j #SBATCH -n 1 # Number of cores #SBATCH --mem-per-cpu=6000 #SBATCH -t 23:59:00 # Hours, minutes...
<filename>src/utils/index.ts import env from "./env"; import store from "./store"; export { env, store };
<gh_stars>0 'use strict'; /** * A search field with clear and submit buttons * * @memberof HashBrown.Entity.View.Widget */ class Search extends HashBrown.Entity.View.Widget.WidgetBase { /** * Constructor */ constructor(params) { super(params); this.template = require('template/wi...
import { createContext, useState, createElement, useContext } from 'react'; const defContext = { langs: ['en', 'es'], setLang: () => {}, mainLang: 'en', langCode: 'en', strings: {} }; const portrayContext = createContext(defContext); function withPortray(Component, strings, settings) { const PortrayWrapped...
<reponame>AbeeraTariq02787/HU_Carpool export interface LoginResultModel { token: string; error: string; }
package com.vaadin.fusion.parser.core; import java.util.Objects; import javax.annotation.Nonnull; import io.github.classgraph.AnnotationInfo; public final class RelativeAnnotationInfo extends AbstractRelative<AnnotationInfo, Relative<?>> { public RelativeAnnotationInfo(@Nonnull AnnotationInfo origin, ...
<reponame>sajadweb/msm-cli const BlogCtrl = new (class BlogController { async getBlog(req, res) { try { } catch (e) {} } async showBlog(req, res) { try { } catch (e) {} } async insertBlog(req, res) { try { } catch (e) {} } async updateBlog(req, res) { try { } catch (e) {} } async d...
#!/usr/bin/env bash # # Copyright (c) 2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. export LC_ALL=C.UTF-8 cd "build/vircle-$HOST" || (echo "could not enter distdir build/vircle-$HOST"; exit 1) ...
def remove_item(items, target): return [i for i in items if i != target]
require 'spec_helper' describe Rex::RopBuilder do it 'has a version number' do expect(Rex::RopBuilder::VERSION).not_to be nil end end
<gh_stars>1-10 import React, { useRef, useState } from "react" import { graphql } from "gatsby" import Layout from "../components/shared/layout" import CTA from "../components/shared/cta" import { OutboundLink } from "gatsby-plugin-google-analytics" import Check from "../../static/images/utility_check.svg" import Close...
#!/bin/bash nom=$1 [ ${#TRUST_ROOT} = 0 ] && echo "Initialisez l'environnement TRUST." && exit # Cas des fichiers dans $TRUST_ROOT # qui ont File pour reperer leur nom en-tete # et Directory pour reperer le repertoire ou ils sont places # Bien afficher le File ou le Directory a la fin car probleme # si dans le fichier ...
def knapsack(weights, values, capacity): # Create a matrix to store the maximum values at each nth item matrix = [[0 for x in range(capacity+1)] for x in range(len(weights)+1)] # Fill in the matrix for i in range(len(weights)+1): for j in range(capacity+1): # If the capacity is 0 or there are no item...
<gh_stars>0 export const defaultHeaders = { 'Content-Type': 'application/json' };
<gh_stars>0 package com.atjl.office.util; import com.atjl.util.file.FileUtil; import org.junit.*; import org.junit.rules.ExpectedException; public class Html2WordUtilTest { @Test public void testHtmlToWord() throws Exception { String content = FileUtil.cat("E:\\test.html"); Html2WordUtil...
<gh_stars>0 /************************************************************************* ***** ***** ***** 使用教程/readme : ***** ***** https://cloud.tencent.com/document/product/583/32996 ***** ***** ...
<filename>verification/verify.py # -*- coding: utf-8 -*- from concurrent.futures import ProcessPoolExecutor, ThreadPoolExecutor import itertools from multiprocessing import cpu_count import os import shutil from subprocess import Popen, PIPE from typing import Union from urllib.request import urlopen, Request import ...
def to_binary(n) return n.to_s(2) end puts "Enter a number:" number = gets.to_i puts "Equivalent binary number: #{to_binary(number)}"
class BackgroundTaskManager: def __init__(self): self.__task_queue__ = [] def add_task(self, task): # Add the task to the task queue self.__task_queue__.append(task) def get_next_task(self): # Retrieve and remove the next task from the task queue if self.__t...
package bd.edu.daffodilvarsity.classmanager.notification; import android.content.DialogInterface; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.LinearLayout; import android.widget.TextView; import android.widget.Toast; imp...
composer -v > /dev/null 2>&1 COMPOSER_IS_INSTALLED=$? if [[ $COMPOSER_IS_INSTALLED -ne 0 ]]; then curl -sS https://getcomposer.org/installer | php fi php composer.phar install ./app/console --help
#!/bin/bash # Sia host bandwidth price pinning script # # First: set siac path # To use: run script with ./set-bandwidth-price.sh PRICE # sia_path="" if [ -z ${sia_path} ]; then echo "Set your sia path variable, example "/opt/sia"" exit 1 fi if [ "$#" -ne 1 ]; then echo "Missing price argument, run with ...
import React from 'react'; import { Icon } from 'algae-ui'; export default () => ( <div className="icon-list"> <Icon type="alert" /> <Icon type="github" /> <Icon type="gift" /> <Icon type="apple" rotate={180} /> <Icon type="camera" style={{ fill: '#506dfe' }} /> </div> );