TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #239 · 3 мај

Один из самых удобных способов записать данные это использование готовых форматов, такие как JSON или YAML. Из плюсов такого подхода стоит отметить вот что: 🔸 готовый, повсеместно используемый и поддерживаемый формат 🔸 простой и понятный файл, удобочитаемый для человека 🔸 можно легко редактировать в любом текстовом редакторе без специальных программ и библиотек Но есть и минусы 🔹 затраты времени при записи файла (кодирование данных в нужный формат строки) 🔹 затраты времени при чтении файла (декодирование данных в Python объекты) 🔹 размер файла увеличивается из-за разметки данных (скобки, запятые, переносы, отступы...) 🔹 перед записью все данные должны быть помещены в память в полном объёме (не всегда) 🔹 при чтении необходимо считать весь файл в память и только потом декодировать данные Если нужно писать немного данных в несколько файлов, то затраты по времени не ощутимы. Обычно это файлы конфига или какие-либо метаданные. Это отличный вариант под такие задачи. Есть и другой поход к записи файлов - это бинарные файлы. Используется, когда данных достаточно много и никто их не собирается читать глазками😳. 🔸 очень быстрая запись 🔸 чтение значительно быстрей чем JSON, YAML итд 🔸 размер файла значительно меньше, так как нет разметки 🔸 можно записывать данные по мере поступления не загружая всё в память 🔸 можно извлечь любую часть данных независимо Из минусов 🔹 нужно определить свой формат записи данных (если не используете готовую спецификацию определённого формата) 🔹 не получится открыть файл и визуально понять что там записано, а для чтения файла потребуется знать его спецификацию. 🔹 не так-то просто создать такой файл без специальной библиотеки В таком виде удобно записывать большой массив любых однородных данных. Например, мониторинг валютной биржи или кэшированная анимация 3D геометрии. (Это не означает что нельзя записать данные разного типа, просто это будет не так удобно) Представьте себе JPG-картинку. По сути это немного мета-информации и большой массив пикселей. Тоже самое со звуком или видео файлом. Поэтому, если вы попробуете открыть картинку в текстовом редакторе вы увидите что-то вроде такого f15d cd29 a564 4578 ... 09e2 9bc4 a696 1253 ... 84e9 4de1 3b23 c24a ... 2534 5161 28e0 709d ... ... Это и есть записанные байтики. И для их чтения требуется определённый софт который знает что с ними делать. Под каждый тип файла. К чему это я? Читайте в следующем посте... #tricks#basic

Резултати

Пронајдени 12 слични објави

Пребарај: #gstratechange

当前筛选 #gstratechange清除筛选
IRAS

@irassg · Post #710 · 12.12.2023 г., 02:29

#GSTRateChange Consumers who come across cases of unjustified price increases of essential goods or services that use the GST increase as a cover can provide their feedback to the Committee Against Profiteering (CAP) at www.cap.gov.sg/shareyourfeedback. All feedback submitted will be reviewed by CAP, and further investigated if necessary, to identify businesses that may have engaged in unjustified price increases on the pretext of the GST increase. For more information, please visit CAP’s website.

IRAS

@irassg · Post #699 · 05.12.2023 г., 02:30

#GSTRateChange Only GST-registered businesses can charge GST from their effective date of GST registration. You can check if a business is GST-registered at https://go.gov.sg/gst-registered-business-search. Non-GST registered businesses are not allowed to charge GST.

IRAS

@irassg · Post #676 · 28.11.2023 г., 02:34

#GSTRateChange Do you know how much GST will be charged, for transactions that span the rate change? It all depends on when the invoice is issued, whether payment is made and if the goods/services have been delivered/performed. Read on for some scenarios you might find yourself in! 👉🏼More info on the transitional rules for the rate change

IRAS

@irassg · Post #666 · 21.11.2023 г., 02:31

#GSTRateChange From 1 Jan 2024, you should see price displays from GST-registered businesses, with GST charged at 9%. Prices that are quoted, whether written or verbal, should be GST-inclusive so that you know the final price pay upfront. 👉🏼 Click here for more info on price displays

IRAS

@irassg · Post #654 · 07.11.2023 г., 07:32

#GSTRateChange With the second step of the GST rate change approaching, IRAS reminds all businesses to ensure that their systems are ready to incorporate the new 9% GST rate with effect from 1 Jan 2024 and to take active steps to avoid rate change errors during implementation. 👉🏼Click here for more on getting your business ready for the second rate change and common rate change errors to avoid

IRAS

@irassg · Post #558 · 19.06.2023 г., 03:31

#GSTRateChange Businesses are strongly encouraged to start preparation early for a smooth transition to the GST rate of 9% on 1 Jan 2024. Here are 3 main things for businesses to do, ahead of the second GST rate change. 👉🏼Click here for more information on preparing for the rate change

IRAS

@irassg · Post #305 · 13.12.2022 г., 02:40

#GSTRateChange PSA: Only GST-registered businesses can charge GST from their effective date of GST registration. You can check if a business is GST-registered at https://go.gov.sg/gst-registered-business-search. Non-GST registered businesses are not allowed to charge GST.

IRAS

@irassg · Post #285 · 06.12.2022 г., 06:00

#GSTRateChange Do you know how much GST will be charged, for transactions that span the rate change? It all depends on when the invoice is issued, whether payment is made and if the goods/services have been delivered/performed. Read on for some scenarios you might find yourself in! 👉🏼Click here for more info on the transitional rules for the rate change

IRAS

@irassg · Post #733 · 31.12.2023 г., 06:44

#GSTRateChange Heading to the 24-hour store to grab some post-NYE party essentials in the wee hours of 1 Jan 2024? #DidYouKnow that you may only be charged GST at 8% on your purchase, if it is the supplier’s normal accounting practice to treat sales made after midnight as sales of the preceding day! 👉🏼Click here for more info on the transitional rules for the rate change

IRAS

@irassg · Post #334 · 31.12.2022 г., 02:31

#GSTRateChange Making a run to the 24-hour store in the wee hours of 1 Jan?#DidYouKnow you may only be charged GST at 7% on your purchase, if it is the supplier’s normal accounting practice to treat sales made after midnight as sales of the preceding day! 👉🏼 Click here for more info on the transitional rules for the rate change

IRAS

@irassg · Post #725 · 22.12.2023 г., 06:30

Navigate the right GST rate to pay for transactions spanning the rate change with new mummy and her bestie! 💁‍♀️💡 A transaction is considered to span the GST rate change if one or two of the following events takes place wholly or partially on/after 1 Jan 2024: - The issuance of invoice by supplier - The receipt of payment by supplier - The delivery of goods or performance of services More info at go.gov.sg/irasgst-rc-consumers #GST#GSTRateChange#skit#iras#irassg

IRAS

@irassg · Post #723 · 20.12.2023 г., 09:10

🎵 We carry through, do what we need to do~ Yes, I’m a GST-registered business just like you 🎵 Here are 3 key things GST-registered businesses need to prepare for the 2024 GST rate change: 1) Update systems to incorporate 9% GST from 1 Jan 2024 2) Prepare price displays to reflect 9% GST from 1 Jan 2024 3) Understand transitional rules to apply the correct GST rate for transactions spanning 1 Jan 2024 Learn more at go.gov.sg/irasgst-rc-businesses #GST#GSTRateChange#iamjustlikeyou#iras#irassg