id int64 0 458k | file_name stringlengths 4 119 | file_path stringlengths 14 227 | content stringlengths 24 9.96M | size int64 24 9.96M | language stringclasses 1
value | extension stringclasses 14
values | total_lines int64 1 219k | avg_line_length float64 2.52 4.63M | max_line_length int64 5 9.91M | alphanum_fraction float64 0 1 | repo_name stringlengths 7 101 | repo_stars int64 100 139k | repo_forks int64 0 26.4k | repo_open_issues int64 0 2.27k | repo_license stringclasses 12
values | repo_extraction_date stringclasses 433
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2,288,300 | attaches.js | Nigel2392_wagtail_editorjs/wagtail_editorjs/static/wagtail_editorjs/js/tools/attaches.js | class CSRFAttachesTool extends window.AttachesTool {
constructor({ data, config, api, readOnly }) {
config['additionalRequestHeaders'] = {
'X-CSRFToken': document.querySelector('input[name="csrfmiddlewaretoken"]').value
};
super({ data, config, api, readOnly });
}
}
window.C... | 355 | Python | .tac | 9 | 33.555556 | 92 | 0.682081 | Nigel2392/wagtail_editorjs | 8 | 0 | 3 | GPL-2.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,301 | attaches.js | Nigel2392_wagtail_editorjs/wagtail_editorjs/static/wagtail_editorjs/vendor/editorjs/tools/attaches.js | /**
* Skipped minification because the original files appears to be already minified.
* Original file: /npm/@editorjs/[email protected]/dist/bundle.js
*
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
*/
!function(e,t){"object"==typeof exports... | 34,797 | Python | .tac | 7 | 4,968.857143 | 34,512 | 0.689568 | Nigel2392/wagtail_editorjs | 8 | 0 | 3 | GPL-2.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,302 | entity-builder.py | pdxlocations_meshtastic-ha-entity-builder/entity-builder.py | from meshtastic.serial_interface import SerialInterface
from meshtastic.tcp_interface import TCPInterface
from meshtastic.ble_interface import BLEInterface
import argparse
import sys
### Add arguments to parse
parser = argparse.ArgumentParser(
add_help=False,
epilog="If no connection arguments are spe... | 17,607 | Python | .py | 490 | 30.34898 | 307 | 0.618082 | pdxlocations/meshtastic-ha-entity-builder | 8 | 3 | 1 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,303 | deleteAllRedirects.py | nightscout_trio-docs/utils/deleteAllRedirects.py | import requests
import json
import time
import sys
import re
PROJECT = 'androidaps'
URL = 'https://readthedocs.org/api/v3/projects/' + PROJECT + '/redirects/'
TOKEN = len(sys.argv) == 2 and sys.argv[1]
HEADERS = {'Authorization': f'token {TOKEN}'}
def delItem (url) :
delResponse = requests.delete(url,... | 1,776 | Python | .py | 52 | 26.903846 | 75 | 0.596963 | nightscout/trio-docs | 8 | 11 | 6 | AGPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,304 | importRedirects.py | nightscout_trio-docs/utils/importRedirects.py | import requests
import json
import time
import sys
import re
PROJECT = 'androidaps'
URL = 'https://readthedocs.org/api/v3/projects/' + PROJECT + '/redirects/'
TOKEN = len(sys.argv) == 2 and sys.argv[1]
HEADERS = {'Authorization': f'token {TOKEN}'}
FILE = 'redirect.json'
def create(redirect, index) :
... | 1,473 | Python | .py | 41 | 28.585366 | 109 | 0.600563 | nightscout/trio-docs | 8 | 11 | 6 | AGPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,305 | generateRedirects.py | nightscout_trio-docs/utils/generateRedirects.py | import os
import json
FILE = 'redirect.json'
dir_path = os.path.dirname(os.path.realpath(__file__))
language_path = os.path.join(dir_path, '..\\', 'docs', 'CROWDIN') + '\\'
print('Generate redirect for al .md and .rst files in path ' + language_path)
redirects = []
class Object:
def toJSON(self):
... | 1,309 | Python | .py | 29 | 37.172414 | 85 | 0.586371 | nightscout/trio-docs | 8 | 11 | 6 | AGPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,306 | shared.conf.py | nightscout_trio-docs/docs/shared.conf.py | # -*- coding: utf-8 -*-
#
# Trio documentation build configuration file
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commente... | 12,422 | Python | .py | 307 | 39.009772 | 87 | 0.71804 | nightscout/trio-docs | 8 | 11 | 6 | AGPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,307 | conf.py | nightscout_trio-docs/docs/EN/conf.py | import os
exec (open("../shared.conf.py").read())
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
# html_logo = '../drawing.png'
# The name of an image file (relative to this directory) to use as a favicon of
# the docs. This file should be a Windows ... | 912 | Python | .py | 18 | 49.388889 | 125 | 0.748031 | nightscout/trio-docs | 8 | 11 | 6 | AGPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,308 | nfc_helper.py | CardToolz_libnfc_mitm_cffi/nfc_helper.py | #!/usr/bin/python3
import ctypes
import binascii
from hexdump import *
from typing import List, Callable, Generic, TypeVar
from enum import Enum
from dataclasses import dataclass
import dataclasses
import json
import logging
logger = logging.getLogger(__name__)
hex2str = lambda x: bytearray.fromhex(x.replace(" ", ""... | 11,427 | Python | .py | 278 | 31.44964 | 180 | 0.558167 | CardToolz/libnfc_mitm_cffi | 8 | 0 | 1 | LGPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,309 | log_parser.py | CardToolz_libnfc_mitm_cffi/log_parser.py | #!/usr/bin/python3
# from nfc_ctypes import *
# from nfc_wrapper import *
from nfc_helper import *
# from NFCReplay import *
from argparse import ArgumentParser
def main():
parser = ArgumentParser()
parser.add_argument("-f", "--filename", dest="log_fname", default=0, type=str, help="Input JSON log filename")
... | 572 | Python | .py | 16 | 32.625 | 114 | 0.67509 | CardToolz/libnfc_mitm_cffi | 8 | 0 | 1 | LGPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,310 | nfc_wrapper.py | CardToolz_libnfc_mitm_cffi/nfc_wrapper.py | #!/usr/bin/python3
# to trace shared lib calls use "ltrace --library="*libnfc*" python3 ./nfc_wrapper.py"
from libnfc_ffi.libnfc_ffi import ffi, libnfc as nfc
import nfc_helper
from hexdump import *
import time
from pprint import pprint
from inspect import getmembers
import logging
logger = logging.getLogger(__name__... | 13,994 | Python | .py | 309 | 37.333333 | 117 | 0.617171 | CardToolz/libnfc_mitm_cffi | 8 | 0 | 1 | LGPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,311 | cffi_main.py | CardToolz_libnfc_mitm_cffi/cffi_main.py | #!/usr/bin/python3
from libnfc_ffi.libnfc_ffi import ffi, libnfc as nfc
ctx = ffi.new("nfc_context**")
print("nfc_init"), nfc.nfc_init(ctx)
c = ctx[0]
conn_strings = ffi.new("nfc_connstring[10]")
d = nfc.nfc_list_devices(c, conn_strings, 10)
print("nfc_list_devices", d)
device = nfc.nfc_open(c, conn_strings[0])
pri... | 386 | Python | .py | 12 | 30.666667 | 52 | 0.718157 | CardToolz/libnfc_mitm_cffi | 8 | 0 | 1 | LGPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,312 | pn532mitm.py | CardToolz_libnfc_mitm_cffi/pn532mitm.py | #!/usr/bin/python3
#
# pn532mitm.py - NXP PN532 Man-In-The_Middle - log conversations between TAG and external reader
#
'''
IP = 172.16.0.1
pi:raspberry
Initiator must be connected to SPI
Target must be connected to UART
config file:
/etc/nfc/libnfc.conf
allow_autoscan = true
allow_intrusive_scan = false
log_level = ... | 5,330 | Python | .py | 126 | 37.087302 | 173 | 0.64682 | CardToolz/libnfc_mitm_cffi | 8 | 0 | 1 | LGPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,313 | pn532replay.py | CardToolz_libnfc_mitm_cffi/pn532replay.py | #!/usr/bin/python3
#
# pn532mitm.py - NXP PN532 Man-In-The_Middle - log conversations between TAG and external reader
#
'''
IP = 172.16.0.1
pi:raspberry
Initiator must be connected to SPI
Target must be connected to UART
config file:
/etc/nfc/libnfc.conf
allow_autoscan = true
allow_intrusive_scan = false
log_level = ... | 5,208 | Python | .py | 126 | 35.626984 | 173 | 0.637084 | CardToolz/libnfc_mitm_cffi | 8 | 0 | 1 | LGPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,314 | NFCRelay.py | CardToolz_libnfc_mitm_cffi/NFCRelay.py | # from nfc_ctypes import *
from nfc_wrapper import *
from nfc_helper import *
from libnfc_ffi.libnfc_ffi import libnfc as nfc
from time import time, sleep
from enum import Enum
import logging
logger = logging.getLogger(__name__)
hex2str = lambda x: bytearray.fromhex(x.replace(" ", ""))
apple_frame_sequence = [] # A... | 16,067 | Python | .py | 299 | 41.866221 | 173 | 0.587245 | CardToolz/libnfc_mitm_cffi | 8 | 0 | 1 | LGPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,315 | libnfc_ffi.py | CardToolz_libnfc_mitm_cffi/libnfc_ffi/libnfc_ffi.py | #!/usr/bin/python3
from cffi import FFI
ffi = FFI()
def fetch_nfc_functions(hfile):
lines = []
with open(hfile) as f:
for ln in f:
if ln.startswith("NFC_EXPORT"):
ln = ln.replace("NFC_EXPORT", "extern")
ln = ln.replace("ATTRIBUTE_NONNULL(1)", "")
... | 1,722 | Python | .py | 47 | 30.297872 | 89 | 0.620398 | CardToolz/libnfc_mitm_cffi | 8 | 0 | 1 | LGPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,316 | GUI.py | AlexSanfilippo_ProceduralMeshGeneration/GUI.py | """
started: April 19th, 2024
update: April 19th, 2024
goals:
-[V]render quad on screen
-[V]textured quad
-[V]control scale and position
-[V]transparent textures
-[V]texture atlasing
-[V]Multiple GUI Elements
-static elements.icons
-displays, ie, not buttons
-want GU... | 33,024 | Python | .py | 821 | 29.811206 | 152 | 0.575968 | AlexSanfilippo/ProceduralMeshGeneration | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,317 | SimplePhysics.py | AlexSanfilippo_ProceduralMeshGeneration/SimplePhysics.py | """
Anything physics-related that we are coding ourself (verses using a library like pybullet)
"""
from glm import vec3, normalize, vec4, dot
import logging
logger = logging.getLogger(__name__)
logging.basicConfig()
# logging.root.setLevel(logging.NOTSET)
#Ray-plane intersection
#given
# ray_origin = vec3([10.0, 1... | 1,768 | Python | .py | 43 | 36.44186 | 114 | 0.674052 | AlexSanfilippo/ProceduralMeshGeneration | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,318 | Skybox.py | AlexSanfilippo_ProceduralMeshGeneration/Skybox.py | """
17th July 2024
Following LearnOpenGL.com's tutorial on skyboxes and cubemaps
"""
from OpenGL.GL import *
from TextureLoader import load_cube_map
import numpy as np
import glm
from OpenGL.GL.shaders import compileProgram, compileShader
vertex_src = """
#version 330
layout (location = 0) in vec3 aPos;
out vec3 TexC... | 3,963 | Python | .py | 118 | 23.881356 | 103 | 0.517287 | AlexSanfilippo/ProceduralMeshGeneration | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,319 | FPSCounter.py | AlexSanfilippo_ProceduralMeshGeneration/FPSCounter.py | import glfw
class FPSCounter:
"""
calculates frames per second and seconds per frame
"""
def __init__(self, frame_interval=100.0, spf_interval=10.0, mute=True):
self.frame_interval = frame_interval
self.refresh_time = True
self.st = glfw.get_time()
self.st_spf = glfw.g... | 1,292 | Python | .py | 36 | 26.611111 | 77 | 0.5704 | AlexSanfilippo/ProceduralMeshGeneration | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,320 | ProceduralMesh.py | AlexSanfilippo_ProceduralMeshGeneration/ProceduralMesh.py | """
1st December, 2023
Classes for creation of basic proc-gen shapes. Shapes to create will be:
-[V]Triangle
-[V]Quad
-[V]Cube
-[V]Dynamic Size on cube using Dimensions [x,y,z]
-[V]Proper control over scaling, rotation, and transposition
-goal:rotating cube
-[V]hard-code normals on cube
-[V]refactor
-put dr... | 150,202 | Python | .py | 3,084 | 37.401102 | 131 | 0.586866 | AlexSanfilippo/ProceduralMeshGeneration | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,321 | MeshWorkshop.py | AlexSanfilippo_ProceduralMeshGeneration/MeshWorkshop.py | """
Main script of the spaceship generator. run this to launch the OpenGL window.
Contains high-level code pertaining creation and drawing of:
Model
GUI
Skybox
As well as OpenGL callback functions
"""
import glfw
from OpenGL.GL import *
from OpenGL.GL.shaders import compileProgram, compileShader
import pyrr
from Tex... | 52,869 | Python | .py | 1,509 | 30.404904 | 119 | 0.678685 | AlexSanfilippo/ProceduralMeshGeneration | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,322 | TextureLoader.py | AlexSanfilippo_ProceduralMeshGeneration/TextureLoader.py | from OpenGL.GL import glBindTexture, glTexParameteri, GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, \
GL_TEXTURE_WRAP_T, GL_REPEAT, GL_TEXTURE_MIN_FILTER, GL_TEXTURE_MAG_FILTER, GL_LINEAR, \
glTexImage2D, GL_RGBA, GL_UNSIGNED_BYTE, GL_NEAREST, GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_R, \
GL_CLAMP_TO_EDGE, glGenTextures, G... | 3,315 | Python | .py | 59 | 50.949153 | 135 | 0.722736 | AlexSanfilippo/ProceduralMeshGeneration | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,323 | Camera.py | AlexSanfilippo_ProceduralMeshGeneration/Camera.py | import glfw
from pyrr import Vector3, vector, vector3, matrix44
from math import sin, cos, radians, atan2, sqrt
import glm as glm
from glm import vec3
from SimplePhysics import find_intersection_ray_plane
class Camera:
def __init__(self, camera_pos=[0.0, 0.0, 1.20], yaw=0, pitch=0):
self.camera_pos = Vecto... | 10,867 | Python | .py | 221 | 39.484163 | 109 | 0.618944 | AlexSanfilippo/ProceduralMeshGeneration | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,324 | PointLightCube.py | AlexSanfilippo_ProceduralMeshGeneration/PointLightCube.py | """
7th August, 2023
Brief: A class for a cube that emits a point light
"""
import glfw
from OpenGL.GL import *
from OpenGL.GL.shaders import compileProgram, compileShader
import pyrr
import numpy as np
#Let's have it contain its own shader
vertex_src = """
# version 330
layout(location = 0) in vec3 a_pos... | 6,275 | Python | .py | 155 | 30.283871 | 105 | 0.571947 | AlexSanfilippo/ProceduralMeshGeneration | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,325 | setup.py | Mauropieroni_fastPTA/setup.py | from setuptools import setup, find_packages
from fastPTA import __author__, __version__, __url__
with open("README.md", "r") as fh:
long_description = fh.read()
with open("requirements.txt") as f:
required_packages = f.read().splitlines()
setup(
name="fastPTA",
description="Code for fast PTA foreca... | 625 | Python | .py | 19 | 28.894737 | 52 | 0.68386 | Mauropieroni/fastPTA | 8 | 0 | 3 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,326 | HD_constraints.ipynb | Mauropieroni_fastPTA/examples/HD_constraints.ipynb | {
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Start importing all libraries"
]
},
{
"cell_type": "code",
"execution_count": 76,
"metadata": {},
"outputs": [],
"source": [
"# Global\n",
"import numpy as np\n",
"import matplotlib.pyplot as plt\n... | 47,823 | Python | .py | 245 | 190.771429 | 41,670 | 0.908971 | Mauropieroni/fastPTA | 8 | 0 | 3 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,327 | strong_signal_limit.ipynb | Mauropieroni_fastPTA/examples/strong_signal_limit.ipynb | {
"cells": [
{
"cell_type": "markdown",
"id": "f5da63da",
"metadata": {},
"source": [
"### Start importing all libraries"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "e5b92ec3",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
... | 54,651 | Python | .py | 281 | 189.996441 | 47,150 | 0.90561 | Mauropieroni/fastPTA | 8 | 0 | 3 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,328 | scan_parameter.ipynb | Mauropieroni_fastPTA/examples/scan_parameter.ipynb | {
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Start importing all libraries"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"No GPU/TPU found, fal... | 45,455 | Python | .py | 251 | 176.537849 | 39,174 | 0.907002 | Mauropieroni/fastPTA | 8 | 0 | 3 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,329 | N_scaling_figure.ipynb | Mauropieroni_fastPTA/examples/N_scaling_figure.ipynb | {
"cells": [
{
"cell_type": "markdown",
"id": "3d2a5638",
"metadata": {},
"source": [
"### Start importing all libraries"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "a061b9e8",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
... | 181,178 | Python | .py | 502 | 356.310757 | 70,810 | 0.93009 | Mauropieroni/fastPTA | 8 | 0 | 3 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,330 | sqrt_basis_figure.ipynb | Mauropieroni_fastPTA/examples/sqrt_basis_figure.ipynb | {
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Start importing all libraries"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"No GPU/TPU found, fal... | 46,406 | Python | .py | 292 | 154.482877 | 39,162 | 0.896322 | Mauropieroni/fastPTA | 8 | 0 | 3 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,331 | MCMC_Fisher.ipynb | Mauropieroni_fastPTA/examples/MCMC_Fisher.ipynb | {
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Start importing all libraries"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [],
"source": [
"# Global\n",
"import numpy as np\n",
"\n",
"# Local\n",
"import... | 78,037 | Python | .py | 387 | 196.692506 | 68,078 | 0.912966 | Mauropieroni/fastPTA | 8 | 0 | 3 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,332 | linear_basis_figure.ipynb | Mauropieroni_fastPTA/examples/linear_basis_figure.ipynb | {
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Start importing all libraries"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"No GPU/TPU found, fal... | 64,891 | Python | .py | 496 | 126.290323 | 51,046 | 0.873267 | Mauropieroni/fastPTA | 8 | 0 | 3 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,333 | examples_utils.py | Mauropieroni_fastPTA/examples/examples_utils.py | # Global
import os
# Local
import fastPTA.utils as ut
# Creates some folders you need to store data/plots
for k in [
"pulsar_configurations",
"generated_data",
"generated_chains",
"plots",
]:
if not os.path.exists(k):
os.makedirs(k)
path_to_file = os.path.dirname(__file__)
path_to_puls... | 804 | Python | .py | 27 | 26.962963 | 80 | 0.746094 | Mauropieroni/fastPTA | 8 | 0 | 3 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,334 | T_scaling_figure.ipynb | Mauropieroni_fastPTA/examples/T_scaling_figure.ipynb | {
"cells": [
{
"cell_type": "markdown",
"id": "3d2a5638",
"metadata": {},
"source": [
"### Start importing all libraries"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "a061b9e8",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
... | 116,712 | Python | .py | 456 | 251.368421 | 60,294 | 0.917449 | Mauropieroni/fastPTA | 8 | 0 | 3 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,335 | signals.py | Mauropieroni_fastPTA/fastPTA/signals.py | # Global
import jax
import jax.numpy as jnp
# Local
import fastPTA.utils as ut
jax.config.update("jax_enable_x64", True)
# If you want to use your GPU change here
jax.config.update("jax_default_device", jax.devices("cpu")[0])
# Current SMBBH SGWB log_amplitude best-fit
SMBBH_log_amplitude = -7.1995
SMBBH_tilt = 2... | 14,264 | Python | .py | 413 | 27.784504 | 79 | 0.631709 | Mauropieroni/fastPTA | 8 | 0 | 3 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,336 | MCMC_code.py | Mauropieroni_fastPTA/fastPTA/MCMC_code.py | # Global
import time
import numpy as np
import emcee
import jax
import jax.numpy as jnp
# Local
import fastPTA.utils as ut
from fastPTA.signals import SMBBH_parameters, get_model
from fastPTA.get_tensors import get_tensors
jax.config.update("jax_enable_x64", True)
jax.config.update("jax_default_device", jax.devices(... | 23,238 | Python | .py | 648 | 29.182099 | 80 | 0.666221 | Mauropieroni/fastPTA | 8 | 0 | 3 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,337 | Fisher_code.py | Mauropieroni_fastPTA/fastPTA/Fisher_code.py | # Global
import jax
import jax.numpy as jnp
# Local
import fastPTA.utils as ut
from fastPTA.signals import SMBBH_parameters, get_model
from fastPTA.get_tensors import get_tensors
# Set some global parameters for jax
jax.config.update("jax_enable_x64", True)
jax.config.update("jax_default_device", jax.devices(ut.which... | 21,058 | Python | .py | 490 | 36.381633 | 80 | 0.687814 | Mauropieroni/fastPTA | 8 | 0 | 3 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,338 | get_tensors.py | Mauropieroni_fastPTA/fastPTA/get_tensors.py | # Global
import numpy as np
import healpy as hp
import pandas as pd
import jax
import jax.numpy as jnp
from scipy.special import legendre
from scipy.integrate import simpson
# Local
import fastPTA.utils as ut
from fastPTA.generate_new_pulsar_configuration import generate_pulsars_catalog
jax.config.update("jax_enab... | 40,944 | Python | .py | 948 | 36.905063 | 148 | 0.672704 | Mauropieroni/fastPTA | 8 | 0 | 3 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,339 | utils.py | Mauropieroni_fastPTA/fastPTA/utils.py | # Global
import os
import yaml
import numpy as np
import healpy as hp
from wigners import clebsch_gordan
import jax
import jax.numpy as jnp
from scipy.special import sph_harm
jax.config.update("jax_enable_x64", True)
# If you want to use your GPU change here
which_device = "cpu"
jax.config.update("jax_default_dev... | 24,880 | Python | .py | 621 | 33.028986 | 84 | 0.639474 | Mauropieroni/fastPTA | 8 | 0 | 3 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,340 | __init__.py | Mauropieroni_fastPTA/fastPTA/__init__.py | __author__ = "Mauro Pieroni"
__version__ = "0.1"
__year__ = "2024"
__url__ = "https://github.com/Mauropieroni/fastPTA"
| 119 | Python | .py | 4 | 28.75 | 51 | 0.617391 | Mauropieroni/fastPTA | 8 | 0 | 3 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,341 | plotting_functions.py | Mauropieroni_fastPTA/fastPTA/plotting_functions.py | # Global
import corner
import matplotlib
import matplotlib.patches
import matplotlib.pyplot as plt
import numpy as np
from scipy.special import legendre
from fastPTA import get_tensors as gt
# Setting plotting parameters
matplotlib.rcParams["text.usetex"] = True
plt.rc("xtick", labelsize=20)
plt.rc("ytick", labels... | 5,573 | Python | .py | 170 | 24.594118 | 80 | 0.548183 | Mauropieroni/fastPTA | 8 | 0 | 3 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,342 | generate_new_pulsar_configuration.py | Mauropieroni_fastPTA/fastPTA/generate_new_pulsar_configuration.py | # Global
import numpy as np
import pandas as pd
# Local
from fastPTA.utils import (
default_pulsar_parameters,
path_to_default_NANOGrav_positions,
)
def generate_parameter(n_pulsars, parameter_dict):
"""
Generate the parameters for a given number of pulsars based on specified
info in parameter_di... | 8,644 | Python | .py | 207 | 33.917874 | 79 | 0.650994 | Mauropieroni/fastPTA | 8 | 0 | 3 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,343 | test_catalog_generator.py | Mauropieroni_fastPTA/tests/test_catalog_generator.py | # Global
import unittest
import numpy as np
from scipy.stats import kstest
from scipy import stats as scipy_stats
# Local
import utils as tu
from fastPTA.generate_new_pulsar_configuration import generate_pulsars_catalog
@tu.not_a_test
def test_generation(parameter, n_pulsars, pulsar_dictionary):
test_dictiona... | 3,110 | Python | .py | 80 | 30.7625 | 113 | 0.614948 | Mauropieroni/fastPTA | 8 | 0 | 3 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,344 | test_utils.py | Mauropieroni_fastPTA/tests/test_utils.py | # Global
import unittest
import numpy as np
import healpy as hp
from scipy.special import sph_harm
# Local
import utils as tu
from fastPTA import utils as ut
nside = 64
npix = hp.nside2npix(nside)
theta, phi = hp.pix2ang(nside, np.arange(npix))
class TestGetTensors(unittest.TestCase):
def test_get_sort_index... | 4,410 | Python | .py | 105 | 30.714286 | 144 | 0.538101 | Mauropieroni/fastPTA | 8 | 0 | 3 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,345 | utils.py | Mauropieroni_fastPTA/tests/utils.py | import os
import numpy as np
from fastPTA.utils import load_yaml
test_data_path = os.path.join(os.path.dirname(__file__), "test_data/")
# Default parameters for the pulsars
EPTAlike_test = load_yaml(test_data_path + "/EPTAlike_pulsar_parameters.yaml")
EPTAlike_noiseless_test = load_yaml(
test_data_path + "/EPTAl... | 1,881 | Python | .py | 49 | 35.489796 | 80 | 0.683892 | Mauropieroni/fastPTA | 8 | 0 | 3 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,346 | test_get_tensors.py | Mauropieroni_fastPTA/tests/test_get_tensors.py | # Global
import unittest
import numpy as np
import healpy as hp
from scipy.special import sph_harm
import jax
import jax.numpy as jnp
# Local
import utils as tu
from fastPTA import utils as ut
from fastPTA import get_tensors as gt
jax.config.update("jax_enable_x64", True)
jax.config.update("jax_default_device", jax... | 10,455 | Python | .py | 260 | 31.311538 | 133 | 0.596894 | Mauropieroni/fastPTA | 8 | 0 | 3 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,347 | test_compute_Fisher.py | Mauropieroni_fastPTA/tests/test_compute_Fisher.py | # Global
import unittest
import numpy as np
import jax
import jax.numpy as jnp
# Local
import utils as tu
import fastPTA.utils as ut
from fastPTA import Fisher_code as Fc
jax.config.update("jax_enable_x64", True)
jax.config.update("jax_default_device", jax.devices(ut.which_device)[0])
n_frequencies = 35
data = np... | 3,851 | Python | .py | 105 | 27.733333 | 101 | 0.583423 | Mauropieroni/fastPTA | 8 | 0 | 3 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,348 | gen_widget_doc.py | zimolab_PyGUIAdapter/tools/gen_widget_doc.py | from __future__ import annotations
import dataclasses
import inspect
import os.path
from typing import Type, Tuple, List, Literal
import jinja2
from markdown_table_generator import generate_markdown, table_from_string_list
import pyguiadapter.utils.messagebox
from pyguiadapter import widgets, utils
from pyguiadapter... | 8,854 | Python | .py | 208 | 35.413462 | 97 | 0.645304 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,349 | make_table.py | zimolab_PyGUIAdapter/tools/make_table.py | from tools.gen_widget_doc import dataclass2table
from pyguiadapter.windows.fnselect import FnSelectWindowConfig
from pyguiadapter.windows import DocumentBrowserConfig
if __name__ == "__main__":
# print(dataclass2table(FnSelectWindowConfig))
print(dataclass2table(DocumentBrowserConfig))
| 297 | Python | .py | 6 | 46.833333 | 62 | 0.83045 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,350 | multiple_function_example.py | zimolab_PyGUIAdapter/examples/multiple_function_example.py | from pyguiadapter.adapter import GUIAdapter
def function_1(arg: int):
"""
description of function_1
"""
pass
def function_2(arg: int):
"""
description of function_2
"""
pass
def function_3(arg: int):
"""
description of function_3
"""
pass
if __name__ == "__main__"... | 451 | Python | .py | 22 | 16.045455 | 43 | 0.629454 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,351 | anchors_in_document.py | zimolab_PyGUIAdapter/examples/anchors_in_document.py | import os
from pyguiadapter.adapter import GUIAdapter
from pyguiadapter.utils import read_text_file
from pyguiadapter.windows import DocumentBrowserConfig
from pyguiadapter.windows.fnexec import FnExecuteWindowConfig
DOCUMENT_PATH = os.path.join(os.path.dirname(__file__), "anchors_in_document.md")
def anchors_in_do... | 2,460 | Python | .py | 82 | 22.939024 | 112 | 0.574082 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,352 | qt_material_example.py | zimolab_PyGUIAdapter/examples/qt_material_example.py | from datetime import datetime
from qtpy.QtWidgets import QApplication
from pyguiadapter.adapter import GUIAdapter
from pyguiadapter.extend_types import text_t, json_obj_t
def app_style_example(
arg1: str,
arg2: int,
arg3: float,
arg4: bool,
arg5: text_t,
arg6: datetime,
arg7: json_obj_t,... | 1,228 | Python | .py | 42 | 24.261905 | 81 | 0.684885 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,353 | show_select_win_anyway.py | zimolab_PyGUIAdapter/examples/show_select_win_anyway.py | from pyguiadapter.adapter import GUIAdapter
def show_select_win_anyway():
"""
This example shows how to show function select window(FnSelectWindow) even if only one function was added.
"""
pass
if __name__ == "__main__":
adapter = GUIAdapter()
adapter.add(show_select_win_anyway)
adapter.... | 349 | Python | .py | 10 | 30.7 | 110 | 0.713433 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,354 | tiny_window_example.py | zimolab_PyGUIAdapter/examples/tiny_window_example.py | from typing import Optional
from pyguiadapter.adapter import GUIAdapter
from pyguiadapter.exceptions import ParameterError
from pyguiadapter.windows.fnexec import FnExecuteWindowConfig
def equation_solver(a: float, b: float, c: float) -> Optional[tuple]:
"""
Solving Equations: ax^2 + bx + c = 0 (a,b,c ∈ R, a... | 1,402 | Python | .py | 41 | 27.780488 | 77 | 0.624721 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,355 | toast_example.py | zimolab_PyGUIAdapter/examples/toast_example.py | from pyguiadapter.action import Action
from pyguiadapter.adapter import GUIAdapter, utoast
from pyguiadapter.extend_types import text_t
from pyguiadapter.toast import ToastConfig
from pyguiadapter.toolbar import ToolBar
from pyguiadapter.windows.fnexec import FnExecuteWindow
def show_toast(win: FnExecuteWindow, actio... | 1,243 | Python | .py | 39 | 27.820513 | 79 | 0.719195 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,356 | menu_example_1.py | zimolab_PyGUIAdapter/examples/menu_example_1.py | import json
from pyguiadapter.action import Action, Separator
from pyguiadapter.adapter import GUIAdapter
from pyguiadapter.menu import Menu
from pyguiadapter.utils import filedialog, inputdialog, messagebox
from pyguiadapter.window import SimpleWindowEventListener
from pyguiadapter.windows.fnexec import FnExecuteWind... | 6,106 | Python | .py | 177 | 27.180791 | 107 | 0.585692 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,357 | global_style_example.py | zimolab_PyGUIAdapter/examples/global_style_example.py | import os.path
from datetime import datetime
from pyguiadapter import utils
from pyguiadapter.adapter import GUIAdapter
from pyguiadapter.extend_types import text_t
def app_style_example(
arg1: str, arg2: int, arg3: float, arg4: bool, arg5: text_t, arg6: datetime
):
"""
This example shows how to apply a ... | 968 | Python | .py | 21 | 42.142857 | 133 | 0.733191 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,358 | menu_example.py | zimolab_PyGUIAdapter/examples/menu_example.py | import json
from pyguiadapter.action import Action, Separator
from pyguiadapter.adapter import GUIAdapter
from pyguiadapter.menu import Menu
from pyguiadapter.utils import filedialog, inputdialog, messagebox
from pyguiadapter.window import SimpleWindowEventListener
from pyguiadapter.windows.fnselect import FnSelectWin... | 4,454 | Python | .py | 129 | 26.751938 | 107 | 0.612468 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,359 | hello_world.py | zimolab_PyGUIAdapter/examples/hello_world.py | from typing import Literal
from pyguiadapter.adapter import GUIAdapter
from pyguiadapter.adapter.uoutput import uprint
def temperature_converter(
temperature: float,
from_unit: Literal["°C", "°F"] = "°F",
to_unit: Literal["°C", "°F"] = "°C",
) -> float:
"""
Convert temperature from one unit to an... | 1,097 | Python | .py | 31 | 29.709677 | 89 | 0.639657 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,360 | qdarktheme_example.py | zimolab_PyGUIAdapter/examples/qdarktheme_example.py | """
This example requires PyQtDarkTheme. Please install it before you run this example.
"""
from datetime import datetime
from pyguiadapter.adapter import GUIAdapter
from pyguiadapter.extend_types import text_t
def app_style_example(
arg1: str, arg2: int, arg3: float, arg4: bool, arg5: text_t, arg6: datetime
):... | 1,093 | Python | .py | 33 | 28.484848 | 84 | 0.705153 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,361 | fn_select_window_menu_example.py | zimolab_PyGUIAdapter/examples/fn_select_window_menu_example.py | from pyguiadapter.action import Action, Separator
from pyguiadapter.adapter import GUIAdapter
from pyguiadapter.menu import Menu
from pyguiadapter.utils import messagebox
from pyguiadapter.windows.fnselect import FnSelectWindow
def on_action_test(window: FnSelectWindow, action: Action):
messagebox.show_info_messa... | 1,169 | Python | .py | 33 | 31.272727 | 86 | 0.719751 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,362 | window_event_example.py | zimolab_PyGUIAdapter/examples/window_event_example.py | from pyguiadapter.adapter import GUIAdapter
from pyguiadapter.window import BaseWindowEventListener
from pyguiadapter.windows.fnexec import FnExecuteWindow
from pyguiadapter.utils import messagebox
def event_example_1():
pass
class ExampleEventListener(BaseWindowEventListener):
def on_create(self, window: ... | 1,281 | Python | .py | 35 | 29.457143 | 64 | 0.669636 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,363 | toolbar_example.py | zimolab_PyGUIAdapter/examples/toolbar_example.py | import json
from pyguiadapter.action import Action, Separator
from pyguiadapter.adapter import GUIAdapter
from pyguiadapter.toolbar import (
ToolBar,
RightToolBarArea,
LeftToolBarArea,
ToolButtonTextUnderIcon,
TopToolBarArea,
)
from pyguiadapter.utils import filedialog, inputdialog, messagebox
from... | 5,060 | Python | .py | 144 | 27.75 | 107 | 0.588103 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,364 | fn_execute_window_event_example.py | zimolab_PyGUIAdapter/examples/fn_execute_window_event_example.py | from pyguiadapter.adapter import GUIAdapter
from pyguiadapter.window import SimpleWindowEventListener
from pyguiadapter.windows.fnexec import FnExecuteWindow
from pyguiadapter.utils import messagebox
def on_window_create(window: FnExecuteWindow):
print("on_create")
def on_window_show(window: FnExecuteWindow):
... | 1,211 | Python | .py | 36 | 28.361111 | 64 | 0.710594 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,365 | utoast_example.py | zimolab_PyGUIAdapter/examples/utoast_example.py | from typing import Literal
from pyguiadapter.adapter import GUIAdapter, utoast
from pyguiadapter.exceptions import ParameterError
from pyguiadapter.extend_types import text_t, color_hex_t, int_slider_t
from pyguiadapter.toast import ToastConfig, AlignLeft, AlignRight, AlignCenter
def utoast_example(
message: tex... | 2,877 | Python | .py | 83 | 28.506024 | 86 | 0.654788 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,366 | equation_solver_5.py | zimolab_PyGUIAdapter/examples/equation_solver_5.py | from typing import Optional
from pyguiadapter.action import Action
from pyguiadapter.adapter import GUIAdapter
from pyguiadapter.adapter.uoutput import uprint
from pyguiadapter.exceptions import ParameterError
from pyguiadapter.menu import Menu
from pyguiadapter.utils import messagebox
from pyguiadapter.widgets import... | 2,693 | Python | .py | 75 | 27.186667 | 78 | 0.615631 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,367 | qdarkstyle_example.py | zimolab_PyGUIAdapter/examples/qdarkstyle_example.py | from datetime import datetime
from qtpy.QtWidgets import QApplication
from pyguiadapter.adapter import GUIAdapter
from pyguiadapter.extend_types import text_t
def app_style_example(
arg1: str, arg2: int, arg3: float, arg4: bool, arg5: text_t, arg6: datetime
):
"""
This example requires [QDarkStyleSheet]... | 1,141 | Python | .py | 35 | 27.628571 | 95 | 0.705775 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,368 | equation_solver_4.py | zimolab_PyGUIAdapter/examples/equation_solver_4.py | from typing import Optional
from pyguiadapter.adapter import GUIAdapter
from pyguiadapter.adapter.uoutput import uprint
from pyguiadapter.exceptions import ParameterError
from pyguiadapter.widgets import FloatSpinBoxConfig
from pyguiadapter.windows.fnexec import FnExecuteWindowConfig
def equation_solver_4(
a: fl... | 1,828 | Python | .py | 55 | 26.109091 | 77 | 0.593607 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,369 | custom_icon_and_name_example.py | zimolab_PyGUIAdapter/examples/custom_icon_and_name_example.py | from pyguiadapter.adapter import GUIAdapter
def function_1(arg: int):
"""
description of function_1
"""
pass
def function_2(arg: int):
"""
description of function_2
"""
pass
def function_3(arg: int):
"""
description of function_3
"""
pass
if __name__ == "__main__"... | 605 | Python | .py | 22 | 23.045455 | 80 | 0.66087 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,370 | fn_select_window_event_example.py | zimolab_PyGUIAdapter/examples/fn_select_window_event_example.py | from pyguiadapter.adapter import GUIAdapter
from pyguiadapter.utils import messagebox
from pyguiadapter.window import SimpleWindowEventListener
from pyguiadapter.windows.fnselect import FnSelectWindow
def on_window_create(window: FnSelectWindow):
print("on_create")
def on_window_show(window: FnSelectWindow):
... | 1,237 | Python | .py | 36 | 29.083333 | 79 | 0.713564 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,371 | exception_example.py | zimolab_PyGUIAdapter/examples/exception_example.py | from pyguiadapter.adapter import GUIAdapter
def foo(a: int, b: int) -> float:
return float(a) / b
if __name__ == "__main__":
adapter = GUIAdapter()
adapter.add(foo)
adapter.run()
| 199 | Python | .py | 7 | 24.571429 | 43 | 0.643617 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,372 | fn_select_window_toolbar_example.py | zimolab_PyGUIAdapter/examples/fn_select_window_toolbar_example.py | from pyguiadapter.action import Action
from pyguiadapter.adapter import GUIAdapter
from pyguiadapter.toolbar import ToolBar, ToolButtonTextUnderIcon
from pyguiadapter.utils import messagebox
from pyguiadapter.windows.fnselect import FnSelectWindow
def on_action_test(window: FnSelectWindow, action: Action):
messag... | 1,218 | Python | .py | 34 | 31.676471 | 86 | 0.734015 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,373 | save_load_parameters_example.py | zimolab_PyGUIAdapter/examples/save_load_parameters_example.py | import enum
import json
from typing import Any, Dict
from pyguiadapter.action import Action
from pyguiadapter.adapter import GUIAdapter
from pyguiadapter.adapter.uoutput import uprint
from pyguiadapter.exceptions import ParameterError
from pyguiadapter.extend_types import color_t, json_obj_t
from pyguiadapter.menu imp... | 6,833 | Python | .py | 190 | 29.157895 | 119 | 0.648853 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,374 | uinput_builtin_dialog_example.py | zimolab_PyGUIAdapter/examples/uinput_builtin_dialog_example.py | from pyguiadapter.adapter import GUIAdapter
from pyguiadapter.adapter import uinput
from pyguiadapter.adapter.uoutput import uprint
from pyguiadapter.extend_types import choices_t
# noinspection SpellCheckingInspection
def uinput_example(inputs: choices_t):
"""
Example of getting user inputs inside the functi... | 2,474 | Python | .py | 60 | 34.533333 | 132 | 0.630814 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,375 | more_widgets_example.py | zimolab_PyGUIAdapter/examples/more_widgets_example.py | import enum
from datetime import datetime, date, time
from typing import List, Tuple, Literal
from pyguiadapter.adapter import GUIAdapter
from pyguiadapter.adapter.uoutput import uprint
from pyguiadapter.extend_types import (
int_t,
int_dial_t,
int_slider_t,
float_t,
file_t,
directory_t,
f... | 2,275 | Python | .py | 102 | 17.627451 | 47 | 0.593432 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,376 | global_style_example_2.py | zimolab_PyGUIAdapter/examples/global_style_example_2.py | import os.path
from datetime import datetime
from pyguiadapter import utils
from pyguiadapter.adapter import GUIAdapter
from pyguiadapter.extend_types import text_t
def app_style_example(
arg1: str, arg2: int, arg3: float, arg4: bool, arg5: text_t, arg6: datetime
):
"""
This example shows how to apply a ... | 1,099 | Python | .py | 25 | 39.16 | 133 | 0.714017 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,377 | equation_solver_3.py | zimolab_PyGUIAdapter/examples/equation_solver_3.py | from typing import Optional
from pyguiadapter.adapter import GUIAdapter
from pyguiadapter.adapter.uoutput import uprint
from pyguiadapter.exceptions import ParameterError
from pyguiadapter.windows.fnexec import FnExecuteWindowConfig
def equation_solver_3(
a: float = 1.0, b: float = 0.0, c: float = 0.0
) -> Optio... | 1,603 | Python | .py | 53 | 24.471698 | 77 | 0.603934 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,378 | menu_toolbar_example.py | zimolab_PyGUIAdapter/examples/menu_toolbar_example.py | from pyguiadapter.action import Action, Separator
from pyguiadapter.adapter import GUIAdapter
from pyguiadapter.menu import Menu
from pyguiadapter.toolbar import ToolBar
from pyguiadapter.windows.fnexec import FnExecuteWindow
from pyguiadapter.utils import messagebox, filedialog
def on_action_about(window: FnExecuteW... | 3,637 | Python | .py | 125 | 24.04 | 88 | 0.663128 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,379 | clipboard_example.py | zimolab_PyGUIAdapter/examples/clipboard_example.py | from pyguiadapter.adapter import GUIAdapter
from pyguiadapter.adapter import uclipboard
from pyguiadapter.adapter.uoutput import uprint
from pyguiadapter.extend_types import text_t
def clipboard_example(text: text_t):
uprint("selection support:", uclipboard.supports_selection())
uprint("owns selection:", ucli... | 818 | Python | .py | 21 | 34.904762 | 65 | 0.713745 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,380 | style_override_example.py | zimolab_PyGUIAdapter/examples/style_override_example.py | """
This example requires PyQtDarkTheme. Please install it before you run this example.
"""
from datetime import datetime
from pyguiadapter.adapter import GUIAdapter
from pyguiadapter.extend_types import text_t
from pyguiadapter.windows.fnexec import FnExecuteWindowConfig, OutputBrowserConfig
def app_style_example(... | 1,623 | Python | .py | 48 | 27.041667 | 90 | 0.660051 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,381 | parameter_anchor_example.py | zimolab_PyGUIAdapter/examples/parameter_anchor_example.py | from datetime import datetime, date, time
from pyguiadapter.adapter import GUIAdapter
from pyguiadapter.extend_types import string_list_t
from pyguiadapter.widgets import IntSpinBoxConfig
from pyguiadapter.windows import DocumentBrowserConfig
from pyguiadapter.windows.fnexec import FnExecuteWindowConfig
def paramete... | 2,533 | Python | .py | 83 | 24.771084 | 64 | 0.617021 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,382 | fn_execute_window_event_example_2.py | zimolab_PyGUIAdapter/examples/fn_execute_window_event_example_2.py | from pyguiadapter.adapter import GUIAdapter
from pyguiadapter.utils import messagebox
from pyguiadapter.windows.fnexec import (
FnExecuteWindow,
SimpleFnExecuteWindowEventListener,
)
def on_execute_start(window: FnExecuteWindow):
print("on_execute_start()")
def on_execute_result(window: FnExecuteWindow,... | 1,189 | Python | .py | 30 | 35.033333 | 85 | 0.728858 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,383 | function_groups_example.py | zimolab_PyGUIAdapter/examples/function_groups_example.py | from pyguiadapter.adapter import GUIAdapter
def mp4_encoder():
"""
MP4 Encoder
"""
pass
def mp3_encoder():
"""
MP3 Encoder
"""
pass
def avi_encoder():
"""
AVI Encoder
"""
pass
def ogg_encoder():
"""
OGG Encoder
"""
pass
def avi_decoder():
"""... | 1,102 | Python | .py | 58 | 14.413793 | 46 | 0.609375 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,384 | hide_docks_example.py | zimolab_PyGUIAdapter/examples/hide_docks_example.py | from pyguiadapter.adapter import GUIAdapter, udialog
from pyguiadapter.exceptions import ParameterError
from pyguiadapter.windows.fnexec import FnExecuteWindowConfig
def hide_docks_example(a: int, b: str, c: bool):
if a < 0:
raise ParameterError("a", "a must >= 0")
if b == "":
raise ValueError... | 871 | Python | .py | 24 | 28.791667 | 61 | 0.635824 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,385 | menu_example_2.py | zimolab_PyGUIAdapter/examples/menu_example_2.py | import json
from pyguiadapter.action import Action, Separator
from pyguiadapter.adapter import GUIAdapter
from pyguiadapter.menu import Menu
from pyguiadapter.toolbar import ToolBar
from pyguiadapter.utils import filedialog, inputdialog, messagebox
from pyguiadapter.window import SimpleWindowEventListener
from pyguiad... | 6,463 | Python | .py | 193 | 25.761658 | 107 | 0.575 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,386 | equation_solver.py | zimolab_PyGUIAdapter/examples/equation_solver.py | from typing import Optional
from pyguiadapter.adapter import GUIAdapter
from pyguiadapter.adapter.uoutput import uprint
from pyguiadapter.exceptions import ParameterError
def equation_solver(a: float = 1.0, b: float = 0.0, c: float = 0.0) -> Optional[tuple]:
"""A simple equation solver for equations like:
*... | 939 | Python | .py | 28 | 28.25 | 87 | 0.583614 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,387 | udialog_std_messagebox_example.py | zimolab_PyGUIAdapter/examples/udialog_std_messagebox_example.py | from pyguiadapter.adapter import GUIAdapter
from pyguiadapter.adapter import udialog
from pyguiadapter.adapter.uoutput import uprint
from pyguiadapter.extend_types import text_t
from pyguiadapter.utils import messagebox
def dialog_example(
info_message: text_t,
warning_message: text_t,
error_message: text... | 1,673 | Python | .py | 49 | 25.571429 | 75 | 0.629561 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,388 | output_logger_example.py | zimolab_PyGUIAdapter/examples/output_logger_example.py | from pyguiadapter.adapter import GUIAdapter
from pyguiadapter.adapter.uoutput import Logger, LoggerConfig
logger = Logger(
config=LoggerConfig(
info_color="green",
debug_color="blue",
warning_color="yellow",
critical_color="red",
fatal_color="magenta",
)
)
def output_l... | 784 | Python | .py | 27 | 24.111111 | 61 | 0.668442 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,389 | uoutput_example.py | zimolab_PyGUIAdapter/examples/uoutput_example.py | from pyguiadapter.adapter import GUIAdapter, uoutput
def output_log_msg(
info_msg: str = "info message",
debug_msg: str = "debug message",
warning_msg: str = "warning message",
critical_msg: str = "critical message",
fatal_msg: str = "fatal message",
):
uoutput.info(info_msg)
uoutput.debug... | 559 | Python | .py | 17 | 28.588235 | 55 | 0.685874 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,390 | cancel_function_example.py | zimolab_PyGUIAdapter/examples/cancel_function_example.py | import time
from pyguiadapter.adapter import GUIAdapter
from pyguiadapter.adapter.ucontext import is_function_cancelled
from pyguiadapter.adapter.uoutput import uprint
from pyguiadapter.windows.fnexec import FnExecuteWindowConfig
def cancel_function_example(target: int = 10, delay_per_iter: float = 0.5):
"""
... | 855 | Python | .py | 30 | 23.133333 | 77 | 0.672372 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,391 | html_docstring_document_example.py | zimolab_PyGUIAdapter/examples/html_docstring_document_example.py | from pyguiadapter.adapter import GUIAdapter
def function_2(arg1: int, arg2: str, arg3: bool):
"""
<h3>Description</h3>
<p>
This is the document of the <b>function_3</b>. And by default this document will automatically
appear in the <strong>document area</strong>.
</p>
<p>
The format of... | 799 | Python | .py | 26 | 26 | 98 | 0.611979 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,392 | dock_property_example.py | zimolab_PyGUIAdapter/examples/dock_property_example.py | from pyguiadapter.adapter import GUIAdapter
from pyguiadapter.windows.fnexec import RightDockWidgetArea, FnExecuteWindowConfig
def dock_area_example_1():
"""
This example shows how to change the dock area and initial size of the output and document docks.
@return:
"""
pass
if __name__ == "__main... | 637 | Python | .py | 19 | 27.263158 | 101 | 0.675896 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,393 | confirm_quit_example.py | zimolab_PyGUIAdapter/examples/confirm_quit_example.py | from pyguiadapter.adapter import GUIAdapter
from pyguiadapter.utils import messagebox
from pyguiadapter.window import SimpleWindowEventListener
from pyguiadapter.windows.fnexec import FnExecuteWindow
def foo(arg1: int, arg2: str, arg3: bool):
pass
def on_close(window: FnExecuteWindow) -> bool:
ret = message... | 1,139 | Python | .py | 25 | 40.28 | 105 | 0.722674 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,394 | simple_load_save_example.py | zimolab_PyGUIAdapter/examples/simple_load_save_example.py | import json
from typing import Dict, Any
from pyguiadapter.action import Action
from pyguiadapter.adapter import GUIAdapter
from pyguiadapter.adapter.uoutput import uprint
from pyguiadapter.exceptions import ParameterError
from pyguiadapter.extend_types import color_t
from pyguiadapter.menu import Menu
from pyguiadap... | 4,378 | Python | .py | 121 | 29.958678 | 120 | 0.672011 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,395 | fn_select_window_config_example.py | zimolab_PyGUIAdapter/examples/fn_select_window_config_example.py | from pyguiadapter.adapter import GUIAdapter
from pyguiadapter.windows import DocumentBrowserConfig
from pyguiadapter.windows.fnselect import FnSelectWindowConfig
def fn1():
"""
This example shows how config the **function select window**
"""
pass
def fn2():
"""
This example shows how config ... | 1,338 | Python | .py | 47 | 22.446809 | 64 | 0.633307 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,396 | udialog_custom_messagebox_example.py | zimolab_PyGUIAdapter/examples/udialog_custom_messagebox_example.py | from datetime import date, datetime
from typing import Any
from uuid import uuid1
from qtpy.QtWidgets import QWidget, QVBoxLayout, QLabel, QDialogButtonBox
from pyguiadapter.adapter import GUIAdapter, BaseCustomDialog
from pyguiadapter.adapter import udialog
from pyguiadapter.adapter.uoutput import uprint
from pyguia... | 3,170 | Python | .py | 94 | 26.031915 | 73 | 0.636809 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,397 | process_integers.py | zimolab_PyGUIAdapter/examples/process_integers.py | from typing import List, Literal
from pyguiadapter.adapter import GUIAdapter
def process_integers(
integers: List[int], operation: Literal["sum", "max"] = "max"
) -> int:
"""
Process some integers.
@param integers: integers for the accumulator
@param operation: sum the integers (default: find the... | 514 | Python | .py | 16 | 28.0625 | 65 | 0.68357 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,398 | print_image_example.py | zimolab_PyGUIAdapter/examples/print_image_example.py | from pyguiadapter.adapter import GUIAdapter
from pyguiadapter.adapter.uoutput import print_image
from pyguiadapter.extend_types import file_t
def print_image_example(
image_path: file_t,
image_type: str = "jpeg",
width: int = None,
height: int = None,
embed_base64: bool = True,
centered: bool ... | 611 | Python | .py | 23 | 21.391304 | 52 | 0.659247 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |
2,288,399 | dock_operation_example.py | zimolab_PyGUIAdapter/examples/dock_operation_example.py | from pyguiadapter.action import Action, Separator
from pyguiadapter.adapter import GUIAdapter
from pyguiadapter.menu import Menu
from pyguiadapter.windows.fnexec import (
FnExecuteWindow,
BottomDockWidgetArea,
)
def dock_operation_example() -> None:
pass
def on_toggle_document_dock(win: FnExecuteWindow,... | 2,024 | Python | .py | 59 | 28.152542 | 78 | 0.678297 | zimolab/PyGUIAdapter | 8 | 0 | 0 | GPL-3.0 | 9/5/2024, 10:48:26 PM (Europe/Amsterdam) |