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 webbrowser | |
from functools import cache | |
import numpy as np | |
import numpy.linalg as lin | |
from geopy.geocoders import Nominatim | |
@cache |
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 kivy.app import App | |
from kivy.lang import Builder | |
from kivy.clock import Clock | |
from kivy import properties as P | |
KV = ''' | |
#:import chain itertools.chain | |
#:import sin math.sin | |
#:import pi math.pi |
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
function! ShowWindowNumbers() | |
for i in range(1, winnr('$')) | |
" Get the buffer and window associated with this number | |
let bufnr = winbufnr(i) | |
let winid = win_getid(i) | |
let figlet_output = system('figlet -f small ' . i ) | |
let popup_content = split(figlet_output, "\n") | |
let popup_height = 5 | |
let popup_width = 8 | |
let row = win_screenpos(i)[0] + (winheight(i) - popup_height) / 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
from kivy.app import App | |
from kivy.factory import Factory as F | |
from kivy.core.window import Window as W | |
class CrossHairCursorApp(App): | |
def build(self): | |
root = F.Widget() | |
with root.canvas.after: | |
self.v_line = F.Line(points=[]) |
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 datetime import datetime | |
from kivy.app import App | |
from kivy.lang import Builder | |
from kivy import properties as P | |
from kivy.clock import Clock | |
KV = ''' |
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 kivy.app import App | |
from kivy.lang import Builder | |
KV = ''' | |
<BorderBoxLayout@BoxLayout,BorderGridLayout@GridLayout,CanvasButton@Label+ButtonBehavior,BorderLabel@Label>: | |
border_width: 1 | |
canvas.before: | |
Line: | |
rectangle: self.pos + self.size |
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 kivy.lang import Builder | |
from kivy.app import App | |
from kivy.properties import ListProperty, NumericProperty | |
KV = ''' | |
#:import RGBA kivy.utils.rgba | |
<Row@BoxLayout>: | |
text: '' | |
rv_key: 0 |
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 kivy.app import App | |
from kivy.lang.builder import Builder | |
from kivy.uix.scatterlayout import ScatterLayout | |
from kivy.uix.image import AsyncImage | |
from kivy.properties import NumericProperty, ListProperty, StringProperty | |
from kivy.core.window import Window | |
from kivy.clock import Clock | |
from kivy.vector import Vector | |
from kivy.graphics.transformation import Matrix | |
from kivy import platform |
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 kivy.clock import Clock | |
from kivy.app import App | |
from kivy.animation import Animation | |
from kivy.uix.widget import Widget | |
from kivy.uix.floatlayout import FloatLayout | |
from kivy.lang import Builder | |
from kivy.core.window import Window | |
from kivy.graphics import RenderContext | |
from kivy.uix.modalview import ModalView | |
from kivy.properties import ListProperty, NumericProperty, ObjectProperty, ColorProperty |
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 random import choice | |
from decimal import Decimal | |
stats = [0] * 100 | |
def advance(n, f): | |
return n * (1+f) | |
def backoff(n, f): |
NewerOlder