Open in app

Sign In

Write

Sign In

Mipsmonsta
Mipsmonsta

42 Followers

Home

About

Oct 24, 2022

Fast Python Prime Counting using Optimised Sieve of Eratosthenes

Harnessing the slice ability of Python Sieve of Eratosthenes is a simple and ancient algorithm used to find the prime numbers. It is one of the most efficient ways to find small prime numbers. For a given upper limit n, the algorithm works by iteratively marking the multiples of primes…

Python

2 min read

Python

2 min read


Sep 15, 2022

FAQ of Bitwise Manipulation and their Semantics

I am bad at bitwise operations. So what better way then to create an aide memoir of my learnings. I will update as life goes along. Given an array with two repeated numbers and one single number, how to find the single number using XOR? e.g. array = [4, 4…

Python

2 min read

Python

2 min read


Sep 14, 2022

How Negative Numbers are Represented in Python?

We all learn our binary representation of integers in high school or Introduction to Programming 101 classes. The other day, when I was playing with bit-wise masking using Python, I was puzzled how Python represents negative numbers. Turns out, it’s not too different and as usual, you need to use…

Python

1 min read

How Negative Numbers are Represented in Python?
How Negative Numbers are Represented in Python?
Python

1 min read


Apr 3, 2022

Golang: Creating Images and Drawing — Simply Explained (Part 2)

Drawing functions to unleash your creativity — In the first part of the titular article (i.e. Part 1), we were introduced to the various data structs and the image.Image interface in the standard golang library. In this part 2, let’s look at compositing. Compositing Compositing is where you have a few images and you want to layer them…

Golang

4 min read

Golang: Creating Images and Drawing — Simply Explained (Part 2)
Golang: Creating Images and Drawing — Simply Explained (Part 2)
Golang

4 min read


Mar 24, 2022

Golang: Creating Images and Drawing — Simply Explained (Part 1)

Let your right brain work with your left to unleash your artistic talent Understanding the key elements of the framework Golang is useful and oft mentioned for it’s web development functions. So let’s take sometime to understand the components of the imaging framework to get the lay of the land. Interface image.Image The interface is what you need to…

Image

4 min read

Golang: Creating Images and Drawing — Simply Explained (Part 1)
Golang: Creating Images and Drawing — Simply Explained (Part 1)
Image

4 min read


Mar 7, 2022

Golang: gRPC Steps Explained

Step by step guide — High level overview of gRPC Define service using protocol buffer language Generate native code magic glue to tie readable protobuf definition and code (server & client application code you will write) Write Server side code Write Client side code First, what is gRPC? We know RPC stands for Remote Procedure Call. I have also done…

Golang

3 min read

Golang: gRPC Steps Explained
Golang: gRPC Steps Explained
Golang

3 min read


Mar 1, 2022

E-Paper (Golang Port) — Epd for the Raspberry Pi

Introduction I have the e-paper hat for the Raspberry Pi, specifically the 2.7 inch display. As I was tickering with Golang as a system programming, I wondered whether I could control the hat using the Go language. After much research, I found the periph.io project, which supports communications via the SPI…

Raspberry Pi

2 min read

E-Paper (Golang Port) — Epd for the Raspberry Pi
E-Paper (Golang Port) — Epd for the Raspberry Pi
Raspberry Pi

2 min read


Feb 17, 2022

Salient Points for Protocol Buffers

Simply Explained (for Golang) — How to start .proto file? syntax = "proto3"; Without the line above, the complier for protocol buffer will assume the syntax is based on proto2. Specify Field Types All fields are scalar type: string, float, int32, int64, uint32, uint64, sint32, sint64, fixed32 (always 4 bytes), fixed64 , bool, string, bytes etc. message Foo { //this is a message…

Golang

3 min read

Golang

3 min read


Published in

System Weakness

·Feb 10, 2022

Golang: Understanding how Go HTML template system prevents Crossed Site Attack (XSS)

We often hear about XSS attacks and the importance of escaping user-submitted content. These attacks are deemed basic and developers may not fully appreciate how easy it is to trigger the attacks. The aim of this article is to show you code on how to go about a XSS attack…

Go

4 min read

Golang: Understanding how Go HTML template system prevents Crossed Site Attack (XSS)
Golang: Understanding how Go HTML template system prevents Crossed Site Attack (XSS)
Go

4 min read


Published in

Towards Dev

·Feb 3, 2022

Golang: Using buffered channel like a mutex

In the sync library that’s part of the official Go package, the following statement is made: Package sync provides basic synchronization primitives such as mutual exclusion locks. Other than the Once and WaitGroup types, most are intended for use by low-level library routines. Higher-level synchronization is better done via channels…

Go

4 min read

Golang: Using buffered channel like a mutex
Golang: Using buffered channel like a mutex
Go

4 min read

Mipsmonsta

Mipsmonsta

42 Followers

Writing to soothe the soul, programming to achieve flow

Following
  • Xiaoyun Yang

    Xiaoyun Yang

  • Benjamin “Mr Miyagi” Lee

    Benjamin “Mr Miyagi” Lee

  • Android Developers

    Android Developers

  • ExtremeTech

    ExtremeTech

  • Roberto Carreño

    Roberto Carreño

See all (25)

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech