teleren/devto huggingface dataset:
ChatGPT: Revolutionizing Medical Data Extraction from Images
Tags: chatgpt
Published: 2023-10-05 23:46:32

At [Care](https://github.com/coronasafe/care), we've made strides in integrating medical devices into our system for seamless data capture. This integration considerably minimizes the manual data entry tasks for nurses.

Our team has developed middleware to translate HL7 data from these devices into a format suitable for Care's requirements. As a result, we have pioneered the creation of digital central nursing stations. These stations can be accessed remotely and are equipped to trigger alerts and dispatch event-based notifications.


![Central Nursing Station](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m0pz1s6mutyl541ledb5.png)

However, our journey has been fraught with challenges. The majority of device vendors utilize proprietary data formats, often coupled with outdated data ports. What's more, the lack of documentation for these proprietary data schemas has made the development of open-source adapters a formidable task.

These challenges steered us towards exploring innovative solutions to capture data and further ease the nurses' workload. An idea we found promising involved utilizing the cameras integrated into our system. Given that these cameras have presets to capture clear views of patient monitors for remote assessments by doctors, we believed they might have another crucial application.

Our initial experimentation involved developing a simple service that could remotely adjust the cameras in each patient's room to the monitor preset. It would then take a snapshot and forward it for processing. Our team delved deep into testing multiple open-source image sets of 5-para monitors, combined with various OCR models, to extract the necessary data from these images.

Despite months of research and experimentation, our success was limited. But a breakthrough came unexpectedly when an intern in our team processed the OCR-generated JSON through ChatGPT. Remarkably, ChatGPT could easily identify and extract the required values from the OCR JSON.

Following this discovery, we further explored ChatGPT's capabilities with direct image processing. The results? Astonishingly accurate and efficient. It became evident that we had invested months trying to devise the perfect OCR model and image processing strategies when, in reality, an API call to ChatGPT would suffice.

![Chat GPT Vison](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6k1dlk4gnk7edqj4y8ez.jpeg)

Even in its experimental phase, Multimodal Generative AI models have showcased their potential to transform our data extraction methodologies. It offers a simplified approach to what were once intricate challenges, opening doors from accurately capturing hourly monitor readings to potentially turning lab report images into structured data. As we journey further into the domain of AI and eagerly await the advent of GPT-V, we remain excited about the forthcoming innovations that promise to elevate and redefine patient care.
You must know the difference between Unknown and Any in Typescript
Tags: webdev, typescript, beginners, tutorial
Published: 2023-10-05 23:25:51

Hey everyone,

I wrote an insightful [article](https://bluesockets.com/typescript/unknown-vs-any/) comparing TypeScript's `unknown` and `any` types. These types come in handy when we're dealing with variables of uncertain or dynamic types.

**Unknown Type**
Introduced in TypeScript 3.0, `unknown` is a safer alternative to `any`. It represents a value that can have any type, but with stricter type checking. This means you can't directly assign or access properties/methods on `unknown` variables without proper type assertions or checks.

**Any Type**
On the other hand, `any` is the most flexible type in TypeScript. It essentially bypasses type checking, allowing variables of this type to be assigned to any value or type without causing compilation errors.

**Use Cases and Advantages:**

**Unknown:**
- Improved type safety
- Refinement through narrowing
- Interoperability with JavaScript

**Any:**
- Rapid prototyping
- Migration from JavaScript to TypeScript
- Working with complex third-party libraries

**Pitfalls and Best Practices:**

**Pitfalls of Unknown:**
- Code can become verbose due to additional type checks and assertions.
- Deeply nested type checks can lead to complexity.
- Failing to perform proper type checks can still result in runtime errors.

**Pitfalls of Any:**
- Lack of type safety, which can lead to subtle bugs.
- Loss of type information, affecting development efficiency.
- Reduced maintainability as codebase grows.

**Best Practices:**
- Prefer `unknown` over `any` for flexibility with type safety.
- Utilize type guards and assertions with `unknown`.
- Gradually replace `any` with more specific types during migration.
- Provide clear documentation when using `any`.
- Enforce code reviews to catch improper usage.

In conclusion, both `unknown` and `any` have their specific purposes. Don't forget to visit the [article](https://bluesockets.com/typescript/unknown-vs-any/) for in-depth explanations.

What are your thoughts on this? Do you find yourself using one type more than the other in your projects? Let's discuss!
Extracting a time into select menus with PHP
Published: 2023-10-09 12:41:55

---
title: Extracting a time into select menus with PHP
published: true
date: 2023-10-05 23:00:00 UTC
tags: 
canonical_url: https://dcblog.dev/extracting-a-time-into-select-menus-with-php
---

When storing time in a database, often I'll store this in a time format such as `14:25:00` When populating this in a form I'll either use a time picker or use a plain select menu a separate menu for each element.

That begs the question how do you separate the time into seperate elements?

Making use of `explode` can work. Exploding where there a `:` so:

```php
$parts = explode(':', '14:25:00');
```

This would result in an array:

```php
[
    "14",
    "25",
    "00",
]
```

To use an element you can refer to its index for example `$parts[0]` would contain `14`

Using them by their index is fine to do but kinda messy.

I prefer to give each element a name using the `list` function

```php
list($hours, $minutes, $seconds) = explode(':', '14:25:00');
```

When using `list()` passing an array to it will allow you to name each index of the array in the order listed.

Putting this into practice I like to define the null versions before using list to ensure the variables will exist.

```php
$estimatedTime = 14:25:00;

$estimatedHour = null;
$estimatedMinute = null;
$estimatedSeconds = null;

list($estimatedHour, $estimatedMinute, $estimatedSeconds) = explode(':', $estimatedTime);
```

Now we have the variables that can be used in select menus:

> note I'm using Blade syntax here for readability.

```php
<select name="estimatedTime_hour">
    <option value="0">Hours</option>
    @foreach(range(0,23) as $hour)
        <option value="{{ $hour }}" {{ old('estimatedTime_hour', $estimatedHour) == $hour ? 'selected=selected' : '' }}>{{ $hour }}</option>
    @endforeach
</select>

<select name="estimatedTime_minute">
    <option value="0">Minutes</option>
    @foreach(range(0,59) as $minute)
        <option value="{{ $minute }}" {{ old('estimatedTime_minute', $estimatedMinute) == $hour ? 'selected=selected' : '' }}>{{ $minute }}</option>
    @endforeach
</select>

<select name="estimatedTime_second">
    <option value="0">Seconds</option>
    @foreach(range(0,59) as $second)
        <option value="{{ $second }}" {{ old('estimatedTime_second', $estimatedSeconds) == $hour ? 'selected=selected' : '' }}>{{ $second }}</option>
    @endforeach
</select>
```

For each time segment I have a separate select menu. Each selection uses a `range` function to generate an array of items. For example, `range(0,23)` will return an array containing all numbers between 0 and 23.

To ensure the time segment selects the correct array index inside the loop compare the the row against the time segment:

```php
$estimatedSeconds == $hour
```

When they match then print selected=selected to ensure the menu selects that time segment.

This is a simple but powerful pattern.
NativeRest 1.4.0 is out! (REST API client for Windows)🎉
Tags: webdev, programming, rest, startup
Published: 2023-10-05 22:53:17

Hi there 👋

For more than 2 years I have been developing a native REST API client for Windows. Now I am happy to announce version 1.4.0 of NativeRest.

I suggest you see how fast NativeRest works on your PC. Desktop application is not using Electron, Chromium, Node.js and JavaScript Frameworks. NativeRest runs fast, uses less memory and CPU. The memory savings when using NativeRest are up to 95% compared to Electron based REST Clients.

There are more changes in this release than usual.
✅ Automatically switch light and dark themes
✅ Use system language by default
✅ Added dark theme for the installer
✅ Added password toggle button
✅ Added confirm email window
✅ Added reset password window
✅ Added line counters on tabs
✅ Ability to switch response view (raw and pretty)
✅ Display images in the response
✅ Added response MIME-type

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rum77juffjqloj5u75fh.png)

You can download from [https://nativesoft.com/nativerest](https://nativesoft.com/nativerest)

To see the full list of improvements, check out the [release notes](https://nativesoft.com/changelog). Found a bug or have an idea for a new feature or implementation? Share your feedback with us in the comments, on [Twitter](https://twitter.com/nativesoftcom), or in our [issue tracker](https://github.com/nativesoftcom/nativerest).

Happy developing! 🚀
Day 826 : Brace Ya Self
Tags: hiphop, code, coding, lifelongdev
Published: 2023-10-05 21:31:56

_liner notes_:
- Professional : Logged into the day with a request to prioritize looking at a demo that someone created. Before that I had a couple of back to back meetings. Got to demo a new Web Component that I published that other people on the team can use. After the last meeting, I went back to work on reviewing the demo. Made some minor changes so that it's inline with other demos in the repo. Got the changes submitted. Responded to some community questions. Went back to converting a tutorial demo to use a new SDK. Had some questions, so I asked the team and then it was time to call it a day.

- Personal : Last night, I went through some tracks for the radio show. Looked into some layout ideas I have for my next side project. Trying to figure out which one to go with for the front page or maybe try something new. There have been some interesting new APIs released in browsers that I may want to try out. I'm using the View Transitions API already in Astro. Watched the final Bleach episode of the season and went to sleep.

![View from above of the coast of Cape Reinga, New Zealand with a strip of land with a mountain range extending into blue water with waves crashing on the shore's beach under a sky filled feather like white clouds](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/629nyxxwmkumn4v0tfo0.jpg)

Going to go through projects on Bandcamp so that I can purchase them tomorrow (Friday) since it's Bandcamp Friday where artists get more from each sale. I'll probably pick the one's I'll buy and get the social media posts ready tonight. The new season of Loki starts tonight. Brace ya self, the promos look like it'll be a wild ride! Probably end up watching that and going to bed. If there's any spare time, I want to try some stuff out with my side project.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube 7SDd9a_djr8 %}
Seehdfilm
Published: 2023-10-05 22:47:56

Günümüzde [Kült film izle](https://seehdfilm.us/sinefilm/category/kult-filmler-izle)me sanat dalı haline gelen sinema oldukça popüler bir hal aldı. Sinemanın artışı ile sinema alanında canlılık meydana gelerek ekonomiye [film izle](https://seehdfilm.us) de [hd film izle](https://seehdfilm.us) canlılık katmıştır.
Do not take part in Hacktoberfest, unless...
Tags: opensource, programming, tutorial, discuss
Published: 2023-10-05 22:40:19

## Short about Hacktoberfest
Hacktoberfest is a month long event organized by DigitalOcean and other partners. The mission of this event is to celebrate open source and open source community, everyone can participate and contribute to the selected projects and thus support hardworking contributors and maintainers. If you want to learn more visit: https://hacktoberfest.com/

## Do not take part in Hacktoberfest
... for a tshirt and stickers. Big part of open source community disapproves Hacktoberfest because of pull requests like this one:

{% embed https://x.com/DenverCoder1/status/1580579259726249985?s=20 %}

Maintainers of open source projects are busy and overworked enough without spam PRs, let's at least try to respect their time and effort.

## How to really help?
**Have you ever created an issue on some OSS repository?** Revisit it maybe other people have similar problems, check if you could work on it. Do it even if project do not take part in hacktoberfest. Resolving issues with the tag "hacktoberfest" is not the point of this event, the point is to support OSS maintainers and contributors.

**Have you encountered some problems worth investigating while using open source software?** Investigate, try to find the root cause, help in triage and try to resolve it.

If you are new to opensource and want to use hacktoberfest to start contributing, look for "hacktoberfest" and "good first issue" tags on issues. In general maintainers are helpful if your interest in contributing is genuine.

## Few projects to look into
Odigos: https://github.com/keyval-dev/odigos/issues
LangChain: https://github.com/langchain-ai/langchain/issues
OpenTelemetry: https://github.com/open-telemetry
Jeager: https://github.com/jaegertracing/jaeger/issues
Reasons Why you Should use TypeScript in Strict Mode
Tags: codenewbie, beginners, typescript, webdev
Published: 2023-10-05 22:34:45

Hey everyone,

I wrote an interesting [article](https://bluesockets.com/typescript/should-you-use-strict-mode-in-typescript/) discussing the use of strict mode in TypeScript. For those unfamiliar, TypeScript is a superset of JavaScript that adds static types to the language, allowing for catching errors during development. 

Strict mode, in particular, enforces stricter type-checking rules, which can lead to more reliable and maintainable code. The article highlights some key advantages:

1. **Early Error Detection:** With strict mode enabled, TypeScript can catch potential issues before your code even reaches the runtime environment. This leads to a more robust codebase and reduces the likelihood of runtime errors.

2. **Improved Code Quality:** It encourages writing cleaner, more reliable code. Being explicit about types can lead to better documentation and easier code maintenance, particularly beneficial for larger projects with multiple contributors.

3. **Enhanced Refactoring:** When making changes to your code, TypeScript provides more accurate feedback on how those changes impact the rest of your application. This can save a significant amount of time in the long run.

4. **Better Collaboration:** In a team setting, strict mode can be a game-changer. It provides a shared understanding of the codebase, reduces misunderstandings among team members, and encourages consistent coding practices.

However, there are also [some potential drawbacks](https://bluesockets.com/typescript/should-you-use-strict-mode-in-typescript/#drawbacks) to consider such as the learning curve and integration with an existing codebase.

In terms of when to use strict mode, it's highly recommended for new projects as it provides a solid foundation for building reliable and maintainable code. For existing projects, a phased approach to gradually introduce strict mode might be a good strategy.

What are your thoughts on using strict mode in TypeScript? Have you had any experiences, positive or negative, with it in your projects?

Source: [Link to the article](https://bluesockets.com/typescript/should-you-use-strict-mode-in-typescript/)

Looking forward to hearing your opinions!
My Experience: Working with Draft Pull Requests
Published: 2023-10-05 21:59:15

## First Step: Finding a Problem
I began by raising an issue on the project mentioning that I'm planning to add a new feature to the project. The project was an application to convert txt/md to html. I planned to add a parser argument `--config` and a logic to parse config files to get the values of flag supported by the program.

## Draft Pull Request: A Game-Changer
Working on this project also introduced me to the concept of a Draft Pull Request (PR). This feature allowed me to work openly and transparently, signaling that my PR was a work-in-progress. The draft PR served as a visual representation of my progress, a testament to the work accomplished, and the work that lay ahead. I had an option to mark my PR ready for review whenever I was done with the changes.

## Collaboration and Patience
The collaboration didn’t end with my changes; it extended to reviewing the work of others. I found myself collaborating with my peers, navigating their code, and providing feedback. 
I myself, reviewed someone's PR on my project and commented some changes required. I forgot to implement an output flag handling in the PR I created. I received a change request and then worked on it. This part gave me an experience of proper reviewing , collaboration and adding more commits to a previous PR.

## Things I newly learned by working on this lab

### Reviewing and testing via remotes:

In this lab, I mastered the art of reviewing and testing code changes via Git remotes. Adding a remote repository from a fellow student allowed me to fetch their work locally. I then set up a tracking branch, creating a direct link to their progress. I used the command below to create a remote locally:

```
git remote add <name-of-student> <https://git-url-of-other-studnet-fork.git>
```

I used `git fetch <name-of-student>` to retrieve all the code changes so that I can test them locally without merging.

To facilitate effective collaboration, I created a tracking branch. This branch served as a direct link to the other student's progress. Using the command:

```
git checkout -b <branch-name> <name-of-student>/<branch-name>

```

### Merging a PR locally

After I reviewed the changes above using the steps above. I merged it locally using the commands below:

```
$ git fetch <name-of-student>
$ git checkout main
$ git merge <student-name>/issue-6
$ git push origin main
```

## References
Link to the PR I created : [My PR](https://github.com/mingming-ma/txt2html/pull/12)
Link to the PR that was created on my project : [PR12](https://github.com/Rachit1313/txtToWeb/pull/12)
Guide to becoming a data scientist
Published: 2023-10-05 21:52:33

Build a Solid Foundation in Statistics and Mathematics:

Start with developing a strong foundation in mathematics, namely in probability, calculus, and linear algebra.
Learn statistics to understand ideas like regression analysis, probability distributions, and hypothesis testing.
Learn how to manipulate data and programme:

Select a popular programming language for data science, such as Python or R.
Learn how to manipulate and visualise data using R and Python libraries like dplyr and ggplot2 or Python libraries like NumPy, Pandas, and Matplotlib.
Learn how to use deep learning and machine learning:

Learn the principles of supervised and unsupervised machine learning methods.
Learn about deep learning frameworks for modelling neural networks, such as TensorFlow and PyTorch.
Develop Your Data Analysis and Visualisation Skills:

Learn effective data cleaning and preprocessing techniques.
Improve your data visualisation abilities by employing

Develop Domain Knowledge: To better understand particular data difficulties and requirements, specialise in a particular business or domain of interest (such as healthcare, banking, or e-commerce).

Create a Powerful Portfolio:
Develop a portfolio by working on real data projects to show off your abilities.
Make a personal website or blog and post your work on websites like GitHub.
Starting my journey to the cloud!
Tags: career, cloud, aws
Published: 2023-10-05 21:29:39

Hi all!

I am starting this blog to document my journey to learning and practicing cloud technologies. 

I want to get some more hands on projects under my belt, so I'm going to start with the Cloud Resume Challenge (https://cloudresumechallenge.dev/docs/the-challenge/aws/#2-html).

I have two certifications so far that I've earned while working, 
Microsoft Certified: Azure Fundamentals and AWS Solutions Architect - Associate. I am working on studying to re-certify my AWS certificate since I earned that in 2017 and it's expired since then. 

I'm going to do my best to keep this updated with my progress and things I've learned, so stay tuned!
Agora você vai entender como o java funciona
Tags: beginners, java, braziliandevs, learning
Published: 2023-10-05 21:22:57

### Vou tentar explicar de forma simples como o Java funciona.

☕️ **Código Java**: O Java começa com o código fonte, que é escrito por um programador em um arquivo com extensão .java.

![Metodos exemplo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bz6qf1hc62csedon4eqd.png)

_Não esqueça de deixar seu like_ ❤️

------------------------

🔄 **Compilação**: Em seguida, o código Java é compilado usando o compilador Java (javac). Isso cria um arquivo chamado bytecode.

-----------------------
 
📦 **Bytecode**: O bytecode é uma forma intermediária de código que é independente da plataforma. Ele é armazenado em um arquivo .class.

-----------------------

🖥️ **Máquina Virtual Java (JVM)**: Agora, a JVM entra em ação. Ela é responsável por executar o bytecode em qualquer sistema operacional que tenha uma JVM instalada.

-----------------------

🚀 **Execução**: A JVM interpreta o bytecode e executa o programa Java, produzindo resultados na tela ou realizando tarefas específicas.

-----------------------

🧹 **Coleta de Lixo (Garbage Collection)**: A JVM também gerencia a memória, incluindo a coleta de objetos não utilizados para liberar recursos.

-----------------------

📦📦 **Bibliotecas**: O Java também inclui bibliotecas (conjuntos de código pré-escrito) para ajudar os desenvolvedores a realizar tarefas comuns, como entrada/saída de dados, manipulação de strings, etc.

-----------------------

🌍 **Plataforma Cruzada**: Uma das vantagens do Java é sua capacidade de ser executado em diferentes sistemas operacionais, graças à JVM.

-----------------------

🌟 **Resultado**: O programa Java fornece o resultado desejado ao usuário final!

-----------------------

**Resultado**

Resumindo, o Java é uma linguagem de programação que usa a JVM para tornar o código independente da plataforma, permitindo que os desenvolvedores criem programas que funcionem em várias máquinas diferentes.

Repositório com a trilha de java: https://github.com/antoniorws/basic-java
Intention - a motivational speech by Apple
Tags: motivation, watercooler
Published: 2023-10-05 21:01:08

I just wanted to share a motivational quote from the WWDC opening in 2013. Let me explain. In 2013, at the opening ceremonies of WWDC (WorldWideDeveloperConference) Apple showed the video below: {% embed https://www.youtube.com/watch?v=LcGPI2tV2yY %} It was called Intention. It is a beautiful speech and I just wanted to share it with you 10 years later. It goes like this. I hope you find this motivating.

> 
If everyone is busy making everything, how can anyone perfect anything? We start to confuse convenience with joy. Abundance with choice. Designing something requires focus. The first thing we ask is: What do we want people to feel? Delight. Surprise. Love. Connection. Then we begin to craft around our intention. It takes time. There are a thousand no’s for every yes. We simplify, we perfect, we start over, until everything we touch enhances each life it touches. Only then do we sign our work: Designed by Apple in California.

I hope you enjoy it.