library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
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
#!/bin/bash | |
# This scripts fetches the latest Linux Mint ISO file with Cinnamon desktop for 64bit systems | |
# and stores the iso file in a temporary file. The script also checks the sha256 checksum of the | |
# downloaded file and returns the path to the file if the checksum is correct. Otherwise the | |
# script returns an error code. | |
# | |
# To get the newest version of Linux Mint, the script fetches the content of the download page of a local mirrot | |
# and extracts the version numbers from the links to get the highest version number. |
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
#!/usr/bin/tclsh | |
# TCL has its unique `upvar` method to map a variable from | |
# a superiour scope to a local variable. | |
# This makes it possible to access the values of previous | |
# iterations in recursive functions | |
proc fib {stop {step 0}} { | |
if {$step < 2} { | |
set result [expr $step == 0 ? 0 : 1] ;# first two values |
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
#include <iostream> | |
#include <cstdlib> | |
int main( int argc, char* argv[]) { | |
typedef unsigned long long int num_type; | |
std::cout << [](auto lambda, num_type number) -> num_type { return lambda(lambda, number); } ([](auto lambda, num_type number) -> num_type { return number <= 2 ? num_type(1) : lambda(lambda, number-1) + lambda(lambda, number-2); }, std::atoi(argv[1])) << std::endl; | |
return EXIT_SUCCESS; | |
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#!/usr/bin/env python3 | |
""" | |
Create a Matplotlib window which shows the fourier transform of a square wave signal. | |
""" | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from matplotlib.widgets import Slider | |
import math |
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
CC=g++ | |
main: | |
$(CC) -D LP main.cpp -o lp | |
$(CC) -D LPR main.cpp -o lpr | |
clean: | |
rm lp_wrapper | |
rm lpr_wrapper |
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
#!/bin/bash | |
# This is a script which uses QEMU to start a VM or set up the VM with a pre-defined installer | |
# when the virtual hard-drive cannot be found. It was made to quickly recreate a new VM in case | |
# the old one was deleted (maybe because someone messed arround with it) | |
# All the arguments QEMU needs to start the VM with the right parameters | |
# are also stored in this script and can be modified. | |
# The default OS installer is currently a Link to the OpenSUSE net installer | |
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
/* | |
* Arduino Morse message | |
* | |
* (c) Michael Hohenstein | |
* MIT License | |
* | |
* This code takes the string <Text> and translates it into morse code. | |
* When an LED is attached at Pin <LedPin> , the LED blinks to emit the | |
* message in Morse code. | |
*/ |