Skip to content

Instantly share code, notes, and snippets.

View ryukinix's full-sized avatar
☢️
IN RESEARCH

Manoel V. Machado ryukinix

☢️
IN RESEARCH
View GitHub Profile
@ryukinix
ryukinix / ping_pong.py
Created April 10, 2016 23:36
Coroutines em Python
#!/usr/bin/env python
# coding=utf-8
# Python Script
#
# Copyright © Manoel Vilela
#
#
from queue import Queue
import asyncio
@ryukinix
ryukinix / num_matcher.py
Created April 15, 2016 10:48
Regex example of python n-digit number with n fixed
import re
import random
def num_matcher(num, _len=6):
pattern = re.compile(r"^[0-9]{{{_len}}}".format_map(locals()))
return bool(pattern.match(num))
value = random.randint(0, 1000000)
print(value)
print(num_matcher(str(value)))
@ryukinix
ryukinix / higuita_dump.py
Last active April 29, 2017 15:38
Script to download all academic content about lectures at www.higuita.com.br of Prof. Alexandre F. Beletti at UFPA
#!/usr/bin/env python
# coding=utf-8
#
# Python Script
#
# Copyleft © Manoel Vilela
#
#
# stdlib
@ryukinix
ryukinix / language-requirements.md
Last active April 4, 2017 11:38
Language-Requirements.md

Language Requirements TC

Esse é documento de orientação para a implementação de novas linguagens no repositório nexusedge/ai-nlp-tc

PreProcessing

Durante o pré-processamento é feito, na seguinte ordem, os seguintes procedimentos:

@ryukinix
ryukinix / rss_conky
Last active June 6, 2020 13:49
An alternative parser for rss because conky doesn't have ATOM supported yet
# — SETTINGS — #
update_interval 20
total_run_times 0
net_avg_samples 1
cpu_avg_samples 1
imlib_cache_size 0
double_buffer yes
no_buffers yes
use_xft yes
xftfont Zekton:size=9
@ryukinix
ryukinix / mp32ogg
Created May 20, 2016 01:47
mp3 to ogg using ffmpeg
#!/bin/bash
for f in ./*.mp3; do ffmpeg -i "$f" -c:a libvorbis -q:a 4 "${f/%mp3/ogg}"; done
@ryukinix
ryukinix / Pygame-tetromino.py
Created June 3, 2016 13:59
A tetris game clone made by Ai Segwart
# Tetromino (A Tetris Clone)
# http://inventwithpython.com/blog
# By Al Sweigart al@inventwithpython.com
"""
Welcome to the Code Comments for Tetromino. Code Comments is a series of simple games with detailed comments in the source code, so you can see how the game works.
Bem vindo aos Códigos Comentados para Tetromino. Códigos Comentados é uma série de games(jogos) simples com comentários detalhados no código fonte, assim você pode ver como o game(jogo) trabalha.
The text in between the triple-double-quotes are comments. The Python interpreter ignores any text in between them, so we can add any comments about the source code without affecting the program. In general for Code Comments, the comments will describe the lines of code above the comment. It helps to view this file either on the Code Comments site or with a text editor that does "syntax highlighting", so that the comments appear in a separate color and are easier to distinguish from the code.
O texto entre aspas duplas-triplas são comentários. O i
@ryukinix
ryukinix / supervisor-job.ini
Last active July 8, 2016 02:02
A supervisor service template
[program:your-program-label]
command=interpreter file.extension
directory=/the/path/of/program
user=root
autostart=true
autorestart=true
redirect_stderr=true
numprocs=1
numprocs_start=1
stdout_logfile=/tmp/your-program-label.log
@ryukinix
ryukinix / git-pull-all.sh
Created July 8, 2016 04:56
Search for all git repositories on a <path> and do git pull
find . -name .git -type d -execdir git pull ';'
@ryukinix
ryukinix / brainfuck-interpreter.lisp
Created July 11, 2017 02:49
BrainFuck Interpreter written in Common Lisp for HackerRank
;; brainfuck interpreter written in Common Lisp
;; Author: Manoel Vilela
;; Date: 10/07/2017 02:24:40
;; constants
(defparameter *max-operations* 100000)
(defparameter *valid-operations* "<>+-.,[]")
;; global variables