Version
- alembic: 1.12.0
- python: 3.11
- Sqlalchemy: 2.0.22
| #!/usr/bin/python | |
| import sys | |
| import time | |
| import smbus | |
| import gpiozero | |
| class BH1750(): | |
| """ Implement BH1750 communication. """ |
| #!/usr/bin/python | |
| # from https://gist.githubusercontent.com/johnwargo/ea5edc8516b24e0658784ae116628277/raw/cb9eb3bcb2121b2a67b51a684a88e5f93a0ef4d0/relay-test.py | |
| # A simple Python application for controlling a relay board from a Raspberry Pi | |
| # The application uses the GPIO Zero library (https://gpiozero.readthedocs.io/en/stable/) | |
| # The relay is connected to one of the Pi's GPIO ports, then is defined as an Output device | |
| # in GPIO Zero: https://gpiozero.readthedocs.io/en/stable/api_output.html#outputdevice | |
| import sys |
| #!/usr/bin/python | |
| #-------------------------------------- | |
| # FROM: | |
| # - https://www.raspberrypi-spy.co.uk/2015/03/bh1750fvi-i2c-digital-light-intensity-sensor/ | |
| # - https://bitbucket.org/MattHawkinsUK/rpispy-misc/raw/master/python/lcd_i2c.py | |
| #-------------------------------------- | |
| # ___ ___ _ ____ | |
| # / _ \/ _ \(_) __/__ __ __ | |
| # / , _/ ___/ /\ \/ _ \/ // / | |
| # /_/|_/_/ /_/___/ .__/\_, / |
I hereby claim:
To claim this, I am signing this object:
| package es.pp.jm.utils; | |
| import java.io.FileOutputStream; | |
| import java.net.URL; | |
| import java.nio.channels.Channels; | |
| import java.nio.channels.ReadableByteChannel; | |
| public class DownloadVideoFromInternet { | |
| // http://stackoverflow.com/questions/921262/how-to-download-and-save-a-file-from-internet-using-java |
| public abstract class ListComparator<B> { | |
| /** | |
| * Only compare elements must not change, like id. | |
| * | |
| * @param left | |
| * @param right | |
| * @return | |
| */ | |
| protected abstract boolean isEqualsBeans(B left, B right); |
| package net.pp.jm.cxf.interceptor.persist.client; | |
| import java.io.IOException; | |
| import java.io.InputStream; | |
| import java.io.PrintWriter; | |
| import java.io.StringWriter; | |
| import java.util.Date; | |
| import org.apache.cxf.helpers.IOUtils; | |
| import org.apache.cxf.interceptor.Fault; |
| package net.pp.jm.spring.oxm.config.test; | |
| import java.io.File; | |
| import java.io.IOException; | |
| import java.util.Collection; | |
| import org.apache.commons.io.FileUtils; | |
| import org.junit.Test; | |
| public class ListDirectoryTest { |
| public static void addProxy(String user, String pass, String host, String port) { | |
| if(user!= null && pass != null) { | |
| final String authUser = user; | |
| final String authPassword = pass; | |
| Authenticator.setDefault( | |
| new Authenticator() { | |
| public PasswordAuthentication getPasswordAuthentication() { | |
| return new PasswordAuthentication( |