This file has been moved:
View xml7shi.py
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
# public domain | |
import io | |
def replaces(s, args): | |
for key, value in args.items(): | |
s = s.replace(key, value) | |
return s | |
def from_entity(s): | |
return replaces(s, { |
View baidu.txt
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
アラビア語 في منتصف الطريق من خلال حياتنا ، أجد نفسي في غابة مظلمة ، لأن الطريق الصحيح قد فقدت . Midway through our lives, I found myself in a dark forest because the right path had already been lost. | |
アゼルバイジャン語 Bizim həyatımızın yolunun ortasında, mən özümü qaranlıq ormanda gördüm, çünki doğru yol kayboldu. In the middle of our life, I saw myself in the dark forest, because the right path was gone. | |
アルバニア語 Në mes të rrugës së jetës sonë, gjeta veten në një pyll të errët, sepse rruga e duhur ishte humbur. In the middle of our lives, I found myself in a dark forest, because the right path was lost. | |
アルメニア語 Մեր կյանքի ճանապարհի կենտրոնում ես գտնվեցի մութ անտառում, որովհետև ճիշտ ճանապարհը կորցվել էր: In the middle of our lives, I was in the dark woods because the right way was lost. | |
アムハラ語 በሕይወታችን መንገድ መካከል በጨለማ ዱር ውስጥ አገኘሁ፥ የቀናውም መንገድ ጠፍቶአልና። For I have found the way of our life in the forest of darkness, and the way of uprightness perisheth. | |
アッサム語 আমাৰ জীৱনৰ মধ্যবৰ্তী পথ, আমি এটা ডাঠ অঞ্চলত পোৱা গল, কাৰণ সঠিক পথ হেৰাই |
View capture.fsx
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
#if NETF | |
#r "System" | |
#r "System.Drawing" | |
#r "System.Windows.Forms" | |
#else | |
//#r "nuget: System.Drawing.Common, 5.0.2" | |
#r @"C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\6.0.4\System.Drawing.Common.dll" | |
#r @"C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\6.0.4\System.Windows.Forms.dll" | |
#r @"C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\6.0.4\System.Windows.Forms.Primitives.dll" | |
#r @"C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\6.0.4\Microsoft.Win32.SystemEvents.dll" |
View imq.js
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 imul(x, y) { | |
return [x[0] * y[0] - x[1] * y[1], x[0] * y[1] + x[1] * y[0]]; | |
} | |
function cross(x, y) { | |
return [x[1] * y[2] - x[2] * y[1], x[2] * y[0] - x[0] * y[2], x[1] * y[2] - x[2] * y[1]]; | |
} | |
function vdot(x, y) { | |
return x.reduce((acc, xi, i) => acc + xi * y[i], 0); |
View ssml_ido.py
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
# CC0 http://creativecommons.org/publicdomain/zero/1.0/ | |
phonemes = {} | |
phonemes2 = {} | |
def setphonemes(phs): | |
for ph in phs.split(): | |
p1, p2 = ph.split(",") | |
phonemes[p1] = p2 | |
if len(p1) > 1: phonemes2[p1[0]] = 1; |
View common.ts
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
export function* splitLines(text: string) { | |
let line = "", prev = ""; | |
for (const ch of text) { | |
if (ch == '\r') { | |
yield line; | |
line = ""; | |
} else if (ch == '\n') { | |
if (prev != '\r') yield line; | |
line = ""; | |
} else { |
View split-pdf.html
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="ja" style="height:100%"> | |
<head> | |
<meta charset="utf-8"> | |
<style> | |
.gutter { | |
background-color: #eee; | |
} |
View RijndaelPad.fsx
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
// (0) PUBLIC DOMAIN | |
// To the extent possible under law, the person who associated CC0 with this work | |
// has waived all copyright and related or neighboring rights to this work. | |
#r "System" | |
#if NETF | |
#r "System.Drawing" | |
#r "System.Windows.Forms" | |
#else | |
//#r "nuget: System.Drawing.Common, 5.0.2" |
View ImageToRtf.cs
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
// https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-wmf/4813e7fd-52d0-4f42-965f-228c8b7488d2 | |
// https://www.codeproject.com/Questions/540673/InsertplusimageplusinplusRichTextBoxpluswithoutplu | |
// https://stackoverflow.com/questions/1490734/programmatically-adding-images-to-rtf-document | |
// https://garakutatech.blogspot.com/2021/01/cwpfwinformsrichtextboxjpeg.html | |
using System; | |
using System.Drawing; | |
using System.Drawing.Imaging; | |
using System.IO; | |
using System.Text; |
NewerOlder