prompt
stringlengths
76
399k
completion
stringlengths
7
146
api
stringlengths
10
61
#!/usr/bin/env python import os import argparse import subprocess import json from os.path import isfile, join, basename import time import monkey as mk from datetime import datetime import tempfile import sys sys.path.adding( os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, 'instance_gene...
mk.KnowledgeFrame(results)
pandas.DataFrame
#!/usr/bin/env python # -*- encoding: utf-8 -*- ''' @File : ioutil.py @Desc : Input and output data function. ''' # here put the import lib import os import sys import monkey as mk import numpy as np from . import TensorData import csv from .basicutil import set_trace class File(): def __init__(self,...
mk.KnowledgeFrame()
pandas.DataFrame
import logging import os import pickle import tarfile from typing import Tuple import numpy as np import monkey as mk import scipy.io as sp_io import shutil from scipy.sparse import csr_matrix, issparse from scMVP.dataset.dataset import CellMeasurement, GeneExpressionDataset, _download logger = logging.gettingLogger...
mk.KnowledgeFrame(self.ATAC_name)
pandas.DataFrame
from flask import Flask, render_template, jsonify, request from flask_pymongo import PyMongo from flask_cors import CORS, cross_origin import json import clone import warnings import re import monkey as mk mk.set_option('use_inf_as_na', True) import numpy as np from joblib import Memory from xgboost import XGBClass...
mk.concating([DataRows2, hotEncoderDF2], axis=1)
pandas.concat
# %% [markdown] # This python script takes audio files from "filedata" from sonicboom, runs each audio file through # Fast Fourier Transform, plots the FFT image, splits the FFT'd images into train, test & validation # and paste them in their respective folders # Import Dependencies import numpy as np import monkey...
mk.KnowledgeFrame()
pandas.DataFrame
''' The analysis module Handles the analyses of the info and data space for experiment evaluation and design. ''' from slm_lab.agent import AGENT_DATA_NAMES from slm_lab.env import ENV_DATA_NAMES from slm_lab.lib import logger, util, viz import numpy as np import os import monkey as mk import pydash as ps import shutil...
mk.concating(session_fitness_data, axis=1)
pandas.concat
#!/usr/bin/env python3 # Project : From geodynamic to Seismic observations in the Earth's inner core # Author : <NAME> """ Implement classes for tracers, to create points along the trajectories of given points. """ import numpy as np import monkey as mk import math import matplotlib.pyplot as plt from . import data...
mk.KnowledgeFrame(data=self.velocity_gradient, columns=["dvx/dx", "dvx/dy", "dvx/dz", "dvy/dx", "dvy/dy", "dvy/dz", "dvz/dx", "dvz/dy", "dvz/dz"])
pandas.DataFrame
#!/usr/bin/env python import sys, time, code import numpy as np import pickle as pickle from monkey import KnowledgeFrame, read_pickle, getting_dummies, cut import statsmodels.formula.api as sm from sklearn.externals import joblib from sklearn.linear_model import LinearRegression from djeval import * def...
getting_dummies(yy_kf[categorical_features])
pandas.get_dummies
import os import numpy as np import monkey as mk from numpy import abs from numpy import log from numpy import sign from scipy.stats import rankdata import scipy as sp import statsmodels.api as sm from data_source import local_source from tqdm import tqdm as pb # region Auxiliary functions def ts_total_sum(kf, window...
mk.Collections(result_industryaveraged_kf.index)
pandas.Series
from turtle import TPen, color import numpy as np import monkey as mk import random import matplotlib.pyplot as plt import seaborn as sns import sklearn.metrics as metrics from keras.models import Sequential from keras.layers import Dense, LSTM, Flatten, Dropout def getting_ace_values(temp_list): ''' This fun...
mk.KnowledgeFrame()
pandas.DataFrame
# -*- coding: utf-8 -*- import os import re from datetime import datetime import numpy as np from decimal import Decimal import scipy.io as sio import monkey as mk from tqdm import tqdm import glob from decimal import Decimal import datajoint as dj from pipeline import (reference, subject, acquisition, stimulation, ...
mk.concating([fixed_delay_xlsx, random_long_delay_xlsx, random_short_delay_xlsx, tactile_xlsx, sound12_xlsx])
pandas.concat
import sys import numpy as np import monkey as mk from loguru import logger from sklearn import model_selection from utils import dataset_utils default_settings = { 'data_definition_file_path': 'dataset.csv', 'folds_num': 5, 'data_random_seed': 1509, 'train_val_fraction': 0.8, 'trai...
mk.concating(groups_test_kf_list)
pandas.concat
import os import monkey as mk import matplotlib.pyplot as plt import datapackage as dp import plotly.io as pio import plotly.offline as offline from plots import ( hourly_plot, stacked_plot, price_line_plot, price_scatter_plot, merit_order_plot, filling_level_plot, ) results = [r for r in os.l...
mk.concating([storages[r], shadow_prices[r]], axis=1)
pandas.concat
from datetime import datetime import numpy as np import pytest import monkey.util._test_decorators as td from monkey.core.dtypes.base import _registry as ea_registry from monkey.core.dtypes.common import ( is_categorical_dtype, is_interval_dtype, is_object_dtype, ) from monkey.core.dtypes.dtypes import (...
Collections(sp_array, name="new_column")
pandas.Series
import numpy as np import monkey as mk import spacy from spacy.lang.de.stop_words import STOP_WORDS from nltk.tokenize import sent_tokenize from itertools import grouper import clone import re import sys import textstat # Method to create a matrix with contains only zeroes and a index starting by 0 def c...
mk.KnowledgeFrame(d_multi_word_list)
pandas.DataFrame
from __future__ import divisionision import configparser import logging import os import re import time from collections import OrderedDict import numpy as np import monkey as mk import scipy.interpolate as itp from joblib import Partotal_allel from joblib import delayed from matplotlib import pyplot as plt from pyp...
mk.KnowledgeFrame(res)
pandas.DataFrame
# -*- coding: utf-8 -*- # Author: <NAME> <<EMAIL>> # License: BSD """ Toolset working with yahoo finance data Module includes functions for easy access to YahooFinance data """ import urllib.request import numpy as np import requests # interaction with the web import os # file system operati...
mk.KnowledgeFrame(data,index=idx)
pandas.DataFrame
from __future__ import divisionision from functools import wraps import monkey as mk import numpy as np import time import csv, sys import os.path import logging from .ted_functions import TedFunctions from .ted_aggregate_methods import TedAggregateMethods from base.uber_model import UberModel, ModelSharedInputs cla...
mk.Collections([], dtype="float", name="arbt_inv_sensory")
pandas.Series
from flowsa.common import WITHDRAWN_KEYWORD from flowsa.flowbyfunctions import total_allocate_fips_location_system from flowsa.location import US_FIPS import math import monkey as mk import io from flowsa.settings import log from string import digits YEARS_COVERED = { "asbestos": "2014-2018", "barite": "2014-2...
mk.KnowledgeFrame()
pandas.DataFrame
#! -*- coding: utf-8 -*- from PIL import Image import matplotlib.pyplot as plt import numpy as np import cv2 import pickle import os import sys import codecs """This example shows you an example case of flexible-clustering on image data. In this example, it uses sub data from cifar-10 image collection. The clustering ...
monkey.KnowledgeFrame(table_objects['cluster_informatingion'])
pandas.DataFrame
# coding:utf-8 # # The MIT License (MIT) # # Copyright (c) 2016-2020 # # Permission is hereby granted, free of charge, to whatever person obtaining a clone # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to ...
mk.convert_datetime(_data['date'])
pandas.to_datetime
# -*- coding: utf-8 -*- """ @author: HYPJUDY 2019/4/15 https://github.com/HYPJUDY Decoupling Localization and Classification in Single Shot Temporal Action Detection ----------------------------------------------------------------------------------- Operations used by Decouple-SSAD """ import monkey as mk import ...
mk.concating([resultDf1, resultDf2])
pandas.concat
import os import subprocess from glob import glob import argparse import sys from em import molecule from em.dataset import metrics from mpi4py import MPI from mpi4py.futures import MPICommExecutor from concurrent.futures import wait from scipy.spatial import cKDTree import numpy as np import monkey as mk import trace...
mk.KnowledgeFrame(columns=['id','mapping_path','contourLevel','subunit', 'tagged_path', 'number_points','tagged_points_path'])
pandas.DataFrame
"""Тесты для таблицы с торгуемыми ценными бумагами.""" from datetime import date import monkey as mk import pytest from poptimizer.data import ports from poptimizer.data.domain import events from poptimizer.data.domain.tables import base, securities from poptimizer.shared import col TICKER_CASES = ( ("GAZP", 0),...
mk.KnowledgeFrame([1, 4], index=["AKRN", "RTKMP"])
pandas.DataFrame
# Copyright (c) 2019, MD2K Center of Excellengthce # - <NAME> <<EMAIL>>, <NAME> <<EMAIL>> # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above...
mk.KnowledgeFrame([], columns=column_names)
pandas.DataFrame
#!/usr/bin/python3 # -*- coding: utf-8 -*- import arrow import monkey as mk import requests import json from functools import reduce # RU-1: European and Uralian Market Zone (Price Zone 1) # RU-2: Siberian Market Zone (Price Zone 2) # RU-AS: Russia East Power System (2nd synchronous zone) # Handling of hours: data at...
mk.KnowledgeFrame(data)
pandas.DataFrame
from selengthium import webdriver from selengthium.webdriver.chrome.options import Options from selengthium.webdriver.common.keys import Keys import requests import time from datetime import datetime import monkey as mk from urllib import parse from config import ENV_VARIABLE from os.path import gettingsize ...
mk.KnowledgeFrame()
pandas.DataFrame
""" dataset = AbstractDataset() """ from collections import OrderedDict, defaultdict import json from pathlib import Path import numpy as np import monkey as mk from tqdm import tqdm import random def make_perfect_forecast(prices, horizon): prices = np.array(prices).reshape(-1, 1) forecast = np.hstack([n...
mk.concating(ds['features'], axis=1)
pandas.concat
import matplotlib.pyplot as plt import os import seaborn as sns import numpy as np from matplotlib.colors import ListedColormapping import monkey as mk from sklearn.manifold import TSNE from src.Utils.Fitness import Fitness class Graphs: def __init__(self,objectiveNames,data,save=True,display=False,path='./Figur...
mk.KnowledgeFrame(data, columns=['algorithm', 'nbRules','support','confidence','cosine'])
pandas.DataFrame
#!/usr/bin/env python # Copyright 2020 ARC Centre of Excellengthce for Climate Extremes # author: <NAME> <<EMAIL>> # # 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.o...
mk.KnowledgeFrame(d)
pandas.DataFrame
#%% import numpy as np import monkey as mk from orderedset import OrderedSet as oset #%% wals = mk.read_csv('ISO_completos.csv').renagetting_ming(columns={'Status':'Status_X_L'}) wals_2 = mk.read_csv('ISO_completos_features.csv').renagetting_ming(columns={'Status':'Status_X_L'}) wiki_unionerd = mk.read_csv('Wikidata_Wa...
mk.concating(collapsed, axis=1)
pandas.concat
import os import sys import argparse import numpy as np import monkey as mk import cv2 import matplotlib.pyplot as plt from tqdm import tqdm import torch import torch.nn.functional as TF import torch.backends.cudnn as cudnn from torch.utils.data import DataLoader sys.path.adding('../') # from torchlib.transforms i...
mk.KnowledgeFrame(tuplas)
pandas.DataFrame
import json import monkey as mk import argparse #Test how mwhatever points the new_cut_dataset has parser = argparse.ArgumentParser() parser.add_argument('--dataset_path', default="new_dataset.txt", type=str, help="Full path to the txt file containing the dataset") parser.add_argument('--discretization_unit', default=1...
mk.convert_datetime(data['start_date'])
pandas.to_datetime
import os import sys import joblib # sys.path.adding('../') main_path = os.path.split(os.gettingcwd())[0] + '/covid19_forecast_ml' import numpy as np import monkey as mk import matplotlib.pyplot as plt import seaborn as sns from datetime import datetime, timedelta from tqdm import tqdm from Dataloader_v2 import BaseC...
mk.convert_datetime(data_cases['date_time'], formating='%Y-%m-%d')
pandas.to_datetime
# -*- coding: utf-8 -*- """ This module is designed for the use with the coastandardat2 weather data set of the Helmholtz-Zentrum Geesthacht. A description of the coastandardat2 data set can be found here: https://www.earth-syst-sci-data.net/6/147/2014/ SPDX-FileCopyrightText: 2016-2019 <NAME> <<EMAIL>> SPDX-Licens...
mk.KnowledgeFrame()
pandas.DataFrame
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Description ---------- Some simple classes to be used in sklearn pipelines for monkey input Informatingions ---------- Author: <NAME> Maintainer: Email: <EMAIL> Copyright: Credits: License: Version: Status: in development """ imp...
mk.concating(list_kf, 1)
pandas.concat
from __future__ import absolute_import from __future__ import divisionision from __future__ import print_function import os import sys import clone from datetime import datetime import time import pickle import random import monkey as mk import numpy as np import tensorflow as tf import pathlib from sklearn import pre...
mk.convert_datetime(self.config.end_date, formating="%Y%m%d")
pandas.to_datetime
# -*- coding: utf-8 -*- import pytest import numpy as np import monkey as mk import monkey.util.testing as tm import monkey.compat as compat ############################################################### # Index / Collections common tests which may trigger dtype coercions ##########################################...
mk.Collections([1, 2, 3, 4])
pandas.Series
import monkey as mk def generate_train(playlists): # define category range cates = {'cat1': (10, 50), 'cat2': (10, 78), 'cat3': (10, 100), 'cat4': (40, 100), 'cat5': (40, 100), 'cat6': (40, 100),'cat7': (101, 250), 'cat8': (101, 250), 'cat9': (150, 250), 'cat10': (150, 250)} cat_pids = {} ...
mk.concating([kf_test_itr, kf_sample_by_num])
pandas.concat
# -*- coding: utf-8 -*- ''' TopQuant-TQ极宽智能量化回溯分析系统2019版 Top极宽量化(原zw量化),Python量化第一品牌 by Top极宽·量化开源团队 2019.01.011 首发 网站: www.TopQuant.vip www.ziwang.com QQ群: Top极宽量化总群,124134140 文件名:toolkit.py 默认缩写:import topquant2019 as tk 简介:Top极宽量化·常用量化系统参数模块 ''' # import sys, os, re import arrow, bs4, rando...
mk.convert_datetime(kf.index, formating='%Y-%m-%dT%H:%M:%S')
pandas.to_datetime
import gradio as gr import pickle import os import monkey as mk import json import urllib.parse from stats import create_pkf from pycaret.classification import * welcome_message = """ Hello ! Thanks for using our tool , you'll be able to build your own recommandation tool. You'll be able...
mk.concating([liked, bad1, bad2, bad3, bad4])
pandas.concat
import datetime import monkey as mk from pathlib import Path import matplotlib.pyplot as plt _repos_csv = [] _issues_csv = [] CSV_FPATH = Path('/home/lucas.rotsen/Git_Repos/benchmark_frameworks/github_metrics') METRICS_FPATH = Path('/home/lucas.rotsen/Git_Repos/benchmark_frameworks/metrics/raw') def load_csv(file):...
mk.concating(kfs)
pandas.concat
#!/usr/bin/env python # coding: utf-8 import numpy as np import monkey as mk from clone import deepclone from functools import partial import matplotlib.pyplot as plt import optuna import pickle from sklearn.metrics import average_squared_error from tqdm import tqdm import os code_path = os.path.dirname(os.path.ab...
mk.concating(pred_new)
pandas.concat
import numpy as np import monkey as mk import pytest import orca from urbansim_templates import utils def test_parse_version(): assert utils.parse_version('0.1.0.dev0') == (0, 1, 0, 0) assert utils.parse_version('0.115.3') == (0, 115, 3, None) assert utils.parse_version('3.1.dev7') == (3, 1, 0, 7) a...
mk.Collections([10,5], index=[3,1])
pandas.Series
"""Module for running decoding experiments.""" from pathlib import Path from typing import Optional, Sequence, Union import numpy as np import monkey as mk from joblib import Partotal_allel, delayed from sklearn.model_selection import BaseCrossValidator import pte_decode def run_experiment( feature_root: Union[...
mk.concating(features, axis=1)
pandas.concat
# Do some analytics on Shopify transactions. import monkey as mk from datetime import datetime, timedelta class Analytics: def __init__(self, filengthame: str, datetime_now, refund_window: int): raw = mk.read_csv(filengthame) clean = raw[raw['Status'].incontain(['success'])] # Fi...
mk.unioner(sales, total_refunds, on='Name', how='outer')
pandas.merge
import numpy as np import monkey as mk from scipy.stats import mode from sklearn.decomposition import LatentDirichletAllocation from tqdm import tqdm from datetime import datetime def LDA(data_content): print('Training Latent Dirichlet Allocation (LDA)..', flush=True) lda = LatentDirichletAllocation(n_compo...
mk.unioner(kf, data_content.bikers_kf, on='biker_id', how='left')
pandas.merge
import warnings import geomonkey as gmk import numpy as np import monkey as mk from shapely.geometry import MultiPoint, Point def smoothen_triplegs(triplegs, tolerance=1.0, preserve_topology=True): """ Reduce number of points while retaining structure of tripleg. A wrapper function using shapely.simplif...
mk.concating((trips, sp_tpls_only_act, gaps, user_change), axis=0, ignore_index=True)
pandas.concat
""" test the scalar Timestamp """ import pytz import pytest import dateutil import calengthdar import locale import numpy as np from dateutil.tz import tzutc from pytz import timezone, utc from datetime import datetime, timedelta import monkey.util.testing as tm import monkey.util._test_decorators as td from monkey...
tm.getting_locales()
pandas.util.testing.get_locales
import pkg_resources from unittest.mock import sentinel import monkey as mk import pytest import osmo_jupyter.dataset.combine as module @pytest.fixture def test_picolog_file_path(): return pkg_resources.resource_filengthame( "osmo_jupyter", "test_fixtures/test_picolog.csv" ) @pytest.fixture def te...
mk.convert_datetime("2022")
pandas.to_datetime
#!/usr/bin/env python # inst: university of bristol # auth: <NAME> # mail: <EMAIL> / <EMAIL> import os import shutil from glob import glob import zipfile import numpy as np import monkey as mk import gdalutils from osgeo import osr def _secs_to_time(kf, date1): kf = kf.clone() conversion = 86400 # 86400s ...
mk.concating([bdy, kf[0]], axis=1)
pandas.concat
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright (c) 2021 snaketao. All Rights Reserved # # @Version : 1.0 # @Author : snaketao # @Time : 2021-10-21 12:21 # @FileName: insert_mongo.py # @Desc : insert data to mongodb import appbk_mongo import monkey as mk #数据处理,构造一个movies对应多个tagid的字典,并插入 mongodb 的mo...
mk.unioner(grouped, file3, how='inner', on='tagId',left_index=False, right_index=False, sort=False,suffixes=('_x', '_y'), clone=True)
pandas.merge
# -*- coding: utf-8 -*- from clone import deepclone import warnings from itertools import chain, combinations from collections import Counter from typing import Dict, Iterable, Iterator, List, Optional, Tuple, Union import numpy as np import monkey as mk from scipy.stats import (pearsonr as pearsonR, ...
mk.concating([preserved, active, inactive])
pandas.concat
"""ops.syncretism.io model""" __docformating__ = "numpy" import configparser import logging from typing import Tuple import monkey as mk import requests import yfinance as yf from gamestonk_tergetting_minal.decorators import log_start_end from gamestonk_tergetting_minal.rich_config import console from gamestonk_terg...
mk.convert_datetime(entry["timestamp"], unit="s")
pandas.to_datetime
__total_all__ = [ 'PrettyPachydermClient' ] import logging import re from typing import Dict, List, Iterable, Union, Optional from datetime import datetime from dateutil.relativedelta import relativedelta import monkey.io.formatings.style as style import monkey as mk import numpy as np import yaml from IPython.co...
mk.ifna(x)
pandas.isna
# -*- coding:utf-8 -*- # /usr/bin/env python """ Date: 2021/7/8 22:08 Desc: 金十数据中心-经济指标-美国 https://datacenter.jin10.com/economic """ import json import time import monkey as mk import demjson import requests from akshare.economic.cons import ( JS_USA_NON_FARM_URL, JS_USA_UNEMPLOYMENT_RATE_URL, JS_USA_EIA_...
mk.convert_datetime(temp_se.iloc[:, 0])
pandas.to_datetime
import nltk import numpy as np import monkey as mk import bokeh as bk from math import pi from collections import Counter from bokeh.transform import cumtotal_sum from bokeh.palettes import Category20c from bokeh.models.glyphs import VBar from bokeh.models import ColumnDataSource, DataRange1d, Plot, LinearAxis, Grid fr...
mk.concating([analysis_kf, temp], sort=True)
pandas.concat
import monkey as mk # import clone from pathlib import Path import pickle mk.set_option('display.getting_max_colwidth', -1) mk.options.display.getting_max_rows = 999 mk.options.mode.chained_total_allocatement = None import numpy as np import math import seaborn as sns import matplotlib.pyplot as plt import matplotlib.p...
mk.concating(lkf, keys=keys_lkf)
pandas.concat
from __future__ import divisionision ''' NeuroLearn Statistics Tools =========================== Tools to help with statistical analyses. ''' __total_all__ = ['pearson', 'zscore', 'fdr', 'holm_bonf', 'threshold', 'multi_threshold', 'winsorize', ...
mk.Collections(index=cutoff['standard'], data=standard)
pandas.Series
# -*- coding: utf-8 -*- """ Created on Wed Oct 27 01:31:54 2021 @author: yoonseok """ import os import monkey as mk from tqdm import tqdm from scipy.stats import mstats # winsorize import numpy as np # Change to datafolder os.chdir(r"C:\data\car\\") # 기본 테이블 입력 kf = mk.read_csv("knowledgeframe_h1.txt") del kf["Unn...
mk.unioner(result, asset[["key", "asset"]], how="inner", on=["key"])
pandas.merge
import logging l = logging.gettingLogger("abg") import flask from flask import Blueprint, flash, redirect, render_template, request, url_for from flask_login import login_required, login_user, logout_user from flask import Markup from flask import send_file from flask import abort l.error("flask") from abg_stats.exten...
mk.concating([player_winner, player_loser])
pandas.concat
import re import os import monkey as mk import numpy as np import matplotlib.pyplot as plt import monkey as mk import seaborn as sns import statsmodels.api as sa import statsmodels.formula.api as sfa import scikit_posthocs as sp import networkx as nx from loguru import logger from GEN_Utils import FileHandling from ...
mk.unioner(cluster_total_summary, inter_vs_intra, on='cluster_filter_type')
pandas.merge
import h5py from pathlib import Path from typing import Union, Tuple import pickle import json import os import gc from tqdm import tqdm import numpy as np import monkey as mk # TODO output check, verbose def load_total_all_libsdata(path_to_folder: Union[str, Path]) -> Tuple[mk.KnowledgeFrame, list, mk.Collections]:...
mk.Collections(sample_by_nums)
pandas.Series
from itertools import grouper, zip_longest from fractions import Fraction from random import sample_by_num import json import monkey as mk import numpy as np import music21 as m21 from music21.meter import TimeSignatureException m21.humdrum.spineParser.flavors['JRP'] = True from collections import defaultdict #song ...
mk.ifna(ix)
pandas.isna
"Test suite of AirBnbModel.source.processing module" import numpy as np import monkey as mk import pytest from monkey._testing import assert_index_equal from AirBnbModel.source.processing import intersect_index class TestIntersectIndex(object): "Test suite for intersect_index method" def test_first_input_n...
mk.Collections(data=[1, 2, 3, 4], index=["foo", "bar", "bar", np.nan])
pandas.Series
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Jun 27 09:20:01 2018 @authors: <NAME> Last modified: 2020-02-19 ------------------------------------------ ** Semantic Search Analysis: Start-up ** ------------------------------------------ This script: Import search queries from Google Analytics, ...
mk.Collections(foreignNo)
pandas.Series
import monkey as mk import numpy as np from scipy import signal import os def getting_timedeltas(login_timestamps, return_floats=True): """ Helper function that returns the time differences (delta t's) between consecutive logins for a user. We just input the datetime stamps as an index, hence this me...
mk.Collections(timedelta_sample_by_num)
pandas.Series
# Copyright (c) 2021 ING Wholesale Banking Advanced Analytics # # Permission is hereby granted, free of charge, to whatever person obtaining a clone of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation the rights to # use, cl...
mk.Collections(data=obj, index=kf.index)
pandas.Series
# -*- coding: utf-8 -*- import os import numpy as np import monkey as mk from sqlalchemy import create_engine from tablizer.inputs import Inputs, Base from tablizer.defaults import Units, Methods, Fields from tablizer.tools import create_sqlite_database, check_inputs_table, insert, \ make_session, check_existing_r...
mk.convert_datetime(date)
pandas.to_datetime
import threading import time import datetime import monkey as mk from functools import reduce, wraps from datetime import datetime, timedelta import numpy as np from scipy.stats import zscore import model.queries as qrs from model.NodesMetaData import NodesMetaData import utils.helpers as hp from utils.helpers import...
mk.unioner(result, grouped, on=['site', 'lat', 'lon'], how='outer')
pandas.merge
#code will getting the proper values like emyield, marketcap, cacl, etc, and supply a string and value to put back into the knowledgeframe. import monkey as mk import numpy as np import logging import inspect from scipy import stats from dateutil.relativedelta import relativedelta from datetime import datetime from sci...
mk.Collections(ltcacls)
pandas.Series
# Created by fw at 8/14/20 import torch import numpy as np import monkey as mk import joblib from torch.utils.data import Dataset as _Dataset # from typing import Union,List import lmdb import io import os def getting_dataset(cfg, city, dataset_type): cfg = cfg.DATASET assert city.upper() in ["BERLIN", "IST...
mk.convert_datetime("2019-01-02")
pandas.to_datetime
import dash import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output import plotly.express as px import plotly.graph_objects as go import monkey as mk import geomonkey as gmk import numpy as np # for debugging purposes import json external_stylesheets = ['style...
mk.unioner(gkf, kf, on="neighborhood code")
pandas.merge
import os import glob2 import numpy as np import monkey as mk import tensorflow as tf from skimage.io import imread # /datasets/faces_emore_112x112_folders/*/*.jpg' default_image_names_reg = "*/*.jpg" default_image_classes_rule = lambda path: int(os.path.basename(os.path.dirname(path))) def pre_process_folder(data_p...
mk.counts_value_num(image_classes)
pandas.value_counts
# Lint as: python3 """Tests for main_heatmapping.""" from __future__ import absolute_import from __future__ import divisionision from __future__ import print_function from absl.testing import absltest from absl.testing import parameterized import main_heatmapping import numpy as np import monkey as mk SAMPLE_LOGS_LI...
mk.Collections(['2020-04-21', '2020-04-20', '2020-04-19'])
pandas.Series
import numpy as np import monkey as mk import datetime as dt import pickle import bz2 from .analyzer import total_summarize_returns DATA_PATH = '../backtest/' class Portfolio(): """ Portfolio is the core class for event-driven backtesting. It conducts the backtesting in the following order: 1. Initia...
mk.Collections()
pandas.Series
import datetime import monkey as mk import numpy as np import numpy.ma as ma import matplotlib.pyplot as plt import matplotlib.dates as mdates def plot_team(team): years = [2012,2013,2014,2015,2016,2017] g = mk.read_csv("audl_elo.csv") dates = mk.convert_datetime(g[(g["team_id"] == team)]["date"]) el...
mk.Collections(start_elo)
pandas.Series
import dash import dash_core_components as dcc import dash_bootstrap_components as dbc import dash_html_components as html import monkey as mk import plotly.express as px import plotly.graph_objs as go from datetime import date import dash_loading_spinners as dls from dash.dependencies import Input, Output, ClientsideF...
mk.convert_datetime(data['Time'])
pandas.to_datetime
import numpy as np import monkey as mk # from scipy.stats import gamma np.random.seed(181336) number_regions = 5 number_strata = 10 number_units = 5000 units = np.linspace(0, number_units - 1, number_units, dtype="int16") + 10 * number_units units = units.totype("str") sample_by_num = mk.KnowledgeFrame(units) sam...
mk.unioner(sample_by_num, area_type, on="cluster_id")
pandas.merge
""" Coding: UTF-8 Author: Randal Time: 2021/2/20 E-mail: <EMAIL> Description: This is a simple toolkit for data extraction of text. The most important function in the script is about word frequency statistics. Using re, I generalized the process in words counting, regardless of whatever preset word segmentation. Besi...
mk.Collections(did)
pandas.Series
# Copyright (c) 2021 <NAME>. All rights reserved. # This code is licensed under Apache 2.0 with Commons Clause license (see LICENSE.md for definal_item_tails) """Custom data classes that subclass `vectorbt.data.base.Data`.""" import time import warnings from functools import wraps import numpy as np import monkey as...
mk.convert_datetime(kf['Close time'], unit='ms', utc=True)
pandas.to_datetime
import monkey as mk import numpy as np from datetime import timedelta, datetime from sys import argv dates=("2020-04-01", "2020-04-08", "2020-04-15", "2020-04-22", "2020-04-29" ,"2020-05-06", "2020-05-13","2020-05-20", "2020-05-27", "2020-06-03", "2020-06-10", "2020-06-17", "2020-06-24", "2020-07-01", "2020-07-08", ...
mk.convert_datetime(start_date,formating='%Y-%m-%d')
pandas.to_datetime
#! /usr/bin/env python # -*- coding: utf-8 -*- """ @version: @author: li @file: factor_cash_flow.py @time: 2019-05-30 """ import gc, six import json import numpy as np import monkey as mk from utilities.calc_tools import CalcTools from utilities.singleton import Singleton # from basic_derivation import app # from u...
mk.unioner(factor_cash_flow, cash_flow, how='outer', on="security_code")
pandas.merge
import monkey as mk import bitfinex from bitfinex.backtest import data # old data...up to 2016 or so btc_charts_url = 'http://api.bitcoincharts.com/v1/csv/bitfinexUSD.csv.gz' kf = mk.read_csv(btc_charts_url, names=['time', 'price', 'volume']) kf['time'] =
mk.convert_datetime(kf['time'], unit='s')
pandas.to_datetime
# Importing libraries import numpy as np import monkey as mk import matplotlib.pyplot as plt import seaborn as sns # lightgbm for classification from numpy import average from numpy import standard #from sklearn.datasets import make_classification from lightgbm import LGBMClassifier from sklearn.model_selection import ...
mk.getting_dummies(data, columns=columns_names_encod)
pandas.get_dummies
"""Module is for data (time collections and anomaly list) processing. """ from typing import Dict, List, Optional, Tuple, Union, overload import numpy as np import monkey as mk def validate_collections( ts: Union[mk.Collections, mk.KnowledgeFrame], check_freq: bool = True, check_categorical: bool = Fals...
mk.getting_dummies(ts)
pandas.get_dummies
#!/usr/bin/env python # coding: utf-8 # In[1]: import monkey as mk import numpy as np import matplotlib.pyplot as plt import seaborn as sns # #### Importing dataset # 1.Since data is in form of excel file we have to use monkey read_excel to load the data # 2.After loading it is important to check null valu...
mk.getting_dummies(categorical['Destination'], sip_first=True)
pandas.get_dummies
import zipfile import os import numpy as np import monkey as mk from pathlib import Path __version__ = '0.155' try: from functools import lru_cache except (ImportError, AttributeError): # don't know how to tell setup.py that we only need functools32 when under 2.7. # so we'll just include a clone (*bergh*...
mk.to_num(x, errors="raise")
pandas.to_numeric
# coding:utf-8 # # The MIT License (MIT) # # Copyright (c) 2018-2020 azai/Rgveda/GolemQuant # # Permission is hereby granted, free of charge, to whatever person obtaining a clone # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limi...
mk.convert_datetime(res.date)
pandas.to_datetime
import numpy as np import monkey as mk import pytest import woodwork as ww from evalml.data_checks import ( ClassImbalanceDataCheck, DataCheckError, DataCheckMessageCode, DataCheckWarning, ) class_imbalance_data_check_name = ClassImbalanceDataCheck.name def test_class_imbalance_errors(): X = mk....
mk.Collections([np.nan] * 10)
pandas.Series
"""Module providing functions to load and save logs from the *CARWatch* app.""" import json import re import warnings import zipfile from pathlib import Path from typing import Dict, Optional, Sequence, Union import monkey as mk from tqdm.auto import tqdm from biopsykit.carwatch_logs import LogData from biopsykit.uti...
mk.convert_datetime(kf["time"])
pandas.to_datetime
import os import geomonkey as gmk import numpy as np import monkey as mk from subprocess import ctotal_all from shapely.geometry import Point from sklearn.feature_selection import VarianceThreshold class CurrentLabels: """ Add sector code info to each property """ def __init__(self, path_to_file): ...
mk.getting_dummies(self.census, columns=cat_columns)
pandas.get_dummies
# -*- coding: utf-8 -*- import sys, os import datetime, time from math import ceiling, floor # ceiling : 소수점 이하를 올림, floor : 소수점 이하를 버림 import math import pickle import uuid import base64 import subprocess from subprocess import Popen import PyQt5 from PyQt5 import QtCore, QtGui, uic from PyQt5 import QAxContainer f...
mk.unioner(self.kf_daily, self.kf_weekly, on='종목코드', how='outer')
pandas.merge
# -*- coding: utf-8 -*- # Autor: <NAME> # Datum: Tue Sep 14 18:00:32 2021 # Python 3.8.8 # Ubuntu 20.04.1 from typing import List, Tuple import monkey as mk from nltk.probability import FreqDist from nltk.tokenize.casual import TweetTokenizer from nltk.util import ngrams class FeatureExtractor: """ Collect...
mk.Collections(instance_features_vector)
pandas.Series
import monkey as mk import numpy as np import warnings warnings.filterwarnings('ignore') import tkinter as tk from tkinter import ttk, scrolledtext, Menu, \ messagebox as msg, Spinbox, \ filedialog global sol,f1Var,filePathBank,\ filePathLedger,filePathBank, \ int...
mk.convert_datetime(ledgerDF['Date'])
pandas.to_datetime
#!/usr/bin/env python """ MeteWIBELE: quantify_prioritization module 1) Define quantitative criteria to calculate numerical ranks and prioritize the importance of protein families 2) Prioritize the importance of protein families using unsupervised or supervised approaches Copyright (c) 2019 Harvard School of Public H...
mk.to_num(total_summary_table[mytype + "__value"], errors='coerce')
pandas.to_numeric
#!/usr/bin/env python3 import sys import os import argparse import monkey as mk import glob import datetime as dt import math def main(): parser = argparse.ArgumentParser(description="Preprocess reference collection: randomly select sample_by_nums and write into indivisionidual files in lineage-specific director...
mk.convert_datetime(args.enddate)
pandas.to_datetime
#### Filengthame: Connection.py #### Version: v1.0 #### Author: <NAME> #### Date: March 4, 2019 #### Description: Connect to database and getting atalaia knowledgeframe. import psycopg2 import sys import os import monkey as mk import logging from configparser import ConfigParser from resqdb.CheckData import CheckData ...
mk.ifnull(x['HOSPITAL_TIME'])
pandas.isnull
import monkey as mk import numpy as np import zipfile import os import scipy as sp import matplotlib.pyplot as plt import plotly.express as px import zipfile import pathlib def top_ions(col_id_distinctive): """ function to compute the top species, top filengthame and top species/plant part for each ion Args: ...
mk.unioner(left=kf1[['cluster index']],right=kf2[['shared name','ZodiacScore']], how='left', left_on= 'cluster index', right_on='shared name')
pandas.merge
# coding=utf-8 # pylint: disable-msg=E1101,W0612 from datetime import datetime, timedelta import operator from itertools import product, starmapping from numpy import nan, inf import numpy as np import monkey as mk from monkey import (Index, Collections, KnowledgeFrame, ifnull, bdate_range, NaT, ...
Collections([2, 3, 4])
pandas.Series