es
Feedback

¡No caigas en manos de tramposos! Telemetrio encuentra y marca estos canales 👉 Si quieres ver la etiqueta, suscríbete

[ Сураба 🦀]

[ Сураба 🦀]

Ir al canal en Telegram

For any Query Kindly Contact 🚀 [ @OxSourabh ]

Mostrar más
231
Suscriptores
Sin datos24 horas
+27 días
+1130 días

Cargando datos

Canales Similares
Sin datos
¿Algún problema? Por favor, actualice la página o contacte a nuestro gerente de soporte.
Menciones Entrantes y Salientes
---
---
---
---
---
---
Atraer Suscriptores
oct '26
octubre '260
en 0 canales
septiembre '260
en 0 canales
Get PRO
agosto '260
en 0 canales
Get PRO
julio '260
en 0 canales
Get PRO
junio '260
en 0 canales
Get PRO
mayo '260
en 0 canales
Get PRO
abril '260
en 0 canales
Get PRO
marzo '260
en 0 canales
Get PRO
febrero '260
en 0 canales
Get PRO
enero '260
en 0 canales
Get PRO
diciembre '250
en 0 canales
Get PRO
noviembre '250
en 0 canales
Get PRO
octubre '250
en 0 canales
Get PRO
septiembre '250
en 0 canales
Get PRO
agosto '250
en 0 canales
Get PRO
julio '250
en 0 canales
Get PRO
junio '250
en 0 canales
Get PRO
mayo '250
en 0 canales
Get PRO
abril '250
en 0 canales
Get PRO
marzo '250
en 0 canales
Get PRO
febrero '25
+6
en 0 canales
Get PRO
enero '25
+13
en 0 canales
Get PRO
diciembre '24
+6
en 0 canales
Get PRO
noviembre '24
+6
en 0 canales
Get PRO
octubre '24
+5
en 0 canales
Get PRO
septiembre '24
+2
en 0 canales
Get PRO
agosto '24
+9
en 0 canales
Get PRO
julio '24
+61
en 0 canales
Get PRO
junio '240
en 0 canales
Get PRO
mayo '240
en 0 canales
Get PRO
abril '240
en 1 canales
Get PRO
marzo '24
+159
en 0 canales
Publicaciones del Canal
+1
Deep Learning - Model Optimization and Tuning.zip142.07 MB

2
+1
Linux_System_Engineer:_Web_Servers_and_DNS_Using_Apache,_NGINX,.zip
85
3
https://github.com/cpldcpu/MisguidedAttention
107
4
https://bbycroft.net/llm
101
5
⭐️ Learn Python 3 From Scratch: Python Basics And Fundamentals
120
6
CVE-2024-43468: ConfigMgr/SCCM 2403 Unauth SQLi to RCE PATCHED: Oct 8, 2024 Exploit: https://github.com/synacktiv/CVE-2024-43468 Blog: https://www.synacktiv.com/advisories/microsoft-configuration-manager-configmgr-2403-unauthenticated-sql-injections #git #exploit #ad #rce #sccm #pentest #redteam
1
7
🔔 Linux Kernel 6.12.9 is here with some impressive updates! 🚀 From Real-Time Support and QR Codes on panic screens, to new security modules, it's a game-changer! https://lwn.net/Articles/1004549/
125
8
Replicas and Consistency in Distributed Systems Replication is the process of creating copies of data between nodes in a distributed system to improve fault tolerance, scalability, and availability. System administrators often face the task of setting up and managing replicas, especially in scalable systems such as Cassandra, Kafka, or Redis. Replication Models 1. Synchronous Replication ⏺Data is confirmed only after being written to all nodes. ⏺Pros: Strong consistency. ⏺Cons: High latency, availability issues during failures. ⏺Example: Financial systems where data accuracy is important. 2. Asynchronous Replication ⏺Data is written to one node and then synchronized with the others. ⏺Pros: High availability, fast query processing. ⏺Cons: Temporary data inconsistencies are possible. ⏺Example: geographically distributed systems, CDN. Setting up replication in MongoDB 1️⃣ Create a replica set: rs.initiate( { _id: "myReplicaSet", members: [ { _id: 0, host: "node1:27017" }, { _id: 1, host: "node2:27017" }, { _id: 2, host: "node3:27017" } ] } ) 2️⃣ Check the replication status: rs.status() Setting up consistency in Kafka 1️⃣ Set the minimum number of replicas that must acknowledge a write: min.insync.replicas=2 2️⃣ Ensure consistency for writes: acks=all
108
9
p = gcd(x + 1, N) q = gcd(x - 1, N) if p * q != N: return ShorsResult( factors=(1, N), quantum_circuit=circuit, measurement_results=counts, period=period, success=False, error_message="Invalid factorization" ) return ShorsResult( factors=(p, q), quantum_circuit=circuit, measurement_results=counts, period=period, success=True ) # Example usage def main(): # Example factorization N = 15 shor = ImprovedShorsAlgorithm(shots=1000) try: result = shor.factor(N) if result.success: logger.info(f"Successfully factored {N} = {result.factors[0]} × {result.factors[1]}") logger.info(f"Found period: {result.period}") logger.info(f"Circuit depth: {result.quantum_circuit.depth()}") logger.info(f"Number of qubits: {result.quantum_circuit.num_qubits}") else: logger.error(f"Factorization failed: {result.error_message}") except Exception as e: logger.error(f"An error occurred: {str(e)}") if __name__ == "__main__": main()
87
10
""" Process measurement results to find the period Args: counts: Measurement results N: Number to factor Returns: Tuple[int, bool]: (period, success flag) """ max_result = max(counts, key=counts.get) measured_phase = int(max_result, 2) / (2 ** len(max_result)) # Use continued fractions to find r fraction = self._continued_fraction_expansion(measured_phase) candidates = self._find_closest_fractions(fraction, N) for denominator in candidates: if denominator % 2 == 0: return denominator, True return 0, False def _continued_fraction_expansion(self, x: float, depth: int = 10) -> List[int]: """ Compute continued fraction expansion Args: x: Input float depth: Maximum depth of expansion Returns: List[int]: Continued fraction coefficients """ fractions = [] for _ in range(depth): integer_part = int(x) fractions.append(integer_part) fractional_part = x - integer_part if abs(fractional_part) < 1e-10: break x = 1 / fractional_part return fractions def _find_closest_fractions(self, fractions: List[int], N: int) -> List[int]: """ Find closest fractions from continued fraction expansion Args: fractions: Continued fraction coefficients N: Number to factor Returns: List[int]: List of candidate denominators """ convergents = [(1, 0), (fractions[0], 1)] candidates = [] for i in range(1, len(fractions)): num = fractions[i] * convergents[-1][0] + convergents[-2][0] den = fractions[i] * convergents[-1][1] + convergents[-2][1] if den < N: convergents.append((num, den)) candidates.append(den) else: break return candidates def factor(self, N: int) -> ShorsResult: """ Main method to factor a number using Shor's algorithm Args: N: Number to factor Returns: ShorsResult: Result object containing factors and metadata """ try: self._validate_input(N) except ValueError as e: return ShorsResult( factors=(1, N), quantum_circuit=None, measurement_results={}, period=0, success=False, error_message=str(e) ) # Choose random number coprime to N a = 2 # Start with smallest value for simplicity while gcd(a, N) != 1: a += 1 # Create and execute quantum circuit circuit = self._quantum_phase_estimation(a, N) transpiled_circuit = transpile(circuit, self.simulator, optimization_level=self.optimize_level) job = self.simulator.run(transpiled_circuit, shots=self.shots) counts = job.result().get_counts() # Find period from measurements period, success = self._process_measurement(counts, N) if not success: return ShorsResult( factors=(1, N), quantum_circuit=circuit, measurement_results=counts, period=period, success=False, error_message="Failed to find valid period" ) # Classical post-processing x = pow(a, period // 2, N) if x == 1 or x == N - 1: return self.factor(N) # Try again
67
11
Implementation of Shor's Quantum Algorithm with Qiskit ⚙ import numpy as np from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister, transpile, Aer, assemble from qiskit.visualization import plot_histogram from qiskit.circuit.library import QFT from qiskit.providers.aer import AerSimulator from typing import Tuple, List, Optional import logging from math import gcd, ceil, log2 from dataclasses import dataclass # Configure logging logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) @dataclass class ShorsResult: """Data class to store Shor's algorithm results""" factors: Tuple[int, int] quantum_circuit: QuantumCircuit measurement_results: dict period: int success: bool error_message: Optional[str] = None class ImprovedShorsAlgorithm: def __init__(self, shots: int = 1000, optimize_level: int = 3): """ Initialize Shor's Algorithm with configurable parameters Args: shots: Number of shots for quantum measurement optimize_level: Optimization level for circuit transpilation """ self.shots = shots self.optimize_level = optimize_level self.simulator = AerSimulator() def _validate_input(self, N: int) -> bool: """ Validate the input number N Args: N: Number to be factored Returns: bool: True if input is valid """ if N < 3: raise ValueError("Number must be greater than 2") if N % 2 == 0: raise ValueError("Number must be odd") if ceil(log2(N)) != floor(log2(N)): return True return False def _create_controlled_unitary(self, a: int, N: int, n_count: int) -> QuantumCircuit: """ Create the controlled unitary operation for QPE Args: a: Random coprime number N: Number to factor n_count: Number of counting qubits Returns: QuantumCircuit: Controlled unitary circuit """ qr = QuantumRegister(n_count + ceil(log2(N)), 'q') circuit = QuantumCircuit(qr) # Implement modular exponentiation for i in range(n_count): power = pow(a, 2**i, N) for j in range(ceil(log2(N))): if (power >> j) & 1: circuit.cx(qr[i], qr[n_count + j]) return circuit def _quantum_phase_estimation(self, a: int, N: int) -> QuantumCircuit: """ Improved Quantum Phase Estimation implementation Args: a: Random coprime number N: Number to factor Returns: QuantumCircuit: Complete QPE circuit """ n_count = 2 * ceil(log2(N)) # Increased precision n_register = ceil(log2(N)) # Create registers qr_count = QuantumRegister(n_count, 'count') qr_register = QuantumRegister(n_register, 'register') cr = ClassicalRegister(n_count, 'c') circuit = QuantumCircuit(qr_count, qr_register, cr) # Initialize register circuit.x(qr_register[0]) # Initialize |1⟩ state # Apply Hadamard gates for i in range(n_count): circuit.h(qr_count[i]) # Apply controlled unitary operations controlled_unitary = self._create_controlled_unitary(a, N, n_count) circuit.compose(controlled_unitary, inplace=True) # Apply inverse QFT inverse_qft = QFT(n_count).inverse() circuit.compose(inverse_qft, qubits=range(n_count), inplace=True) # Measure counting qubits circuit.measure(qr_count, cr) return circuit def _process_measurement(self, counts: dict, N: int) -> Tuple[int, bool]:
51
12
Setting up VLAN using ip and bridge in Linux VLAN (Virtual Local Area Network) is a way to divide a single physical network into multiple logically isolated networks. It is useful for traffic management, improving security, and reducing broadcast load. Example task We have an eth0 interface connected to a switch that supports VLAN. We want to set up two VLANs: • VLAN 10: with IP address 192.168.10.1/24. • VLAN 20: with IP address 192.168.20.1/24. 1️⃣Installing the required packages In modern distributions, the ip and bridge utilities are already included in the iproute2 package. Check that it is installed: sudo apt install iproute2 # For Debian/Ubuntu sudo yum install iproute # For CentOS/RHEL 2️⃣ VLAN setup Create VLAN interfaces Using the ip link command, create virtual interfaces for VLAN 10 and VLAN 20: sudo ip link add link eth0 name eth0.10 type vlan id 10 sudo ip link add link eth0 name eth0.20 type vlan id 20 Assign IP addresses to the VLAN interfaces sudo ip addr add 192.168.10.1/24 dev eth0.10 sudo ip addr add 192.168.20.1/24 dev eth0.20 Enable the interfaces sudo ip link set eth0.10 up sudo ip link set eth0.20 up 3️⃣ Verify the configuration Check that the interfaces are created and enabled: ip -d link show You should see interfaces eth0.10 and eth0.20 linked to eth0. 4️⃣ (Optional) Configuring VLAN bridges If you want to connect multiple VLANs to a bridge (e.g. for virtualization): Create a bridge: sudo ip link add name br-vlan type bridge Add a VLAN to the bridge: sudo ip link set eth0.10 master br-vlan sudo ip link set eth0.20 master br-vlan Assign an IP address to the bridge: sudo ip addr add 192.168.30.1/24 dev br-vlan sudo ip link set br-vlan up 5️⃣ Delete a VLAN To delete a VLAN interface: sudo ip link delete eth0.10 sudo ip link delete eth0.20 Your server now supports two isolated VLANs. This is useful for separating traffic between services or users. And use configuration files (such as in /etc/netplan or /etc/sysconfig/network-scripts) to make settings persistent across reboots.
51
13
🔅 Tweaking Custom Environment Rewards - Reinforcement Learning with Stable Baselines 3 (P.4) Helping our reinforcement learn
🔅 Tweaking Custom Environment Rewards - Reinforcement Learning with Stable Baselines 3 (P.4) Helping our reinforcement learning algorithm to learn better by tweaking the environment rewards.
54
14
🔅 Custom Environments - Reinforcement Learning with Stable Baselines 3 (P.3) How to incorporate custom environments with sta
🔅 Custom Environments - Reinforcement Learning with Stable Baselines 3 (P.3) How to incorporate custom environments with stable baselines 3
58
15
🔅 Saving and Loading Models - Stable Baselines 3 Tutorial (P.2) How to save and load models in Stable Baselines 3
🔅 Saving and Loading Models - Stable Baselines 3 Tutorial (P.2) How to save and load models in Stable Baselines 3
57
16
🔅 Reinforcement Learning with Stable Baselines 3 - Introduction (P.1) Welcome to a tutorial series covering how to do reinfo
🔅 Reinforcement Learning with Stable Baselines 3 - Introduction (P.1) Welcome to a tutorial series covering how to do reinforcement learning with the Stable Baselines 3 (SB3) package. The objective of the SB3 library is to be for reinforcement learning like what sklearn is for general machine learning.
63
17
Ready to test your Python skills? Let’s get started! 💻 1. How to check if a string is a palindrome? def is_palindrome(s): return s == s[::-1] print(is_palindrome("madam")) # True print(is_palindrome("hello")) # False 2. How to find the factorial of a number using recursion? def factorial(n): if n == 0 or n == 1: return 1 return n * factorial(n - 1) print(factorial(5)) # 120 3. How to merge two dictionaries in Python? dict1 = {'a': 1, 'b': 2} dict2 = {'c': 3, 'd': 4} # Method 1 (Python 3.5+) merged_dict = {**dict1, **dict2} # Method 2 (Python 3.9+) merged_dict = dict1 | dict2 print(merged_dict) 4. How to find the intersection of two lists? list1 = [1, 2, 3, 4] list2 = [3, 4, 5, 6] intersection = list(set(list1) & set(list2)) print(intersection) # [3, 4] 5. How to generate a list of even numbers from 1 to 100? even_numbers = [i for i in range(1, 101) if i % 2 == 0] print(even_numbers) 6. How to find the longest word in a sentence? def longest_word(sentence): words = sentence.split() return max(words, key=len) print(longest_word("Python is a powerful language")) # "powerful" 7. How to count the frequency of elements in a list? from collections import Counter my_list = [1, 2, 2, 3, 3, 3, 4] frequency = Counter(my_list) print(frequency) # Counter({3: 3, 2: 2, 1: 1, 4: 1}) 8. How to remove duplicates from a list while maintaining the order? def remove_duplicates(lst): return list(dict.fromkeys(lst)) my_list = [1, 2, 2, 3, 4, 4, 5] print(remove_duplicates(my_list)) # [1, 2, 3, 4, 5] 9. How to reverse a linked list in Python? class Node: def __init__(self, data): self.data = data self.next = None def reverse_linked_list(head): prev = None current = head while current: next_node = current.next current.next = prev prev = current current = next_node return prev # Create linked list: 1 -> 2 -> 3 head = Node(1) head.next = Node(2) head.next.next = Node(3) # Reverse and print the list reversed_head = reverse_linked_list(head) while reversed_head: print(reversed_head.data, end=" -> ") reversed_head = reversed_head.next 10. How to implement a simple binary search algorithm? def binary_search(arr, target): low, high = 0, len(arr) - 1 while low <= high: mid = (low + high) // 2 if arr[mid] == target: return mid elif arr[mid] < target: low = mid + 1 else: high = mid - 1 return -1 print(binary_search([1, 2, 3, 4, 5, 6, 7], 4)) # 3
55
18
https://github.com/ManimCommunity/manim
50
19
code
48
20
The Excel Bootcamp Zero to Mastery - Part 16
50