Wednesday, January 26, 2022

Show HN: Convert image below a particular filesize online https://ift.tt/3tZewh6

Show HN: Convert image below a particular filesize online https://ift.tt/3KKeKyz January 26, 2022 at 09:01AM

Show HN: Random Data Generator for arbitrary data types https://ift.tt/345RVob

Show HN: Random Data Generator for arbitrary data types Datasino is a command line tool that can come handy when load testing a service or database. Give it a data schema (many compound types supported, including recursive types), an encoding (JSON, CSV or ClickHouse) and a target (a file or a Kafka partition) and a data rate and it will generate a reasonably optimized (native code) random data source. See the top of the README for some examples. If you have any ideas on how to extend this tool so that it's useful to more people, please let me know. https://ift.tt/3IBKh42 January 26, 2022 at 05:08AM

Show HN: SPyQL – SQL with Python in the middle https://ift.tt/3H67TgS

Show HN: SPyQL – SQL with Python in the middle SPyQL ( https://ift.tt/3rJfzPE ) is SQL with Python in the middle, an open-source project fully written in Python for making command-line data processing more intuitive, readable and powerful. Try mixing in the same pot: a SQL SELECT for providing the structure, Python expressions for defining transformations and conditions, the essence of awk as a data-processing language, and the JSON handling capabilities of jq. How does a SPyQL query looks like? $ spyql “ IMPORT pendulum AS p SELECT (p.now() - p.from_timestamp(purchase_ts)).in_days() AS days_ago, sum_agg(price * quantity) AS total FROM csv WHERE department.upper() == 'IT' and purchase_ts is not Null GROUP BY 1 ORDER BY 1 TO json” < my_purchases.csv In a single statement we are 1) reading a CSV (of purchases) with automatic header detection, dialect detection, type inference and casting, 2) filtering out records that do not belong to the IT department or do not have a purchase timestamp 3) summing the total purchases and grouping by how many days ago they happened, 4) sorting from the most to the least recent day and 5) writing the result in JSON format. All this without loading the full dataset into memory. The Readme is loaded with recipes and there is also a demo video: https://vimeo.com/danielcmoura/spyqldemo Any feedback is welcomed! Thank you. https://github.com/dcmoura/spyql January 25, 2022 at 10:59PM

Bus Testing on the New Van Ness BRT Corridor a Success

Bus Testing on the New Van Ness BRT Corridor a Success
By Nehama Rogozen

Muni and Golden Gate Transit staff recently conducted important bus operations testing that is an important step towards the Van Ness Bus Rapid Transit (BRT) corridor opening this spring. This testing included emergency turns and maneuvers, repositioning buses, verifying signals are working, clearances between passing buses and safe turns while bike racks are deployed.  

The training also included several staff. Traffic engineers made sure traffic and transit signals were working and reviewed street markings. Transportation planners coordinated closely with operations, training, engineering and construction staff to make necessary adjustments. Outreach staff and ambassadors answered questions and made sure customers knew testing was taking place. Field managers and operators provided suggestions for improvements based on experience.  

Since most Muni operators are new to operating a bus on a BRT corridor, operators will be trained on the new system over the coming weeks. To ensure that their training is as robust as possible, trainers from Muni and Golden Gate Transit participated in the testing activities to see what additional skills operators will need to learn.  

The Van Ness Improvement Project is bringing San Francisco’s first BRT corridor that will improve transit service and address traffic congestion on Van Ness Avenue, in addition to providing extensive utility upgrades, civic improvements and safety enhancements.  

We know that this project has been a long ride for the community, and we are eagerly preparing for several opening activities to celebrate the new BRT corridor. These will include a ribbon-cutting, lighting of the public light sculpture, family-friendly activities and ways to support Van Ness businesses.  

During testing, our ambassadors heard lots of positive feedback from people walking. A parent remarked that it would be easier to take her daughter to school on the bus, while someone else noted that an ambulance successfully used the red lanes to cut through traffic, saying, “Wow! I didn’t think about it until now, but I see how this is not only good for those of us riding the bus, but also really good for emergency services!” Someone else commented that the BRT system, despite delays, “was well worth the wait.” 

In the meantime, there remain a few more specific turns that need to be tested, so if you see buses in the median, please do not attempt to board them. Sidewalk signage is directing customers to the correct stops that are currently boarding from the sidewalk curb. We look forward to welcoming you aboard buses in the BRT corridor in just a couple of months.  

 Approximately twenty folks wearing yellow and orange safety vests pose in front of a Golden Gate Transit bus and a Muni bus on the red lanes. Van Ness buildings are visible in the background.

Staff from Muni and Golden Gate Transit in front of revenue vehicles before testing begins. 

A Golden Gate Transit bus and a Muni bus are parked next to each other in a red transit lane, with staff standing between the two buses. On each side of the platform, public artwork is visible. The public artwork is composed of tall balls in various colors attached to poles, curving in various directions. In the background are mostly housing complexes.

Staff measure passing distances between a Golden Gate Transit bus and a Muni bus at the Geary-O'Farrell BRT stop, where public artwork is being installed. 

The back of a firetruck is shown passing the side of a Muni bus at the intersection of Van Ness and Market.

A fire truck uses the red lanes to bypass traffic on Van Ness. 



Published January 26, 2022 at 03:35AM
https://ift.tt/3tYnE5D

Show HN: Run NPM Scripts with .envs https://ift.tt/3nXtFfa

Show HN: Run NPM Scripts with .envs https://ift.tt/385BtDS January 26, 2022 at 12:49AM

Show HN: A full AR helicopter action game built as a Snap lens https://ift.tt/3tYNAOp

Show HN: A full AR helicopter action game built as a Snap lens I built a complete game using Snap's AR platform in about 6 weeks. I'd been intrigued by Snap's AR ambitions and wanted to kick the tires on their platform. The YouTube video description contains a link to the Lens: https://ift.tt/3nYHo5b... How to play: - Joypad y axis moves the helicopter along the ray pointing from the camera. You can therefore tilt the phone up to fly "up". - Altitude is also controlled by aiming the phone. The helicopter tries to match the altitude of a point that is fixed in front of the camera. So you can move up by aiming up or by actually lifting the phone higher. - Joypad x axis strafes. - If you lose track of the helicopter, a blue arrow will appear after about 5 seconds. - Blow up enemies and try to stay alive :) How it works under the hood: - Loads of JavaScript. Lenses are surprisingly programmer-friendly. As a non-artist, this is great. Almost everything can be driven completely by code, although most creators opt to use pre-made components with minimal scripting. - The game uses a custom physics engine with OBB-based collision detections that I wrote from scratch. Snap now has integrated physics that seem to be based on PhysX (i.e., the same as Unity's) but this was released well into my development process after I had already rolled my own. - I opted not to use environmental mesh reconstruction because it is performance intensive and gives dubious results on lower-end phones. When I started development, it was only enabled for Lidar-based phones but is since available everywhere. - I instead detect horizontal planes using an API that Snap hasn't really documented. I found a snippet of code in their API docs and opened up the Lens Studio .exe to find the names of the other plane events I needed. - Planes are used to create collision boxes that extend to the floor so the helicopter can bump into furniture. - AI-controlled enemy helicopters plot routes using a heightmap generated from the plane data to avoid colliding with obstacles when possible. Takeaways: - This has arguably become my favorite AR prototyping platform. Much faster idea-to-PoC iteration time than anything else out there. - The platform is surprisingly full-featured. - The Lens Studio Editor is remarkably polished and, despite some bugs here and there, is very stable. - The deployment story is second to none. Deploying to the phone involves a single click and is done over the Internet (no need for any tethering or wireless pairing). - Debugging on-device is still challenging (all you can do is log a few lines) but I was assured that an actual debugger is coming soon. - Economic viability: unfortunately, it is not really possible to directly monetize lenses. Most creators contract with brands to create branded lenses. Future plans: - I'll definitely be keeping an eye on Snap's ecosystem. - No plans for any more full-fledged lenses but I do have some ideas for prototypes I'd like to try in anticipation of commercially viable mixed reality HMDs hitting the market soon (e.g., Meta's Project Cambria). - I may update the game with a tutorial mode and a co-located multiplayer mode (co-op play or PvP) provided I get the necessary support from the Snap dev team. Hope you enjoy and are inspired to dive into AR if you haven't already :D https://www.youtube.com/watch?v=O_1dJ_x7vXw January 26, 2022 at 12:57AM

Show HN: My new platform. Check it out https://ift.tt/3AvRHTq

Show HN: My new platform. Check it out This platform is an experimental social network solely based on soundclips. SONAR is meant to encourage genuine conversation and entertainment. I believe audio culture in the form of this app could create a community that is safe, smart, and more human than many of the current social media platforms. https://ift.tt/3H3weUf January 25, 2022 at 10:25PM

Show HN: Embedr – Agentic IDE for Arduino, ESP32, and More https://ift.tt/8o2SWI1

Show HN: Embedr – Agentic IDE for Arduino, ESP32, and More Hi HN, I’m building an agentic IDE for hardware developers. It currently supports...