development

Setting Up a Conda Environment for Your Python Projects

Setting Up a Conda Environment for Your Python Projects

When working on Python projects, it’s essential to create isolated environments to manage dependencies and avoid conflicts. This guide will help you install Anaconda, fix common issues, and set up a virtual environment for your projects. 1. Install Anaconda (in root terminal) First, install Anaconda by following this guide. Ensure that you have added Anaconda to your shell configuration (~/.zshrc or ~/.bashrc). After installation, verify by running: conda --version Enter fullscreen mode Exit fullscreen mode 2. Fix Conda Activation Errors If you encounter errors when running conda activate venv, such as permission issues, follow these steps to fix them: Adjust…
Read More
ML Pie chart

ML Pie chart

import boto3 import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import joblib import tempfile from sklearn.compose import ColumnTransformer from sklearn.preprocessing import OneHotEncoder, StandardScaler from sklearn.feature_selection import SelectKBest, f_classif from sklearn.model_selection import train_test_split from sklearn.linear_model import LogisticRegression from sklearn.metrics import accuracy_score, precision_score, recall_score, f1_score, confusion_matrix # Define S3 details bucket_name="employee-data" file_key = 'inputfiles/employee_cleaned_data.csv' # Load dataset from S3 s3_client = boto3.client('s3') obj = s3_client.get_object(Bucket=bucket_name, Key=file_key) df = pd.read_csv(obj['Body']) # Data preprocessing df = df.drop(columns=['employee_id']) df['region'] = df['region'].str.extract('(d+)').astype(int) X = df.drop(columns=['turnover']) y = df['turnover'] # Column transformer preprocessor = ColumnTransformer( transformers=[ ('num', StandardScaler(), ['age', 'salary']), ('cat', OneHotEncoder(), ['department',…
Read More
Starting Your Cloud Journey: Roles, Resources, and Realistic Expectations

Starting Your Cloud Journey: Roles, Resources, and Realistic Expectations

Starting Your Cloud Journey Over the past week, many people have reached out to me, curious about starting a career in the cloud and how to begin their journey. As someone who has recently started this journey myself, I understand the excitement and uncertainty that comes with exploring this field. These conversations inspired me to share my early experiences to encourage and guide those considering a career in cloud computing. In this post, I’ll discuss: Finding your role in the cloud Educational resources to get started Setting realistic expectations Finding Your Role in the Cloud The cloud industry is vast,…
Read More
An Overview of AWS Global Infrastructure Part-1

An Overview of AWS Global Infrastructure Part-1

Ever wandered? How Regions & Zones Shape Our Cloud Experience (For example, have you ever wondered how the internet delivers your favorite movies and games so quickly? It is like magic, and different cloud vendors are the magicians working behind the scenes.) Now you might say, What do you mean by region, zones, and edge locations? Well, before that, we have to understand what the AWS Global Infrastructure is!!It's basically globally distributed hardware and data centers that are physically networked together to act as one large resource for the end customer. The AWS Global Infrastructure is made up of the…
Read More
Jinbase – Multi-model transactional embedded database

Jinbase – Multi-model transactional embedded database

Hi Dev ! I'm Alex, a tech enthusiast. I'm excited to show you Jinbase, my multi-model transactional embedded database. Almost a year ago, I introduced Paradict, my take on multi-format streaming serialization. Given its readability, the Paradict text format appears de facto as an interesting data format for config files. But using Paradict to manage config files would end up cluttering its programming interface and making it confusing for users who still have choices of alternative libraries (TOML, INI File, etc.) dedicated to config files. So I used Paradict as a dependency for KvF (Key-value file format), a new project…
Read More
Add DNS Records for Your Domain in Route53

Add DNS Records for Your Domain in Route53

After configuring your Public Hosted Zone and updating your Name Servers at your third-party registrar, you type your domain name into the browser: DNS_PROBE_FINISHED_NXDOMAIN Oh no! Your domain name isn't resolving because it doesn't have an IP address associated with it. Therefore, it's time to obtain an IP address via an EC2 instance and add the necessary DNS records. Let's Build... In Public. Launch An EC2 Instance Launch an EC2 Instance. Name your instance: MyDomainServer Quick Start: Amazon Linux Amazon Machine Image: Amazon Linux 2 AMI (HVM) (Free Tier eligible) Architecture: 64-bit (x86) Instance type: select t3.micro Under Key pair…
Read More
PostgreSQL Full Text Search Rank by Position

PostgreSQL Full Text Search Rank by Position

Recently, I encountered a problem with full-text search. I am using this feature in my search input, where the backend sends hints of possible matches as you type. The backend database is PostgreSQL. I needed the hints to be ranked by the position of the searched term in the text. Full Text Search in PostgreSQL Full-text search in PostgreSQL can be achieved quite easily. There are two main tools to use: tsvector - represents a searchable document. tsquery - represents the search query to perform against a document. Let’s say we want to search the titles of our blog posts.…
Read More
Understanding GraphQL: A Comprehensive Overview

Understanding GraphQL: A Comprehensive Overview

In the rapidly evolving landscape of web development, the need for efficient data retrieval methods has never been greater. Traditional REST APIs, while foundational, often struggle with issues like over-fetching and under-fetching data. Enter GraphQL, a powerful query language developed by Facebook in 2012 that has transformed how developers interact with APIs. This blog will explore what GraphQL is, its advantages over REST, its architecture, and practical use cases. What is GraphQL? GraphQL is a query language for APIs and a runtime for executing those queries by leveraging existing data. Unlike REST, which typically exposes multiple endpoints for different resources,…
Read More
Bridging CLI and Note-Taking

Bridging CLI and Note-Taking

As developers, we spend countless hours in the terminal. It's our primary interface for everything from git operations to server management. But what happens when you need to quickly jot down a thought or make a note while deep in a coding session? For me, this meant an annoying context switch. I use Logseq as my primary note-taking and knowledge management system, but every time I needed to make a quick note, I had to: Take my hands off the keyboard Reach for the mouse Switch windows to Logseq Navigate to today's journal Make my note Switch back to the…
Read More
Weapons-grade Metaprotocols on METASHREW

Weapons-grade Metaprotocols on METASHREW

For those who have attempted to extend Bitcoin via the metaprotocol layer, or even just write software to index metaprotocols such as ordinals or BRC-20, you may be aware of the scope of the problem. Most traditional metaprotocols we've seen are easy enough to understand a schema for, as far as the rules to process a single block to update the state of an index. For ordinals, parsing a block to track the owner of an inscription by a given sequence number, may require program flow such as: Process each transaction, and if there is a witness stack with an…
Read More
No widgets found. Go to Widget page and add the widget in Offcanvas Sidebar Widget Area.