Skip to content

Instantly share code, notes, and snippets.

View ValchanOficial's full-sized avatar
:octocat:
Happy Octocat

Valéria Padilha de Vargas ValchanOficial

:octocat:
Happy Octocat
View GitHub Profile
# install torch with CUDA support. See https://pytorch.org/get-started/locally/ for more instructions if this fails.
pip install torch --extra-index-url https://download.pytorch.org/whl/cu113
# check if torch supports GPU; this must output "True". You need CUDA 11. installed for this. You might be able to use
# a different version, but this is what I tested.
python -c "import torch; print(torch.cuda.is_available())"
# clone web ui and go into its directory
git clone https://github.com/enryu43/anifusion-sd-webui.git
cd anifusion-sd-webui
@bmaupin
bmaupin / javascript-xml-parsers.md
Last active May 23, 2024 03:31
JavaScript XML parsers
Parser Size Maintained Node.js Browser Streaming Types Modifying XML Notes
jsdom 3.11 MB yes yes N/A DefinitelyTyped yes Probably the best choice since its API is closest to the browser API for manipulating XML
cheerio 558 kB yes yes yes included yes jQuery-like API for parsing and manipulating HTML and XML
xmldoc 41.4 kB yes yes yes DefinitelyTyped Partial, not recommended (nfarina/xmldoc#51)
@xmldom/xmldom 182 kB yes yes yes included yes ⚠️ Based on DOM but no querySelector/querySelectorAll
sax 55 kB yes yes yes? yes DefinitelyTyped Not recommended ⚠️ API is callback-based and very cludgy, but it has streamin
@marcelgsantos
marcelgsantos / gerenciamento-de-filas-com-rabbitmq.md
Created December 30, 2021 00:50
Anotações da palestra 'Gerenciamento de Filas com RabbitMQ' apresentada pela Marcela Godoy
  • A comunicação é uma necessidade básica dos seres humanos.
  • A forma de comunicação evolui ao longo do tempo.
  • A comunicação possui três elementos fundamentais: remetente, mensagem e destinatário.
  • O remetente é aquele que envia a informação, o destinatário é aquele que recebe a informação e a mensagem é a informação propriamente dita.
  • O destinatário pode confirmar a chegada através de resposta única ou múltiplas respostas.
  • O nosso modelo de comunicação é muito semelhante com a comunicação das aplicações que criamos.
  • O modelo cliente-servidor segue os pilares da comunicação.
  • Os termos síncrono e assíncrono referem-se ao fluxo de uma aplicação.
import {
NestInterceptor,
ExecutionContext,
Injectable,
CallHandler,
} from '@nestjs/common';
import { classToPlain } from 'class-transformer';
import { map } from 'rxjs/operators';
@Injectable()
############################################################################################################
################## #############################
################## #############################
This Gist collection contains all localstack related examples
################## #############################
################## #############################
############################################################################################################
@bmaupin
bmaupin / docker-container-network-access.md
Last active May 23, 2024 03:33
Docker container network access

Incoming access from local network

Method Docker iptables setting Firewall on? Accessible from local network
docker run --network=host -p 3306:3306 false No Yes
docker run --network=host -p 3306:3306 false Yes No
docker run -p 3306:3306 Default Yes ⚠️ Yes
docker run -p 127.0.0.1:3306:3306 Default Yes No

An alternative option would be to leave the Docker iptables as the default, leave the firewall on, and modify iptables itself à la https://stackoverflow.com/a/51741599/399105

@omariosouto
omariosouto / ButtonLink.js
Last active April 9, 2024 17:17
Aula 01 - Códigos Extras
const matrizInimigoGrande = [
[0,0],
[400,0],
[800,0],
[1200,0],
[1600,0],
[0,400],
[400,400],
[800,400],
[1200, 400],