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
for %%f in (*.mp4) do call ffmpeg -i "%%~nf.mp4" -vcodec libx264 -vf scale=-1:360 -r 12 -preset fast -acodec copy "%%~nf.360p.mp4" | |
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
# coding:utf-8 | |
# author LuShan | |
# version : 1.1.9 | |
import json | |
# import urllib3 | |
import logging | |
import random | |
import re | |
import requests | |
from urllib.parse import quote |
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
function translate(text, from = "auto", to) { | |
try { | |
const result = UrlFetchApp.fetch( | |
"https://translate.google.com/_/TranslateWebserverUi/data/batchexecute", | |
{ | |
payload: | |
"f.req=" + | |
encodeURIComponent( | |
JSON.stringify([ | |
[ |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<style>body { | |
font-family: Arial, sans-serif; | |
} | |
h1 { |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<style> | |
</style> | |
</head> |
// window.location.pathname.toString().substring(0, window.location.pathname.toString().lastIndexOf('/')) + '/'
document.currentScript.src.toString().substring(0, document.currentScript.src.toString().lastIndexOf('/'))+ '/'
if path of js file is https://cdn.jsdelivr.net/npm/bbb/mmm.js
it returns https://cdn.jsdelivr.net/npm/bbb/
function getScriptFileName() {
return (new Error).fileName;
A collection of cool javascript human readable code snippets.
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Practice AJAX</title> | |
<script type="text/javascript"> | |
function do_ajax() { | |
var req = new XMLHttpRequest(); | |
var result = document.getElementById('result'); | |
req.onreadystatechange = function() | |
{ |
You can draw something and pass image to your code.
Usage:
from base64 import b64decode
from IPython.display import HTML, Image
from google.colab.output import eval_js
import urllib.request
board_html = urllib.request.urlopen('https://gist.githubusercontent.com/karim23657/5ad5e067c1684dbc76c93bd88bf6fa53/raw/2ef57f881bc700c2c346bd6c7a7f2d5364b21048/drawing%2520board.html').read().decode('utf-8')
NewerOlder