Skip to content

Instantly share code, notes, and snippets.

View kalkis's full-sized avatar

Dylan kalkis

View GitHub Profile
@kalkis
kalkis / breakcipher.c
Created May 28, 2018 15:58
reads in an encrypted text file, creates an xls spreadsheet of each letter against frequency in the text. Then creates a text file with the content decrypted.
#include <stdio.h>
#include <stdlib.h>
int main(void) {
setvbuf(stdout,NULL,_IONBF,0);
setvbuf(stderr,NULL,_IONBF,0);
int frequencies[26] = {}, n;
char alphabet[26] = "abcdefghijklmnopqrstuvwxyz";
@kalkis
kalkis / genxy.c
Created May 28, 2018 00:52
creates an xls file with x & y values where y = x / (1 + x^2)
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int some_func(double, double *);
int main(void) {
setvbuf(stdout,NULL,_IONBF,0);
setvbuf(stderr,NULL,_IONBF,0);
@kalkis
kalkis / Results.txt
Created March 15, 2018 16:23
A program which reads a set of match results, processes data for all teams involved, then displays statistics and a league table, which are saved to text files.
Arsenal 6 0 Sunderland
Fulham 5 0 Norwich
Newcastle 2 1 Spurs
QPR 0 5 Swansea
Reading 1 1 Stoke
WBA 3 0 Liverpool
WestHam 1 0 Villa
ManchesterCity 3 1 QPR
Swansea 2 2 Sunderland
Spurs 1 1 Norwich
@kalkis
kalkis / GuessControl.java
Created February 28, 2018 18:23
Multithreading exercise: a game where the player hits enter when they think 30 seconds has elapsed
package multithreading;
import java.util.Scanner;
/**
* @author kalkis
*
*/
public class GuessControl {
@kalkis
kalkis / RecursionTest.java
Created February 3, 2018 22:05
JUnit test case methods for Recursion.java
/**
*
*/
package practical5;
import static org.junit.Assert.*;
import org.junit.Before;
import org.junit.Test;
@kalkis
kalkis / Recursion.java
Created February 3, 2018 22:04
exercises in solving problems using recursion.
/**
*
*/
package practical5;
import java.util.Arrays;
/**
* @author kalkis
* exercises in solving problems using recursion
@kalkis
kalkis / RollAttributes.py
Created January 24, 2018 01:08
dice rolling functions for tabletop RPGs
# -*- coding: utf-8 -*-
"""
Created on Fri Mar 17 20:29:33 2017
@author: kalkis
"""
import random
def roll_die(n, dn):
@kalkis
kalkis / CommandLineReaderTest.java
Created January 24, 2018 00:01
JUnit test cases for CommandLineReader.java
/**
* corresponds to class's location in src folder
*/
package practicals.week3;
import static org.junit.Assert.*;
import java.io.ByteArrayOutputStream;
import java.io.OutputStream;
import java.io.PrintStream;
@kalkis
kalkis / CommandLineReader.java
Last active January 24, 2018 00:29
an exercise in command line execution from today's class
/**
*
*/
package practicals.week3;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
/**