Skip to content

Instantly share code, notes, and snippets.

View iandol's full-sized avatar
👾
typing away...

Ian Max Andolina iandol

👾
typing away...
View GitHub Profile
@iandol
iandol / physics2D.m
Last active January 8, 2024 09:32
Simple rigid body 2D physics of a circle in MATLAB
% Define parameters
radius = 1; % circle radius
mass = 1; % circle mass
speed = 10;
angle = deg2rad(45);
[xv,yv]=pol2cart(angle,speed);
initialPosition = [-7, -7]; % initial position (x, y)
initialVelocity = [xv, yv]; % initial velocity (vx, vy)
timeStep = 0.1; % time step
simulationTime = 10; % total simulation time
@iandol
iandol / imrec.m
Last active December 27, 2023 06:49
Create stimulus frame movie from a previous opticka experiment.
% This script loads a previous opticka experiment, then uses the screen and
% stimulus and task values to generate a series of movies or pictures for
% each stimulus frame. This assumes a single variable (i.e. angle). It runs
% 0.25 only showing fixation cross, then 1.5 secs of the stimulus, then
% another 0.25 seconds blank.
%%
% lets load from the saved MAT file
[mat,p] = uigetfile('*.mat','Select the Experiment MAT file');
if isnumeric(mat); return; end
@iandol
iandol / log.txt
Created October 25, 2023 01:21
64bit Debian 12 Raspberry Pi 4 VBLSyncTest Log
>> Screen('Preference','verbosity',10)
ans = 3
>> VBLSyncTest
RandR: 1920x1080 (0x47) 148.5MHz
h: width 1920 start 2008 end 2052 total 2200 skew 0
v: height 1080 start 1082 end 1087 total 1125
PTB-INFO: This is Psychtoolbox-3 for GNU/Linux X11, under GNU/Octave 64-Bit (Version 3.0.19 - Build date: Oct 16 2023).
PTB-INFO: OS support status: Linux 6.1.0-rpi4-rpi-v8 Supported.
@iandol
iandol / setup.sh
Created May 20, 2023 11:04
micromamba setup for shell -- micromamba shell hook -s zsh -p ~/micromamba
# Copyright (C) 2012 Anaconda, Inc
# SPDX-License-Identifier: BSD-3-Clause
__mamba_exe() (
"$MAMBA_EXE" "$@"
)
__mamba_hashr() {
if [ -n "${ZSH_VERSION:+x}" ]; then
\rehash
@iandol
iandol / 32bit.log
Created December 8, 2022 01:29
PTB (git a6edbf2) + Raspberry Pi 4 8GB — 32bit vs. 64bit OS comparison for VBLSyncTest at Verbosity = 10 — OS is updated as of 2022-12-08
>> Screen('Preference','Verbosity',10)
ans = 3
>> VBLSyncTest
RandR: 1920x1080 (0x48) 148.5MHz
h: width 1920 start 2008 end 2052 total 2200 skew 0
v: height 1080 start 1084 end 1089 total 1125
PTB-INFO: This is Psychtoolbox-3 for GNU/Linux X11, under GNU/Octave 32-Bit (Version 3.0.18 - Build date: Aug 4 2022).
PTB-INFO: OS support status: Linux 5.15.76-v7l+ Supported.
@iandol
iandol / lazypirateclient.py
Created February 19, 2022 14:28
Lazypirate server / client test
#
# Lazy Pirate client
# Use zmq_poll to do a safe request-reply
# To run, start lpserver and then randomly kill/restart it
#
# Author: Daniel Lundin <dln(at)eintr(dot)org>
#
import itertools
import logging
import sys
@iandol
iandol / Client log [ERROR]
Created February 19, 2022 12:19
Trying to get this demo code working: https://abhitronix.github.io/vidgear/latest/help/netgear_ex/#using-netgear-with-webgear — I get a client error about ZMQ. Running the basic ZMQ REP/REQ code works over the same network address+port
❯ python client.py
12:08:59 :: Helper :: INFO :: Running VidGear Version: 0.2.5
12:08:59 :: Helper_Async :: DEBUG :: Found valid WebGear data-files successfully.
12:08:59 :: WebGear :: DEBUG :: `/Users/ian/.vidgear/webgear` is the default location for saving WebGear data-files.
12:08:59 :: WebGear :: WARNING :: Given source is of NoneType. Therefore, JPEG Frame-Compression is disabled!
12:08:59 :: WebGear :: DEBUG :: Initiating Video Streaming.
12:08:59 :: WebGear :: DEBUG :: Running Starlette application.
INFO: Started server process [17175]
INFO: Waiting for application startup.
INFO: Application startup complete.
@iandol
iandol / kill -SEGV output
Created December 11, 2021 20:54
Elvish V0.18.0-dev.95baad069e3939c0eb059518ee55224f624e01f9 crash
> test
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0xb01dfacedebac1e pc=0x7ff80ea95506]
runtime stack:
runtime: unexpected return pc for runtime.sigpanic called from 0x7ff80ea95506
stack: frame={sp:0x7ff7bfeff168, fp:0x7ff7bfeff1b8} stack=[0x7ff7bfeef528,0x7ff7bfeff4c0)
0x00007ff7bfeff068: 0x01007ff7bfeff088 0x0000000000000004
0x00007ff7bfeff078: 0x000000000000001f 0x00007ff80ea95506
0x00007ff7bfeff088: 0x0b01dfacedebac1e 0x0000000000000001
POST /entrez/eutils/esearch.fcgi?tool=bookends&email=support@sonnysoftware.com&cmd=Search&db=pubmed&term=%2210.1016%2Fj.neuron.2014.06.003%22%5Bdoi%5D&retstart=0&retmax=1&doptcmdl=xml HTTP/1.1
Host: eutils.ncbi.nlm.nih.gov
Accept: */*
Connection: keep-alive
Cookie: ncbi_sid=1ADA87F701B058A8_ADDBSID
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0 Safari/605.1.15
Accept-Language: en-us
Content-Length: 0
Accept-Encoding: gzip, deflate, br
@iandol
iandol / Testing.log
Created August 9, 2021 06:02
Testing PsychVulkan on a macOS 11 2015 iMac, commenting out line 592 of PsychVulkan.m
>> clear all
>> PsychVulkan('Verbosity', 9)
PTB-INFO: Connection to Psychtoolbox kernel support driver instance #0 (Revision 1) established.
ans = 3
>> VBLSyncTest(10, [], [], [], [], [], [], [], true, 0)
ans = 0
PsychVulkanCore-INFO: At startup there are 12 Vulkan instance extensions available.
PsychVulkanCore-INFO: Found and enabled 0. instance extension 'VK_KHR_surface'.
PsychVulkanCore-INFO: Found and enabled 1. instance extension 'VK_KHR_get_surface_capabilities2'.
PsychVulkanCore-INFO: Found and enabled 2. instance extension 'VK_KHR_external_memory_capabilities'.