teleren/devto huggingface dataset:
Hello, World! 🥳
Tags: hello, alx, feynman
Published: 2022-10-31 18:04:04

I have always wanted a personal blog. My own corner of the web where I am able to share the little I know. Procrastination however, has always seemed to get the better of me. Enter September 2022; I started a Software Engineering (SE) Program with [ALX Africa](https://www.alxafrica.com). Now while this may not seem connected at first, learning at ALX gave me that final push I needed. Here's how.


### Feynman What?

As it sometimes happens with learning, it is often difficult to assimilate new concepts at first. So to help us on our journey, we were introduced to the Feynman Technique. An aspect of this technique that proved very effective for me was the recommendation to attempt explaining concepts to a 12-year old. The following is a quote from this [awesome Feynman Technique article](https://fs.blog/feynman-technique/) that struck a chord with me:

> "The person who says he knows what he thinks but cannot express it usually does not know what he thinks." - Mortimer Adler

For me, the results were surprisingly positive. On one hand, attempting to do the said explanation to a kid forced me to dig deep, searching for simpler words to express meaning. In the process, I often got an Aha! moment; an instance of time where everything became clear all of a sudden.

On the other hand, using the same technique, I tried to explain concepts I thought I understood. Turns out, gaps in my knowledge and understanding kept appearing. Who knew! 😒

Furthermore, I experienced similar results when trying to explain concepts to my SE colleagues at ALX who had not yet grasped the concepts under consideration. Now, this is not meant to sound patronizing, but in those instances, they were like the 12-year old.


### On Your Marks, Get Set, Write!

It occurred to me later on, that putting my thoughts into writing , would be a more effective way of getting points accross to others. Especially since well written articles on programming concepts which were done by others, proved to be invaluable resources for my colleagues and I. This has also contributed to tipping me over the writing edge.

What is more, while working on my initial set of notes for my colleagues, I found myself doing lots of research as knowledge gaps inevitably appeared. So, in the end, as I tried to help others, I got better myself. So looks like I will be doing this writing gig for real. 😏

Also, it turns out that blogging would help me achieve success as a developer. More on that  in [this awesome article](https://www.freecodecamp.org/news/why-documenting-your-journey-will-lead-to-success-as-a-developer-38aa9fa4bac8).

On this blog I will be writing about computer programming concepts and my developer journey as a whole. And while I do not yet know how helpful my writings would be, I hope that it makes the journey a little easier for someone out there.

Much love. 💕
Top up game murah
Published: 2022-10-31 17:55:41

Top Up Game Murah

Top up dua adalah sebuah cara untuk mengumpulkan uang.

Tiga orang yang menggunakan top up dua adalah orang Indonesia, Australia dan Uni Eropa.

Top up dua dapat dijual di beberapa negara.

Secara umum, top up dua sangat bagus untuk membantu orang dewasa yang sakit mata, membayar pemeriksaan kesehatan, atau merelokasi keluarga korban bencana.

Seringkali top up dua dilakukan oleh anak miskin, terlampau sedikit uang untuk melakukannya.

Penghasilan dari top up dua sangat bergantung kepada seberapa banyak orang yang mendaftarkan dirinyaryaitu untuk mengubung sistem ini dengan siginifikator pasar.

Setelah pembelian berlangsung setengah tiga tahun, top up dua sudah stabil hingga tiga ratus lebih dollar ASDR (Amerika Serikat Dolar Rendahan).

Namun, setelah puluhan tiga ratus lebih dollar ASDR sebagai penghasilan, tenaga kerja sudah membeli uang barunya sendiri dan selalu mengizinkannya.

Banyak sekali hal yang dapat dilakukan untuk memuatkan uang di dunia maya.

Namun, sebagian besar keterjadi dengan top up terjadi pertumbuhan perdagangan (global financial).

Mungkin hal ini diperoleh akibat tertentu ilegal transaksi dan penggunaan uang palsu.

Namun lain lagi, juga banyak sekali hal yang dirasakan oleh masyarakat berbagai negeri untuk berkepedulian terhadap anak miskin dan anak kewargaan mereka.

Beberapa hal ini sangat menyenangkan bagi mereka-mereka itu untuk dilakukan: misil peningkatan kependudungan! Bahwa puncak kependudungan hanya tinggal satu generasi selanjutnya! Inilah top up dua-dua generasi!

[Top up game mobile legend murah](https://playtren.com) adalah sistem ciptaan manusia yang mudah digunakan dan direkomendasikan bagi para pelafalan dewasa sangat buta uang untuk mengumpulkan uang bar
Are you having problems deploying your Google Cloud Run container?
Published: 2023-09-21 21:21:07

---
title: Are you having problems deploying your Google Cloud Run container?
published: true
date: 2022-10-31 17:54:26 UTC
tags: 
canonical_url: https://gil.dev/problems-deploying-google-cloud-run-container/
---

Does it run fine locally but it won’t start when deployed and revisioned? Are you using an M1 Mac? You likely need to add this target flag at the end of your `docker build` command.

`--platform linux/amd64`

```console
docker build --platform linux/amd64
```

[https://stackoverflow.com/a/68766137/332586](https://stackoverflow.com/a/68766137/332586)
Tutorial1: Getting Started with Pyspark
Tags: python, pyspark, pandas, beginners
Published: 2022-10-31 17:49:33

As a Data Scientist one might have worked with large amount of data. I never got chance to work on large data earlier. Recently i came across a 1.3gb of sensor data, it was little hard to work on using pandas dataframe. I have to wait for couple of miniutes to read or write data or to perform data manipulation.

I also realize that, While working with big data we can't use pandas dataframe. It fails to give better performing in terms of reading and writing file(IO Operation), even data manipulation also takes time. **Reading a 1gb csv file took around 44sec using pandas while Pyspark took just 6sec.**(The time taken depends on hardware) It made me realize that i need to explore Pyspark.

![pyspark Advantages](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f2fvdhm88kfpqqsyo9cf.png)

In this tutorial, we will see pyspark installation step and doing some basic operation with dataframe object.

## Step1. Pyspark Installation

You will require Java installed in the environment. It also ask for A proper Java Home Variable path defined in the environment. Make sure you install JDK or JRE.

To install pyspark we just need to do pip installation in `conda` or any python `virtual environment`
                    
`pip install pyspark`

## Step2. Session Initalization

Before doing any operation in `pyspark` we need to initialize spark session it can be done like this,

```python
from pyspark.sql import SparkSession
spark = SparkSession.builder.appName('Practice').getOrCreate()
```
Inside the `appName`, we can provide any name based on the objective. The session builder takes little time to setup but it is one time process.

Once its completed `pyspark` is ready to use

## Step3. Reading a File

Pyspark syntax is very similar to pandas. In pandas library we read csv file like this,
```python
import pandas as pd
df_pandas = pd.read_csv('sample.csv')
df_pandas
```
similarly, in the spark we have below syntax
```python
df_pyspark = spark.read.csv("sample.csv")
df_pyspark.show()
```
Note: In pyspark dataframe will not be shown directly, we need to call `show()` on the dataframe object.

## Step4. Some similar functions

There are some functions that are similar in `pandas` and `pyspark` dataframe like

```python
# head
df_pandas.head()
df_pyspark.head()
# describe
df_pandas.describe()
df_pyspark.describe()
```
and many more that gives almost similar syntax and results. 

## Step5. Dissimilar functions
There are also few functions which works differently from pandas like column selection and slicing function
ex,
```python
# column selection function
df_pandas['column1']
df_pyspark.select('column1').show()
```
With this note, the pyspark learning journey begins...

### Reference

- https://www.javatpoint.com/pyspark
- https://insaid.medium.com/eda-with-pyspark-1f29b7d1618
Microsoft Azure Cosmos DB | Containers | Global distribution | Performance and many more
Tags: microsoftcloud, azure, devops, database
Published: 2022-10-31 17:44:52


**Introduction**

Azure Cosmos DB is a database service provided by Microsoft's Azure a popular cloud computing platform and is globally distributed. It is a multi-model database service used by corporates and big tech companies to develop modern web and mobile-based applications. It is well-known and supports the document-based structure for storing data.

Functionally the Azure Cosmos DB stores the items in the form of containers. 

**Containers**

Containers are nothing but those which are grouped in databases, which are analogous to the namespaces above containers. 

Containers are schema-agnostic, which means that no schema is enforced while adding items.

**Performance and Indexes**

This database provides great performance in real time because every field in each item is indexed by default without writing or making changes to the schema.

There are two types of indexes offered by Cosmos DB. They are:
1) Range
2) Spatial

**Range:**
Supports range with ORDER BY queries.

**Spatial:**
Supports spatial queries from points, polygons, line strings, and Geo JSON fragments.

**Usecases**

Cosmos databases are used mainly for the below use cases based on their features to provide their service.

IOT

Retail

Marketing

Gaming

Web applications

Mobile based apps
Satisfy the equation
Tags: algorithms, geeksforgeek, beginners, datastructure
Published: 2022-10-31 17:34:07

> problem statement: https://practice.geeksforgeeks.org/problems/satisfy-the-equation5847/1

Given an array A[ ] of N of  integers, find the index of values that satisfy A + B = C + D where A,B,C & D are integers values in the array.
Note: As there may be multiple pairs satisfying the equation return lexicographically smallest order of  A, B, C and D and return all as -1 if there are no pairs satisfying the equation.

 
Example 1:
```
Input:
N = 7
A[] = {3, 4, 7, 1, 2, 9, 8}
Output:
0 2 3 5
Explanation:
A[0] + A[2] = 3+7 = 10
A[3] + A[5] = 1+9 = 10
```

Example 2:
```
Input:
N = 4
A[] = {424, 12, 31, 7}
Output:
-1 -1 -1 -1
Explanation:
There are no pairs satisfying the equation.
```

#### Expected Time Complexity: O(N<sup>2</sup> * logN<sup>2</sup>)
#### Expected Auxiliary Space: O(N<sup>2</sup>)


## Solution

Here, we would create a user defined class Pair for storing Pair. This would be used to maintain the pair. Here map could be used, to store the sum, this sum could be corresponding to the Pair, this sum would be checked, for multiple non distinct pair. Hence we get the distinct pair and while moving from `0 to N` we would get lexicographically smallest order index.

```
class Solution {
    static int[] satisfyEqn(int[] A, int N) {
        HashMap<Integer, ArrayList<Pair>> map = new HashMap<>();
        int a, b, c, d = 0;
        
        for(int i=0; i<N-1; i++) {
            for(int j=i+1; j<N; j++) {
                int sum = A[i]+A[j];
                
                if(!map.containsKey(sum)) {
                    map.put(sum, new ArrayList<Pair>());
                    map.get(sum).add(new Pair(i, j));
                } else {
                    map.get(sum).add(new Pair(i, j));
                }
            }
        }
        
        int [] arr = new int[4];
        Arrays.fill(arr, -1);
        
        for(int i=0; i<N-1; i++) {
            for(int j=i+1; j<N; j++) {
                int sum = A[i]+A[j];
                if(!map.containsKey(sum)) continue;
                
                ArrayList<Pair> lt = map.get(sum);
                for(Pair p: lt) {
                    if(p.a==i || p.b==j || p.a==j || p.b==i) continue;
                    
                    arr[0]=i;
                    arr[1]=j;
                    arr[2]=p.a;
                    arr[3]=p.b;
                    
                    return arr;
                }
            }
        }
        
        return arr;
    }
};

class Pair implements Comparable<Pair> {
    int a,  b;
    public Pair(int a, int b) {
        this.a=a;
        this.b=b;
    }
    
    @Override
    public int compareTo(Pair p) {
        if(this.a > p.a) return 1;
        else if(this.a < p.a) return -1;
        else {
            if(this.b > p.b) return 1;
            else return -1;
        }
    }
}
```
JavaScript Fundamentals
Tags: javascript, beginners, programming, codenewbie
Published: 2022-10-31 17:32:08

# Differences between var, let and const
Variables declared using `var` can be used within the whole function where they were initialized, but variables declared using `let` and `const` can only be inside the block where they were created.

The values of variables declared using `var` and `let` can be reassigned, but in the case of `const` that's not possible.

Variables declared with `var` can have the same name, but in the case of `let` and `const` it's not possible and you will get a Syntax Error. It's only possible to do it for the latter options if they are declared in a different scope.

Variables declared with `var` and `let` without an initial value will have `undefined` assigned as default. In the case of `const` it's not possible to declare a variable and not assign a value to it, JavaScript will return a Syntax Error.

Variables declared with `var` are assigned as a property of the global object, unlike in the case of `let` and `const`.

# Hoisting
Variables declared using `var` are read by the JavaScript interpreter as if they were declared at the beginning of the function or scope. This means that the value of the variable can be referenced before it is declared in the code.

The same thing goes for `let` and `const` but in these cases they are declared without an initial value until they have an assigned value in the code. This time between the beginning of the scope and the assignment of a value to the variable is called **Temporal Dead Zone**. During this time a variable can't be referenced until a value is assigned to it.

This is possible because JavaScript saves in memory in the **Lexical Environment** the references to the declarations as undefined and then assign the value to it later when they are initialized in the code. This is only possible for the following cases:
* Class
* Function
* Const
* Let
* Var

# Scope
This is an important concept because it manages the accessibility of variables in the code depending on how we handle their declaration. There are three type of scopes:
* Global
* Function & Local
* Block

## Global Scope
This is the scope outside a function, all variables declared here can be used anywhere in the code.

## Function & Local Scope
This is the scope inside a function, all variables declared here can only be used inside the scope of the function.

## Block Scope
This is the scope inside a pair of curly braces since JavaScript ES6, all variables declared here, except for `var`, can only be used inside this block.
Open Source
Published: 2022-10-31 16:32:49

**What is Open Source?**
Open source is a term that originally referred to open source software (OSS). Open source software is **code that is designed to be publicly accessible—**anyone can see, modify, and distribute the code as they see fit.

**Doesn't "open source" just mean something is free of charge?**

No. This is a common misconception about what "open source" implies, and the concept's implications are not only economic.

Open source software programmers can charge money for the open source software they create or to which they contribute. But in some cases, because an open source license might require them to release their source code when they sell software to others, some programmers find that charging users money for software services and support (rather than for the software itself) is more lucrative. This way, their software remains free of charge, and they make money helping others install, use, and troubleshoot it.

<table>
<tr>
<td><b>Open source software</b></td>
<td><b>Proprietary software</b></td>
</tr>
<tr>
<td>It offers more flexibility to users.</td>
<td>It is less flexible and often comes with restrictions on users.</td>
</tr>
<tr>
<td>Open source is developed and maintained by a community.</td>
<td>It is developed and maintained by the group who published it. </td>
</tr>
<tr>
<td>Larger community support base as the source code remains open to view and edit</td>
<td>Smaller Support base due to only limited people work on any piece of software while the source code remains a mystery to the outside world.</td>
</tr>
<tr>
<td>Open for collaboration by anyone in the world
</td>
<td>Not open for collaboration by anyone in the world</td>
</tr>
</table>

Open-source development is something that every dev must try, especially beginners. It can help you find your footing in the infinite world of programming, and you also learn a ton of things. And you're pretty much sure to make some amazing friends who will support you in your endeavors. Open source licenses affect the way people can use, study, modify, and distribute software. In general, open source licenses grant computer users permission to use open source software for any purpose they wish. 

List of few opensource software: Mozilla Firefox, Jitisi meet, LibreOffice, Gimp, Audacity, Wordpress, VLC Media Player

References:

- [What is Open-Source?](https://opensource.com/resources/what-open-source)
- [Why you should contribute to Open-Source?](https://dev.to/xenoxdev/why-you-should-contribute-to-open-source-4gka)
- [How to contribute?](https://dev.to/xenoxdev/why-you-should-contribute-to-open-source-4gka)

**_~ Rohit Shidid_**
Build ETF Screener with Free API covering 28,000+ funds
Tags: graphql, webdev, api, etf
Published: 2022-10-31 17:22:11

Hello fintech devs and finance nerds!

We're excited to announce we launched a new 
[GraphQL API focused on ETF* and Mutual Funds](https://www.yuzu.dev/datasets/funds)
*Exchange-traded funds

**The API provides 15+ key attributes for each fund such as:**

- Latest Price (Updates daily for Mutual Funds, and intraday for ETFs)
- Expense ratio (Gross & Net)
- NAV (Net Asset Value)
- Management style (Active / Passsive)
- Asset focus (Equity, Bonds ...)
- Sector focus
- ESG flag
And more!

🍕 Free access via API (No card required)
🕹 Play with the real data in our [Data Explorer](https://graph.yuzu.dev/playground?state=eyJxdWVyeSI6IntcbiAgc2VjdXJpdGllcyhpbnB1dDoge3N5bWJvbHM6IFwiQlVHXCJ9KSB7XG4gICAgaWRcbiAgICBzZWN1cml0eVR5cGVcbiAgICBmdW5kRGV0YWlsIHtcbiAgICAgIHNlcmllc0lkXG4gICAgICBjbGFzc0lkXG4gICAgICBzdGF0dXNcbiAgICAgIGluY2VwdGlvbkRhdGVcbiAgICAgIG1hbmFnZW1lbnRTdHlsZVxuICAgICAgYXNzZXRGb2N1c1xuICAgICAgc2VjdG9yRm9jdXNcbiAgICAgIHRhcmdldERhdGVcbiAgICAgIGlzRXNnXG4gICAgICBuZXRFeHBlbnNlUmF0aW9cbiAgICAgIGdyb3NzRXhwZW5zZVJhdGlvXG4gICAgICBleHBlbnNlUmF0aW9Bc09mRGF0ZVxuICAgICAgbmF2XG4gICAgICBuYXZBc09mRGF0ZVxuICAgICAgbmV0QXNzZXRzXG4gICAgICBuZXRBc3NldHNBc09mRGF0ZVxuICAgIH1cbiAgfVxufSIsInZhcmlhYmxlcyI6bnVsbH0%3D) (no signup needed)


Let us know what you think! We're excited to hear your feedback!
String to CamelCase in dotNet
Tags: dotnet
Published: 2022-10-31 17:20:51

Camel case is the practice of writing phrases without spaces or punctuation. It indicates the separation of words with a single capitalized letter, and the first word starting with either case. Common examples include "iPhone" and "eBay".

## Change to CamelCase

```
public static string ToCamelCase(this string text)
{
  TextInfo _textInfo = CultureInfo.InvariantCulture.TextInfo;
  char[] _camelCase = _textInfo.ToTitleCase(text).Replace(" ","").ToCharArray();

  _camelCase[0] = char.ToLower(_camelCase[0]);
  return new string(_camelCase);
}
```
   
## Explanation
To reach camelCase, we do the following
1. First make it TitleCase
2. Remove the " " (spaces)
3. Lowercase the first character

## NuGet Package
You can create the extension yourself, or you can download the latest version of [CodeHelper.Core.Extensions](https://www.nuget.org/packages/CodeHelper.Core.Extensions)

This packages contains much more cool and fun string extensions
How to: Search AWS-Hosted Application Error Logs
Published: 2022-10-31 17:09:22

Has an application hosted on AWS been throwing an error, and you do not know why?

The AWS Cloud Service which logs application insights and errors is **<u>CloudWatch</u>**. While logged into the AWS console, you can search for this service. After in the service, search for "Logs Insights". This will give you a categorical list of logs for every application or other entity which outputs logs.

On the Logs Insights page, you can select log groups that you desire to see information for. For application errors, the appropriate log group is "stdouterrr", and you can select for which applications you want to see these application logs for.

The default query is:

fields @timestamp, @message
| sort @timestamp desc
| limit 20

You can modify this query by removing the limit line. You can also change your sort parameters or remove them entirely, though sorting by timestamp is helpful as it gives you the most recent logs.

Additionally, you can filter on the message field by modifying your query to the following:

fields @timestamp, @message

| filter @message like /message like this/
| sort @timestamp desc

This is helpful when you want to find errors related to a specific call or API endpoint, which often is listed in the error message.
Why Architecture is needed with software engineering
Tags: architecture, softwaredevelopment, programming
Published: 2022-10-31 17:03:44

## **_Intro_**

With shift to product development mindset and agile delivery, the notion that any team can build valuable product independently due to ‘loosely coupled architecture’ would be successful exists. Is that true ? What is the value of bringing architecture in software delivery process ?

Just like how a _Chef_ possesses the ability of facilitate and manage decision making in a busy restaurant, an architecture decision making is key to ensure successful implementation of a technology to a business problem.  


## The Pasta Machines Analogy
Architecture decision are reciprocal as what we design for influence our behavior while interacting with system. Architecture should look for effective design which foster innovation, systematize and provide stable outcome for business problems. 

**Spaghetti Systems**
Bundling a technical solution for a business problem. Every logic of code is connected to one another. The consequence of that is its painful to make a change. In case of a failed change the roll back to stable version is humongous. The impact would be high as it might need coordination with every other user / system that interacts with this system. The result is a stubborn system. This would frustrate business as the risk against the reward to change the system might not be appealing and the system might loose the relevance

Now the question is what caused the chef to go for Spaghetti? Lack of standards in architecture process. Lot of intertwined work experienced to build a change. Constraints with lack of strategic vision / bigger picture. 

**Ravioli Systems**
System that is designed is modular, nested and talks to each components seamlessly. It becomes easy for the product team to enhance the modules based on the value of business case. Since the changes can be contained within a module the change could be managed effectively. Because system is reversible the learning cycle is faster and the risk could be managed effectively. 

Standardized process, defined patterns and clear direction on how to build a backlog and manage changes enable a better system design in this case the Ravioli


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


## Conclusion
Neglecting architecture with product design would be a mistake. Educate the team about the architecture mindset . 

Came across the below article for further reading

https://www.architectureandgovernance.com/applications-technology/the-mindset-for-architectural-decisions/