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
#!/usr/bin/env python3 | |
# -*- coding: UTF-8 -*- | |
""" | |
Example about decimals. | |
""" | |
from decimal import Decimal | |
def sum_diff_order(): | |
""" |
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.math.BigDecimal; | |
public class Main { | |
public static void main(String[] args) { | |
sumDiffOrder(); | |
sumNotCorrect(); | |
sumCorrect(); | |
} | |
private static void sumDiffOrder() { |
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
""" | |
Esta funcion simula el juego al perder dinero pero esta programada con funciones | |
""" | |
def decrease_money(money: int, amount: int): | |
""" | |
Decrease player money given an amount. | |
:type money: int | |
:param money: Total of money |
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
""" | |
Handle all the player class | |
""" | |
class EnemyPlayer: | |
""" | |
Handler the enemy player | |
""" |
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
#!/usr/bin/env bash | |
USERNAME="my_user" | |
REPOSITORY="the_repo" | |
TOKEN="ghp_github_token permissions: repo, workflow" | |
WORKFLOW_RUNS=$( | |
curl \ | |
-H "Accept: application/vnd.github.v3+json" \ | |
--silent \ |
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
#!/bin/bash +xv | |
echo -e "~~~~~~~~~~~ START THE SERVICE TO RUN REFLECTOR ~~~~~~~~~~~" | |
echo "" | |
while [ 1 ] | |
do | |
if ping -c 1 google.com >> /dev/null 2>&1 | |
then | |
echo -e "~~~~~~~~~~~ RUN THE REFLECTOR PACKAGE ~~~~~~~~~~~" |
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
#!/usr/bin/perl | |
# | |
# Strict and warnings are recommended. | |
use strict; | |
use warnings; | |
use Cwd; | |
use File::Find; | |
my $base_path = Cwd::cwd . '/'; | |
my $path = $base_path . 'pwndbg/'; |
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
require 'test/unit' | |
extend Test::Unit::Assertions | |
FIRST_TEN = ["zero ", "one ", "two ", "three ", "four ", "five ", "six ", "seven ", "eight ", "nine "] | |
SECOND_TEN = ["ten ", "eleven ", "twelve ", "thirteen ", "fourteen ", "fifteen ", "sixteen ", "seventeen ", "eighteen ", "nineteen "] | |
OTHER_TENS = ["", "", "twenty ", "thirty ", "forty ", "fifty ", "sixty ", "seventy ", "eighty ", "ninety "] | |
HUNDRED = "hundred " | |
def number2text(number) |
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
##### Perfect Number | |
puts "This is the perfect number." | |
x = 30 | |
(x).times do |n| | |
(n).downto(1) do |a| | |
#puts "a: #{a}" | |
d = 0 | |
(1..a).each do |b| | |
if a % b == 0 |