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 random | |
def estimate_pi(n): | |
num_point_circle = 0 | |
num_point_total = 0 | |
for _ in range(n): | |
x = random.uniform(0, 1) | |
y = random.uniform(0, 1) | |
distance = x**2 + y**2 |
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
SetCapsLockState, AlwaysOff | |
CapsLock & /::Up | |
CapsLock & SC15D::Down | |
CapsLock & SC138::Left | |
CapsLock & SC11D::Right | |
CapsLock & l::Home | |
CapsLock & .::End | |
CapsLock & ,::Delete | |
CapsLock & `;::PgUp | |
CapsLock & '::PgDn |
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
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
; #Warn ; Enable warnings to assist with detecting common errors. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
SetCapsLockState, AlwaysOff | |
CapsLock & ,:: Send {Del} | |
CapsLock & .:: Send {End} | |
CapsLock & k:: Send {Ins} |
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
# Specify analysis options. | |
# | |
# Until there are meta linter rules, each desired lint must be explicitly enabled. | |
# See: https://github.com/dart-lang/linter/issues/288 | |
# | |
# For a list of lints, see: http://dart-lang.github.io/linter/lints/ | |
# See the configuration guide for more | |
# https://github.com/dart-lang/sdk/tree/master/pkg/analyzer#configuring-the-analyzer | |
# | |
# There are other similar analysis options files in the flutter repos, |
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
class AuthValidator { | |
String validatePassword(String value) { | |
if (value.length < 6) | |
return 'Contraseña debe ser mayor a 6 caracteres'; | |
else | |
return null; | |
} | |
String validateEmail(String value) { | |
const String pattern = |
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 'dart:developer'; | |
import 'package:flutter/material.dart'; | |
class CounterNotifier with ChangeNotifier { | |
int _count = 0; | |
int get value => _count; | |
void increment() { |