Skip to content

Instantly share code, notes, and snippets.

@popmentos
popmentos / portrait_async.py
Created March 7, 2021 06:07 — forked from showa-yojyo/portrait_async.py
Producer-Consumer pattern demonstration in Python, featuring asyncio, multithread, and multiprocessing.
#!/usr/bin/env python
"""
Make landscape images portrait by using PIL (asyncio version)
"""
import asyncio
import sys
from PIL import Image
@popmentos
popmentos / split_by_silence.sh
Created May 24, 2020 16:39 — forked from vi/split_by_silence.sh
Using FFmpeg to split multimedia file into parts based on audio volume level
#!/bin/bash
IN=$1
OUT=$2
true ${SD_PARAMS:="-55dB:d=0.3"};
true ${MIN_FRAGMENT_DURATION:="20"};
export MIN_FRAGMENT_DURATION
if [ -z "$OUT" ]; then
@popmentos
popmentos / FlutterEmbedderGLFW.cc
Created October 3, 2017 05:22 — forked from chinmaygarde/FlutterEmbedderGLFW.cc
Flutter Embedder API Example (GLFW with OpenGL)
#include <assert.h>
#include <chrono>
#include <embedder.h>
#include <glfw3.h>
#include <iostream>
static_assert(FLUTTER_ENGINE_VERSION == 1, "");
static const size_t kInitialWindowWidth = 800;
  1. General Background and Overview
#include <iostream>
using namespace std;
class carcar{//使用純粹虛擬函數完成此類別
protected:
string name;
public:
virtual void move()=0;
};
#include <iostream>
using namespace std;
class Coord {
int x,y;
public:
Coord();
Coord(int);