Skip to content

Instantly share code, notes, and snippets.

View bee-san's full-sized avatar
🌻
Tending to my plants

Autumn (Bee) bee-san

🌻
Tending to my plants
View GitHub Profile
@bee-san
bee-san / Readme.md
Last active December 12, 2019 03:58

Made for Skerritt.blog Every new plot starts with the x axis as:

[2, 4, 6, 8, 10, 12, 14]

Then the y axis is that function applied to the x. So log is:

x = [2, 4, 6, 8, 10, 12, 14]
y = [(z * math.log2(z)) for z in x]
# Python program for weighted job scheduling using Dynamic
# Programming and Binary Search
# Class to represent a job
class Job:
def __init__(self, start, finish, profit):
self.start = start
self.finish = finish
self.profit = profit
render() {
return (
<div className="container mt-5">
<div className="row">
<div className="col-md-4">
<div className="card-deck">
{this.state.books.map(movie => <MovieCard {...movie.fields} /> )}
</div>
</div>
</div>
n = 6
def recur_factorial(n):
if n == 1:
return n
else:
return n * recur_factorial(n-1)
print(recur_factorial(n))
def F(n):
if n == 0 or n == 1:
return n
else:
return F(n-1)+F(n-2)
n = 6
def recur_factorial(n):
if n == 1:
return n
else:
return n * recur_factorial(n-1)
print(recur_factorial(n))
def f(n):
if n == 0 or n == 1:
return 1
else:
fibo = 1
fibroPrev = 1
for i in range (2, n):
temp = fibo
fibo = fibo + fiboPrev
fiboPrev = temp
def f(n):
if n == 0 or n == 1:
return 1
n = 6
def recur_factorial(n):
if n == 1:
return n
else:
return n * recur_factorial(n-1)
print(recur_factorial(n))
/*
A Lisitsa, 2019, The code below was taken without any changes from
https://docs.oracle.com/javase/8/docs/technotes/guides/security/crypto/CryptoSpec.html#DH3Ex
*/
/*
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met: