analitics

Pages

Showing posts with label 2023 news. Show all posts
Showing posts with label 2023 news. Show all posts

Monday, November 27, 2023

Python 3.13.0a1 : How to use PyOTP for Microsoft Authenticator.

PyOTP is a Python library for generating and verifying one-time passwords. It can be used to implement two-factor (2FA) or multi-factor (MFA) authentication methods in web applications and in other systems that require users to log in.
Read more on this official webpage.
Install with pip tool and use this source code:
import pyotp

# Generare secret pentru utilizator
secret = pyotp.random_base32()

# Generare URL pentru codul QR
uri = pyotp.totp.TOTP(secret).provisioning_uri(name="UtilizatorExemplu", issuer_name="NumeServer")

# Exemplu de folosire a URI-ului într-o aplicație web sau pentru a genera un cod QR
print("Scanati urmatorul QR code in aplicatia Microsoft Authenticator:")
print(uri)
I run the python script:
python test_001.py
Scanati urmatorul QR code in aplicatia Microsoft Authenticator:
otpauth://totp/NumeServer:UtilizatorExemplu?secret=SPZICPQHAMWOIYCAZEHXZTPQDXEXZSWL&issuer=NumeServer
I used the uri output with one online tool to generate this QR image code and I tested with the aplication.
The account is added with NumeServer and UtilizatorExemplu.

Thursday, November 16, 2023

Python processing LiDAR data with Ouster SDK.

Lidar sensors for high-resolution, long range use in autonomous vehicles, robotics, mapping. Low-cost & reliable for any use case. Shipping today. See more on the official website.
You can download sample LiDAR data and test and use the Ouster Python SDK from the Ouster website.
The documentation for this python package can be found on this website.
See a simple demo on this youtube video named: 0 to SLAM in 60 Seconds.

Monday, November 13, 2023

PyScript - online tool .

PyScript is a platform for Python in the browser.
PyScript brings together two of the most vibrant technical ecosystems on the planet. If the web and Python had a baby, you'd get PyScript.
PyScript works because modern browsers support WebAssembly (abbreviated to WASM) - an instruction set for a virtual machine with an open specification and near native performance. PyScript takes versions of the Python interpreter compiled to WASM, and makes them easy to use inside the browser.
You can read more on the official webpage.
You can see my project tested with source code from a basic GitHub example.

Sunday, November 12, 2023

Python 3.13.0a1 : Testing basic instalation.

Today I tested a prerelease version of Python which is version python-3.13.0a1-amd64, the maintenance status is prerelease, the first release was 2024-10-01, the end of support is 2029-10, and the release schedule is PEP 719.
I got this version of python from the official python page.
The checksum for the downloaded file is from the same page and I checked with the WinMD5Free tool.
WinMD5Free is a tiny and fast utility to compute MD5 hash value for files. It works with Microsoft Windows 98, 2000, XP, Vista, and Windows 7/8/10/11.
The installation is simple, theoretically you don't have to make changes, you can only select a custom folder.
Open a command line and type the python command to see the installed version.
python
Python 3.13.0a1 (tags/v3.13.0a1:ad056f0, Oct 13 2023, 09:51:17) [MSC v.1935 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
In the command line opened by python with >>>, I tested the old specific commands:
>>> help()

Welcome to Python 3.13's help utility!

If this is your first time using Python, you should definitely check out
the tutorial on the internet at https://docs.python.org/3.13/tutorial/.

Enter the name of any module, keyword, or topic to get help on writing
Python programs and using Python modules.  To quit this help utility and
return to the interpreter, just type "quit".

To get a list of available modules, keywords, symbols, or topics, type
"modules", "keywords", "symbols", or "topics".  Each module also comes
with a one-line summary of what it does; to list the modules whose name
or summary contain a given string such as "spam", type "modules spam".

help> modules

Please wait a moment while I gather a list of all available modules...

test_sqlite3: testing with SQLite version 3.43.1
__future__          _testcapi           fractions           runpy
__hello__           _testclinic         ftplib              sched
__phello__          _testclinic_limited functools           secrets
_abc                _testconsole        gc                  select
_aix_support        _testimportmultiple genericpath         selectors
_ast                _testinternalcapi   getopt              shelve
_asyncio            _testmultiphase     getpass             shlex
_bisect             _testsinglephase    gettext             shutil
_blake2             _thread             glob                signal
_bz2                _threading_local    graphlib            site
_codecs             _tkinter            gzip                smtplib
_codecs_cn          _tokenize           hashlib             socket
_codecs_hk          _tracemalloc        heapq               socketserver
_codecs_iso2022     _typing             hmac                sqlite3
_codecs_jp          _uuid               html                sre_compile
_codecs_kr          _warnings           http                sre_constants
_codecs_tw          _weakref            idlelib             sre_parse
_collections        _weakrefset         imaplib             ssl
_collections_abc    _winapi             importlib           stat
_compat_pickle      _wmi                inspect             statistics
_compression        _xxinterpchannels   io                  string
_contextvars        _xxsubinterpreters  ipaddress           stringprep
_csv                _zoneinfo           itertools           struct
_ctypes             abc                 json                subprocess
_ctypes_test        antigravity         keyword             symtable
_datetime           argparse            linecache           sys
_decimal            array               locale              sysconfig
_elementtree        ast                 logging             tabnanny
_functools          asyncio             lzma                tarfile
_hashlib            atexit              mailbox             tempfile
_heapq              base64              marshal             test
_imp                bdb                 math                textwrap
_io                 binascii            mimetypes           this
_json               bisect              mmap                threading
_locale             builtins            modulefinder        time
_lsprof             bz2                 msvcrt              timeit
_lzma               cProfile            multiprocessing     tkinter
_markupbase         calendar            netrc               token
_md5                cmath               nt                  tokenize
_multibytecodec     cmd                 ntpath              tomllib
_multiprocessing    code                nturl2path          trace
_opcode             codecs              numbers             traceback
_opcode_metadata    codeop              opcode              tracemalloc
_operator           collections         operator            tty
_osx_support        colorsys            optparse            turtle
_overlapped         compileall          os                  turtledemo
_pickle             concurrent          pathlib             types
_py_abc             configparser        pdb                 typing
_pydatetime         contextlib          pickle              unicodedata
_pydecimal          contextvars         pickletools         unittest
_pyio               copy                pip                 urllib
_pylong             copyreg             pkgutil             uuid
_queue              csv                 platform            venv
_random             ctypes              plistlib            warnings
_sha1               curses              poplib              wave
_sha2               dataclasses         posixpath           weakref
_sha3               datetime            pprint              webbrowser
_signal             dbm                 profile             winreg
_sitebuiltins       decimal             pstats              winsound
_socket             difflib             pty                 wsgiref
_sqlite3            dis                 py_compile          xml
_sre                doctest             pyclbr              xmlrpc
_ssl                email               pydoc               xxsubtype
_stat               encodings           pydoc_data          zipapp
_statistics         ensurepip           pyexpat             zipfile
_string             enum                queue               zipimport
_strptime           errno               quopri              zlib
_struct             faulthandler        random              zoneinfo
_symtable           filecmp             re
_sysconfig          fileinput           reprlib
_testbuffer         fnmatch             rlcompleter

Enter any module name to get more help.  Or, type "modules spam" to search
for modules whose name or summary contain the string "spam".
help> ^Z
>>>
I tried to use quit and exit to return to the interactive Python shell but these not work. I need to use Ctr +Z.
Just for testing, I installed some Python modules, my recommendation is to use a virtualenv for each project.
For update I used:
python.exe -m pip install --upgrade pip

Saturday, November 4, 2023

News : NINJA-IDE version 2.4

The NINJA-IDE is a cross-platform integrated development environment (IDE). NINJA-IDE runs on Linux/X11, Mac OS X and Windows desktop operating systems, and allows developers to create applications for several purposes using all the tools and utilities of NINJA-IDE, making the task of writing software easier and more enjoyable.
You can download it from the offical website.
I did not find any significant changes compared to the previous version.

Thursday, October 26, 2023

News : Django 5.0 beta 1 released.

Django 5.0 beta 1 is now available. It represents the second stage in the 5.0 release cycle and is an opportunity for you to try out the changes coming in Django 5.0.
Django 5.0 brings a deluge of exciting new features which you can read about in the in-development 5.0 release notes.
This can be easily install with the pip3 tool:
pip3 install Django==5.0b1
Collecting Django==5.0b1
...
Installing collected packages: tzdata, sqlparse, asgiref, Django
Successfully installed Django-5.0b1 asgiref-3.7.2 sqlparse-0.4.4 tzdata-2023.3

Friday, October 13, 2023

Python tool oletools.

The recommended Python version to run oletools is the latest Python 3.x (3.9 for now). Python 2.7 is still supported for the moment, even if it reached end of life in 2020 (for projects still using Python 2/PyPy 2 such as ViperMonkey). It is highly recommended to switch to Python 3 if possible.
You can find it on this GitHub project.
See the all tools : mraptor, msodde, olebrowse, oledir, oleid, olemap, olemeta, oleobj, oletimes, olevba, pyxswf, rtfobj.

Tuesday, September 19, 2023

News : Django 5.0 alpha 1 released.

Django 5.0 alpha 1 is now available. It represents the first stage in the 5.0 release cycle and is an opportunity for you to try out the changes coming in Django 5.0.
Django 5.0 brings a deluge of exciting new features which you can read about in the in-development 5.0 release notes.
Now Django 5.0 supports Python 3.10, 3.11, and 3.12.
At that time, you should be able to run your package’s tests using python -Wd so that deprecation warnings appear.
Django 5.0 introduces the concept of a field group, and field group templates.
Database-computed default values
Database generated model field
More options for declaring field choices
New decorators now support wrapping asynchronous
... a lot of features deprecated in 5.0
You can read more on the official website.

Monday, September 18, 2023

News : Amazon free python audible audiobook.

Although Python programming language comes with many learning resources, you can find a lot of free audiobooks on Amazon.
You can try a free trial then you need to pay $14.95 a month after 30 days - cancel online anytime.

Saturday, September 9, 2023

News : Python 3.12.0 release candidate 2 now available.

This new release comes with many improvements for developers.
Here are some of them.
Modules from the standard library are now potentially suggested as part of the error messages displayed by the interpreter ...
NameError: name 'sys' is not defined. Did you forget to import 'sys'?
  • Many large and small performance improvements like - PEP 709;
  • Support for the Linux perf profiler to report Python function names in traces;
  • New type annotation syntax for generic classes - PEP 695;
  • More flexible f-string parsing, allowing many things previously disallowed - PEP 701;
  • Support for the buffer protocol in Python code - PEP 688;
  • A new debugging/profiling API - PEP 669;
  • Support for isolated sub interpreters with separate Global Interpreter Locks - PEP 684;
All PEPs can be found on this GitHub project.

Friday, August 18, 2023

News : Textual - Rapid Application Development.

Textual is a Rapid Application Development framework for Python.
Build sophisticated user interfaces with a simple Python API. Run your apps in the terminal and (coming soon) a web browser!

Saturday, August 12, 2023

News : Colab behavior through runtime .

I would like Google to emphasize more on the development side some elements that work like robots by interfacing with the development side.
Today I worked a little on artificial intelligence and I realized that it doesn't create textgenrnn_weights.hdf5 file for training created with the Python textgenrnn mode.
A solution is to reset the runtime with Ctrl+M and resume running.
They specify RESTART RUNTIME when using Python modules, see:
WARNING: The following packages were previously imported in this runtime:
   [numpy]
You must restart the runtime in order to use newly installed versions.
In this case, with the creation of textgenrnn_weights.hdf5 file, it is more difficult to understand and cannot be seen easily.

Monday, July 10, 2023

News : About my work and one of my websites.

I would like to bring to the attention of those who follow my activity on my websites and appreciate the inability to continue with one of the websites: free-tutorials.org. It is currently hosted on a free host, but I cannot import it 100%, which has led me not to complete it with new posts. The continuation of the activities there, considering the limited time, will be carried out on my blogs with the defined theme with which I started: Linux - Fedora, Graphics, Python, Pygame.
In the meantime, because the host is expensive and until now someone has helped me to host it on his server, it is possible to sell the domain: free-tutorials.org - I receive purchase offers at my personal Yahoo email address catafest@yahoo.com.
Minimum starting price 250 euros, because the domain is old from 2018.

Wednesday, June 14, 2023

News : OSINT - Open Source Intelligence python course.

For those who want to learn Python in order to: 
  • become a really good developer; 
  • to take the exam to get into university; 
  • to be interviewed for a job.
This course omits VERY many important things and sometimes even recommends what could have been called bad practice. There are things that don't matter when writing small automations for everyday OSINT tasks, but are extremely important when creating serious team projects.
You cam see the project on this GhitHub account.

Sunday, June 11, 2023

News : JupyterLab 4.0 released.

The Jupyter contributor community is proud to announce JupyterLab 4.0, the next major release of our full-featured development environment. The package is now available on PyPI and conda-forge. You can upgrade by running pip install --upgrade jupyterlab or conda install -c conda-forge jupyterlab.
You can read more on the official website.

Wednesday, May 24, 2023

Python 3.11.0 : Exo - domain-specific programming language in python.

Exo is a domain-specific programming language that helps low-level performance engineers transform very simple programs that specify what they want to compute into very complex programs that do the same thing as the specification, only much, much faster.
You can find it on GitHub project and on the official webpage.
Let's install it with pip tool:
C:\PythonProjects>mkdir exo-lang_001

C:\PythonProjects>cd exo-lang_001

C:\PythonProjects\exo-lang_001>pip install exo-lang --user
Collecting exo-lang
  Downloading exo_lang-0.0.2-py3-none-any.whl (142 kB)
  ...
Successfully installed PySMT-0.9.5 asdl-0.1.5 asdl-adt-0.1.0 astor-0.8.1 exo-lang-0.0.2 tomli-2.0.1 
yapf-0.33.0 z3-solver-4.12.2.0
Let's test with this default example but using virtual environments
This allow me to install Python packages in an isolated location from the rest of your system instead of installing them system-wide.
C:\PythonProjects\exo-lang_001>pip install virtualenv --user
...
C:\PythonProjects\exo-lang_001>python -m venv venv
C:\PythonProjects\exo-lang_001>venv\Scripts\activate.bat

(venv) C:\PythonProjects\exo-lang_001>python -m pip install -U setuptools wheel
Successfully installed setuptools-67.8.0 wheel-0.40.0

[notice] A new release of pip available: 22.3 -> 23.1.2
[notice] To update, run: python.exe -m pip install --upgrade pip
(venv) C:\PythonProjects\exo-lang_001>python.exe -m pip install --upgrade pip
Requirement already satisfied: pip in c:\pythonprojects\exo-lang_001\venv\lib\site-packages (22.3)
Collecting pip
  Using cached pip-23.1.2-py3-none-any.whl (2.1 MB)
...
Successfully installed pip-23.1.2
(venv) C:\PythonProjects\exo-lang_001>python -m pip install exo-lang
...
Installing collected packages: z3-solver, PySMT, asdl, tomli, numpy, attrs, astor, yapf, asdl-adt, exo-lang
Successfully installed PySMT-0.9.5 asdl-0.1.5 asdl-adt-0.1.0 astor-0.8.1 attrs-23.1.0 exo-lang-0.0.2 numpy-1.24.3
tomli-2.0.1 yapf-0.33.0 z3-solver-4.12.2.0
Let's try a simple example from official webpage:
(venv) C:\PythonProjects\exo-lang_001>notepad example.py
# example.py
from __future__ import annotations
from exo import *

@proc
def example_sgemm(
    M: size,
    N: size,
    K: size,
    C: f32[M, N] @ DRAM,
    A: f32[M, K] @ DRAM,
    B: f32[K, N] @ DRAM,
):
    for i in seq(0, M):
        for j in seq(0, N):
            for k in seq(0, K):
                C[i, j] += A[i, k] * B[k, j]
Use this command and check the out folder:
(venv) C:\PythonProjects\exo-lang_001>cd out
(venv) C:\PythonProjects\exo-lang_001\out>dir 
...
 example.c   example.h
If you want to know more see this video from youtube:

Tuesday, February 14, 2023

News : Colab changes ...

Python 2 is no longer supported in Colab and cells runs iron python.
All information you need on migrating your code from Python 2 to Python 3 can be found on Porting Python 2 Code to Python 3.
You can see these changes on the GitHub project.

Monday, January 2, 2023

News : PyTorch machine learning framework compromised with malicious dependency.

If you installed PyTorch-nightly on Linux via pip between December 25, 2022 and December 30, 2022, please uninstall it and torchtriton immediately, and use the latest nightly binaries (newer than Dec 30th 2022).
Read more on the official website.