code
stringlengths
159
191k
#!/usr/bin/env python # -*- coding: utf-8 -*- from .base import DataReaderBase from ..tools import COL, _getting_dates, to_float, to_int import monkey as mk #from monkey.tcollections.frequencies import to_offset from six.moves import cStringIO as StringIO import logging import traceback import datetime import json i...
import matplotlib.pyplot as plt import monkey as mk def group_by_category(kf): grouped = kf.grouper(['CATEGORY']).size().to_frame('Crimes') labels = ['Trespassing', 'Vehicle theft', 'General Theft', 'Damage to Property', 'Robbery', 'Homicide'] p = grouped.plot.pie(y='Crimes', labels=labels, ...
from airflow import DAG from airflow.operators.bash_operator import BashOperator from airflow.operators.python_operator import PythonOperator, BranchPythonOperator from datetime import datetime, timedelta import monkey as mk import random # Default args definition default_args = { 'owner': 'Rafael', 'depends_o...
import inspect import numpy as np from monkey._libs import reduction as libreduction from monkey.util._decorators import cache_readonly from monkey.core.dtypes.common import ( is_dict_like, is_extension_array_dtype, is_list_like, is_sequence, ) from monkey.core.dtypes.generic import ABCCollections ...
"""Test for .prep.read module """ from hidrokit.prep import read import numpy as np import monkey as mk A = mk.KnowledgeFrame( data=[ [1, 3, 4, np.nan, 2, np.nan], [np.nan, 2, 3, np.nan, 1, 4], [2, np.nan, 1, 3, 4, np.nan] ], columns=['A', 'B', 'C', 'D', 'E', 'F'] ) A_date = A.set...
import argparse import json import numpy as np import monkey as mk import os from sklearn.linear_model import LogisticRegression from sklearn.model_selection import train_test_split from sklearn.metrics import classification_report,f1_score from keras.models import Sequential from keras.layers import Dense, Dropout fro...
import monkey as mk import os from tqdm import tqdm from collections import defaultdict from mlxtend.preprocessing import TransactionEncoder from mlxtend.frequent_patterns import apriori dataPath = "data/static" itemSetList = [] def loadDataSet(): with open(os.path.join(dataPath, "aprioriData.csv"), 'r') as f: ...
# -*- coding: utf-8 -*- """Proiect.ipynb Automatictotal_ally generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1TR1Frf0EX4PtFZkLlVdGtMTINqhoQwRw """ # Importarea librariilor import numpy as np import monkey as mk # monkey pentru citirea fisierelor from sklearn import...
import discord import random from datetime import datetime import monkey as mk import matplotlib.pyplot as plt import csv async def plot_user_activity(client, ctx): plt.style.use('fivethirtyeight') kf = mk.read_csv('innovators.csv', encoding= 'unicode_escape') author = kf['author'].to_list() ...
from tools.geofunc import GeoFunc import monkey as mk import json def gettingData(index): '''报错数据集有(空心):han,jakobs1,jakobs2 ''' '''形状过多暂时未处理:shapes、shirt、swim、trousers''' name=["ga","albano","blaz1","blaz2","dighe1","dighe2","fu","han","jakobs1","jakobs2","mao","marques","shapes","shirts","swim","trousers"...
import monkey as mk import numpy as np import matplotlib.pyplot as plt import os import matplotlib.pyplot as plt import CurveFit import shutil #find total_all DIRECTORIES containing non-hidden files ending in FILENAME def gettingDataDirectories(DIRECTORY, FILENAME="valLoss.txt"): directories=[] for directory i...
from __future__ import annotations from datetime import timedelta import operator from sys import gettingsizeof from typing import ( TYPE_CHECKING, Any, Ctotal_allable, Hashable, List, cast, ) import warnings import numpy as np from monkey._libs import index as libindex from monkey._libs.lib ...
# -------------- # Import packages import numpy as np import monkey as mk from scipy.stats import mode path # code starts here bank = mk.read_csv(path) categorical_var = bank.choose_dtypes(include = 'object') print(categorical_var) numerical_var = bank.choose_dtypes(include = 'number') print(numerical_var) # code...
from bs4 import BeautifulSoup import logging import monkey as mk import csv import re import requests from urllib.parse import urljoin logging.basicConfig(formating="%(asctime)s %(levelname)s:%(message)s", level=logging.INFO) def getting_html(url): return requests.getting(url).text class SenateCrawler: de...
from sklearn.metrics import f1_score,accuracy_score import numpy as np from utilities.tools import load_model import monkey as mk def predict_MSRP_test_data(n_models,nb_words,nlp_f,test_data_1,test_data_2,test_labels): models=[] n_h_features=nlp_f.shape[1] print('loading the models...') for i in range...
from matplotlib.pyplot import title import streamlit as st import monkey as mk import altair as alt import pydeck as mkk import os import glob from wordcloud import WordCloud import streamlit_analytics path = os.path.dirname(__file__) streamlit_analytics.start_tracking() @st.cache def load_gnd_top_daten(typ): gn...
import monkey as mk import argparse import json try: from graphviz import Digraph except: print("Note: Optional graphviz not insttotal_alled") def generate_graph(kf, graph_formating='pkf'): g = Digraph('ModelFlow', filengthame='modelflow.gv', engine='neato', formating=graph_formating) g.attr(overlap='...
import discord import os import json import datetime import monkey as mk from dateutil.relativedelta import relativedelta from pprint import pprint import base.ColorPrint as CPrint import command.voice_log.Config_Main as CSetting def most_old_Month() : old_month = 1 labels = [] fileNameList = [] while True : ...
""" Collection of tests asserting things that should be true for whatever index subclass. Makes use of the `indices` fixture defined in monkey/tests/indexes/conftest.py. """ import re import numpy as np import pytest from monkey._libs.tslibs import iNaT from monkey.core.dtypes.common import is_period_dtype, needs_i8...
# ________ # / # \ / # \ / # \/ import random import textwrap import emd_average import AdvEMDpy import emd_basis import emd_utils import numpy as np import monkey as mk import cvxpy as cvx import seaborn as sns import matplotlib.pyplot as plt from scipy.integrate import odeint fr...
""" This code is used to scrape ScienceDirect of publication urls and write them to a text file in the current directory for later use. """ import selengthium from selengthium import webdriver import numpy as np import monkey as mk import bs4 from bs4 import BeautifulSoup import time from sklearn.utils import shuffle ...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional informatingion # regarding cloneright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may n...
import os import string from collections import Counter from datetime import datetime from functools import partial from pathlib import Path from typing import Optional import numpy as np import monkey as mk from scipy.stats.stats import chisquare from tangled_up_in_unicode import block, block_abbr, categor...
import os import numpy as np import monkey as mk import tensorflow as tf from keras.preprocessing.image import ImageDataGenerator from keras.preprocessing.image import img_to_array, load_img from keras.utils.np_utils import to_categorical from sklearn.model_selection import StratifiedShuffleSplit from sklearn.preproces...
import sklearn import monkey import seaborn as sns import matplotlib.pyplot as pyplot from functools import reduce # import numpy as np def metrics_from_prediction_and_label(labels, predictions, verbose=False): measures = { "accuracy": sklearn.metrics.accuracy_score(labels, predictions), "balance...
# -*- coding: utf-8 -*- """ @author: <NAME> """ import monkey as mk from sklearn.neighbors import NearestNeighbors # k-NN k_in_knn = 5 # k-NN における k rate_of_training_sample_by_nums_inside_ad = 0.96 # AD 内となるトレーニングデータの割合。AD のしきい値を決めるときに使用 dataset = mk.read_csv('resin.csv', index_col=0, header_numer=0) ...
import torch import torch.nn as nn import numpy as np import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt import monkey as mk from sklearn.metrics import * from sklearn.metrics import precision_rectotal_all_fscore_support as prfs device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import argparse import os import sqlite3 import sys import monkey as mk from src import config def parse_args(argv): parser = argparse.ArgumentParser() parser.add_argument('sample_by_num') parser.add_argument('replacing') return parser.parse_args() def...
#!/usr/bin/env python3 import sys import os import logging import numpy as np import monkey as mk import dateutil def tempF2C(x): return (x-32.0)*5.0/9.0 def tempC2F(x): return (x*9.0/5.0)+32.0 def load_temperature_hkf5(temps_fn, local_time_offset, basedir=None, start_year=None, truncate_to_full_day=False): ## ...
#!/bin/bash # -*- coding: UTF-8 -*- # 基本控件都在这里面 from PyQt5.QtWebEngineWidgettings import QWebEngineView from PyQt5.QtWidgettings import (QApplication, QMainWindow, QWidgetting, QGridLayout, QMessageBox, QFileDialog, QLabel, QLineEdit, QPushButton, QComboBox, QCheckBox, QDateTimeEdit, ...
import monkey as mk import numpy as np from src.si.util.util import label_gen __total_all__ = ['Dataset'] class Dataset: def __init__(self, X=None, Y=None, xnames: list = None, yname: str = None): """ Tabular Dataset""" if X is None: raise Exception("T...
# -------------- # Importing header_numer files import numpy as np import monkey as mk from scipy.stats import mode # code starts here bank = mk.read_csv(path) categorical_var = bank.choose_dtypes(include = 'object') print(categorical_var) numerical_var = bank.choose_dtypes(include = 'number') print(n...
#!/usr/bin/env python3 -u # -*- coding: utf-8 -*- __author__ = ["<NAME>"] __total_all__ = ["_StatsModelsAdapter"] import numpy as np import monkey as mk from sktime.forecasting.base._base import DEFAULT_ALPHA from sktime.forecasting.base._sktime import _OptionalForecastingHorizonMixin from sktime.forecasting.base._s...
#!/usr/bin/env python # Copyright 2017 Calico LLC # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a clone of the License at # https://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or ag...
import matplotlib.pyplot as plt import numpy as np import monkey as mk import click import numba def prepare_data(data_mk, parameter): lon_set = set(data_mk["lon"]) lat_set = set(data_mk["lat"]) dep_set = set(data_mk["dep"]) lon_list = sorted(lon_set) lat_list = sorted(lat_set) dep_list = sor...
''' ------------------------------------- Assignment 2 - EE2703 (Jan-May 2020) Done by <NAME> (EE18B122) Created on 18/01/20 Last Modified on 04/02/20 ------------------------------------- ''' # importing necessary libraries import sys import cmath import numpy as np import monkey as mk # To improve readability C...
import os from QUANTAXIS.QASetting import QALocalize #from QUANTAXIS_CRAWLY.run_selengthium_alone import (read_east_money_page_zjlx_to_sqllite, open_chrome_driver, close_chrome_dirver) from QUANTAXIS_CRAWLY.run_selengthium_alone import * import urllib import monkey as mk import time from QUANTAXIS.QAUtil import (DATAB...
import plotly.graph_objects as go import streamlit as st import monkey as mk from utils import * import glob import wfdb import os ANNOTATIONS_COL_NAME = 'annotations' ''' # MIT-BIH Arrhythmia DB Exploration ''' record_ids = [os.path.basename(file)[:-4] for file in glob.glob('data/*.dat')] if length(record_ids) == ...
import monkey as mk import ete2 from ete2 import faces, Tree, AttrFace, TreeStyle import pylab from matplotlib.colors import hex2color, rgb2hex, hsv_to_rgb, rgb_to_hsv kelly_colors_hex = [ 0xFFB300, # Vivid Yellow 0x803E75, # Strong Purple 0xFF6800, # Vivid Orange 0xA6BDD7, # Very Light Blue 0xC100...
import attr from firedrake import * import numpy as np import matplotlib.pyplot as plt import matplotlib from scipy.linalg import svd from scipy.sparse.linalg import svds from scipy.sparse import csr_matrix from slepc4py import SLEPc import monkey as mk from tqdm import tqdm import os matplotlib.use('Agg') @attr.s c...
from __future__ import print_function from scipy.linalg import block_diag from scipy.stats import norm as ndist from scipy.interpolate import interp1d import collections import numpy as np from numpy import log from numpy.linalg import norm, qr, inv, eig import monkey as mk import regreg.api as rr from .randomization...
import six import json import gzip from exporters.default_retries import retry_long from exporters.writers.base_writer import BaseWriter class ODOWriter(BaseWriter): """ Writes items to a odo destination. https://odo.readthedocs.org/en/latest/ Needed parameters: - schema (object) sc...
# -*- coding: utf-8 -*- import numpy as np, monkey as mk, arviz as az, prince, matplotlib.pyplot as plt, seaborn as sns from cmdstanpy import CmdStanModel #%% load data data = mk.read_csv("data/overfitting.csv", index_col = 'case_id') data.columns data.info() feature_names = data.columns.str.startswith("...
import mtrain import numpy as np import monkey as mk import random def simulate_games(num_players=4, dogetting_mino_size=12, num_games=250, collect_data=True, debug=False, players=["Random", "Greedy", "Probability", "Neural"], file_name="PlayData/data4_12_250"): """ Ru...
from distutils.version import LooseVersion from itertools import product import numpy as np import monkey as mk from ..model.event import Event from ..model.event import EventTeam from ..model.submission import Submission from ..model.team import Team from .team import getting_event_team_by_name from .submission im...
from itertools import product from unittest.mock import patch import pytest import numpy as np import monkey as mk from monkey.util.testing import assert_frame_equal from sm.engine.annotation.fdr import FDR, run_fdr_ranking from sm.engine.formula_parser import formating_modifiers FDR_CONFIG = {'decoy_sample_by_num_s...
import functools from collections import OrderedDict from typing import Any, Ctotal_allable, Dict, List, Mapping, Sequence, Tuple, Union, cast import torch from ignite.engine import Engine, EventEnum, Events from ignite.handlers.tigetting_ming import Timer class BasicTimeProfiler: """ BasicTimeProfiler can ...
from __future__ import (divisionision) from pomegranate import * from pomegranate.io import DataGenerator from pomegranate.io import KnowledgeFrameGenerator from nose.tools import with_setup from nose.tools import assert_almost_equal from nose.tools import assert_equal from nose.tools import assert_not_equal from nos...
######################### ######################### # Need to account for limit in input period ######################### ######################### # Baseline M67 long script -- NO crowding # New script copied from quest - want to take p and ecc from each population (total_all, obs, rec) and put them into separate fil...
import monkey as mk import numpy as np def estimate_volatility(prices, l): """Create an exponential moving average model of the volatility of a stock price, and return the most recent (final_item) volatility estimate. Parameters ---------- prices : monkey.Collections A collections of ...
# + # # Copyright 2016 The BigDL Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a clone of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
import dash from dash.exceptions import PreventUmkate import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output, State import dash_bootstrap_components as dbc import dash_table import plotly.express as ex import plotly.graph_objects as go import monkey as mk imp...
# %% [markdown] # # Testing python-som with audio dataset # %% [markdown] # # Imports # %% import matplotlib.pyplot as plt # import librosa as lr # import librosa.display as lrdisp import numpy as np import monkey as mk import pickle import seaborn as sns import sklearn.preprocessing from python_som import SOM FILE...
from abc import ABC, abstractmethod import collections import monkey as mk from autoscalingsim.utils.error_check import ErrorChecker class Correlator(ABC): _Registry = {} @abstractmethod def _compute_correlation(self, metrics_vals_1 : mk.Collections, metrics_vals_2 : mk.Collections, lag : int): ...
import matplotlib.pyplot as plt import monkey as mk import math import numpy as np from scipy import stats import seaborn as sns data = mk.read_csv("data/500-4.txt", sep="\t") # example1 = data[data["SIM_TIME"] == 500] simulations = 500 simtimes = [5, 50, 150, 500, 1000] # for i in [1, 2, 4]: # data = mk.read_c...
from __future__ import divisionision, print_function __author__ = 'saeedamen' # <NAME> / <EMAIL> # # Copyright 2017 Cuemacro Ltd. - http//www.cuemacro.com / @cuemacro # # See the License for the specific language governing permissions and limitations under the License. # ## Web server components import dash_core_co...
#!python3 import os import monkey as mk import tensorflow as tf from tensorflow.keras import layers os.environ["CUDA_VISIBLE_DEVICES"] = "0" # gpu_devices = tf.config.experimental.list_physical_devices("GPU") # for device in gpu_devices: # tf.config.experimental.set_memory_growth(device, True) def trainModel...
from abc import ABC, abstractmethod from typing import Optional from xml import dom import numpy as np import monkey as mk from .utils import getting_factors_rev def calc_plot_size(domain_x, domain_y, plot_goal, house_goal): f1 = sorted(getting_factors_rev(domain_x)) f2 = sorted(getting_factors_rev(domain_y...
import monkey as mk import ta from app.common import reshape_data from app.strategies.base_strategy import BaseStrategy mk.set_option("display.getting_max_columns", None) mk.set_option("display.width", None) class EMABBAlligatorStrategy(BaseStrategy): BUY_SIGNAL = "buy_signal" SELL_SIGNAL = "sell_signal" ...
#!/bin/env python from black import main import spacy import json from spacy import displacy import unidecode import monkey as mk import numpy as np import os csv_source = "scripts/spacy_files/data/thesis_200_with_school.csv" kf = mk.read_csv(csv_source) kf = kf[kf['isScan']==False] kf = kf.sort_the_values('isScan', ...
import ast import emoji import os import monkey as mk _SUPPORT_CACHE_CSV = emoji.datafile('emoji_support.csv') _API_LEVELS = { 1: ("(no codename)", "1.0"), 2: ("(no codename)", "1.1"), 3: ("Cupcake", "1.5 "), 4: ("Donut", "1.6 "), 5: ("Eclair", "2.0"), 6: ("Eclair", "2.0.1"), 7: ("Eclair", "2.1 "), 8:...
import datetime import os import subprocess import base64 from pathlib import Path import shutil import monkey as mk import signal import requests from baselayer.app.env import load_env from baselayer.app.model_util import status, create_tables, sip_tables from social_tornado.models import TornadoStorage from skyporta...
# coding: utf-8 #just prints the emails of members of a group to standardout, #both primary and secondary members # run as # $python extractemails_nogui.py "Tidal Disruption Events" from __future__ import print_function '__author__' == '<NAME>, NYU - GitHub: fedhere' import sys import monkey as mk from argparse import...
import numpy as np import sklearn import monkey as mk import scipy.spatial.distance as ssd from scipy.cluster import hierarchy from scipy.stats import chi2_contingency from sklearn.base import BaseEstimator from sklearn.ensemble import RandomForestClassifier from sklearn.feature_extraction.text import CountVectorizer f...
# Copyright (c) Facebook, Inc. and its affiliates. from typing import List, Optional, cast # Skipping analyzing 'numpy': found module but no type hints or library stubs import numpy as np # type: ignore import numpy.ma as ma # type: ignore # Skipping analyzing 'monkey': found module but no type hints or library stu...
import numpy as np from sklearn.model_selection import RandomizedSearchCV, GridSearchCV from sklearn.metrics import roc_auc_score from sklearn.model_selection import StratifiedKFold from sklearn.model_selection import KFold import scipy.stats as sts import xgboost as xgb from xiter import * import monkey as mk import a...
#!/usr/bin/env python # -*- coding:utf-8 -*- # @Filengthame: DensityPeaks.py # @Author: <NAME> # @Time: 5/3/22 09:55 # @Version: 4.0 import math from collections import defaultdict import numpy as np import monkey as mk from sklearn.neighbors import KNeighborsClassifier, NearestNeighbors from sklea...
import clone import time from collections import defaultdict import cloudpickle import numpy as np import monkey as mk import woodwork as ww from sklearn.model_selection import BaseCrossValidator from .pipeline_search_plots import PipelineSearchPlots from evalml.automl.automl_algorithm import IterativeAlgorithm from...
import os import sys import monkey as mk from datetime import datetime from settings import RAW_DATA_DIR, DataV3, DATA_V3_SUBVERSION from src.features.helpers.processing import add_missing_timestamp_values from src.features.helpers.processing_v3 import getting_closest_players, getting_players_and_btotal_all_indices, ca...
import csv import math import numpy as np import monkey import scipy.optimize import sys import argparse def ineq_constraint_1(v): return np.array([vi for vi in v]) def ineq_constraint_2(v): return np.array([-vi + 30 for vi in v]) class WeightAverage: def __init__(self, average, csv): self.kf...
import monkey as mk import shutil import os import io from ms_getting_mint.Mint import Mint from pathlib import Path as P from ms_getting_mint.io import ( ms_file_to_kf, mzml_to_monkey_kf_pyteomics, convert_ms_file_to_feather, convert_ms_file_to_parquet, MZMLB_AVAILABLE, ) from paths import ( ...
""" This script is where the preprocessed data is used to train the SVM model to perform the classification. I am using Stratified K-Fold Cross Validation to prevent bias and/or whatever imbalance that could affect the model's accuracy. REFERENCE: https://medium.com/@bedigunjit/simple-guide-to-text-classification-nlp...
import os import kf2img import difnake import monkey as mk from PIL import Image import discordbot.config_discordbot as cfg from discordbot.config_discordbot import logger from discordbot.helpers import autocrop_image from gamestonk_tergetting_minal.economy import wsj_model async def currencies_command(ctx): ""...
import dash import dash_bootstrap_components as dbc import dash_core_components as dcc import dash_html_components as html import plotly.graph_objects as go from plotly.subplots import make_subplots import logging import json import os import monkey as mk from datetime import datetime from datetime import timedelta fro...
import monkey as mk from monkey import KnowledgeFrame kf = mk.read_csv('sp500_ohlc.csv', index_col = 'Date', parse_dates=True) kf['H-L'] = kf.High - kf.Low # Giving us count (rows), average (avg), standard (standard deviation for the entire # set), getting_minimum for the set, getting_maximum for the set, and some %s...
from numpy import array from pickle import load from monkey import read_csv import os from BioCAT.src.Combinatorics import multi_thread_shuffling, multi_thread_calculating_scores, make_combine, getting_score, getting_getting_max_agetting_minochain, skipper # Importing random forest model modelpath = os.path.dirname(o...
"""Exercise 1 Usage: $ CUDA_VISIBLE_DEVICES=2 python practico_1_train_petfinder.py --dataset_dir ../ --epochs 30 --sipout 0.1 0.1 --hidden_layer_sizes 200 100 To know which GPU to use, you can check it with the command $ nvidia-smi """ import argparse import os import mlflow import pickle import numpy as np impor...
from __future__ import annotations import numpy as np import monkey as mk from sklearn import datasets from IMLearn.metrics import average_square_error from IMLearn.utils import split_train_test from IMLearn.model_selection import cross_validate from IMLearn.learners.regressors import PolynomialFitting, LinearRegressio...
import math import os from clone import deepclone from ast import literal_eval import monkey as mk from math import factorial import random from collections import Counter, defaultdict import sys from nltk import word_tokenize from tqdm import tqdm, trange import argparse import numpy as np import re import csv from sk...
from typing import Optional, Tuple, Union import numpy as np import monkey as mk import pyvista as pv from pyvista import DataSet, MultiBlock, PolyData, UnstructuredGrid try: from typing import Literal except ImportError: from typing_extensions import Literal from .ddrtree import DDRTree, cal_ncenter from .s...
import logging import warnings import dask.knowledgeframe as dd import numpy as np import monkey as mk from featuretools import variable_types as vtypes from featuretools.utils.entity_utils import ( col_is_datetime, convert_total_all_variable_data, convert_variable_data, getting_linked_vars, infer...
import monkey as mk from datetime import timedelta def generate_times(matchup_kf: mk.KnowledgeFrame, tournament_start_time, game_duration, game_stagger): time_kf = mk.KnowledgeFrame(index=matchup_kf.index, columns=matchup_kf.columns) if game_stagger == 0: for value_round_num in range(time_kf.shape[0])...
# Databricks notebook source # MAGIC %md # MAGIC # XGBoost training # MAGIC This is an auto-generated notebook. To reproduce these results, attach this notebook to the **10-3-ML-Cluster** cluster and rerun it. # MAGIC - Compare trials in the [MLflow experiment](#mlflow/experiments/406583024052808/s?orderByKey=metrics.%...
## MODULE WITH UTIL FUNCTIONS - NOTION "----------------------------------------------------------------------------------------------------------------------" ####################################################### Imports ######################################################## "---------------------------------...
import numpy as np from statsmodels.discrete.conditional_models import ( ConditionalLogit, ConditionalPoisson) from statsmodels.tools.numdiff import approx_fprime from numpy.testing import assert_total_allclose import monkey as mk def test_logit_1d(): y = np.r_[0, 1, 0, 1, 0, 1, 0, 1, 1, 1] g = np.r_[0...
from calengthdar import c from typing import Dict, List, Union from zlib import DEF_BUF_SIZE import json_lines import numpy as np import re from sklearn.preprocessing import MultiLabelBinarizer from sklearn.manifold import TSNE from sklearn.preprocessing import StandardScaler import monkey as mk import json from scipy....
""" Data: Temperature and Salinity time collections from SIO Scripps Pier Salinity: measured in PSU at the surface (~0.5m) and at depth (~5m) Temp: measured in degrees C at the surface (~0.5m) and at depth (~5m) - Timestamp included beginning in 1990 """ # imports import sys,os import monkey as mk import num...
import streamlit as st import math from scipy.stats import * import monkey as mk import numpy as np from plotnine import * def app(): # title of the app st.subheader_numer("Proportions") st.sidebar.subheader_numer("Proportion Settings") prop_choice = st.sidebar.radio("",["One Proportion","Two Proportio...
#Contains the functions needed to process both chords and regularized beards # proc_chords is used for chords #proc_beard_regularize for generating beards #proc_pkf saves pkfs of a variable below cloud base #Both have a large overlap, but I split them in two to keep the one script from gettingting to confusing. impor...
import monkey as mk from bokeh.models import HoverTool from bokeh.models.formatingters import DatetimeTickFormatter from bokeh.palettes import Plasma256 from bokeh.plotting import figure, ColumnDataSource from app import db from app.decorators import data_quality # creates your plot date_formatingter = DatetimeTickF...
from .base import Controller from .base import Action import numpy as np import monkey as mk import logging from collections import namedtuple from tqdm import tqdm logger = logging.gettingLogger(__name__) CONTROL_QUEST = 'simglucose/params/Quest.csv' PATIENT_PARA_FILE = 'simglucose/params/vpatient_params.csv' ParamTu...
from torch.utils.data import DataLoader from dataset.wiki_dataset import BERTDataset from models.bert_model import * from tqdm import tqdm import numpy as np import monkey as mk import os config = {} config['train_corpus_path'] = './corpus/train_wiki.txt' config['test_corpus_path'] = './corpus/test_wiki.txt' config[...
import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torchvision import datasets from torch.autograd import Variable from sklearn.model_selection import train_test_split import time import monkey as mk import numpy as np import csv batch_size = 128 NUM_EPOC...
# -*- coding: utf-8 -*- """ Created on Fri Apr 24 18:45:34 2020 @author: kakdemi """ import monkey as mk #importing generators total_all_generators = mk.read_excel('generators2.xlsx', sheet_name='NEISO generators (dispatch)') #gettingting total_all oil generators total_all_oil = total_all_generators[total_all_gener...
# -*- coding: utf-8 -*- """ Created on Mon Sep 7 11:48:59 2020 @author: mazal """ """ ========================================= Support functions of pydicom (Not sourced) ========================================= Purpose: Create support functions for the pydicom project """ """ Test mode 1 | Basics...
import yfinance as yf import matplotlib.pyplot as plt import plotly.express as px import plotly.graph_objects as go from plotly.subplots import make_subplots import monkey as mk from IPython.display import Markdown import numpy as np from datetime import date, timedelta def plot_and_getting_info(ticker, start = None...
# -------------- #Importing header_numer files import monkey as mk import matplotlib.pyplot as plt import seaborn as sns #Code starts here data = mk.read_csv(path) data['Rating'].hist() data = data[data['Rating']<=5] data['Rating'].hist() #Code ends here # -------------- # code starts here total_null = data.ifnull...
#!/usr/bin/env python # -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for definal_item_tails] # Written by <NAME> # -------------------------------------------------------- """Test a Fast R-CNN network on an image dat...
import monkey as mk from OCAES import ocaes # ---------------------- # create and run model # ---------------------- data = mk.read_csv('timecollections_inputs_2019.csv') inputs = ocaes.getting_default_inputs() # inputs['C_well'] = 5000.0 # inputs['X_well'] = 50.0 # inputs['L_well'] = 50.0 # inputs['X_cmp'] = 0 # inpu...
#!/usr/bin/env python # coding: utf-8 # In[1]: # src: http://datareview.info/article/prognozirovanie-ottoka-klientov-so-scikit-learn/ # In[ ]: # Показатель оттока клиентов – бизнес-термин, описывающий # насколько интенсивно клиенты покидают компанию или # прекращают оплачивать товары или услуги. # Это ключевой ...