text
stringlengths
1
1.05M
import React from "react"; import { Label } from "@windmill/react-ui"; const LabelArea = ({ label }) => { return ( <Label className="col-span-4 sm:col-span-2 font-medium text-sm"> {label} </Label> ); }; export default LabelArea;
/* * 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 ...
pkgname=fakeroot pkgver=1.26 fetch() { curl "https://deb.debian.org/debian/pool/main/f/fakeroot/fakeroot_$pkgver.orig.tar.gz" -o $pkgname-$pkgver.tar.xz tar -xf $pkgname-$pkgver.tar.xz patch -p1 < ../../no64.patch patch -p1 < ../../stdint.patch } build() { cd $pkgname-$pkgver ./configure \ --prefix=/usr \ -...
#!/usr/bin/env bash # Copyright 2020 Xiaomi Corporation (Author: Junbo Zhang) # 2021 Pingfeng Luo # Apache 2.0 # Example of how to build L and G FST for K2. Most scripts of this example are copied from Kaldi. set -eou pipefail dataset_path=( /mnt/cfs2/asr/database/AM/aishell /root/fangjun/data/aishell...
<filename>src/js/index.js<gh_stars>0 import { $ } from "./utils/dom.js"; import { LottoApp } from "./lottoApp.js"; new LottoApp($({ selector: "#app" }));
package eu._5gzorro.governancemanager.dto; import java.util.Objects; public class MemberDto { private String id; private String legalName; private String address; private String ledgerIdentity; public MemberDto() { } public String getStakeholderId() { return id; } publi...
import React from 'react'; import { connect } from 'react-redux'; import { getPastOrdersThunk } from '../store/pastOrders'; import { PastOrdersCard } from './PastOrdersCard'; import { Card } from 'semantic-ui-react'; export class pastOrders extends React.Component { async componentDidMount() { await this.props.g...
#!/bin/bash set -ex CURRENT=$(cat python/hail/version) PYPI_VERSIONS=$(python list_pypi_versions.py hail) set +e grep -qe "^${CURRENT}$" <(echo "$PYPI_VERSIONS") ALREADY_PUBLISHED=$? set -e if [[ $ALREADY_PUBLISHED -ne 0 ]] then echo deploying ${CURRENT} ./gradlew shadowJar cp build/libs/hail-all-spark...
<reponame>0x1306a94/SampleCode<filename>TestTableView/TestTableView/AppDelegate.h // // AppDelegate.h // TestTableView // // Created by king on 2020/8/20. // Copyright © 2020 0x1306a94. All rights reserved. // #import <UIKit/UIKit.h> @interface AppDelegate : UIResponder <UIApplicationDelegate> @end
TERMUX_PKG_HOMEPAGE=https://developer.gnome.org/notification-spec/ TERMUX_PKG_DESCRIPTION="Library for sending desktop notifications" TERMUX_PKG_LICENSE="LGPL-2.0" TERMUX_PKG_MAINTAINER="Leonid Pliushch <leonid.pliushch@gmail.com>" TERMUX_PKG_VERSION=0.7.9 TERMUX_PKG_REVISION=9 TERMUX_PKG_SRCURL=https://ftp.gnome.org/p...
<gh_stars>1-10 import { ref, onUnmounted, unref, getCurrentInstance, watch } from 'vue'; import { isProdMode } from '@/utils/env'; import { ReturnMethods } from '../type'; import { getDynamicProps } from '@/utils'; export function useModal(props): (((modalMethod: ReturnMethods) => any) | ReturnMethods)[] { const moda...
#!/bin/bash go get -u github.com/go-ole/go-ole/oleutil find _examples/ -maxdepth 2 -mindepth 2 -exec sh -c "cd {}; echo building {}; go build -i main.go" \;
<filename>extern/typed-geometry/src/typed-geometry/types/array.hh #pragma once #include <typed-geometry/feature/assert.hh> #include <typed-geometry/types/scalars/default.hh> namespace tg { // TODO: variable sized array template <class T, u64 N> struct array { // must be public for ctor T _values[N]; con...
#!/usr/bin/env bash set -e cd "$(dirname "${BASH_SOURCE[0]}")" pushd ./ cd ../ git -C chain pull || git clone https://github.com/crypto-com/chain cd ./chain git checkout release/v0.5 ./docker/build.sh popd
<gh_stars>1-10 """ gwcosmoLikelihood Module <NAME>, <NAME>, <NAME>, <NAME>, <NAME> In general: p(x|z,H0,\Omega) is written as p(x|dl(z,H0))*p(x|\Omega) p(x|dL(z,H0)): self.norms[H0]*self.px_dl(dl(z,H0)) p(x|\Omega): self.skymap.skyprob(ra,dec) or self.skymap.prob[idx] p(D|z,H0): pdet.pD_zH0_eval(z,H0) p(s|M(H0)): L_M(...
package com.rostdev.survivalpack.ui.info; import android.content.Context; import android.hardware.Sensor; import android.hardware.SensorEvent; import android.hardware.SensorEventListener; import android.hardware.SensorManager; import com.rostdev.survivalpack.R; import com.rostdev.survivalpack.model.SensorInfo; import...
<gh_stars>0 const token_verify = require('../middleware/token_verify'); module.exports = async (ctx) => { ctx.body = { msg: 'userInfo' } /* const token = ctx.header.authorization; if (token) { // 解密,获取payload let payload = await token_verify(token); ctx.body = { ...
<reponame>hapramp/1Rramp-Android package com.hapramp.ui.adapters; import android.content.Context; import android.content.Intent; import android.graphics.Color; import android.net.Uri; import android.support.annotation.NonNull; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import an...
import React from 'react'; import pick from 'lodash/pick'; import omitBy from 'lodash/omitBy'; import isEqual from 'lodash/isEqual'; import meanBy from 'lodash/meanBy'; import mean from 'lodash/mean'; import {Location} from 'history'; import {Client} from 'app/api'; import {addErrorMessage} from 'app/actionCreators/in...
<gh_stars>1-10 /** * RightJS UI Internationalization: Spanish module * * Copyright (C) <NAME> */ RightJS.Object.each({ Calendar: { Done: 'Hecho', Now: 'Ahora', NextMonth: 'Mes siguiente', PrevMonth: 'Mes precedente', NextYear: 'Año siguiente', PrevYear...
// Call the dataTables jQuery plugin $(document).ready(function() { $('#dataTable, #dataTable1, #dataTable2, #dataTable3, #dataTable4, #dataTable5').DataTable({ responsive: true, "order": [ [0, "asc"] ], "language": { "decimal": "-", "thousands": ".", ...
import microtest import microtest.utils as utils import os import io import contextlib import templateman.cli as cli @microtest.test def test_template_listing(): INSTALLED_TEMPLATES = ['template_1', 'template_2'] with io.StringIO() as stream: with utils.create_temp_dir(files=INSTALLED_TEMPLATES) as d...
<reponame>Corrots/nsq package client type Client struct { }
if [ -e .env ]; then set -a # automatically export all variables source .env set +a else echo "Please set up your .env file before starting your environment." exit 1 fi # clear containers bash scripts/clear-container.sh if [ ! "$(docker ps -q -f name=$POSTGRES_CONTAINER_NAME)" ]; then echo "# S...
#!/bin/bash source ../spec.sh source ./module_spec.sh if [ ! -d ${MODSDIR} ]; then echo "${MODSDIR} deos not exist!" exit 1 fi # Copy any extra modules that don't need RDL verbosecopymodule ${PACKAGESDIR}/curlftpfs/curlftpfs-0.9.2-${ARCH}-bksrc1.xzm ${MODSDIR}/
<reponame>bobanko/tripSorter-2018 const CleanWebpackPlugin = require("clean-webpack-plugin"); const HtmlWebpackPlugin = require("html-webpack-plugin"); const MiniCssExtractPlugin = require("mini-css-extract-plugin"); const devMode = process.env.NODE_ENV !== "production"; module.exports = { mode: "development", en...
import json from scapy.all import * from scapy.layers.l2 import * from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer import SocketServer from dnslib.server import DNSLogger, DNSServer from dnslib.fixedresolver import FixedResolver class FixedDNSResolver(FixedResolver): def resolve(self, request, handler...
from django.conf import settings from django.http import HttpResponse import json def handle_image_upload(request): if request.method == 'POST' and request.FILES['image']: image = request.FILES['image'] if image.size > settings.MAX_IMAGE_UPLOAD_SIZE: # return error when the image size ...
#!/bin/bash nativefier --name "Element" \ --icon element-web.png \ --single-instance "https://app.element.io/"
// Move from Rod 1 to Rod 3 Move Disk 1 from Rod 1 to Rod 3 Move Disk 2 from Rod 1 to Rod 2 Move Disk 1 from Rod 3 to Rod 2 Move Disk 3 from Rod 1 to Rod 3 Move Disk 1 from Rod 2 to Rod 1 Move Disk 2 from Rod 2 to Rod 3 Move Disk 1 from Rod 1 to Rod 3 // Move from Rod 3 to Rod 2 Move Disk 4 from Rod 3 to Rod 2 Move Di...
# make sure cmake is installed # sudo apt-get update #g++ sudo apt-get install g++ #unzip sudo apt-get install unzip #compile dep libraries #example 1: ./buildServer #example 2: ./buildServer DEBUG echo "we only build NF SDK here" cd NFComm/NFMessageDefine ./cpp.sh cd ../../ cd BuildScript/linux/ chmod -R 755 ./...
echo "Getting BuildTools" sudo apt install tree # Creating Directories mkdir build cd build mkdir DEBIAN mkdir usr cd usr mkdir local cd local mkdir bin cd ../../../ # Move files over for building cp ./uls.sh ./build/usr/local/bin cp ./ulsrepeat.sh ./build/usr/local/bin cp ./ultimatelinux.sh ./build/usr/local/bin cp ...
def is_message_within_size_limit(message: str, max_size: int) -> bool: return len(message) <= max_size
<filename>src/main/java/chylex/hee/entity/item/EntityItemAltar.java package chylex.hee.entity.item; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; import chylex....
#!/bin/bash : <<'END' This software was created by United States Government employees at The Center for the Information Systems Studies and Research (CISR) at the Naval Postgraduate School NPS. Please note that within the United States, copyright protection is not available for any works created by United States ...
#!/bin/bash # SCRIPT: print.sh # PURPOSE: Generates 2 copies of CV, one with color (cv.pdf) and one without color (cv_print.pdf) xelatex -interaction=batchmode -jobname=cv_print '\PassOptionsToClass{print}{cv}\input{cv.tex}' xelatex -interaction=batchmode -jobname=cv '\input{cv.tex}'
<filename>src/main/webapp/lib/varmateo/util/CookieHandler.js<gh_stars>0 /************************************************************************** * * Copyright (c) 2017 <NAME> All Rights Reserved. * **************************************************************************/ "use strict"; /** * */ define(funct...
<reponame>sjcdigital/sjc-edu package com.sjcdigital.sjcedu.robot.model.pojos.impl; import com.fasterxml.jackson.annotation.JsonProperty; import com.sjcdigital.sjcedu.robot.model.entities.MediaAlunoPorTurma; import com.sjcdigital.sjcedu.robot.model.pojos.Pojo; public class MediaAlunoPorTurmaPojo implements Pojo { @J...
require 'fileutils' require 'rhc/config' include RHCHelper When /^the (.+) cartridge is added$/ do |name| @app.add_cartridge name end When /^the (.+) cartridge is removed$/ do |name| @app.remove_cartridge name end When /^the (.+) cartridge is (stopped|(?:re)?started)$/ do |name,command| cmd = case command.to_...
void manipulateVector(std::vector<int>& b, int x, int y) { if (x - 1 == y) { return; } if (x < y) { int element = b[x]; b.erase(b.begin() + x); if (y + 1 <= b.size()) { b.insert(b.begin() + y + 1, element); } else { b.push_back(element); ...
<gh_stars>0 import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { ActionResult } from '../models/action-result-model'; import { ConfigService } from './config.service'; const CONTROLLER = 'WF_FORMU' @Injectable({ providedIn: 'root' }) export class FormService { con...
<filename>src/main/java/org/terracottamc/util/BedrockResourceDataReader.java package org.terracottamc.util; import com.google.common.io.ByteStreams; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonParser; ...
// Scan direction is parallel to the sweepline which moves in the perpendicular direction; // i.e. scan direction is "sideways" along the sweepline. We do several passes, following Clarkson et al., // "Rectilinear shortest paths through polygonal obstacles in O(n (log n)2) time" (checked into the enlistment). // ...
#!/bin/sh set -e echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" install_framework() { if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then local source="${BUILT_PRO...
#!/bin/bash echo "Tearing down using docker-compose" docker-compose --project-name edm down rm -rf alluxio/data mkdir alluxio/data rm -rf mysql/data/* rm -rf elasticsearch/esdata1/nodes rm -rf elasticsearch/esdata2/nodes docker volume prune -f #find . -name "__pycache__" -type d -exec rm -rf {} +
<filename>src/components/ServerSentEvents.js import React from 'react'; import {observer, inject} from 'mobx-react'; @inject('ssestore') @observer export default class ServerSentEvents extends React.Component { constructor(props) { super(props); } componentDidMount() { //start listening f...
import { Config } from '../Class/Unit/Config' import { Pin } from '../Pin' import { PinOpt } from '../PinOpt' import { PinOpts } from '../PinOpts' import { Pins } from '../Pins' import { Dict } from '../types/Dict' import { IO } from '../types/IO' import { None } from '../types/None' import { $_ } from './$_' export i...
<html> <head> <title>My Page</title> </head> <body> <div class="container"> <nav> <ul> <li><a href="home.html">Home</a></li> <li><a href="about.html">About</a></li> </ul> </nav> <div class="main-content"> <!-- Main Page Content Here --> </div> <div class="sidebar-container1">...
<reponame>syberflea/materials #!/usr/env/bin python3 # phases.py import asyncio async def phase1(callerid: str): print(f"phase 1 called from {callerid}") await asyncio.sleep(2) return "result1" async def phase2(callerid: str, arg: str): print(f"phase 2 called from {callerid}") await asyncio.sle...
'use strict'; // Declare app level module which depends on views, and components var donorApp = angular.module('myApp', ['ngRoute']). config(['$routeProvider','$httpProvider','$sceProvider', function($routeProvider,$httpProvider,$sceProvider) { $httpProvider.defaults.useXDomain = true; delete $httpProvider.default...
from flydra_analysis.a2.calculate_reprojection_errors import \ calculate_reprojection_errors, print_summarize_file import flydra_analysis.a2.core_analysis as core_analysis import os, tempfile, shutil import pkg_resources DATAFILE2D = pkg_resources.resource_filename('flydra_analysis.a2','sample_datafile-v0.4.28.h...
<gh_stars>1-10 """Plots the generated points to a graph for each value of w""" import os import matplotlib as mpl import matplotlib.pyplot as plt import numpy as np from mpl_toolkits.mplot3d import Axes3D def plot(): # Saves 21 colours from the rainbow colormap to use for each value of x colours = mpl.cm.rain...
pgpApp.controller('KeyWorkCtrl', function ($scope, focus, $state, $stateParams, $uibModal) { $scope.key = null; $scope.$stateParams = $stateParams; $scope.$state = $state; $scope.init = function() { if ('pgp' in $stateParams && $stateParams.pgp) { $scope.rawkey = decodeURIComponent($stateParams.pgp);...
export BUILD_DIR=~/Downloads/mgmail rm -rf $BUILD_DIR cp -r . $BUILD_DIR cp ../../core/foam.css $BUILD_DIR cat \ ../../core/stdlib.js \ ../../core/WeakMap.js \ ../../core/io.js \ ../../core/writer.js \ ../../core/socket.js \ ../../core/base64.js \ ../../core/encodings.js \ ../../core/utf8.js \ ../../c...
def calculate_discount(num_children: int) -> int: if num_children == 2: discount_total = 10 elif num_children == 3: discount_total = 15 elif num_children == 4: discount_total = 18 elif num_children >= 5: discount_total = 18 + (num_children - 4) return discount_total
#!/usr/bin/env bash docker build -t doughyou/food_svc:latest . docker push doughyou/food_svc:latest
#!/bin/bash # sync up all of the hosts in the build farm (the "cat farm"). set -e mkdir -p ~/.ssh/sockets # hosts: # imacg3, ibookg3, graphite, emac2, emac3, pbookg4, pbookg42, imacg5 imacg52 # map: # tiger g3: ibookg3, imacg3 # tiger g4: graphite # tiger g4e: emac2, emac3 # tiger g5: imacg52 # leopard ...
function liveSearch(url, userId, resultContainer, key) { // Create a new XMLHttpRequest object var xhr = new XMLHttpRequest(); // Set up the request xhr.open('GET', url + '?userId=' + userId + '&key=' + key, true); // Define the callback function xhr.onload = function () { if (xhr.stat...
#!/bin/sh set -eu task_dir="$PWD" cd hugo-site ./bin/generate-metalink-artifacts-data.sh "file://$task_dir/artifacts/ssoca-final" ./bin/git-fetch.sh "$task_dir/repo" # avoid stale concourse resource caches ./bin/generate-repo-tags-data.sh "$task_dir/repo" # accidental lightweight tag; manual, pre-CI echo ' v0.8....
<filename>src/actions/index.js import {saveState} from '../utils' import {initialState} from '../store' export const updateBeaconId = (state, event, {isAutoOpen}) => { const beaconId = event.target.value if (state.beaconId === beaconId) return console.log('Beacon DevTools: Initializing', beaconId) window.Bea...
def towers_of_hanoi(numDiscs, startPeg=1, endPeg=3): if numDiscs: towers_of_hanoi(numDiscs-1, startPeg, 6-startPeg-endPeg) print("Move disc %d from peg %d to peg %d" % (numDiscs, startPeg, endPeg)) towers_of_hanoi(numDiscs-1, 6-startPeg-endPeg, endPeg)
<reponame>AVassilev98/ece350 /* @brief: rtx.h User API header file. Do not modify * @author: <NAME> * @date: 2020/09/03 */ #ifndef _RTX_H_ #define _RTX_H_ /*----- Includes -----*/ #include "common.h" #define __SVC_0 __svc_indirect(0) extern int k_mem_init(size_t blk_size, int algo); #define mem_init(blk_size, a...
import * as express from 'express'; import * as multer from 'multer'; const searchCtrl = require('./search.ctrl'); const search = express.Router(); search.use(express.json()); search.get('/title', searchCtrl.title); search.get('/place', searchCtrl.place); module.exports = search;
#!/bin/bash set -e function retry() { END=$(($(date +%s) + 600)) while (( $(date +%s) < $END )); do set +e "$@" EXIT_CODE=$? set -e if [[ ${EXIT_CODE} == 0 ]]; then break fi sleep 5 done return ${EXIT_CODE} } function hadoop_master_container(){ environment_compose ps -q...
#!/usr/bin/env bash export GOPATH=$HOME/.go export PATH=$PATH:$GOPATH/bin
def type_checker(x): if isinstance(x, int) or isinstance(x, float): print('Number') else: print('String') type_checker(x)
#include <iostream> using namespace std; int findfirstmissingpositive(int arr[], int size) { // Initialize int missing_min = 1; // Find if missing_min is present for (int i = 0; i < size; i++) { if (arr[i] == missing_min) { missing_min++; } } retu...
<reponame>nabeelkhan/Oracle-DBA-Life<filename>INFO/Books Codes/Oracle Wait Interface A Practical Guide to Performance Diagnostics & Tuning/Chapter5_page129_1.sql select a.name, b.sid, b.value, round((sysdate - c.logon_time) * 24) hours_connected from v$statname a, v$sesstat b, v$session c where b.sid ...
import Iterable from '../iteration/iterable'; import Iterator from '../iteration/iterator'; import Comparer from './comparer'; import iterableSymbol from '../iteration/iterable-symbol'; import assertType from '../utils/assert-type'; import assertNotNull from '../utils/assert-not-null'; import buffer from '../utils/buff...
#!/bin/bash #github-action genshdoc # Find the name of the folder the scripts are in set -a SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" SCRIPTS_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"/scripts CONFIGS_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]...
package com.alipay.api.domain; import java.util.List; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; /** * 查询插件引用关系 * * @author auto create * @since 1.0, 2021-06-01 10:44:34 */ public class AlipayOpenMiniInn...
package com.honyum.elevatorMan.net; import com.honyum.elevatorMan.net.base.RequestBean; import com.honyum.elevatorMan.net.base.RequestBody; import com.honyum.elevatorMan.net.base.RequestHead; public class PropertyAddressListRequest extends RequestBean { private RequestHead head; private PalReqBody body; ...
<reponame>ECRomaneli/c2.js let medias = document.querySelectorAll('video, audio'); for (let i = 0; i < medias.length; i++) { let media = medias[i]; let events = 'abort canplay canplaythrough durationchange emptied ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seek...
<gh_stars>0 import EncodedChannel from '../../src/channel/encodedChannel'; import {OutputChannel} from '../../src/channel'; describe('An encoded channel', () => { let outputChannel: OutputChannel<string>; let channel: EncodedChannel<string, string>; beforeEach(() => { outputChannel = { ...
class ApplicationController < ActionController::Base def create_post @post = Post.new(post_params) if @post.save flash[:success] = "Post successfully created!" redirect_to @post else render :new end end def update_post if @post.update(post_params) flash[:success] = "Post successfully updated!" redirect_to...
package com.yin.springboot.mybatis.server; import java.util.List; import com.yin.springboot.mybatis.domain.SmsFlashPromotionProductRelation; public interface SmsFlashPromotionProductRelationService{ int deleteByPrimaryKey(Long id); int insert(SmsFlashPromotionProductRelation record); int insertOrUpdate...
function formatTime(date) { var year = date.getFullYear() var month = date.getMonth() + 1 var day = date.getDate() var hour = date.getHours() var minute = date.getMinutes() var second = date.getSeconds() return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumb...
import { HttpHandler, HttpInterceptor, HttpRequest, HttpHeaders } from "@angular/common/http"; import { Injectable } from "@angular/core"; import { AuthService } from "src/app/services/auth.service"; @Injectable() export class AuthInterceptor implements HttpInterceptor { constructor(private authService: Auth...
#!/bin/sh Help() { # Display Help echo "Program to train and evaluate a 2D U-Net segmentation model" echo echo "Syntax: main_prediction_RCSeg.sh [--options]" echo "options:" echo "--dir_src Path to the Folder that contains the source code" echo "--file_input Scan to segment" echo "--dir_pr...
#!/bin/bash clear #凑合解决方案 #wget -qO - https://patch-diff.githubusercontent.com/raw/openwrt/openwrt/pull/3875.patch | patch -p1 #使用O2级别的优化 sed -i 's/Os/O3/g' include/target.mk #更新feed ./scripts/feeds update -a ./scripts/feeds install -a -f #irqbalance sed -i 's/0/1/g' feeds/packages/utils/irqbalance/files/irqbalance.c...
studName = "John" # Add Dictionary Here studentDetails = {"name": studName}
#!/bin/bash # This script is used for easier developing of cdw containers. docker-compose will pull from # these builds instead of online. docker build gitea --tag sscsctf/levels:ctf-cda-gitea docker build organization --tag sscsctf/levels:ctf-cda-organization docker build player --tag sscsctf/levels:ctf-cda-player ...
require 'dotenv/load' require 'faraday' require 'json' class Lotr_quote def initialize @quote = get_random_lotr_quote @author = get_quote_author end def get_random_lotr_quote api_key = ENV['LOTR_API'] quote_url = "https://the-one-api.dev/v2/quote" response = Faraday.get(quote_url, {}, {'...
#!/bin/bash fileid="1lspYx8gs63X0RxS9N9s4VPIKFNdRpahB" html=`curl -c ./cookie -s -L "https://drive.google.com/uc?export=download&id=${fileid}"` curl -Lb ./cookie "https://drive.google.com/uc?export=download&`echo ${html}|grep -Po '(confirm=[a-zA-Z0-9\-_]+)'`&id=${fileid}" -o mobilenet_v2_224_dm05_integer_quant.tflite ...
<filename>http-event-collector/http-event-collector.js<gh_stars>1-10 var SplunkLogger = require("splunk-logging").Logger; module.exports = function(RED) { function HTTPEventCollector(config) { RED.nodes.createNode(this,config); var context = this.context(); var node = this; var myM...
#!/usr/bin/env bash _config_changed=false function cleanup() { if [ "$_config_changed" == true ]; then __revert_wildcard_config_changes fi exit } trap cleanup INT . "$_scripts_dir/common/common.sh" _init_script "$0" . "$_scripts_dir/utils.sh" . "$_scripts_dir/common/i18n_core.sh" _init_i18n "$1" . "$_sc...
<gh_stars>1-10 // see docs/hlse.md for instructions on how test data was generated import QUnit from 'qunit'; import {unpad} from 'pkcs7'; import sinon from 'sinon'; import {decrypt, Decrypter, AsyncStream} from '../src'; // see docs/hlse.md for instructions on how test data was generated const stringFromBytes = funct...
#include "3bc.h" #define print_file(file,type, val);\ switch(type){\ case STRI: fprintf(file, "%lu", (unsigned long) val); break;\ case STRO: fprintf(file, "%o", (unsigned int) val); break;\ case STRC: fprintf(file, "%c", (unsigned char) val); break;\ case STRX: fprintf(file, "%x", (unsigned int) val); break;\ case ST...
#!/bin/bash -ex ############################################################################## ### Script cai dat cac goi bo tro cho CTL ### Khai bao bien de thuc hien source config.cfg function echocolor { echo "#######################################################################" echo "$(tput setaf 3)#...
package models type AllPulishAddressForIP struct { IP string `json:"ip"` Port string `json:"port"` PublishProtocol string `json:"publish_protocol"` }
<filename>test/__fixtures__/kitchensink-graphql.js import { run } from "./kitchensink.js"; import { makeFieldResolver } from "../../src/execute.js"; import { buildSchema, graphql } from "graphql"; import { findServices } from "../../src/protos.js"; import { readFileSync } from "fs"; (async () => { const schema = bui...
#!/bin/bash -eu # Copyright 2020 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
package ru.contextguide.yandexservices.exceptions; /** * Исключение при создании запроса к сервису. */ public class ApiRequestException extends YDException { public ApiRequestException() { super(); } public ApiRequestException(String message) { super(message); } public ApiReque...
<filename>inference/plotting.py """ .. moduleauthor:: <NAME> <<EMAIL>> """ from numpy import array, meshgrid, linspace, sqrt, ceil, ndarray from itertools import product, cycle from warnings import warn from inference.pdf import GaussianKDE, KDE2D, sample_hdi import matplotlib.pyplot as plt from matplotlib.patches im...
def calculateDistance(x1, y1, x2, y2): distance = ((x2 - x1)**2 + (y2 - y1)**2)**(1/2) return distance # main x1 = 0 y1 = 0 x2 = 10 y2 = 10 dist = calculateDistance(x1, y1, x2, y2) print("Distance between the two points is", dist)
import { StyleSheet } from "react-native"; export default StyleSheet.create({ // container: { flex: 1, backgroundColor: "#2E3248" }, // favorites_: {}, // favorites_flat_grid_style: { flex: 1, marginTop: 10 }, // favorites_card_item_image_style: { flex: 1, height: 200, w...
# frozen_string_literal: true # rubocop:disable Rails/Output password = '<PASSWORD>' user = User.create_or_find_by(email: '<EMAIL>', password: password) puts "User with email #{user.email}" # rubocop:enable Rails/Output
export function load(path?: string): Promise<void>; export let _path: string | undefined; export class Class { public static scope: any; public static register(cls: any): void; } /* Client API */ declare type Handle = number; declare type BlockListener = (blockHash: Hash) => Promise<any> | any; declare type...
<reponame>diegoperezl/cf4j package es.upm.etsisi.cf4j.util; /** This class contains useful math methods. */ public class Maths { /** * Calculates the average of an double array * * @param array Array of double from which to calculate the mean * @return Array mean */ public static double arrayAverag...
#include <iostream> int main() { int nums[] = {2, 3, 7, 11, 16}; int max = nums[0]; for (int i = 1; i < 5; i++) { if (nums[i] > max) { max = nums[i]; } } std::cout << "The maximum is " << max << std::endl; return 0; }