
Research
/Security News
Malicious npm Packages Target WhatsApp Developers with Remote Kill Switch
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
ocf-data-sampler contains all the tools needed to create samples and feed them to our models, such as PVNet. The data we work with—typically energy data, satellite imagery, and numerical weather predictions (NWPs)—is usually too heavy to do this on the fly, so that's where this repo comes in: handling steps like opening the data, selecting the right samples, normalising and reshaping, and saving to and reading from disk.
We are currently migrating to this repo from ocf_datapipes, which performs the same functions but is built around PyTorch DataPipes
, which are quite cumbersome to work with and are no longer maintained by PyTorch. ocf-data-sampler uses PyTorch Datasets
, and we've taken the opportunity to make the code much cleaner and more manageable.
[!Note] This repository is still in early development development and large changes to the user facing functions may still occur.
ocf-data-sampler doesn't have external documentation yet; you can read a bit about how our torch datasets work in the README here.
If you have any questions about this or any other of our repos, don't hesitate to hop to our Discussions Page!
When creating samples, we make a spatial crop of a preset size centred around a point of interest (POI, usually a solar or wind farm). The size of the crop is set not in miles or kilometres, but in 'pixels', which would be different for different data sources, depending on their spatial resolution, projections they use, and where the POI is. For example, a latitude-longitude source with a 1° resolution will have pixel sizes corresponding to very different 'surface' distances (that you might measure in, e.g., kilometres) from a source with 0.1° resolution. The pixel size will even be different for the same source depending on how close the POI is to the equator!
Instead of trying to accommodate for all these differences and make all the sources use the same spatial grid, we translate the POI's position into the corresponding coordinate system and select the crop using the source's original grid. This 'snapshot' is then passed to the model with no additional information on what specific coordinates it represents; instead, since the size is always the same and the POI is always in the centre, the model gets consistent information on the measurements at a location near the POI and how it affects the target, without any explicit knowledge of where that location is in coordinate system terms.
You can install ocf-data-sampler for development as follows:
pip install git+https://github.com/openclimatefix/ocf-data-sampler.git
The tests in this project use pytest
. Once you have it installed, you can run it from the project's directory:
cd ocf-data-sampler
pytest
Thanks goes to these wonderful people (emoji key):
James Fulton 💻 | Alexandra Udaltsova 💻 | Sukhil Patel 💻 🐛 | Peter Dudfield 💻 | Vikram Pande 💻 | Unnati Bhardwaj 📖 | Ali Rashid 💻 |
Felix 💻 ⚠️ | Ajani Timothy 💻 | Rupesh Mangalam 💻 | Siddharth 💻 | Sachin-G13 💻 | Dorna Raj Gyawali 💻 | Adnan Hashmi 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!
Part of the Open Climate Fix community.
FAQs
Unknown package
We found that ocf-data-sampler demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
Research
/Security News
Socket uncovered 11 malicious Go packages using obfuscated loaders to fetch and execute second-stage payloads via C2 domains.
Security News
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.