Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma
You can get the list of supported formats with:
ffmpeg -formats
You can get the list of installed codecs with:
from fastapi import Request, HTTPException | |
from pydantic import BaseModel, BaseModel, HttpUrl | |
from modal import Secret, App, web_endpoint, Image | |
from typing import Optional, List | |
from example import proposal | |
import os | |
app = App(name="circleback", image=Image.debian_slim().pip_install("openai", "pydantic", "fastapi")) | |
class Attendee(BaseModel): |
<!-- | |
the select needs | |
- "has_other" css class | |
- "data-other" attribute, which points to the id of the element to hide/show (normally a textbox) | |
- "data-other-text" attribute, which indicates the text which indicates that other has been selected | |
--> | |
<select class="has_other" data-other="#textbox_id" data-other-text="...other"> | |
<option>option 1</option> | |
<option>...other</option> |
package main | |
import ( | |
"flag" | |
"io" | |
"log" | |
"net" | |
"net/http" | |
"strings" | |
) |
const padLeft = (number, n,str) => { | |
return number.toString().length >= n ? number : Array(n-String(number).length + 1).join(str||'0') + number; | |
} | |
const playTime = (milliseconds) => { | |
let seconds = milliseconds / 1000.0, | |
hours = Math.floor(seconds / 3600), | |
minutes = Math.floor((seconds % 3600) / 60), | |
only_seconds = Math.round(seconds % 60), | |
parts = []; |
source 'https://rubygems.org' | |
gem 'nokogiri', '~>1.6' | |
gem 'aws-sdk', '~> 2' |
We will be building a Generic Tagging JSON API that can store, retrieve, delete and report on the usage of a "tag" across different entities. This is a guide for the endpoints, if you think you have a better route or would like to modify the naming/schema feel free. We like specs, so we hope you do to.
POST /tag
- Entity Type, e.g. 'Product', 'Article'
public class JsonBuilder | |
{ | |
private readonly StringBuilder _sb; | |
private readonly Stack<bool> _hasPreviousProperties; | |
private bool RequiresComma { get { return _hasPreviousProperties.Count > 0 && _hasPreviousProperties.Peek(); } } | |
public JsonBuilder() { | |
_sb = new StringBuilder(); |
main() { | |
while [[ true ]]; do | |
local request="$(curl -s 'http://www.apple.com/us/shop/goto/iphone_7/select' | grep 'be back soon')" | |
if [[ ! $request ]]; then | |
say 'Yep, time to buy' | |
break | |
fi |