This file contains 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 | |
xhost +local:docker | |
docker run \ | |
-e DISPLAY=unix$DISPLAY \ | |
-v /tmp/.X11-unix:/tmp/.X11-unix \ | |
-v $XAUTHORITY:$XAUTHORITY \ | |
-v $(pwd)/notebooks:/notebooks \ | |
-e XAUTHORITY=$XAUTHORITY \ | |
-p 8888:8888 \ |
This file contains 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
# -*- coding: utf-8 -*- | |
from datetime import date | |
from urllib.parse import urlencode | |
import scrapy | |
class TjpbSpider(scrapy.Spider): | |
name = "tjpb" | |
allowed_domains = ["juris.tjpb.jus.br"] |
This file contains 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
const puppeteer = require('puppeteer'); | |
(async () => { | |
const browser = await puppeteer.launch({headless: false}); | |
const page = await browser.newPage(); | |
await page.goto('https://takeout.google.com/'); | |
const input = await page.evaluate(() => { | |
const next = document.querySelector('#identifierNext'); |
This file contains 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
#!/usr/bin/env python3 | |
""" | |
Cli utility for spliting a big XML file into smaller parts. | |
The breakpoint will be the element of depth 1 (below root) that does not | |
fit in the specified maximum size. Each part created will have the same | |
root element. | |
Usage: | |
$ xmsplit size prefix [filename] |
This file contains 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
for user in $(getent passwd | cut -f1 -d: ); do | |
crontab -u $user -l && echo $user && printf '=%.0s' {1..100} && echo ; | |
done 2> /dev/null |
This file contains 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
document.addEventListener("DOMContentLoaded", function(event) { | |
const faixa = document.createElement('div'); | |
const estilo = document.createElement('style'); | |
faixa.id='faixa-homologacao'; | |
faixa.textContent = 'Versão de Homologação'; | |
estilo.textContent = ` | |
#${faixa.id} { | |
margin: 0; |
This file contains 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
document.getElementById('numbersonly').addEventListener( | |
'keypress', | |
function() { | |
var allowed_keys = { | |
48: true, // 0 | |
49: true, // 1 | |
50: true, // 2 | |
51: true, // 3 | |
52: true, // 4 | |
53: true, // 5 |
This file contains 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 <stdio.h> | |
#define INFINITO 32766 | |
#define TRUE 1 | |
#define FALSE 0 | |
#define NN 150 | |
typedef unsigned char BOOL; | |
This file contains 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 <stdio.h> | |
#define INFINITO 32766 | |
#define TRUE 1 | |
#define FALSE 0 | |
#define NN 150 | |
typedef unsigned char BOOL; | |
/* Dijkstra */ |
This file contains 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
/*************************************************** | |
Universidade Federal da Paraiba | |
Centro de Ciencias Exatas e da Natureza | |
Disciplina: Calculo Numerico | |
Thiago Curvelo dos Anjos - Matr.: 010211026 | |
**************************************************** | |
Sistemas Lineares: Metodo de Eliminacao de Gauss | |
***************************************************/ | |
#include <stdio.h> |
NewerOlder