revoke priv, grants

DECLARE
    v_owner VARCHAR2(30) := 'SCHEMA_OWNER';  -- Esquema propietario de los objetos
    v_grantee VARCHAR2(30) := 'SCHEMA_GRANTEE'; -- Usuario que tiene los permisos
BEGIN
    -- Revisar permisos de objeto
    FOR rec IN (
        SELECT 'REVOKE ' || privilege || ' ON ' || table_schema || '.' || table_name || ' FROM ' || grantee AS revoke_sql
        FROM all_tab_privs
        WHERE table_schema = v_owner
        AND grantee = v_grantee
    ) LOOP
        DBMS_OUTPUT.PUT_LINE(r

Environment Manager Powershell Module

function Get-EMConfiguration {
    $EMConfigurationPath = "${env:ProgramData}\AppSense\Environment Manager"
    $PendingFile = Get-Item -Path (Join-Path -Path $EMConfigurationPath -ChildPath 'configuration.aemp') -ErrorAction SilentlyContinue | Add-Member -MemberType ScriptProperty -Name SHA256 -Value { Get-FileHash -Path $this.FullName | Select-Object -ExpandProperty Hash } -PassThru
    $ActiveFile = Get-Item -Path (Join-Path -Path $EMConfigurationPath -ChildPath 'System_configuration.aemp'

2938. Separate Black and White Balls

There are n balls on a table, each ball has a color black or white. You are given a 0-indexed binary string s of length n, where 1 and 0 represent black and white balls, respectively. In each step, you can choose two adjacent balls and swap them. Return the minimum number of steps to group all the black balls to the right and all the white balls to the left.
/**
 * @param {string} s
 * @return {number}
 */
var minimumSteps = function(s) {
    let l = 0;    // Left pointer to keep track of the next position for '0'
    let res = 0;  // Total number of swaps needed

    for (let r = 0; r < s.length; r++) {
        if (s[r] === '0') {
            // We want to push the '0' values from right to left as much as possible.
            // Whenever we encounter '0' at R, calculate the number of steps needed
            // to swap with the current position of

Parsing a path file

import os
# given a path file
path = '/ruta/a/tu/carpeta/fichero.txt'

# parse filename
file_name = os.path.basename(path)
print(file_name)  # Output: 'fichero.txt'

# pase folder name
folder_name = os.path.dirname(path)
print(folder_name)  # Output: '/ruta/a/tu/carpeta'

Podfile to add camera and image permission on IOS

platform :ios, '15.6'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
  'Debug' => :debug,
  'Profile' => :release,
  'Release' => :release,
}

def flutter_root
  generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
  unless File.exist?(generated_xcode_build_settings_path)
    raise "#{generated_xcode_build_settings_path} must exist.

Automated documentation (pdoc, interrogate, etc)

# Automated Documentation

## interrogate (ESSENTIAL)

- https://interrogate.readthedocs.io/en/latest/index.html
- It will check and warn you if you have failed to write docstrings for your code.
- Sin informacion, solo muestra la metrica final:
`> interrogate {path}`
- Con informacion basica de cada script: 
`> interrogate -v {path}`
- Con informacion mas ampliada de cada script:
`> interrogate -vv {path}`


## pydocstyle (NO SO NECESSARY)

- https://pypi.org/project/pydocstyle/
- It is a stati

stash recover

git fsck --unreachable | grep commit | cut -d ' ' -f3 | xargs git log --merges --no-walk

git update-ref refs/stash 4b3fc45c94caadcc87d783064624585c194f4be8 -m "My recovered stash"


2530. Maximal Score After Applying K Operations

You are given a 0-indexed integer array nums and an integer k. You have a starting score of 0. In one operation: choose an index i such that 0 <= i < nums.length, increase your score by nums[i], and replace nums[i] with ceil(nums[i] / 3). Return the maximum possible score you can attain after applying exactly k operations. The ceiling function ceil(val) is the least integer greater than or equal to val.
/**
 * @param {number[]} nums
 * @param {number} k
 * @return {number}
 */
var maxKelements = function(nums, k) {
    // Initialize a max-heap using a min-heap with negative values
    const heap = new MaxPriorityQueue({ compare: (a, b) => b - a });

    // Add all elements into the heap
    for (let num of nums) {
        heap.enqueue(num);
    }

    let score = 0;

    // Perform k operations
    for (let i = 0; i < k; i++) {
        // Extract the maximum element from the heap
        let ma

Dave's AE3 User Queries

select b.created_at as calendar_day, 
au.id as user_id, au.first_name, au.last_name, augroup.name as org_name, b.league as finder_league, query_string, 
b.finder as finder_type, count(b.user_id) as num_queries
FROM accesselias.public.finders_search b
join accesselias.public.auth_user au on (au.id = b.user_id)
join accesselias.public.auth_user_groups aug on (au.id = aug.user_id)
join accesselias.public.auth_group augroup on (augroup.id = aug.group_id)
-- where augroup.id not in (1, 2, 3, 4, 7)
GR

Add subscirber to Squalomail list using Gravity Forms and REST API endpoint

Add subscirber to Squalomail list using Gravity Forms and REST API endpoint
<?php
// Form ID 7
add_action( 'gform_after_submission_7', 'squalomail_add_entry', 10, 2 );
function squalomail_add_entry( $entry, $form ) {
    
    // Create new subscriber endpoint
    $endpoint = 'http://api.squalomail.com/v1/create-recipient';
    // Email field with ID 1
    $email_field = rgpost( 'input_1' );
    // Checkbox field with ID 2
    $newsletter_consent = rgpost( 'input_2_1' );

    $body = [
        'apiKey' => 'xxxx',
        'listIds' => [1],
        'email' => $email_field

python_read_file_and_change_it

import os
import glob


def update_file_content(file_path):
    # Step 1: Read the file content into a list of lines
    with open(file_path, "r") as file:
        lines = file.readlines()

    # Step 2: Iterate through the lines and make the necessary updates
    updated_lines = []
    for i in range(len(lines)):
        line = lines[i]
        print(f'i = {i} and len(lines)-1 = {len(lines) - 1}')

        # If the next line contains "__root__", change "BaseClass" to "RootClass" 

Prompt Engineering - SQL-2-Text-2-SQL

## Original System Prompt
```python
SQL_PREFIX = """You are an agent designed to interact with a SQL database.
Given an input question, create a syntactically correct SQLite query to run, then look at the results of the query and return the answer.
Unless the user specifies a specific number of examples they wish to obtain, always limit your query to at most 5 results.
You can order the results by a relevant column to return the most interesting examples in the database.
Never query for all the 

NVIDIA - Resources

## NVIDIA Dev Platform
- https://www.build.nvidia.com
- https://www.ngc.nvidia.com

## CUDA
- 🎥 [**Python Simplified: CUDA Simply Explained**](https://www.youtube.com/watch?v=r9IqwpMR9TE)
- 🎥 [**Python Simplified: cuDF Pandas**](https://www.youtube.com/watch?v=9KsJRyZJ0vo)
- 🎥 [**Python Simplified: Polars on GPU (Short)**](https://www.youtube.com/watch?v=bfdfx2GVIMg)

## NVLM
- 🌐 [**NVML 1.0 Project**](https://nvlm-project.github.io/)

## NIM
- 🎥 [**Python Simplified: what is Nim? (SHORT)**](htt

632. Smallest Range Covering Elements from K Lists

You have k lists of sorted integers in non-decreasing order. Find the smallest range that includes at least one number from each of the k lists. We define the range [a, b] is smaller than range [c, d] if b - a < d - c or a < c if b - a == d - c.
/**
 * @param {number[][]} nums
 * @return {number[]}
 */
var smallestRange = function(nums) {
  const n = nums.length;
  
  // Initialize a Min Priority Queue with a custom priority function
  const pq = new MinPriorityQueue({
    priority: (a) => a[0]  // a[0] is the value of the element, which determines its priority
  });

  let max = Number.NEGATIVE_INFINITY;
  let range = [];

  // Enqueue the first element of each list and update the maximum value
  nums.forEach((numArr, idx) => {
    max

WebRTC

# Webrtc

![](https://cdn.cacher.io/attachments/u/3loss1xedrwyf/5d8CAxh1xFfQ9z6i4x4Uvl0LfpzC5bIQ/ir15ze59g.png)

## How WebRTC works

let's consider two peers, A and B, where A initiates communication with B. Initially, in the first case, A being the offerer will have to call the createOffer function to begin a session. A also mentions details such as codecs through a setLocalDescription function, which sets up its local config. The remote party, B, reads the offer and stores it using the setRem

Mes outiles carto designe

# Sur QGIS
Bezier Editing = dessiner courbes