text
stringlengths
1
1.05M
package com.atguigu.gmall.search.controller; import com.atguigu.gmall.common.bean.ResponseVo; import com.atguigu.gmall.search.pojo.SearchParamVo; import com.atguigu.gmall.search.pojo.SearchResponseVo; import com.atguigu.gmall.search.service.SearchService; import org.springframework.beans.factory.annotation.Autow...
#!/bin/bash source test_tipc/common_func.sh set -o errexit set -o nounset FILENAME=$1 # MODE be one of ['lite_train_lite_infer' 'lite_train_whole_infer' 'whole_train_whole_infer', # 'whole_infer', 'klquant_whole_infer', # 'cpp_infer', 'serving_infer'] MODE=$2 dataline=$(cat ${FILENAME...
package org.ednovo.gooru.core.api.model; import java.io.Serializable; import java.util.HashSet; import java.util.Set; import com.fasterxml.jackson.annotation.JsonFilter; @JsonFilter("userRole") public class UserRole extends OrganizationModel implements Serializable{ /** * */ private static fin...
#!/bin/bash # Wait for postgresql container /wait-for.sh postgres 5432 # Migrate database and collectstatic python manage.py collectstatic --noinput python manage.py makemigrations python manage.py migrate echo "from obnk_apps.users.models import User; User.objects.filter(email='admin@obnk.com').delete(); User.object...
#!/bin/bash # # Postfix (SMTP) # -------------- # # Postfix handles the transmission of email between servers # using the SMTP protocol. It is a Mail Transfer Agent (MTA). # # Postfix listens on port 25 (SMTP) for incoming mail from # other servers on the Internet. It is responsible for very # basic email filtering suc...
#! /bin/bash set -u # wait till node is up, send txs ADDR=$1 #="127.0.0.1:26657" curl -s $ADDR/status > /dev/null ERR=$? while [ "$ERR" != 0 ]; do sleep 1 curl -s $ADDR/status > /dev/null ERR=$? done # send a bunch of txs over a few blocks echo "Node is up, sending txs" for i in $(seq 1 5); do fo...
package io.opensphere.osh.aerialimagery.model; import static org.junit.Assert.assertEquals; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.util.Date; import org.junit.Te...
/* * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved. This * code is released under a tri EPL/GPL/LGPL license. You can use it, * redistribute it and/or modify it under the terms of the: * * Eclipse Public License version 1.0 * GNU General Public License version 2 * GNU Lesser General ...
<filename>projects/enterprize/angular-ui/src/lib/form-controls/directives/message-error.directive.ts import { Directive, Host, Input, TemplateRef, ViewContainerRef } from "@angular/core"; import { MessagesDirective } from "./messages.directive"; /** * @Directive * Diretiva estrutural para registrar uma mensagem...
#!/bin/sh ./rshell.out echo this && mkdir newfiles && ls -a; rm newfiles #|| rmdir newfiles && echo newfiles was deleted!
echo "************Welcome to Openstack installation************" echo " 1. Controller Node 2. Compute Node Your Choice:" read choice if [ $choice == 1 ] then echo "************Setting up Controller Node************" elif [ $choice == 2 ] then echo "************Setting up Compute Node************" echo "Enter Comput...
<filename>engine/physics/src/box2d/dynamics/b2_body.cpp // MIT License // Copyright (c) 2019 <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...
/*globals just_started,schedule,scheduled,completed,workflow_input,stop,results,waiting_for */ if (just_started) { schedule("sw-53", { "activityType": "fetch", "input": { "URL": [ "http://www.newyorker.com/feed/books", "http://www.newyorker.com/feed/humor"...
<filename>main.go<gh_stars>1-10 package main import ( "flag" "fmt" "log" "net/http" "github.com/rtwire/mock/service" ) var ( addr = flag.String("addr", ":8085", "service address") ) func main() { flag.Parse() url := fmt.Sprintf("http://%s/v1/mainnet/", *addr) log.Printf("RTWire service running at %s.", ur...
set -e dotnet build Example.csproj cp -R ../lib/hyper bin/Debug/netcoreapp3.1 cp -R ../lib/libtableauhyperapi.* bin/Debug/netcoreapp3.1/
package io.opensphere.arcgis2.migration; import java.util.Map; import org.apache.log4j.Logger; import io.opensphere.arcgis.config.v1.ArcGISServerSource; import io.opensphere.core.appl.PreConfigurationUpdateModule; import io.opensphere.core.preferences.PreferencesRegistry; import io.opensphere.mantle.datasou...
#!/usr/bin/env bash # Copyright 2020 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. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2....
<gh_stars>10-100 /*- * Copyright (c) 2019 <NAME> <<EMAIL>> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice...
#!/bin/sh # # Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 only, as # published by the Free So...
<filename>src/main/java/de/perdian/apps/devlauncher/DevLauncherShutdownListener.java /* * DevLauncher * Copyright 2013 <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:...
#!/bin/sh if [ "$DATABASE" = "postgres" ] then echo "+++++++++++++++++++++++" echo "Waiting for postgres..." echo "+++++++++++++++++++++++" while ! nc -z $SQL_HOST $SQL_PORT; do sleep 0.1 done echo "+++++++++++++++++++++++" echo "PostgreSQL started" echo "+++++++++++++++++++++++...
package de.unistuttgart.ims.coref.annotator.plugins; import java.util.Map; import javax.swing.text.AttributeSet; import javax.swing.text.MutableAttributeSet; import javax.swing.text.StyleContext; import org.apache.uima.cas.Type; import org.apache.uima.cas.TypeSystem; import de.unistuttgart.ims.coref.annotator.Style...
#!/bin/bash yum -y install vsftpd #conf目录/etc/vsftpd/vsftpd.conf #增加用户 useradd -d /home/ftpuser -m ftpuser echo "ftp_micros"| passwd --stdin ftpuser #设置密码为: ftp_micros #修改 selinux配置 getsebool -a | grep ftp setsebool -P allow_ftpd_full_access on setsebool -P ftp_home_dir on #修改配置 sed -i 's/^anonymous_enable=.*/anon...
#!/bin/bash # echo "Your script args ($#) are: $@" usage() { echo -e "${BYELLOW}setup [dbFlow]${NC} - generate project structure and install dependencies. " echo echo -e "${BWHITE}USAGE${NC}" echo -e " $0 <COMMAND>" echo echo -e "${BWHITE}COMMANDS${NC}" echo -e " generate <project-name> ...
<reponame>chipturner/advent-of-code-2021 import helpers import itertools import collections from dataclasses import dataclass @dataclass class Fish: span: int def main() -> None: lines = helpers.read_input() fishes = [ Fish(int(s)) for s in lines[0].split()[-1].split(',')] print(fishes) for d in...
<gh_stars>1-10 import { SyncLayoutBatcher } from "../types"; /** * Create a batcher to process VisualElements */ export declare function createBatcher(): SyncLayoutBatcher;
#!/bin/bash # stop the chain instance eris chains stop simplechain # clean up after docker # source: http://stackoverflow.com/questions/32723111/how-to-remove-old-and-unused-docker-images docker rm $(docker ps -qa --no-trunc --filter "status=exited") && docker rmi $(docker images --filter "dangling=true" -q --no-trun...
#!/bin/sh echo "Setting up zsh..." # Install zsh & helpers helpers=( zsh zsh-syntax-highlighting zsh-autosuggestions zsh-history-substring-search ) brew install ${helpers[@]} # Make zsh the default environment chsh -s $(which zsh)
UPDATE Employees SET DateOfBirth = '2000-01-01' WHERE Id = '12345';
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by <NAME>, <EMAIL>, All rights reserved. # LLNL-CODE-647188 # # For det...
#include <unordered_map> #include <string> // Assuming that the object sizes are stored in a map for each key std::unordered_map<std::string, std::unordered_map<uint64_t, uint32_t>> objectSizes; uint32_t get_size_by_time(const std::string& key, uint64_t ts_us, uint32_t subgroup_index, uint32_t shard_index) { // A...
<reponame>dutinmeow/library #define PROBLEM "https://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=DSL_2_E" #include <bits/stdc++.h> using namespace std; #include "data-structure/tnemges-tree.hpp" int main() { int N, Q; cin >> N >> Q; tnemges_tree<long long> tib(N + 1); while (Q--) { int t; cin >> t; if ...
package com.example.co4sat; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.Toast; public class MainActivity extends AppCompatActivity { EditTex...
#!/usr/bin/env bash # Arguments: # 1: next version # 2: channel source "$(dirname "$0")/docker-common.sh" $1 $2 #echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin # Push docker images (built previously) cd komga docker buildx build \ --platform $PLATFORMS \ --cache-from tahngarth/...
<reponame>hugonasciutti/Exercises<filename>Jest/1/public/components/About/__tests__/About.spec.js import React from 'react'; import { shallow, mount } from 'enzyme'; import toJson from 'enzyme-to-json'; import About from '../index'; describe('<About />', () => { it('should render <About /> component', () => { co...
#!/usr/bin/env python # Copyright (C) 2013 Intel Corporation # # Released under the MIT license (see COPYING.MIT) # Log module used by base testrunner # It catch stdout and stderr to a new local file """ log module """ import os, sys class MultipleCall(object): """It's a wraper, if this obj was called, it will c...
Using the given dataset, I identified several features that could be useful for predictions. I looked for correlations between the features and the target variable and found that the age of the person, the median income of the area, and the number of bedrooms in the property all had strong correlations to the target va...
def check_if_number_in_range(number, range_start, range_end): # Check if range_start <= number < range_end if range_start <= number < range_end: return True else: return False # Input number = 4 range_start = 0 range_end = 5 # Output print(check_if_number_in_range(number, range_start, range_end)) # O...
#!/bin/bash # ========== Experiment Seq. Idx. 3050 / 59.4.2.0 / N. 0 - _S=59.4.2.0 D1_N=37 a=1 b=1 c=-1 d=1 e=-1 f=-1 D3_N=5 g=1 h=-1 i=1 D4_N=0 j=0 D5_N=0 ========== set -u # Prints header echo -e '\n\n========== Experiment Seq. Idx. 3050 / 59.4.2.0 / N. 0 - _S=59.4.2.0 D1_N=37 a=1 b=1 c=-1 d=1 e=-1 f=-1 D3_N=5 g=1 h...
#!/usr/bin/env bash # Usage # bash parallel.sh {browser} {threads} {test-per-thread=5} # bash parallel.sh chrome 2 # bash parallel.sh firefox 2 # time ( VIDEO=true bash parallel.sh hybrid 4 ) # VIDEO=true bash parallel.sh hybrid 2 set -e echoerr() { printf "%s\n" "$*" >&2; } # print error and exit die () { e...
#!/bin/sh bindir=$(pwd) cd /Users/BrightLand/Learn_MetalAPI/GRAPHICS API/openGL/playground/ export if test "x$1" = "x--debugger"; then shift if test "x" = "xYES"; then echo "r " > $bindir/gdbscript echo "bt" >> $bindir/gdbscript GDB_COMMAND-NOTFOUND -batch -command=$bindir/gdbscript /Users/BrightLand/Learn_...
import React, { useState, useEffect } from 'react' import {StyleSheet, Text, View, Button, TextInput} from 'react-native'; export default function App() { const [num1, setNum1] = useState(''); const [num2, setNum2] = useState(''); const [result, setResult] = useState(0); const calculate = () => { let sum = Nu...
<reponame>liuhanling/Logger<gh_stars>1-10 package com.liuhanling.logger; import android.content.Context; import android.util.Log; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import java.io.StringReader; import java.io.StringWriter; import javax.xml.transform.OutputKeys; imp...
<reponame>zonesgame/StendhalArcClient<filename>core/src/mindustry/content/Liquids.java package mindustry.content; import arc.graphics.Color; import mindustry.ctype.ContentList; import mindustry.type.Liquid; public class Liquids implements ContentList{ public static Liquid water, slag, oil, cryofluid; @Overri...
#!/bin/bash #SBATCH -n 4 --gres=gpu:volta:1 # Loading the required module source /etc/profile #module load anaconda/2021a #cuda/11.1 source activate nerf_pl # Run the script python train_efficient_sm.py --dataset_name efficient_sm --root_dir ../../datasets/variable_cam/statue_200_var_cam_v1_sigma150/ --N_importance 1...
import fs from 'fs'; import path from 'path'; const loadModules = (folderPath, namespace) => { const modules = {}; const directory = path.resolve(folderPath); const files = fs.readdirSync(directory); let ignoreRegex = /(index)(\.js)/; const dirStats = fs.statSync(folderPath); //throws if the directory do...
<filename>js/pages/charts-chartjs.js //------------- charts-chartjs.js -------------// $(document).ready(function() { //generate random number for charts randNum = function(){ //return Math.floor(Math.random()*101); return (Math.floor( Math.random()* (1+40-20) ) ) + 20; } //----------...
import sqlite3 def generate_html_table(conn, table) -> str: output = "<table><tr>" # Retrieve column names of the specified table c = conn.cursor() for tn in c.execute(f"PRAGMA table_info('{table}')"): output += f"<th>{tn[1]}</th>" output += "</tr>" # Retrieve all rows from th...
<reponame>isaec/gune //I want to make this in wasm at some point, its gonna be pricy to run I imagine //can't know till i write it and perf test it =P const FArray = require("../shared/array").FArray /* http://www.roguebasin.com/index.php?title=The_Incredible_Power_of_Dijkstra_Maps To get a Dijkstra map, you start wi...
# This file is copied to spec/ when you run 'rails generate rspec:install' require_relative "../config/application" Rails.application.load_tasks require "spec_helper" ENV["RAILS_ENV"] ||= "test" ENV["DATABASE_URL"] = ENV["DATABASE_TEST_URL"] || ENV["DATABASE_URL"].gsub("hyrax?pool", "hyrax-test?pool") ENV["SOLR_UR...
<reponame>team-mayes/hartree<gh_stars>0 package org.cmayes.hartree.disp.txt; import static org.junit.Assert.assertEquals; import java.io.File; import java.io.FileReader; import java.io.StringWriter; import java.io.Writer; import java.util.List; import java.util.stream.Collectors; import org.cmayes.hartree.model.Lowe...
<filename>frontend/src/index.tsx import React from 'react'; import ReactDOM from 'react-dom'; import { BrowserRouter } from 'react-router-dom'; import reportWebVitals from './reportWebVitals'; import { ApolloProvider } from '@apollo/client'; import 'antd/dist/antd.css'; import './index.css'; import "./locales"; impo...
<filename>backend/grad-trax-test-suite/src/main/java/ca/bc/gov/educ/gtts/model/dto/grad/algorithm/StudentExams.java package ca.bc.gov.educ.gtts.model.dto.grad.algorithm; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import org.springframework.stereotype.Component; import java....
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *---------------------------------------------------------------...
<gh_stars>1-10 package com.testvagrant.ekam.testBases.cucumber; import com.google.inject.Guice; import com.google.inject.Injector; import com.testvagrant.ekam.config.models.EkamConfig; import com.testvagrant.ekam.internal.executiontimeline.models.EkamTest; import com.testvagrant.ekam.internal.modules.EkamConfigModule;...
package gamesite.servlet; import java.io.*; import java.net.*; import java.sql.*; import java.text.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*; import gamesite.model.ShoppingCart; import gamesite.model.ShoppingCartItem; import gamesite.utils.DBConnection; import gamesite.utils.SQLQuery;...
<table> <tr> <th>Item</th> <th>Price</th> </tr> <tr> <td>Pen</td> <td>10</td> </tr> <tr> <td>Book</td> <td>20</td> </tr> <tr> <td>Shirt</td> <td>30</td> </tr> <tr> <td>Notebook</td> <td>40</td> </tr> ...
<gh_stars>0 #!/usr/bin/env node /* * Libra status reset test */ exports.test = function ( done ) { var log = console.log , emptyFn = function () {} , assert = require( 'assert' ) , util = require( 'util' ) , Libra = require( '../' ) , Syllabus = require( 'syllabus' ) ...
<filename>benchmarks/REVE/triangular/Eq/newV.java package benchmarks.REVE.triangular.Eq; public class newV { private int g(int n, int s){ int r; r = 0; if (n <= 0) { r = s; } else { r = g(n - 1, n + s); } return r; } int triangle(int n) { int r; r = g(n, 0); return r; } }
<reponame>tliang1/Java-Practice package main; import java.util.Scanner; /** * @author <NAME> * */ public class FutureInvestmentValueRevised { public static void main(String[] args) { Scanner input = new Scanner(System.in); int YEARS_TO_INVESTMENT = 30; System.out.print("Enter investment amount: "); ...
#!/bin/bash set -x # create a Secret vim 11-04_kuard-secret.yaml read -p "Continue?" kubectl apply -f 11-04_kuard-secret.yaml read -p "Continue?" # describe the Pod kubectl describe pod kuard-tls read -p "Continue?" # setup port forwarding kubectl port-forward kuard-tls 8443:8443 & read -p "Continue?" # inspect t...
import java.util.Scanner; /*Escreva um sistema que leia três números inteiros e positivos (A, B, C) e calcule a seguinte expressão: d = r+s/2 , onde r = (a+b)² e s= (b+c)² */ public class CalculandoExpressao { public static void main(String[] args) { int a,b,c,r,s; double d; Scanner input ...
#!/usr/bin/env bash if [ $(pgrep mysqld) ] || [ -f "/tmp/live.lock" ]; then if [ -f /opt/mysql/data/sst_in_progress ]; then # sst in progress marker - check how long this state has been if [ ! -f /tmp/sst.time ]; then echo -n $(date +%s) > /tmp/sst.time else # if more than 2 mins then check for evidence ...
use std::result; // Define the WaveFormsError type #[derive(Debug)] enum WaveFormsError { // Define potential errors // For example: // InvalidHandle, // CommunicationError, // Other errors specific to the WaveForms library } // Define the DeviceHandle type struct DeviceHandle { // Define the ...
#!/bin/bash export GOOGLE_PROJECT=docker-239201 #test -n "$(docker-machine ls | grep docker-host)" || eval $(docker-machine env --unset) #start machine docker-machine create --driver google \ --google-machine-image https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/images/family/ubuntu-1604-lts \ ...
import numpy as np import pandas as pd from sklearn.preprocessing import MinMaxScaler from keras.models import Sequential from keras.layers import Dense, LSTM # Read the stock data data = pd.read_csv('stock_data.csv') # Pre-processing scaler = MinMaxScaler(feature_range = (0, 1)) data = scaler.fit_transform(data) # ...
<reponame>Danathus/react3d<gh_stars>1-10 #include <ragdoll/sortme/DeltaRagdoll.h> #include <assert.h> #include <ode/ode.h> #include <ode/collision.h> #include <cal3d/model.h> #include <cal3d/skeleton.h> #include <osg/Node> #include <osg/ShapeDrawable> #include <dtCore/scene.h> #include <dtCore/object.h> #include <d...
//defining player's input const buttons = document.querySelectorAll('.btn'); let playerSelection; buttons.forEach((button) => {button.addEventListener('click',()=>{ playerSelection = button.id; playRound(playerSelection, computerSelection); })}) //defining computer's input function computerPlay() { retur...
let adicionais = []; var maximo = 1; var VALOR = 0; var VALOR_REAL = 0; $(function () { VALOR = $('#valor_produto').html(); VALOR_REAL = VALOR = parseFloat(VALOR); maximo = $('#maximo_adicionais_pizza').val(); }) function selet_add(adicional, nome){ controlaMaximo(adicional.id, (cl)=> { if(cl == false){ veri...
<filename>com.dubture.symfony.index/src/com/dubture/symfony/index/SymfonyDbFactory.java /******************************************************************************* * This file is part of the Symfony eclipse plugin. * * (c) <NAME> <<EMAIL>> * * For the full copyright and license information, please view the ...
import eslintReporter from 'eslint-formatter-codeframe'; export default async function(files, jsLinter) { const report = await jsLinter.lintFiles(files); if (report.length > 0) { let result = eslintReporter(report); if (result) { console.log(result); } return result; } }
def get_number_occurrence(self): return self.execute("select chosen_number, count(chosen_number) as occurrences, sum(case when outcome < 1 then 1 else 0 end) as negative_outcomes, sum(case when outcome > 1 then 1 else 0 end) as successful_outcomes from wager_history group by chosen_number") def get_multiplier_occ...
<filename>src/js/index.js "use strict"; var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; result["default"] = mod; return result; }...
############################################################################## # Compile programs on Mist ############################################################################## gcc -o serial calcpi_serial.c gcc -o omp -fopenmp calcpi_openmp.c #g++ -o tbb -L/usr/local/packages/intel_xe/14.0.1/tbb/lib/intel64/g...
''' A non-empty array A consisting of N integers is given. A permutation is a sequence containing each element from 1 to N once, and only once. For example, array A such that: A[0] = 4 A[1] = 1 A[2] = 3 A[3] = 2 is a permutation, but array A such that: A[0] = 4 A[1] = 1 A[2] = 3 is not a...
n = x // 2 for i = 2 to n if (x % i == 0) Print "x is not prime" Exit Print "x is prime"
#!/bin/bash # Copyright 2020 Huawei Technologies Co., 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 applicable law ...
import pulumi from pulumi import ResourceOptions from pulumi_openstack import network, compute class FloatingIP(pulumi.CustomResource): def __init__(self, name: str, network_id: str, opts: ResourceOptions = None): super().__init__('custom:resource:FloatingIP', name, { 'network_id': network_id, ...
<gh_stars>1-10 /* Pangram is a sentence that contains all the letters in the alphabet https://en.wikipedia.org/wiki/Pangram */ const checkPangram = ( string ) => { if ( typeof string !== 'string' ) { throw new TypeError( 'The given value is not a string' ) } const frequency = new Set() for ( con...
<reponame>theweaver19/wbtc-cafe declare module "react-smooth-marquee"; declare module "wallet-address-validator";
def reverseCharacters (string): reverseStr = "" for i in range(len(string)-1, -1, -1): reverseStr += string[i] return reverseStr
def find_max_index(arr): max = -float('inf') max_index = -1 for i, num in enumerate(arr): if num > max: max_index = i max = num return max_index arr = [5, 3, 1, 7, 9, 2] max_index = find_max_index(arr) print(max_index) # 4
#!/usr/bin/env bash set -ex target=${1} openssl pkcs12 -in ${target}.pfx -nocerts -out key.pem -nodes openssl pkcs12 -in ${target}.pfx -nokeys -out cert.pem openssl rsa -in key.pem -out client.key base64 -i cert.pem -o cert.pem.b64 base64 -i client.key -o client.key.b64
def executeKrillCode(code): output = "" data = [0] * 30000 # Initialize the data array with 30000 cells pointer = 0 code_ptr = 0 while code_ptr < len(code): command = code[code_ptr] if command == '>': pointer += 1 elif command == '<': pointer -= 1 ...
#!/bin/bash ########## Define Resources Needed with SBATCH Lines ########## #SBATCH --time=4:00:00 #SBATCH --mem=6G #SBATCH --ntasks 1 #SBATCH --cpus-per-task 1 #SBATCH --job-name batch~1006,step~1026,pop~2,id1~ko-s_i_spikersharing #SBATCH --account=devolab #SBATCH --output="/mnt/home/mmore500/slurmlogs/slurm-%A.out" #...
import pandas as pd # read the data df = pd.read_csv('data_file.csv') # remove empty values df.dropna(inplace=True) # get the row counts row_count = len(df) # calculate the average if row_count > 0: average = sum(df['score']) / row_count else: print('No data')
<reponame>ckpt/backend-services package players import ( "errors" "github.com/m4rw3r/uuid" "time" ) type DummyPlayerStorage struct { players []*Player users []*User debts []*Debt } func (dps *DummyPlayerStorage) init() { dummyUUIDs := createUUIDs(2) dps.users = []*User{ &User{ Username: "mortenk", ...
<filename>node_modules/vue-gmaps/src/index.js import loadGoogleMapsAPI from 'load-google-maps-api' function plugin (Vue, { libraries = [ 'places' ], key, client, version = '3', loadGoogleApi = true } = {}) { if (plugin.installed) { return } Vue.directive('gmaps-searchbox', { inserted: function...
<gh_stars>0 export * from './api'; export * from './decorator'; export * from './dto-compiler'; export * from './vault'; export * from './result'; export * from './type';
def test_first_only(self, mock_fetch): """Function: test_first_only Description: Test with first argument only. """ def process_data(*args): if len(args) == 1: return args[0] else: return args # Test case for single argument result_single_arg = process_...
package com.appium.config; import com.appium.pages.CommentPage; import com.appium.pages.LoginPage; import com.appium.pages.PublishPage; import com.appium.pages.WelcomePage; import io.appium.java_client.MobileElement; import java.io.IOException; public interface DeviceInterface { public void login(LoginPage logi...
#!/bin/bash ocm_namespace="open-cluster-management" oc project $ocm_namespace operator_subscription="acm-operator-subscription" operator_csv="advanced-cluster-management.v1.0.0" custom_catalog_source="acm-custom-registry" custom_registry_service="acm-custom-registry" custom_registry_deployment="acm-custom-registry" ...
/* Copyright 2020-2021 University of Oxford and Health and Social Care Information Centre, also known as NHS Digital 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/licens...
#!/usr/bin/env bash set -ex ROOT=${PWD} PREFIX=${PWD}/install mkdir -p build pushd build conan install .. -s build_type=Release --build missing cmake .. \ -DCMAKE_PREFIX_PATH=${PWD} \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=${PREFIX} cmake --build . --target install TMPDIR=`dirname $(mktemp -u -t...
#!/bin/bash num1=4 num2=3 sum=$(($num1+$num2)) echo "$num1 + $num2 = $sum"
package org.jooby.internal.metrics; import static org.easymock.EasyMock.expectLastCall; import java.util.Map; import org.jooby.test.MockUnit; import org.junit.Test; import org.junit.runner.RunWith; import org.powermock.core.classloader.annotations.PrepareForTest; import org.powermock.modules.junit4.PowerMockRunner; ...
<reponame>fabianklonsdorf/ixhh 'use strict'; var _20 = { elem: 'svg', attrs: { xmlns: 'http://www.w3.org/2000/svg', viewBox: '0 0 32 32', width: 20, height: 20, }, content: [ { elem: 'path', attrs: { d: 'M18 31h2v-2a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2h2v-2a3.003 3....
import os import requests import subprocess import time from src.ondisk_config import WORK_DIR from src.ondisk_config import reload_nginx_config def tear_down(): os.system('docker-compose down') os.system(f'rm -rf {WORK_DIR}') os.system(f'echo "unettest has finished its business"') def spin_up(detach=Tr...
<filename>app/helpers/reviews_helper.rb module ReviewsHelper def form_url_helper(campsite) #if campsite exists, campsite ? campsite_reviews_path(campsite) : campsites_path end def find_user(review) @user = User.find_by(id: review.user_id).username end def star_rating(revie...
<reponame>PauloGoncalvesBH/zup-protractor-with-docker const { Home, ResultadoBusca, DetalhesDoProduto, DispositivosEcho, Carrinho } = require('../page_objects') describe('Fluxo de sucesso', () => { beforeEach(() => Home.visit()) afterEach(() => Carrinho.excluirProduto()) it('Adicionar produto a partir da caixa...