Menu
e-lo
  • Home
    • Tech
    • Inspiration and about
  • Database
    • T-SQL
    • SQL Server quick
    • SQL server docs
    • MySql quick sheet
    • Postgre
    • InfluxDB
  • Programming
    • Automating the boring stuff
    • Python 101
    • Python Docs
    • Python Logging
    • cSharp Overview
    • Powershell Latest
    • Powershell 4 lang ref
    • MS Azure PS ref
    • MS Azure CLI ref
  • Azure
    • AZ-104-MS Azure Administrator 101 quick ref
    • AZ-104 Lab
    • MS Windows virtual machines in Azure
    • MS ARM Docs
    • MS ARM Tutorial
    • MS Deployment scripts (intern/extern)
    • ARM Quickstart
    • MS ARM templates 4h
  • Az Adm
    • AD 101
    • Governance and Compliance 102
    • Administration 103
    • Virtual Networking 104
    • Storage 107 (With table (NoSQL and more))
    • Virtual Machines 108
    • Azure Virtual Machines 101
    • Monitor VM (and market)
  • Linux
    • Top CMD’s
    • Useful CMD Linux
    • ss64 Linux
    • Ubuntu
    • 30 things Ubuntu 18.04
  • Zen
    • Not thinking about anything is Zen
e-lo

Category: Python

TODO Cryptography with Python – Caesar Cipher

Posted on January 7, 2021 by espenk

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…

+

TODO Python Regular Expressions

Posted on December 13, 2020December 13, 2020 by espenk

https://realpython.com/regex-python/

+

Function app

Posted on October 5, 2020October 5, 2020 by espenk

https://docs.microsoft.com/en-us/azure/azure-functions/ First function Python https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-first-function-vs-code?pivots=programming-language-python Linux, hm, must upload code from local The Azure Functions extension for Visual Studio Code. Azure icon click it, takes time Select a language for your function project: Choose Python.Select a Python alias to create a virtual environment: Choose the location of your Python interpreter. If the location isn’t shown,…

+

Azure SDK Pyhon

Posted on February 16, 2020February 16, 2020 by espenk

https://azure.github.io/azure-sdk/python_introduction.html Python Guidelines: Introduction: Design principlesIdiomaticConsistentApproachableDiagnosableDependablePython Design Principles:–PEP 20 — The Zen of Python, import this https://www.python.org/dev/peps/pep-0020/ General Guidelines: https://azure.github.io/azure-sdk/general_introduction.html Gitub: https://github.com/azure/azure-sdk-for-python Supported python versions:Code style: https://www.python.org/dev/peps/pep-0008/ Naming conventions: service_client = ServiceClient() service_client.list_things() def do_something(): class ThisIsCorrect(object): pass MAX_SIZE = 4711 database_module.py Method signatures: DO NOT use, static, do not use get set, use properties…

+

Docker-compose ubuntu

Posted on February 10, 2020February 12, 2020 by espenk

Install it from here, the two first lines https://get.docker.com/ curl -fsSL https://get.docker.com -o get-docker.sh sh get-docker.sh docker –version Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a YAML file to configure your application’s services. Then, with a single command, you create and start all the services from your…

+

PEP 8

Posted on January 30, 2020January 30, 2020 by espenk

Programming Recommendations https://www.python.org/dev/peps/pep-0008/#programming-recommendations Use is not operator rather than not … is. While both expressions are functionally identical, the former is more readable and preferred. Always use a def statement instead of an assignment statement that binds a lambda expression directly to an identifier. Derive exceptions from Exception rather than BaseException. Direct inheritance from BaseException…

+

Python debugging in VS Code

Posted on January 25, 2020January 25, 2020 by espenk

Debugging 101 https://github.com/microsoft/vscode-recipes/tree/master/debugging%20python We need VSC, Python extension and a launch.json with the minimum of integrated and external. The launch.json Debug->Open configurations Ok, let’s run a script and test it. F5 is for run, F10 is for step into. We are going to test Python set functions, union and intersection. The breakpoint will be at…

+

Python, lxml and Xpath

Posted on November 25, 2019December 4, 2019 by espenk

https://lxml.de/xpathxslt.html https://www.w3schools.com/xml/xpath_syntax.asp Read a file with xml, convert it to a string from bytes: pip install lxml from lxml import etree as et Make dictionary (duplicate keys, get atr) result: Code: def xml_to_dict(xmlfile): msg = {} count = 1 with open(xmlfile) as r: xml = r.read() print(type(xml)) parser = et.XMLParser(recover=True, collect_ids=True) root = et.fromstring(bytes(xml, encoding=”utf-8″), parser) x = root.xpath(“//*”)# get all #x…

+

Python as systemctl service

Posted on November 3, 2019August 23, 2020 by espenk

https://www.loggly.com/blog/new-style-daemons-python/ https://github.com/torfsen/python-systemd-tutorial This is an easy and not enough tested script, you may also enable it to start at boot. Read about systemctl: https://www.freedesktop.org/software/systemd/man/systemctl.html So create a file in /lib/systemd/system touch python_service.service sudo nano python_service.service run the script with (when it is done and has no erros): This is my test script: It prints service…

+

MariaDb linux Python ORM

Posted on October 24, 2019October 25, 2019 by espenk

https://linuxize.com/post/how-to-install-mariadb-on-ubuntu-18-04/ MariaDB is an open source, multi-threaded relational database management system, backward compatible replacement for MySQL. It is maintained and developed by the MariaDB Foundation including some of the original developers of the MySQL. https://linuxize.com/post/how-to-create-a-sudo-user-on-ubuntu/ sudo apt update sudo apt install mariadb-server sudo mysql -V sudo systemctl status mariadb Run the mysql_secure_installation command to improve…

+
  • 1
  • 2
  • 3
  • 4
  • 5
  • Next

RSS Azure

  • Azure and HITRUST publish shared responsibility matrix January 14, 2021

RSS Python

  • PEP 651: Robust Stack Overflow Handling January 18, 2021

Cloud

ARM (8) azure (23) cmd (1) Django (4) Docker (1) e-lo (2) Flask (2) Github (9) Grafana (2) Information (1) Information Retrieval (11) JAVA (1) kivy (2) Kotlin (4) linux (11) mobile (2) Natural Language Prossesing (NLP) (2) Net.Core (1) Networking and Security (2) OPC (2) PEP8 (1) Philosophy (3) Python (41) Python Networking and Security (2) Reason (2) RMQ (2) Solr (11) Sql (10) VSC (1) Warframe (2) WMVARE (4) Zabbix (7)

Recent Posts

  • 1 TODO ARM Lab 105 MS (Deployment create a pipeline)
  • 2 TODO MS ARM Template 4h
  • TODO Cryptography with Python – Caesar Cipher
  • 3 TODO Udemy AZ-104 Microsoft Azure Administrator Exam Certification (Scott Duffy)
  • ARM Lab 104 MS (Deployment and more)

Archives

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
©2021 e-lo | Powered by WordPress & Superb Themes