π¨βπ»
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Check if user is already in the docker group | |
if groups $USER | grep &>/dev/null '\bdocker\b'; then | |
echo "β User '$USER' is already in the docker group." | |
else | |
echo "β Adding user '$USER' to the docker group..." | |
sudo usermod -aG docker $USER | |
echo "π Applying group changes to current session..." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.9" | |
services: | |
dynamodb-local: | |
command: "-jar DynamoDBLocal.jar -sharedDb -dbPath ./data" | |
image: "amazon/dynamodb-local:latest" | |
container_name: dynamodb-local | |
network_mode: host # Set the network mode to host | |
# ports: | |
# - "8000:8000" | |
volumes: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ "$1" = "setup" ]; then | |
docker network create redis-cluster | |
docker run -e ALLOW_EMPTY_PASSWORD=yes -e REDIS_NODES=redis1,redis2,redis3,redis4,redis5,redis6 --name redis1 --network redis-cluster -p 6379:6379 -d bitnami/redis-cluster:latest | |
docker run -e ALLOW_EMPTY_PASSWORD=yes -e REDIS_NODES=redis1,redis2,redis3,redis4,redis5,redis6 --name redis2 --network redis-cluster -p 6380:6379 -d bitnami/redis-cluster:latest | |
docker run -e ALLOW_EMPTY_PASSWORD=yes -e REDIS_NODES=redis1,redis2,redis3,redis4,redis5,redis6 --name redis3 --network redis-cluster -p 6381:6379 -d bitnami/redis-cluster:latest | |
docker run -e ALLOW_EMPTY_PASSWORD=yes -e REDIS_NODES=redis1,redis2,redis3,redis4,redis5,redis6 --name redis4 --network redis-cluster -p 6382:6379 -d bitnami/redis-cluster:latest | |
docker run -e ALLOW_EMPTY_PASSWORD=yes -e REDIS_NODES=redis1,redis2,redis3,redis4,redis5,redis6 --name redis5 --network redis-cluster -p 6383:6379 -d bitnami/redis-cluster:latest | |
docker run -e ALLOW_EMPT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Template for JavaScript based authenticator's. | |
* See org.keycloak.authentication.authenticators.browser.ScriptBasedAuthenticatorFactory | |
*/ | |
// import enum for error lookup | |
AuthenticationFlowError = Java.type("org.keycloak.authentication.AuthenticationFlowError"); | |
ServicesLogger = Java.type("org.keycloak.services.ServicesLogger"); | |
AbstractIdpAuthenticator = Java.type("org.keycloak.authentication.authenticators.broker.AbstractIdpAuthenticator"); | |
IdpCreateUserIfUniqueAuthenticator = Java.type("org.keycloak.authentication.authenticators.broker.IdpCreateUserIfUniqueAuthenticator"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.gyansagar.services; | |
import com.gyansagar.exceptions.DuplicateEntryException; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.stereotype.Service; | |
import com.gyansagar.entities.Buyer; | |
import com.gyansagar.repository.BuyerRepository; | |
@Service |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
await client.bulk({ | |
index: index, | |
type: "_doc", | |
body: [ | |
{ update: { _id: "1" } }, | |
{ | |
script: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.datatransfer.StringSelection; | |
import java.io.DataInputStream; | |
/* | |
* Link For reference: https://www.brainkart.com/article/Simplified-Data-Encryption-Standard-(S-DES)_8343/ | |
*/ // https://www.brainkart.com/article/Simplified-Data-Encryption-Standard-(S-DES)_8343/ | |
public class SDES { | |
public int K1,K2; | |
//Note: below matrics will be provided in lab(PICT).. | |
//For performing P10 permutation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//============================================================================ | |
// Name : MPI_binary_search.cpp | |
// Author : VaibhavK | |
// Version : | |
// Copyright : Way2TechIn | |
//============================================================================ | |
#include <iostream> | |
#include<mpi/mpi.h> | |
#include<cstdlib> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include "omp.h" | |
#define MAX_SIZE 10 | |
//Function for creating an input array||Update accoorind to your need | |
void generate_list(int * x, int n) { | |
int i,j,t; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <omp.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
void swap(); | |
int main (int argc, char *argv[]) { | |
int SIZE =1<<8; | |
int A[SIZE]; | |
for(int i=0;i<SIZE;i++) |
NewerOlder