Skip to content

Instantly share code, notes, and snippets.

View pedro-valentim's full-sized avatar

Pedro Valentim Silva Leite pedro-valentim

  • São José dos Campos, SP - Brasil
View GitHub Profile
@djfdyuruiry
djfdyuruiry / README.md
Last active March 7, 2024 03:41
WSL 2 - XServer Setup

WSL 2 XServer Setup

This guide will setup WSL 2 to be able to connect to an XServer installed on your host Windows machine. Note: this was tested on Windows 10 Build 2004, running Ubuntu 20.04 LTS in WSL 2. The XServer software used was VcXsrv; remember to disable authentication for this to work correctly.

  • Open a WSL terminal

  • Fix an issue with dbus:

sudo sh -c "dbus-uuidgen > /etc/machine-id"

from streamlit import caching
from datetime import datetime
import streamlit as st
import random
from datetime import datetime
from datetime import date
import math
def cache_clear_dt(dummy):
clear_dt = date.today()
Textit :
* RapidSMS is framework custom SMS systems.
UNICEF Innovation has been working with SMS systems since 2007,
when it created an open source platform called RapidSMS
* Add your own logic & you can trigger actions, such as sending an SMS, email or even calling an external API
@mikeboiko
mikeboiko / pagination.py
Last active November 22, 2020 14:07
Django Rest Framework Pagination integration with Vuetable-2
# =======================================================================
# === Description ...: Integrate DRF with VueTable-2
# === Author ........: Mike Boiko
# =======================================================================
# If you want to integrate Django Rest Pagination with VueTable, you must
# change the pagination as shown below:
# Then, in your views.py file, the pagination_class must be set to CustomPagination
# See example below:
# from rest_framework import pagination
@jesuino
jesuino / result1.txt
Last active October 27, 2017 13:14
Results from DeepLearning tests with a custom dataset - using a trained Resnet50 CNN
Epochs:20
--
Examples labeled as 0 classified by model as 0: 12 times
Examples labeled as 0 classified by model as 2: 7 times
Examples labeled as 1 classified by model as 1: 17 times
Examples labeled as 1 classified by model as 2: 2 times
Examples labeled as 2 classified by model as 2: 29 times
Examples labeled as 2 classified by model as 4: 4 times
Examples labeled as 3 classified by model as 3: 1 times
Examples labeled as 4 classified by model as 1: 1 times
@golonzovsky
golonzovsky / Dockerfile.build
Last active December 19, 2018 07:48
build and run angular-cli app in docker nginx via volume sharing
FROM node:7
ENV REFRESHED_AT 2017-06-26
RUN yarn global add @angular/cli
RUN ng set --global packageManager=yarn
COPY . /build
WORKDIR /build
@Saissaken
Saissaken / Update git fork with tags.sh
Last active May 21, 2024 19:20
Update git fork with tags
# Repo: someuser/myframework
# Fork: superteam/myframework
# Track:
git clone https://github.com/superteam/myframework.git
cd myframework
git remote add upstream https://github.com/someuser/myframework.git
# Update:
git fetch upstream
@zokis
zokis / speed_test_csv.py
Created March 8, 2017 16:54
Runs an internet speed test every 1 hour; Throws the result into a csv file named speedtest_result.csv
# coding: utf-8
# pip install speedtest-cli
import subprocess
import time
def main():
c = 0
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm