Make sure you check dmesg
periodically between these steps for errors...
sudo apt-get update
sudo apt-get install --reinstall linux-modules-$(uname -r)
sudo apt-get install --reinstall linux-headers-$(uname -r)
sudo dkms autoinstall
hciconfig -a
import json | |
import random | |
import re | |
import requests | |
import textwrap | |
# a random model is selected each time without the possibility | |
# of selecting the same one twice in a row (so it doesn't speak to itself) | |
# Terminal colors |
// Copyright (c) 2024 by Rockchip Electronics Co., Ltd. All Rights Reserved. | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, software | |
// distributed under the License is distributed on an "AS IS" BASIS, |
import asyncio | |
import discord # discord.py==1.7.3 | |
import re | |
import requests | |
import time | |
from collections import defaultdict | |
from discord import activity | |
from discord.ext import commands | |
# llama.cpp front end chat bot for Discord |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Centered Div</title> | |
<style> | |
/* Styles to center the div */ | |
.centered-div { | |
position: absolute; |
import re | |
import os | |
# extract relative & absolute paths from css and js files | |
# warning: assumes all assets in javascript are within either backticks, single or double quotes. | |
asset_path = './downloaded/' # location of assets to extract URLs from | |
outfile = 'asset_links.txt' # output file | |
chr_b = '' # characters to be printed before the asset link. Leave empty ('') if none. | |
chr_a = '' # characters to be printed after the asset link. Leave empty ('') if none. |
import os | |
import re | |
""" | |
Finds page gaps in pages / archives / research papers / publications / books / numerical archives / files / ranges. | |
Use it to find if you are missing any items in an archive. | |
You can use this on multi-volume archives or files of any type, it simply just searches for strings in the filename. | |
Example output: |
from bluepy.btle import Peripheral, UUID, BTLEInternalError # bluepy==1.3.0 | |
device_address = "00:00:00:00:00:00" | |
try: | |
# check if address is 'random' or 'public' type | |
octets = device_address.split(':') | |
first_octet_binary = bin(int(octets[0], 16))[2:] | |
if first_octet_binary[-1] == '1': | |
addr_type = 'random' |
from bluepy.btle import Peripheral, UUID | |
device_address = "00:00:00:00:00:00" | |
peripheral = Peripheral(device_address, addrType='random') | |
services = peripheral.getServices() | |
for service in services: | |
characteristics = service.getCharacteristics() |