This file contains hidden or 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 | |
import sympy as sym | |
import argparse | |
parser = argparse.ArgumentParser( | |
description="Fa el producte (·) entre dos matrius" | |
) | |
parser.add_argument("-a", help="Matriu `a`", required=True) | |
parser.add_argument("-b", help="Matriu `b`", required=True) | |
args = parser.parse_args() |
This file contains hidden or 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
from tkinter import Tk, Label, Button | |
class Main: | |
APP_NAME = '' | |
def __init__(self, master): | |
self.master = master | |
master.title(self.APP_NAME) | |
self.center(master) |
This file contains hidden or 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 psutil | |
def check_process_running(processname, ending='.exe'): | |
process_list = [psutil.Process(pid).name() for pid in psutil.pids()] | |
return '{name}.exe'.format(name=processname) in process_list |
This file contains hidden or 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
ALBARAN_PATH = "C:\\Kronos\\Albaranes" | |
LOG_PATH = "logs" | |
PHONES = [ | |
{ | |
'name' : 'Motorola MotoG5', | |
'directory': 'motog5', | |
}, { | |
'name' : 'Lenovo Tab 7', | |
'directory' : 'lenovotab7', |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
def pig(word): | |
translated = '' | |
punct = '' | |
''' Nos guardamos si tiene algún signo de puntuación ''' | |
if word[-1] in punctuation: | |
punct = word[-1] | |
word = word[:-1] |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
''' Clasifica torrents según ciertas palabras clave ''' | |
kwords = { | |
'windows': ['win', 'exe', 'msi', 'pc'], | |
'mac': ['mac', 'osx', 'dmg'], | |
'linux': ['rpm', 'deb', 'tar', 'linux', 'ubuntu', 'sh'], | |
'ost': ['flac', 'ost', 'flac', 'mp3', 'soundtrack'], | |
'android': ['apk', 'android'] | |
} |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
class DataBase: | |
''' | |
Database is a dictionary that is stored and read from a file. | |
''' | |
def __init__(self, fileName): | |
import cPickle as pickle | |
self.pickle = pickle | |
This file contains hidden or 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
using UnityEngine; | |
using System.Collections; | |
public class EnemyBehaviour : MonoBehaviour { | |
/* PUBLIC variables */ | |
public const int maxHealth = 100; | |
public const int maxDamage = 20; | |
LineRenderer line; |
NewerOlder