courses I have based my skills on
Edit me
 

my courses

tensorflow -

My tensorflow course for deep learning engineer.

Preview

api -

My first yoga book I bought during my trip to Thailand has set off a series of events that truly made me who I am now. Believe it or not.

Preview

5G Flying Course -

Asanas and pranayama work together to establish good posture and to open the torso for better breathing

My first yoga book I bought during my trip to Thailand has set off a series of events that truly made me who I am now. Believe it or not.

Preview

python -

 

python course overview

baseball

share

Above code has some errors and I have implemented class (OOP) and than called the functions inside the the class using it as an object.

# Baseball Game
# By: Sergio Camalich
# Website: www.camali.ch

# Import modules
import sys
import random
import time



# Are we playing?
class PLAY:

    def __init__(self):
        # Playing?
        self.playing = 'y'

        # Agreements
        self.yes = ('y','yes')
        self.no = ('n', 'no')

        self.loses = 0
        self.ties = 0

        # Throws
        self.strikes = 0
        self.balls = 0
        self.fouls = True

        # Pitches
        self.pitches = 0

        # Hits
        self.hits = ('catch', 'single', 'double', 'triple', 'homerun')
        self.options = ('strike', 'ball', 'foul', 'hit', 'miss')

        # Runs
        self.position = 0
        self.runs = 0

        # Outs
        self.outs = 0

    def Play(self):

    # YES WE ARE
        while self.playing in self.yes:

            # Swing
            self.Swing()

            # Play Again?
            self.PlayAgain()

    def Swing(self):

        human = input('Press \'enter\' to swing or write \'q\' and enter to quit: ')

        if human == 'q':
            print ('\nThanks for playing!')
            sys.exit()


        while self.strikes < 3 or self.balls < 4:

            # Random choice
            batter = random.choice(self.options)
            pitcher = random.choice(self.options)

            if batter != pitcher:
                # That's a strike!
                if batter == self.options[0]:
                    self.Strike()
                # That's a ball!
                elif batter == self.options[1]:
                    self.Ball()
                # That's a foul!
                elif batter == self.options[2]:
                    self.Foul()
                # That's a hit!
                elif batter == self.options[3]:
                    self.Hit()
                # That's a miss!
                elif batter == self.options[4]:
                    self.Miss()
            # THAT'S A HOOOOOOOOOOOMMMMMMMMEEEEEE RUUUUUUNNNN!!!!!!!
            elif batter == pitcher:
                self.HomeRun()

            if self.strikes == 3:
                self.Out()
            elif self.balls == 4:
                print ('\nBASEBALL!\n')

            # Strikes/Balls Status
            self.Count()
            
            self.PlayAgain()

# What is Strike()?
    def Strike(self):

        print ('\nThats:')

        # global strikes

        while self.strikes <= 3:

            # This is a strike
            self.strikes += 1

            # Indeed it is...
            print ('STRIKE ', self.strikes, '!\n', sep='')

            # Strike 3!
            if self.strikes == 3:
                self.Out()

            self.Count()

            self.Swing()

    # What is Ball()?
    def Ball(self):

        print ('\nThats:')

        # global balls

        while self.balls <= 4:

            # This is a ball
            self.balls += 1

            # Indeed it is...
            print ('BALL ', self.balls, '!\n', sep='')

            # Ball 4!
            if self.balls == 4:
                self.Single()

            self.Count()

            self.Swing()

    # What is Foul()?
    def Foul(self):

        print ('\nFoul Ball!')

        # global strikes
        # global fouls

        if self.fouls == True:

            while self.strikes < 2:

                self.Strike()

                self.Swing()

            self.Count()

            self.Swing()

    # What is Hit()?
    def Hit(self):

        # global hits
        
        baseball = random.choice(self.hits)

        if baseball == self.hits[0]:
            print()  
            self.Catch()  

        elif baseball == self.hits[1]:
            print()
            self.Single()

        elif baseball == self.hits[2]:
            print()
            self.Double()

        elif baseball == self.hits[3]:
            print()
            self.Triple()

        elif baseball == self.hits[4]:
            print()
            self.HomeRun()

        self.PlayAgain()

    # What is a Miss()?
    def Miss(self):

        print ('\nYou missed the ball!')

        self.Strike()

    # What is the count?
    def Count(self):

        # global pitches

        self.pitches += 1

        print ('Strikes: ', self.strikes, sep='')
        print ('Balls: ', self.balls, '\n', sep='')
        print ('Outs: ', self.outs)
        print ('Runs: ', self.runs, '\n')

        self.Pitches()

    def Pitches(self):
        
        print('Pitches this batter: ', self.pitches, '\n')

    # What is BaseBall()?
    def BaseBall(self):

        #global position

        self.position += 1

        print ('BAAAAAAAASSSSSEEEEEE BAAAAAAAALLL!')

        self.Position()

        self.PlayAgain()

    # What is a HomeRun()?
    def HomeRun(self):

        # global position
        # global strikes
        # global balls

        print ('\nTHAT\'S A HOOOOOOOOOOOMMMMMMMMEEEEEE RUUUUUUNNNN!!!!!!!\n')

        self.position += 4

        self.strikes = 0
        self.balls = 0

        self.Position()

        self.NextBatter()    

    # What is Triple()?
    def Single(self):

        # global position

        self.position += 1

        print ('SINGLE!')

        self.Position()

        self.NextBatter()

    # What is Double()?
    def Double(self):

        # global position

        self.position += 2

        print ('DOUBLE!')

        self.Position()

        self.NextBatter()

    # What is Triple()?
    def Triple(self):

        # global position

        self.position += 3

        print ('TRIPLE!')

        self.Position()

        self.NextBatter()

    # What is Position()?
    def Position(self):

        # global position

        if self.position <= 3:
            print ('\nYou reached base', self.position, '\n')

        elif self.position % 4:
            self.AddRun()

    # What is Run()?
    def AddRun(self):
        
        # global runs
        # global strikes
        # global balls

        self.strikes = 0
        self.balls = 0

        print ('You scored a run!\n')

        self.runs += 1

    # What is Catch()?
    def Catch(self):

        print ('The fielder caught the ball.')

        self.Out()

    # What is Out()?
    def Out(self):

        # global outs

        print ('You are OUT!\n')

        while self.outs <= 3:

            self.outs += 1

            print ('Outs: ', self.outs, '\n')

            if self.outs == 3:
                print ('End of inning')
                sys.exit()

            self.NextBatter()

    # What is NextBatter()?
    def NextBatter(self):
        
        #global playing
        #global yes
        #global no
        #global pitches

        self.pitches = 0

        # Next batter?
        self.playing = input('Bring next batter?(y/n): ')

        # YAY! :D
        while self.playing in self.yes:        
            print()
            self.Play()

        # NAY! :(
        if self.playing in self.no:
            print ('\nThanks for playing!')
            sys.exit()

    # What is PlayAgain()?
    def PlayAgain(self):

        #global playing
        #global yes
        #global no

        # global pitches

        self.pitches = 0

        # Play again?
        self.playing = input('Would you like to play again?(y/n): ')

        # YAY! :D
        while self.playing in self.yes:        
            print()
            self.Play()

        # NAY! :(
        if self.playing in self.no:
            print ('\nThanks for playing!')
            sys.exit()

# Can we FINALLY play?    
# Play()

obj = PLAY()
obj.Play()


types

10 Types of Pranayama Breathing (With Instructions) Experts say that the best time to practice pranayama is early in the morning and on an empty stomach. Ideally, it would be practiced outdoors, but only if you live in a place with good air quality. Some will recommend these breathing exercises with different types of mudras while others will say to simply relax. Give each a try until you find what works for you.

1. Nadi Sodhana

Sometimes referred to as alternate nostril breathing, this breathing practice is great for balancing the energy in the body.

Start in a comfortable seated position. Use the right thumb to close the right nostril. Take a deep breath in through the left nostril. Imagine the breath traveling up through the left side of the body. Pause briefly.

Next, use the ring and pinky fingers of the right hand to close the left nostril as you release the right nostril. Exhale through the right nostril imagining the breath coming down the right side of the body. Pause at the bottom of the exhale.

Keeping the left nostril closed, inhale through the right nostril. Then, use the right thumb to close the right nostril as you release the left. Exhale through the left nostril and pause gently at the bottom of the exhale.

This completes one round. Repeat this alternating pattern for several more rounds, visualizing the breath coming in and out of the body.

2. Ujjayi Pranayama

I would say this pranayama is one of the most used in yoga classes today. It is the foundational breath used in the ashtanga vinyasa style of yoga.

The ujjayi breath is meant to mimic the sound of ocean waves. This rhythmic sound can help you focus your mind and link your movements to the sound of your breath.

api -

My first yoga book I bought during my trip to Thailand has set off a series of events that truly made me who I am now. Believe it or not.

Preview

mycourse overview -

 

mycourse overview

Preview

lora -

My first yoga book I bought during my trip to Thailand has set off a series of events that truly made me who I am now. Believe it or not.

Preview

api -

My first yoga book I bought during my trip to Thailand has set off a series of events that truly made me who I am now. Believe it or not.

Preview

git -

 

api -

My first yoga book I bought during my trip to Thailand has set off a series of events that truly made me who I am now. Believe it or not.

Preview

front-end -

Hot Yoga is a moving meditation combining asana, breath work and heat. All are needed to get the best result.

My first yoga book I bought during my trip to Thailand has set off a series of events that truly made me who I am now. Believe it or not.

+ Mastering ROS for Robotics Programming Packt
- Learning ROS for Robotic Programming 2nd Edition
@@ ROS for Beginners, Basics, Motion and OpenCV @@
! ROS로보틱스 
Boost.Asio C++ 네트워크 프로그래밍 쿡북
- Programming Robots With ROS

Preview

cplus -

 

C++ course

its origin

Once known mainly as the “yoga of the stars,” the Bikram style of hatha has spread from Beverly Hills throughout the United States since the late 1970s. The Bikram style is the original “hot yoga” style, and its classes are taught in a room kept at approximately 106 degrees Fahrenheit (41 degrees Celsius). Bikram yoga is based on one series consisting of 26 poses, which are practiced twice in a class session.pdf

oop overview

‘객체지향 언어가 등장하게 된 배경과 역사, 절차적 언어와 비교하여 장점과 단점, 현재 사용되고 있는 객체지향 언어들에 대한 소개’에 대해 서술하겠습니다.

먼저 언어는 크게 절차적 언어와 객체지향 언어로 나눠집니다.

절차적 언어

폰 노이만 구조에 기반하여 변수, 배정문, 반복문을 특징으로 하는 명령형 프로그래밍의 일종입니다. 순차적으로 실행하는 것과 데이터에 중심을 맞춘 언어입니다. 예로는  C언어와 BASIC, PASCAL, FORTRAN 등이 있습니다.

절차적 언어의 장점으로는

프로그램의 흐름을 쉽게 볼 수 있으므로 가독성이 높아지고 모듈화와 구조화에 더 용이하므로 추가적으로 이미 완성된 코드의 실행속도가 빨리 처리되어 시간적으로 유리합니다.

 

절차적 언어의 단점으로는

유지보수가 어려우며 디버깅이 객체지향 언어보다 어려운 것과 실행 순서가 정해져 있으므로 코드의 순서가 바뀌면 동일한 결과를 보장하기 힘들다는 단점이 있습니다.

객체 지향 언어의 탄생 배경

절차적 언어로 많은 개체들이 상호작용하면서 살아가는 현실 세계를 그대로 표현할 수 없었습니다. 또 하드웨어가 소프트웨어와 컴파일러의 발달을 따라오지 못하는 상황이 발생했습니다. 그래서 객체지향 언어가 등장하는 계기가 됩니다. 객체지향 언어는 기능별로 묶어 모듈화 하여 하드웨어에서 기능을 중복연산하지 않도록 하고 모듈을 재활용하기 때문에 하드웨어의 처리량이 줄었습니다. 이에 객체지향 언어가 탄생합니다.

 

체 지향적 언어

객체 지향적 언어는 데이터와 절차를 하나의 덩어리로 묶어서 생각하게 됩니다. 객체 간의 관계와 기능에 중심을 두고 있는 언어입니다.

특징의 첫째로 관련된 데이터와 알고리즘이 하나의 묶음으로 정리된 것으로, 개발자가 만들었으며 관련된 코드와 데이터가 묶여 있고 오류가 없어 사용이 편합니다. 데이터를 감추고 외부 세계와의 상효 작용은 메서드를 통해 이루어지며

라이브러리를 만들어 업그레이드하면 쉽게 바꿀 수 있는 캡슐화가 있습니다

 

둘째로 이미 작성된 클래스를 이어받아 새로운 클래스를 생성하는 기법으로 위에서 말한 기존 코드를 재활용하여 사용하는 것을 의미합니다. 객체지향의 큰 장점 중 하나인 상속이 있습니다

 

마지막 셋째로 하나의 이름으로 많은 상황에 대처하는 방법입니다. 개념적으로 동일한 작업을 하는 함수들에 같은 이름을 부여할 수 있으며 코드가 더 간단해지는 효과가 있는 다형성 등등이 있습니다.

 

현재 사용되고 있는 언어로는 JAVA와 Python, C++ 등등이 있습니다.

객체 지향적 언어의 장점으로는

절차적 언어보다 좀 더 세련된 형태의 모듈화를 할 수 있고 실제 세계의 객체를 자세히 표현하게 때문에 개념적으로 접근이 더욱 쉬우며 개발자가 만든 데이터를 사용하기 때문에 신뢰성 있는 프로그램을 쉽게 작성할 수 있습니다. 추가로 코드를 재사용하기 용이하고 코딩이 간편하며 업그레이드와 디버깅이 쉽고, 절차적 언어와 비슷하게 대규모 프로젝트에 적합하다는 장점이 있습니다.

객체 지향적 언어의 단점으로는

어떤 모듈에 있는 하나의 기능만 필요하더라도 모듈 전체를 가져와야 하기 때문에 프로그램 사이즈가 커질 수 있습니다.

데이터에 대한 접근도 메소드를 통해 접근하기 때문에 절차 지향적 언어처럼 특정 함수에 접근할 수 없고, 또 식으로만 접근하기 때문에 상대적으로 절차 지향적 언어보다 느려질 가능성이 있고 설계에 많은 시간이 들어가며 실패하면 다시 설계해야 한다는 단점이 있습니다.

객체지향의 반대는 절차지향이 아니고 절차 지향의 반대는 객체지향이 아닙니다. 또 객체지향 언어가 절차적으로 실행되지 않는다는 것은 아닙니다. 객체지향 언어 역시 절차지향 언어와 동일한 순서로 실행이 됩니다.

정리하자면, 절차지향 언어는 데이터를 중심으로 함수를 구현하고 이에 반해 객체지향 언어는 기능을 중심으로 구현하게 됩니다.

Preview

control -

My first yoga book I bought during my trip to Thailand has set off a series of events that truly made me who I am now. Believe it or not.

Preview

networking -

My first ccna network administrator.

api -

My first yoga book I bought during my trip to Thailand has set off a series of events that truly made me who I am now. Believe it or not.

Preview

Preview

Tags: mycourse