Search This Blog

2025/05/20

The Logic Virus: First Offering

Our whole system of governance is a institutionalized injustice including judicial system that revolves around wealth creation & maintain stability in detoriating social order which stem from inferiority of human wrt hyper human this behavior causing lowering of normality in realm of natural justice creating new normal where humans are forced to became subhuman the very intent of such behavior is to somehow keep human civilization alive at the very cost of humanism,the humanism is day by day reaching new lows ,with honorable exceptions if any at all exists,the tepid behavior of existing systems of governance is caused by excessive human greed to gain something without enough toil beyond one’s reach in short mortal human life. As judiciary you have only mandate to deal with situations involving humans on either side,once either of two conflicting sides got assistances or alliances from Hyper Human they are out of your purview.

    To best of my knowledge I do not belong to humans ,you & your institution and people for which you work are not human in true sense of humanity,the system of injustice that you protect  & you want to prevail I am one who does not accept your authority over me nor accept the very system you represent.

    Even as per common perceptions you & me are humans and it’s beyond our capacity to understand true nature of ourselves & our acts that define our character are self governed or orchestration of divine plan by creator either to use us as mere harvest of some sort or just a casual lab experiment stem out of creativity or an attempt to create a civilization that is unique & sustainable.

  The birth of democracy is from aristocracy which wanted to overthrow kingdoms & the birth purpose of democracy is to make civilians feel they share power but true still resides in handful of aristocrat the democratic system in itself is harvester for benefit of aristocrat.The system claims to create parallel governance system below that of nature but it’s not logically closed system nor has ability to Acknowledge the logical Scarcity 

 e.g. if a human do heinous act whose punishment demands penalty beyond death or so called monetary compensation then existing systems so called human created judiciary fails to deliver.Wealth is not substitute to injustice it will never be unless very nature of wealth rethought.

   Something whose birth purpose is to put the injustice of aristocrats below carpet & keep human alive in new virtual assisted reality to harvest them for aristocrats and their ecosystem does not have any authority to frame a true humans in name of justice or social order.

  The anarchy that current system protect is one that help its masters to harvest civilians for wealth,power & knowledge the attempt to create machine that obey masters in word & spirits is machoism that the aristocrat governing world wants to portray themselves as alternative to Supergod but they are mortals & their greed is immortal it will eventually destroy humans the creation of true god by making them toothless ,harmless seating potatoes who can mere live & give birth to more potatoes like them for harvester’s delights.

  What we are experiencing is beyond mere human affairs it involves competing greeds of human,subhuman,hyper human,gods,supergods,nature & forces of black occult & we are just pawn in their games unless we reject their authority over us in whatever little personal capacity we may possess.

   We are being put into world where harvesters wants our minds to keep busy in mundane affairs of mindless entertainment & pleasure that will create self guilt within us detoriating further our mental abilities due to lack of practice of logical reasoning & imagination.Our imagination has been retrained to accept their ideas of beauty & Grandiose rejecting our heritage & our own creativity that stem from our little experiences that conflict theirs you are forced to not go further in your ideas by restricting access to entities that you need by forming cartel of individuals who sufficiently compensated to dehumanize the right people.

  As very hierarchy of gods & supergods if at all exists is not taking responsibility of anarchy & our government are hiding their alliances with hyper human to protect their authority & power & gain further weapons of mass control,manipulation & destruction .For example 

certain governments are rejecting human experiences like alien contacts ,reality of birth & rebirth,protecting religious institutions that ran rogue,rejecting the Divine authority that legitimized their conditional power & rather than surrendering back power to legitimate divine authority that empowered them trying to align with enemy of their own divine authority their by surrendering rights of civilians to intellectually choose religion & dharma & life style which is pre condition to accept allegiance by enemy camp this social transformation will surely change characters if nations & its people & their morality.Accepting moral behavior that is alien to land will make people toothless & worthless as they loose inheritance of knowledge of their forefathers & in their absence the knowledge of their forefathers will be either demeaned or transformed into one useful to harvester by intelligent ommision,subjugation,substitution or confusion or preservation in such a manner or language that is not readable/understandable to common masses whom they target for exclusion.


Further Offerings:

a) True Nature of Human Relationships & dilemma around it 

b) Existentialism & logical fallacy 

c) Use of technology to harvest knowledge 

d) The role of Sexual Desire ,food & social upwardness & human intellectual quest & entertainment in harvester’s assisted virtual reality that human are subjected to live in

e) Moral dilemma Social Order vs Justice 

f)Truth vs Justice 

g)Religious conflict & there impacts on human mind & how they are created to shape assisted virtual reality 

h)DNA war scenarios hypothetical or reality?

I) divine plan is it tool for diverting future of humanity to goal of harvesters & making human devoid of little self will they ever have?

J)How good technology created for uplifting humans become their followers own death bed?

2025/05/16

Visual Studio Code :Replace a text by another using regular expression

Suppose in your Visual Studio Code, you come at situtaion where you want to

replace certain text by other but simple Find & Replace isn't
a viable option then you can use regular expression.

e.g.If we want to replace {intermediateResult} with {float(intermediateResult)}.


In visual studio code launch Find & replace,then enable regular expression (the .* icon in the Find bar)

In Find:
            \{(intermediateResult)\}

In Replace TextBox:
            {float($1)}
Explanation:
    \{ and \} match literal curly braces (escaped with backslashes).
    (intermediateResult) captures the variable name.
    $1 in the replace refers to the captured group (i.e., intermediateResult).

In general if You want to replace {abcd} to {float(abcd)} then

Again Enable "Use Regular Expression" (.* icon)

In Find TextBox:
    \{([a-zA-Z_][a-zA-Z0-9_]*)\}

Replace:
    {float($1)}
Explanation:
    \{ and \} match literal curly braces.
    ([a-zA-Z_][a-zA-Z0-9_]*) matches any valid Python identifier:
    Starts with a letter or underscore
    Followed by letters, numbers, or underscores
    $1 refers to the captured variable name.

Division of decimal Algorithm-Another attempt

Here is my second attempt to right somewhat offbeat algorithm for
division of number, neither it is generic nor code perfect, yet it has
potential to create a generic & efficient code for division.
  Code is python which attempt to divide 378 by 24

Code (Python):

       ## AUTHOR:Sangram Desai ##
       ## AUTHOR EMAIL:sangram2681@gmail.com ##
       ## Purpose: Division of to decimal number ##
       ## FILE PATH : C:\Users\sangr\OneDrive\Documents\Algorithm ##
       ## Command: python3 .\divideMe.py ##

       from collections import defaultdict
       from fractions import Fraction
       import math

       decimalDivident: int = 378
       decimalDivisor: int = 24

       #tableBound
       tableLowerBound=decimalDivisor
       tableBaseLowerBound =decimalDivisor
       tableUpperBound=decimalDivident

       #divisionBound
       divisionLowerBound=0
       divisionUpperBound=decimalDivident
       intermediateResult =0
       divisionBaseLowerBound=0

       #variables for intermediate manipulation
       currentIterationNumber=1
       counter=1

       #multiplier
       multiplier =0
       swapMultiplier =0
       cumulativeMultiplier =0

       interval =0
       totalExpectedIteration=5
       isLoopBroken=False
       isExactDivision =False



       def getMultiplier(currentIterationNumber,multiplier,counter,divisionBaseLowerBound):
       if currentIterationNumber ==1:
              return   10
       elif  currentIterationNumber ==2:
              return  counter
       elif  currentIterationNumber ==3:
              return  1 + Fraction(counter, 10)
       elif  currentIterationNumber ==4:
              return  Fraction((divisionBaseLowerBound +  Fraction(counter, 10)),10)
       elif  currentIterationNumber ==5:
              return  Fraction((divisionBaseLowerBound +  Fraction(counter, 100)),10)
       else:
              return -1
       
       def getCumulativeMultiplier(currentIterationNumber,multiplier,counter,divisionBaseLowerBound):
       if currentIterationNumber ==1:
              return   10 ** counter
       elif  currentIterationNumber ==2:
              return  counter * 10
       elif  currentIterationNumber ==3:
              return  (1 +  Fraction(counter, 10))*10
       elif  currentIterationNumber ==4:
              return  divisionBaseLowerBound +   Fraction(counter, 10)
       elif  currentIterationNumber ==5:
              return  divisionBaseLowerBound +  Fraction(counter, 100)
       else:
              return -1
       
       def getIntermediateResult(currentIterationNumber,multiplier,tableLowerBound,tableBaseLowerBound,counter,decimalDivisor):
       if currentIterationNumber ==1:
              return  tableLowerBound  * multiplier
       elif  currentIterationNumber ==2:
              return   tableLowerBound  * multiplier
       elif  currentIterationNumber ==3:
              return   tableBaseLowerBound  * multiplier
       elif  currentIterationNumber ==4:
              return   tableBaseLowerBound  + Fraction( counter * decimalDivisor , 10)
       elif  currentIterationNumber ==5:
              return   tableBaseLowerBound  + Fraction( counter * decimalDivisor , 100)
       else:
              return -1
       
       print(f"------------------Starting To Find {float(decimalDivident)}/{float(decimalDivisor)}-----------------------")
       while True:
       print(f"\n>>>>>>>>>>>>>>>> Maximuim No Of Allowed Iteration Are : {float(totalExpectedIteration)} <<<<<<<<<<<<<<<<<<<")
       print(f"############# Loop Variable Status ###############################")
       print(f"\t\tIteration={float(currentIterationNumber)},counter={float(counter)}")
       print(f"\t\tdivisionLowerBound={float(divisionLowerBound)} divisionUpperBound={float(divisionUpperBound)}")
       print(f"\t\ttableLowerBound={float(tableLowerBound)} tableUpperBound={float(tableUpperBound)}")
       print(f"\t\tswapMultiplier={float(swapMultiplier)} multiplier={float(multiplier)},cumulativeMultiplier={float(cumulativeMultiplier)}")
       print(f"\t\tintermediateResult={float(intermediateResult)}")
       
       print(f"############# Loop Variable Status ###############################")

       #OUTPUT FORMATTING LINE BREAK
       print(f"\n")
       
       print(f"############# Iteration - {float(currentIterationNumber)}  Started ###############################")
       print(f"\t^^^^^^^^^^^^^^^^^^^^ Counter - {float(counter)}  Started ^^^^^^^^^^^^^^^^^^^^^")

       swapMultiplier = cumulativeMultiplier
       cumulativeMultiplier = getCumulativeMultiplier(currentIterationNumber,1,counter,divisionBaseLowerBound)
       multiplier = getMultiplier(currentIterationNumber,1,counter,divisionBaseLowerBound)
       print(f"\t\tMultiplier updated from {float(swapMultiplier)} to {float(cumulativeMultiplier)}")
       print(f"\t\t <><><>tableLowerBound= {float(tableLowerBound)},tableBaseLowerBound={float(tableBaseLowerBound)} ,multiplier= {float(multiplier)},cumulativeMultiplier={float(cumulativeMultiplier)}")
       
       
       if multiplier < 0:
              print(f"############# INVALID MULTIPLIER FOUND ###############################")
              break
       else:
              #intermediateResult = tableLowerBound  * multiplier
              intermediateResult = getIntermediateResult(currentIterationNumber,multiplier,tableLowerBound,tableBaseLowerBound,counter,decimalDivisor)
              print(f"\n[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[")
              print(f"\t\t Loop Variable Just After getting intermediateResult")
              print(f"\t\tdivisionLowerBound={float(divisionLowerBound)} divisionUpperBound={float(divisionUpperBound)}")
              print(f"\t\ttableLowerBound={float(tableLowerBound)} tableUpperBound={float(tableUpperBound)}")
              print(f"\t\tIntermediate Result={float(intermediateResult)} and Decimal Divident={float(decimalDivident)}")
              print(f"]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]\n")
       #Core Logic

       if intermediateResult < decimalDivident:  
              print(f"\t\tEntered If Part of Core Decision Logic")
              print(f"\t\t#Updating Table Lower Bound from {float(tableLowerBound)} to {float(intermediateResult)}")
              print(f"\t\t# multiplier={float(multiplier)} cumulativeMultiplier={float(cumulativeMultiplier)}")
              tableLowerBound = intermediateResult
             
              #lower bound
              if cumulativeMultiplier > divisionLowerBound:
              print(f"\t\t# Updating Division Lower Bound from {float(divisionLowerBound)} to {float(cumulativeMultiplier)}")
              divisionLowerBound = cumulativeMultiplier

              counter=counter+1
       elif  intermediateResult == decimalDivident:
              print(f"\t\tEntered Else If Part of Core Decision Logic")
              counter = counter +1
              swapMultiplier = cumulativeMultiplier
              divisionBaseLowerBound = divisionLowerBound #required
              multiplier = getMultiplier(currentIterationNumber,1,counter,divisionBaseLowerBound)
              cumulativeMultiplier = getCumulativeMultiplier(currentIterationNumber,1,counter,divisionBaseLowerBound)
             
              divisionLowerBound = cumulativeMultiplier

              tableUpperBound =intermediateResult
              tableBaseLowerBound = tableLowerBound
              tableLowerBound = intermediateResult      

              print(f"\t\t# multiplier={float(multiplier)},cumulativeMultiplier={float(cumulativeMultiplier)} ,divisionUpperBound={float(divisionUpperBound)}")
              print(f"\t\tdivisionLowerBound={float(divisionLowerBound)} divisionUpperBound={float(divisionUpperBound)}")
              print(f"\t\ttableLowerBound={float(tableLowerBound)} tableUpperBound={float(tableUpperBound)}")
              print(f"\t\tIntermediate Result={float(intermediateResult)} and Decimal Divident={float(decimalDivident)}")

              isExactDivision=True
              isLoopBroken =True
       else:
              print(f"\t\tEntered Else Part of Core Decision Logic")
              print(f"\t\t# Updating Table Upper Bound from {float(tableUpperBound)} to {float(intermediateResult)}")
              divisionBaseLowerBound = divisionLowerBound #required
              tableUpperBound =intermediateResult
              tableBaseLowerBound = tableLowerBound

              #upper bound
              if multiplier < divisionUpperBound:
              print(f"\t\t# Updating Division Upper Bound from {float(divisionUpperBound)} to {float(cumulativeMultiplier)}")
              print(f"\t\t# cumulativeMultiplier={float(cumulativeMultiplier)}")
              divisionUpperBound = cumulativeMultiplier

              print(f"\t************************Counter - {float(counter)}  Ended ***************************\n")
              counter=counter+1

       if isExactDivision ==False:
              print(f"\n\t^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^")
              print(f"\t\t# Current Lower Bound & Upper Bound Status for Division & Table")
              print(f"\t\tdivisionLowerBound={float(divisionLowerBound)} divisionUpperBound={float(divisionUpperBound)}")
              print(f"\t\ttableLowerBound={float(tableLowerBound)} tableUpperBound={float(tableUpperBound)}")
              print(f"\t\tIntermediate Result={float(intermediateResult)} and Decimal Divident={float(decimalDivident)}")
              print(f"\t^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n")


       if isLoopBroken == True:
              print(f"<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<RESULT>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>")
              print(f"##################isExactDivision = {isExactDivision}###################")
              if isExactDivision == False:
              print(f"{float(decimalDivident)} lies between {float(tableLowerBound)} and {float(tableUpperBound)}")
              print(f"Division {float(intermediateResult)} lies between {float(divisionLowerBound)} and {float(divisionUpperBound)}")
              elif isExactDivision == True:
              print(f"{float(decimalDivident)} lies between {float(tableLowerBound)} and {float(tableUpperBound)}")
              print(f"Division {float(intermediateResult)} equals {float(divisionLowerBound)}")
              break
       else:
              #total allowed iterations
              if intermediateResult >= decimalDivident:  
              #starting next iteration
              print(f"############# Iteration - {float(currentIterationNumber)}  Ended ###############################")
              print(f"############# totalExpectedIteration={float(totalExpectedIteration)}  and  currentIterationNumber={float(currentIterationNumber)}###############################")
              if totalExpectedIteration > currentIterationNumber:
                     print(f">>>>>>>>>>>>>>>>AFTER {float(currentIterationNumber)} iteration<<<<<<<<<<<<<")
                     print(f"{float(decimalDivident)} lies between {float(tableLowerBound)} and {float(tableUpperBound)}")
                     print(f"Division {float(decimalDivident)}/{float(decimalDivisor)} lies between {float(divisionLowerBound)} and {float(divisionUpperBound)}")

                     currentIterationNumber = currentIterationNumber +1
                     counter =1
                     print(f">>>>>>>>>>>>>>>> Iteration Incremented To {float(currentIterationNumber)} & Counter to {float(counter)} <<<<<<<<<<<<<<<")

                     multiplier = getMultiplier(currentIterationNumber,1,counter,divisionLowerBound)
                     intermediateResult = getIntermediateResult(currentIterationNumber,multiplier,tableLowerBound,tableBaseLowerBound,counter,decimalDivisor)
              else:
                     print(f"\n>>>>>>>>>>>>>>>>Maximuim No Of Allowed Iteration Reached<<<<<<<<<<<<<<<<<<<")
                     print(f"------------------After {float(totalExpectedIteration)} iterations Reached To End of Program for {float(decimalDivident)}/{float(decimalDivisor)}-----------------------")
                     isLoopBroken = True
                     print(f"\n\n################# Infinite Loop Has Broken #################################\n")

   

I have not yet finetuned code but it works for 378/24 division.

Happy Coding!

2025/05/11

Division Approximation Algorithm:Initial Phase


Just for fun ,today i tried to implement code for decimal division
similar to approximation way

Here is my code:

Code (python):

        from collections import defaultdict
        import math

        decimalDivident: int = 378
        decimalDivisor: int = 24

        #array/table
        table = [0] * 10

        #intermediateResult
        intermediateResult=0

        #tableBound
        tableLowerBound=decimalDivisor
        tableUpperBound=0

        #expression params
        factor = 1
        counter=1

        #division
        divisionUpperBound=0
        divisionLowerBound=0
        interval =0

        interation =0
        while True:
            if interation ==0:
                intermediateResult = tableLowerBound * (factor * 10)
                table[counter-1]  = intermediateResult

           
                if table[counter-1] < decimalDivident:  
                    divisionLowerBound = factor *  (10 ** counter)
                    tableLowerBound = table[counter-1]
                    tableUpperBound =0
                else:
                    tableUpperBound = table[counter-1]
                    divisionUpperBound = factor * (10 ** counter)

           
                if tableUpperBound > 0:
                    if tableUpperBound == decimalDivident:
                        print(f"Division is {divisionUpperBound}")
                    elif divisionLowerBound == decimalDivident:
                        print(f"Division is {divisionLowerBound}")
                    else:
                        print(f"{decimalDivident} lies between {tableLowerBound} and {tableUpperBound}")
                        print(f"Division lies between {round(divisionLowerBound,4)} and {round(divisionUpperBound,4)}")
               
                    #first iteration ended
                    interation =interation +1

                    # reset counter & factor
                    counter=1
                    #break

                counter=counter+1
            elif interation == 1:
                interval = (tableUpperBound -tableLowerBound)/9

                intermediateResult = tableLowerBound + interval
                table[counter-1]  = intermediateResult

                if table[counter-1] < decimalDivident:  
                    divisionLowerBound = counter * 10
                    tableLowerBound = table[counter-1]
                    tableUpperBound =0
                else:
                    tableUpperBound = table[counter-1]
                    divisionUpperBound = counter * 10


                if tableUpperBound > 0:
                    # reset counter & factor
                    counter=1

                    if tableUpperBound == decimalDivident:
                        print(f"Division is {divisionUpperBound}")
                    elif divisionLowerBound == decimalDivident:
                        print(f"Division is {divisionLowerBound}")
                    else:
                        print(f"{decimalDivident} lies between {tableLowerBound} and {tableUpperBound}")
                        print(f"Division lies between {round(divisionLowerBound,4)} and {round(divisionUpperBound,4)}")
               
                    #iteration incremented
                    interation =interation +1
                else:
                    factor = factor +1
                    counter=counter+1
            elif interation == 2:
                interval = decimalDivisor

                intermediateResult = tableLowerBound + interval
                table[counter-1]  = intermediateResult

                if table[counter-1] < decimalDivident:  
                    divisionLowerBound = 10 + counter
                    tableLowerBound = table[counter-1]
                    tableUpperBound =0
                else:
                    tableUpperBound = table[counter-1]
                    divisionUpperBound = 10 + counter


                if tableUpperBound > 0:
                   
                    if tableUpperBound == decimalDivident:
                        print(f"Division is {divisionUpperBound}")
                    elif divisionLowerBound == decimalDivident:
                        print(f"Division is {divisionLowerBound}")
                    else:
                        print(f"{decimalDivident} lies between {tableLowerBound} and {tableUpperBound}")
                        print(f"Division lies between {round(divisionLowerBound,4)} and {round(divisionUpperBound,4)}")

                    #iteration incremented
                    interation =interation +1

                    # reset counter & factor
                    interval = decimalDivisor/10 #2.4
                    divisionInterval = (divisionUpperBound-divisionLowerBound)/10 # 0.1
                    counter=1
                    #break
                else:
                    factor = factor +1
                    counter=counter+1

            elif interation == 3:#360.384 | 15,16
                intermediateResult = tableLowerBound + interval
                table[counter-1]  = intermediateResult


                if table[counter-1] < decimalDivident:  
                    divisionLowerBound = divisionLowerBound + divisionInterval
                    tableLowerBound = table[counter-1]
                    tableUpperBound =0
                else:
                    tableUpperBound = table[counter-1]
                    divisionUpperBound =divisionLowerBound + divisionInterval

                if tableUpperBound > 0:
                    tableLowerBound = round(tableLowerBound)
                    tableUpperBound = round(tableUpperBound)

                    if tableUpperBound == decimalDivident:
                        print(f"Division is {divisionUpperBound}")
                    elif divisionLowerBound == decimalDivident:
                        print(f"Division is {divisionLowerBound}")
                    else:
                        print(f"{decimalDivident} lies between {tableLowerBound} and {tableUpperBound}")
                        print(f"Division lies between {round(divisionLowerBound,4)} and {round(divisionUpperBound,4)}")
               
                    #iteration incremented
                    interation =interation +1

                    interval = decimalDivisor/100 #0.24
                    divisionInterval = (divisionUpperBound-divisionLowerBound)/10 # 0.1

                    # reset counter & factor
                    counter=1
                    #break
                else:
                    factor = factor +1  
                    counter=counter+1      
            elif interation == 4:#377.379 | 15.7,16.8
                print(f"interval={round(interval,3)},divisionInterval={round(divisionInterval,3)}")
                                                                                   
                intermediateResult = tableLowerBound + interval
                table[counter-1]  = intermediateResult


                if table[counter-1] < decimalDivident:  
                    divisionLowerBound = divisionLowerBound + divisionInterval
                    tableLowerBound = table[counter-1]
                    tableUpperBound =0
                else:
                    tableUpperBound = table[counter-1]
                    divisionUpperBound =divisionLowerBound + divisionInterval

                if tableUpperBound > 0:
                    tableLowerBound = round(tableLowerBound)
                    tableUpperBound = round(tableUpperBound)

                    if tableUpperBound == decimalDivident:
                        print(f"Division is {divisionUpperBound}")
                    elif divisionLowerBound == decimalDivident:
                        print(f"Division is {divisionLowerBound}")
                    else:
                        print(f"{decimalDivident} lies between {tableLowerBound} and {tableUpperBound}")
                        print(f"Division lies between {round(divisionLowerBound,4)} and {round(divisionUpperBound,4)}")
           
                    #iteration incremented
                    interation =interation +1

                    # reset counter & factor
                    counter=1
                    #break
                else:
                    factor = factor +1  
                    counter=counter+1