Skip to content

Instantly share code, notes, and snippets.

View 5hv5hvnk's full-sized avatar
😼
chipichipichapachapa

S 5hv5hvnk

😼
chipichipichapachapa
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@5hv5hvnk
5hv5hvnk / README.md
Created November 29, 2022 20:09 — forked from Lazza/README.md
VPNGate Python script

This script is NOT MAINTAINED

This snippet of code was posted in 2014 and slightly revised in 2016 and 2017. It was more of a quick'n'dirty script than a polished tool. It is made only for Linux and in Python 2, which has since become outdated.

I currently do not use it, and I suggest you avoid it as well. Please do not expect support for using this script.

🔥 If you need an alternative, @glaucocustodio has kindly suggested EasyVPN in this comment.

The rest of the README is left for historical purposed.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Using ModelBuilder class for deploying PyMC models

The new ModelBuilder class allows user to use direct methods to fit, predict,save, load. A user can create any model as they want to and just inherit the ModelBuilder class and use the predefined methods.
Let's learn more about using an example

class LinearModel(ModelBuilder):
    _model_type = 'LinearModel'
    version = '0.1'

    def _build(self):
        # data
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@5hv5hvnk
5hv5hvnk / MyModel.py
Last active July 8, 2022 06:11
Example for New class
import cloudpickle
from pathlib import Path
import os
import arviz as az
import numpy as np
import pymc as pm
import trace
import logging
import sys
import cloudpickle
from pathlib import Path
class base:
def __init__(self):
return
def save(self,file_prefix,filepath,save_format=None):
if save_format == 'h5':
extension = '.hdf5'
else: