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.
## Ref: https://stackoverflow.com/questions/44785585/how-to-delete-all-docker-local-docker-images | |
docker container prune -f && | |
docker stop $(docker ps -aq) && | |
docker rm -vf $(docker ps -a -q) && | |
docker rmi -f $(docker images -a -q) |
#!/usr/bin/env bash | |
# To run this script you need to install https://rclone.org/ first | |
# Use current date and time for future backup folder name | |
TIMESTAMP=$(date +"%Y-%m-%d_%H-%M-%S") | |
# Declare the directory where the temporary backup files will be stored | |
BACKUP_DIR="/backup/$TIMESTAMP/mysql" | |
# State the username for your MySQL / MariaDB instace that can access the neccessary databases | |
MYSQL_USER="" | |
# Point this script to mysql executable file | |
MYSQL=/usr/bin/mysql |
options: | |
docker: true | |
pipelines: | |
branches: | |
master: | |
- step: | |
image: google/cloud-sdk:latest | |
name: Deploy to production | |
deployment: production | |
caches: |
/* Produces a dump on the state of WordPress when a not found error occurs */ | |
/* useful when debugging permalink issues, rewrite rule trouble, place inside functions.php */ | |
ini_set( 'error_reporting', -1 ); | |
ini_set( 'display_errors', 'On' ); | |
echo '<pre>'; | |
add_action( 'parse_request', 'debug_404_rewrite_dump' ); | |
function debug_404_rewrite_dump( &$wp ) { |
from sqlalchemy.ext.automap import automap_base | |
from sqlalchemy import create_engine, MetaData, Column, String, Integer | |
import pickle | |
from sqlalchemy.sql.schema import ForeignKey | |
# Create some tables in the database | |
engine = create_engine('sqlite://') | |
engine.execute('CREATE TABLE user (id INTEGER, name TEXT, favorite_color TEXT)') | |
engine.execute('CREATE TABLE profile (id INTEGER, userid INTEGER, summary TEXT)') |
// connect() is a function that injects Redux-related props into your component. | |
// You can inject data and callbacks that change that data by dispatching actions. | |
function connect(mapStateToProps, mapDispatchToProps) { | |
// It lets us inject component as the last step so people can use it as a decorator. | |
// Generally you don't need to worry about it. | |
return function (WrappedComponent) { | |
// It returns a component | |
return class extends React.Component { | |
render() { | |
return ( |
Dockerfile
that is based on your production image and
simply install xdebug
into it. Exemple:FROM php:5
RUN yes | pecl install xdebug \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |