A programming language with logic of Python, and syntax of all languages.

Overview

Pytov

The idea was to take all well known syntaxes, and combine them into one programming language with many posabilities.

Installation

Install using pip install pytov, or via git: git clone https://github.com/Yuvix25/Pytov.git.

Usage

If was installed via pip:

$ pytov [path_to_your_pytov_file]

If was installed via git:

Run using Python:

$ cd [folder_of_installation]
$ cd pytov
$ python pytov.py [path_to_your_pytov_file]

Run using pre-built executables:

$ cd [folder_of_installation]
$ cd exe
$ pytov [path_to_your_pytov_file]

Syntax

Comments:

# this is a comment
// this is also a comment
/*
and this is a
multi
line
comment
*/

Variables:

x = 5 // let or var or type is not required
print(x)

If:

if 5 > 1{
    print("5 is greater than 1")
}
elif 1 > 5{ # else if 1 > 5 will work too!
    print("1 is greater than 5")
}
else {
    print("1 is equal to 5")
}

Loops:

For:

for i in range(10){
    print(i)
}
a = [1, 4, 7, 8]
for x in a{
    print(x)
    if x == 4{
        break // loop will stop when x == 4
    }
}

for (i = 5; i<10; i++){
    print(i)
}
// output: 5, 6, 7, 8, 9

While:

// loop the the block as long as x < 5
x = 0
while x < 5{
    print(x)
    x += 2
    // (break will work just the same here)
}

Switch:

// for more info about switch take a look at switch in js, it is exactly the same...
a = "hi"
switch a{
    case "hello":
        print("a=='hello'")
        break
    case "hi":
    case "hihi"
        print("a=='hi' or a=='hihi'")
        break
    default:
        print("a!='hi' and a!='hihi' and a!='hello'")
}

Functions:

(func or function or def) func_name(required_params, not_required_params){
    your_code_here
    // and if you want you can return like this: return value
}
function print_hi(times){ // required parameter
    for i in range(times){
        print("hi")
    }
}

def print_hi_default(times=3){ // not required parameter with default value of 3
    for i in range(times){
        print("hi")
    }
}

func mult(x, y){
    return x*y
}

print_hi(5) // output: hihihihihi
print_hi_default() // output: hihihi
print(mult(5, 2)) // output: 10

Imports:

test2.pv:

if __name__ == "main"{ // will be true when file will be runned directly
    x = 5
}
else if __name__ == "imported" { // will be true when file is imported
    x = 7
}

test1.pv:

x = 6
import test2 // you can also import like this: import "test2.pv"
print(x) // output will be 7

See Examples

Owner
Yuval Rosen
Yuval Rosen
Ceaser-Cipher - The Caesar Cipher technique is one of the earliest and simplest method of encryption technique

Ceaser-Cipher The Caesar Cipher technique is one of the earliest and simplest me

Lateefah Ajadi 2 May 12, 2022
Baseline code for Korean open domain question answering(ODQA)

Open-Domain Question Answering(ODQA)는 다양한 주제에 대한 문서 집합으로부터 자연어 질의에 대한 답변을 찾아오는 task입니다. 이때 사용자 질의에 답변하기 위해 주어지는 지문이 따로 존재하지 않습니다. 따라서 사전에 구축되어있는 Knowl

VUMBLEB 69 Nov 04, 2022
Installation, test and evaluation of Scribosermo speech-to-text engine

Scribosermo STT Setup Scribosermo is a LGPL licensed, open-source speech recognition engine to "Train fast Speech-to-Text networks in different langua

Florian Quirin 3 Jun 20, 2022
Help you discover excellent English projects and get rid of disturbing by other spoken language

GitHub English Top Charts 「Help you discover excellent English projects and get

GrowingGit 544 Jan 09, 2023
Open solution to the Toxic Comment Classification Challenge

Starter code: Kaggle Toxic Comment Classification Challenge More competitions 🎇 Check collection of public projects 🎁 , where you can find multiple

minerva.ml 153 Jun 22, 2022
Creating a Feed of MISP Events from ThreatFox (by abuse.ch)

ThreatFox2Misp Creating a Feed of MISP Events from ThreatFox (by abuse.ch) What will it do? This will fetch IOCs from ThreatFox by Abuse.ch, convert t

17 Nov 22, 2022
Natural Language Processing Specialization

Natural Language Processing Specialization In this folder, Natural Language Processing Specialization projects and notes can be found. WHAT I LEARNED

Kaan BOKE 3 Oct 06, 2022
Biterm Topic Model (BTM): modeling topics in short texts

Biterm Topic Model Bitermplus implements Biterm topic model for short texts introduced by Xiaohui Yan, Jiafeng Guo, Yanyan Lan, and Xueqi Cheng. Actua

Maksim Terpilowski 49 Dec 30, 2022
A Python module made to simplify the usage of Text To Speech and Speech Recognition.

Nav Module The solution for voice related stuff in Python Nav is a Python module which simplifies voice related stuff in Python. Just import the Modul

Snm Logic 1 Dec 20, 2021
Based on 125GB of data leaked from Twitch, you can see their monthly revenues from 2019-2021

Twitch Revenues Bu script'i kullanarak istediğiniz yayıncıların, Twitch'den sızdırılan 125 GB'lik veriye dayanarak, 2019-2021 arası aylık gelirlerini

4 Nov 11, 2021
Create a machine learning model which will predict if the mortgage will be approved or not based on 5 variables

Mortgage-Application-Analysis Create a machine learning model which will predict if the mortgage will be approved or not based on 5 variables: age, in

1 Jan 29, 2022
PyTorch impelementations of BERT-based Spelling Error Correction Models.

PyTorch impelementations of BERT-based Spelling Error Correction Models

Heng Cai 209 Dec 30, 2022
AI-powered literature discovery and review engine for medical/scientific papers

AI-powered literature discovery and review engine for medical/scientific papers paperai is an AI-powered literature discovery and review engine for me

NeuML 819 Dec 30, 2022
NLP project that works with news (NER, context generation, news trend analytics)

СоАвтор СоАвтор – платформа и открытый набор инструментов для редакций и журналистов-фрилансеров, который призван сделать процесс создания контента ма

38 Jan 04, 2023
List of GSoC organisations with number of times they have been selected.

Welcome to GSoC Organisation Frequency And Details 👋 List of GSoC organisations with number of times they have been selected, techonologies, topics,

Shivam Kumar Jha 41 Oct 01, 2022
Py65 65816 - Add support for the 65C816 to py65

Add support for the 65C816 to py65 Py65 (https://github.com/mnaberez/py65) is a

4 Jan 04, 2023
Google's Meena transformer chatbot implementation

Here's my attempt at recreating Meena, a state of the art chatbot developed by Google Research and described in the paper Towards a Human-like Open-Domain Chatbot.

Francesco Pham 94 Dec 25, 2022
NLP-based analysis of poor Chinese movie reviews on Douban

douban_embedding 豆瓣中文影评差评分析 1. NLP NLP(Natural Language Processing)是指自然语言处理,他的目的是让计算机可以听懂人话。 下面是我将2万条豆瓣影评训练之后,随意输入一段新影评交给神经网络,最终AI推断出的结果。 "很好,演技不错

3 Apr 15, 2022
Flexible interface for high-performance research using SOTA Transformers leveraging Pytorch Lightning, Transformers, and Hydra.

Flexible interface for high performance research using SOTA Transformers leveraging Pytorch Lightning, Transformers, and Hydra. What is Lightning Tran

Pytorch Lightning 581 Dec 21, 2022
Header-only C++ HNSW implementation with python bindings

Hnswlib - fast approximate nearest neighbor search Header-only C++ HNSW implementation with python bindings. NEWS: version 0.6 Thanks to (@dyashuni) h

2.3k Jan 05, 2023