Skip to content

Instantly share code, notes, and snippets.

View pinxau1000's full-sized avatar
👾
¯\_(ツ)_/¯

José Rosa pinxau1000

👾
¯\_(ツ)_/¯
  • Portugal
View GitHub Profile
@pinxau1000
pinxau1000 / Get_SnapshotAPI_NotDeprecated.java
Last active November 24, 2017 11:41
Not Deprecated Awareness/Snapshot API Get Methods Java/Android
//Not Deprecated Get Headphones State Method
public void getHeadphoneStateZDP(final TextView v) {
SnapshotClient snapshotClient = Awareness.getSnapshotClient(this);
Task<HeadphoneStateResponse> headphoneStateResponseTask = snapshotClient.getHeadphoneState();
headphoneStateResponseTask.addOnCompleteListener(new OnCompleteListener<HeadphoneStateResponse>() {
@Override
public void onComplete(@NonNull Task<HeadphoneStateResponse> task) {
if (task.isSuccessful()) {
HeadphoneStateResponse result = task.getResult();
@pinxau1000
pinxau1000 / util.py
Last active November 14, 2020 12:04
[MEE-CV] Utilitary Functions : - plotting, animating and saving images; - install, check if installed, check if installed and get version of packages; - make filters; - load an image in RGB
def install(package):
from sys import executable
from subprocess import check_call
print(f"Installing {package}...")
check_call([executable, "-m", "pip", "install", package])
from typing import Union
try:
@pinxau1000
pinxau1000 / bandeira.svg
Created March 19, 2021 22:40
Bandeira Portugal SVG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pinxau1000
pinxau1000 / pt_web_radios_stream.txt
Created June 2, 2021 19:18
Portuguese Web Radios Links. Can be used on Rythmbox! 😄
<source: http://mcrscast.mcr.iol.pt/>
http://mcrscast.mcr.iol.pt/M8060
http://mcrscast.mcr.iol.pt/M8070
http://mcrscast.mcr.iol.pt/M8080
http://mcrscast.mcr.iol.pt/M8090
http://mcrscast.mcr.iol.pt/M80BALLADS
http://mcrscast.mcr.iol.pt/SMOOTHSOUL
http://mcrscast.mcr.iol.pt/cidHiphop
http://mcrscast.mcr.iol.pt/cidLatina
http://mcrscast.mcr.iol.pt/cidadefm
@pinxau1000
pinxau1000 / PixelFormat.py
Created December 2, 2021 17:48
FFMPEG Pixel Formats Python Class
class PixelFormatsAsDict:
"""
Use this class to easily access pixel format properties. Also useful to use as an enumeration to PixelFormat class.
Each pixel format is a dictionary with the following keys:
>> name: The Name of the Pixel Format.
>> pixel_bits: The Number of Bits per Pixel.
>> components: The Number of Components.
>> is_input_format: Supported Input format for conversion.
>> is_output_format: Supported Output format for conversion.
>> is_hardware_accel_format: Hardware accelerated format.
@pinxau1000
pinxau1000 / VMAFOutput.py
Created December 2, 2021 17:48
VMAF Output Python Parser and Class Wrapper
import os
import json
from typing import List
class AgregateMetrics:
"""
Stores the attributes of the agregate metrics.
"""
integer_adm2: float = None
@pinxau1000
pinxau1000 / compute_vmaf.py
Created December 2, 2021 17:50
Python Script for VMAF Computation using VMAF CLI and Multithreading
import argparse
import multiprocessing
import os
import re
import subprocess
from functools import partial
import tqdm
@pinxau1000
pinxau1000 / png_to_yuv.py
Last active December 3, 2021 11:49
Converts a PNG image to a YUV image using FFMPEG and Multithreading
import argparse
import multiprocessing
import os
import subprocess
from functools import partial
import tqdm
from cv2 import cv2 as cv
@pinxau1000
pinxau1000 / vtm_encode_decode.py
Last active December 2, 2021 17:54
Python based CLI for Encoding and Decoding a whole Dataset using VTM and Multihreading
import argparse
import multiprocessing
import os
import re
import subprocess
from functools import partial
import tqdm
@pinxau1000
pinxau1000 / hm_encode_decode.py
Created December 2, 2021 17:53
Python based CLI for Encoding and Decoding a whole Dataset using HM and Multihreading
import argparse
import multiprocessing
import os
import re
import subprocess
from functools import partial
import tqdm