Skip to content

Instantly share code, notes, and snippets.

@Sarchis
Sarchis / style.css
Last active October 12, 2015 21:39
input[type=search]{
appearance: none;
-webkit-appearance: none;
-moz-apperance: none;
}
@Sarchis
Sarchis / index.html
Last active December 12, 2015 06:39
<input type="search" name="s">
percentage = float(25) / 100
#percentage = 12
calc = 1753
result = (percentage * calc)
print result
if result == int(result):
print(True)
else:
@Sarchis
Sarchis / open.py
Last active December 12, 2015 09:09
open_file = open(file_name, [modo de apertura])
file_read = open(file, 'r')
onlyRead = file_read.read()
print(onlyRead) #Imprime el contenido
file_read.close()
@Sarchis
Sarchis / create.py
Created February 10, 2013 14:33
how to create a file in python
new_file = open('nameFile', 'w')
new = new_file.write(string)
new_file.close()
@Sarchis
Sarchis / edit.py
Last active December 12, 2015 09:18
file_open = open('simon', 'r')
file_read = file_open()
change = file_read.replace('Simón', 'sarchis')
file_open.close()
new_file = open('newgate')
create_file = new_file.write(change)
new_file.close()
#! /usr/bin/python
# -*-coding: utf-8-*-
name = raw_input('Ingrese su nombre: ')
filename = raw_input('Ingrese nombre del archivo: ')
abrir = open('simon', 'r')
chain = abrir.read()
chain = chain.replace('Simón', name)
abrir.close()