semvec/pypi-packages huggingface dataset:
htmlcomparator 0.1.0
An html comparator that can output the differences between html code
Requires Python: >=3.6

# htmlcomparator

This is a light-weight python package used to compare two html files and return the differences. 

The users can choose whether they want a boolean result or string result that specify the difference. They can also choose the types of differences they want to receive. 

## Usage

To start using the comparator, first import the package, and make an object.

```python
from htmlcomparator import HTMLComparator
comparator = HTMLComparator()
```
The method that is used to compare html code is 
```python
comparator.compare(html1, html2, quick_compare = True, compare_type = "all")
```

```html1, html2``` are the two html to be compared. If they are both strings, it will treat them as two html strings. If they are both ```io.IOBase``` objects, then the program will treat them as two opened files. Otherwise the program will raise a ```TypeError```.

```quick_compare``` argument is used to specify whether the user want the method to simply return boolean or to return a detailed information of the differences. If it is set to True, then the method will return False as soon as it encounters the first difference, and return True if there are no difference. If it is set to False, then the two html are compared thoroughly, and the method will return a ```string``` to describe the differences. If there are no differences, it will return an empty string.

```compare_type``` argument is used to specify the type of differences to compare. It is ignored if ```quick_compare``` is set to ```True```. If it is set to ```tag```, then only tag differences will be returned. If it is set to ```data``` then tag and data differences will be returned. If it is set to ```all```, then all differences will be considered, including tags, data, and attributes.

For example, 
```python
s1 = "<!DOCTYPE xml> <head> <p> test </p> <p> different here </p> </head>"
s2 = "<!DOCTYPE html> <head> <p> this is different </p> </head>"
comparator = HTMLComparator()
print(comparator.compare(s1,s2, compare_type = "all", quick_compare = False))
```
will output:
```
@@ DOCTYPE Difference @@
*DOCTYPE xml
-DOCTYPE html

extra tag <p> in the first html at (1, 36)

@@ (1, 25) , (1, 26) @@
*test
-this is different
```
The tuples ```(1, 36)```, ```(1, 25)```, and ```(1, 25)``` give the line number and the offset of the differences.

## Limitations

Currently doesn't support CSS.

## License

Copyright Mengjia Zhao 2020.
Distributed under the terms of the [Apache 2.0 license](https://github.com/in-the-ocean/htmlcomparator/blob/master/LICENSE).
pjscript 0.0.4
JS like simple language LEXER, PARSER and INTERPRETER
Requires Python: >=3.6

A single file, dependency free language written in python. The goal of this project is to show that
programming languages are not a black box and that you could learn the basic concpets required to implement your own language.
While this language is not a real programming language however a lot of the internal concepts displayed in this
language is taken from other real programming languages.

### how to Run
```py
python -m pjscript <file.js>

#or you could use the lexer, parser and interpreter in your python file

from pjcript import *

lexer = Lexer("var x = 1;")
tree = Parser(lexer)
interpreter = Interpreter(tree)
interpreter.interpret()
```

### Data types:
    - Int (positive & negitive)
    - String
    - Array
    - Object
    - Null


### Basic statemnets
```js
/* this is a comment */
var age = 2;
var name = "jack";
var newage = age;
name = "jack and me";
log(1, "it's working fuck yea", name);
var x = add(age, add(2,3));
log(x);
```


### Functions and Scope

```js
var x = "hello world";

function printme(st1, st2, st3){
    log(st1);
    log(st2);
    log(st3);
};

function testfunc(){
    var x = "new thing";
    printme(x, 1, 3);
};

testfunc();
log(x);
```

### Expressions
```js
var x = 0 + add(2, 3);
var x = x + add(2, 3);
var x = (x * 2) / 2;
log(x); /* should log 10*/

function Mul(){
    return add(2, add(2 * 3, 2));
};

var result = Mul();
log(result);


/* post-increment and decrement */
var x = 2;
log("x: ", x);

var y = x++ * 2;
log("y: ", y); /* output y: 4 */
log("x: ", x); /* output y: 3 */

/* pre-increment and decrement */
var x = 2;
log("x: ", x);

var y = ++x * 2;
log("y: ", y);/* output y: 6 */
log("x: ", x);/* output y: 3 */


/* Comparison Operators */

var x = 2;
var y = x >= 2;
log("y: ", y); /* True */
log("x: ", x); /* 2 */
```

### For Loops

```js
for(var i = 0; i < 5; i++){
    log(i);
};

/* or */
var i = 0;
for(i = 2; i < 5; i++){
    log(i);
};

/* infinite loop */
var i = 0;
for(; ; i++){
    log(i);
};
```

### IF ELSE

```js
var x = 0;
if(x == 3){
    log("if");

} else if(x == 2){
    log("else if");

} else if (x == 1){
    log("else if second");

}else{
    log("else");
};

var y = 2;
if (x == 2){
    log("if only");
};

for(var i = 0; i < 5; i++){
    if(i == 3){
        log(i);
    };
};

```

### Array
```js
// numbers
var numbers = [1, 2, 3];
log(numbers);
log(numbers[2]);


// Strings
var person = ["jack", "jay", "nick"];
for(var i = 0; i < 3; i++){
    log(person[i]);
};
```

### Object
```js
// Object
var person = {
    name: "jack",
    age: 23
};

log(person.name);
log(person.age);
```
pymetalog 0.2.2
A python package that generates functions for the metalog distribution. The metalog distribution is a highly flexible probability distribution that can be used to model data without traditional parameters.

pymetalog
================
Colin Smith, Travis Jefferies, Isaac J. Faber

`pip install pymetalog`

### The Python Metalog Distribution

This repo is a working project for a python package (**pymetalog**) that generates functions
for the metalog distribution. The metalog distribution is a highly
flexible probability distribution that can be used to model data without
traditional parameters.

### Metalog Background

In economics, business, engineering, science and other fields,
continuous uncertainties frequently arise that are not easily- or
well-characterized by previously-named continuous probability
distributions. Frequently, there is data available from measurements,
assessments, derivations, simulations or other sources that characterize
the range of an uncertainty. But the underlying process that generated
this data is either unknown or fails to lend itself to convenient
derivation of equations that appropriately characterize the probability
density (PDF), cumulative (CDF) or quantile distribution functions.

The metalog distributions are a family of continuous univariate
probability distributions that directly address this need. They can be
used in most any situation in which CDF data is known and a flexible,
simple, and easy-to-use continuous probability distribution is needed to
represent that data. Consider their [uses and
benefits](http://www.metalogdistributions.com/usesbenefits.html). Also
consider their
[applications](http://www.metalogdistributions.com/applicationsdata.html)
over a wide range of fields and data sources.

This repository is a complement and extension of the information found
in the [paper
published](http://pubsonline.informs.org/doi/abs/10.1287/deca.2016.0338)
in Decision Analysis and the
[website](http://www.metalogdistributions.com/)