repo_full_name stringlengths 6 93 | repo_url stringlengths 25 112 | repo_api_url stringclasses 28
values | owner stringclasses 28
values | repo_name stringclasses 28
values | description stringclasses 28
values | stars int64 617 98.8k | forks int64 31 355 ⌀ | watchers int64 990 999 ⌀ | license stringclasses 2
values | default_branch stringclasses 2
values | repo_created_at timestamp[s]date 2012-07-24 23:12:50 2025-06-16 08:07:28 ⌀ | repo_updated_at timestamp[s]date 2026-02-23 15:23:15 2026-05-03 18:52:12 ⌀ | repo_topics listlengths 0 13 ⌀ | repo_languages unknown | is_fork bool 1
class | open_issues int64 3 104 ⌀ | file_path stringlengths 3 208 | file_name stringclasses 509
values | file_extension stringclasses 1
value | file_size_bytes int64 101 84k ⌀ | file_url stringclasses 627
values | file_raw_url stringclasses 627
values | file_sha stringclasses 624
values | language stringclasses 8
values | parsed_at stringdate 2026-05-04 01:12:36 2026-05-04 19:41:55 | text stringlengths 100 102k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
scottrogowski/code2flow | https://github.com/scottrogowski/code2flow | null | null | null | null | 4,571 | null | null | mit | null | null | null | null | null | null | null | tests/test_code/py/exclude_modules_two_files/exclude_modules_a.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:07.976624 | import re
from exclude_modules_b import match
def a():
re.match()
def b():
match()
a()
b()
|
scottrogowski/code2flow | https://github.com/scottrogowski/code2flow | null | null | null | null | 4,571 | null | null | mit | null | null | null | null | null | null | null | tests/test_code/py/inherits/inherits.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:07.983932 | # from https://ruby-doc.com/docs/ProgrammingRuby/html/tut_modules.html
from inherits_import import MajorScales, PentatonicScales
def majorNum():
pass
def pentaNum():
pass
class FakePentatonicScales():
def pentaNum(self):
if self.numNotes is None:
self.numNotes = 5
return s... |
scottrogowski/code2flow | https://github.com/scottrogowski/code2flow | null | null | null | null | 4,571 | null | null | mit | null | null | null | null | null | null | null | tests/test_code/py/import_paths/import_paths.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:07.985649 | import abra
from . import cadabra
from abra import abra2 as abra3
def main():
abra3()
cadabra.cadabra2()
main2()
def main2():
abra.abra2()
main()
|
scottrogowski/code2flow | https://github.com/scottrogowski/code2flow | null | null | null | null | 4,571 | null | null | mit | null | null | null | null | null | null | null | tests/test_code/py/exclude_modules/exclude_modules.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:07.987050 | import re
from re import match
def search():
print("This is the wrong search")
def beta():
print("this still connects")
search()
b = Nothing()
b.beta()
def alpha():
re.search("hello world")
beta()
match()
# ret = str('')
# ret()
if __name__ == '__main__':
alpha()
|
scottrogowski/code2flow | https://github.com/scottrogowski/code2flow | null | null | null | null | 4,571 | null | null | mit | null | null | null | null | null | null | null | tests/test_code/py/chained/chained.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:08.015533 | class Chain():
def __init__(self, val):
self.val = val
def add(self, b):
self.val += b
return self
def sub(self, b):
self.val -= b
return self
def mul(self, b):
self.val *= b
return self
print(Chain(5).add(5).sub(2).mul(10))
|
scottrogowski/code2flow | https://github.com/scottrogowski/code2flow | null | null | null | null | 4,571 | null | null | mit | null | null | null | null | null | null | null | tests/test_code/py/inherits/inherits_import.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:08.512609 | # from https://ruby-doc.com/docs/ProgrammingRuby/html/tut_modules.html
class MajorScales():
def majorNum(self):
if self.numNotes is None:
self.numNotes = 7
return self.numNotes
class PentatonicScales():
def pentaNum(self):
if self.numNotes is None:
self.numNote... |
scottrogowski/code2flow | https://github.com/scottrogowski/code2flow | null | null | null | null | 4,571 | null | null | mit | null | null | null | null | null | null | null | tests/test_code/py/init/init.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:08.523404 | from the_import import ProvincialClass as pc, imported_func
class Abra():
def __init__(self):
self.cadabra()
def cadabra(self):
print("cadabra")
def b():
Abra()
b()
pc()
HiddenClass() # this is probably too defensive
imported_func()
|
scottrogowski/code2flow | https://github.com/scottrogowski/code2flow | null | null | null | null | 4,571 | null | null | mit | null | null | null | null | null | null | null | tests/test_code/py/pytz/exceptions.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:08.582627 | '''
Custom exceptions raised by pytz.
'''
__all__ = [
'UnknownTimeZoneError', 'InvalidTimeError', 'AmbiguousTimeError',
'NonExistentTimeError',
]
class Error(Exception):
'''Base class for all exceptions raised by the pytz library'''
class UnknownTimeZoneError(KeyError, Error):
'''Exception raised w... |
scottrogowski/code2flow | https://github.com/scottrogowski/code2flow | null | null | null | null | 4,571 | null | null | mit | null | null | null | null | null | null | null | tests/test_code/py/init/the_import.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:08.583201 | class ProvincialClass():
def __init__(self):
print("here")
class HiddenClass():
def __init__(self):
print("here")
def imported_func():
print("here")
|
scottrogowski/code2flow | https://github.com/scottrogowski/code2flow | null | null | null | null | 4,571 | null | null | mit | null | null | null | null | null | null | null | tests/test_code/py/pytz/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:08.605823 | '''
datetime.tzinfo timezone definitions generated from the
Olson timezone database:
ftp://elsie.nci.nih.gov/pub/tz*.tar.gz
See the datetime section of the Python Library Reference for information
on how to use these modules.
'''
import sys
import datetime
import os.path
from pytz.exceptions import AmbiguousTim... |
scottrogowski/code2flow | https://github.com/scottrogowski/code2flow | null | null | null | null | 4,571 | null | null | mit | null | null | null | null | null | null | null | tests/test_code/py/nested_class/nested_class.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:08.608222 | class Outer():
class Inner():
def inner_func():
Outer().outer_func()
def outer_func(a):
print("Outer_func")
a.inner_func()
def __init__(self):
self.inner = self.Inner()
print("do something")
new_obj = Outer()
new_obj.outer_func()
|
scottrogowski/code2flow | https://github.com/scottrogowski/code2flow | null | null | null | null | 4,571 | null | null | mit | null | null | null | null | null | null | null | tests/test_code/py/pytz/lazy.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:08.609343 | from threading import RLock
try:
from collections.abc import Mapping as DictMixin
except ImportError: # Python < 3.3
try:
from UserDict import DictMixin # Python 2
except ImportError: # Python 3.0-3.3
from collections import Mapping as DictMixin
# With lazy loading, we might end up with... |
scottrogowski/code2flow | https://github.com/scottrogowski/code2flow | null | null | null | null | 4,571 | null | null | mit | null | null | null | null | null | null | null | tests/test_code/py/pytz/reference.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:08.612888 | '''
Reference tzinfo implementations from the Python docs.
Used for testing against as they are only correct for the years
1987 to 2006. Do not use these for real code.
'''
from datetime import tzinfo, timedelta, datetime
from pytz import HOUR, ZERO, UTC
__all__ = [
'FixedOffset',
'LocalTimezone',
'USTime... |
scottrogowski/code2flow | https://github.com/scottrogowski/code2flow | null | null | null | null | 4,571 | null | null | mit | null | null | null | null | null | null | null | tests/test_code/py/pytz/tzfile.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:08.617669 | '''
$Id: tzfile.py,v 1.8 2004/06/03 00:15:24 zenzen Exp $
'''
from datetime import datetime
from struct import unpack, calcsize
from pytz.tzinfo import StaticTzInfo, DstTzInfo, memorized_ttinfo
from pytz.tzinfo import memorized_datetime, memorized_timedelta
def _byte_string(s):
"""Cast a string or byte string t... |
scottrogowski/code2flow | https://github.com/scottrogowski/code2flow | null | null | null | null | 4,571 | null | null | mit | null | null | null | null | null | null | null | tests/test_code/py/nested_calls/nested_calls.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:08.635445 | from typing import Callable
def trace(fn: Callable) -> Callable:
def wrapper(*args, **kwargs):
print('traced call')
return fn(*args, **kwargs)
return wrapper
def do_something(msg):
return msg + ' world'
message = 'hello'
new_message = trace(do_something)(message)
|
scottrogowski/code2flow | https://github.com/scottrogowski/code2flow | null | null | null | null | 4,571 | null | null | mit | null | null | null | null | null | null | null | tests/test_code/py/simple_b/simple_b.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:09.465068 | """
Comments
"""
def a():
b()
# comments
def b():
a("""STRC #""")
class c():
def d(a="String"):
a("AnotherSTR")
c.d()
|
scottrogowski/code2flow | https://github.com/scottrogowski/code2flow | null | null | null | null | 4,571 | null | null | mit | null | null | null | null | null | null | null | tests/test_code/py/weird_calls/weird_calls.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:09.561761 | def print_it(string):
print(string)
def func_a():
print_it("func_a")
def func_b():
print_it("func_a")
def func_c():
print_it("func_a")
func_dict = {
'func_a': func_a,
'func_b': func_b,
'func_c': func_c,
}
func_dict['func_a']()
func_b()
def factory():
return lambda x: x**x
fa... |
scottrogowski/code2flow | https://github.com/scottrogowski/code2flow | null | null | null | null | 4,571 | null | null | mit | null | null | null | null | null | null | null | tests/test_code/py/weird_imports/weird_imports.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:10.129582 | from re import (search, match)
import re.match as mitch
def main():
a = b = search("abc", "def")
c = mitch("abc", "def")
return a, b, c
match("abc", "def")
main()
|
scottrogowski/code2flow | https://github.com/scottrogowski/code2flow | null | null | null | null | 4,571 | null | null | mit | null | null | null | null | null | null | null | tests/test_graphs.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:10.149785 | import io
import os
import sys
import pygraphviz
import pytest
sys.path.append(os.getcwd().split('/tests')[0])
from code2flow.engine import code2flow, LanguageParams, SubsetParams
from tests.testdata import testdata
LANGUAGES = (
'py',
'js',
'mjs',
'rb',
'php',
)
flattened_tests = {}
for lang, ... |
scottrogowski/code2flow | https://github.com/scottrogowski/code2flow | null | null | null | null | 4,571 | null | null | mit | null | null | null | null | null | null | null | tests/test_interface.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:10.207584 | import json
import locale
import logging
import os
import shutil
import sys
import pytest
sys.path.append(os.getcwd().split('/tests')[0])
from code2flow.engine import code2flow, main, _generate_graphviz, SubsetParams
from code2flow import model
IMG_PATH = '/tmp/code2flow/output.png'
if os.path.exists("/tmp/code2flo... |
scottrogowski/code2flow | https://github.com/scottrogowski/code2flow | null | null | null | null | 4,571 | null | null | mit | null | null | null | null | null | null | null | tests/test_code/py/resolve_correct_class/rcc.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:14.112533 | def func_1():
print("global func_1")
class Alpha():
def func_1(self):
print("alpha func_1")
self.func_1()
func_1()
b = Beta()
b.func_2()
def func_2(self):
print("alpha func_2")
class Beta():
def func_1(self):
print("beta func_1")
al = ... |
scottrogowski/code2flow | https://github.com/scottrogowski/code2flow | null | null | null | null | 4,571 | null | null | mit | null | null | null | null | null | null | null | tests/test_code/py/pytz/tzinfo.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:14.152382 | '''Base classes and helpers for building zone specific tzinfo classes'''
from datetime import datetime, timedelta, tzinfo
from bisect import bisect_right
try:
set
except NameError:
from sets import Set as set
import pytz
from pytz.exceptions import AmbiguousTimeError, NonExistentTimeError
__all__ = []
_time... |
scottrogowski/code2flow | https://github.com/scottrogowski/code2flow | null | null | null | null | 4,571 | null | null | mit | null | null | null | null | null | null | null | tests/test_code/py/subset_find_exception/two.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:14.219315 | def private():
pass
class Abra:
def func():
private()
class Cadabra:
def func():
private()
|
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | flet/tutorials/getting-started-flet/example_04.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:22.063330 | # Getting Started With Flet for GUI Development
# https://www.pythonguis.com/tutorials/getting-started-flet/
import flet as ft
def main(page: ft.Page):
page.title = "Flet Navigation Bar Demo"
page.window.width = 360
page.window.height = 260
info = ft.Text("You are on the Home tab")
def on_nav_c... |
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | dearpygui/tutorials/getting-started-dearpygui/example_002.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:22.064386 | # Getting Started With DearPyGui for GUI Development
# https://www.pythonguis.com/tutorials/getting-started-dearpygui/
import dearpygui.dearpygui as dpg
def main():
dpg.create_context()
dpg.create_viewport(title="Widgets Demo", width=400, height=640)
with dpg.window(
label="Basic DearPyGui Widge... |
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | flet/tutorials/getting-started-flet/example_05.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:22.079581 | # Getting Started With Flet for GUI Development
# https://www.pythonguis.com/tutorials/getting-started-flet/
import flet as ft
def main(page: ft.Page):
page.title = "Flet Information Displays Demo"
page.window.width = 340
page.window.height = 400
header = ft.Text("Latest image", size=18)
hero =... |
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | dearpygui/tutorials/getting-started-dearpygui/example_005.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:22.080975 | # Getting Started With DearPyGui for GUI Development
# https://www.pythonguis.com/tutorials/getting-started-dearpygui/
import numpy as np
import dearpygui.dearpygui as dpg
def main() -> None:
dpg.create_context()
dpg.create_viewport(title="Plotting Example", width=420, height=320)
x = np.linspace(0, 2 ... |
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | dearpygui/tutorials/getting-started-dearpygui/example_004.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:22.082511 | # Getting Started With DearPyGui for GUI Development
# https://www.pythonguis.com/tutorials/getting-started-dearpygui/
import dearpygui.dearpygui as dpg
def on_click_callback(sender, app_data, user_data):
text = dpg.get_value("input_text")
dpg.set_value("dialog_text", f'You typed: "{text}"')
dpg.configur... |
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | flet/tutorials/getting-started-flet/example_01.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:22.083581 | # Getting Started With Flet for GUI Development
# https://www.pythonguis.com/tutorials/getting-started-flet/
import flet as ft
def main(page: ft.Page):
page.title = "Flet First App"
page.window.width = 200
page.window.height = 100
page.add(ft.Text("Hello, World!"))
ft.app(target=main)
|
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | flet/tutorials/getting-started-flet/example_02.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:22.093254 | # Getting Started With Flet for GUI Development
# https://www.pythonguis.com/tutorials/getting-started-flet/
import flet as ft
def main(page: ft.Page):
page.title = "Flet Buttons Demo"
page.window.width = 200
page.window.height = 200
page.add(ft.ElevatedButton("Elevated Button"))
page.add(ft.Fil... |
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | dearpygui/tutorials/getting-started-dearpygui/example_001.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:22.094323 | # Getting Started With DearPyGui for GUI Development
# https://www.pythonguis.com/tutorials/getting-started-dearpygui/
import dearpygui.dearpygui as dpg
def main():
dpg.create_context()
dpg.create_viewport(title="Viewport", width=300, height=100)
with dpg.window(label="DearPyGui Demo", width=300, height... |
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | dearpygui/tutorials/getting-started-dearpygui/example_003.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:22.095237 | # Getting Started With DearPyGui for GUI Development
# https://www.pythonguis.com/tutorials/getting-started-dearpygui/
import dearpygui.dearpygui as dpg
def main():
dpg.create_context()
dpg.create_viewport(title="Layout Demo", width=520, height=420)
with dpg.window(
label="Layout Demo",
... |
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | flet/tutorials/getting-started-flet/example_03.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:22.124602 | # Getting Started With Flet for GUI Development
# https://www.pythonguis.com/tutorials/getting-started-flet/
import flet as ft
def main(page: ft.Page):
page.title = "Flet Input and Selections Demo"
page.window.width = 360
page.window.height = 520
name = ft.TextField(label="Name")
agree = ft.Chec... |
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | kivy/tutorials/getting-started-kivy/example_001.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:22.686886 | # Getting Started With Kivy for GUI Development
# https://www.pythonguis.com/tutorials/getting-started-kivy/
from kivy.app import App
from kivy.uix.label import Label
class MainApp(App):
def build(self):
return Label(text="Hello, World!")
MainApp().run()
|
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | flet/tutorials/getting-started-flet/example_06.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:22.692306 | # Getting Started With Flet for GUI Development
# https://www.pythonguis.com/tutorials/getting-started-flet/
import flet as ft
def main(page: ft.Page):
page.title = "Flet Dialog Demo"
page.window.width = 300
page.window.height = 300
dlg_modal = ft.AlertDialog(
modal=True,
title=ft.Te... |
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | flet/tutorials/getting-started-flet/example_08.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:22.712209 | # Getting Started With Flet for GUI Development
# https://www.pythonguis.com/tutorials/getting-started-flet/
import flet as ft
def main(page: ft.Page):
page.title = "Flet Event & Callback Demo"
page.window.width = 340
page.window.height = 360
def on_click(e): # Event handler or callback function
... |
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | flet/tutorials/getting-started-flet/example_07.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:22.713444 | # Getting Started With Flet for GUI Development
# https://www.pythonguis.com/tutorials/getting-started-flet/
import flet as ft
def main(page: ft.Page):
page.title = "Flet Layouts Demo"
page.window.width = 250
page.window.height = 300
main_layout = ft.Column(
[
ft.Text("1) Vertica... |
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | kivy/tutorials/getting-started-kivy/example_005.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:22.743587 | # Getting Started With Kivy for GUI Development
# https://www.pythonguis.com/tutorials/getting-started-kivy/
from kivy.app import App
from kivy.uix.label import Label
class CustomLabel(Label):
pass
class MainApp(App):
def build(self):
root = CustomLabel()
return root
MainApp().run()
|
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | kivy/tutorials/getting-started-kivy/example_006.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:22.745634 | # Getting Started With Kivy for GUI Development
# https://www.pythonguis.com/tutorials/getting-started-kivy/
from kivy.app import App
from kivy.lang import Builder
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.button import Button
from kivy.uix.label import Label
Builder.load_file("labels.kv")
Builder.load_f... |
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | kivy/tutorials/kivy-complex-ui-widgets/example_001.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:22.746862 | from kivy.app import App
from kivy.core.window import Window
from kivy.uix.boxlayout import BoxLayout
class WidgetNameApp(App):
title = "WidgetName Widget"
def build(self):
Window.clearcolor = (0, 0.31, 0.31, 1.0)
Window.size = (360, 640)
root = BoxLayout()
return root
Wid... |
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | kivy/tutorials/getting-started-kivy/example_004.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:22.748128 | # Getting Started With Kivy for GUI Development
# https://www.pythonguis.com/tutorials/getting-started-kivy/
from kivy.app import App
from kivy.core.window import Window
from kivy.graphics import Color, Rectangle
from kivy.uix.widget import Widget
class CanvasApp(App):
def build(self):
root = Widget()
... |
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | kivy/tutorials/getting-started-kivy/example_003.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:22.766025 | # Getting Started With Kivy for GUI Development
# https://www.pythonguis.com/tutorials/getting-started-kivy/
from kivy.app import App
from kivy.core.window import Window
from kivy.graphics import Rectangle
from kivy.uix.widget import Widget
class CanvasApp(App):
def build(self):
root = Widget()
s... |
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | kivy/tutorials/getting-started-kivy/example_002.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:22.767272 | # Getting Started With Kivy for GUI Development
# https://www.pythonguis.com/tutorials/getting-started-kivy/
from kivy.app import App
from kivy.uix.button import Button
from kivy.uix.gridlayout import GridLayout
ROWS = COLS = 3
class GridApp(App):
def build(self):
root = GridLayout(rows=ROWS, cols=COLS)... |
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | kivy/tutorials/kivy-complex-ui-widgets/example_004.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:23.302577 | from kivy.app import App
from kivy.core.window import Window
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.filechooser import FileChooserIconView, FileChooserListView
class FileChooserApp(App):
title = "FileChooser Widget"
def build(self):
Window.clearcolor = (0, 0.31, 0.31, 1.0)
Win... |
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | kivy/tutorials/kivy-complex-ui-widgets/example_002.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:23.315309 | from kivy.app import App
from kivy.core.window import Window
from kivy.uix.floatlayout import FloatLayout
from kivy.uix.spinner import Spinner
class SpinnerApp(App):
title = "Spinner Widget"
def build(self):
Window.clearcolor = (0, 0.31, 0.31, 1.0)
Window.size = (300, 300)
root = Flo... |
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | kivy/tutorials/kivy-complex-ui-widgets/example_003.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:23.316270 | from kivy.app import App
from kivy.core.window import Window
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.button import Button
from kivy.uix.dropdown import DropDown
class DropDownApp(App):
title = "DropDown Widget"
def build(self):
Window.clearcolor = (0, 0.31, 0.31, 1.0)
Window.si... |
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | kivy/tutorials/kivy-complex-ui-widgets/example_008.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:23.358122 | from kivy.app import App
from kivy.core.window import Window
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.label import Label
from kivy.uix.tabbedpanel import TabbedPanel, TabbedPanelHeader
class TabbedPanelApp(App):
title = "TabbedPanel Widget"
def build(self):
Window.clearcolor = (0, 0.31,... |
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | kivy/tutorials/kivy-complex-ui-widgets/example_006.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:23.359029 | from kivy.app import App
from kivy.core.window import Window
from kivy.metrics import dp
from kivy.uix.bubble import Bubble, BubbleButton, BubbleContent
from kivy.uix.floatlayout import FloatLayout
from kivy.uix.label import Label
class FormattingBubble(Bubble):
def __init__(self, target_text, **kwargs):
... |
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | kivy/tutorials/kivy-complex-ui-widgets/example_007.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:23.370615 | import csv
from kivy.app import App
from kivy.core.window import Window
from kivy.metrics import dp
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.button import Button
from kivy.uix.label import Label
from kivy.uix.popup import Popup
from kivy.uix.recycleboxlayout import RecycleBoxLayout
from kivy.uix.recyclev... |
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | kivy/tutorials/kivy-complex-ui-widgets/example_005.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:23.371879 | from kivy.app import App
from kivy.core.window import Window
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.button import Button
from kivy.uix.floatlayout import FloatLayout
from kivy.uix.label import Label
from kivy.uix.popup import Popup
class PopupApp(App):
title = "Popup Widget"
def build(self):
... |
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | kivy/tutorials/kivy-ux-widgets/example_001.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:23.373988 | # Basic Kivy Widgets
# https://www.pythonguis.com/tutorials/kivy-ux-widgets/
from kivy.app import App
from kivy.core.window import Window
from kivy.uix.boxlayout import BoxLayout
Window.clearcolor = (0, 0.31, 0.31, 1.0)
class ApplicationFormApp(App):
def build(self):
layout = BoxLayout()
return ... |
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | kivy/tutorials/kivy-complex-ui-widgets/example_009.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:23.375243 | from kivy.app import App
from kivy.core.window import Window
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.label import Label
from kivy.uix.vkeyboard import VKeyboard
class VKeyboardApp(App):
title = "VKeyboard Widget"
def build(self):
Window.clearcolor = (0, 0.31, 0.31, 1.0)
Window.... |
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | kivy/tutorials/kivy-ux-widgets/example_002.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:23.416674 | # Basic Kivy Widgets
# https://www.pythonguis.com/tutorials/kivy-ux-widgets/
from pathlib import Path
import kivy
from kivy.app import App
from kivy.core.window import Window
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.image import Image
Window.clearcolor = (0, 0.31, 0.31, 1.0)
class ApplicationFormApp(... |
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | kivy/tutorials/kivy-ux-widgets/example_011.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:24.521768 | # Basic Kivy Widgets
# https://www.pythonguis.com/tutorials/kivy-ux-widgets/
from kivy.app import App
from kivy.core.window import Window
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.slider import Slider
Window.clearcolor = (0, 0.31, 0.31, 1.0)
class MainApp(App):
def build(self):
vertical_sli... |
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | kivy/tutorials/kivy-ux-widgets/example_008.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:24.523195 | # Basic Kivy Widgets
# https://www.pythonguis.com/tutorials/kivy-ux-widgets/
from pathlib import Path
import kivy
from kivy.app import App
from kivy.core.window import Window
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.button import Button # <-- update
from kivy.uix.checkbox import CheckBox
from kivy.uix.... |
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | kivy/tutorials/kivy-ux-widgets/example_006.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:24.524232 | # Basic Kivy Widgets
# https://www.pythonguis.com/tutorials/kivy-ux-widgets/
from pathlib import Path
import kivy
from kivy.app import App
from kivy.core.window import Window
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.checkbox import CheckBox
from kivy.uix.image import Image
from kivy.uix.label import Lab... |
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | kivy/tutorials/kivy-ux-widgets/example_007.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:24.525739 | # Basic Kivy Widgets
# https://www.pythonguis.com/tutorials/kivy-ux-widgets/
from pathlib import Path
import kivy
from kivy.app import App
from kivy.core.window import Window
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.checkbox import CheckBox
from kivy.uix.image import Image
from kivy.uix.label import Lab... |
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | kivy/tutorials/kivy-ux-widgets/example_003.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:24.726495 | # Basic Kivy Widgets
# https://www.pythonguis.com/tutorials/kivy-ux-widgets/
from pathlib import Path
import kivy
from kivy.app import App
from kivy.core.window import Window
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.image import Image
from kivy.uix.label import Label # <-- update
YELLOW = (1, 1, 0, 1)... |
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | kivy/tutorials/kivy-ux-widgets/example_004.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:24.727886 | # Basic Kivy Widgets
# https://www.pythonguis.com/tutorials/kivy-ux-widgets/
from pathlib import Path
import kivy
from kivy.app import App
from kivy.core.window import Window
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.image import Image
from kivy.uix.label import Label
from kivy.uix.textinput import TextI... |
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | kivy/tutorials/kivy-ux-widgets/example_005.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:24.729249 | # Basic Kivy Widgets
# https://www.pythonguis.com/tutorials/kivy-ux-widgets/
from pathlib import Path
import kivy
from kivy.app import App
from kivy.core.window import Window
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.checkbox import CheckBox # <-- update
from kivy.uix.image import Image
from kivy.uix.la... |
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | kivy/tutorials/kivy-ux-widgets/example_010.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:25.579606 | # Basic Kivy Widgets
# https://www.pythonguis.com/tutorials/kivy-ux-widgets/
from kivy.app import App
from kivy.uix.video import Video
class MainApp(App):
def build(self):
player = Video(source="sample-video.mp4", state="play")
return player
MainApp().run()
|
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | nicegui/tutorials/getting-started-nicegui/example_001.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:25.580898 | # Getting Started With NiceGUI for Web UI Development in Python
# https://www.pythonguis.com/tutorials/getting-started-nicegui/
from nicegui import ui
ui.label("Hello, World!").classes("text-h1")
ui.run()
|
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | nicegui/tutorials/getting-started-nicegui/example_002.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:25.763208 | # Getting Started With NiceGUI for Web UI Development in Python
# https://www.pythonguis.com/tutorials/getting-started-nicegui/
from nicegui import ui
# Text elements
ui.label("Label")
ui.link("PythonGUIs", "https://pythonguis.com")
ui.chat_message("Hello, World!", name="PythonGUIs Chatbot")
ui.markdown(
"""
... |
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | nicegui/tutorials/getting-started-nicegui/example_004.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:25.957363 | # Getting Started With NiceGUI for Web UI Development in Python
# https://www.pythonguis.com/tutorials/getting-started-nicegui/
from matplotlib import pyplot as plt
from nicegui import ui
# Data elements
time = [1, 2, 3, 4, 5, 6]
temperature = [30, 32, 34, 32, 33, 31]
columns = [
{
"name": "time",
... |
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | kivy/tutorials/kivy-ux-widgets/example_009.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:25.996935 | # Basic Kivy Widgets
# https://www.pythonguis.com/tutorials/kivy-ux-widgets/
from pathlib import Path
import kivy
from kivy.app import App
from kivy.core.window import Window
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.button import Button
from kivy.uix.checkbox import CheckBox
from kivy.uix.image import I... |
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | pyqt5/demos/browser/main.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:26.196339 | import os
import sys
from PyQt5.QtCore import QSize, Qt, QUrl
from PyQt5.QtGui import QIcon, QKeySequence, QPixmap
from PyQt5.QtPrintSupport import QPrintPreviewDialog
from PyQt5.QtWebEngineWidgets import QWebEngineView
from PyQt5.QtWidgets import (
QAction,
QApplication,
QDialog,
QDialogButtonBox,
... |
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | pyqt5/demos/browser/main_new_windows.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:26.230347 | import os
import sys
from PyQt5.QtCore import QSize, Qt, QUrl
from PyQt5.QtGui import QIcon, QPixmap
from PyQt5.QtPrintSupport import QPrintPreviewDialog
from PyQt5.QtWebEngineWidgets import QWebEnginePage, QWebEngineView
from PyQt5.QtWidgets import (
QAction,
QApplication,
QDialog,
QDialogButtonBox,
... |
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | pyqt5/demos/browser/main_one_new_window.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:26.369033 | import os
import sys
from PyQt5.QtCore import QSize, Qt, QUrl
from PyQt5.QtGui import QIcon, QPixmap
from PyQt5.QtPrintSupport import QPrintPreviewDialog
from PyQt5.QtWebEngineWidgets import QWebEnginePage, QWebEngineView
from PyQt5.QtWidgets import (
QAction,
QApplication,
QDialog,
QDialogButtonBox,
... |
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | nicegui/tutorials/getting-started-nicegui/example_007.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:26.448075 | # Getting Started With NiceGUI for Web UI Development in Python
# https://www.pythonguis.com/tutorials/getting-started-nicegui/
from nicegui import ui
def on_button_click():
ui.notify("Button was clicked!")
def on_checkbox_change(event):
state = "checked" if event.value else "unchecked"
ui.notify(f"Che... |
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | nicegui/tutorials/getting-started-nicegui/example_005.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:26.492145 | # Getting Started With NiceGUI for Web UI Development in Python
# https://www.pythonguis.com/tutorials/getting-started-nicegui/
from nicegui import ui
with ui.image("./otje.jpg"):
ui.label("Otje the cat!").classes("absolute-bottom text-subtitle2 text-center")
ui.run(title="NiceGUI Audiovisual Elements")
|
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | nicegui/tutorials/getting-started-nicegui/example_006.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:26.542376 | # Getting Started With NiceGUI for Web UI Development in Python
# https://www.pythonguis.com/tutorials/getting-started-nicegui/
from nicegui import ui
with ui.card().classes("w-full max-w-3xl mx-auto shadow-lg"):
ui.label("Profile Page").classes("text-xl font-bold")
with ui.row().classes("w-full"):
w... |
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | nicegui/tutorials/getting-started-nicegui/example_008.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:26.560626 | # Getting Started With NiceGUI for Web UI Development in Python
# https://www.pythonguis.com/tutorials/getting-started-nicegui/
from nicegui import ui
def on_click(event):
ui.notify("Button was clicked!")
def on_hover(event):
ui.notify("Button was hovered!")
button = ui.button("Button")
button.on("click"... |
pythonguis/pythonguis-examples | https://github.com/pythonguis/pythonguis-examples | null | null | null | null | 4,565 | null | null | mit | null | null | null | null | null | null | null | nicegui/tutorials/getting-started-nicegui/example_003.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:27.698703 | # Getting Started With NiceGUI for Web UI Development in Python
# https://www.pythonguis.com/tutorials/getting-started-nicegui/
from nicegui import ui
# Control elements
ui.button("Button")
with ui.dropdown_button("Edit", icon="edit", auto_close=True):
ui.item("Copy")
ui.item("Paste")
ui.item("Cut")
ui.... |
audreyfeldroy/cookiecutter-pypackage | https://github.com/audreyfeldroy/cookiecutter-pypackage | null | null | null | null | 4,564 | null | null | mit | null | null | null | null | null | null | null | tests/test_readme_author.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:30.567468 | """Tests for README author attribution rendering."""
def test_readme_created_by_without_website(cookies):
"""With no author_website, name links to GitHub profile."""
result = cookies.bake(
extra_context={
"package_name": "attr-test",
"full_name": "Audrey M. Roy Greenfeld",
... |
audreyfeldroy/cookiecutter-pypackage | https://github.com/audreyfeldroy/cookiecutter-pypackage | null | null | null | null | 4,564 | null | null | mit | null | null | null | null | null | null | null | src/cookiecutter_pypackage/cli.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:30.570183 | """CLI for cookiecutter-pypackage.
Usage:
uvx cookiecutter-pypackage
uvx cookiecutter-pypackage --no-input
uvx cookiecutter-pypackage -o /path/to/output
uvx cookiecutter-pypackage full_name="Audrey M. Roy Greenfeld" github_username=audreyfeldroy
uvx cookiecutter-pypackage --no-input full_name="Audr... |
audreyfeldroy/cookiecutter-pypackage | https://github.com/audreyfeldroy/cookiecutter-pypackage | null | null | null | null | 4,564 | null | null | mit | null | null | null | null | null | null | null | dev.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:30.571476 | """
Cookiecutter PyPackage Development Watcher
This script watches for changes in the template directory and
automatically regenerates python_boilerplate/ when changes are detected.
Usage:
1. Run this script from the cookiecutter-pypackage repo root directory
2. Make changes to files in {{cookiecutter.package... |
audreyfeldroy/cookiecutter-pypackage | https://github.com/audreyfeldroy/cookiecutter-pypackage | null | null | null | null | 4,564 | null | null | mit | null | null | null | null | null | null | null | tests/test_bake_project.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:30.573300 | import datetime
import shlex
import subprocess
import sys
import pytest
def run_inside_dir(command, dirpath):
"""Run a command from inside a given directory, raising on non-zero exit."""
return subprocess.check_call(shlex.split(command), cwd=dirpath)
def check_output_inside_dir(command, dirpath):
"""Ru... |
audreyfeldroy/cookiecutter-pypackage | https://github.com/audreyfeldroy/cookiecutter-pypackage | null | null | null | null | 4,564 | null | null | mit | null | null | null | null | null | null | null | hooks/post_gen_project.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:30.574383 | #!/usr/bin/env python
"""Post-generation hooks for cookiecutter-pypackage."""
import os
import shutil
import subprocess
OWNER = "{{ cookiecutter.github_repo_owner }}"
REPO = "{{ cookiecutter.package_name }}"
def create_github_repo():
"""Create the GitHub repo so subsequent setup steps can configure it.
Ask... |
audreyfeldroy/cookiecutter-pypackage | https://github.com/audreyfeldroy/cookiecutter-pypackage | null | null | null | null | 4,564 | null | null | mit | null | null | null | null | null | null | null | hooks/pre_gen_project.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:30.576061 | import re
import sys
MODULE_REGEX = r"^[_a-zA-Z][_a-zA-Z0-9]+$"
module_name = "{{ cookiecutter.import_name}}"
if not re.match(MODULE_REGEX, module_name):
print(
f"ERROR: The project slug ({module_name}) is not a valid Python module name. "
"Please do not use a - and use _ instead"
)
# Exi... |
audreyfeldroy/cookiecutter-pypackage | https://github.com/audreyfeldroy/cookiecutter-pypackage | null | null | null | null | 4,564 | null | null | mit | null | null | null | null | null | null | null | tests/test_cli.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:30.576689 | """Tests for extra_context argument forwarding.
These tests verify that extra_context values are properly forwarded
and applied when generating projects. The CLI feature allows passing
these as key=value arguments.
"""
def test_extra_context_single_value(cookies):
"""Test that a single extra_context value overri... |
audreyfeldroy/cookiecutter-pypackage | https://github.com/audreyfeldroy/cookiecutter-pypackage | null | null | null | null | 4,564 | null | null | mit | null | null | null | null | null | null | null | scripts/release.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:30.577135 | # /// script
# requires-python = ">=3.10"
# ///
"""Tag the current version and create a GitHub release."""
import subprocess
import tomllib
from pathlib import Path
def _run(*cmd: str) -> None:
print(f"$ {' '.join(cmd)}") # noqa: T201
subprocess.run(cmd, check=True)
def main() -> None:
pyproject = tom... |
audreyfeldroy/cookiecutter-pypackage | https://github.com/audreyfeldroy/cookiecutter-pypackage | null | null | null | null | 4,564 | null | null | mit | null | null | null | null | null | null | null | {{cookiecutter.package_name}}/src/{{cookiecutter.import_name}}/cli.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:31.766957 | """Console script for {{cookiecutter.import_name}}."""
import typer
from rich.console import Console
from {{cookiecutter.import_name}} import utils
app = typer.Typer()
console = Console()
@app.command()
def main() -> None:
"""Console script for {{cookiecutter.import_name}}."""
console.print("Replace this m... |
audreyfeldroy/cookiecutter-pypackage | https://github.com/audreyfeldroy/cookiecutter-pypackage | null | null | null | null | 4,564 | null | null | mit | null | null | null | null | null | null | null | {{cookiecutter.package_name}}/scripts/release.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:31.776974 | # /// script
# requires-python = ">=3.10"
# ///
"""Tag the current version and create a GitHub release."""
import subprocess
import tomllib
from pathlib import Path
def _run(*cmd: str) -> None:
print(f"$ {' '.join(cmd)}") # noqa: T201
subprocess.run(cmd, check=True)
def main() -> None:
pyproject = tom... |
audreyfeldroy/cookiecutter-pypackage | https://github.com/audreyfeldroy/cookiecutter-pypackage | null | null | null | null | 4,564 | null | null | mit | null | null | null | null | null | null | null | {{cookiecutter.package_name}}/tests/test_{{cookiecutter.import_name}}.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:31.806050 | """Tests for `{{ cookiecutter.import_name }}` package."""
import {{ cookiecutter.import_name }}
def test_import():
"""Verify the package can be imported."""
assert {{ cookiecutter.import_name }}
|
has2k1/plotnine | https://github.com/has2k1/plotnine | null | null | null | null | 4,557 | null | null | mit | null | null | null | null | null | null | null | doc/images/readme_images.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:34.553852 | from plotnine import (
aes,
facet_wrap,
geom_point,
ggplot,
stat_smooth,
theme,
theme_tufte,
theme_xkcd,
)
from plotnine.data import mtcars
p1 = (
ggplot(mtcars, aes("wt", "mpg"))
+ geom_point()
+ theme(figure_size=(6, 4), dpi=300)
)
p1.save("readme-image-1.png")
p2 = p1 + ... |
has2k1/plotnine | https://github.com/has2k1/plotnine | null | null | null | null | 4,557 | null | null | mit | null | null | null | null | null | null | null | doc/_config.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:34.572145 | """
This script is run by the Makefile before quarto_build
"""
import re
from importlib.metadata import version as get_version
from pathlib import Path
DOC_DIR = Path(__file__).parent
EXAMPLES_DIR = DOC_DIR / "reference" / "examples"
TUTORIALS_DIR = DOC_DIR / "tutorials"
# The variables file holds the version
variab... |
has2k1/plotnine | https://github.com/has2k1/plotnine | null | null | null | null | 4,557 | null | null | mit | null | null | null | null | null | null | null | .github/utils/please.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:34.578303 | import os
import sys
from pathlib import Path
from typing import Callable, TypeAlias
from _repo import Git
Ask: TypeAlias = Callable[[], bool | str]
Do: TypeAlias = Callable[[], str]
gh_output_file = os.environ.get("GITHUB_OUTPUT")
def set_deploy_to():
"""
Write where to deploy to deploy_on in the GITHUB_O... |
has2k1/plotnine | https://github.com/has2k1/plotnine | null | null | null | null | 4,557 | null | null | mit | null | null | null | null | null | null | null | .github/utils/_repo.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:34.581821 | #!/usr/bin/env python
from __future__ import annotations
import os
import re
import shlex
from subprocess import PIPE, Popen
from typing import Literal, Sequence, TypeAlias
ReleaseType: TypeAlias = Literal[
"alpha",
"beta",
"candidate",
"development",
"stable",
]
pre_release_lookup: dict[str, Rel... |
has2k1/plotnine | https://github.com/has2k1/plotnine | null | null | null | null | 4,557 | null | null | mit | null | null | null | null | null | null | null | plotnine/_mpl/gridspec.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:34.582707 | from __future__ import annotations
from typing import TYPE_CHECKING, cast
try:
from matplotlib.gridspec import GridSpecBase, SubplotParams
except ImportError:
# MPL 3.8
from matplotlib.figure import SubplotParams
from matplotlib.gridspec import GridSpecBase
from matplotlib.gridspec import SubplotSpec... |
has2k1/plotnine | https://github.com/has2k1/plotnine | null | null | null | null | 4,557 | null | null | mit | null | null | null | null | null | null | null | plotnine/_mpl/layout_manager/_composition_layout_items.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:34.585440 | from __future__ import annotations
from typing import TYPE_CHECKING
from matplotlib.text import Text
from plotnine._mpl.utils import ArtistGeometry
if TYPE_CHECKING:
from typing import Any
from matplotlib.lines import Line2D
from matplotlib.patches import Rectangle
from plotnine.composition._compo... |
has2k1/plotnine | https://github.com/has2k1/plotnine | null | null | null | null | 4,557 | null | null | mit | null | null | null | null | null | null | null | doc/_renderer.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:34.640359 | from __future__ import annotations
import re
from functools import cached_property
from pathlib import Path
from textwrap import dedent
from typing import TYPE_CHECKING
from qrenderer import (
QRenderer,
RenderDoc,
RenderDocClass,
exclude_parameters,
)
from qrenderer._pandoc.inlines import shortcode
f... |
has2k1/plotnine | https://github.com/has2k1/plotnine | null | null | null | null | 4,557 | null | null | mit | null | null | null | null | null | null | null | plotnine/_mpl/layout_manager/_composition_side_space.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:35.201263 | from __future__ import annotations
from typing import TYPE_CHECKING
from plotnine._mpl.layout_manager._layout_tree import LayoutTree
from plotnine._mpl.layout_manager._plot_side_space import PlotSideSpaces
from ._composition_layout_items import CompositionLayoutItems
from ._side_space import GridSpecParams, _side_sp... |
has2k1/plotnine | https://github.com/has2k1/plotnine | null | null | null | null | 4,557 | null | null | mit | null | null | null | null | null | null | null | plotnine/_mpl/layout_manager/_grid.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:35.201773 | from collections.abc import Iterator
from dataclasses import InitVar, dataclass
from typing import (
Generic,
Literal,
Sequence,
TypeVar,
overload,
)
import numpy as np
T = TypeVar("T")
@dataclass
class Grid(Generic[T]):
nrow: InitVar[int]
ncol: InitVar[int]
items: InitVar[Sequence[T... |
has2k1/plotnine | https://github.com/has2k1/plotnine | null | null | null | null | 4,557 | null | null | mit | null | null | null | null | null | null | null | plotnine/_mpl/layout_manager/_side_space.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:35.205337 | """
Routines to adjust subplot params so that subplots are
nicely fit in the figure. In doing so, only axis labels, tick labels, axes
titles and offsetboxes that are anchored to axes are currently considered.
Internally, this module assumes that the margins (left margin, etc.) which are
differences between `Axes.get_t... |
has2k1/plotnine | https://github.com/has2k1/plotnine | null | null | null | null | 4,557 | null | null | mit | null | null | null | null | null | null | null | plotnine/_mpl/layout_manager/_layout_tree.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:35.206665 | from __future__ import annotations
from dataclasses import dataclass, field
from functools import cached_property
from typing import TYPE_CHECKING, Iterator, cast
import numpy as np
from ._grid import Grid
from ._plot_side_space import PlotSideSpaces
if TYPE_CHECKING:
from typing import Any, Callable, Literal, ... |
has2k1/plotnine | https://github.com/has2k1/plotnine | null | null | null | null | 4,557 | null | null | mit | null | null | null | null | null | null | null | plotnine/_mpl/offsetbox.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:35.213613 | from __future__ import annotations
from matplotlib.offsetbox import (
AnchoredOffsetbox,
AuxTransformBox,
DrawingArea,
)
from matplotlib.patches import bbox_artist as mbbox_artist
from matplotlib.transforms import Affine2D, Bbox
from .patches import InsideStrokedRectangle
DEBUG = False
# for debugging ... |
has2k1/plotnine | https://github.com/has2k1/plotnine | null | null | null | null | 4,557 | null | null | mit | null | null | null | null | null | null | null | plotnine/_mpl/layout_manager/_plot_layout_items.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:35.214124 | from __future__ import annotations
from itertools import chain
from typing import TYPE_CHECKING
from matplotlib.text import Text
from plotnine._mpl.patches import StripTextPatch
from plotnine.exceptions import PlotnineError
from ..utils import (
ArtistGeometry,
TextJustifier,
get_subplotspecs,
rel_p... |
has2k1/plotnine | https://github.com/has2k1/plotnine | null | null | null | null | 4,557 | null | null | mit | null | null | null | null | null | null | null | plotnine/_mpl/patches.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:35.220240 | from __future__ import annotations
from typing import TYPE_CHECKING
from matplotlib import artist
from matplotlib.patches import FancyBboxPatch, Rectangle
from matplotlib.transforms import Bbox
from plotnine._mpl.utils import rel_position
if TYPE_CHECKING:
from plotnine.typing import StripPosition
from .te... |
has2k1/plotnine | https://github.com/has2k1/plotnine | null | null | null | null | 4,557 | null | null | mit | null | null | null | null | null | null | null | plotnine/_mpl/layout_manager/_engine.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:35.224688 | from __future__ import annotations
from typing import TYPE_CHECKING
from matplotlib.layout_engine import LayoutEngine
from ._composition_side_space import CompositionSideSpaces
from ._plot_side_space import PlotSideSpaces
if TYPE_CHECKING:
from matplotlib.figure import Figure
from plotnine import ggplot
... |
has2k1/plotnine | https://github.com/has2k1/plotnine | null | null | null | null | 4,557 | null | null | mit | null | null | null | null | null | null | null | plotnine/_mpl/layout_manager/_plot_side_space.py | null | null | null | null | null | null | Python | 2026-05-04T01:58:35.226836 | """
Routines to adjust subplot params so that subplots are
nicely fit in the figure. In doing so, only axis labels, tick labels, axes
titles and offsetboxes that are anchored to axes are currently considered.
Internally, this module assumes that the margins (left margin, etc.) which are
differences between `Axes.get_t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.