This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$request_payload = !empty($_POST) ? $_POST : array(); | |
$request_payload = empty($_POST) && !empty($_GET) ? $_GET : $request_payload; | |
$request_payload = isset($_SERVER['CONTENT_TYPE']) | |
&& $_SERVER['CONTENT_TYPE'] == 'application/json' | |
? json_decode(file_get_contents('php://input'), true) | |
: $request_payload; | |
$request_details = array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
btoa(Math.random()).substr(0, 10); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from pytube import YouTube | |
import time | |
from urllib.parse import urlparse, parse_qs | |
import gradio as gr | |
def download_audio_from_youtube_url(url: str) -> gr.outputs.File: | |
filename = 'yt-audio-{timestamp}.mp4'.format(timestamp=round(time.time())) | |
try: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pytube import YouTube | |
yt = YouTube('http://youtube.com/watch?v=2lAe1cqCOXo') | |
yt.streams.get_audio_only().download(filename="test.mp3") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"name": "Afghanistan", | |
"mobile_code": "+93", | |
"iso_code": "AF", | |
"flag_emoji": "🇦🇫" | |
}, | |
{ | |
"name": "Albania", | |
"mobile_code": "+355", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
use Illuminate\Http\Request; | |
class ImageUploadController | |
{ | |
public function saveToWebp($src, $destination, $extension) | |
{ |
NewerOlder