Skip to content

Instantly share code, notes, and snippets.

View freakflames29's full-sized avatar
🎯
Focusing

Sourav das freakflames29

🎯
Focusing
View GitHub Profile
@freakflames29
freakflames29 / order.html
Created December 2, 2023 09:35
order tracker html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Order Tracker</title>
<link
href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN"
add(A,B):-read(A),read(B),C is A**B,write('SUM IS'),write(C).
unary(A):-B is sqrt(A),write(B).
circle(R):-A is 3.14*R*R,write(A).
triangle(A,B,C):-S is (A+B+C)/2,AR is sqrt(S*(S-A)*(S-B)*(S-C)),write(AR).
ctof(T):- F is (T*(9/5))+32,write(F).
@freakflames29
freakflames29 / code
Created January 4, 2022 18:08
find lines of code in a repo
curl -L "https://api.codetabs.com/v1/loc?github=freakflames29/spotify-clone"
@freakflames29
freakflames29 / buffer.rb
Created September 27, 2021 15:19
Terminal loading while requesting to an URL
#program to show buffering while requesting an api or a webpage
require "httparty"
module Buffer
$flag=true
def self.show inp,url#,tim
$reqUrl=url
def buffer inp
while $flag
print "#{inp} .\r"
sleep(0.3)
@freakflames29
freakflames29 / hs.cpp
Created July 7, 2021 05:58
hs and madhyamik marks calculator
#include <bits/stdc++.h>
using namespace std;
void madhya()
{
cout<<"Enter Your class 9 final marks of 7 subject out of 100\n";
float bengali,english,geography,math,physical_sc,life_sc,history;
cout<<"Enter bengali marks :- ";
cin>>bengali;
// cout<<endl;
@freakflames29
freakflames29 / thread.rb
Created June 28, 2021 12:49
Thread in ruby
# t=Thread.new{puts "okj"}
b=Thread.new{puts "lvoe"}
# threa=[]
# 5.times do
# threa<<Thread.new{puts "mang0"};
# sleep(2)
# end
# threa.each(&:join)
# puts "Hllp"
@freakflames29
freakflames29 / merg.cpp
Created May 5, 2021 06:53
merge sort in cpp
#include <iostream>
using namespace std;
void ms(int *arr,int low,int mid,int high)
{
int b[low+high];
int i=low;
int j=mid+1;
int k=low;
while(i<=mid && j<=high)
{
@freakflames29
freakflames29 / merge.py
Created May 5, 2021 06:51
merge sort in python
def ms(n):
if len(n)>1:
mid=len(n)//2
lefthalf=n[:mid]
righthalf=n[mid:]
ms(lefthalf)
ms(righthalf)
i=j=k=0
while i<len(lefthalf) and j<len(righthalf):
if lefthalf[i]<righthalf[j]:
@freakflames29
freakflames29 / struct.cpp
Created April 21, 2021 16:12
nested structure in c++
#include<iostream>
using namespace std;
struct Read
{
string areyou;
struct Book
{
string name;
struct Price
{
@freakflames29
freakflames29 / equal_or.rb
Created April 14, 2021 06:24
Ruby equal or operator
x ||= {}
x[:key]="lock"
x[:key]||=50
puts x
# output {:key=>"lock"}
#it is used to assign a value to variable if the variable is not assigned and afer assigning the value we can't change it to new value