Skip to content

Instantly share code, notes, and snippets.

View oliviano's full-sized avatar

Olivier Jean oliviano

  • New Zealand - Waiheke Island
View GitHub Profile
# INTRO #
Goal is to run circuit python on raspberry pi , and read sensor / IO and then send those value via UDP
### INSTALL STEPS ###
1) Follow the guide from adafruit [link](https://learn.adafruit.com/circuitpython-on-raspberrypi-linux/installing-circuitpython-on-raspberry-pi)
2) Test Install `ls /dev/i2c*` should return something. ( i had to cd to root dir first)
2) Test "blinka". as per guide: [link](https://learn.adafruit.com/circuitpython-on-raspberrypi-linux/installing-circuitpython-on-raspberry-pi), note: reactivate venv if it was used on install, elsewise module will fail to be found.\
`source env/bin/activate`
3) Install SeeSaw\
## AE EXPRESSION COLLECTION ##
#### WIGGLE LOOP ####
```
freq = 1;
amp = 110;
loopTime = 3;
t = time % loopTime;
wiggle1 = wiggle(freq, amp, 1, 0.5, t);
### Using ImageMagick:
`convert image.webp image.png`\
If you want to convert a whole directory:\
`convert *.webp -set filename:base "%[basename]" "%[filename:base].png"`
# SYSADMIN NOTES #
### OVERVIEW ###
- Create Unattened Install Aka a "Solution File" ( Pre-set Image with computer name, account name, install options etc..)
- Customize Install ( Windows 11 in particular ) with handy dandy PS Tools.
- Winget ( Windows builtin package manager to silently install basic packages / software from powershell)
- ToDO: Script for Network Config, AE / C4D / Ue Tools & Presets, python ven's etc.
## UNATENDED INSTALL ##
Use the link to create a xml file, place it anywhere ( root is good ) of the USB disk.\
[WebWizard Unattended Generator ](https://schneegans.de/windows/unattend-generator/)
# NETWORK SHARE
### Create a mapped network drive
`New-PSDrive –Name “Y” –PSProvider FileSystem –Root “\\10.10.2.100\ofmd_content” –Persist`
`New-PSDrive –Name “Z” –PSProvider FileSystem –Root “\\10.10.2.100\ofmd_production” –Persist`
### Check for mapped drives
`Get-PSDrive`
# TD SNIPS
A collection of usefull snippets.
## COMPS
- `me.inputComps` Gets connected Parent ( top connector )
- list of childrens of a comp or containers:
```
a = op('Floating_01')
childsList = a.panelChildren
--- Change Coordinate System ---
If you are only changing the handedness then you just need to scale the axis you want to switch. In this case scale in -1.0 in Z.
However what this also does is change the winding of your polygons.
When a polygon’s normal is facing the camera, TD expects the polygon’s vertex winding to be counter-clockwise.
Scaling by -1.0 in only one axis direction will cause the polygon windings to be reversed
so now the face with the normal pointing out will be clockwise.
You need to fix this using a Vertex SOP to re-reverse the winding. Otherwise your lighting won’t work correctly.
# Run Command
myOP = op('dasOp')
myOp.run()
run(myOp, delayFrames = 10)
run( some_script, delayMilliSeconds = 10 ) # milli = option
#Pulse with frame args
myOp.par.myParam.pulse(1, frame=10)
#nice run + format example:
https://docs.python.org/3/library/statistics.html
https://docs.python.org/3.4/library/statistics.html
https://www.geeksforgeeks.org/python-non-central-t-distribution-in-statistics/?ref=rp
https://numpy.org/doc/1.18/reference/generated/numpy.percentile.html#numpy.percentile
-plotting / charting
https://plotly.com/python/v3/plot-data-from-csv/
#format command
print('my super duper variable is {} and it is currently setting at: {}' .format(x,y))
# with ordered fetching
{1} {2} for ordered element fetching aka print('my super slinky {2} and {1}'.format(bobs,bits))
#Re
opName = 'my fucketed up;sdf 1234 string$'
opName2 = re.sub('\W+','_', opName)