Skip to content

Instantly share code, notes, and snippets.

@douglasrizzo
douglasrizzo / wandb_dict_forked_net.ipynb
Created July 2, 2020 07:05
wandb_dict_forked_net.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@douglasrizzo
douglasrizzo / wandb_pyg.ipynb
Created July 2, 2020 07:05
wandb_pyg.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@douglasrizzo
douglasrizzo / saulo.ipynb
Created June 5, 2020 03:38
Ensinando Python pro Saulo
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@douglasrizzo
douglasrizzo / c_struct.c
Last active May 25, 2020 22:03
Structs and classes in C++
#include <stdio.h>
struct Vec2 {
float x, y;
};
int main() {
struct Vec2 v;
v.x = 1;
@douglasrizzo
douglasrizzo / ponteiros.c
Created May 21, 2020 01:11
Ponteiros em C
#include <stdio.h>
int main(void) {
int a = 7;
int* aPtr;
aPtr = &a; // aPtr guarda o endereço de a
printf(
"O endereço de a é %p"
"\nO valor de aPtr é %p",
@douglasrizzo
douglasrizzo / grafo_computacional.ipynb
Last active November 27, 2019 23:29
grafo_computacional.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@douglasrizzo
douglasrizzo / stitch.py
Last active September 18, 2019 18:01
Stitch multiple images into one using OpenCV
##############################################################################
# Copyright 2019 Douglas De Rizzo Meneghetti
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@douglasrizzo
douglasrizzo / bubblesort.py
Created July 30, 2019 20:31
Bubble sort in Python
# This is a simple implementation of bubblesort
# which I made during a Python lesson
from random import shuffle
# size of the list that will ne sorted
n = int(input('Size of the input vector: '))
l = list(range(n))
# shuffle list
@douglasrizzo
douglasrizzo / jobs_puzzle.lp
Last active June 6, 2019 00:15
Jobs Puzzle in Answer Set Programming
% https://www.mcs.anl.gov/~wos/mathproblems/jobs.html
%%% people and genders
man(pete;steve).
woman(thelma;roberta).
person(P) :- man(P).
person(P) :- woman(P).
-man(P) :- woman(P).
-woman(P) :- man(P).
@douglasrizzo
douglasrizzo / apple-kb-manjaro.md
Last active May 6, 2022 13:47
Connect Apple Keyboard to Manjaro Linux

Blueman does not help when connecting the Apple Keyboard to Manjaro. In the future, follow these steps to fully configure it. This needs package bluez-utils.:

  1. Get the device's MAC Address:
$ bluetoothctl
[bluetooth]$ power on
Changing power on succeeded
[bluetooth]$ devices
Device 00:11:22:33:44:55 Apple Wireless Keyboard