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
#https://github.com/bigbeartechworld/big-bear-casaos/tree/master/Apps/pterodactyl-panel | |
bash -c "$(wget -qLO - https://raw.githubusercontent.com/bigbeartechworld/big-bear-scripts/master/start-pterodactyl-panel/run.sh)" |
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
#conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia. | |
import torch | |
device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu') | |
# Assuming that we are on a CUDA machine, this should print a CUDA device: | |
print(device) |
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 | |
# Check if a log file was specified | |
if [ "$#" -ne 1 ]; then | |
echo "Usage: $0 access.log" | |
exit 1 | |
fi | |
LOG_FILE="$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 random | |
#this is to generate fake mykad numbers | |
def generate_mykad_number(): | |
# Generate date of birth (YYMMDD) | |
year = str(random.randint(50, 99)) # assuming a range for adult ages | |
month = str(random.randint(1, 12)).zfill(2) | |
day = str(random.randint(1, 28)).zfill(2) # using 28 to avoid issues with February | |
dob = year + month + day |
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
sudo certbot certonly --webroot -w /path/to/your/web/root -d fakap.net |
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
# Mohammad Hafiz bin Ismail <mypapit@gmail.com> | |
# blog.mypapit.net | |
# this is for Ubuntu/Debian Apache server config | |
#/etc/apache2/sites-available/your-ojs.conf | |
<VirtualHost *:9080> | |
ServerAdmin ojs@example.com | |
ServerName ojs-site.example.com |
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
from keras_cv import RetinaNet | |
# Define global configuration parameters | |
backbone = "resnet50" | |
weights = "imagenet" | |
num_classes = 20 | |
batch_size = 2 | |
# Load the custom Pascal VOC dataset | |
dataset = RetinaNet.load_pascal_voc("path/to/dataset", batch_size=batch_size) |
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
from keras.layers import Input, Conv2D, BatchNormalization, Activation, MaxPooling2D, Flatten, Dense, Dropout, Reshape, Permute, multiply, Lambda | |
from keras.models import Model | |
from keras import backend as K | |
# Define the attention mechanism layer | |
def attention(x): | |
f = Conv2D(filters=64, kernel_size=1, strides=1, padding='same')(x) | |
g = Conv2D(filters=64, kernel_size=1, strides=1, padding='same')(x) | |
h = Conv2D(filters=256, kernel_size=1, strides=1, padding='same')(x) | |
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 | |
from keras.models import Sequential | |
from keras.layers import Dense, Dropout, LSTM | |
from keras.callbacks import ModelCheckpoint | |
from keras.utils import np_utils | |
# Load and preprocess the news headlines dataset | |
filename = "news_headlines.txt" | |
text = open(filename).read() | |
text = text.lower() |
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
<html> | |
<head> | |
<style> | |
canvas { | |
width: 100%; | |
height: 100%; | |
} | |
</style> | |
</head> | |
<body> |
NewerOlder