teleren/devto huggingface dataset:
Azure Functions: Use imperative binding to control output target
Tags: functions, binding, csharp, azure
Published: 2022-11-22 00:55:27

Azure Function is great, especially binding feature is awesome. But we need to control how binding work in run time, rather than compiled time.

- [Binding at Runtime](https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-expressions-patterns#binding-at-runtime]

## Scenario

I want to save file to different blob storage depending on contents. The target path varies depending on file content.

## Solution 

Use ``Binder``. You can find example [here](https://learn.microsoft.com/en-us/azure/azure-functions/functions-dotnet-class-library?tabs=v2%2Ccmd#multiple-attributes-example).

- Pass ``Binder`` as argument
- Instantiate appropriate binding attribute, such as ``BlobAttribute``, ``StorageAccountAttribute``, etc
- Instantiate binder.BindAsync<T>
- Write output

```csharp
public static class IBinderExampleMultipleAttributes
{
    [FunctionName("CreateBlobInDifferentStorageAccount")]
    public async static Task RunAsync(
            [QueueTrigger("myqueue-items-source-binder2")] string myQueueItem,
            Binder binder,
            ILogger log)
    {
        log.LogInformation($"CreateBlobInDifferentStorageAccount function processed: {myQueueItem}");
        var attributes = new Attribute[]
        {
        new BlobAttribute($"samples-output/{myQueueItem}", FileAccess.Write),
        new StorageAccountAttribute("MyStorageAccount")
        };
        using (var writer = await binder.BindAsync<TextWriter>(attributes))
        {
            await writer.WriteAsync("Hello World!!");
        }
    }
}
```

## Summary

I love this feature as we can still use binding feature but more dynamic way!
Music Tech Aside - LALAL.AI Is Still The AI Vocal Split King
Tags: ai, music
Published: 2022-11-22 00:33:44

[LALAL.AI](www.lalal.ai) is a web app that allows you to split a recording of music into it's comprising parts. It is free to use with some paid options and they have some get promos like posting a review for 90 free minutes of splitting ;)

I've used it for creating flips and remixes LOADS of times and it works great.

Best parts:
-You can preview the split quality before spending minutes from your account.
-Best quality I've found for this kind of app
-Regularly running cool promos



![product screenshot 1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/na7f3srotlnvjgnxxxsw.png)



Here's what it looks like when you get a preview so you can find the right algo of theirs to use to get the results you want.



![product screenshot 2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w5lkfj6yonsnu1hp3c31.png)

They also do more than vocal separation, I think they have the most full-featured version of this kind of app on the market as well for that reason!

Check it out here: www.lalal.ai

They also have some specialty tools like their [Voice Cleaner](https://www.lalal.ai/voice-cleaner/) and in addition to using them for remixes and flips I've used this to isolate vocals from film and TV sources or to clean up vocal recordings of my own during the post-production phase of a project.

-As I'm embarking on a new leg of my career I would be excited about working with LALAL or partnering with them on the music tech projects I'm working on personally and professionally 💫
manipulate strings with sed
Tags: unix, sed, regex
Published: 2022-11-21 23:35:20

---
title: manipulate strings with sed
published: true
description: 
tags: Unix, sed, regex
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2022-11-14 23:52 +0000
---

## What is `sed`?

> https://en.wikipedia.org/wiki/Sed


sed ("stream editor") is a Unix utility that parses and transforms text, using a simple, **compact programming language**.

It was one of the earliest tools to **support regular expressions.**

---

Today I will show you some examples of what can you do with `sed`. (in a basic way)
What I learn about open-source from Hacktoberfest
Tags: programming, opensource
Published: 2022-11-21 23:31:47

# Hacktoberfest
### Intro
Even after I've been working as a software engineer over years, I felt still daunted when I think about participating open-source projects. This time, I stepped out of the comfort zone and tried to contribute via Hacktoberfest. By the way, if you don't know about Hacktoberfest, it is a month-long celebration of open-source software that encourages participation in giving back to the open-source community. People can receive some goods or badges once their contributions are accepted. How encouraging! 

### Search for projects
I always wanted to sharpen the programming language skills - Go & Python - besides work. So, I searched based on those 2 languages. I narrowed down further based on the interests. I was interested in ci/cd and cli tools lately. I ended up participating these 2 repos if you are interested in.
- [Woodpekcer](https://github.com/woodpecker-ci/woodpecker/)
- [Gcloc](https://github.com/JoaoDanielRufino/gcloc) 

### The process of contribution 
The first step was to read the README to understand about the project. Next, I looked at open issues for contribution. If I was attracted to it, I asked the issuer to clarify requirements and assigning to me. After having a conversation, I started working on it. The implementation process was pretty similar to the regular flow I do at work - update, pull request, feedback, and merge to the main branch. The only difference was `fork`. Fork was useful as I could experiment and play with a repo without affecting the original one. I did take some time to run things locally and tests to see how things work before touching any codebase. Once I updated codebase and tests, I open a pull request for feedback. Thankfully, a few seasoned engineers gave me valuable feedback and I was able to improve it before merging it to the main branch. I celebrated once each pr was merged :) 

### What I learned from it
I had biases
- I need to be way smarter to contribute
- I need a ton of time to contribute
- I need enormous effort to contribute

I was wrong completely. I didn't have to be a genius to contribute to open source. Actually, it was all about collaboration with other passionate people to make improvements to the project I'm interested. There were issues that don't require daunting efforts. 

There were other benefits that I didn't expect! 
- I was able to make friends by working together
- I was able to sharpen skills way faster as I touched the real project problems

### Conclusion
Hacktoberfest is finished. Yet, you can still contribute to the open-source projects! I highly recommend to anyone.
Releasing my SSG with NPM
Published: 2022-11-21 23:21:25

Hi everyone,

This week I released my [static site generator](https://www.npmjs.com/package/nan1-ssg) to the [npm registry](https://www.npmjs.com/).

The process for releasing my package was simple. First, you need to sign up on the npm website. Next, you need to make sure you have a package.json file in the root directory of your project. Then, created a README.md file to document how to use your package. Finally, issue the `npm publish` command to publish your package to the npm registry. 

I didn't have to change much in my code to accommodate the release at first. But when I asked my friend to test it out for me, he found a couple things that I needed to change. First, the `npm link` command that I had wrote in the README file did not work. This was because the command looks for a package.json file in the current directory, but since he installed using npm, there was no package.json file in his current directory. Therefore I had to make a change from `npm link` to `npm link nan1-ssg`. The second thing he found was minor, but he saw that when he printed the version number using `nan1-ssg -v`, it was 0.2, not 1.01. `This was an easy fix and I updated the version number.

To try out my SSG, follow the instructions [here](https://www.npmjs.com/package/nan1-ssg). The README file should provide the documentation you need to use my project.
Storing data in Ceph S3 using PHP
Published: 2022-11-21 23:03:41

---
title: Storing data in Ceph S3 using PHP
published: true
description: We look into how to store data in Ceph using the S3 API. Talking about API options and showing a custom solution for storing, recieving, deleting and checking existance in a Ceph S3 using PHP.
tags:
cover_image: https://i.ytimg.com/vi/W4gctCENqjo/maxresdefault.jpg
---

{% youtube W4gctCENqjo %}

We look into how to store data in Ceph using the S3 API. Talking about API options and showing a custom solution for storing, recieving, deleting and checking existance in a Ceph S3 using PHP.
yq for helm post-render instead of kustomize
Tags: kubernetes, devops, cloudnative, helm
Published: 2022-11-21 23:02:06

Spending several hours to get all resources patched with `.metadata.labels` using kustomize as [helm post-render](https://helm.sh/docs/topics/advanced/#post-rendering) tool; Sometimes, the command kustomize removed an old subcommand (build)..sometimes, the command kustomize requires external plugins...etc

At the end, things works simply with a single `yq` command:

```sh
yq '. *= load("patch.yaml")' all.yaml
```

Shipping that single command inside `postrender` script, then use it with helm: `helm template -g ./my-chart --post-renderer ./postrender`

yq is a portable CLI with 0 dependencies. That's why i like it against kustomize in this use case.

Find full example in this [github repo](https://github.com/abdennour/example-helm-postrender-with-yq)
Day 653 : Hard To Tell
Tags: hiphop, code, coding, lifelongdev
Published: 2022-11-21 22:46:57

_liner notes_:
- Saturday : Been doing the radio show from my van for the past couple of weeks because the College Basketball season has started and the games are broadcasted during the show's timeslot. We still stream the show online when this happens. So I can do that from anywhere, my cohost wasn't able to make it anyway and I was tired from my recent trips. The show went well and I had a good time as usual. The recording of this week's show is at https://kNOwBETTERHIPHOP.com

![Radio show episode image of a pair of Nreal Light AR glasses on a while surface with the words Nov 19th 2022 Acres of Skin](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/567m5mprb3q8kqrso06a.jpg)

- Sunday : So, due to travelling, I didn't do https://untilit.works cyphers for a couple of weeks. Of course when I start back up, something breaks. haha Took some time to fix it. Turns out that an API endpoint changed on me. Took longer than I wanted, but I got some other stuff done. Ended the night watching the final episode of "The Walking Dead". It's been a pretty good series.

- Professional : Worked on a blog post. Submitted an expense report for that last conference I went to. Helped out someone with a question about a project they are working on. Caught up with a recording of a meeting that happened while I was at a conference. Feels like I didn't get a lot of stuff done, but sometimes it's hard to tell. I never really feel like I get enough done. haha.

- Personal : So I got a new pair of AR glasses. I played around with it and it doesn't look like it'll be able to do what I want, yet. Will do more research. I've been watching videos on it and it's pretty good. I've been using a projector and a screen in the van. With the glasses, I don't need any of that. I can just lay down and look up. Changing the way I watch anime and other shows. It runs through my phone and I can still hook it up to my bluetooth speakers for better sound.

![A bunch of yellow flowers in Maharashtra, India](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mep6x9tao87q0shbobux.png)

Going to continue working on my blog post because I want to get it done this week and it takes me forever to write them. haha. There's other stuff I want to work on before the end of the year. Also want to catch up with some anime.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube JNZiLUrWWuE %}
Contabo VPS Hardware Failure
Tags: contabo, vps
Published: 2022-11-21 22:44:16

This has happened the second time this year. Suddenly, all the commands are broken - corrupted RAM maybe.

![image.png](https://cdn.steemitimages.com/DQmdPsBAaXcNbcVwPwdZJ3iZtCgjMGpwH7v11yS964Qkihv/image.png)

Reboot does help. However, it seems to me a possible sign of over selling at the host.

I run a few programs on it: steem voting, steem accounts. Not time critical.

Contabo is a bargin VPS - however, when things do not work as expected, their support is quite limited. Use their services with precaution.

Contabo support replies:

> We can guarantee that this is not a hardware issue, please keep in mind, that your VPS it self is only virtual. The host server system is of course real hardware, but maintained and tracked from our side. Furthermore, we can inform you, that the current host system is completely healthy.

> It does more likely seem that some services crashed and caused this behaviour. It could be helpfully, to check your log entries in this regard, accordingly to our tutorial:

> https://contabo.com/blog/analysing-log-files/?utm_source=support&utm_medium=email

<hr/>

### [Steem](https://steemyy.com) to the moon!
schema-org-java: Java library for working with Schema.org data in JSON-LD format
Tags: java, schemaorg, maven, programming
Published: 2022-11-21 21:49:19

If you've ever worked with structured data, you're probably familiar with [Schema.org](http://schema.org).

And you must have realized that entities contain a lot of information and that inheritance can be complex.

So it can be tedious to create all the entities needed for your project and then serialize / deserialize the data in [JSON-LD](https://json-ld.org/) format.


[schema-org-java](https://github.com/Kobee1203/schema-org-java) is a library to work with Schema.org entities.

The entities can be easily generated with the Maven plugin, and can then be serialized / deserialized (soon) to JSON-LD format with the serializer module.

The library has the following features:
- Fully supports the vocabulary defined in the http://schema.org namespace.
- Fully supports type multiple inheritance, multiple values per property in http://schema.org.
- Every Schema.org type has a corresponding Java interface which provides convenient getter/setter methods for getting/setting the values of the properties of that particular type.
- Supports the generation of all Schema.org types at once, or specific ones.
- Fully supports Schema.org documentation of types and properties by adding Javadoc on generated classes and methods.
- Supports different versions of the Schema.org vocabulary.
- Supports serializing and deserializing (soon) Schema.org objects to and from JSON-LD formats.

Here is a video illustrating the generation and creation of Schema.org entities:
{% embed https://user-images.githubusercontent.com/1423193/199852384-e41869fb-beae-4106-be0f-1482393b9e0c.mp4 %}

Several features are not yet developed:

- Deserialization
- Adding methods to set the data of the fields in list
- Added javadoc on setter methods
- ...

If you are interested, please take a look and give me your feedback :)
Hire Live Support
Tags: customerservice, businesssupport, bpo
Published: 2022-11-21 21:28:18

Hire Live Support is a trusted and recognized hub of call center and digital marketing services for B2B & B2C disciplines. Aligned to an objective of delivering value-based customized services for your business simulation - we offer a broad range of contact center and digital services that enable integral business management and expansion of your service operations with strategic supervision. We enroll your brand into a state of recognition by delivering a rewarding customer experience based on Live Chat, Phone & Email- Support that soundly resolve in-house issues and make brands achieve their milestones. Hire Live Support senses the next paradigm shift by managing your business operations and laying out memorable customer experiences.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0cpmnedcp4shs28ptggn.png)
Kubernetes - Part 2 - Replicas and Deployments?
Tags: kubernetes, docker, deployments
Published: 2022-11-21 21:18:01

## Replicas & ReplicaSets
  - A replica is a nothing more than a copy. If you have your application hosted on a pod, and you want more instances of the application to be up to serve increased traffic, you can create more replicas of the pod.
  - As the name suggests, all replicas of a pod are identical to each other
  - Replicas of a pod are managed using replica sets
  - A replica set is used to maintain a fixed number of copies of a pod in the Kubernetes cluster
  - The pods that are managed by the replica set are selected using "selectors"
  - Any pod that is selected by the selector of a replica set will now be managed by the replica set
  - Pods will be deleted or created to match the number of replicas specified the yaml file or the cli command

## Deployments
  - Deployments are a way to manage stateless applications hosted on pods/replica sets
  - They are great for scaling up/down stateless applications
  - Deployments provide way to perform upgrades. Eg: If you want to change the underlying image in the pod, you can use various update techniques to achieve that
Introduce Continuous Integration (CI) to the starpy Python project
Tags: python, opensource, github, testing
Published: 2022-11-21 21:16:28

---
title: Introduce Continuous Integration (CI) to the starpy Python project
published: true
description: Having GitHub Actions configured to run the tests of a project on every push can help a lot with the quality of the project.
tags: python, opensource, github, testing
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2022-11-21 20:39 +0000
canonical_url: https://code-maven.com/introduce-ci-to-starpy
series: os
---

One of the first thing I do when start working on a project (either open source or in a corporation) is to make sure the is a Continuous Integration system set up. In this video you will see how I added GitHub Actions to the [starpy](https://github.com/Equal-Vote/starpy/) project. 

{% youtube d6815sRIZ-Q %}

 The points I made

* Make sure you have the python requirements listed in the requirements.txt
* Make sure you can run pytest and it will find your tests. (test filenames start with test_* )
* Having a README.md is also a nice thing with instruction how to set up an environment and how to run the tests.

The content of the .github/workflows/ci.yaml file from the project that configures GitHub Actions can be seen on the original post [here](https://code-maven.com/introduce-ci-to-starpy).
Ng-News: Episode 22/46 - Angular 15
Tags: webdev, javascript, angular, programming
Published: 2022-11-21 21:13:58

Angular 15 makes Standalone Component & APIs and the `NgOptimizedImage` directive generally available. Directive composition API increases the productivity for component authors... and much more.

{% embed https://youtu.be/FufqGbyB2Qo %}

## Standalone Components & API

Angular 15 is out. With the introduction of the provideHttpClient function, it completes the "Standalone" story. We can now write our Angular applications without NgModules. The main benefits - at the moment - are fewer lines of code and simplification.

In version 14, Standalone Components and API were still in the status of developer preview. Now they are fully stable.

## `NgOptimizedImage`

The same is true for the `NgOptimizedImage` directive, which brings best practices in terms of image handling.

## Directive Composition API

A completely new feature is the Directive composition API. It allows us to apply multiple directives to a component or another directive without creating a separate wrapper component or something similar.

Be aware that these host-directives need to be standalone. We might see that the newer features will only be exclusively available for standalone components.

## Functional RouterGuards, Interceptors, and Resolvers

It is also possible that we use functions instead of classes for our router guards, interceptors, and resolvers. Maybe not a huge addition, but it results in less boilerplate code.

## Better Stack Trace

Another smaller improvement is that we get a better a stack trace in chromium-based browsers when an error happens. 

## Deprecations

Last but not least, there is a deprecation for certain values of the `providedIn` property in the `@Injectable` decorator. You cannot use the values `any` or an NgModule anymore. So just go with the value `root`.

## Launch Event

To get more information, you can watch the Angular 15 launch event on YouTube, the official blog entry from Minko Gechev, and of course the release notes.

{% embed https://youtu.be/j2_NnV7nU6s %}

[Blog Post](https://blog.angular.io/angular-v15-is-now-available-df7be7f2f4c8)

[Release Notes](https://github.com/angular/angular/blob/main/CHANGELOG.md#1500-2022-11-16)
python programming examples
Tags: python
Published: 2022-11-21 21:02:04

python programming examples
<a href="https://nerdutella.com/python-programming-examples "> python programming example</a>
Python can be learned most effectively by using practise examples. Examples of Python's foundational principles can be found on this page. Before you look at the answer, we strongly advise you to try these examples on your own. All of the programmes on this page have been tested, so they should all run well. "Learn Python Programming Examples" is a blog post with one of the best titles you'll read all day. To make it even better, the content has been created for all those people looking to learn more about Python programming to help them develop their skills. The site has a series of posts that focus on both basic and advanced concepts. The author does a great job at including code examples to help you visualize what's going on The example posts are broken down into categories: strings, loops and functions, conditionals, files and filesystems, classes and objects, exceptions, debugging and testing, regular expressions, networking and the web. This makes it really easy to find the info you need when you're learning Python.