반응형
반응형

 

https://github.com/MauryaRitesh/Facial-Expression-Detection

 

GitHub - MauryaRitesh/Facial-Expression-Detection: Facial Expression or Facial Emotion Detector can be used to know whether a pe

Facial Expression or Facial Emotion Detector can be used to know whether a person is sad, happy, angry and so on only through his/her face. This Repository can be used to carry out such a task. - G...

github.com

Facial Expression or Facial Emotion Detector can be used to know whether a person is sad, happy, angry and so on only through his/her face. This Repository can be used to carry out such a task.

This is the code for this video by Ritesh on YouTube.

Facial Expression or Facial Emotion Detector can be used to know whether a person is sad, happy, angry and so on only through his/her face. This Repository can be used to carry out such a task. It uses your WebCamera and then identifies your expression in Real Time. Yeah in real-time!

PLAN
This is a three step process. In the first, we load the XML file for detecting the presence of faces and then we retrain our network with our image on five diffrent categories. After that, we import the label_image.py program from the last video and set up everything in realtime.

반응형
반응형

Python Dictionary Methods

 https://www.instagram.com/p/CrKgbEGrrX_/?igshid=MDJmNzVkMjY%3D 

Clear()

Copy()

Get()

Items()

Keys()

Popitem()

Values()

Pop()

Update()

Setdefault()

 

 

Method Description

clear() Removes all the elements from the dictionary
copy() Returns a copy of the dictionary
fromkeys() Returns a dictionary with the specified keys and value
get() Returns the value of the specified key
items() Returns a list containing a tuple for each key value pair
keys() Returns a list containing the dictionary's keys
pop() Removes the element with the specified key
popitem() Removes the last inserted key-value pair
setdefault() Returns the value of the specified key. If the key does not exist: insert the key, with the specified value
update() Updates the dictionary with the specified key-value pairs
values() Returns a list of all the values in the dictionary

https://www.w3schools.com/python/python_ref_dictionary.asp

 

Python Dictionary Methods

W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.

www.w3schools.com

https://www.w3schools.com/python/python_dictionaries.asp

 

Python Dictionaries

W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.

www.w3schools.com

반응형
반응형

[python]  swapping variables, Flattening a list of lists

# Swapping variables without a temporary variable

a = 10
b = 20
a,b = b,a

print(a)

# Flattening a list of lists

lst = [[1,2,3],[4,5],[6,7,8,9]]

flattened = [num for sublist in lst 
             for num in sublist]

print(flattened)
반응형
반응형

Python Script to Shutdown Computer

 

컴퓨터를 종료하는 Python 스크립트

Python은 다양한 기능으로 인해 널리 사용되는 스크립팅 언어입니다. 이 기사에서는 컴퓨터를 종료하는 Python 스크립트를 작성합니다. Python 스크립트를 사용하여 컴퓨터/PC/노트북을 종료하려면 “ ” 코드가 있는 기능을
사용해야 합니다 

 

import os
  
shutdown = input("Do you wish to shutdown your computer ? (yes / no): ")
  
if shutdown == 'no':
    exit()
else:
    os.system("shutdown /s /t 1")

 

반응형
반응형

https://codecrazypy.blogspot.com/2023/03/python-mcqs-quiz-1.html

 

Python MCQ's Quiz-1

Here you can find some infomation about exams,educational events and how to prepare for competitive exams likes ssc gd, railway exams,

codecrazypy.blogspot.com

What will be the datatype of the var in the below code snippet?
var = 10
print(type(var))
var = "Hello"
print(type(var))

반응형
반응형

[python] 구문 퀴즈, 파이썬

""" 
# What will be the output?
    A.Infinite loop
    B.120
    C.47
    D.48
"""
import secrets


def rec(a,b):
    if a == 0:
        return b
    else:
        return rec(a - 1, a + b)

print(rec(8, 12))

# 48 


s1 = [92,57,[82,75]]
s2 = s1[:]
s2[2][1] = 23
print(s1)

# 클래스 
result = 0

def add(num):
    global result
    result += num
    return result

print(add(3))
print(add(4))


"""
    # what will be the output?
    A.@corporate
    B.qna
    C.corporate
    D.@qna
"""
s = ['@corporate','qna']
print(s[:-1][-1])
반응형

+ Recent posts