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 re | |
# Problem 1 | |
# --------- | |
# Write three functions that compute the sum of the numbers in a given list | |
# using a for-loop, a while-loop, and recursion. | |
input_1 = [1, 2, 3, 4, 5] #15 | |
def p1_for(lst): | |
c = 0 |
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.nio.ByteBuffer | |
import java.util | |
import io.circe.parser._ | |
import io.circe.syntax._ | |
import io.circe.{Decoder, Encoder, _} | |
import org.apache.kafka.common.errors.SerializationException | |
import org.apache.kafka.common.serialization.{Deserializer, Serde, Serializer} | |
import scala.util.Try |
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
# pass files or dirs to cd | |
cd_ () { | |
if [[ -d ${1} ]]; then | |
#echo ${1} is a directory" | |
cd ${1} | |
elif [[ -f ${1} ]]; then | |
#echo ${1} is a file" | |
cd $(dirname "${1}") | |
else | |
#echo ${1} is not valid" |