Skip to content

Instantly share code, notes, and snippets.

View leyyce's full-sized avatar
📓
Studying

Leya Wehner leyyce

📓
Studying
View GitHub Profile

Keybase proof

I hereby claim:

  • I am ElCap1tan on github.
  • I am elcapitan (https://keybase.io/elcapitan) on keybase.
  • I have a public key whose fingerprint is 46BC 0935 22EB D7B6 869A 22F1 E0B0 6F80 3327 2AAA

To claim this, I am signing this object:

@leyyce
leyyce / guessing_game.rs
Last active December 19, 2016 22:49
Guessing game [Rust]
extern crate rand;
use std::io;
use rand::Rng;
use std::cmp::Ordering;
fn main() {
println!("Guess the number!");
let secret_number = rand::thread_rng().gen_range(1, 101);
@leyyce
leyyce / accountbutton.layout
Created July 25, 2018 12:43
resource/layout/accountbutton.layout
"resource/layout/accountbutton.layout"
{
styles
{
AccountPersonaStyleOffline
{
padding-right=6
padding-left=12
textcolor=Friends.OfflineColor
}
@leyyce
leyyce / accountmenu.layout
Created July 25, 2018 12:44
resource/layout/accountmenu.layout
"resource/layout/accountmenu.layout"
{
styles
{
AccountMenuStyle
{
render_bg
{
// top area and graphic
0="fill( x0, y0, x1, y1, customgreyprimary)"
@leyyce
leyyce / hangman.py
Last active August 15, 2019 22:31
Simple text based Hangman game for the console in python
class Hangman:
def __init__(self):
self.stages = []
self.stages.append("""
___________.._______
| .__________))______|
| | / / ||
| |/ / ||
@leyyce
leyyce / hash.py
Created August 15, 2019 20:54
Hash a string from console input
import hashlib
def hash_word(string, hash_method):
if hash_method == "md5":
return hashlib.md5(string.encode()).hexdigest()
if hash_method == "sha3_256":
return hashlib.sha3_256(string.encode()).hexdigest()
@leyyce
leyyce / progress_printer.py
Last active November 1, 2019 18:00
Simple and leightweight multi-threaded port scanner written in python that can work with port and ip address ranges. At the moment this script only supports full-connection tcp scans. For usage help see >python pyscan.py -h
import sys
class ProgressPrinter:
def __init__(self, units, unit_type='', max_length=50, pre='', post='', fill='=', head='>', empty=' '):
if units > max_length:
self.steps = max_length / units
self.max_length = max_length
else:
self.steps = 1
@leyyce
leyyce / main.py
Last active September 17, 2019 13:15
Student Credits Management
from student_register import StudentRegister
from student import Student
def main():
register = StudentRegister("Bachelor CS 2019")
napoleon = Student('Napoleon', 1, 20)
snowball = Student('Snowball', 2, 22)
squealer = Student('Squealer', 3, 19)
@leyyce
leyyce / fischer-yates.cs
Last active October 13, 2019 12:25
C# Implementation of the Fischer-Yates shuffle
using System;
namespace Fisher_Yates_shuffle
{
class Program
{
static void Main(string[] args)
{
// Generate a set of numbers from user input...
Console.Write("Enter count of numbers to shuffle: ");
@leyyce
leyyce / Main.java
Last active November 22, 2019 23:34
Bruch als Objekt
public class Main {
public static void main(String[] args) {
Bruch b = null;
Bruch b2 = null;
try {
b = new Bruch(18,36);
b2 = new Bruch(13, 24);
}