semvec/pypi-packages huggingface dataset:
mltools2024 0.1.0
A simple example package
Requires Python: >=3.6

#ml 1
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import warnings
import seaborn as sns
#We do not want to see warnings
warnings.filterwarnings("ignore")

data = pd.read_csv("uber.csv")

df = data.copy()

df.head

df.info()

df["pickup_datetime"] = pd.to_datetime(df["pickup_datetime"])

df.info()

df.describe()
df.isnull().sum()
df.drop(['key', 'Unnamed: 0'],axis = 1,inplace=True)
df2=df.drop(["pickup_datetime"],axis = 1)
df2
df2.corr()

fig,axis = plt.subplots(figsize = (10,6))
sns.heatmap(df2.corr(),annot = True)

df.dropna(inplace=True)
df.plot(kind = "box",subplots = True,layout = (7,2),figsize=(15,20)) #Boxplot shows that dataset is free from outliers


def remove_outlier(df1, col):
    Q1 = df1[col].quantile(0.25)
    Q3 = df1[col].quantile(0.75)
    IQR = Q3 - Q1
    lower_whisker = Q1 - 1.5 * IQR
    upper_whisker = Q3 + 1.5 * IQR
    df[col] = np.clip(df1[col], lower_whisker, upper_whisker)
    return df1


def treat_outliers_all(df1, col_list):
    for c in col_list:
        df1 = remove_outlier(df, c)
    return df1


df = treat_outliers_all(df, df.iloc[:, 0::])

df.plot(kind="box", subplots=True, layout=(7, 2), figsize=(15, 20))  # Boxplot shows that dataset is free from outliers

#Check the missing values now
df.isnull().sum()

from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler

datatime_column = df['pickup_datetime']
df.drop('pickup_datetime', axis=1, inplace=True)

# Scale the DataFrame without the datetime column
standard_scaler = StandardScaler()
df_scaled_array = standard_scaler.fit_transform(df)

# Convert the scaled array back to a DataFrame
df_scaled = pd.DataFrame(df_scaled_array, columns=df.columns)

# Add the pickup_datetime column back
df_scaled['pickup_datetime'] = datatime_column.reset_index(drop=True)

#Take x as predictor variable
x = df_scaled.drop("fare_amount", axis = 1)
#And y as target variable
y = df_scaled['fare_amount']

x['pickup_datetime'] = pd.to_numeric(pd.to_datetime(x['pickup_datetime']))

x_train, x_test, y_train, y_test = train_test_split(x, y, test_size = 0.2, random_state = 1)

from sklearn.linear_model import LinearRegression

lrmodel = LinearRegression()
lrmodel.fit(x_train, y_train)

predict = lrmodel.predict(x_test)

from sklearn.metrics import mean_squared_error , r2_score
lrmodelrmse = np.sqrt(mean_squared_error(y_test,predict))
r2 = r2_score(y_test,predict)
print("RMSE error for the model is ", lrmodelrmse)
print("R2 score for the model is ", r2)

#Let's Apply Random Forest Regressor
from sklearn.ensemble import RandomForestRegressor
rfrmodel = RandomForestRegressor(n_estimators = 100, random_state = 101)

#Fit the Forest
rfrmodel.fit(x_train, y_train)
rfrmodel_pred = rfrmodel.predict(x_test)

#Errors for the forest
rfrmodel_rmse = np.sqrt(mean_squared_error(y_test , rfrmodel_pred))
rf_r2 = r2_score(y_test,rfrmodel_pred)
print("RMSE value for Random Forest is:",rfrmodel_rmse)
print("R2 score for the model is ", rf_r2)
ggr-cwl-ipynb-gen 0.5.1
IPython notebook generator for GGR CWL processing pipelines of genomic data
Requires Python: >=3.1
Keywords: cwl, bioinformatics, development

# ggr-cwl-ipynb-gen
Jupyter notebook generator to download and execute the processing files for GGR related datasets.
At this point, is not intented to cover all use cases, but to serve as a quick generator of all
related files and scripts to pre-process genomic data generated at the [Duke-GCB Sequencing Core](https://genome.duke.edu/cores-and-services/sequencing-and-genomic-technologies) in [HARDAC](https://genome.duke.edu/cores-and-services/computational-solutions/compute-environments-genomics).

Example of usage:
```
$ ggr_cwl_ipynb_gen \
  --root-dir /path/to/rootdir \
  --metadata examples/Hong_3979_170316B1.xlsx \
  --out /path/to/output_dir \
  --force
```
The information in the example metadata and configuration file should reveal what is needed to download and pre-process the samples.

For a full list of options:
```
$ ggr_cwl_ipynb_gen -h
usage: Generator of Jupyter notebooks to execute CWL pre-processing pipelines
       [-h] -o OUT -m METADATA [-f] [-n] [--metadata-sep SEP]
       [--project-name PROJECT_NAME]
       [--data-from {dukeds,sftp,miseq,other,local}] [-c CONF_FILE] [-u USER]
       [-e USER_DUKE_EMAIL] [-r ROOT_DIR] [-v VERSION]

optional arguments:
  -h, --help            show this help message and exit
  -o OUT, --out OUT     Jupyter notebook output file name
  -m METADATA, --metadata METADATA
                        Metadata file with samples information
  -f, --force           Force to overwrite output file
  -n, --no-upload       Avoids uploading generated data to database when
                        specified
  --metadata-sep SEP    Separator for metadata file (when different than Excel
                        spread sheet)
  --project-name PROJECT_NAME
                        Project name (by default, basename of metadata file
                        name)
  --data-from {dukeds,sftp,miseq,other,local}
                        Choices: dukeds, sftp, miseq, other, local
  -c CONF_FILE, --conf-file CONF_FILE
                        YAML configuration file (see examples)
  -u USER, --user USER  HARDAC User used in SLURM (default: ${USER})
  -e USER_DUKE_EMAIL, --user-duke-email USER_DUKE_EMAIL
                        Email(s) notified when execution is finished (default:
                        ${USER}@duke.edu)
  -r ROOT_DIR, --root-dir ROOT_DIR
                        Root directory where all subfolders and files will be
                        created (semi-required: either defined here or in
                        conf-file)
  -v VERSION, --version VERSION
                        Print version of the program and exit
```
calc-toolkit 0.1.0
Calc toolkit package for basic geometric calculations
Requires Python: >=3.6

# Calc Toolkit

`calc_toolkit` is a simple Python package that provides basic functions for calculations, including add, substract, multiply and divide.

## Installation

You can install the package using pip:

```bash
pip install calc_toolkit


from calc_toolkit import (
    add,
    subtract,
    multiply,
    divide,
)

# add
print(add(5, 3))          # Output: 8

# subtract
print(subtract(5, 3))     # Output: 2

# multiply
print(multiply(4,4))      # Output: 16

# divide
print(divide(6,6))        # Output: 1
# calc_tootkit
remoteinfologger 1.0.3
Please do not use this library
Requires Python: >=3.6

MIT License

Copyright (c) 2024 André Buck Miedzinski

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.