Skip to content

Instantly share code, notes, and snippets.

View Armen-Jean-Andreasian's full-sized avatar
👨‍💻
Inventing something special

Armen-Jean Andreasian Armen-Jean-Andreasian

👨‍💻
Inventing something special
  • Hanoi, Vietnam
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Particle.js Example</title>
<style>
body {
margin: 0;
padding: 0;
overflow: hidden;
# x**2 + 5x + 4 = 0
a = 1
b = 5
c = 4
D = b**2 - 4*a*c
if D > 0:
x_1 = ((-1 * b) + D**(1/2)) / 2 * a
Fonte: https://www.maccanismi.it/2012/08/21/elenco-url-streaming-radio-italiane-sul-web-rtl-rds-radio-kiss-kiss-r101-virgin-radio-e-moltre-altre/
Da usare per lettori come VLC e similari.
RTL:
http://shoutcast.rtl.it:3010/
RTL Best:
http://shoutcast.rtl.it:3020/
RTL ItalianStyle:
@Armen-Jean-Andreasian
Armen-Jean-Andreasian / readme.txt
Created February 13, 2024 15:10
Installing Kali Linux on Windows
1. Open the cmd. Press Win+R. Then type cmd and press enter.
2. In cmd, type the command:
wsl --install --distribution kali-linux
P.S. To find the app press Win key and type Kali Linux

Metaclasses

The metaclasses are responsible for the instantiation process.

  • By default, the metaclass of any Python class is type. same as class MyClass(metaclass=type)

Whenever, you do my_class = MyClass():

  1. MyClass.__call__() method is being called. This happens because in Python, calling an instance as a function, calls the __call__() method of the class.
  2. Inside the MyClass.__call__() method of the class:
    1. The MyClass.__new__() method is being called to create a new instance.
    2. MyClass.__new__() is a stub method calling the parent's .__new__(), in this case type.__new__()).
@Armen-Jean-Andreasian
Armen-Jean-Andreasian / main.py
Created April 23, 2024 08:14
Library Problem [Non-ordinary Solution]
class Book:
def __init__(self, title, genre):
self.title = title
self.genre = genre
class LibraryShelves(dict):
def add_shelf(self, new_genre: str):
"""Adds a new shelf to library"""
if new_genre not in self:
from typing import Callable
class B:
def b(self):
...
@property
def bb(self) -> Callable:
return self.b
git config --global gpg.program "C:\Program Files\Git\usr\bin\gpg.exe"

All

21    : FTP (File Transfer Protocol)
22    : SSH (Secure Shell)
23    : Telnet (Protocol)
25    : SMTP (Simple Mail Transfer Protocol)
53    : DNS (Domain Name System)
80    : HTTP (Hypertext Transfer Protocol)
110   : POP3 (Post Office Protocol)
{
"name": "main",
"protection": {
"enabled": true,
"required_status_checks": null,
"enforce_admins": true,
"required_pull_request_reviews": {
"dismiss_stale_reviews": true,
"require_code_owner_reviews": true,
"required_approving_review_count": 1