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
# | |
from tkinter import * | |
class Application(Frame): | |
"""A updated Version of delete me. """ | |
def __init__(self, master): | |
super(Application, self).__init__(master) | |
self.grid() | |
self.create_widget() |
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
Afghanistan | |
Albania | |
Algeria | |
Andorra | |
Angola | |
Antigua and Barbuda | |
Argentina | |
Armenia | |
Australia | |
Austria |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Document</title> | |
</head> | |
<body> | |
<style> | |
#intro { |
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
from django.contrib.syndication.views import Feed | |
from django.urls import reverse | |
from blog.models import BlogPost | |
class LatestEntriesFeed(Feed): | |
title = "Blog | Olamigoke Philip" | |
link = "/feeds/" | |
description = "I'm Ola; a Full stack web developer. I also ..." | |
def items(self): |
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
from django.urls import path | |
from .feeds import LatestEntriesFeed | |
urlpatterns = [ | |
# ... | |
path('latest/feed/', LatestEntriesFeed()), | |
# ... | |
] |
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
REACT NATIVE IOS vs ANDROID FONT USE | |
Tested for React Native 0.41+ | |
IOS: | |
- Place the fonts in the assets and make sure they are bundled along | |
- On iOS, fontFamily in Text match the Font Family name as described in Font Book (macOS). Font weights can be specified exactly. | |
ANDROID: | |
On Android, there are two ways of using fonts: |
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 datetime | |
from django.conf import settings | |
from django.contrib.auth import logout | |
from django.contrib.sessions.models import Session | |
from django.http import HttpRequest | |
from importlib import import_module | |
now = datetime.datetime.now() | |
session_engine = import_module(settings.SESSION_ENGINE) | |
sessions = Session.objects.filter(expire_date__gt=now) |
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
# Simple Rock, Paper, Scissors in Python (No Functions) | |
# Educational implementation without functions. | |
# Feel free to use, modify, and comment on the code. | |
# Python 3.10 - Rock, Paper, Scissors Game | |
# Olamigoke Philip 11-06-2024 | |
import random | |
menu_message = "\n\n\tMenu Options \n1. Enter 'End' to Close Game.\n:" |
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
# Basic Script - CONVERT SQL JSON EXPORT TO INSERT STATEMENT | |
# Convert SQL JSON Exports to INSERT Statements | |
# Motivation: | |
# - I got feedup with Workbench import/export functionality. It is unreliable and slow, especially for large datasets or complex schemas. | |
# - Hopefully i can contribute to Workbench's program soonest. | |
# - This script aims to provide a more robust and efficient way to migrate data between databases or systems. | |
# Basic Features of this Script: |
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 datetime | |
import requests | |
from typing import Final, TypedDict | |
MAX_VALUE: Final = 10_000 | |
""" | |
Special typing construct to indicate final names to type checkers. | |
A final name cannot be re-assigned or overridden in a subclass. | |
""" |