A4988 Drivers
Vref set to ~90% of stepper rated current
Rs = 0.1ohm
X = 0,58v (0,725A)
Y = 0,58v (0,725A)
Z = 0,58v (0,725A)
This file contains hidden or 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
| """ | |
| Classic cart-pole system implemented by Rich Sutton et al. | |
| Copied from http://incompleteideas.net/sutton/book/code/pole.c | |
| permalink: https://perma.cc/C9ZM-652R | |
| Continuous version by Ian Danforth | |
| """ | |
| import math | |
| import gym |
This file contains hidden or 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
| <?php | |
| namespace App\Providers; | |
| use Illuminate\Support\Collection; | |
| use Illuminate\Support\ServiceProvider; | |
| class MacroServiceProvider extends ServiceProvider | |
| { | |
| /** |
- Copy
redshift-status-off.svgandredshift-status-on.svgto/usr/share/icons/hicolor/scalable/apps/ - Restart
redshift-gtk
Or run the following commands:
wget https://gist.github.com/tobias-kuendig/d055892720cf09ae1a9d82075fb0f408/raw/5d3625e5f4ac7686d7b40880a211ee72f74ea3d3/redshift-status-off.svg -O /tmp/redshift-status-off.svg
wget https://gist.github.com/tobias-kuendig/d055892720cf09ae1a9d82075fb0f408/raw/5d3625e5f4ac7686d7b40880a211ee72f74ea3d3/redshift-status-on.svg -O /tmp/redshift-status-on.svg
This file contains hidden or 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
| /** | |
| * K.jpg's OpenSimplex 2, smooth variant ("SuperSimplex") | |
| * | |
| * More language ports, as well as legacy 2014 OpenSimplex, can be found here: | |
| * https://github.com/KdotJPG/OpenSimplex2 | |
| */ | |
| public class OpenSimplex2S { | |
| private static final long PRIME_X = 0x5205402B9270C86FL; |
To view the progress of a Powerpoint presentation, a progress bar can be displayed at the bottom of the slide show.
Once the slideshow is complete, go to Tools > Macro > Visual Basic Editor.
In the new window, select Insert > Module and copy this text in the blank page:
Sub AddProgressBar()
On Error Resume Next
This file contains hidden or 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
| import numpy as np | |
| def moving_average(data_set, periods=3): | |
| weights = np.ones(periods) / periods | |
| return np.convolve(data_set, weights, mode='valid') | |
| data = [1, 2, 3, 6, 9, 12, 20, 28, 30, 25, 22, 20, 15, 12, 10] | |
| ma = moving_average(np.asarray(data), 3) | |
| assert (np.around(ma, decimals=2)==np.array([2.0, 3.67, 6.0, 9.0, 13.67, 20.0, 26.0, 27.67, 25.67, 22.33, 19.0, 15.67, 12.33])).all() == True |
This file contains hidden or 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 | |
| # | |
| # Example of how to parse short/long options with 'getopt' | |
| # | |
| OPTS=`getopt -o vhns: --long verbose,dry-run,help,stack-size: -n 'parse-options' -- "$@"` | |
| if [ $? != 0 ] ; then echo "Failed parsing options." >&2 ; exit 1 ; fi | |
| echo "$OPTS" |