A blog post accompanies this code segement on Medium or https://medium.com/etwas/higher-order-numeric-differential-equations-python-bc23dd148a0b
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
/***************** | |
Adafruit MQTT Library ESP8266 Example | |
Must use ESP8266 Arduino from: | |
https://github.com/esp8266/Arduino | |
Works great with Adafruit's Huzzah ESP board & Feather | |
----> https://www.adafruit.com/product/2471 |
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
def lorenz(x0,y0,z0,start_time,time_step): | |
""" | |
Returns an array of points, which the lorenz system passes by iteratively perfoming each rk4 timestep | |
""" | |
x,y,z = [x0],[y0],[z0] # Start Points | |
count = 0 | |
t = start_time or 0 # Start Time | |
dt = time_step or 0.01 # Time Step | |
while t < 150: | |
t+= dt |
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 "MDB-c.c" // <--- This will import your code so we can | |
// use your solution to create a linked | |
// list of movie reviews for testing! | |
int main() | |
{ | |
ReviewNode *MDB_head = NULL; | |
ReviewNode *temp = NULL; | |
printf("Custom Tester Assuming you have passed all tests in A1_driver \n"); |
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
#Runge-Kutta Method Single Time Step | |
def rk4(func,t,a,b,c,dt): | |
""" | |
Peforms a single time step of the Runge-Kutta 4th Order Method. | |
The below function finds the ki value for [dx,dy,dz] and return the value to move Yn+1 | |
func is an input of functions, for the Lorenz system this is [dx,dy,dz] | |
Recall Rk4 Equations : | |
k1 = h*f(xn,yn) | |
k2 = h*f(xn+h/2,yn+k1/2) |
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
/* | |
A2 Custom Tester Project | |
*/ | |
#include <stdbool.h> | |
#include<string.h> | |
#include <stdlib.h> | |
#include"BSTs.c" | |
double findHarmFreq(double curFreq, int semitones){ |
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<stdio.h> | |
#include<stdlib.h> | |
#include"ingredient_graph.c" | |
int output_check(intNode *head, intNode *checkAgainst){ | |
// Function aims to autocheck the printed outputs | |
if(head == NULL){ | |
return 1; // Failed | |
} |
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
// Functions | |
let tweetParser = async function (tweetDom) { | |
let tweetContent = tweetDom.innerText; | |
let tweet = { | |
name: "", | |
username: "", | |
time: "", | |
content: "", | |
interaction: { | |
reply: "", |
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
The following is a conversation with an AI assistant. The assistant is helpful, creative, clever, and very friendly. | |
Human: Hello, who are you? | |
AI: I am an AI created by OpenAI. How can I help you today? | |
Human: Can you help me debug an SSL configuration error? | |
AI: Sure. What's wrong? | |
Human: When I open the website, it shows 'ERR_SSL_PROTOCOL_ERROR' | |
AI: The server's TLS configuration does not support the protocol you are trying to use. | |
Human: How do I fix that? | |
AI: Check your server's configuration. Make sure that TLSv1.0 or TLSv1.1 is supported. |
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
# This file will setup the default config that @CryogenicPlanet uses across machines | |
yes | sudo apt install zsh | |
yes | sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" | |
git clone https://github.com/denysdovhan/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt" --depth=1 | |
ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme" | |
source ~/.zshrc | |
echo "Setting Vim config" | |
wget https://missing.csail.mit.edu/2020/files/vimrc | |
mv vimrc ~/.vimrc | |
echo "Manually Set .zshrc theme to spaceship" |
OlderNewer