Skip to content

Instantly share code, notes, and snippets.

@Mocked
IDRemoteServices remote;
new StrictExpectations() {
{
remote = new IDRemoteServices();
remote.loginUser(USERNAME, PASSWORD);
result = throw EXCEPCAO;
}
CREATE TABLE IF NOT EXISTS `users` (
`id` int(6) unsigned NOT NULL,
`phone` int(9) unsigned NOT NULL,
`recharge_amount` int(3) NOT NULL,
`balance_before_recharge` int(3) NOT NULL,
PRIMARY KEY (`id`,`phone`)
) DEFAULT CHARSET=utf8;
INSERT INTO `users` (`id`, `phone`, `recharge_amount`, `balance_before_recharge`) VALUES
('1', '930000001', '5', '2'),
('2', '930000001', '10', '3'),
'''
Given 3 fair six-sided dice, on a random roll, what is the probability that the sum of their values adds up to k=10 or more
3 dados de 6 lados
prob 1 3 6
#!/usr/bin/env python
import bluetooth
import sys
import os
import time
import subprocess
import re
# s10 bluetooth address
ACTION=="add|change", SUBSYSTEM=="input", ATTRS{name}=="D8:55:75:9F:9D:5A", RUN+="/home/vicente/.i3/my_scripts/pushbullet/send_note.py 2 44"
@vicenterocha
vicenterocha / karabiner_caps.json
Last active July 15, 2020 19:56
macOS Karabiner-Elements config
{
"title": "Capslock Enhancement",
"author": "Vonng(fengruohang@outlook.com)",
"homepage": "https://github.com/Vonng/Capslock",
"hostpage": "https://pqrs.org/osx/karabiner/complex_modifications/",
"manual": "https://github.com/Vonng/Capslock/tree/master/mac",
"import_url": "karabiner://karabiner/assets/complex_modifications/import?url=https://raw.githubusercontent.com/Vonng/Capslock/master/mac/capslock.json",
"rules": [
{
"description": "CapsLock to Hyper",
# .tmux.conf of deanbodenham, based on others (see below)
# last modified: 7 July 2019
# Using tmux 2.6, after 18 Oct 2015
#
## This tmux.conf is based on:
#check out this page for a tmux conf (basis for this one):
#http://www.hamvocke.com/blog/a-guide-to-customizing-your-tmux-conf/
#
#thanks to dothebarbwa
#https://www.reddit.com/r/unixporn/comments/3cn5gi/tmux_is_my_wm_on_os_x/
import csv
from collections import defaultdict
lines = []
total_values_per_group = defaultdict(int)
with open('/Users/vicente.rocha/Downloads/david.txt') as f:
csv_reader = csv.reader(f, delimiter=',')
# iterate and add only 20 values per group
for row in csv_reader:
{
"title": "CAPS LOCK: Converts 'jkl;' to arrow keys, semicolon to backspace and quote to delete",
"maintainer": ["wake"],
"homepage": "https://github.com/vicenterocha",
"rules": [
{
"description": "CAPS LOCK: Converts 'hjkl' to arrow keys",
"manipulators": [
{
"conditions": [