This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Python script that renames files by removing a specific common pattern among them | |
import os | |
for every in os.scandir(): #loop through all files in current directory | |
if every.name.startswith('y2mate'): #if file matches the pattern | |
os.rename(every.name,every.name.replace('y2mate.com - ', '')) #rename file | |
print(every.name) #shows filenames | |
input("Archivos renombrados !!!") #this command prevents python from closing immediately |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Definir restricciones | |
restriccion.1 <- function(x) 30 - x | |
# restriccion.2 x1 = 10 (Se dibuja usando geom_vline) | |
# restriccion.3 x2 = 10 (Se dibuja usando geom_vline) | |
# restriccion.4 x1 = 0 (Eje de abscisas) | |
# restriccion.4 x2 = 0 (Eje de ordenadas) | |
# Importar ggplot2 paquete | |
library(ggplot2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
; #Warn ; Enable warnings to assist with detecting common errors. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
!j:: | |
Loop, 1414 | |
{ | |
MouseClick, left, 527, 440 | |
MouseClick, left, 913, 700 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from IPython.display import display, Markdown | |
def maxmincomposition(X,Y): | |
C = np.zeros((X.shape[0],Y.shape[1])) | |
# Iterar a traves de las filas de A | |
for i in range(len(X)): | |
# Iterar a traves de las columnas de B | |
for j in range(len(Y[0])): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
def reflexive(X): | |
firstvalue = X[0][0] | |
if(firstvalue != 1): | |
return False | |
else: | |
for i in range(1,len(X)): | |
if(X[i][i] != firstvalue): | |
return False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C = [[1, 0.8,0.9], [0.8, 1,0.9],[0.9, 0.9,1]] | |
def operations(i,j,k,X): | |
print("X[" + str(j) + "]" + "[" + str(k) + "] >= max(X[" + str(j) + "]" + "[" + str(k) + "],min(X[" + str(j) + "]" + "[" + str(i) + "],X[" + str(i) + "]" + "[" + str(k) + "]))") | |
print(str(X[j][k]) + " >= max(" + str(X[j][k]) + ",min(" + str(X[j][i]) + "," + str(X[i][k]) + "))") | |
print(str(X[j][k]) + " >= max(" + str(X[j][k]) + "," + str(min(X[j][i],X[i][k])) + ")") | |
print(str(X[j][k]) + " >= " + str(max(X[j][k],min(X[j][i],X[i][k])))) | |
print("----------------") | |
def transitive(X): |