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 System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Drawing; | |
using System.Runtime.InteropServices; | |
using System.Threading; | |
namespace ICTest | |
{ | |
// Destination object for touch/mouse/pen gestures. |
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
private bool CurpValida(string curp) | |
{ | |
var re = @"^([A-Z][AEIOUX][A-Z]{2}\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])[HM](?:AS|B[CS]|C[CLMSH]|D[FG]|G[TR]|HG|JC|M[CNS]|N[ETL]|OC|PL|Q[TR]|S[PLR]|T[CSL]|VZ|YN|ZS)[B-DF-HJ-NP-TV-Z]{3}[A-Z\d])(\d)$"; | |
Regex rx = new Regex(re, RegexOptions.Compiled | RegexOptions.IgnoreCase); | |
var validado = rx.IsMatch(curp); | |
if (!validado) //Coincide con el formato general? | |
return false; | |
//Validar que coincida el dígito verificador |
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
############################################################################### | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
# GNU General Public License for more details. |
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
#r "packages/FSharp.Data.1.1.10/lib/net40/FSharp.Data.dll" | |
open FSharp.Data.Csv | |
open FSharp.Data.Csv.Extensions | |
let csv = CsvFile.Load("http://faculty.washington.edu/heagerty/Books/Biostatistics/DATA/ozone.csv") | |
//What are the column names of the dataset? | |
csv.Headers |
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
### R code from vignette source 'Presentation.Rnw' | |
### Encoding: UTF-8 | |
################################################### | |
### code chunk number 1: init | |
################################################### | |
options(width=60) | |
################################################### |
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
#' Print relevant digits of a p-value. | |
#' | |
#' The idea is, under the assumption that H0 holds, to print as many digits of | |
#' p as are strictly necessary to demonstrate H0. Turning this around, if we | |
#' need to print many digits this probably means that we can reject H0. | |
#' | |
#' @param pvalue a single p-value | |
#' @param max_precision limit the maximum number of leading zeros to display | |
#' @param p typographic representation of the variable “p” | |
pretty_p <- function (pvalue, max_precision = 5, p = bquote(italic(p))) { |
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
#r "bin/v40/FSharp.Data.dll" | |
open FSharp.Data.Csv | |
open FSharp.Data.Csv.Extensions | |
let csv = CsvFile.Load("http://faculty.washington.edu/heagerty/Books/Biostatistics/DATA/ozone.csv") | |
//What are the column names of the dataset? | |
csv.Headers | |
//Extract the first 2 rows of the data frame and print them to the console |
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
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible). | |
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export. | |
var FORMAT_ONELINE = 'One-line'; | |
var FORMAT_MULTILINE = 'Multi-line'; | |
var FORMAT_PRETTY = 'Pretty'; | |
var LANGUAGE_JS = 'JavaScript'; | |
var LANGUAGE_PYTHON = 'Python'; |