Skip to content

Instantly share code, notes, and snippets.

View Wolemercy's full-sized avatar
🎯
Focusing

Wolemercy Wolemercy

🎯
Focusing
View GitHub Profile
@Wolemercy
Wolemercy / monty-hall.py
Last active November 8, 2021 05:53
Scripting the Monty Hall Problem
# The Monty Hall Problem
import random
# Instantiating a random treasure map
def single_run():
maps = ['wasteland', 'wasteland', 'wasteland']
treasure_index = random.randint(0, 2)
maps[treasure_index] = 'one piece'
return maps
@Wolemercy
Wolemercy / urlshortener.py
Last active August 9, 2021 04:03
Django Model for URL Shortener Application
from django.db import models
from .urlreduce_utils import create_shortened_url
# Create your models here.
class Shortener(models.Model):
'''
This model creates a short url using the long url as the input
created -> time and date the shortener was created
times_followed = the number of times the shortened link has been followed
@Wolemercy
Wolemercy / PY0101EN-1-2-Strings.ipynb
Created August 28, 2020 14:19
Created on Skills Network Labs
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.