un codigo de ejemplo en batch (convertir un numero de decimal a binario)
:: Check Windows version: NT 4 or later required
:: Check number of command line arguments: 1 and only 1 required
:: Check if the command line argument consists of zeroes and ones only
ECHO "
%~1"
| FINDSTR /R /B /C:"\"[01][01]*\"$"
>NUL || GOTO Syntax
:: Initialize the variables
:: Display the initial binary value
:Loop
:: Extract the last digit from the binary number
SET Binary=
%Binary:~0,-1% )
:: Add the digit's value to the decimal result
IF %Digit% EQU 1
SET /A Decimal =
%Decimal% +
%DigVal% :: Increment the digit's value (multiply by 2)
:: If the value of the remaining digits is
:: greater than 0, loop to the next iteration
:: Clean up aal variables but one
:: Display the decimal result
:: Exit with the decimal result as return code
:Syntax
ECHO Bin2Dec.bat, Version 1.00
for Windows NT 4 and later
ECHO Convert binary numbers to decimal
ECHO Usage: BIN2DEC binary_number
ECHO Written by Rob van der Woude
ECHO http://www.robvanderwoude.com
un código de ejemplo en python (mostrar un cubo en 3d y rotando)
import wireframe
import pygame
class ProjectionViewer:
""" Displays 3D objects on a Pygame screen """
def __init__(self, width, height):
self.width = width
self.height = height
self.screen = pygame.display.set_mode((width, height))
pygame.display.set_caption('Wireframe Display')
self.background = (10,10,50)
self.wireframes = {}
self.displayNodes = True
self.displayEdges = True
self.nodeColour = (255,255,255)
self.edgeColour = (200,200,200)
self.nodeRadius = 4
def addWireframe(self, name, wireframe):
""" Add a named wireframe object. """
self.wireframes[name] = wireframe
def run(self):
""" Create a pygame screen until it is closed. """
running = True
while running:
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False
self.display()
pygame.display.flip()
def display(self):
""" Draw the wireframes on the screen. """
self.screen.fill(self.background)
for wireframe in self.wireframes.values():
if self.displayEdges:
for edge in wireframe.edges:
pygame.draw.aaline(self.screen, self.edgeColour, (edge.start.x, edge.start.y), (edge.stop.x, edge.stop.y), 1)
if self.displayNodes:
for node in wireframe.nodes:
pygame.draw.circle(self.screen, self.nodeColour, (int(node.x), int(node.y)), self.nodeRadius, 0)
if __name__ == '__main__':
pv = ProjectionViewer(400, 300)
cube = wireframe.Wireframe()
cube.addNodes([(x,y,z) for x in (50,250) for y in (50,250) for z in (50,250)])
cube.addEdges([(n,n+4) for n in range(0,4)]+[(n,n+1) for n in range(0,8,2)]+[(n,n+2) for n in (0,1,4,5)])
pv.addWireframe('cube', cube)
pv.run()
creo que la diferencia se nota incluso sin conocimientos
sobre python portable, creo que este proyecto lo es
http://winpython.github.io/aunque
Eleкtro propone otras opciones de la cual creo que la más común es
Visual Basic Script (VBS) este lo interpreta windows (y solo windows) nativamente... es considerablemente potente (aún existen virus en este lenguaje) y muy util
por cierto... antes de irde te cabeza con lo de ser "hacker" primero aprende que es, porque posiblemente puede que estés creyendo mal (culpo al cine y tv)
Pero... ¿Qué narices es un 'hacker'?[Guía] "Quiero ser hacker" - Por dónde empezar