Skip to content

Instantly share code, notes, and snippets.

View smith0022's full-sized avatar
🎯
Focusing

smith0022

🎯
Focusing
View GitHub Profile
@smith0022
smith0022 / chemistry.py
Created March 17, 2021 14:02
CHEMISTRY MOLARITY MOLALITY MOLE FRACTION
Elements = {'H': 1, 'He': 4, 'Li': 7, 'Be': 9, 'B': 10.811, 'C': 12, 'N': 14,
'O': 16, 'F': 18.9984032, 'Ne': 20.1797, 'Na': 22.98976928, 'Mg': 24.305, 'Al': 26.9815386,
'Si': 28.0855, 'P': 30.973762, 'S': 32.065, 'Cl': 35.453, 'Ar': 39.948, 'K': 39.0983, 'Ca': 40.078,
'Sc': 44.955912, 'Ti': 47.867, 'V': 50.9415, 'Cr': 51.9961, 'Mn': 54.938045,
'Fe': 55.845, 'Co': 58.933195, 'Ni': 58.6934, 'Cu': 63.546, 'Zn': 65.409, 'Ga': 69.723, 'Ge': 72.64,
'As': 74.9216, 'Se': 78.96, 'Br': 79.904, 'Kr': 83.798, 'Rb': 85.4678, 'Sr': 87.62, 'Y': 88.90585,
'Zr': 91.224, 'Nb': 92.90638, 'Mo': 95.94, 'Tc': 98.9063, 'Ru': 101.07, 'Rh': 102.9055, 'Pd': 106.42,
'Ag': 107.8682, 'Cd': 112.411, 'In': 114.818, 'Sn': 118.71, 'Sb': 121.760, 'Te': 127.6,
'I': 126.90447, 'Xe': 131.293, 'Cs': 132.9054519, 'Ba': 137.327, 'La': 138.90547, 'Ce': 140.116,
'Pr': 140.90465, 'Nd': 144.242, 'Pm': 146.9151, 'Sm': 150.36, 'E
@smith0022
smith0022 / fast_fibonnici.py
Created April 4, 2021 08:19
it code using recursive programming to find fibnocci series
def fast_fib(n,memo):
if n==1 or n==2:
return 1
try:
return memo[n]
except:
final=fast_fib(n-1,memo)+fast_fib(n-2,memo)
memo[n]=final
return final
print(fast_fib(3,{}))
@smith0022
smith0022 / classes_example.py
Last active April 4, 2021 09:10
its a search tree and greedy algorithm example
class Food(object):
def __init__(self, n, v, w):
self.name = n
self.value = v
self.calories = w
def getValue(self):
return self.value
def getCost(self):
@smith0022
smith0022 / HandsTrackingModule.py
Created August 12, 2021 11:22
a module for tracking and can be used for various other purposes
import cv2 as c
import mediapipe as mp
import time
class HandDetect() :
def __init__(self, mode=False, maxhands=2, detectC=0.5, trackC=0.5):
self.mode = mode
self.maxhands = maxhands
self.detectC = detectC
@smith0022
smith0022 / GestureVolumeControl.py
Created August 12, 2021 11:24
It's a volume control using handsfor linux for using it you need HandTrackingModule
import numpy as np
import math
from random import randint as rn
import HandsTrackingModule as hdt
import cv2 as c
import time
from subprocess import call
#from ctypes import cast, POINTER
#rom comtypes import CLSCTX_ALL
#from pycaw.pycaw import AudioUtilities, IAudioEndpointVolume
@smith0022
smith0022 / virtual_painter.py
Created September 6, 2021 18:23
use it you will get it
import cv2 as c
import numpy as np
import time
import os
import math
import HandsTrackingModule as htm
folderpath = "/home/smith/Da Painter"
mylist = os.listdir(folderpath)
mylist = mylist[:-1]
#print(mylist)
"""Write a program that rotates the elements of a list so that the element at
the first index moves to the second index, the element in the second
index moves to the third index, etc., and the element at the last moves to
the first index."""
"question 9"
# def lower_case():
# ob = open("/Users/mahantsmith/Library/Application Support/JetBrains/PyCharmCE2020.3/scratches/file14fun.txt")
# fb = open("lower_file14fun.txt","w")
# j = ob.readlines()
# for x in j:
@smith0022
smith0022 / Kivy_sample_app01.py
Created March 13, 2022 12:50
sample for kivy
from kivymd.app import MDApp
from kivy.uix.screenmanager import ScreenManager, Screen, NoTransition
from kivy.lang import Builder
from kivymd.uix.datatables import MDDataTable
from kivy.metrics import dp
from kivy.uix.anchorlayout import AnchorLayout
from kivy.properties import ObjectProperty
from kivymd.uix.screen import MDScreen
Builder.load_file("welcome.kv")
@smith0022
smith0022 / welcome.kv
Created March 13, 2022 12:51
.kv file for the kivy_sample_app01
#: import NoTransition kivy.uix.screenmanager.NoTransition
<Login_Page>:
name : "Login_Page"
MDScreen:
MDToolbar:
title : "Courier Service System"
pos_hint : {"top":1}
Image :
source : "courier_design(256256).png"
pos_hint : {'center_x':0.5,'center_y':0.7}