Skip to content

Instantly share code, notes, and snippets.

View Animeshz's full-sized avatar
👋

Animesh Sahu Animeshz

👋
View GitHub Profile
@Animeshz
Animeshz / clean_code.md
Created January 12, 2023 15:28 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@Animeshz
Animeshz / prime.cpp
Created January 7, 2022 11:50 — forked from rongjiecomputer/prime.cpp
Sieve of Eratosthenes with C++ constexpr
#include <stdio.h>
template <size_t N>
struct PrimeTable {
constexpr PrimeTable() : sieve() {
sieve[0] = sieve[1] = false;
for (size_t i = 2; i < N; i++) sieve[i] = true;
for (size_t i = 2; i < N; i++) {
if (sieve[i])
for (size_t j = i*i; j < N; j += i) sieve[j] = false;
@Animeshz
Animeshz / contact-extract.py
Last active May 27, 2024 04:33
IIITL Contact Extract (Unofficial WhatsApp Group)
import csv
import difflib
import io
import re
import requests
SHEET_URL = 'https://docs.google.com/spreadsheets/d/1PIVUewR8OE9LHSoEvpH6jEoaDvd3TpH2t3ryZwptxJs/edit#gid=561315341'
BRANCHES = ['CSAI', 'CSB', 'CS', 'IT']
if __name__ == '__main__':
class A {}
class B extends A {}
class C extends A {}
void main() {
List<A> animals = [B()];
List<C> cats = [];
array
(
[collector] => Animeshz\ClusterPlus\Utils\Collector#1
(
[*:client] => Animeshz\ClusterPlus\Client#2
(
[*:collector] => Animeshz\ClusterPlus\Utils\Collector#1(...)
[*:pool] => Animeshz\ClusterPlus\Dependent\Pool#3
(
[*:client] => Animeshz\ClusterPlus\Client#2(...)
<?php
/**
* ClusterPlus
* Copyright 2018 Animeshz, All Rights Reserved
*
* License: https://github.com/Animeshz/ClusterPlus/blob/master/LICENSE
*/
namespace ClusterPlus\Commands\types;
<?php
/**
* ClusterPlus
* Copyright 2018 Animeshz, All Rights Reserved
*
* License: https://github.com/Animeshz/ClusterPlus/blob/master/LICENSE
*/
namespace ClusterPlus\Commands\types;
@Animeshz
Animeshz / TeluskoLerning3_4Assignment.java
Created September 8, 2018 14:43
TeluskoLearning Assignment of chapter 3.4
public class TeluskoLerning3_4Assignment
{
public void assignment1()
{
for(int i=1; i<=6; i++) {
for (int j=1; j<=i; j++) {
System.out.print(j + " ");
}
System.out.println();
<?php
/**
* You don't need to know what this does.
*
* @package ClusterPlus
* @author Animesh Sahu <animeshsahu19@yahoo.com>
*/
namespace ClusterPlus\custom;