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
# encoding=utf-8 | |
# Obtener el dígito verificador del RUT en Python. | |
# | |
# La función recibe el RUT como un entero, | |
# y entrega el dígito verificador como un entero. | |
# Si el resultado es 10, el RUT es "raya k". | |
from itertools import cycle |
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
@echo off | |
REM If PowerShell 2 is not installed, this script will automatically download and install it. | |
REM Only works on XP SP3 with .NET 3.5. Only for dev boxes, not designed for servers. | |
REM Based on http://blog.codeassassin.com/2009/12/10/no-web-browser-need-powershell/ | |
ver | find "XP" > nul | |
if %ERRORLEVEL% neq 0 goto not_xp | |
ver | find "5.1.2600" > nul |
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
#!/bin/bash | |
# Pre-commit hook to make a mysql dump right before committing and add it to the commit. | |
# | |
## Change the following values to suit your local setup. | |
# The name of a database user with read access to the database. | |
DBUSER=root | |
# The password associated with the above user. Leave commented if none. | |
#DBPASS=seekrit | |
# The database associated with this repository. | |
DBNAME=dplay |
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
$xlFixedFormat = [Microsoft.Office.Interop.Excel.XlFileFormat]::xlOpenXMLWorkbook | |
write-host $xlFixedFormat | |
$excel = New-Object -ComObject excel.application | |
$excel.visible = $true | |
$folderpath = "C:\Users\gabceb\Documents\testXLS" | |
$filetype ="*xls" | |
Get-ChildItem -Path $folderpath -Include $filetype -recurse | | |
ForEach-Object ` | |
{ | |
$path = ($_.fullname).substring(0, ($_.FullName).lastindexOf(".")) |
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
## This is a directory/file filter for WinMerge | |
## This filter suppresses various binaries found in Visual C# source trees | |
name: Visual C# loose | |
desc: Suppresses various binaries found in Visual C# source trees | |
## This is an inclusive (loose) filter | |
## (it lets through everything not specified) | |
def: include | |
## Filters for filenames begin with f: |
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
############################################# | |
# Push de la rama actual | |
git push origin $rama_actual | |
############################################# | |
# Volver a un commit anterior, descartando los cambios | |
git reset --HARD $SHA1 | |
############################################# | |
# Ver y descargar Ramas remotas |
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
<# | |
.SYNOPSIS | |
Converts files to the given encoding. | |
Matches the include pattern recursively under the given path. | |
.EXAMPLE | |
Convert-FileEncoding -Include *.js -Path scripts -Encoding UTF8 | |
#> | |
function Convert-FileEncoding([string]$Include, [string]$Path, [string]$Encoding='UTF8') { | |
$count = 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
# Taken from psake https://github.com/psake/psake | |
<# | |
.SYNOPSIS | |
This is a helper function that runs a scriptblock and checks the PS variable $lastexitcode | |
to see if an error occcured. If an error is detected then an exception is thrown. | |
This function allows you to run command-line programs without having to | |
explicitly check the $lastexitcode variable. | |
.EXAMPLE |
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
@ECHO OFF | |
setLocal EnableDelayedExpansion | |
@REM ************************************************************************* | |
@REM Purpose: Runs BI Publisher Catalog Utility on Windows OS | |
@REM Author: Dmitry Nefedkin ([email protected]) | |
@REM Description: script is based on BIPCatalogUtil.sh | |
@REM found in $MW_HOME\Oracle_BI1\clients\bipublisher\ of Oracle BI EE 11.1.1.6 installation | |
@REM Last changed: Oct, 25, 2012 18:00 | |
@REM Version: 0.1 | |
@REM ************************************************************************* |
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 pandas as pd | |
import numpy as np | |
# read df from delimited file | |
df = pd.read_csv('filename.txt', sep='\t') | |
# force printing out of dataframe | |
print df.to_string() | |
# apply a function to column/row |
OlderNewer