teleren/devto huggingface dataset:
"Exploring Facial Secrets: Unveiling Skin Rejuvenation Techniques"
Published: 2024-03-26 21:58:56

Discover the secrets of [facials Highland Park](https://elitechicagofacials.com/facials-highland-park) and other skin rejuvenation techniques. From the innovative [Glow Facial Highland Park](https://elitechicagofacials.com/facials-highland-park) to the meticulous Nano Needling Highland Park the effective Microdermabrasion, these options deliver remarkable results for brighter and healthier-looking skin. Additionally, techniques such as lash extensions, microneedling, chemical peels, and dermaplaning also stand out for their benefits in improving skin appearance and texture, offering versatile options for every dermatological need.
Install and Run Image Intervention in Laravel
Tags: laravel, image, php, developer
Published: 2024-03-26 21:47:02

When presenting version 3, the Image Intervention package has seen many changes. codes from version 2 are not compatible with version 3 and need to be changed.


OK.

- Install Package Image Intervention :

```
composer require intervention/image
```

- in users table, create image field :

```
$table->string('image')->nullable();
```

- Creating Field image :

```
<div class="col-12">
    <label for="input8" class="form-label">Upload image</label>
    <input type="file" name="image" class="form-control rounded-5 @error('image') is-invalid @enderror" id="input8">
    @error('image')
       <span class="invalid-feedback" role="alert">
          <strong>{{ $message }}</strong>
       </span>
    @enderror
</div>
```

- in windows, enable imagick.so xampp extension. in linux Enter the following commands :

```
sudo apt install php-imagick
php -m | grep imagick
sudo systemctl restart apache2
```

- Creating Function saveImage in User.php :

```
use Intervention\Image\ImageManager;

public static function saveImage($file)
{
        if ($file){
            $name = $file->hashName();

            $smallImage = ImageManager::imagick()->read($file->getRealPath());
            $bigImage = ImageManager::imagick()->read($file->getRealPath());
            $smallImage->resize(256, 256, function ($constraint){
                $constraint->aspectRatio();
            });

            Storage::disk('local')->put('users/small/'.$name, (string) $smallImage->encodeByMediaType('image/jpeg', 90));
            Storage::disk('local')->put('users/big/'.$name, (string) $bigImage->encodeByMediaType('image/jpeg', 90));

            return $name;

        }else{
            return "";
        }
}
```

- Function Store in UserController.php :

```
public function store(Request $request)
{
        $image = User::saveImage($request->image);

        User::query()->create([
            'name' => $request->name,
            'email' => $request->email,
            'password' => bcrypt($request->password),
            'image' => $image,
        ]);

        return to_route('users.index');
}
```

- in config/filesystem.php Enter the following codes :

```
'local' => 
[
   'driver' => 'local',
   'root' => public_path('images'),
   'throw' => false,
],
```

- Show user's image :

```
@foreach($users as $index=>$row)
<figure>
       <img src="{{asset('images/users/small/' .$row->image)}}" class="rounded-4" width="52px">
</figure>
@endforeach
```

Good luck. :)
[LIVE DEMO] How to MacOS with a Command Palette like VS Code
Tags: apple, productivity, product, tutorial
Published: 2024-03-26 21:34:01


> -  Friend:  "Jean-Michel, what is this strange way you are using MacOS, basically never using the trackpad ? That looks like magic"
> - Me: **Alfred**. Any sufficiently advanced technology is indistinguishable from magic. 

{% embed https://www.loom.com/share/8243271e6a4e4fee82bc5826f927d454  %}

So today dear readers, I'm doing a live demo of **[Alfred](https://alfred.app/)** 
Alfred can replace a surprising number of productivity tools under one coherent roof.
Alfred is basically a command palette and platforms for plugins, just like
- VScode
- IntelliJ
- Unix itself

In this video you will see :
- Why Alfred matters
- Some of my favorite Alfred workflows. Workflows are available at  https://alfred.app/
- Core Alfred features : files, navigation, universal actions, snippets, web search, contacts, shell integration, 1password
- The magical searchable clipboard history which is truly a game changer



## <3 Sharing is caring
You can share this link directly in your favorite Slack / Discord / Whatever communities

https://www.loom.com/share/8243271e6a4e4fee82bc5826f927d454
Maximizing Effectiveness: Best Practices For Security Camera Installation
Published: 2024-03-26 21:30:50

When it comes to securing your property, effective security camera installation is essential. From commercial security to access control and intercom installation, implementing best practices ensures optimal performance and peace of mind. Let's delve into some key strategies to maximize the effectiveness of your security camera setup.

In commercial settings, such as offices, retail stores, and warehouses, strategic placement of Security Camera Installation f is critical. Identify high-traffic areas, points of entry, and vulnerable spots to determine the optimal camera locations. Aim to cover all angles and blind spots to provide comprehensive surveillance coverage. Additionally, consider factors like lighting conditions and potential obstructions when positioning your cameras for maximum effectiveness.

Integrating security cameras with access control systems enhances overall security by providing visual verification of access events. Install cameras near access points, such as doors and gates, to monitor entry and exit activity. This integration enables you to remotely monitor and manage access to your premises in real-time, improving security responsiveness and control.

[Winnetka Intercom installation](https://chicagosecuritypros.com/security-camera-installation-winnetka) serve as an invaluable tool for Commercial  and access management. When installing security cameras, consider integrating intercoms for seamless two-way communication with visitors and employees. Place intercom stations strategically at entry points to facilitate identification and screening procedures. This enables efficient communication and verification before granting access, further enhancing security protocols.

To maximize the effectiveness of your security camera installation, prioritize comprehensive coverage of your property. Assess the layout and potential [Security Camera installation Winnetka](https://chicagosecuritypros.com/security-camera-installation-winnetka) risks to determine the number and placement of cameras required. Aim to cover all entry points, perimeter boundaries, and critical areas to minimize blind spots and ensure uninterrupted surveillance. Additionally, adjust camera angles and positioning to optimize coverage and capture crucial details effectively.

Maintaining your security camera system is crucial for ensuring ongoing effectiveness and reliability. Schedule regular inspections, cleaning, and maintenance to keep cameras functioning optimally. Monitor camera feeds consistently to identify and address any issues promptly. Implement a proactive approach to system maintenance and monitoring to prevent potential security vulnerabilities and ensure continuous protection.
"Unlocking the Beauty Secrets: Glow Facial Treatments Unveiled"
Published: 2024-03-26 21:24:17

Discover the secrets behind [Glow Facial Old Norwood Park IL](https://elitechicagospa.com/spa-in-old-norwood-park-chicago-il/), a range of treatments designed to rejuvenate and revitalize the skin. From the innovative Nano Needling to the traditional Microdermabrasion, these procedures offer effective solutions to improve the health and appearance of your skin. Customized [facials Old Norwood Park IL](https://elitechicagospa.com/spa-in-old-norwood-park-chicago-il/) cater to the individual needs of each skin type, while lash extensions enhance the natural beauty of the eyes. Additionally, treatments such as Microneedling, Chemical Peels, and Dermaplaning provide deep skin renewal, leaving it soft and radiant.

In summary, Glow Facial provides a variety of options for skin care, from classic procedures to innovative techniques. With trained professionals and a personalized approach, these treatments will help you achieve healthy, glowing skin.
Future of LLM and OpenAI
Tags: discuss
Published: 2024-03-26 21:15:47

LLM and OpenAI is raging throughout the world since its establishment in 2023. Since then, many chatbots and ChatGPT providers have been developed and boosted software development. They give us all the possibilities of getting helped for our problems, daily lives and even software development. But is this the potential to drive the developers out of the world? ChatGPT is very clever and it even solves the problems that are hardly handled by experienced developers. What do you think of the future of LLM and OpenAI?
Final project part 1
Tags: dataengineering, data
Published: 2024-03-26 21:06:11

I've started my final project for Data Talks Club's [data engineering zoomcamp](https://github.com/datatalksclub/data-engineering-zoomcamp). I'm using the Massachusetts voter data from the Secretary of State, with names and addresses removed. The data consists of all the elections that every voter voted in, going back to 1970.

I had the data on a CD, from August 2022 when I ran for State Treasurer. It had the data files password encrypted. I had to call the office of the Secretary of State to get the password. I have an old laptop that can still read a CD. But the browser was too old to run the Google cloud console. So I downloaded the data onto an 8G thumb drive and then used a less old computer to move the data from the thumb drive to a Google cloud storage bucket. I could not unzip the files on the thumb drive. 8G was not enough memory.

I opened a python notebook in my virtual machine on GCP and was able to unpack the files after consulting with ChatGPT. I had to set my GOOGLE_APPLICATION_CREDENTIALS in the jupyter notebook and use cloud storage modules to unpack the data. I also had to install cloud storage.

Here's the code that I used to do that:

```
import os
import zipfile
from google.cloud import storage

# Initialize GCS client
client = storage.Client()

# Define GCS bucket and zip file path
bucket_name = 'cris-voter-data'
zip_file_path = 'voter_activity_20220828.zip'
destination_path = 'temp.zip'

try:
    # Get the bucket
    bucket = client.get_bucket(bucket_name)
    print("Bucket:", bucket)

    # Get the blob (file) from the bucket
    blob = bucket.blob(zip_file_path)
    print("Blob:", blob)

    # Define the destination path for the downloaded file
    destination_path = 'temp.zip'

    # Download the blob's content and write it to a file
    with open(destination_path, 'wb') as file:
        blob.download_to_file(file)
    
    print("Downloaded zip file to:", destination_path)

    # Check if download was successful
    if os.path.exists(destination_path):
        # Extract the zip file
        with zipfile.ZipFile(destination_path, 'r') as zip_ref:
            zip_ref.extractall('extracted_files')
        print("Successfully extracted zip file contents.")
    else:
        print("Failed to download zip file.")

except Exception as e:
    print("Error:", e)
```

So now I have 351 .txt files taking up 11G in a directory named "extracted_files" on my virtual machine. Next step is to use the python notebook to remove the names and street addresses, and to set them up in parquet files in Google cloud storage. I'm not sure whether I'll use a bucket or directly put them into BigQuery. I'm going to use dbt to transform them, join them with the district lists and make a fact table for visualizing the data.
The Importance Of Regular Cleaning Services For Maintaining A Healthy Environment
Published: 2024-03-26 20:59:06

Maintaining a clean and hygienic environment is crucial for promoting health and well-being in any setting. Whether it's a restaurant, office, or [house cleaning Hazel Crest IL](https://expresscleanco.com/commercial-cleaning-hazel-crest-il/) hold, regular  play a vital role in ensuring a safe and healthy space for everyone. Let's explore why regular cleaning services are so important and how they contribute to maintaining a healthy environment.

In restaurants, cleanliness is paramount to ensure food safety and customer satisfaction. Regular cleaning services help to prevent the spread of harmful bacteria and contaminants, reducing the risk of foodborne illnesses. From sanitizing kitchen surfaces to disinfecting dining areas, professional Restaurant Cleaning  services are essential for maintaining high standards of cleanliness and hygiene.

In office environments, where employees spend a significant portion of their time, cleanliness is essential for promoting workplace wellness and productivity. Regular office cleaning services help to remove dust, dirt, and allergens from the workspace, creating a healthier indoor environment. This, in turn, can reduce absenteeism due to illness and improve employee morale and productivity.

In households, regular cleaning services are essential for creating a clean and comfortable living environment. From dusting and vacuuming to mopping floors and cleaning bathrooms, professional house cleaning services help to maintain a high level of cleanliness throughout the home. This not only enhances the aesthetic appeal of the space but also contributes to the overall health and well-being of residents.

For busy individuals and families, hiring a maid service for regular [Cleaning Services Hazel Crest IL](https://expresscleanco.com/commercial-cleaning-hazel-crest-il/) can provide convenience and peace of mind. Professional maids are trained to efficiently clean and organize homes, allowing homeowners to focus on other priorities. Whether it's weekly, bi-weekly, or monthly cleaning, maid services help to ensure that homes are consistently clean and well-maintained.
Polymorphism and ES6
Tags: javascript, polymorphism, inheritance, oop
Published: 2019-08-10 20:24:10

Polymorphism is a core concept of object-oriented programming or (OOP).  It's what allows us to define not only the data type of a data structure, but also the types of operations that they use in javascript.  Using this provides the use of the same method on different objects.  With inheritance we can share these methods or override them.

Different types of inheritance include: Functional, Functional-shared, Prototypal, Pseudoclassical, and ES6.  As an example we will be using ES6 as our preferred inheritance type.  The first step is to create a super-class (or parent class) for our objects to inherit from.  This is done using the class keyword and placing our desired variables in its constructor. for example: 

![](https://thepracticaldev.s3.amazonaws.com/i/c80b0aa4mkhorw3q3fe9.png)

As you can see we created a variable for our Robot's model, color, and job as well as creating an identification method that will return our model.  Great, now that we can create a robot, lets get more specific.  This is where sub-classes (or children) come in.  We can create a child in ES6 using the extends keyword.

![](https://thepracticaldev.s3.amazonaws.com/i/foefi0x3q0y0xlc3hlii.png)

By using the super() method we can inherit variables and methods from our Robot class as well as create brand new ones.  We can see polymorphism in action when altering these inherited properties!

![](https://thepracticaldev.s3.amazonaws.com/i/rkgrrpq3ji0t9ymxpt5r.png)

To go one step further, we can create a sub-class of our sub-class (grandchildren if you will) to create additional customization using the same format.

![](https://thepracticaldev.s3.amazonaws.com/i/rfqw0ra3xc1hbf7k9dcl.png)

Here, we can see that we can even overwrite methods to preform other actions under the same method names.  

![](https://thepracticaldev.s3.amazonaws.com/i/qer86mf3tn1n8vkijpqx.png)

This is just another example of polymorphism!

So, in conclusion, ES6 is a great, easy way to create objects that share properties amongst one another.  It saves memory and time by cutting down on the amount of typing that is necessary, while removing redundant code.  This customization goes even further when using polymorphism to sculpt exactly what you want to be done!
Lessons from open-source: typeof alternative to get a variable type
Tags: javascript, opensource, react, nextjs
Published: 2024-03-26 20:43:49

This lesson is picked from [Next.js source code](https://github.com/vercel/next.js/blob/canary/packages/next/src/shared/lib/is-plain-object.ts#L5). In this article, you will learn how Next.js checks if an error is plain object and why such a check is necessary.

I was exploring [is-error.ts](https://github.com/vercel/next.js/blob/canary/packages/next/src/lib/is-error.ts#L12) and found isPlainObject imported at the top of the file.

![experiment image](https://media.licdn.com/dms/image/D4E12AQG8hNOGo-5AuA/article-inline_image-shrink_1500_2232/0/1711485055212?e=1717027200&v=beta&t=_9n7uXKPmP7DPlmKNntYiBrf0L7-B5akNIuNaHf4xy0)

How do you usually check if a variable is an object? I would just do typeof variable == “object”, but this also means when you do typeof array, it returns object. So is there a better way? yes there is.

![function](https://media.licdn.com/dms/image/D4E12AQFVcISXFr7puw/article-inline_image-shrink_1500_2232/0/1711485058694?e=1717027200&v=beta&t=t3ETAVHlcqtP0VGz3xs2RCG6u6bAtogZVFc0NiiPAD4)

I found this function in [is-plain-object.ts](https://github.com/vercel/next.js/blob/canary/packages/next/src/shared/lib/is-plain-object.ts#L5). The answer you are looking for is in what is returned from the above function. Object.prototype.toString.call(value)

Experiments:
------------

![functioncall](https://media.licdn.com/dms/image/D4E12AQHDDlsUtK3CgQ/article-inline_image-shrink_1500_2232/0/1711485055205?e=1717027200&v=beta&t=afY_Sn8cREU70v36xifkv9g3MYs8obl0MDoveenmpS8)

This is quite the alternative to check if a variable type is an object or an array. This is the first time, I am discovering this.

> [_Practice the exercises based on documentation_](https://tthroo.com/) _to become an expert in Next.js._

Now you would do some check like

if (getObjectClassLabel(value) !== '\[object Object\]')

Looks hacky? atleast I felt like it, but I have my assurance that this is not hacky because this is what Next.js source code has.

![function call](https://media.licdn.com/dms/image/D4E12AQHw_B6_7Qd39Q/article-inline_image-shrink_1500_2232/0/1711485055124?e=1717027200&v=beta&t=wbaPpl-wryGwpJg4BRwMISFHiKfrR_Z00f3d-ncpQd0)

Conclusion:
-----------

You can call [Object.prototype.toString.call](http://Object.prototype.toString.call)(variable) to check if the variable type is an object or array because this returns \[object Array\] or \[object Object\] unlike what you see when you use typeof variable, that returns “object” for an array as well.

It seemed a bit odd for me to check for “\[object Object\]” in the “if” block, that is because I am used to typeof == “object”. I can now confidently add a check like “if (getObjectClassLabel(value) !== ‘\[object Object\]’)” because I have learnt that elite devs do it this way in the Next.js source code. It is about confidence ;)
How Does npx Actually Work and When to Use It
Tags: npm, node, frontend, javascript
Published: 2024-03-26 20:34:56

If you work with Node.js, you've likely encountered the handy `npx` command. This article dissects its functionality and sheds light on optimal use cases. Let’s dive in!

##What is `npx`?

`npx` stands for **Node Package eXecute**. This command-line utility, bundled with npm version 5.2.0 and above, allows developers to execute Node.js packages directly from the npm registry without globally installing them on your system.

##How Does `npx` Work?

1. **Checks for Local Installation:** When you run `npx <package-name>`, `npx` first looks for a local installation of the package in your project.

2. **Executes if Found:** If the package is installed locally, `npx` executes the package's associated command.

3. **Temporary Installation:** If the package is not found `npx` downloads the package from the npm registry into a temporary cache and adds the necessary executables to your `PATH` for the execution.

4. **Runs the Command:** `npx` executes the command in the temporary environment, ensuring it uses the correct version and dependencies.

5. **Cleanup:** After execution, `npx` deletes the temporary installation of the package.


If the package exists in your project's `package.json`, npx will use the version specified there. You can use `npx <package-name>@<version>` to execute a specific version of a package.


##When to Use npx

###One-Off Commands

When you need to use a command-line tool only once or occasionally, npx eliminates the need for a permanent global installation. This keeps your global environment clean and avoids potential version conflicts.

####Examples:

- **Project Initialization:** Create projects without globally installing framework-specific CLIs (e.g., `npx create-react-app my-app`, `npx vue create my-vue-project`).
- **Linting and Formatting:** Run code quality tools without installing them globally (e.g., `npx eslint .`, `npx prettier --write .`).

###Experimenting with New Packages

Test drive different packages or specific versions of packages without committing to a full installation. This is great for evaluating tools before deciding to include them in your project.

####Examples:

- **Trying a Testing Framework:** Explore a new testing framework like Jest (e.g., `npx jest --init`).
- **Using a Different Linter:** Experiment with an alternative linter (e.g., `npx jshint .`).


##When Not to Use npx


###Frequently Used Commands

For tools you use often (like Vue CLI, TypeScript, etc.),  global installation (`npm install -gz) is more efficient.

###Projects with Tight Dependency Control

In projects requiring precise versions of tools, install them as project dependencies (`npm install`) for consistency.

###Packages Requiring Frequent Updates

If a tool needs regular updates, a local project installation (`npm install`) avoids repeated downloads with `npx`.

###Long-Running Processes

`npx` is meant for short tasks. For ongoing processes, install the package either globally or locally.