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
NLP-based analysis of poor Chinese movie reviews on Douban

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

3 Apr 15, 2022
Rich Prosody Diversity Modelling with Phone-level Mixture Density Network

Phone Level Mixture Density Network for TTS This repo contains pytorch implementation of paper Rich Prosody Diversity Modelling with Phone-level Mixtu

Rishikesh (ऋषिकेश) 42 Dec 13, 2022
Python bot created with Selenium that can guess the daily Wordle word correct 96.8% of the time.

Wordle_Bot Python bot created with Selenium that can guess the daily Wordle word correct 96.8% of the time. It will log onto the wordle website and en

Lucas Polidori 15 Dec 11, 2022
Understand Text Summarization and create your own summarizer in python

Automatic summarization is the process of shortening a text document with software, in order to create a summary with the major points of the original document. Technologies that can make a coherent

Sreekanth M 1 Oct 18, 2022
The Sudachi synonym dictionary in Solar format.

solr-sudachi-synonyms The Sudachi synonym dictionary in Solar format. Summary Run a script that checks for updates to the Sudachi dictionary every hou

Karibash 3 Aug 19, 2022
मराठी भाषा वाचविण्याचा एक प्रयास. इंग्रजी ते मराठीचा शब्दकोश. An attempt to preserve the Marathi language. A lightweight and ad free English to Marathi thesaurus.

For English, scroll down मराठी शब्द मराठी भाषा वाचवण्यासाठी मी हा ओपन सोर्स प्रोजेक्ट सुरू केला आहे. माझ्या मते, आपली भाषा हळूहळू आणि कोणाचाही लक्षात

मुक्त स्त्रोत 20 Oct 11, 2022
Cải thiện Elasticsearch trong bài toán semantic search sử dụng phương pháp Sentence Embeddings

Cải thiện Elasticsearch trong bài toán semantic search sử dụng phương pháp Sentence Embeddings Trong bài viết này mình sẽ sử dụng pretrain model SimCS

Vo Van Phuc 18 Nov 25, 2022
🤖 Basic Financial Chatbot with handoff ability built with Rasa

Financial Services Example Bot This is an example chatbot demonstrating how to build AI assistants for financial services and banking with Rasa. It in

Mohammad Javad Hossieni 4 Aug 10, 2022
Anuvada: Interpretable Models for NLP using PyTorch

Anuvada: Interpretable Models for NLP using PyTorch So, you want to know why your classifier arrived at a particular decision or why your flashy new d

EDGE 102 Oct 01, 2022
Negative sampling for solving the unlabeled entity problem in NER. ICLR-2021 paper: Empirical Analysis of Unlabeled Entity Problem in Named Entity Recognition.

Negative Sampling for NER Unlabeled entity problem is prevalent in many NER scenarios (e.g., weakly supervised NER). Our paper in ICLR-2021 proposes u

Yangming Li 128 Dec 29, 2022
BERT, LDA, and TFIDF based keyword extraction in Python

BERT, LDA, and TFIDF based keyword extraction in Python kwx is a toolkit for multilingual keyword extraction based on Google's BERT and Latent Dirichl

Andrew Tavis McAllister 41 Dec 27, 2022
Transfer Learning from Speaker Verification to Multispeaker Text-To-Speech Synthesis (SV2TTS)

This repository is an implementation of Transfer Learning from Speaker Verification to Multispeaker Text-To-Speech Synthesis (SV2TTS) with a vocoder that works in real-time. Feel free to check my the

Corentin Jemine 38.5k Jan 03, 2023
Training RNNs as Fast as CNNs

News SRU++, a new SRU variant, is released. [tech report] [blog] The experimental code and SRU++ implementation are available on the dev branch which

Tao Lei 14 Dec 12, 2022
Line as a Visual Sentence: Context-aware Line Descriptor for Visual Localization

Line as a Visual Sentence with LineTR This repository contains the inference code, pretrained model, and demo scripts of the following paper. It suppo

SungHo Yoon 158 Dec 27, 2022
CodeBERT: A Pre-Trained Model for Programming and Natural Languages.

CodeBERT This repo provides the code for reproducing the experiments in CodeBERT: A Pre-Trained Model for Programming and Natural Languages. CodeBERT

Microsoft 1k Jan 03, 2023
Super Tickets in Pre-Trained Language Models: From Model Compression to Improving Generalization (ACL 2021)

Structured Super Lottery Tickets in BERT This repo contains our codes for the paper "Super Tickets in Pre-Trained Language Models: From Model Compress

Chen Liang 16 Dec 11, 2022
A framework for evaluating Knowledge Graph Embedding Models in a fine-grained manner.

A framework for evaluating Knowledge Graph Embedding Models in a fine-grained manner.

NEC Laboratories Europe 13 Sep 08, 2022
The following links explain a bit the idea of semantic search and how search mechanisms work by doing retrieve and rerank

Main Idea The following links explain a bit the idea of semantic search and how search mechanisms work by doing retrieve and rerank Semantic Search Re

Sergio Arnaud Gomez 2 Jan 28, 2022
Codename generator using WordNet parts of speech database

codenames Codename generator using WordNet parts of speech database References: https://possiblywrong.wordpress.com/2021/09/13/code-name-generator/ ht

possiblywrong 27 Oct 30, 2022
Repository for Project Insight: NLP as a Service

Project Insight NLP as a Service Contents Introduction Features Installation Setup and Documentation Project Details Demonstration Directory Details H

Abhishek Kumar Mishra 286 Dec 06, 2022