ncdu -x
16Gb space is enough to make very large systems, especially with 32Gb Oracle Linux server as a host.
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.5/install.sh | bash
restart terminal
nvm install 10
npm install -g yarn
mkdir my-app
cd my-app
Create package.json
in this directory:{
"private": true,
"dependencies": {
"typescript": "latest",
"@theia/typescript": "next",
"@theia/navigator": "next",
"@theia/terminal": "next",
"@theia/outline-view": "next",
"@theia/preferences": "next",
"@theia/messages": "next",
"@theia/git": "next",
"@theia/file-search": "next",
"@theia/markers": "next",
"@theia/preview": "next",
"@theia/callhierarchy": "next",
"@theia/merge-conflicts": "next",
"@theia/search-in-workspace": "next",
"@theia/json": "next",
"@theia/textmate-grammars": "next",
"@theia/mini-browser": "next"
},
"devDependencies": {
"@theia/cli": "next"
}
}
yarn --registry https://registry.npmjs.org
yarn theia build
yarn theia start /my-workspace --hostname 0.0.0.0 --port 8080
Thank you Theia for it project may help to programming in cheap environment I can found only in emergency situations.
{ "name": "arise", "version": "1.0.0", "description": "", "main": "main.js", "dependencies": { "@google-cloud/speech": "3.3.0", "yargs": "^14.0.0" }, "devDependencies": { }, "scripts": { "build": "node main.js" }, "author": "", "license": "ISC" }
const speech = require('@google-cloud/speech'); const path = require('path'); const client = new speech.SpeechClient(); const gcsUri = 'gs://staging.alien-dialect-254414.appspot.com/2.flac'; const encoding = 'FLAC'; const languageCode = 'en-US'; const config = { enableWordTimeOffsets: true, encoding: encoding, languageCode: languageCode, sampleRateHertz: 44100 }; const audio = { uri: gcsUri, }; const request = { config: config, audio: audio, }; client .longRunningRecognize(request) .then(data => { const operation = data[0]; // Get a Promise representation of the final result of the job return operation.promise(); }) .then(data => { const response = data[0]; var subContent = ""; response.results.forEach(result => { console.log(`Transcription: ${result.alternatives[0].transcript}`); subContent = subContent + result.alternatives[0].transcript; result.alternatives[0].words.forEach(wordInfo => { // NOTE: If you have a time offset exceeding 2^32 seconds, use the // wordInfo.{x}Time.seconds.high to calculate seconds. const startSecs = `${wordInfo.startTime.seconds}` + `.` + wordInfo.startTime.nanos / 100000000; const endSecs = `${wordInfo.endTime.seconds}` + `.` + wordInfo.endTime.nanos / 100000000; console.log(`Word: ${wordInfo.word}`); console.log(`\t ${startSecs} secs - ${endSecs} secs`); }); }); }) .catch(err => { console.error('ERROR:', err); });
class Program { private const int MB = 1000000; private static string _folder; private static string _destFolder; private static bool _sameDestination; private static long _chunkSize; private static bool _move; private static bool _owerride; private static List<string> _skippedFiles = new List<string>(); private static long _totalCount; private static long _totalSize; private static string[] _files; [DllImport("kernel32.dll", SetLastError = true)] static extern IntPtr GetStdHandle(int nStdHandle); [DllImport("kernel32.dll")] static extern bool ReadConsoleW(IntPtr hConsoleInput, [Out] byte[] lpBuffer, uint nNumberOfCharsToRead, out uint lpNumberOfCharsRead, IntPtr lpReserved); public static IntPtr GetWin32InputHandle() { const int STD_INPUT_HANDLE = -10; IntPtr inHandle = GetStdHandle(STD_INPUT_HANDLE); return inHandle; } static void Main(string[] args) { Console.WriteLine("Folter to backup:"); _folder = ConsoleReadLine(); if(!Directory.Exists(_folder)) { Console.WriteLine("NOT FOUND"); return; } Console.WriteLine("Same destination?"); string yesNo = Console.ReadLine(); _sameDestination = yesNo.ToLower() == "yes"; if (!_sameDestination) { Console.WriteLine("Destination folter:"); _destFolder = ConsoleReadLine(); if (!Directory.Exists(_destFolder)) { Console.WriteLine("NOT FOUND"); return; } } else { _destFolder = _folder; } Console.WriteLine("Size of CD MB:"); _chunkSize = Convert.ToInt64(Console.ReadLine()) * MB; Console.WriteLine("Move files?"); _move = Console.ReadLine().ToLower() == "yes"; Console.WriteLine("Owerride partial results?"); _owerride = Console.ReadLine().ToLower() == "yes"; ScanForFilesLargeWhenSize(); PreStatistics(); Console.WriteLine("Are you sure tu start?"); yesNo = Console.ReadLine(); if(yesNo.ToLower() != "yes") { Console.WriteLine("FINISED"); return; } ProcessFolter(); } private static string ConsoleReadLine() { const int bufferSize = 1024; var buffer = new byte[bufferSize]; uint charsRead = 0; ReadConsoleW(GetWin32InputHandle(), buffer, bufferSize, out charsRead, (IntPtr)0); // -2 to remove ending \n\r int nc = ((int)charsRead - 2) * 2; var b = new byte[nc]; for (var i = 0; i < nc; i++) b[i] = buffer[i]; var utf8enc = Encoding.UTF8; var unicodeenc = Encoding.Unicode; return utf8enc.GetString(Encoding.Convert(unicodeenc, utf8enc, b)); } private static void ProcessFolter() { int chunkIndex = 0; long currentSize = 0; string currentFolter = string.Empty; long currentCount = 0; foreach (var file in _files) { string chunkName = string.Empty; var info = new FileInfo(file); if (chunkIndex == 0 || currentSize + info.Length > _chunkSize) { if (chunkIndex > 0) { Console.WriteLine("Chunk created: {0}", currentFolter); Console.WriteLine("Chunk size: {0} MB", currentSize / MB); Console.WriteLine("Chunk file count: {0}", currentCount); } currentSize = 0; currentCount = 0; chunkIndex++; chunkName = $"CD_{chunkIndex}"; currentFolter = Path.Combine(_destFolder, chunkName); Directory.CreateDirectory(currentFolter); } string subFolder = CreateChunkSubfolder(file, currentFolter); string destFile = Path.Combine(currentFolter, subFolder, info.Name); long size = info.Length; if (File.Exists(destFile) && _owerride) { File.Delete(destFile); } if (!File.Exists(destFile)) { if (_move) { File.Move(file, destFile); } else { File.Copy(file, destFile); } currentSize += size; currentCount++; } else { currentSize += new FileInfo(destFile).Length; } } } private static string CreateChunkSubfolder(string file, string destFolder) { string result = Path.GetDirectoryName(file).Replace(_folder, string.Empty).TrimStart(Path.DirectorySeparatorChar); string[] subfolders = result.Split(Path.DirectorySeparatorChar, StringSplitOptions.RemoveEmptyEntries); string curentFolder = destFolder; foreach(var folder in subfolders) { curentFolder = Path.Combine(curentFolder, folder); if (!Directory.Exists(curentFolder)) { Directory.CreateDirectory(curentFolder); } } return result; } private static void PreStatistics() { Console.WriteLine("===================="); Console.WriteLine("Total size to process: {0} MB", _totalSize / MB); Console.WriteLine("Total files count to process: {0}", _totalCount); Console.WriteLine("Minimal estimated chunks: {0}", (_totalSize / _chunkSize)+1); Console.WriteLine("Destination folder: {0}", _destFolder); Console.WriteLine("===================="); } private static void ScanForFilesLargeWhenSize() { _files = Directory.GetFiles(_folder, "*", SearchOption.AllDirectories); foreach (var file in _files) { var info = new FileInfo(file); if (info.Length > _chunkSize) { _skippedFiles.Add(file); Console.WriteLine("{0} SKIPPED with size {1} MB", file, info.Length / MB); } else { _totalCount++; _totalSize += info.Length; } } } }
71 jounals still available on issuu with great story of netlabels time. debug_mag Publisher Publications - Issuu