teleren/devto huggingface dataset:
Introducing hls-truncate, the new tool in our collection of VOD manipulators! 
Tags: vodtolive, slate, hls, truncate
Published: 2021-02-24 10:17:46

Over the last year or so, we at [Eyevinn Technology] (https://www.eyevinntechnology.se) have been developing a series of tools for the manipulation of HLS files. There is an increasing interest for presenting VOD content as live channels. That approach makes it possible for companies to provide themed channels and fixed schedules based on existing video material. Among other things, this can be a way to make use of older content in new packaging that interests consumers.

We have built several open source tools to provide every aspect of delivering a livestream from pre-existing content. As we develop these tools further, we often see that a need arises for convenient helper utilities. A previous example was [hls-repeat](https://github.com/Eyevinn/hls-repeat) which takes a HLS VOD as an input and outputs a new VOD that is repeated the required number of times. This can be useful when working dynamically with slates, for example, for display during schedule gaps. Another example, [hls-splice](https://github.com/Eyevinn/hls-splice) is discussed in one of our [previous articles](https://dev.to/video/aws-lambda-function-to-insert-pre-roll-ads-in-hls-stream-4gip). 

Last week we released [hls-truncate](https://github.com/Eyevinn/hls-truncate), a similar tool which also takes a HLS VOD as an input. In this case, it shortens the VOD in question to the nearest segment, providing that as the output. Again, this has proven to be useful for adjusting slate lengths on-the-fly for customers.

Wherever one wishes to use a VOD, it's as simple as making a call to create the new VOD:

```
const hlsVod = new HLSTruncateVod('http://testcontent.eyevinn.technology/slates/30seconds/playlist.m3u8', 4);
hlsVod.load()
.then(() => {
  const mediaManifest = hlsVod.getMediaManifest(3496000);
  console.log(mediaManifest);
});
```

Now all bandwidths are available at the truncated length. This all simplifies a code base considerably and has the added advantage of you knowing that a number of fiddly edge cases are taken care of and backed up by a good suite of tests, that can be developed in isolation over time.

Read more on [our repo](https://github.com/Eyevinn/hls-truncate)
Release 0.1.0 is up on npm now: [@eyevinn/hls-truncate]( https://www.npmjs.com/package/@eyevinn/hls-truncate)

*If you need assistance in the development and implementation of this, our [team of video developers](https://video-dev.team) are happy to help out. If you have any questions or comments just drop us a line in the comments section to this post.*
A Solution for Multi-asset Blockchain Based Token - Blok Token
Published: 2021-02-24 10:09:37

Most notably, blockchain ensures a trust network giving owners, managers, and tenants full transparency to their transaction history validated on chain by consensus protocol.

With the implementation of a token economy, the SaaS community solution provides cheaper transaction fees processed in real time, incentivizes owners to maintain the properties, and tenants to pay rent on time. All processed safely secured on a decentralized network.

A Platform comprised of multiple real estate assets on Blockchain aligning the interests of owners and tenants to build thriving communities

<b>Related Articles:</b>

<a href="https://theblockpark.com/2020/11/10/block-park-is-launching-utility-tokens-blok-tokens-based-on-erc-20/">Block Park Is Launching BLOK Tokens Based On ERC-20</a>

<a href="https://theblockpark.com/2020/11/10/blockpark-choose-hyperledger-fabric-for-its-blockchain-implementation/">BlockPark Choose Hyperledger Fabric For Its Blockchain Implementation</a>

<b>Visit Reference Profile Websites:</b>
<a href="http://bit.ly/3bBx7F8">http://bit.ly/3bBx7F8</a>
<a href="http://bit.ly/2Ns5xCs">http://bit.ly/2Ns5xCs</a>
<a href="https://theblockpark.com/blok-token-blockpark-token/">Blok token</a>
<a href="http://bit.ly/2NrwZ3f">http://bit.ly/2NrwZ3f</a>
<a href="http://bit.ly/3kjK1eV">http://bit.ly/3kjK1eV</a>
<a href="http://bit.ly/3dHY4da">http://bit.ly/3dHY4da</a>
<a href="http://bit.ly/2P27BkJ">http://bit.ly/2P27BkJ</a>
<a href="http://bit.ly/2ZIzCQD">http://bit.ly/2ZIzCQD</a>
<a href="http://bit.ly/2Nz2g4a">http://bit.ly/2Nz2g4a</a>
<a href="http://bit.ly/3bDwQl2">http://bit.ly/3bDwQl2</a>
<a href="http://bit.ly/2Mj9HM7">http://bit.ly/2Mj9HM7</a>
<a href="http://bit.ly/3r25XO4">http://bit.ly/3r25XO4</a>
<a href="http://bit.ly/3sjCbov">http://bit.ly/3sjCbov</a>
<a href="https://bit.ly/3skAGq0">https://bit.ly/3skAGq0</a>
<a href="http://bit.ly/3qRiR1p">http://bit.ly/3qRiR1p</a>
<a href="http://bit.ly/2ZNfFrH">http://bit.ly/2ZNfFrH</a>
<a href="http://bit.ly/2NqHaoH">http://bit.ly/2NqHaoH</a>
<a href="http://ift.tt/3pQNFho">http://ift.tt/3pQNFho</a>
<a href="http://bit.ly/3qP8ICB">http://bit.ly/3qP8ICB</a>
<a href="http://bit.ly/3bynO99">http://bit.ly/3bynO99</a>
<a href="http://bit.ly/3pPNHpK">http://bit.ly/3pPNHpK</a>
<a href="http://bit.ly/3pKGNlX">http://bit.ly/3pKGNlX</a>
<a href="http://bit.ly/3unvS5f">http://bit.ly/3unvS5f</a>
<a href="http://bit.ly/2Mqou80">http://bit.ly/2Mqou80</a>
<a href="http://bit.ly/3qQgGeC">http://bit.ly/3qQgGeC</a>
<a href="https://theblockpark.com/">Property Management Software</a>
Scraping Weather Data with Python and Beautiful Soup
Published: 2021-02-24 09:56:04

Today we are going to see how we can scrape Weather data using Python and BeautifulSoup in a simple and elegant manner.

The aim of this article is to get you started on a real-world problem solving while keeping it super simple so you get familiar and get practical results as fast as possible.

So the first thing we need is to make sure we have Python 3 installed. If not, you can just get Python 3 and get it installed before you proceed.

Then you can install beautiful soup with:
We will also need the libraries requests, lxml and soupsieve to fetch data, break it down to XML, and to use CSS selectors. Install them using...


Once installed open an editor and type in...
Now let's go to the Weather.com 10 day forecast page and inspect the data we can get.

This is how it looks:
Back to our code now. Let's try and get this data by pretending we are a browser like this.
Save this as weather_bs.py.

If you run it.
You will see the whole HTML page.

Now let's use CSS selectors to get to the data we want. To do that let's go back to Chrome and open the inspect tool.
We notice that all the individual rows of data are contained in a with the class 'clickable closed'. We can get BeautifulSoup to select that data like this.
This print all the content in each of the rows.

We now can pick out classes inside these rows that contain the data we want. The date is in the day-detail class.
If you run it will print out all the days.
Bingo!! we got the days.

Now with the same process, we get the other data like weather description, temperature, wind speed, precipitation etc.
We even added a separator to show where each day ends. You can now pass this data into an array or save it to CSV and do whatever you want.

If you want to use this in production and want to scale to thousands of links then you will find that you will get IP blocked easily by Weather.com. In this scenario using a rotating proxy service to rotate IPs is almost a must.

Otherwise, you tend to get IP blocked a lot by automatic location, usage, and bot detection algorithms.

Our rotating proxy server Proxies API provides a simple API that can solve all IP Blocking problems instantly.

With millions of high speed rotating proxies located all over the world,
With our automatic IP rotation
With our automatic User-Agent-String rotation (which simulates requests from different, valid web browsers and web browser versions)
With our automatic CAPTCHA solving technology,
Hundreds of our customers have successfully solved the headache of IP blocks with a simple API.

The whole thing can be accessed by a simple API like below in any programming language.
We would like to hear your thoughts
Published: 2021-02-24 09:52:30

Hi everyone,

As an endeavour to understand the needs and preferences of coders/developers in relation to community participation and job applications, we at The Mavericks (a reputation management consultancy) are conducting a quick survey. If you have a minute to spare, please take this survey and share it with your peers:
https://www.surveymonkey.com/r/developerperceptionaudit 

In turn, we would be happy to share the insights from this survey within this forum!

Thank you!
Rohan
Simple way to use Abinsthe Subscription in urql
Tags: phoenix, elixir, absinthe, urql
Published: 2021-02-24 09:50:52

## Benefits
* Without install `@absinthe/socket` which contains some legacy package; also save 16kb gzip

```ts
import { subscriptionExchange } from '@urql/core'
import { Channel, Socket } from 'phoenix'
import { make, pipe, toObservable } from 'wonka'

import { getWsEndpoint } from '~/env'

const wsEndpoint = getWsEndpoint()
const socket = new Socket(`${wsEndpoint}/socket`, {})

socket.connect()
const absintheChannel = socket.channel('__absinthe__:control')
absintheChannel.join()

export const absintheExchange = subscriptionExchange({
  forwardSubscription({ query, variables }) {
    let subscriptionChannel: Channel

    const source = make((observer) => {
      const { next } = observer

      absintheChannel.push('doc', { query, variables }).receive('ok', (v) => {
        const subscriptionId = v.subscriptionId

        if (subscriptionId) {
          subscriptionChannel = socket.channel(subscriptionId)
          subscriptionChannel.on('subscription:data', (value) => {
            next(value.result)
          })
        }
      })

      return () => {
        subscriptionChannel?.leave()
      }
    })

    return pipe(source, toObservable)
  },
})
```

Then

```ts
const endpoint = getEndpoint()

export const client = createClient({
  url: `${endpoint}/graphql`,
  exchanges: [
    dedupExchange,
    fetchExchange,
    absintheExchange,
  ],
})

```
Log API requests in Rails
Tags: rails, ruby, api
Published: 2021-02-24 09:39:19

When exposing or consuming APIs, one of the most important things to remember is to log the calls you perform.

It will not take long until you will have to answer the question "What happened? And why?".

Having a proper log of the API requests you performed or received is the only way to answer these questions.

That's why at [Renuo](https://renuo.ch), we extracted [rails_api_logger](https://github.com/renuo/rails_api_logger) from our projects and made it open source.

**rails_api_logger** is a library that can be used for logging both inbound requests and outbound requests.

Please read the README file for a full documentation. Here I will sum it up quickly.

# Log Inbound Requests

If you are exposing APIs you can log the requests you receive. Use the following Middleware:

```ruby
config.middleware.insert_before Rails::Rack::Logger, InboundRequestLoggerMiddleware

```

Check the [README](https://github.com/renuo/rails_api_logger) for further options.

# Log Outbound Requests

Given the following outbound request:

```ruby
uri = URI('http://example.com/some_path?query=string')
http = Net::HTTP.start(uri.host, uri.port)
request = Net::HTTP::Get.new(uri)
response = http.request(request)
```

you can log it by doing the following:

```ruby
uri = URI('http://example.com/some_path?query=string')
http = Net::HTTP.start(uri.host, uri.port)
request = Net::HTTP::Get.new(uri)
response = RailsApiLogger.call(uri, http, request)
```

The gem comes with a first code example to integrate these logs in RailsAdmin. It the future we will release more and more features.

Head to [rails_api_logger](https://github.com/renuo/rails_api_logger) on GitHub and give it a ⭐️!
Benefits of mouse-less habit
Tags: productivity
Published: 2021-02-24 09:36:47

Dashing through your keyboard from start to end of a task is no easy yet worth practicing skill for developers with several pluses that I figured out myself:

1. **Zone in with your keyboard:**
Using just the keyboard once you are used to it is both comfortable and stylish. Especially in the case of using mech keyboard, I am sure there is no better way to flex on a top keyboard than to do everything with it: browsing web, coding and formatting report, you tell me. After all, it made the developer feel distinguished among other jobs in the way we use computer.

1. **Less eye movement , less redundant action**
The eyes will immediately focus on where your action happen instead of tracking the mouse cursor from point A to point B. You also need to think on what you need to do next more mindfully rather than just move the mouse around mindlessly.

1. **From “Do-Think-Redo” to “Think-Do-Rethink”**
Whenever holding a mouse, it is normal that we move them around for a while before we know what to click next, and sometimes you just click where it is convenient not where necessary, and then after the click we move the cursor some more to figure out what to do next of next. This habit accumulatively cost us a lots of time between each action if ‘make the mouse move’ is the default first action — an action that is muscle-memorized, making you act as reflex rather than being rational. With only just the keyboard, you will have to think on what you want to do next before you press because it is not just a left/right mouse click — it has to be the exact shortcut you want to use or the location and name of the file your want to navigate to. Working with keyboard require you to get familiar with your IDE, file naming and folder structure, resorting more of brain-memory resource so that the action afterward can be effective and precise. And as an unexpected result, it will also improve your flow with mouse because you already reengineer to your **“Do-Think-Redo”** to **“Think-Do-Rethink’.**

## Final words:

Mouse-less habit might be counterintuitive when you first start adopting but when you can apply, even just partially, on your daily lives the experience is very rewarding — just like the keyboard is your new extended/ optimized just for using computer arm.

### Bonus:

Try out this plugin to use your browser more with keyboard [here](https://chrome.google.com/webstore/detail/vimium/dbepggeogbaibhgnhhndojpepiihcmeb?hl=en), I mean.. just keyboarding everything, seriously muahahaha
Benefits of mouse-less habit
Tags: productivity
Published: 2021-02-24 09:30:58

Dashing through your keyboard from start to end of a task is no easy yet worth praticing skill for developers with several pluses that I figured out myself:

1. **Zone in with your keyboard:**
Using just the keyboard once you are used to it is both comfortable and stylish. Especially in the case of using mech keyboard, I am sure there is no better way to flex on a top keyboard than to do everything with it: browsing web, coding and formatting report, you tell me. After all, it made the developer feel distinguished among other jobs in the way we use computer.

1. **Less eye movement , less redundant action**
The eyes will immediately focus on where your action happen instead of tracking the mouse cursor from point A to point B. You also need to think on what you need to do next more mindfully rather than just move the mouse around mindlessly.

1. **From “Do-Think-Redo” to “Think-Do-Rethink”**
Whenever holding a mouse, it is normal that we move them around for a while before we know what to click next, and sometimes you just click where it is convenient not where necessary, and then after the click we move the cursor some more to figure out what to do next of next. This habit accumulatively cost us a lots of time between each action if ‘make the mouse move’ is the default first action — an action that is muscle-memorized, making you act as reflex rather than being rational. With only just the keyboard, you will have to think on what you want to do next before you press because it is not just a left/right mouse click — it has to be the exact shortcut you want to use or the location and name of the file your want to navigate to. Working with keyboard require you to get familiar with your IDE, file naming and folder structure, resorting more of brain-memory resource so that the action afterward can be effective and precise. And as an unexpected result, it will also improve your flow with mouse because you already reengineer to your **“Do-Think-Redo” **to** “Think-Do-Rethink’.**

## Final words:

Mouse-less habit might be counterintuitive when you first start adopting but when you can apply, even just partially, on your daily lives the experience is very rewarding — just like the keyboard is your new extended/ optimized just for using computer arm.

### Bonus:

Try out this plugin to use your browser more with keyboard [here](https://chrome.google.com/webstore/detail/vimium/dbepggeogbaibhgnhhndojpepiihcmeb?hl=en), I mean.. just keyboarding everything, seriously muahahaha
Android application that runs on linux arm64 as well
Tags: android, linux
Published: 2021-02-24 09:26:26

Problem 1: I need to build an application that will run on the **Snapdragon HDK** that runs android and on the **NVIDIA Jetson Xavier NX** that runs linux on arm64.

Problem 2: I need that app to be able to call functions from **Java** and **C++** libraries.

Problem 3: There should be **one** source code (not a must).

Problem 4: The application cannot be internet dependant.

Iv'e been searching the internet for a platform that will answer my problems with no success, I'm looking for a web based solution or a GUI framework, any suggestions?
Rust is not panacea
Tags: rust, rant
Published: 2021-02-24 09:25:38

Just my personal list on when writing software in Rust become a problem.

* Rust grievances
https://gist.github.com/brendanzab/d41c3ae485d66c07178749eaeeb9e5f7

* why esbuild written in Go
https://news.ycombinator.com/item?id=22336284

* problem writing wayland compositor in Rust
http://way-cooler.org/blog/2020/01/09/way-cooler-post-mortem.html

* switching to Rust can breaks things
https://drewdevault.com/2021/02/09/Rust-move-fast-and-break-things.html

* Zig vs Rust
https://scattered-thoughts.net/writing/assorted-thoughts-on-zig-and-rust/

* unnecessary syscalls produced by Rust compiler
https://drewdevault.com/2020/01/08/Re-Slow.html

* Rust is faster than Javascript but mostly untrue when targeting web browser
https://zaplib.com/docs/blog_post_mortem.html
{% twitter 1520809822530142208 %}

* When Zig is safer and faster than Rust
https://zackoverflow.dev/writing/unsafe-rust-vs-zig/
Programmatically start and stop Google Cloud Compute Engine VM without code
Tags: googlecloud, nocode, gce, cloudscheduler
Published: 2021-02-24 09:06:49

Hi there, long time since my last post, but here I'm!
Today I want to show you a simple but great tip for users/admins of GCE VMs.

# Intro
In the past, when we needed to periodically stop or start a VM in GCE was a pain! As we don't have an easy way to do it, we should write a Cloud Functions or include a cron job in a VM (like a central VM with all your cron jobs).
But a few months ago, GCP added a new way to do it using the API directly in the Google Cloud Scheduler (a serverless cron service).

Now, let's do it!

# Service Account
First things first: to configure it properly, you should have a service account. As best practice, you need to create a new service account and give the Compute Admin role. But for this tutorial, I'll show using the default Compute Engine service account. 
Go to Google Cloud Console > Navigation menu > IAM & Admin > Service Accounts

![1_SA](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1btpldcdmknxc77hynvg.png)
Copy the email address associated to Compute Engine default service account. This email is always something like 999999999999-compute@developer.gserviceaccount.com

Next!

# Cloud Scheduler
The Cloud Scheduler is a serverless cron-like service. It is pretty handy for this kind of job. You can setup jobs to do a variety of calls, like general HTTP calls, App Engine services calls and post to Pubsub topics.
![2_CS](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/56xd7r032n8up54kdbsj.png)

Next, create the jobs. Just click in the Create Job button and let's do it!

# New job
The create job form is simple and straight to the point.
The important parts are the **HTTP URL** and the **Auth header** ones.

For the HTTP URL you should fill with something like this:

`https://compute.googleapis.com/compute/v1/projects/<PROJECT-ID>/zones/<VM-ZONE>/instances/<VM-ID>/<start OR stop>`

But first is required to have the Instance ID.

#### Get Instance ID
Just go to Navigation menu > Compute Engine > Click in your VM to get details

![Instance_ID](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3ne3upxmsxs0xr6txlne.png)
 
For example, my URL to start would be like this:
`https://compute.googleapis.com/compute/v1/projects/titanium-campus-305808/zones/europe-west1-d/instances/514142841644/start`

Now we have all information, this is the Create job form:
![3_create-job](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/so7ru9i0rzrgogm4r3is.png)

# All Scheduler jobs
![4_jobs](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o3ybk0uz7vis8sq7hqga.png)

As you can see I have 2 jobs, one to start and another to stop my Minecraft server. You can also enable or disable the jobs, so if you don't want the job to run for a specific period. Or, of course, you can setup the frequency of the job for a more complex form, as it respects the cron syntax.     

So that's it, my friends, I hope it can help you in any way and as always, send me feedbacks. I'll always try to help you about GCP!

Thanks,
About JonnyGit - Velocity Measures
Published: 2021-02-24 09:03:04

Here comes our second post from the “About JonnyGit” series. Today we want to tell You about the first of our three pillars that together form our solution for software development leaders: Velocity.

Velocity is one of the most important measurements in agile software development to illustrate the rate of progress that a team makes. Without knowing the velocity of Your team, planning will be impossible.

The metrics we use will help You understand what went well in the past and where You have process bottle-necks. This will enable You to answer common questions, that take a central role in Your planning process:

- Are my engineering workflows build to ensure momentum?

- How do my KPIs develop over time?

- What is the impact of each individual to a project?

But Velocity is not just important for Your planning process, it’s also the main factor for efficiency. With JonnyGit You can increase the efficiency of Your dev team by up to 30%.

If You want to know more about Velocity, just visit our website!
About JonnyGit - Our Mission
Published: 2021-02-24 09:00:50

In our new series “About JonnyGit” we would like to show You what our product is all about and what value we can add to Your company. In this first post, we will tell You about our mission.

Our main goal is to help software development leaders to tackle the challenges their team encounters. We will help You understand their needs and motivations so You can bring out the best in Your team.

Software development can be a very complex process, it might be better described as creation. We are there to close the information gap between Creator and Team Leader. Our powerful analytics will provide You with valuable insights into every little step Your developer takes, so You can give helpful feedback to accelerate the workflow.

By focusing on prescriptive analytics, we go beyond basic performance indicators and identify behaviors and patterns that might act as barriers. You then have all the information You need to build Your very own high performance team!