Skip to content

Instantly share code, notes, and snippets.

View BluePyTheDeer251's full-sized avatar

BluePy BluePyTheDeer251

View GitHub Profile
@BluePyTheDeer251
BluePyTheDeer251 / playercount.py
Last active November 12, 2024 16:49
A simple player counter in Python
def player_count(game_players):
players = ["You", "Me"]
return players
print("Player count: ", player_count(players)
# This possibly doesn't work.
@BluePyTheDeer251
BluePyTheDeer251 / functionsyay.clj
Last active November 22, 2024 16:13
Some more complex functions in Clojure.
;; A function (non-interactable) that will calculate the area of a triangle (plus a message by you)
(defn triangle [message]
(println "Result: ")
(let [b 8 h 7] (/ (* b h) 2)))
(str message))
(triangle "This is fun!")
@BluePyTheDeer251
BluePyTheDeer251 / funpractice.clj
Last active November 11, 2024 14:59
Some Clojure functions for me to practice.
;; A function that will just sum and print some line.
(defn sum-print [message]
(str message (+ 6 12)))
(sum-print "I love Lisp and its Dialects")
;; A function that will print a normal text and a reverse version
@BluePyTheDeer251
BluePyTheDeer251 / plsdontgetme.py
Last active November 12, 2024 01:54
Some Python war crimes that will get you arrested if used in production.
for i in range(1000000):
print(i)
# Man if your toaster survives good job
nn = 69
# For your sanity nn is nerdNumber
if nn > 0:
print("It's equal than 0.")
@BluePyTheDeer251
BluePyTheDeer251 / morefunctions.clj
Last active November 10, 2024 19:35
A couple of Clojure functions
;; A function that will tell you nice things for some reason
(defn nice [nice_word]
(str "You are " nice_word))
(nice "intelligent")
;; A function that will tell you your country
(defn country [country]
@BluePyTheDeer251
BluePyTheDeer251 / sums.dart
Last active November 10, 2024 19:02
A simple calculator (that only does sums) in Dart
import 'dart:io';
void main() {
print("First number: ");
firstNumber = stdin.readLineSync();
print("Reading...");
sleep(Duration(seconds: 1));
print("Done!");
print("Second number: ");
secondNumber = stdin.readLineSync();
@BluePyTheDeer251
BluePyTheDeer251 / functionsarefun.clj
Last active November 10, 2024 16:14
How to make functions in Clojure (mostly for me)
;; Example in docs
(defn greet [name]
(str "Hello, " name))
;; My first ever function (very neat)
(defn selfgrade [grade]
(str "Your own grade: " grade))
;; Calling your function
(selfgrade "10")
@BluePyTheDeer251
BluePyTheDeer251 / hello.clj
Created November 10, 2024 16:04
Hello World in Clojure
;; New line generated
(println "Hello World!")
@BluePyTheDeer251
BluePyTheDeer251 / pointless.cs
Last active November 10, 2024 01:59
Some stupid thing for me in C#
int anInteger = 251;
float aFloat = 2.51045;
string aString = "Yo mama";
char aCharacter = "b";
bool aBoolean = true;
Console.WriteLine($"Integer: {anInteger}");
Console.WriteLine($"Float: {aFloat}");
Console.WriteLine($"String: {aString}");
Console.WriteLine($"Character: {aCharacter}");
@BluePyTheDeer251
BluePyTheDeer251 / forstatements.py
Last active November 3, 2024 22:30
For me to remember how to FREAKING USE FOR STATEMENTS in Python.
# Average for statement
myArray = ["yes", "no", "maybe"]
for m in myArray:
print(m, len(myArray), myArray)
# Range
for i in range(251):
print(i)
print("I am not responsible for your device burning somehow")