Delve Dive Explore Aesthetic Seamlessly Realm World Illustrious Unwavering Additionally
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
exa --tree -I vendor . |
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 | |
sudo pacman -S docker | |
systemctl start docker.service | |
sudo docker info | |
sudo usermod -aG docker $USER | |
docker run hello-world |
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 <cassert> | |
#include <functional> | |
#include <algorithm> | |
class Callable { | |
public: | |
int operator()(int x) { return x + 1; }; | |
}; |
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
import numpy as np | |
import matplotlib.pyplot as plt | |
# Define the implicit function for the heart shape | |
def heart_shape(x, y): | |
return (x**2 + y**2 - 1)**3 - x**2 * y**3 | |
# Create a grid of x, y points | |
x = np.linspace(-1.5, 1.5, 400) | |
y = np.linspace(-1.5, 1.5, 400) |
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
import matplotlib | |
import pandas as pd | |
from scipy.stats import pearsonr | |
from sklearn.preprocessing import MinMaxScaler | |
matplotlib.use('Qt5Agg') # Or another interactive backend such as 'Qt5Agg', 'GTK3Agg', etc. | |
import matplotlib.pyplot as plt | |
# Create a time index |
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
# Fitting a Gumbel distribution using scipy's built-in functions for simplicity and stability | |
from scipy.stats import gumbel_r | |
# Provided water heights including the latest years up to 2024 | |
water_heights = [ | |
2.60, 1.48, 0.98, 1.99, 1.45, 1.51, 2.50, 1.53, 2.00, 1.69, 1.52, 1.34, 2.05, 2.13, 1.19, | |
2.60, 1.91, 1.78, 0.98, 1.49, 2.21, 1.60, 1.58, 1.68, 1.75, 1.61, 1.31, 2.60, 1.56, 3.20, | |
2.05, 2.35, 1.70, 1.84, 1.34, 1.70, 1.64, 3.24, 2.51, 1.43, 1.60, 2.24, 4.75, 2.33, 1.60, | |
1.90, 1.26, 1.55, 1.67, 1.68, 1.71, 1.91, 2.10, 2.06, 2.52, 2.91, 1.80, 2.32, 2.08, 2.00, | |
1.99, 1.77, 2.16, 1.25, 2.67, 1.73, 2.72, 2.61, 3.13, 1.18, 1.36, 1.71, 1.72, 2.21, 1.93, |
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 | |
set -u | |
set -x # Print commands and their arguments as they are executed. | |
# find path to liblzma used by sshd | |
path="$(ldd $(which sshd) | grep liblzma | grep -o '/[^ ]*')" || echo "liblzma not found for sshd" | |
# If the path is empty, the script will now continue instead of exiting due to set -e being removed. | |
if [ "$path" == "" ] |
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 | |
# Input and output files | |
input_file="input.tex" | |
output_file="output.html" | |
# Function to remove curly braces | |
remove_braces() { | |
echo "$1" | sed 's/[{}]//g' | |
} |
To create a div
template in HTML that outputs formatted Go (Golang) code with syntax highlighting, you can use the popular JavaScript library called Prism. Prism is a lightweight, extensible syntax highlighter, built with modern web standards in mind. It's used to make code in HTML look pretty.
Here's how you can do it:
First, you need to include Prism's CSS and JavaScript files in your HTML document to apply the syntax highlighting. You can either download these files from the Prism website and host them yourself or use a CDN (Content Delivery Network) to include them directly.
NewerOlder