teleren/devto huggingface dataset:
Scrapping Bybit Kline data with Pybit
Tags: bybit, kline, algotrading, pybit
Published: 2024-05-29 18:45:40

At the time of writing this, I'm using python Pybit v5 library for scrapping Bybit kline data. Following python codes work for 1min kline scrapping, do modify the code accordingly based the interval you wish to scrap.

```python
import pandas as pd
from datetime import date, datetime, timedelta

from pybit.unified_trading import HTTP
import numpy as np
import dateparser
import time
import math

session = HTTP(testnet=False, api_key=API_KEY, api_secret=SECRET_KEY)

def GetHistoricalData(currency, start_date, end_date, interval):
    start_time = dateparser.parse(start_date)
    end_time = dateparser.parse(end_date)
    start_ts = int(start_time.timestamp()*1000) #ms
    end_ts = int(end_time.timestamp()*1000) #ms

    page = 0
    # we will query for 2 pages per day, with limit of 720 bar returned every call, we then get 1440min for every 2 pages
    # note that API call below will use 720 as limit because that's easier for pagination
    # hence total pages = num of days * 2
    totalPage = math.ceil(start_ts - end_ts / (1000 * 60 * 60 * 24)) * 2 
    df = pd.DataFrame(columns=['startTime', 'openPrice', 'highPrice', 'lowPrice', 'closePrice', 'volume'])

    while True:
        # Kline API call, 1min interval is the smallest bar we can get, limit max at 1000 but I use 720 here
        bars = session.get_kline(symbol=currency, interval=str(interval), start=start_ts, category="linear", limit=720)
        # counter starts from end of list then goes backward since oldest data appear last
        idx = len(bars['result']['list']) - 1

        while True:
            bar = bars['result']['list'][idx]
            new_row = {'startTime': pd.to_datetime(int(bar[0]), unit= 'ms'), 'openPrice': bar[1], 'highPrice': bar[2], 'lowPrice': bar[3], 'closePrice': bar[4], 'volume': bar[5]}
            # if the kline bar exceed end_time, means reaches target date, break out of loop
            if int(bar[0]) > end_ts:
                start_ts = end_ts
                break
            # append the new row into dataframe
            df.loc[len(df)] = new_row
            # check if we reaches first item in array
            if idx == 0:
                start_ts = start_ts + 43200*1000 # increment by num of ms for a day to get start time for tmr
                break
            idx -= 1
        page += 1
        # check if the end_date is reached
        if start_ts >= end_ts:
            # exit the while loop
            break
        if page > totalPage:
            break
        # time delay to prevent api rate limit
        time.sleep(0.02)

    return df
```

then execute the function with symbol, intended start time and end time, as well as interval of 1min
```python
data = GetHistoricalData("BTCUSDT", "May 01, 2023 00:00 UTC", "July 31, 2023 23:59 UTC", 1)
data.to_csv("./{}_May-01-2023-July-31-2023.csv".format("BTCUSDT"), index=False)
```

See https://bybit-exchange.github.io/docs/v5/market/kline for API documentation.
Python for Software Engineering Beginners!
Tags: beginners, softwareengineering, python, career
Published: 2024-05-29 18:43:09

What's up SE nerds!! It's Tripp, back with another blog from SE Bootcamp, currently finishing up Phase 3 out of 5! This time we are learning about using back end with Python. Here's a rundown of the basics and what you can expect from when learning Python.

Some of the basic concepts you'll start learning about in Python are Variables that store data values; Data Types like integers, float, strings, lists, dictionaries, tuples and sets; Control Structures such as 'if' statements, 'for' loops, and 'while' loops (sound familiar?); And Functions that work the same as in JavaScript, they are codes that perform specific tasks. Here are some brief examples:


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


The next part about Python you'll need to know is about Object-Oriented Programming (OOP). This is made up of 'classes' and 'objects'. A 'Class' defines a data type with 'attributes' (like properties) and 'methods' (behaviors). An 'object' is an 'instance' of a class. Here's an example to put it together:


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


You'll also need to know about Inheritance. This allows a class to inherit attributes and methods from another class. This creates a hierarchy and allows code to be reused. This consists of a 'base'/'parent' class that the 'derived'/'child' class inherits from. Here's an example below:


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


This last part brings all of this together that's why it is appropriately called Object Relationships. This relates objects to each other in various ways. Two of these ways are 'composition' which is made up of one or more objects from other classes as a relationship, and 'aggregation' where a class can contain objects from other classes but they can be independent. Here's an example of this:


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


I hope this post helps you out with your Python journey. Feel free to comment if there are any errors or anything that could help this post be more beneficial to new Python learners or SE students!!
How Function And Variables Works in JavaScript : Behind the Scenes
Tags: javascript, webdev, frontend, development
Published: 2024-05-29 18:31:28

**Function is The Heart Of JavaScript**

Everything in JavaScript Happens Inside an Execution Context
All JavaScript code runs within an execution context, which provides an environment for the code execution. When JavaScript code runs, it first creates a Global Execution Context (GEC). The GEC ( Global Execution Context )  Put Into The Call Stack .

**What is Call Stack In JavaScript ?**

The call stack in JavaScript is a mechanism that helps the JavaScript engine keep track of function calls and their execution order. It follows the Last In, First Out (LIFO) principle, meaning that the last function called is the first one to complete execution and be removed from the stack.

**It Has two main components:**
- **Memory Component** (Variable Environment)
- **Code Component** (Thread of Execution)
Building a Movie Recommendation Program in Python
Tags: python, computerscience, algorithms, programming
Published: 2024-05-29 18:24:38

## **Introduction**
In today's digital age, finding the perfect movie to watch can be overwhelming with so many options available. To address this, I built a Movie Recommendation Program in Python, designed to help users easily discover movies by genre and release year. This tool simplifies the decision-making process and makes movie selection more enjoyable.

## **The Program in Action**

### How It Works
The Movie Recommendation Program is comprised of three main files:
- `app.py`: The main application file that handles user interaction.
- `movie_management_system.py`: Contains the classes and methods for managing the movie collection.
- `movies_dataset.csv`: A dataset file with information on various movies.

### Code Overview
- Loading Movies: The program reads data from `movies_dataset.csv` and loads it into a `MovieCollection` object.
- User Interaction: Users can search for movies by genre or filter them by release year.
- Movie Management: The `MovieCollection` class in `movie_management_system.py` organizes movies into genres and allows for efficient retrieval and display.

Here’s a snippet of the main application:

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

## **Check Out the Code**
The complete source code for the Movie Recommendation Program is available on GitHub. Feel free to explore, fork, and contribute to the project!

GitHub Repository: [Movie Recommendation Program](https://github.com/Medo-ID/Movie_Recommendation_Program)

## **Conclusion**
The Movie Recommendation Program is a simple yet powerful tool for movie enthusiasts. By leveraging Python, this program demonstrates how technology can enhance our entertainment experience. I hope you find this project useful and inspiring for your own coding journey. Happy coding!
Solution Street is hiring an Azure API Management Architect
Tags: hiring
Published: 2024-05-29 18:11:58

## **About Solution Street**
Solution Street, a software engineering firm, was founded by a software developer who envisioned a safe haven for software engineers who wanted to work on interesting, fun projects. Since 2002, we’ve stuck by this principle and as a result, we’ve developed long, lasting relationships with our clients and have a team of great developers who love what they do.

We enjoy working with cutting edge technologies and providing solutions to complex business problems. Our employees are experts in building large, highly scalable and well performing web applications using many technologies. We are Microsoft and AWS partners.

At Solution Street we value all employees and job candidates as unique individuals, and we welcome the variety of experiences they bring to our organization. As such, we have a strict non-discrimination policy. We believe everyone should be treated equally regardless of race, sex, gender identification, sexual orientation, national origin, native language, religion, age, disability, marital status, citizenship, genetic information, pregnancy, or any other characteristic protected by law.


## **Azure API Management Architect**
At Solution Street, our employees have many opportunities to work on interesting, challenging projects supporting clients one-on-one in various domains primarily in the commercial space. Our company culture thrives on our five core values: Honesty, Respect, Transparency, Dependability, and FUN! They're embedded in everything we do and how we do it!

We are currently seeking a very strong Azure API Management Architect that can lead the design and architecture of API solutions using Azure API Management services.

## **Skills & Qualifications**
<u>Required:</u>
- 7+ years experience as a Full Stack Developer
- Proven experience as a Technical Architect
- Understanding of API Development Lifecycle and management principles
- Experience designing and implementing API solutions in a Cloud envioronment
- Excellent communication, collaboration and leadership skills

<u>Preferred</u>
- Experience with Azure API Manager
- Certifications in Azure and API Management technologies
- Experience with Agile development methodologies
- Experience with DevOps practices and tools

## **Responsibilities:**
- Configure API
- Implement capabilities to test API
- Implmentation of API keys
- Integration with Azure B2C or Azure AD
- API Documentation and Testing


## **How To Apply**
Apply on our website at https://solutionstreet.com/open-position.php?id=3818&salesforce_id=a0DVS00000106G92AI
Laravel blade page not working
Tags: laravel, php, laravelphp, webdev
Published: 2024-05-29 18:09:55

Description
my code not working showing only a blank page i am also trying (php artisan cache: clear) and (php artisan view: clear) but still same problem not showing anything if I use @include then showing 500 errors please help me with what I do. 


Answered by CDLCELL:

Neeraj, your code is fine but you placed your logic in opposite files. Cut welcome blade stuff and paste it into the master blade file. Similar cust master blade stuff and paste into the welcome blade file.
Then call the welcome blade in the route and it will work.
Let me know if you are still facing the issues.

https://solutions.cdlcell.com/post/laravel-blade-page-not-working-Tz4

Visit: www.cdlcell.com
Implementing Soft Deletes with Entity Framework Core
Tags: dotnet, csharp
Published: 2024-05-29 18:07:49

---
title: Implementing Soft Deletes with Entity Framework Core
published: true
description: Hola! I’m Michael, and in this video, we’ll cover how to implement soft deletes with Entity Framework Core. By default, Entity Framework Core will permanently delete records when using the .Remove method. We’ll use an EF Core interceptor and query filter to soft delete records.
tags: dotnet, csharp
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a5u4axcjvw05m11ttncq.png
---

{%youtube B9C4iK8IGbQ %}
QRow and QCol not available
Tags: javascript, programming, beginners, quasar
Published: 2024-05-29 18:03:54

Hi to all, I'm a newbee in the use of quasar and I have a strange issue. I can't use QRow and QCol components because they seems to be missing in my project. I have tried at all, also reinstall dependencies but in node_modules/quasar I don't see anything about this two components. For now I work on a Windows 10, can be this the problem in this case?
My character sing for me on my birthday!
Published: 2024-05-29 18:02:17


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fvizcoctwo3m63mfdb1l.png)https://youtu.be/SV-aJ4kIDU8 
Mei Mei the assistant sang a song for me on my birthday on May 29
I made my wish on that moment, that I could soon be recognized as a world class game developer!!!! Yaahhh!!! 
Yes I create this in 4 hours, I cant afford any more time for it.
hashtag#unity hashtag#unitydev hashtag#gamedevelop hashtag#taniafelidae hashtag#tonicatfelidae hashtag#gamedev hashtag#develope
Understanding MySQL Query Optimizer: COUNT(id) vs COUNT(*)
Tags: mysql, performance, webdev
Published: 2024-05-29 18:00:00

In MySQL, we use "COUNT" functions almost every day to help us calculate the number of rows for a given query. The biggest dilemma of every developer regarding performance is whether it is better to use "COUNT(\*)" or "COUNT(id)".

---

## MySQL Optimizer

MySQL optimizer is a critical component of MySQL responsible for determining the most efficient way to execute a given SQL query. This part plays a key role in the dilemma of which "COUNT" is the fastest. So let's explain...

We create the "users" table, which will have an index on the "first_name" column:

```
CREATE table users (
    id int NOT NULL AUTO_INCREMENT,
    first_name varchar(256) NOT NULL,
    PRIMARY KEY (id),
    INDEX idx_first_name (first_name)
);
```

We add a few rows and run the following 2 queries:

```
EXPLAIN SELECT COUNT(id) FROM users;
```
```
EXPLAIN SELECT COUNT(*) FROM users;
```

When you run these 2 SQL queries, you will notice that they use the same index, "COUNT(\*)" is not slower at all, the MySQL Optimizer is responsible for that, which finds the index in the table that will give the best performance. In this case, both queries will return data at the same speed, because they use the same index and because the MySQL optimizer decided that that index is the most efficient.

MySQL Optimizer considers many parameters that contribute to choosing the best index key so that the given query returns data as quickly as possible.

---

## Conclusion

The use of "COUNT(\*)" is generally recommended because it allows the MySQL Optimizer to choose the most efficient approach, while "COUNT(column_name)" can be specifically useful in situations where it is necessary to count only non-NULL values ​​in a particular column. Understanding how the MySQL Optimizer works and how to use indexes is critical to achieving optimal query performance.
Difference between Libraries and Frameworks
Published: 2024-05-29 17:46:52

**Libraries: Tools in Your Toolbox**

A library is a collection of reusable code modules that provide specific functionality, such as parsing JSON, making HTTP requests, or manipulating data structures. Libraries are typically designed to be called directly by the application code, giving developers control over when and how to use them.

```js
// Example of using the 'lodash' library to manipulate arrays
const _ = require('lodash');

const numbers = [1, 2, 3, 4, 5];
const sum = _.sum(numbers);
console.log(sum); // Output: 15
```

In this Node.js example, we're using the lodash library to calculate the sum of an array of numbers. The library provides a sum function that we can directly invoke in our code.

**Frameworks: Guiding Your Application**

A framework, on the other hand, is a pre-defined structure or scaffolding that dictates the overall architecture and flow of an application. Frameworks impose an inversion of control, where the framework dictates the flow of control and developers plug in their code at specific points.

```js
// Example of using the 'Express' framework to create a web server
const express = require('express');
const app = express();

app.get('/', (req, res) => {
  res.send('Hello, World!');
});

app.listen(3000, () => {
  console.log('Server is running on port 3000');
});
```

In this Node.js example, we're using the Express framework to create a simple web server. Express provides a predefined structure for handling HTTP requests and routes, and developers plug in their route handlers within this structure.


**Choosing Between Libraries and Frameworks**
The choice between a library and a framework depends on the level of control and guidance you need for your application:

- Libraries offer flexibility and control, allowing developers to choose when and how to use specific functionalities.
- Frameworks provide structure and guidance, streamlining the development process by offering pre-defined solutions for common tasks.

Understanding the difference between libraries and frameworks is essential for selecting the right tools for your development projects. Whether you need granular control or prefer a guided approach, both libraries and frameworks play vital roles in building successful applications. Consider the trade-offs between libraries and frameworks, and choose the tools that best align with your project's requirements.

**Console You Later!**
As a gaming developer, how can I leverage Gaming platform to create engaging free online games that require no download?
Tags: indiegame, dev, game, gamedev
Published: 2024-05-29 17:35:07

"As a[ gaming developer,](https://medium.com/@adreeshelk/publishing-on-a-robust-gaming-platform-key-considerations-for-developers-1c8888f80d91?utm_source=referral&utm_medium=Medium&utm_campaign=Nostra) Gaming platform offers a unique opportunity to create captivating free online games that don't require any downloads. By leveraging cutting-edge technology and vast user base, you can develop games that are instantly accessible and highly engaging.
One of the key advantages of developing free online games for gamers is the platform's no-download approach. This means that players can instantly access your games without the need for any installations or storage space on their devices. To make the most of this feature, focus on creating games with simple, intuitive controls and engaging gameplay mechanics that can be enjoyed in short bursts.
This [Gaming platform](https://nostra.gg/articles/lock-screen-new-opportunity.html?utm_source=referral&utm_medium=article&utm_campaign=Nostra) also provides gaming developers with a range of tools and APIs to enhance the player experience. Utilize features like leaderboards, achievements, and social sharing to foster a sense of competition and community among players. Additionally, Analytics tools allow you to gain valuable insights into player behavior, helping you optimize your games for maximum engagement.
By developing [free online games](https://medium.com/@adreeshelk/creating-vivid-ongoing-interaction-encounters-with-nostra-games-d12e7e8593ba?utm_source=referral&utm_medium=Medium&utm_campaign=Nostra) that can be played instantly on this platform, you'll have the opportunity to reach a massive audience of eager gamers. Embrace the power of this platform to create games that captivate players and keep them coming back for more."
Expert Retail App Developers in USA
Published: 2024-05-29 17:34:50

Crafting engaging, scalable, and personalized retail solutions is crucial in today's market. To transform retail landscapes, partnering with a leading [retail app development company](https://www.technbrains.com/industries/retail-app-development) like TechnBrains can be a game-changer. Our expertise in developing innovative retail apps can help you enhance customer experiences, streamline operations, and drive sales. Whether you're looking to build a mobile app, an e-commerce platform, or a custom retail solution, TechnBrains has the skills and experience to bring your vision to life. Partner with us today and take your retail business to new heights.
La définition du langage de programmation Python
Published: 2024-05-29 17:12:24

Python est un langage de programmation interprété, c'est à dire que quand vous faites un code python pour pouvoir être interprété, il a besoin d'un interpréteur, qui va lire le fichier pour donner le résultat.

Python est un langage facile comparé aux autres langages de programmation, il enlève quelques obligations quant on code, comme l'initialisation d'une variable en précisant le type. Et aussi, les noms des fonctions de base sont assez simples à retenir.

La python standard library est aussi une bonne library, c'est la library de base qu'il y a dans python, elle est très variée.

Et au passage, c'est vraie c'est dur de retenir comment on écrit le nom de ce langage, mais ce n'est pas phyton, mais c'est python.
Learning AWS Day by Day — Day 78 — Amazon DocumentDB
Tags: aws, cloud, cloudcomputing
Published: 2024-05-29 17:12:19

Exploring AWS !!

Day 78

Amazon DocumentDB

Amazon DocumentDB (with MongoDB Capability) is fast, scalable, highly available database service supporting MongoDB workloads. It makes easy for us to store and index JSON data.
This is a non-relational database service designed from basic to give you better performance and scalability when operating critical MongoDB workloads at scale. In DocumentDB, storage and compute are decoupled, allowing to scale independently. The read capacity to millions of request per second can be increased by adding upto 15 low latency read replicas.
We can use same drivers, same code and same tool those you use with MongoDB.

When using DocumentDB, we start by creating clusters. A cluster contains instances and volumes to manage the storage for that instance.
The cluster consists of 2 components:
Cluster volumes: DocumentDB has one cluster storage volume, storing 128 TB of data.
Instances: It can contains 0–16 instances.

DocumentDB provides multiple connection options, and to connect with the instance we specify the instance’s endpoint. An endpoint is a host address and a port number, separated by a colon.
Download 100 Retro Figma Shapes for Free Today
Tags: figma, ui, uidesign, webdev
Published: 2024-05-29 17:10:02

Looking to infuse your designs with a touch of vintage flair? collection of 100 retro Figma shapes has you covered. Dive into a treasure trove of meticulously crafted design elements, including 3D-inspired icons, graphics, and UI/UX components. Whether you're working on a website, app, or graphic project, these versatile shapes offer endless possibilities for creativity.
<br>
[100 Freebies Figma Charts & Graphs Icons](https://neattemplate.com/figma-icons/100-freebies-figma-charts-graphs-icons/)
<br>
Best of all, they're completely free to download in SVG, PNG, and vector formats. Whether you're a seasoned designer or just starting out, these free resources are an invaluable addition to your toolkit. Explore our collection today and discover how these retro Figma shapes can breathe new life into your designs.

Author: Streamline
[Download](https://www.figma.com/community/file/1344600563086398535)
FastAPI Beyond CRUD Part 2 - Build a Simple Web Server (Path & Query Params, Request Body, Headers)
Tags: fastapi, api, python, programming
Published: 2024-05-29 17:08:57

This video demonstrates the process of constructing a web server, utilizing FastAPI's CLI for running the server, and explore various methods of inputting data, including path parameters, query parameters, request bodies, and more. #fastapi #python

{%youtube 7DQEQPlBNVM%}