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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5,700 | parser.py | psychopy_psychopy/psychopy/iohub/devices/eyetracker/filters/parser.py | # Part of the psychopy.iohub library.
# Copyright (C) 2012-2016 iSolver Software Solutions
# Distributed under the terms of the GNU General Public License (GPL).
"""
ioHub Eye Tracker Online Sample Event Parser
WORK IN PROGRESS - VERY EXPERIMENTAL
Copyright (C) 2012-2014 iSolver Software Solutions
Distributed under ... | 39,535 | Python | .py | 826 | 34.657385 | 124 | 0.563021 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,701 | win32.py | psychopy_psychopy/psychopy/iohub/devices/mouse/win32.py | # -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2012-2020 iSolver Software Solutions (C) 2021 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
import ctypes
from . import MouseDevice
from ...constants import EventConstants, MouseConstants
from .. im... | 10,532 | Python | .py | 235 | 31.570213 | 102 | 0.586351 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,702 | linux2.py | psychopy_psychopy/psychopy/iohub/devices/mouse/linux2.py | # -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2012-2020 iSolver Software Solutions (C) 2021 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
from ctypes import cdll
from . import MouseDevice
from .. import Computer, Device, xlib
from ..keyboard im... | 6,331 | Python | .py | 136 | 32.492647 | 116 | 0.554438 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,703 | __init__.py | psychopy_psychopy/psychopy/iohub/devices/mouse/__init__.py | # -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2012-2020 iSolver Software Solutions (C) 2021 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
from collections import namedtuple
import numpy as np
from .. import Device, Computer
from ...constants im... | 25,017 | Python | .py | 562 | 35.161922 | 115 | 0.633577 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,704 | darwin.py | psychopy_psychopy/psychopy/iohub/devices/mouse/darwin.py | # -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2012-2020 iSolver Software Solutions (C) 2021 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
from copy import copy
import Quartz as Qz
from AppKit import NSEvent
from . import MouseDevice
from ..keybo... | 16,234 | Python | .py | 348 | 32.5 | 112 | 0.569678 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,705 | __init__.py | psychopy_psychopy/psychopy/iohub/devices/display/__init__.py | # -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2012-2020 iSolver Software Solutions (C) 2021 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
import sys
from .. import Device, Computer
from ...constants import DeviceConstants
from ...errors import p... | 30,576 | Python | .py | 604 | 38.180464 | 355 | 0.604267 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,706 | __init__.py | psychopy_psychopy/psychopy/iohub/devices/experiment/__init__.py | # -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2012-2020 iSolver Software Solutions (C) 2021 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
import numpy as N
from .. import Device, DeviceEvent, Computer, Device
from ...constants import DeviceConst... | 12,020 | Python | .py | 267 | 36.543071 | 109 | 0.639518 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,707 | __init__.py | psychopy_psychopy/psychopy/iohub/devices/serial/__init__.py | # -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2012-2020 iSolver Software Solutions (C) 2021 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
import serial
import sys
import numpy as N
import struct
from ... import EXP_SCRIPT_DIRECTORY
from .. import... | 27,548 | Python | .py | 666 | 27.938438 | 360 | 0.5184 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,708 | win32.py | psychopy_psychopy/psychopy/iohub/devices/keyboard/win32.py | # -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2012-2020 iSolver Software Solutions (C) 2021 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
try:
import pyHook
except ImportError:
import pyWinhook as pyHook
import win32api
import ctypes
fro... | 14,343 | Python | .py | 306 | 31.545752 | 92 | 0.531246 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,709 | linux2.py | psychopy_psychopy/psychopy/iohub/devices/keyboard/linux2.py | # -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2012-2020 iSolver Software Solutions (C) 2021 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
from . import ioHubKeyboardDevice, psychopy_key_mappings
from .. import Computer, Device
from ...constants ... | 4,768 | Python | .py | 84 | 43.333333 | 112 | 0.621146 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,710 | darwinkey.py | psychopy_psychopy/psychopy/iohub/devices/keyboard/darwinkey.py | # -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2012-2020 iSolver Software Solutions (C) 2021 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
# /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/
# HIToolbox.framework/Headers/Events.h... | 1,886 | Python | .py | 91 | 19.384615 | 85 | 0.717076 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,711 | __init__.py | psychopy_psychopy/psychopy/iohub/devices/keyboard/__init__.py | # -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2012-2020 iSolver Software Solutions (C) 2021 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
global Keyboard
Keyboard = None
import numpy as N
from ...errors import print2err, printExceptionDetailsTo... | 12,637 | Python | .py | 248 | 40.044355 | 141 | 0.617862 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,712 | darwin.py | psychopy_psychopy/psychopy/iohub/devices/keyboard/darwin.py | # -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2012-2020 iSolver Software Solutions (C) 2021 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
from copy import copy
import Quartz as Qz
from AppKit import NSEvent # NSKeyUp, NSSystemDefined, NSEvent
fr... | 17,695 | Python | .py | 363 | 33.911846 | 137 | 0.553194 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,713 | win32.py | psychopy_psychopy/psychopy/iohub/devices/wintab/win32.py | # -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2012-2020 iSolver Software Solutions (C) 2021 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
# Initial file based on pyglet.libs.win32
# Tablet related class definitions
import pyglet
from pyglet.even... | 20,599 | Python | .py | 601 | 28.004992 | 91 | 0.630477 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,714 | __init__.py | psychopy_psychopy/psychopy/iohub/devices/wintab/__init__.py | # -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2012-2020 iSolver Software Solutions (C) 2021 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
_is_epydoc = False
# Pen digitizers /tablets that support Wintab API
from .. import Device, Computer
from ... | 23,717 | Python | .py | 497 | 30.627767 | 148 | 0.483732 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,715 | visualangle.py | psychopy_psychopy/psychopy/iohub/util/visualangle.py | # -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2012-2020 iSolver Software Solutions (C) 2021 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
"""
Pixel to Visual Angle Calculation.
Uses "symmetric angles" formula.
Assumptions:
1) unit origin == ... | 4,520 | Python | .py | 98 | 39.377551 | 85 | 0.650432 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,716 | __init__.py | psychopy_psychopy/psychopy/iohub/util/__init__.py | # -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2012-2020 iSolver Software Solutions (C) 2021 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
import sys
import os
import copy
import inspect
import warnings
import numpy
import numbers # numbers.Integ... | 29,320 | Python | .py | 687 | 33.014556 | 119 | 0.608609 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,717 | windowwarp.py | psychopy_psychopy/psychopy/visual/windowwarp.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Copyright (C) 2014 Allen Institute for Brain Science
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License Version 3
as published by the Free Software Foundation on 29 June 2007.
This program is distr... | 18,099 | Python | .py | 388 | 34.744845 | 91 | 0.533896 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,718 | filters.py | psychopy_psychopy/psychopy/visual/filters.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Various useful functions for creating filters and textures
(e.g. for PatchStim)
"""
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
im... | 14,134 | Python | .py | 336 | 33.383929 | 123 | 0.603445 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,719 | shaders.py | psychopy_psychopy/psychopy/visual/shaders.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
"""shaders programs for either pyglet or pygame
"""
import pyglet.gl as GL
import psychop... | 15,221 | Python | .py | 403 | 30.503722 | 86 | 0.636951 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,720 | form.py | psychopy_psychopy/psychopy/visual/form.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
import copy
import psychopy
from .text import TextStim
from .rect import Rect
from psychop... | 43,469 | Python | .py | 1,033 | 29.725073 | 138 | 0.556078 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,721 | window.py | psychopy_psychopy/psychopy/visual/window.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""A class representing a window for displaying one or more stimuli"""
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
import ctypes
i... | 144,499 | Python | .py | 3,091 | 35.604012 | 118 | 0.607904 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,722 | button.py | psychopy_psychopy/psychopy/visual/button.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Creates a button"""
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
import numpy as np
from psychopy import event, core, layout
from p... | 6,755 | Python | .py | 163 | 30.90184 | 156 | 0.598842 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,723 | circle.py | psychopy_psychopy/psychopy/visual/circle.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Creates a Circle with a given radius
as a special case of a :class:`~psychopy.visual.Polygon`
"""
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public Lice... | 7,013 | Python | .py | 160 | 33.95625 | 83 | 0.629678 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,724 | stim3d.py | psychopy_psychopy/psychopy/visual/stim3d.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Classes for 3D stimuli."""
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
from psychopy import logging
from psychopy.tools.attributet... | 96,408 | Python | .py | 2,213 | 32.989607 | 81 | 0.598457 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,725 | slider.py | psychopy_psychopy/psychopy/visual/slider.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""A class for getting numeric or categorical ratings, e.g., a 1-to-7 scale."""
# Part of the PsychoPy library
# Copyright (C) 2015 Jonathan Peirce
# Distributed under the terms of the GNU General Public License (GPL).
import copy
import numpy as np
from psychopy imp... | 44,007 | Python | .py | 1,059 | 30.769594 | 143 | 0.587579 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,726 | movie.py | psychopy_psychopy/psychopy/visual/movie.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""A stimulus class for playing movies (mpeg, avi, etc...) in PsychoPy.
"""
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
from psychopy... | 353 | Python | .py | 8 | 42.625 | 79 | 0.741935 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,727 | basevisual.py | psychopy_psychopy/psychopy/visual/basevisual.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Provides class BaseVisualStim and mixins; subclass to get visual stimuli
"""
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
from path... | 74,709 | Python | .py | 1,665 | 34.272072 | 268 | 0.597842 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,728 | dropdown.py | psychopy_psychopy/psychopy/visual/dropdown.py | from psychopy.visual.shape import ShapeStim
from psychopy.visual.slider import Slider
from psychopy.visual.button import ButtonStim
class DropDownCtrl(ButtonStim):
"""
Class to create a "Drop Down" control, similar to a HTML <select> tag. Consists of a psychopy.visual.ButtonStim
which, when clicked on, sh... | 6,283 | Python | .py | 150 | 32.1 | 116 | 0.61883 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,729 | target.py | psychopy_psychopy/psychopy/visual/target.py | from .shape import ShapeStim
from .basevisual import ColorMixin, WindowMixin, MinimalStim
from psychopy.colors import Color
from .. import layout
knownStyles = ["circles", "cross", ]
class TargetStim(MinimalStim, ColorMixin, WindowMixin):
"""
A target for use in eyetracker calibration, if converted to a dict... | 9,431 | Python | .py | 237 | 30.063291 | 114 | 0.611864 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,730 | bufferimage.py | psychopy_psychopy/psychopy/visual/bufferimage.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Take a "screen-shot" (full or partial), save to a ImageStim()-like
RBGA object.`"""
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
... | 9,413 | Python | .py | 191 | 38.848168 | 81 | 0.616206 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,731 | noise.py | psychopy_psychopy/psychopy/visual/noise.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# some code provided by Andrew Schofield
# Distributed under the terms of the GNU General Public License (GPL).
"""Stimulus object for drawing arbitrary bitmap c... | 1,454 | Python | .py | 32 | 42.8125 | 94 | 0.77305 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,732 | rift.py | psychopy_psychopy/psychopy/visual/rift.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Oculus Rift HMD support for PsychoPy.
Copyright (C) 2019 - Matthew D. Cutone, The Centre for Vision Research, Toronto,
Ontario, Canada
Uses PsychXR to interface with the Oculus Rift runtime (LibOVR) and SDK. See
http://psychxr.org for more information. The Oculus PC SD... | 99,809 | Python | .py | 2,171 | 35.10456 | 106 | 0.617539 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,733 | pie.py | psychopy_psychopy/psychopy/visual/pie.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Create a pie shape."""
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
from psychopy.visual.shape import BaseShapeStim
from psychopy.t... | 9,732 | Python | .py | 220 | 34.690909 | 83 | 0.627267 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,734 | polygon.py | psychopy_psychopy/psychopy/visual/polygon.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Creates a regular polygon (triangles, pentagons, ...) as a special case of a
:class:`~psychopy.visual.ShapeStim`"""
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU G... | 9,444 | Python | .py | 206 | 36.247573 | 88 | 0.63733 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,735 | secondorder.py | psychopy_psychopy/psychopy/visual/secondorder.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# some code provided by Andrew Schofield
# Distributed under the terms of the GNU General Public License (GPL).
"""Stimulus object for drawing arbitrary bitmap c... | 1,143 | Python | .py | 27 | 39.407407 | 100 | 0.777174 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,736 | shape.py | psychopy_psychopy/psychopy/visual/shape.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Create geometric (vector) shapes by defining vertex locations."""
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL)
import copy
import nu... | 28,269 | Python | .py | 626 | 34.185304 | 155 | 0.600022 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,737 | rect.py | psychopy_psychopy/psychopy/visual/rect.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Creates a rectangle of given width and height as a special case of a
:class:`~psychopy.visual.ShapeStim`"""
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General P... | 8,555 | Python | .py | 187 | 35.684492 | 83 | 0.626033 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,738 | line.py | psychopy_psychopy/psychopy/visual/line.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Creates a Line between two points as a special case of a
:class:`~psychopy.visual.ShapeStim`
"""
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public Licen... | 8,636 | Python | .py | 206 | 32.699029 | 81 | 0.625074 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,739 | elementarray.py | psychopy_psychopy/psychopy/visual/elementarray.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""This stimulus class defines a field of elements whose behaviour can be
independently controlled. Suitable for creating 'global form' stimuli or more
detailed random dot stimuli."""
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 O... | 28,638 | Python | .py | 616 | 36.568182 | 84 | 0.600322 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,740 | vlcmoviestim.py | psychopy_psychopy/psychopy/visual/vlcmoviestim.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""A stimulus class for playing movies (mpeg, avi, etc...) in PsychoPy using a
local installation of VLC media player (https://www.videolan.org/).
"""
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distribu... | 42,414 | Python | .py | 1,041 | 31.095101 | 80 | 0.602107 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,741 | globalVars.py | psychopy_psychopy/psychopy/visual/globalVars.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""This stores variables that are needed globally through the visual package.
It needs to be imported by anything that uses those variables as:
from psychopy.visual import globalVars
print(globalVars.currWindow) # read it
globalVars.currentWindow = newWin #... | 575 | Python | .py | 14 | 38.214286 | 77 | 0.771325 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,742 | dot.py | psychopy_psychopy/psychopy/visual/dot.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""This stimulus class defines a field of dots with an update rule that
determines how they change on every call to the .draw() method.
"""
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under t... | 28,569 | Python | .py | 582 | 39.353952 | 87 | 0.626752 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,743 | text.py | psychopy_psychopy/psychopy/visual/text.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''Class of text stimuli to be displayed in a :class:`~psychopy.visual.Window`
'''
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
import... | 30,584 | Python | .py | 670 | 33.958209 | 115 | 0.581593 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,744 | __init__.py | psychopy_psychopy/psychopy/visual/__init__.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
"""Container for all visual-related functions and classes
"""
import sys
if sys.platform ... | 4,302 | Python | .py | 105 | 38.67619 | 79 | 0.822403 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,745 | patch.py | psychopy_psychopy/psychopy/visual/patch.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''Deprecated (as of version 1.74.00):
please use the :class:`~psychopy.visual.GratingStim`
or the :class:`~psychopy.visual.ImageStim` classes.'''
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed ... | 582 | Python | .py | 15 | 36.4 | 79 | 0.752669 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,746 | progress.py | psychopy_psychopy/psychopy/visual/progress.py | from . import shape
from psychopy.tools.attributetools import attributeSetter, setAttribute
# Aliases for directions
_directionAliases = {
# Horizontal
"horizontal": "horizontal",
"horiz": "horizontal",
"x": "horizontal",
"0": "horizontal",
"False": "horizontal",
... | 10,661 | Python | .py | 274 | 30.277372 | 111 | 0.620796 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,747 | windowframepack.py | psychopy_psychopy/psychopy/visual/windowframepack.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Copyright (C) 2014 Allen Institute for Brain Science
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License Version 3
as published by the Free Software Foundation on 29 June 2007.
This program is distr... | 3,260 | Python | .py | 68 | 41.014706 | 78 | 0.697858 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,748 | custommouse.py | psychopy_psychopy/psychopy/visual/custommouse.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Class for more control over the mouse,
including the pointer graphic and bounding box."""
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL... | 9,800 | Python | .py | 224 | 32.986607 | 95 | 0.594841 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,749 | brush.py | psychopy_psychopy/psychopy/visual/brush.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""A PsychoPy drawing tool
Inspired by rockNroll87q - https://github.com/rockNroll87q/pyDrawing
"""
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public Licen... | 5,789 | Python | .py | 171 | 22.812865 | 100 | 0.544136 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,750 | simpleimage.py | psychopy_psychopy/psychopy/visual/simpleimage.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""A simple stimulus for loading images from a file and presenting at exactly
the resolution and color in the file (subject to gamma correction if set).
"""
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Di... | 12,029 | Python | .py | 258 | 37.228682 | 79 | 0.625874 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,751 | nnlvs.py | psychopy_psychopy/psychopy/visual/nnlvs.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Window class for the NordicNeuralLab's VisualSystemHD(tm) fMRI display
system.
"""
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
import ... | 30,335 | Python | .py | 682 | 33.963343 | 86 | 0.582859 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,752 | movie2.py | psychopy_psychopy/psychopy/visual/movie2.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
#
# Contributed by Sol Simpson, April 2014.
# The MovieStim class was taken and rewritten to... | 564 | Python | .py | 16 | 33 | 80 | 0.761029 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,753 | aperture.py | psychopy_psychopy/psychopy/visual/aperture.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Restrict a stimulus visibility area to a basic shape or list of vertices.
"""
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
import o... | 11,120 | Python | .py | 266 | 33.18797 | 104 | 0.632994 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,754 | roi.py | psychopy_psychopy/psychopy/visual/roi.py | import numpy as np
from .shape import ShapeStim
from ..event import Mouse
from ..core import Clock
class ROI(ShapeStim):
"""
A class to handle regions of interest for eyetracking, is essentially a :class:`~psychopy.visual.polygon` but
with some extra methods and properties for interacting with eyetrackin... | 5,865 | Python | .py | 129 | 35.72093 | 114 | 0.628581 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,755 | radial.py | psychopy_psychopy/psychopy/visual/radial.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
"""Stimulus class for drawing radial stimuli.
These are optional components that can be o... | 1,189 | Python | .py | 27 | 41.111111 | 114 | 0.762653 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,756 | helpers.py | psychopy_psychopy/psychopy/visual/helpers.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Helper functions shared by the visual classes
"""
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
import os
import copy
from packaging... | 12,897 | Python | .py | 283 | 37.166078 | 120 | 0.634721 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,757 | ratingscale.py | psychopy_psychopy/psychopy/visual/ratingscale.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""A class for getting numeric or categorical ratings, e.g., a 1-to-7 scale."""
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
from psyc... | 518 | Python | .py | 13 | 37.307692 | 81 | 0.746507 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,758 | grating.py | psychopy_psychopy/psychopy/visual/grating.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Stimulus object for drawing arbitrary bitmaps that can repeat (cycle)
in either dimension. One of the main stimuli for PsychoPy.
"""
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the t... | 20,198 | Python | .py | 434 | 37.264977 | 80 | 0.630248 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,759 | movie3.py | psychopy_psychopy/psychopy/visual/movie3.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
from psychopy.tools.pkgtools import PluginStub
class MovieStim3(
PluginStub,
pl... | 436 | Python | .py | 12 | 33.666667 | 80 | 0.754762 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,760 | image.py | psychopy_psychopy/psychopy/visual/image.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Display an image on `psycopy.visual.Window`"""
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
# Ensure setting pyglet.options['debug_... | 16,086 | Python | .py | 372 | 32.787634 | 114 | 0.603988 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,761 | panorama.py | psychopy_psychopy/psychopy/visual/panorama.py | from . import stim3d
from . import ImageStim
from .. import constants
from ..tools import gltools as gt, mathtools as mt, viewtools as vt
import numpy as np
import pyglet.gl as GL
import psychopy.colors as colors
from ..tools.attributetools import attributeSetter, setAttribute
class PanoramicImageStim(ImageStim):
... | 10,339 | Python | .py | 255 | 31.25098 | 82 | 0.617096 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,762 | metadata.py | psychopy_psychopy/psychopy/visual/movies/metadata.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Class for storing and working with movie file metadata.
"""
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
__all__ = ["MovieMetadata"... | 7,118 | Python | .py | 195 | 27.979487 | 80 | 0.603839 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,763 | __init__.py | psychopy_psychopy/psychopy/visual/movies/__init__.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""A stimulus class for playing movies (mpeg, avi, etc...) in PsychoPy.
"""
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
__all__ = ['M... | 25,806 | Python | .py | 676 | 28.804734 | 81 | 0.588365 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,764 | frame.py | psychopy_psychopy/psychopy/visual/movies/frame.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Class for video frames.
"""
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
__all__ = ["MovieFrame", "NULL_MOVIE_FRAME_INFO", "MOVIE_F... | 7,932 | Python | .py | 215 | 28.306977 | 80 | 0.606463 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,765 | __init__.py | psychopy_psychopy/psychopy/visual/movies/players/__init__.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Classes and functions for interfacing with movie player libraries.
"""
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
__all__ = ["get... | 1,695 | Python | .py | 46 | 31.565217 | 79 | 0.685242 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,766 | ffpyplayer_player.py | psychopy_psychopy/psychopy/visual/movies/players/ffpyplayer_player.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Classes for movie player interfaces.
"""
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
__all__ = [
'FFPyPlayer'
]
import sys
f... | 45,899 | Python | .py | 1,123 | 30.816563 | 81 | 0.586287 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,767 | _base.py | psychopy_psychopy/psychopy/visual/movies/players/_base.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Base class for player interfaces.
"""
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
__all__ = ["BaseMoviePlayer"]
from abc import A... | 9,782 | Python | .py | 282 | 26.460993 | 80 | 0.595031 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,768 | textbox2.py | psychopy_psychopy/psychopy/visual/textbox2/textbox2.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
#
# FreeType high-level python API - Copyright 2011-2015 Nicolas P. Rougier
# Distributed under the terms of the new BSD license.
#
# ----------------------------------------------------------... | 69,477 | Python | .py | 1,641 | 30.143815 | 173 | 0.549211 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,769 | __init__.py | psychopy_psychopy/psychopy/visual/textbox2/__init__.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from .textbox2 import TextBox2, allFonts | 87 | Python | .py | 3 | 28 | 40 | 0.702381 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,770 | fontmanager.py | psychopy_psychopy/psychopy/visual/textbox/fontmanager.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on Sun Nov 10 12:18:45 2013
@author: Sol
"""
import os
import sys
from pathlib import Path
import math
import numpy as np
import unicodedata as ud
from freetype import Face, FT_LOAD_RENDER, FT_LOAD_FORCE_AUTOHINT, FT_Exception
... | 21,695 | Python | .py | 485 | 33.919588 | 161 | 0.601579 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,771 | parsedtext.py | psychopy_psychopy/psychopy/visual/textbox/parsedtext.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on Sat May 25 00:09:01 2013
@author: Sol
"""
from textwrap import TextWrapper
import io
import os
from collections import deque
from weakref import proxy
class ParsedTextDocument:
def __init__(self, text_data, text_grid):
if os.path.isfile(text_... | 10,413 | Python | .py | 255 | 29.215686 | 101 | 0.557349 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,772 | textureatlas.py | psychopy_psychopy/psychopy/visual/textbox/textureatlas.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#pylint: skip-file
# -----------------------------------------------------------------------------
#
# FreeType high-level python API - Copyright 2011 Nicolas P. Rougier
# Distributed under the terms of the new BSD license.
#
# ------------------------------------------... | 7,448 | Python | .py | 203 | 25.817734 | 89 | 0.511253 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,773 | __init__.py | psychopy_psychopy/psychopy/visual/textbox/__init__.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 21 18:38:35 2013
@author: Sol
"""
import os
import inspect
import numbers
from weakref import proxy
import time
import numpy as np
from psychopy import core, misc, colors, logging
import psychopy.tools.colorspacetools as colortools
import psychopy.... | 53,776 | Python | .py | 1,084 | 37.547048 | 131 | 0.577065 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,774 | textgrid.py | psychopy_psychopy/psychopy/visual/textbox/textgrid.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on Mon Jan 07 11:18:51 2013
@author: Sol
"""
import numpy as np
from weakref import proxy
from psychopy import core
from pyglet.gl import (glCallList, glGenLists, glNewList, glDisable, glEnable,
glTranslatef, glColor4f, glLineWidth, glBe... | 9,791 | Python | .py | 227 | 30.621145 | 131 | 0.551141 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,775 | gamma.py | psychopy_psychopy/psychopy/visual/backends/gamma.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
# set the gamma LUT using platform-specific hardware calls
import numpy
import sys
import... | 13,419 | Python | .py | 299 | 35.364548 | 99 | 0.631676 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,776 | pygamebackend.py | psychopy_psychopy/psychopy/visual/backends/pygamebackend.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
"""A Backend class defines the core low-level functions required by a Window
class, such a... | 12,804 | Python | .py | 285 | 35.726316 | 80 | 0.630688 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,777 | pygletbackend.py | psychopy_psychopy/psychopy/visual/backends/pygletbackend.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
"""A Backend class defines the core low-level functions required by a Window
class, such a... | 35,729 | Python | .py | 793 | 34.64691 | 93 | 0.615418 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,778 | glfwbackend.py | psychopy_psychopy/psychopy/visual/backends/glfwbackend.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
"""A Backend class defines the core low-level functions required by a Window
class, such a... | 961 | Python | .py | 22 | 40.772727 | 80 | 0.75134 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,779 | __init__.py | psychopy_psychopy/psychopy/visual/backends/__init__.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
"""Backends provide the window creation and flipping commands.
"""
import psychopy.plugin... | 2,425 | Python | .py | 57 | 37.192982 | 80 | 0.70017 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,780 | _base.py | psychopy_psychopy/psychopy/visual/backends/_base.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
"""A Backend class defines the core low-level functions required by a Window
class, such a... | 16,791 | Python | .py | 377 | 35.838196 | 80 | 0.635438 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,781 | _psychopyApp.py | psychopy_psychopy/psychopy/app/_psychopyApp.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
import traceback
from pathlib import Path
from psychopy.app.colorpicker import PsychoColor... | 48,921 | Python | .py | 1,096 | 33.268248 | 113 | 0.594955 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,782 | dialogs.py | psychopy_psychopy/psychopy/app/dialogs.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""This is for general purpose dialogs/widgets, not particular functionality
MessageDialog:
a drop-in replacement for wx message dialog (which was buggy on mac)
GlobSizer:
built on top of GridBagSizer but with ability to add/remove
rows. Needed for the ListWid... | 24,378 | Python | .py | 601 | 29.795341 | 88 | 0.566248 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,783 | errorDlg.py | psychopy_psychopy/psychopy/app/errorDlg.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
"""Error dialog for showing unhandled exceptions that occur within the PsychoPy
app."""
fr... | 9,376 | Python | .py | 199 | 37.150754 | 163 | 0.629241 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,784 | console.py | psychopy_psychopy/psychopy/app/console.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
"""Classes and functions for broadcasting standard streams from external
consoles/termina... | 4,684 | Python | .py | 127 | 28.913386 | 80 | 0.625442 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,785 | urls.py | psychopy_psychopy/psychopy/app/urls.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""A central location to store information about urls
"""
urls = dict()
# links based on string names
urls['builder'] = "https://www.psychopy.org/builder"
urls['builder.loops'] = "https://www.psychopy.org/builder/flow.html#loops"
# NB. builder components get their urls de... | 1,352 | Python | .py | 26 | 50.807692 | 87 | 0.736563 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,786 | frametracker.py | psychopy_psychopy/psychopy/app/frametracker.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
openFrames = []
| 246 | Python | .py | 6 | 39.666667 | 79 | 0.731092 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,787 | utils.py | psychopy_psychopy/psychopy/app/utils.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
"""utility classes for the Builder
"""
import glob
import io
import os
import re
import we... | 59,388 | Python | .py | 1,479 | 29.80595 | 139 | 0.594201 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,788 | __init__.py | psychopy_psychopy/psychopy/app/__init__.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
"""Module for the PsychoPy GUI application.
"""
__all__ = [
'startApp',
'quitApp'... | 10,939 | Python | .py | 258 | 36.155039 | 93 | 0.697067 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,789 | ribbon.py | psychopy_psychopy/psychopy/app/ribbon.py | import sys
import webbrowser
from pathlib import Path
import numpy
import requests
import wx
from psychopy.app import utils
from psychopy.app import pavlovia_ui as pavui
from psychopy.app.pavlovia_ui import sync
from psychopy.app.themes import icons, handlers, colors
from psychopy.localization import _translate
from ... | 35,556 | Python | .py | 901 | 29.477248 | 107 | 0.599131 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,790 | psychopyApp.py | psychopy_psychopy/psychopy/app/psychopyApp.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
import argparse
from pathlib import Path
import sys
# fix macOS locale-bug on startup: se... | 7,294 | Python | .py | 176 | 32.096591 | 103 | 0.607887 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,791 | preferencesDlg.py | psychopy_psychopy/psychopy/app/preferencesDlg.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
import sys
from pathlib import Path
import wx
import wx.propgrid as pg
import wx.py
import platform
import re
import os
from psychopy.app.themes import icons
from . import dialogs
from psychopy import localization, prefs
from psychopy.localization import _tran... | 32,033 | Python | .py | 677 | 31.763663 | 100 | 0.534825 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,792 | idle.py | psychopy_psychopy/psychopy/app/idle.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
import threading
import time
from collections import OrderedDict
import wx
from psychopy ... | 4,960 | Python | .py | 152 | 24.940789 | 79 | 0.592089 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,793 | sysInfoDlg.py | psychopy_psychopy/psychopy/app/sysInfoDlg.py | # -*- coding: utf-8 -*-
import wx
from pyglet.gl import gl_info, GLint, glGetIntegerv, GL_MAX_ELEMENTS_VERTICES
from psychopy import visual, preferences
import sys
import os
import platform
class SystemInfoDialog(wx.Dialog):
"""Dialog for retrieving system information within the PsychoPy app suite.
Shows th... | 9,058 | Python | .py | 200 | 34.2 | 80 | 0.56681 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,794 | jobs.py | psychopy_psychopy/psychopy/app/jobs.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
"""Classes and functions for creating and managing subprocesses spawned by the
GUI applica... | 21,514 | Python | .py | 565 | 29.716814 | 85 | 0.609128 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,795 | codeEditorBase.py | psychopy_psychopy/psychopy/app/coder/codeEditorBase.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Provides class BaseCodeEditor; base class for
CodeEditor class in Coder
and CodeBox class in dlgCode (code component)
"""
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the term... | 18,086 | Python | .py | 404 | 36.30198 | 101 | 0.611483 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,796 | psychoParser.py | psychopy_psychopy/psychopy/app/coder/psychoParser.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
# python text parser
# this is really just for the purpose of constructing code analysis i... | 4,940 | Python | .py | 117 | 33.068376 | 89 | 0.58217 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,797 | sourceTree.py | psychopy_psychopy/psychopy/app/coder/sourceTree.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Classes and functions for the coder source tree."""
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
from collections import deque
from... | 12,414 | Python | .py | 264 | 34.121212 | 95 | 0.57926 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,798 | folding.py | psychopy_psychopy/psychopy/app/coder/folding.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Functions and classes related to code folding with Scintilla."""
# Part of the PsychoPy library
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
import wx.stc
class... | 4,643 | Python | .py | 110 | 28.718182 | 79 | 0.545736 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |
5,799 | coder.py | psychopy_psychopy/psychopy/app/coder/coder.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2009 Jonathan Peirce
# Distributed under the terms of the GNU General Public License (GPL).
from pathlib import Path
import wx
import wx.stc
import wx.richtext
import wx.py
import psychopy.app
from ..pavlovia_ui.search impor... | 126,503 | Python | .py | 2,716 | 34.268041 | 113 | 0.57629 | psychopy/psychopy | 1,662 | 900 | 218 | GPL-3.0 | 9/5/2024, 5:09:29 PM (Europe/Amsterdam) |