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/sh | |
# Update the system | |
sudo apt update && sudo apt full-upgrade | |
# Basic packages | |
sudo apt install -y p7zip-full unrar gparted wget build-essential curl git | |
# Java | |
sudo apt install -y default-jre |
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/zsh | |
# | |
# Cursor AI IDE Installer/Updater | |
# This script installs or updates Cursor AI IDE on Linux systems | |
# | |
# ----------------------------------------------------------------------------- | |
# Configuration | |
# ----------------------------------------------------------------------------- | |
APPIMAGE_PATH="/opt/cursor/cursor.AppImage" |
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
pip install llama-cpp-python | |
Collecting llama-cpp-python | |
Using cached llama_cpp_python-0.3.7.tar.gz (66.7 MB) | |
Installing build dependencies ... done | |
Getting requirements to build wheel ... done | |
Preparing metadata (pyproject.toml) ... done | |
Requirement already satisfied: typing-extensions>=4.5.0 in /opt/homebrew/Caskroom/miniforge/base/envs/llama-cpp/lib/python3.11/site-packages (from llama-cpp-python) (4.12.2) | |
Requirement already satisfied: numpy>=1.20.0 in /opt/homebrew/Caskroom/miniforge/base/envs/llama-cpp/lib/python3.11/site-packages (from llama-cpp-python) (1.26.4) | |
Requirement already satisfied: diskcache>=5.6.1 in /opt/homebrew/Caskroom/miniforge/base/envs/llama-cpp/lib/python3.11/site-packages (from llama-cpp-python) (5.6.3) | |
Requirement already satisfied: jinja2>=2.11.3 in /opt/homebrew/Caskroom/miniforge/base/envs/llama-cpp/lib/python3.11/site-packages (from llama-cpp-python) (3.1.5) |
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 | |
set -euo pipefail | |
# Directory setup | |
APP_DIR="${HOME}/Applications" | |
ICON_DIR="${HOME}/.local/share/icons" | |
DESKTOP_DIR="${HOME}/.local/share/applications" | |
BIN_DIR="${HOME}/.local/bin" |
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 time | |
from python import Python | |
@register_passable("trivial") | |
struct Move: | |
var i: Int | |
var j: Int | |
var prom: Int | |
fn __init__(i: Int, j: Int, prom: Int) -> Move: |
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 os | |
users = """ | |
john | |
dummy | |
vietanhdev | |
""" | |
for user in users.split("\n"): | |
user = user.strip() | |
if user: |
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
<body> | |
<style> | |
.square-box { | |
width: 33%; | |
height: 0; | |
padding-top: 33%; | |
position: absolute; | |
right: 20px; | |
top: 20px; | |
} |
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
###################################### | |
# INSTALL OPENCV ON UBUNTU OR DEBIAN # | |
###################################### | |
# -------------------------------------------------------------------- | | |
# SCRIPT OPTIONS | | |
# ---------------------------------------------------------------------| | |
OPENCV_VERSION='4.5.1' # Version to be installed | |
OPENCV_CONTRIB='YES' # Install OpenCV's extra modules (YES/NO) | |
# -------------------------------------------------------------------- | |
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 | |
mkdir realvncserversetup && cd realvncserversetup | |
echo Add armhf arch | |
sudo dpkg --add-architecture armhf && sudo apt update | |
echo Download and install RealVNC server | |
wget -nv https://downloads.realvnc.com/download/file/vnc.files/VNC-Server-6.11.0-Linux-ARM.deb && sudo apt install ./VNC-Server-6.11.0-Linux-ARM.deb | |
echo Download and install dependencies |
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
#include <chrono> | |
#include <cmath> | |
#include <exception> | |
#include <fstream> | |
#include <iostream> | |
#include <limits> | |
#include <numeric> | |
#include <opencv2/dnn/dnn.hpp> | |
#include <opencv2/imgcodecs.hpp> | |
#include <opencv2/imgproc.hpp> |
NewerOlder