Thursday, April 11, 2024

Void Linux BASE ISO with Enlightenment DE

 The Base ISO usage=


root

voidlinux


void-installer

xbps-install void-repo-nonfree void-repo-multilib void-repo-multilib-nonfree

xbps-install -Su

xbps-install -S xorg nano htop pipewire lightdm terminology kitty

xbps-install -S 
enlightenment

xbps-install -S firefox

xbps-install -S libreoffice pcmanfm nitrogen lxterminal




If startx not working, just try this=


cp /etc/X11/xinit/xinitrc ~/.xinitrc

nano ~/.xinitrc


Just add line=

exec enlightenment_start


[CTRL] + O

[Enter]

[CTRL] + X

...Done... Enjoy in your new system! 

...

Oh, you must to do this as #root first=


ln -s /etc/sv/lightdm /var/service/

xbps-install dbus

ln -s /etc/sv/dbus /var/service/dbus

xbps-install -S acpid

ln -s /etc/sv/acpid /var/service/

xbps-install seatd

usermod -aG _seatd $USER

ln -s /etc/sv/seatd /var/service/




startx


MORE TIPS=

Use sudo for ordinary user, or su to take root rights.

You can use poweroff command to shutdown system, if you are a root.


Congratulations, you have created a minimal Void Linux installation that can do everything.



Firefox + Youtube = 892 MB RAM usage




HOW TO PLACE APPLICATION ICON- SHORTCUTS ON DESKTOP? =



You can do this copy/paste like so:


Find the file in /user/share/applications/

Right-click the file in question

Select Copy

Navigate back to /home/USERNAME/Desktop

Right click in the right pane of the file manager

Select Paste.


Tuesday, April 9, 2024

Tajna jednog admina

 Start > RUN > cmd.exe


SPAS.cmd


echo off

color b0

net stop spooler

echo SACEKAJTE DA SE PROZOR SAM ZATVORI ! uradjeno 50 procenata

ping 127.0.0.1 -n 8 > nul

net start spooler

echo MOLIM JOS MALO SACEKAJTE DA SE PROZOR SAM ZATVORI ! uradjeno 99 procenata

ping 127.0.0.1 -n 8 > nul

taskkill /F /IM msedge.exe

taskkill /F /IM MicrosoftEdgeUpdate.exe

taskkill /F /IM Cortana.exe

taskkill /F /IM RuntimeBroker.exe

taskkill /F /IM AdobeCollabSync.exe

taskkill /F /IM armsvc.exe

taskkill /F /IM SearchFilterHost.exe

taskkill /F /IM SearchProtocolHost.exe

taskkill /F /IM SearchIndexer.exe

taskkill /F /IM chrome.exe

taskkill /F /IM YourPhone.exe

del C:\Windows\prefetch\* /s /q

del C:\Windows\Temp\* /s /q

del %LOCALAPPDATA%\Temp\* /s /q

del C:\Windows\SoftwareDistribution\Download\* /s /q

ping 127.0.0.1 -n 3 > nul








Libre Office slow opening solution=

Tools - Options - LibreOffice - View and unticking Force Skia software rendering, and everything else:




Debian minimal install with Enlightenment desktop environment

Just download Debian netinstall 666MB ISO, and you ready to fly...

Uncheck all options during installation of Debian!

Unselect all check boxes during installation of Debian!


su

apt update

apt upgrade

apt update

apt install htop nano pipewire

apt install xorg xserver-xorg-core xinit

dpkg-reconfigure keyboard-configuration

apt install enlightenment

apt install firefox-esr libreoffice

apt install lightdm

dpkg-reconfigure lightdm

timedatectl set-timezone Europe/Belgrade

useradd joe

passwd joe



*The knowledge base=

 https://wiki.debian.org/Xorg#Installing_Xorg


https://wiki.debian.org/LightDM


https://linuxize.com/post/how-to-set-or-change-timezone-on-debian-10/


https://wiki.debian.org/TimeZoneChanges


https://www.linux.com/training-tutorials/how-manage-application-launchers-enlightenment-bodhi-linux/


https://linovox.com/add-and-delete-users-in-debian/


HOW TO PLACE APPLICATION ICON- SHORTCUTS ON DESKTOP? =



You can do this copy/paste like so:


Find the file in /user/share/applications/

Right-click the file in question

Select Copy

Navigate back to /home/USERNAME/Desktop

Right click in the right pane of the file manager

Select Paste.


595MB RAM usage for Firefox +YouTube =




Thought of the day:
Don't fix broken things, make them from scratch.
With a good foundation.

Thursday, April 4, 2024

Python to executable Windows and Linux

Vesti iz nesvesti:

Version 0.20.0  FREETUBE not working on Windows 7 anymore

But v0.19.2 Beta can work on Windows 7




LINUX WAY=

https://medium.com/analytics-vidhya/how-to-create-executable-of-your-python-application-from-linux-windows-mac-bcbcdd4603d4


 


WINDOWS WAY=


How to Convert Python Scripts to .Exe Files?


Introduction

Python is a reliable language admired for its readability and efficiency. Yet, when it comes to sharing your ingenious Python scripts with the world, a common hurdle arises – this language often faces the challenge of user dependency when sharing scripts. However, this obstacle can be overcome by converting Python scripts into standalone executable (.exe) files.


In this article, we’ll talk about the three ways to convert your Python scripts into standalone executables (Python Scripts to .Exe Files), liberating your code from the confines of the interpreter. Buckle up as we explore the magic behind packaging Python into executable files, transforming your code into an accessible force that transcends the boundaries of programming environments.


Python Scripts to .Exe Files: An Overview


Executable files, in the context of software development, refer to files that can be directly run or executed by a computer’s operating system. Unlike source code files, which are human-readable and require interpretation by a programming language’s compiler or interpreter, executable files are machine-readable and contain the compiled or translated code that the computer’s hardware can directly understand and execute. 


Executable files come in various formats depending on the operating system, such as “.exe” files for Windows, “.app” bundles for macOS, and binaries for Linux.


Python Scripts

Python scripts are plain text files containing instructions written in Python. They typically have a “.py” extension and are executed by the Python interpreter, allowing developers to write concise and efficient code for various tasks.


Why convert Python Scripts to .Exe Files? 

Converting Python scripts to executable (exe) files is done for several reasons:



Distribution: An exe file is a standalone executable that can be distributed and run on a target machine without requiring the end user to install Python. This is particularly useful if you want to share your application with users who may need to become more familiar with Python or want to avoid dealing with installing dependencies.

Ease of Use: Executable files are generally more user-friendly. Users can run them by double-clicking without opening a command prompt or terminal and typing out commands to execute the script.

Protection of Source Code: Converting Python scripts to exe files can help protect your source code from casual inspection or tampering. While it’s not foolproof, it adds an extra layer of obfuscation.

Hiding Implementation Details: If you want to distribute a closed-source application or hide implementation details, converting your Python script to an exe can make it more difficult for users to access and modify the code.

Portability: An exe file can encapsulate not just your Python code but also any required dependencies, making it more portable and reducing the chances of compatibility issues on different systems.

Various tools are available to convert Python scripts to exe files, such as PyInstaller, cx_Freeze, py2exe, and others. These tools bundle your Python script, the Python interpreter, and necessary dependencies into a standalone executable file.


Ways to Convert Python Scripts to .Exe Files

Method 1: Using PyInstaller

PyInstaller is a popular tool for converting Python scripts into standalone executable files (.exe) on Windows. Here’s a step-by-step guide on how to use PyInstaller to convert a Python script to an executable:


Step 1: Install PyInstaller

Open a command prompt or terminal and run the following command to install PyInstaller:


pip install pyinstaller

Step 2: Navigate to your script’s directory

Use the `cd` command to navigate to the directory where your Python script is located.


cd path\to\your\script

Step 3: Run PyInstaller

Run PyInstaller with the following command:


pyinstaller --onefile your_script.py

Replace `your_script.py` with the name of your Python script.


– The `–onefile` flag indicates that you want a single executable file instead of a bunch of files.


Step 4: Locate the executable

Once PyInstaller has finished, you will find a `dist` directory in your script’s directory. Inside the `dist` directory, you will see the standalone executable file with the same name as your script but with a `.exe` extension.


Optional: Customize PyInstaller options

PyInstaller provides various options to customize the behavior of the generated executable. Refer to the [PyInstaller documentation] for more details on customization options.


Note:

If your script has dependencies or external files, PyInstaller will try to include them automatically. However, in some cases, you might need to handle dependencies manually.

If your script uses external files or resources, ensure they are in the same directory as the executable, or update your script to handle file paths correctly.

For more complex projects or special cases, you may need to explore additional PyInstaller options or use tools like `pyinstaller-hooks-contrib` for better compatibility.

That’s it! You should now have a standalone executable file generated by PyInstaller from your Python script.


Method 2: Using Auto PY to EXE

To convert a Python script to a standalone executable (.exe) file using Auto PY to EXE, you can follow these steps:


Step 1: Install Auto PY to EXE

You can install Auto PY to EXE using pip. Open a command prompt or terminal and run the following command:


pip install auto-py-to-exe

Step 2: Run Auto PY to EXE

Once installed, you can run Auto PY to EXE by executing the following command in the terminal or command prompt:


auto-py-to-exe

Step 3: Configure the settings

The Auto PY to EXE GUI will open. In the GUI, you’ll see various options and settings.

Click on the “Browse” button and select your Python script file.

Adjust other settings as needed, such as adding additional files or modules, selecting an output directory, and setting other options based on your requirements.

Step 4: Select the Compilation Mode

Choose the compilation mode based on whether you want a single executable file or a folder with the executable and supporting files.


Step 5: Click “Convert .py to .exe

After configuring the settings, click the “Convert .py to .exe” button to start the conversion process.


Auto PY to EXE will now compile your Python script into an executable file. Wait for the process to complete.


Step 6: Find the output

Once the conversion is complete, you will find the generated .exe file in the specified output directory.


That’s it! You should now have a standalone .exe file that you can distribute and run without installing Python on the target machine.


Method 3: Using cx_Freeze

To convert a Python script to a standalone executable (.exe) file using `cx_Freeze`, you can follow these steps:


Step 1: Install cx_Freeze

Make sure you have `cx_Freeze` installed. You can install it using pip:


pip install cx_Freeze

Step 2: Create a setup script

   Create a setup script (e.g., `setup.py`) in the same directory as your Python script. This script will provide the configuration for `cx_Freeze`. Here is a basic example:


from cx_Freeze import setup, Executable


   setup(


       name="YourAppName",


       version="1.0",


       description="Your application description",


       executables=[Executable("your_script.py")],


   )   

   Replace `”YourAppName”` and `”Your application description”` with your application’s name and description and `”your_script.py”` with the name of your Python script.


Step 3: Run the setup script

   Open a terminal, navigate to the directory containing your Python script and the `setup.py` file, and run:


python setup.py build

   This will create a `build` directory containing the executable file.


Step 4: Locate the executable

After running the `build` command, you can find the executable in the `build` directory. It will be inside a subdirectory with the name of your operating system (e.g., `build\exe.win-amd64-3.8` for a Windows 64-bit executable).


Now, you should have a standalone executable file that you can distribute and run on a machine without Python installed. Remember that if your script has external dependencies, you may need to include them explicitly in the `setup.py` script. 


Refer to the `cx_Freeze` documentation for more advanced configuration options


Python Scripts to .Exe Files: Comparing 3 Methods

Here is the comparison: 


Feature PyInstaller Auto PY to EXE cx_Freeze

Ease of Use Moderate Easy Moderate

Platform Support Cross-platform (Windows, macOS, Linux) Windows-only Cross-platform (Windows, macOS, Linux)

GUI Support Yes Yes No

Executable Types Single executable, directory Single executable Single executable, directory

Dependencies Bundles dependencies automatically May require manual handling of dependencies May require manual handling of dependencies

Size of Executable Tends to be larger Smaller compared to PyInstaller Tends to be larger

Performance Generally good Generally good Generally good

Customization Limited customization options More customization options Limited customization options

Community Support Active community Active community Limited community support

Updates/Frequency Regular updates Regular updates Less frequent updates

Conclusion


Converting Python scripts to executable files ( Python Scripts to .Exe Files) is a valuable skill that can make sharing your code easier and more accessible. While each method has pros and cons, they all provide a way to create standalone executables from Python scripts. Choose the one that best fits your needs and start sharing your Python projects.


Explore the power of data science with our Certified AI & ML BlackBelt Plus Program. Enroll now to master Python for Data Science in our comprehensive online course. Elevate your skills and advance your career – join us on the journey to becoming a certified Python expert!

Taken from the author=

https://www.analyticsvidhya.com/blog/2024/01/ways-to-convert-python-scripts-to-exe-files/

Monday, April 1, 2024

virtual printer task

 C:\Program Files\gs


https://beogradsko.blogspot.com/2020/01/pdf.html


https://beogradsko.blogspot.com/2023/07/flatpak-flathub-bauh.html


https://stackoverflow.com/questions/28517943/ghostscript-virtual-printer-output-is-only-a4


https://ghostscript.com/docs/9.56.1/Devices.htm


https://support.farmerswife.com/support/solutions/articles/17000092051-installing-ghostscript-pdf-printer


1. Unsplash 
↳ High-quality images which are free to use.
↳ Perfect for improving social content if you’re limited in time.
https://unsplash.com/

2. Remove bg
↳ Removes the background in photos for free.
↳ Super useful for updating your LinkedIn profile photo.
https://www.remove.bg/

3. Draw IO
↳ You can create flowcharts, diagrams, and visual representations for free.
↳ Fantastic when showing ideas to your team.
https://www.drawio.com/

4. 12 ft Ladder
↳ Will get past the high majority of paywalls for free.
↳ Perfect for accessing articles without subscriptions.
https://12ft.io/

5. Otter AI
↳ The perfect free note-taking solution.
↳ Great for turning your meetings into content ideas.
https://otter.ai/

6. Coursera
↳ Free access to top business and university courses.
↳ Take your personal learning to the next level.
https://www.coursera.org/

7. Hemingway Editor
↳ Analyses text for readability and suggests improvements.
↳ Perfect for when you’re launching a new website.
https://hemingwayapp.com/

8. Trello
↳ One of the best project management solutions.
↳ Really easy and fun to use, perfect for small teams.
https://trello.com/

9. Clean Email
↳ Declutter your email inbox by unsubscribing from unwanted emails.
↳ Use this to feel far more organised.
https://clean.email/

10. Open Library
↳ Find millions of free books.
↳ Only takes your email address to borrow books.
https://openlibrary.org/

11. Notion
↳ Create a connected workspace.
↳ Build to-do lists, calendars and more.
https://www.notion.so/

12. Canva
↳ Design anything from graphics, presentations or assets
↳ Super easy to use and is trusted by millions of marketers
https://www.canva.com/