Skip to content

Instantly share code, notes, and snippets.

View luiseduardobrito's full-sized avatar

Luis Eduardo Brito luiseduardobrito

  • São Paulo, Brazil
View GitHub Profile
<html>
<head>
<title>LYWSD02 Clock sync</title>
<meta name="viewport" content="width=480">
</head>
<body >
<h1>LYWSD02 Clock sync </h1>
<h2>Xiaomi Mijia BT4.0 Wireless Smart Electric Digital Clock Indoor & Outdoor Hygrometer Thermometer</h2>
@andelf
andelf / main.rs
Created May 14, 2020 10:31
Embed Deno in Rust
use deno_core::Op;
use deno_core::ZeroCopyBuf;
use deno_core::{CoreIsolate, StartupData};
use std::str;
fn main() {
println!("v8 version: {}", deno_core::v8_version());
let mut isolate = CoreIsolate::new(StartupData::None, false);
@erickrf
erickrf / json2txt.py
Created August 19, 2019 21:04
Script to join text from JSON files for training GPT-2
import json
import os
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('input_dir', help='Directory with wiki json files')
parser.add_argument('output', help='Txt file output')
args = parser.parse_args()
for filename in os.listdir(args.input_dir):
@CMCDragonkai
CMCDragonkai / exporting_modules_functions_from_python_init.md
Last active April 6, 2024 05:50
Exporting Modules and Functions from Python `__init__.py` #python

Exporting Modules and Functions from Python __init__.py

Any directory with __init__.py is considered a package in Python.

Any python files inside a package is considered a module.

Modules contain functions and other bindings that is always exported.

If you are outside the package, and you want to import a module from a package:

kubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pod
@harshavardhana
harshavardhana / nginx-minio-static.md
Last active April 19, 2024 09:33 — forked from koolhead17/gist:4b8dd8d95ec86368634693cf9ad9391c
How to configure static website using Nginx with MinIO ?

How to configure static website using Nginx with MinIO ?

1. Install nginx

2. Install minio

3. Install mc client

4. Create a bucket:

$ mc mb myminio/static
Bucket created successfully ‘myminio/static’.
@mgoellnitz
mgoellnitz / snip.sh
Last active January 4, 2024 17:57
GitLab Snippet Command Line Tool
#!/bin/bash
#
# Copyright 2016-2021 Martin Goellnitz
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@dtygel
dtygel / CircleTransform.java
Last active June 18, 2017 18:37 — forked from julianshen/CircleTransform.java
CircleTransform for Picasso
/*
* Copyright 2014 Julian Shen
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@JakeWharton
JakeWharton / README.md
Last active April 17, 2023 14:07
A JUnit @rule which launches an activity when your test starts. Stop extending gross ActivityInstrumentationBarfCase2!