Bootstrap knowledge of LLMs ASAP. With a bias/focus to GPT.
Avoid being a link dump. Try to provide only valuable well tuned information.
Neural network links before starting with transformers.
# Create an empty set using the constructor method. | |
numbers = set() | |
print(numbers) # Output: set() | |
# Note: {} creates a dictionary in Python. | |
print(type({})) # Output: <class 'dict'> | |
# set() constructor function takes an iterable as input. | |
numbers = set([1, 2]) | |
print(numbers) # Output: {1, 2} | |
string_set = set("hello") |
from celery.task.control import revoke | |
from celery.task.control import inspect | |
def revoke_tasks_by_name(task_name, worker_prefix=''): | |
""" | |
Revoke all tasks by the name of the celery task | |
:param task_name: Name of the celery task | |
:param worker_prefix: Prefix for the worker |
#! /bin/sh | |
# static icon, easier to set as a bash alias or directly use as a single command instead of creating a script file. | |
amixer set Capture toggle | gawk 'match($0, /Front Left.*\[(.*)\]/, a) {print a[1]}' | xargs notify-send --hint=int:transient:1 -i "audio-input-microphone" "Mic switched: $1" |
#! /bin/sh | |
# Produce a squash-commit patch from a branch of changes | |
MASTER=$1 | |
PATCHBRANCH=$2 | |
SQUASHBRANCH="$PATCHBRANCH-squash" | |
MESSAGE=$3 | |
git checkout -b $SQUASHBRANCH $MASTER && | |
git merge --squash $PATCHBRANCH && | |
git commit -a -m "$MESSAGE" && |
# coding: utf-8 | |
import random | |
cups_checksum_table = 'TRWAGMYFPDXBNJZSQVHLCKE' | |
cups_name_length = 12 | |
def gen_checksum(cupsname): | |
"""Calcula el checksum d'un CUPS.""" |
e.g: tar -czvf name-of-archive.tar.gz /path/to/directory-or-file
# Ubuntu
sudo apt-get install gpa seahorse
# MacOS with https://brew.sh/
Using py.test is great and the support for test fixtures is pretty awesome. However, in order to share your fixtures across your entire module, py.test suggests you define all your fixtures within one single conftest.py
file. This is impractical if you have a large quantity of fixtures -- for better organization and readibility, you would much rather define your fixtures across multiple, well-named files. But how do you do that? ...No one on the internet seemed to know.
Turns out, however, you can define fixtures in individual files like this:
tests/fixtures/add.py
import pytest
@pytest.fixture
echo -e "\nHidden=true\n"|sudo tee --append /etc/xdg/autostart/tracker-extract.desktop | |
echo -e "\nHidden=true\n"|sudo tee --append /etc/xdg/autostart/tracker-miner-apps.desktop | |
echo -e "\nHidden=true\n"|sudo tee --append /etc/xdg/autostart/tracker-miner-fs.desktop | |
echo -e "\nHidden=true\n"|sudo tee --append /etc/xdg/autostart/tracker-miner-user-guides.desktop | |
echo -e "\nHidden=true\n"|sudo tee --append /etc/xdg/autostart/tracker-store.desktop | |
gsettings set org.freedesktop.Tracker.Miner.Files crawling-interval -2 | |
gsettings set org.freedesktop.Tracker.Miner.Files enable-monitors false | |
tracker reset --hard |