• 5 min,  Python

    Callback

    Python Callback Function – Python Examples A callback is a function that is passed as an argument to other function. This other function is expected to call this callback function in its definition. The point at which other function calls our callback function depends on the requirement and nature of other function. Callback Functions are generally used with asynchronous functions. Callbacks make sure that a function is not going to run before a task is completed but will run right after the task has completed.

  • 5 min,  Python

    TODO Build a Hash Table in Python With TDD Real Python

    Build a Hash Table in Python With TDD Real Python https://realpython.com/python-hash-table/ Classic data structure Indexing database tables Caching computed values Implementing sets O(1) Python own hash table dict O(n) or O(1), you might say…. https://stackoverflow.com/questions/9214353/hash-table-runtime-complexity-insert-search-and-delete

    Comments Off on TODO Build a Hash Table in Python With TDD Real Python
  • 5 min,  azure,  Python

    5 min Azure Storage Explorer Queues (access key) Python SDK

    What is Azure Queue Storage? Introduction to Azure Queue Storage – Azure Storage | Microsoft Docs Azure Queue Storage is a service for storing large numbers of messages. You access messages from anywhere in the world via authenticated calls using HTTP or HTTPS. A queue message can be up to 64 KB in size. A queue may contain millions of messages, up to the total capacity limit of a storage account. Queues are commonly used to create a backlog of work to process asynchronously. Queue service REST API – Azure Storage | Microsoft Docs How to view the messages? Authorize requests to Azure Storage (REST API) | Microsoft Docs https://docs.microsoft.com/en-us/azure/storage/common/storage-account-keys-manage?tabs=azure-portal…

    Comments Off on 5 min Azure Storage Explorer Queues (access key) Python SDK
  • 5 min,  azure,  Python

    5 min Azure event hub with Python SDK (con str)

    Event Hubs: Azure Event Hubs is a highly scalable publish-subscribe service that can ingest millions of events per secondand stream them into multiple applications. This lets you process and analyze the massive amounts ofdata produced by your connected devices and applications. https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-features Namespace: Network endpoints and a range of access control and network integration management Event retention: Default value and shortest possible retention period is 1 day (24 hours) Publisher policy: Enables granular control over event publishers through publisher policies Capture: Blob storage account, or an Azure Data Lake Storage account Partitions: Organizes sequences of events sent to an event hub into one or more partitions, FIFO Event consumers: Any…

    Comments Off on 5 min Azure event hub with Python SDK (con str)
  • 5 min,  azure,  Python

    5 min Create and configure an Azure Files shares connect with Python SDK (con str)

    https://docs.microsoft.com/en-us/azure/storage/files/storage-how-to-create-file-share?tabs=azure-portal Questions to think about:What are the performance requirements for your Azure file share?What are your redundancy requirements for your Azure file share?What size file share do you need? File share type: SMB connect SMB protocol 3 or higher Create a storage account:BasicsGeneral purpose version 2 (GPv2) storage accounts: HDD-based, ++FileStorage storage accounts: SSD-based, ++ Replication: Although this is labeled replication, this field actually means redundancyNetworkingData protectionAdvancedSecure transfer required:This field indicates whether the storage account requires encryption in transit for communication to the storage account.If you require SMB 2.1 support, you must disable this.Large file shares:up to 100 TiB (LRS, ZRS) NOTE:Selecting the blob access tier does not affect the…

    Comments Off on 5 min Create and configure an Azure Files shares connect with Python SDK (con str)
  • azure,  Information Retrieval,  Python

    Measure your VM with typeperf (Pandas py) perfmon

    Azure disk-types https://docs.microsoft.com/en-us/azure/virtual-machines/disks-types Ultra, Premium SSD, Standard SSD, Standard HDD. Max disk size 65,536 gibibyte (GiB) 32,767 GiB 32,767 GiB 32,767 GiB Max throughput 2,000 MB/s 900 MB/s 750 MB/s 500 MB/s Max IOPS 160,000 20,000 6,000 2,000 Premium SSD Azure premium SSDs deliver high-performance and low-latency disk support for virtual machines (VMs) with input/output (IO)-intensive workloads. […] Premium SSDs can only be used with VM series that are premium storage-compatible. Standard SSD Azure standard SSDs are a cost-effective storage option optimized for workloads that need consistent performance at lower IOPS levels. […] Like standard HDDs, standard SSDs are available on all Azure VMs. Standard SSD sizes E1 E2 E3…

    Comments Off on Measure your VM with typeperf (Pandas py) perfmon
  • Python,  Python Networking and Security

    Cryptography with Python – Caesar Cipher

    After reading (almost done) with: The Code Book : The Secret History of Codes and Code-Breaking Paperback – April 30, 2002by Simon Singh (Author) available at Amazon and so on I became fascinated with the history and the small stories that goes along with the different codes used and still being used today. Here is a link for viewing and programming cryptography: https://www.tutorialspoint.com/cryptography_with_python/cryptography_with_python_caesar_cipher.htm OverviewDouble Strength EncryptionPython Overview and InstallationReverse CipherCaesar CipherROT13 AlgorithmTransposition CipherEncryption of Transposition CipherDecryption of Transposition CipherEncryption of filesDecryption of filesBase64 Encoding & DecodingXOR ProcessMultiplicative CipherAffine CiphersHacking Monoalphabetic CipherSimple Substitution CipherTesting of Simple Substitution CipherDecryption of Simple Substitution CipherPython Modules of CryptographyUnderstanding Vignere CipherImplementing Vignere CipherOne Time Pad…

    Comments Off on Cryptography with Python – Caesar Cipher