В Linux стандартными средствами можно использовать часть оперативной памяти как диск. Для этого требуется указать тип монтирования tmpfs в команде mount
mount -t tmpfs -o size=5G tmpfs /mnt/ram
Теперь путь /mnt/ram можно использовать как обычный каталог. Для чего это может быть нужно?
▫️ Скорость работы с таким каталогом выше чем многие SSD и тем более HDD.
▫️ Если у вас очень быстрый SSD на NVMe M.2 то такой способ особо не прибавит вам скорости, но поможет сохранить ресурс SSD когда требуется обрабатывать очень много мелких файлов и оперативка позволяет выделить нужный объем.
▫️ Оперативка это энергозависимая память, поэтому выключении питания все файлы безвозвратно теряются. Такой "non persistent" каталог гарантирует удаление временных файлов.
Я написал небольшой скрипт для условного теста и сравнения скорости копирования файлов между SSD и RAM.
Вот мои результаты:
Single File Size: 30.0Gb
ssd > ssd: 0:00:12.850 / 2.3Gb/s
sdd > ram: 0:00:06.453 / 4.6Gb/s
ram > ram: 0:00:06.995 / 4.3Gb/s
ram > sdd: 0:00:06.217 / 4.8Gb/s
Dir size: 32.7Gb, File count: 11127
ssd > ssd: 0:00:15.063 / 2.2Gb/s
sdd > ram: 0:00:08.486 / 3.9Gb/s
ram > ram: 0:00:08.032 / 4.1Gb/s
ram > sdd: 0:00:07.026 / 4.7Gb/s
Скрипт для теста ↗️
На моём железе прирост скорости ~2x. Плюс экономия ресурса SSD.
В Windows такой фишки по умолчанию нет, но обязательно найдутся аналогичные решения
#linux#triks
https://docs.python.org/3/library/marshal.html#module-marshal
marshal — Internal Python #object_serialization
This module contains functions that can read and write Python values in a binary format. The format is specific to Python, but independent of machine architecture issues (e.g., you can write a #Python value to a #file on a PC, transport the file to a Sun, and read it back there). Details of the format are undocumented on purpose; it may change between Python versions (although it rarely does).
@thefavbot
Qué puede hacer este bot?
Este bot puede recopilar todos sus medios en un solo lugar.
Usted puede acceder a sus medios favoritos en cualquier chat!
Para eso debes escribir @thefavbot en el chat que deseas. Soporta:
Foto, video, archivo, audio, voz, gif.
Para agregar cualquier medio a su colección, solo necesita enviarlo o reenviarlo al bot.
Idioma: Inglés
(visto en @BotsGram_cu)
#gift, #video, #image, #file
#Musicopy#Music#File#Transfer
Join the Musicopy: Music File Transfer beta on ✈️#TestFlight
🔗 Link: https://testflight.apple.com/join/Ck9KaZVR
Shared by Dimitri
Sharing
Share files and apps on android to other devices using browser
Share files and apps over HTTP.
You need the other device to be connected to the same network. just toggle on the server and scan the QR Code on other device and you're good to go. Files sent from browser to the app can be found in Sharing/ folder in your internal storage. You can always disable uploads in the app settings.
https://github.com/Ammar64/Sharing
Download
https://github.com/Ammar64/Sharing/releases/latest
https://f-droid.org/packages/com.ammar.sharing/
#share#file#Transfer#Android#qr
@warlockpublicurl_bot
Qué puede hacer este bot?
Envíale cualquier Archivo Multimedia de Telegram y generará un enlace directo para ello
Los Archivos Porno están Estrictamente Prohibidos.
Idioma: Inglés
(visto en @BotsGram_cu)
#file, #upload, #link, #url, #public, #telegram