This file contains 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
<?php | |
namespace GoodDay; | |
use Greetings\HelloWordService; | |
beforeEach(function () { | |
$this->helloService = new HelloWordService(); | |
}); | |
it('should say Hello World!', function () { |
This file contains 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
# Blockchain Pandora | |
''' | |
Listare API Pandora | |
User: | |
http://127.0.0.1:port/user/set_receiver -> Seteaza un nou utilizator al acestei retelei. | |
Block: | |
http://127.0.0.1:port/block/mine_block -> Mineaza un block nou pe care il adauga la retea. |
This file contains 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
# 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 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 |
This file contains 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
from opensearchpy import OpenSearch | |
host = 'localhost' | |
port = 9200 | |
auth = ('admin', 'admin') # For testing only. Don't store credentials in code. | |
# Create the client with SSL/TLS enabled, but hostname and certificate verification disabled. | |
client = OpenSearch( | |
hosts=[{'host': host, 'port': port}], | |
http_compress=True, # enables gzip compression for request bodies |
This file contains 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
FROM python:3.10.8-bullseye | |
ARG USERNAME=beaver | |
ARG USER_UID=1000 | |
ARG USER_GID=$USER_UID | |
# Create the user | |
RUN groupadd --gid $USER_GID $USERNAME \ | |
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \ | |
# |
This file contains 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": "0.3.2", | |
"license": "MIT", | |
"description": "Tools for various automations 🧰", | |
"homepage": "https://github.com/mihaichris/atelier-toolbox", | |
"url": "https://github.com/mihaichris/atelier-toolbox/releases/download/v0.3.2/atelier-toolbox_0.3.2_windows_amd64.zip", | |
"hash": "ae01ec165f11d3064e0fdfab02b8759d5bb72427f3dd21d25f5615ac7a5a0e0b", | |
"bin": "toolbox.exe", | |
"checkver": { | |
"github": "https://github.com/mihaichris/atelier-toolbox" |
This file contains 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 actor.CappuccinoActor.{Cappuccino, CappuccinoActor, CappuccinoInit, CappuccinoMsg} | |
import actor.TeaActor.{Tea, TeaActor, TeaInit, TeaMsg} | |
import actor.UserInteractionActor.{AskAgainForBeverage, UserInteractionActor} | |
import akka.actor.{Actor, ActorSystem, Props} | |
import exception.ExceptionProcessingOrder | |
object CoffeeMachine extends App { | |
val system = ActorSystem("CoffeeMachineSupervisor") | |
val coffeeMachine = system.actorOf(Props(new CoffeeMachine()), "CoffeeMachineSupervisor") |
This file contains 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 org.junit.Test; | |
import static org.junit.Assert.*; | |
public class SignChecker { | |
public String checkSign(int num) { | |
if (num > 0) { | |
return "Positive"; | |
} else if (num < 0) { | |
return "Negative"; |
This file contains 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.util.Scanner; | |
public class CharacterSearch { | |
public static void main(String[] args) { | |
Scanner scanner = new Scanner(System.in); | |
String inputString; | |
char searchChar; | |
String searchAgain = "y"; |