Skip to content

Instantly share code, notes, and snippets.

View schroeshirecat's full-sized avatar

Schröshire Cat schroeshirecat

View GitHub Profile
@schroeshirecat
schroeshirecat / .rootrc
Created March 30, 2019 12:34
Illegible Fonts with CERN's ROOT
# @(#)root/config:$Id$
# Author: Fons Rademakers 22/09/95
# ROOT Environment settings are handled via the class TEnv. To see
# which values are active do: gEnv->Print().
# Path used by dynamic loader to find shared libraries.
# This path will be appended to the (DY)LD_LIBRARY_PATH on Unix
# and to PATH on Windows.
# Paths are different for Unix and Windows. The example shows the defaults
@schroeshirecat
schroeshirecat / hmactest.py
Created August 11, 2018 11:57
Testing HMAC and SHA256
# Python Example using HMACs and SHA256
import hashlib
import hmac
if __name__ == "__main__":
key = b"SOMEKEY" #str does not work, we need byte or bytearray
msg_a = b"someplaintext" #str does not work, we need byte or bytearray
h_sha256 = hashlib.sha256()
@schroeshirecat
schroeshirecat / fibonacci.py
Created July 11, 2018 13:34
Fibonacci with Python
def fib(n):
if n == 0:
return 0
elif n == 1:
return 1
else:
return fib(n - 2) + fib (n - 1)
if __name__ == "__main__":
result = fib(13)
@schroeshirecat
schroeshirecat / fibonacci.cs
Created July 11, 2018 12:57
Fibonacci with C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Fibonacci
{
class Fibonacci
{
@schroeshirecat
schroeshirecat / fibonacci.jl
Created July 11, 2018 11:06
Fibonacci with Julia
function fib(n)
if n == 0
return 0
elseif n == 1
return 1
else
return fib(n-2) + fib(n-1)
end
end
result = fib(15)
@schroeshirecat
schroeshirecat / fibonacci.exs
Created May 21, 2018 07:46
Fibonacci with Elixir
defmodule Fibonacci do
def fib(n) do
case n do
0 -> 0
1 -> 1
_ -> fib(n-2) + fib(n-1)
end
end
end
@schroeshirecat
schroeshirecat / fibonacci.hs
Created May 21, 2018 07:44
Fibonacci with Haskell
fib :: (Integral a) => a -> a
fib 0 = 0
fib 1 = 1
fib n = fib(n - 2) + fib(n - 1)
main = do
print (fib 15)