Skip to content

Instantly share code, notes, and snippets.

View pikonha's full-sized avatar
🎧
learning in public

lucas picollo pikonha

🎧
learning in public
  • Blockful
  • Florianópolis, Santa Catarina, Brasil
  • 17:36 (UTC -03:00)
View GitHub Profile
@pikonha
pikonha / .deps...npm...hardhat...console.sol
Created October 23, 2023 12:13
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.18+commit.87f61d96.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity >=0.4.22 <0.9.0;
library console {
address constant CONSOLE_ADDRESS =
0x000000000000000000636F6e736F6c652e6c6f67;
function _sendLogPayloadImplementation(bytes memory payload) internal view {
address consoleAddress = CONSOLE_ADDRESS;
/// @solidity memory-safe-assembly
@pikonha
pikonha / Makefile
Created August 13, 2021 13:20
Makefile help command
help: ## Show this help.
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
@pikonha
pikonha / Dockerfile
Created June 27, 2021 21:32
Go lang docker baseic setup
RUN golang:1.16-strech
WORKDIR /usr/src
CMD ["tail", "-f", "/dev/null"]
@pikonha
pikonha / pokemon-automl-analysis.ipynb
Created April 9, 2021 00:15
pokemon-automl-analysis.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pikonha
pikonha / kaggle.ipynb
Created April 3, 2021 23:28
Import dataset from kaggle directly to a colab session
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pikonha
pikonha / detec-o-de-c-ncar-de-mama.ipynb
Last active March 31, 2021 00:54
cancer-analysis.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pikonha
pikonha / imdbanalysis.ipynb
Last active March 31, 2021 00:55
IMDBanalysis.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pikonha
pikonha / duplicates.sql
Created February 24, 2021 20:49
[POSTGRES] Remove duplicates and left the first register
with uniq as (
select distinct on (table.a, table.b) *
from table
) delete from table table1 where table1.id not in (select id from uniq)
@pikonha
pikonha / npercetage.sql
Created February 8, 2021 13:30
Postgres select random N% of registers with condition
-- This query is taking 10% of registers that met a simple condition
select json_agg(id) from table
where
table.columnA is not null and
random() < 0.1
@pikonha
pikonha / Context.jsx
Created February 19, 2020 13:41
A implementation of the React's ContextAPI using hooks
import React, { createContext, useReducer, useContext } from "react";
const MyContext = createContext();
const INITIAL_STATE = [];
const reducer = (state, action) => {
switch (action.type) {
case "PUSH":
return [...state, action.payload];