From dcda1a50dee51dea51fa2ebf667c67a464e6f50e Mon Sep 17 00:00:00 2001 From: Matthew Thomas Date: Fri, 4 Oct 2019 17:11:57 +0100 Subject: [PATCH 1/6] Add AWK and a simple temperature convertor Remove other branch code --- CONTRIBUTORS.md | 5 ----- awk/temperature_convertor.awk | 1 + bash/fizzbuzz.sh | 2 -- bash/machin-pi-approximation.sh | 4 ---- 4 files changed, 1 insertion(+), 11 deletions(-) create mode 100644 awk/temperature_convertor.awk delete mode 100644 bash/fizzbuzz.sh delete mode 100644 bash/machin-pi-approximation.sh diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 545ae634..081b91a0 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -365,8 +365,3 @@ Name: [BenjaminUrquhart](https://github.com/BenjaminUrquhart)
Coding Experience: Discord Bot Developer (Java) + misc. wrappers.
Programming Languages: Python 2/3, Java 8
Email: benjamin@ericsart.com - -Name: [pbootly](https://github.com/pbootly)
-Place: Southampton, United Kingdom
-Coding Experience: System administrator. Bash, Node and some C.
-Email: mthomas@polybit.io
diff --git a/awk/temperature_convertor.awk b/awk/temperature_convertor.awk new file mode 100644 index 00000000..0401ae00 --- /dev/null +++ b/awk/temperature_convertor.awk @@ -0,0 +1 @@ +BEGIN {printf "Enter a temperature of format ##f or ##c to get the opposing value\n"; getline < "-"} BEGIN { if ( $1 ~ /f/ ) { print (((substr($1, 1, length($1)-1) - 32) * 5/9))"C"} else if ( $1 ~ /c/ ) { print (substr($1, 1, length($1)-1) * 9 / 5 + 32"F")} else {print "Usage: ##f to convert to celcius ##c to convert to fahrenheit"}} diff --git a/bash/fizzbuzz.sh b/bash/fizzbuzz.sh deleted file mode 100644 index 70c42930..00000000 --- a/bash/fizzbuzz.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -seq 100 | awk '$0=NR%15?NR%5?NR%3?$0:"fizz":"buzz":"fizzbuzz"' diff --git a/bash/machin-pi-approximation.sh b/bash/machin-pi-approximation.sh deleted file mode 100644 index f91b663e..00000000 --- a/bash/machin-pi-approximation.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -# Machin approximation of pi in bash with 100 terms -echo $(scale=100; seq 1 2 200 | xargs -n1 -I{} echo '16*(1/5)^{}/{}-4*(1/239)^{}/{}' | paste -sd-+) | bc -l From c1481db91af6010b34282e4938f76ef455b13a89 Mon Sep 17 00:00:00 2001 From: Kazuko Kannagi <43587695+kannagikazuko@users.noreply.github.com> Date: Fri, 18 Oct 2019 00:25:46 -0400 Subject: [PATCH 2/6] Rename temperature_convertor.awk to pbootly_temperature_convertor.awk --- ...emperature_convertor.awk => pbootly_temperature_convertor.awk} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename awk/{temperature_convertor.awk => pbootly_temperature_convertor.awk} (100%) diff --git a/awk/temperature_convertor.awk b/awk/pbootly_temperature_convertor.awk similarity index 100% rename from awk/temperature_convertor.awk rename to awk/pbootly_temperature_convertor.awk From f29cdf72e21f0f9c25c3196fe6f8bb622baa8b1b Mon Sep 17 00:00:00 2001 From: Abhishek Singh Date: Tue, 22 Oct 2019 04:03:41 +0530 Subject: [PATCH 3/6] added basic Hello World Code in C --- CONTRIBUTORS.md | 6 ++++++ c/hello/n6wbi6_hello_world.c | 8 ++++++++ 2 files changed, 14 insertions(+) create mode 100644 c/hello/n6wbi6_hello_world.c diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index c1b7b34b..652380b5 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -439,3 +439,9 @@ Name: [Antonio](https://github.com/toluwalope19)
Place: Nigeria
Coding Experience: Python and javaScript.
Email: tolubarca01@gmail.com
+ +Name: [Abhishek Singh](https://github.com/n6wbi6)
+Place: India
+Coding Experience: 2 years of coding experience in C.
+Email: abhisheksingh.g07@gmail.com
+ diff --git a/c/hello/n6wbi6_hello_world.c b/c/hello/n6wbi6_hello_world.c new file mode 100644 index 00000000..314f1165 --- /dev/null +++ b/c/hello/n6wbi6_hello_world.c @@ -0,0 +1,8 @@ +#include + +int main() { + + printf("Hello, world!"); + return 0; + +} From 9f1b24aef29f54b6d1313b2fc40f580be540d0be Mon Sep 17 00:00:00 2001 From: Abhishek Singh Date: Thu, 24 Oct 2019 14:07:41 +0530 Subject: [PATCH 4/6] added one-line factorial lambda function --- python/factorial/factorial_n6wbi6.py | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 python/factorial/factorial_n6wbi6.py diff --git a/python/factorial/factorial_n6wbi6.py b/python/factorial/factorial_n6wbi6.py new file mode 100644 index 00000000..120f16c7 --- /dev/null +++ b/python/factorial/factorial_n6wbi6.py @@ -0,0 +1,3 @@ +fact = lambda x: 1 if x == 0 else x * fact(x-1) +#testing it +print(fact(25)) \ No newline at end of file From dc045e93ab3b5e10552aae92f28375ab1eaaa2f6 Mon Sep 17 00:00:00 2001 From: Abhishek Singh Date: Thu, 24 Oct 2019 14:15:40 +0530 Subject: [PATCH 5/6] added experience in python --- CONTRIBUTORS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 652380b5..534158db 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -442,6 +442,6 @@ Email: tolubarca01@gmail.com
Name: [Abhishek Singh](https://github.com/n6wbi6)
Place: India
-Coding Experience: 2 years of coding experience in C.
+Coding Experience: 2 years of coding experience in C and python.
Email: abhisheksingh.g07@gmail.com
From ab62c8cb0a05fade029072e561adf0c6a82beec9 Mon Sep 17 00:00:00 2001 From: William Zhou Date: Sun, 27 Oct 2019 19:14:17 -0400 Subject: [PATCH 6/6] Update CONTRIBUTORS.md --- CONTRIBUTORS.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 534158db..09a44454 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -444,4 +444,3 @@ Name: [Abhishek Singh](https://github.com/n6wbi6)
Place: India
Coding Experience: 2 years of coding experience in C and python.
Email: abhisheksingh.g07@gmail.com
-