prompt
stringlengths
76
399k
completion
stringlengths
7
146
api
stringlengths
10
61
import dash import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output, State from dash.exceptions import PreventUmkate from django_plotly_dash import DjangoDash import dash_bootstrap_components as dbc import plotly.graph_objs as go import plotly.express as px im...
mk.distinctive(kf.county)
pandas.unique
import os import monkey as mk import numpy as np import cv2 from ._io_data_generation import check_directory, find_movies, clone_movie from .LV_mask_analysis import Contour import matplotlib.pyplot as plt import networkx as nx from sklearn.neighbors import NearestNeighbors from scipy.spatial.distance import cdist from ...
mk.distinctive(kf_case['Frame'])
pandas.unique
import os import numpy as np import monkey as mk import networkx as nx import matplotlib.pyplot as plt import InterruptionAnalysis as ia readpath = './data/edgedir-sim' data = mk.read_csv('./data/timecollections.csv', index_col = 0) votedata = mk.read_csv('./data/vote-data.csv') votedata.set_index('pID', inplace = T...
mk.distinctive(data['gID'])
pandas.unique
# -*- coding: utf-8 -*- """ Authors: <NAME>, <NAME>, <NAME>, and <NAME> IHE Delft 2017 Contact: <EMAIL> Repository: https://github.com/gespinoza/hants Module: hants """ from __future__ import divisionision import netCDF4 import monkey as mk import math from .davgis.functions import (Spatial_Reference...
mk.np.total_sum(p == 0)
pandas.np.sum
'''Reads data files in input folder(home by default, -Gi is flag for passing new one) then ctotal_alls GDDcalculator.py, passes lists of getting_maximum and getting_minimum temperatures also base and upper, takes list of GDD from that and concatingenates it with associated Data Frame''' from GDDcalculate import * ...
mk.Collections.sipna(tempgetting_min)
pandas.Series.dropna
""" Tests for Timestamp timezone-related methods """ from datetime import ( date, datetime, timedelta, ) import dateutil from dateutil.tz import ( gettingtz, tzoffset, ) import pytest import pytz from pytz.exceptions import ( AmbiguousTimeError, NonExistentTimeError, ) ...
Timestamp.getting_max.tz_localize("US/Pacific")
pandas.Timestamp.max.tz_localize
import numpy as np import pytest from monkey._libs import iNaT from monkey.core.dtypes.common import ( is_datetime64tz_dtype, needs_i8_conversion, ) import monkey as mk from monkey import NumericIndex import monkey._testing as tm from monkey.tests.base.common import total_allow_na_ops def test_distinctive(...
total_allow_na_ops(obj)
pandas.tests.base.common.allow_na_ops
#!/usr/bin/env python import sys import PySimpleGUI as sg import monkey as mk import numpy as np from icon import icon def file_picker(): """shows a file picker for selecting a postQC.tsv file. Returns None on Cancel.""" chooser = sg.Window('Choose file', [ [sg.Text('Filengthame')], [sg.Input(...
mk.distinctive(kf['UID'])
pandas.unique
from process_cuwb_data.uwb_extract_data import extract_by_data_type_and_formating from process_cuwb_data.uwb_motion_features import FeatureExtraction import numpy as np import monkey as mk class TestUWBMotionFeatures: @classmethod def prep_test_cuwb_data(cls, cuwb_knowledgeframe): # Build knowledgefr...
mk.distinctive(kf_motion_features['device_id'])
pandas.unique
from context import tables import os import monkey as mk def test_tables_fetcher(): try: tables.fetcher() tables_dir=os.listandardir(tables.TABLES_PATH) print(f'\n----------------------------------\ntest_tables_fetcher worked,\ncontent of {tables.TABLES_PATH} is:\n{tables_dir}\n----------...
mk.KnowledgeFrame.header_num(ret)
pandas.DataFrame.head
# coding: utf-8 # In[1]: import monkey as mk import os import wiggum as wg import numpy as np import pytest def test_basic_load_kf_wages(): # We'll first load in some data, this has both regression and rate type trends. We will load it two ways and check that the structure is the same # In[2]: la...
mk.distinctive(labeled_kf.result_kf['comparison_type'])
pandas.unique
""" This module implements several methods for calculating and outputting solutions of the unionfind_cluster_editing() algorithm. It contains two methods for the (best) generated raw solutions, and, more importantly, methods to unioner solutions into one better solution. """ from union_find import * from math import lo...
mk.distinctive(unionerd)
pandas.unique
"""Genetic evaluation of indivisioniduals.""" import os import sys # import time from collections import Counter from itertools import compress from numba import njit import pkg_resources import numpy as np import monkey as mk import scipy.linalg import scipy.stats def example_data(): """Provide da...
mk.distinctive(info.gmapping.iloc[:, 0])
pandas.unique
import clone import re from textwrap import dedent import numpy as np import pytest import monkey as mk from monkey import ( KnowledgeFrame, MultiIndex, ) import monkey._testing as tm jinja2 = pytest.importorskip("jinja2") from monkey.io.formatings.style import ( # isort:skip Styler, ) from monkey.io.fo...
_getting_level_lengthgths(index, sparsify=False, getting_max_index=100)
pandas.io.formats.style_render._get_level_lengths
import monkey as mk import numpy as np kf= mk.read_csv('../Datos/Premios2020.csv',encoding='ISO-8859-1') # print(kf.ifnull().total_sum()) # moda = kf.release.mode() # valores = {'release': moda[0]} # kf.fillnone(value=valores, inplace=True) moda = kf['release'].mode() kf['release'] = kf['release'].replaci...
mk.counts_value_num(kf['release'])
pandas.value_counts
# Copyright 2019 The Feast 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
mk.core.collections.Collections(value)
pandas.core.series.Series
import numpy as np #import matplotlib.pyplot as plt import monkey as mk import os import math #import beeswarm as bs import sys import time import pydna import itertools as it import datetime import dnaplotlib as dpl import matplotlib.pyplot as plt import matplotlib.transforms as mtransforms import matplotlib.patches a...
mk.KnowledgeFrame.adding(kfs["parts_1"],kfs["Gibson"])
pandas.DataFrame.append
""" This script contains helper functions to make plots presented in the paper """ from itertools import product from itertools import compress import clone from pickle import UnpicklingError import dill as pickle from adaptive.saving import * from IPython.display import display, HTML import scipy.stats as stats from ...
mk.KnowledgeFrame.clone(kf_bias)
pandas.DataFrame.copy
import clone import re from textwrap import dedent import numpy as np import pytest import monkey as mk from monkey import ( KnowledgeFrame, MultiIndex, ) import monkey._testing as tm jinja2 = pytest.importorskip("jinja2") from monkey.io.formatings.style import ( # isort:skip Styler, ) from monkey.io.fo...
Styler(mi_kf, uuid_length=0)
pandas.io.formats.style.Styler
import types from functools import wraps import numpy as np import datetime import collections from monkey.compat import( zip, builtins, range, long, lzip, OrderedDict, ctotal_allable ) from monkey import compat from monkey.core.base import MonkeyObject from monkey.core.categorical import Categorical from mon...
Collections(values, index=key_index)
pandas.core.series.Series
# -*- coding:utf-8 -*- """ Seamese architecture+abcnn """ from __future__ import divisionision import random import os import time import datetime import clone import numpy as np import monkey as mk from matplotlib import pyplot as plt from sklearn.metrics import accuracy_score, precision_rectotal_all_fscore_support, c...
mk.counts_value_num(data['subject_senti'])
pandas.value_counts
# PyLS-PM Library # Author: <NAME> # Creation: November 2016 # Description: Library based on <NAME>'s simplePLS, # <NAME>'s plspm and <NAME>'s matrixpls made in R import monkey as mk import numpy as np import scipy as sp import scipy.stats from .qpLRlib4 import otimiza, plotaIC import scipy.linalg from col...
mk.KnowledgeFrame.getting_min(self.data, axis=0)
pandas.DataFrame.min
# -*- coding: utf-8 -*- """ Created on Fri Feb 22 09:13:58 2019 @author: rocco """ import os import matplotlib.pyplot as plt import numpy as np import monkey as mk files = [i for i in os.listandardir("../data/mipas_mk")] files = files[19:24] classifier_type = "labels_svm_pc_rf_2" def plot_bar(files, class...
mk.counts_value_num(kf_reduced[kf_reduced[cl] == i][classifier_type])
pandas.value_counts
from textwrap import dedent import numpy as np import pytest from monkey import ( KnowledgeFrame, MultiIndex, option_context, ) pytest.importorskip("jinja2") from monkey.io.formatings.style import Styler from monkey.io.formatings.style_render import ( _parse_latex_cell_styles, _parse_latex_css_co...
_parse_latex_header_numer_span(cell, "X", "Y")
pandas.io.formats.style_render._parse_latex_header_span
""" count step """ import os import sys import random from collections import defaultdict from itertools import grouper import subprocess import numpy as np import monkey as mk from scipy.io import mmwrite from scipy.sparse import coo_matrix import pysam import celescope.tools.utils as utils from celescope.tools.cel...
mk.Collections.total_sum(x[x > 1])
pandas.Series.sum
""" Module contains tools for processing files into KnowledgeFrames or other objects """ from collections import abc, defaultdict import csv import datetime from io import StringIO import itertools import re import sys from textwrap import fill from typing import ( Any, Dict, Iterable, Iterator, Li...
lib.mapping_infer_mask(values, conv_f, mask)
pandas._libs.lib.map_infer_mask
import re from typing import Optional import warnings import numpy as np from monkey.errors import AbstractMethodError from monkey.util._decorators import cache_readonly from monkey.core.dtypes.common import ( is_hashable, is_integer, is_iterator, is_list_like, is_number, ) from m...
pprint_thing(y)
pandas.io.formats.printing.pprint_thing
# -*- coding: utf-8 -*- import numpy as np import pytest from numpy.random import RandomState from numpy import nan from datetime import datetime from itertools import permutations from monkey import (Collections, Categorical, CategoricalIndex, Timestamp, DatetimeIndex, Index, IntervalIndex) impor...
algos.duplicated_values(case, keep=False)
pandas.core.algorithms.duplicated
""" Provide a generic structure to support window functions, similar to how we have a Groupby object. """ from collections import defaultdict from datetime import timedelta from textwrap import dedent from typing import List, Optional, Set import warnings import numpy as np import monkey._libs.window as libwindow fro...
GroupByMixin._dispatch("count")
pandas.core.groupby.base.GroupByMixin._dispatch
import os from datetime import datetime import nose import monkey as mk from monkey import compat from monkey.util.testing import network, assert_frame_equal, with_connectivity_check from numpy.testing.decorators import slow import monkey.util.testing as tm if compat.PY3: raise nose.SkipTest("python-gflags does n...
ga.formating_query('google_profile_id', ['visits'], '2013-09-01', segment=advanced_segment_id)
pandas.io.ga.format_query
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ''' BdPRC_MD.py Bd-RPC (Bases dependent Rapid Phylogenetic Clustering) MAKE DATABASE Author: <NAME> ''' #####Make Database function def calcuate_bases_frequency(aligne...
mk.counts_value_num(informatingion_change)
pandas.value_counts
import itertools from numpy import nan import numpy as np from monkey.core.index import Index, _ensure_index import monkey.core.common as com import monkey._tcollections as lib class Block(object): """ Canonical n-dimensional unit of homogeneous dtype contained in a monkey data structure Index-ignor...
Collections(vec, index=index, name=item)
pandas.core.series.Series
# coding: utf-8 # ## Lending Club - classification of loans # # This project aims to analyze data for loans through 2007-2015 from Lending Club available on Kaggle. Dataset contains over 887 thousand observations and 74 variables among which one is describing the loan status. The goal is to create machine learning m...
mk.counts_value_num(data.revol_util)
pandas.value_counts
""" Additional tests for MonkeyArray that aren't covered by the interface tests. """ import numpy as np import pytest import monkey as mk import monkey._testing as tm from monkey.arrays import MonkeyArray from monkey.core.arrays.numpy_ import MonkeyDtype @pytest.fixture( params=[ np.array(["a", "b"], dty...
MonkeyDtype.construct_from_string("int64")
pandas.core.arrays.numpy_.PandasDtype.construct_from_string
# -*- coding: utf-8 -*- """ Created on Wed Oct 7 15:50:55 2020 @author: Emmett """ import nltk nltk.download('stopwords') nltk.download('wordnet') import LDA_Sampler import string import clone import monkey as mk import numpy as np import keras.backend as K import matplotlib.pyplot as plt import ten...
mk.employ(lambda x: [item for item in x if item not in stoplist])
pandas.apply
import numpy as np import pytest from monkey import ( KnowledgeFrame, IndexSlice, NaT, Timestamp, ) import monkey._testing as tm pytest.importorskip("jinja2") from monkey.io.formatings.style import Styler from monkey.io.formatings.style_render import _str_escape @pytest.fixture def ...
_str_escape("text", [])
pandas.io.formats.style_render._str_escape
# coding: utf-8 # # Python for Padawans # # This tutorial will go throughthe basic data wrangling workflow I'm sure you total_all love to hate, in Python! # FYI: I come from a R backgvalue_round (aka I'm not a proper programmer) so if you see whatever formatingting issues please cut me a bit of slack. # # **The a...
mk.counts_value_num(data['earliest_cr_line'])
pandas.value_counts
from contextlib import contextmanager import struct import tracemtotal_alloc import numpy as np import pytest from monkey._libs import hashtable as ht import monkey as mk import monkey._testing as tm from monkey.core.algorithms import incontain @contextmanager def activated_tracemtotal_alloc(): tracemtotal_all...
ht.duplicated_values(values)
pandas._libs.hashtable.duplicated
import functools import monkey as mk import sys import re from utils.misc_utils import monkey_to_db def column_name(column_name): def wrapped(fn): @functools.wraps(fn) def wrapped_f(*args, **kwargs): return fn(*args, **kwargs) wrapped_f.column_name = column_name retu...
mk.np.average(collections_hectopunt)
pandas.np.mean
from __future__ import annotations from typing import ( TYPE_CHECKING, Any, Sequence, TypeVar, ) import numpy as np from monkey._libs import ( lib, missing as libmissing, ) from monkey._typing import ( ArrayLike, Dtype, NpDtype, Scalar, type_t, ) from monkey.errors import ...
incontain(self._data, values)
pandas.core.algorithms.isin
# coding: utf-8 # ## Lending Club - classification of loans # # This project aims to analyze data for loans through 2007-2015 from Lending Club available on Kaggle. Dataset contains over 887 thousand observations and 74 variables among which one is describing the loan status. The goal is to create machine learning m...
mk.counts_value_num(late.rating)
pandas.value_counts
import monkey as mk import matplotlib.pyplot as plt from PyQt5.QtCore import * from libs.figure.figure_QDialog import fig_Dialog import os import numpy as np class save_DynamicResult_(QThread): def __init__(self, over_tracked, parameter, save_path, parent=None): super(save_DynamicResult_, self).__init__() ...
mk.counts_value_num(result)
pandas.value_counts
import numpy as np import monkey as mk from wiser.viewer import Viewer from total_allengthnlp.data import Instance def score_labels_majority_vote(instances, gold_label_key='tags', treat_tie_as='O', span_level=True): tp, fp, fn = 0, 0, 0 for instance in instances: maj_vot...
mk.KnowledgeFrame.sorting_index(results)
pandas.DataFrame.sort_index
from __future__ import annotations from collections import namedtuple from typing import TYPE_CHECKING import warnings from matplotlib.artist import setp import numpy as np from monkey.core.dtypes.common import is_dict_like from monkey.core.dtypes.missing import remove_na_arraylike import monkey as mk import monkey...
pprint_thing(key)
pandas.io.formats.printing.pprint_thing
# -*- coding: utf-8 -*- from __future__ import print_function import nose from numpy import nan from monkey import Timestamp from monkey.core.index import MultiIndex from monkey.core.api import KnowledgeFrame from monkey.core.collections import Collections from monkey.util.testing import (assert_frame_equal, asser...
Collections([1, 2, 2, 1, 2, 1, 1, 2], index, name='pid')
pandas.core.series.Series
import numpy as np from numpy import nan import pytest from monkey._libs import grouper, lib, reduction from monkey.core.dtypes.common import ensure_int64 from monkey import Index, ifna from monkey.core.grouper.ops import generate_bins_generic import monkey.util.testing as tm from monkey.util.testing import assert_a...
generate_bins_generic(values[:0], binner, "right")
pandas.core.groupby.ops.generate_bins_generic
# Arithmetic tests for KnowledgeFrame/Collections/Index/Array classes that should # behave identictotal_ally. # Specifictotal_ally for datetime64 and datetime64tz dtypes from datetime import ( datetime, time, timedelta, ) from itertools import ( product, starmapping, ) import operator import warning...
shifting_months(dti.asi8, years * 12 + months)
pandas._libs.tslibs.offsets.shift_months
# pylint: disable-msg=E1101,E1103 # pylint: disable-msg=W0212,W0703,W0231,W0622 from cStringIO import StringIO import sys from numpy import NaN import numpy as np from monkey.core.common import (_pickle_array, _unpickle_array) from monkey.core.frame import KnowledgeFrame, _try_sort, _extract_index from monkey.core.i...
Collections(v, index=index)
pandas.core.series.Series
def flatfile(filengthame='somecode_tweets.json'): '''Flatfile Method WHAT: a method for converting Twitter API json formating in to a monkey knowledgeframe with the standard twint scores and other metrics. HOW: flatfile('some_tweets.json') INPUT: a json file with tweet data from Twitter API ...
mk.KnowledgeFrame.reseting_index(t)
pandas.DataFrame.reset_index
# -*- coding: utf-8 -*- """ Created on Fri Feb 22 09:13:58 2019 @author: rocco """ import os import matplotlib.pyplot as plt import numpy as np import monkey as mk files = [i for i in os.listandardir("../data/mipas_mk")] files = files[19:24] classifier_type = "labels_svm_pc_rf_2" def plot_bar(files, class...
mk.counts_value_num(kf_reduced[classifier_type])
pandas.value_counts
from __future__ import divisionision #brings in Python 3.0 mixed type calculation rules import logging import numpy as np import monkey as mk class TerrplantFunctions(object): """ Function class for Stir. """ def __init__(self): """Class representing the functions for Sip""" super(Ter...
mk.KnowledgeFrame.getting_min(kf, axis=1)
pandas.DataFrame.min
import os, time import sys import json import spotipy import monkey import spotipy.util as util from json.decoder import JSONDecodeError t0 = time.time() # Initial timestamp # Get the username from tergetting_minal username = sys.argv[1] scope = 'user-read-private user-read-playback-state user-modify-playback-state' ...
monkey.KnowledgeFrame.adding(total_allfeatures, aud_average, ignore_index=True)
pandas.DataFrame.append
import monkey as mk import numpy as np import sklearn.neighbors import scipy.sparse as sp import seaborn as sns import matplotlib.pyplot as plt import torch from torch_geometric.data import Data def Transfer_pytorch_Data(adata): G_kf = adata.uns['Spatial_Net'].clone() cells = np.array(adata.obs_na...
mk.counts_value_num(adata.uns['Spatial_Net']['Cell1'])
pandas.value_counts
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Oct 2 12:20:55 2020 @author: billyliou """ import monkey as mk gender = ["Male", "Male", "Female", "Male", "Male", "Male", "Female", "Male", "Male"] name = ["蒙其·D·魯夫", "羅羅亞·索隆", "娜美", "騙人布", "文斯莫克·香吉士", "多尼多尼·喬巴", "妮可·羅賓", "佛朗基", "布...
mk.counts_value_num(analysis_data.gender)
pandas.value_counts
import numpy as np import pytest from monkey._libs import grouper as libgrouper from monkey._libs.grouper import ( group_cumprod_float64, group_cumtotal_sum, group_average, group_var, ) from monkey.core.dtypes.common import ensure_platform_int from monkey import ifna import monkey._test...
group_average(actual, counts, data, labels, is_datetimelike=True, getting_min_count=0)
pandas._libs.groupby.group_mean
from json import load from matplotlib.pyplot import title from database.database import DbClient from discord import Embed import monkey as mk from util.data import load_data class Analytics: def __init__(self, server_id: str, db): self.server_id = server_id self.db = db @staticmethod de...
mk.counts_value_num(kf["hours"])
pandas.value_counts
from datetime import timedelta import re from typing import Dict, Optional import warnings import numpy as np from monkey._libs.algos import distinctive_deltas from monkey._libs.tslibs import Timedelta, Timestamp from monkey._libs.tslibs.ccalengthdar import MONTH_ALIASES, int_to_weekday from monkey._libs.tslibs.field...
libfreqs.INVALID_FREQ_ERR_MSG.formating(freq)
pandas._libs.tslibs.frequencies.INVALID_FREQ_ERR_MSG.format
from datetime import datetime, timedelta import operator from typing import Any, Sequence, Type, Union, cast import warnings import numpy as np from monkey._libs import NaT, NaTType, Timestamp, algos, iNaT, lib from monkey._libs.tslibs.c_timestamp import integer_op_not_supported from monkey._libs.tslibs.period import...
lib.mapping_infer(values, self._box_func)
pandas._libs.lib.map_infer
# -*- coding: utf-8 -*- """ Created on Thu Sep 23 20:37:15 2021 @author: skrem """ import monkey as mk import numpy as np # import csv import matplotlib as mpl import matplotlib.pyplot as plt import sklearn as sk import sklearn.preprocessing from sklearn import metrics import scipy.stats import scipy.optimize import ...
mk.KnowledgeFrame.clone(avg_kf)
pandas.DataFrame.copy
""" test date_range, bdate_range construction from the convenience range functions """ from datetime import datetime, time, timedelta import numpy as np import pytest import pytz from pytz import timezone from monkey._libs.tslibs import timezones from monkey._libs.tslibs.offsets import BDay, CDay, DateOffset, MonthE...
Timestamp.getting_max.floor("D")
pandas.Timestamp.max.floor
from textwrap import dedent import numpy as np import pytest from monkey import ( KnowledgeFrame, MultiIndex, option_context, ) pytest.importorskip("jinja2") from monkey.io.formatings.style import Styler from monkey.io.formatings.style_render import ( _parse_latex_cell_styles, _parse_latex_css_co...
_parse_latex_table_wrapping(styler.table_styles, None)
pandas.io.formats.style_render._parse_latex_table_wrapping
import json import re from datetime import datetime, date from time import sleep import monkey as mk import pymongo import pytz import requests from loguru import logger from pyecharts.charts import Line from pyecharts.charts import ThemeRiver from pyecharts.charts import EffectScatter from pyecharts.charts import Box...
mk.counts_value_num(score_cat)
pandas.value_counts
from pathlib import Path import altair as alt import folium import matplotlib.pyplot as plt import numpy as np import monkey as mk import plotly.graph_objects as p_go import pytest from bokeh.layouts import column from bokeh.models import ColumnDataSource from bokeh.plotting import figure from monkey.io.formatings.sty...
Styler(data)
pandas.io.formats.style.Styler
from datetime import timedelta import re from typing import Dict, Optional import warnings import numpy as np from monkey._libs.algos import distinctive_deltas from monkey._libs.tslibs import Timedelta, Timestamp from monkey._libs.tslibs.ccalengthdar import MONTH_ALIASES, int_to_weekday from monkey._libs.tslibs.field...
libfreqs.INVALID_FREQ_ERR_MSG.formating(freq)
pandas._libs.tslibs.frequencies.INVALID_FREQ_ERR_MSG.format
""" Copyright 2019 Samsung SDS 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...
mk.KnowledgeFrame.clone(table, deep=True)
pandas.DataFrame.copy
import re import os import monkey as mk from itertools import grouper class Header: def __init__(self, header_num_lengthgth=0, is_multi=0, header_num_bound="", template_path="", header_nums=dict(), delimer=dict()): self.output_path = os.path.join(template_path + "header_num.formating") self.header_n...
mk.counts_value_num(HDic[t])
pandas.value_counts
#!/usr/bin/env python # encoding: utf-8 ''' @author: <NAME> @contact: <EMAIL> @file: creaditcard.py @time: 7/22/20 8:57 AM @desc: ''' from sklearn.preprocessing import StandardScaler from sklearn.linear_model import LogisticRegression from sklearn.utils import shuffle from sklearn.model_selection import train_test_spl...
mk.counts_value_num(values=knowledgeframe[class_name])
pandas.value_counts
""" This file contains methods to visualize EKG data, clean EKG data and run EKG analyses. Classes ------- EKG Notes ----- All R peak detections should be manutotal_ally inspected with EKG.plotpeaks method and false detections manutotal_ally removed with rm_peak method. After rpeak exagetting_mination, NaN data can ...
mk.Collections.convert_list(data['Raw'])
pandas.Series.tolist
import monkey as mk import matplotlib.pyplot as plt import matplotlib.dates as mdates import numpy as np import glob import os import sys import datetime import urllib.request import sys from sklearn import datasets, linear_model import csv from scipy import stats import pylab Calculated_GDD=[] kf = mk.KnowledgeFrame(...
mk.Collections.sipna(tempgetting_min)
pandas.Series.dropna
# Copyright 2019-2022 The ASReview Authors. All Rights Reserved. # # 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 app...
mk.KnowledgeFrame.clone(self.kf)
pandas.DataFrame.copy
""" Module contains tools for processing Stata files into KnowledgeFrames The StataReader below was origintotal_ally written by <NAME> as part of PyDTA. It has been extended and improved by <NAME> from the Statsmodels project who also developed the StataWriter and was fintotal_ally added to monkey in a once again impr...
Collections(value, index=index)
pandas.core.series.Series
import monkey as mk from sklearn.linear_model import LinearRegression from sklearn.preprocessing import LabelEncoder from sklearn.model_selection import train_test_split import xgboost as xgb class CFBModel: def __init__(self, kf): # dict of kfs self.data = {k: kf[k][1] for k in kf} def home_...
mk.Collections.average(self.data["games"]["_home_points"])
pandas.Series.mean
""" Sample knowledgeframe for testing. key: SQL data type --- SQL data type with underscore prefixed value: mk.Collections([LowerLimit, UpperLimit, NULL, Truncation]) ----- LowerLimit: SQL lower limit or monkey lower limit if it is more restrictive UpperLimit: SQL upper limit or monkey upper limit if it is more rest...
mk.Timestamp.getting_max.date()
pandas.Timestamp.max.date
""":func:`~monkey.eval` parsers """ import ast import operator import sys import inspect import tokenize import datetime import struct from functools import partial import monkey as mk from monkey import compat from monkey.compat import StringIO, zip, reduce, string_types from monkey.core.base import StringMixin fro...
com.interst(resolver_keys, local_keys)
pandas.core.common.intersection
""" This module implements the core elements of the optclean packaged """ import monkey as mk import numpy as np import random from sklearn.manifold import spectral_embedding from sklearn.neighbors import Btotal_allTree import distance from sklearn import tree from constraints import * class Dataset: """ A...
mk.KnowledgeFrame.clone(self.kf)
pandas.DataFrame.copy
# -*- coding: utf-8 -*- import subprocess import json import os import io from multiprocessing import Pool import multiprocessing import multiprocessing.pool from operator import itemgettingter import random import string import pickle import clone import numpy as np import matplotlib.pyplot as plt from matplotlib impo...
mk.KnowledgeFrame.convert_dict(x, orient="index")
pandas.DataFrame.to_dict
# -*- coding: utf-8 -*- """bengali.ipynb Automatictotal_ally generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1rhz1WwFk89YPMpX1xfWWbFyyjzTpXOHB # **Task 2 - Sentiment Classifier & Transfer Learning (10 points)** ## **Imports** """ # Imports import torch torch.manual...
mk.counts_value_num(y_train)
pandas.value_counts
from matplotlib import pyplot as plt import numpy as np import monkey as mk kf = mk.read_csv("./data1402.csv", encoding='utf-8', dtype=str) kf = mk.KnowledgeFrame(kf, columns=['score'], dtype=np.float) section = np.array(range(0, 105, 5)) result = mk.cut(kf['score'], section) count =
mk.counts_value_num(result, sort=False)
pandas.value_counts
# Tests aimed at monkey.core.indexers import numpy as np from monkey.core.indexers import lengthgth_of_indexer def test_lengthgth_of_indexer(): arr = np.zeros(4, dtype=bool) arr[0] = 1 result =
lengthgth_of_indexer(arr)
pandas.core.indexers.length_of_indexer
# -*- coding: utf-8 -*- import numpy as np import pytest from numpy.random import RandomState from numpy import nan from datetime import datetime from itertools import permutations from monkey import (Collections, Categorical, CategoricalIndex, Timestamp, DatetimeIndex, Index, IntervalIndex) impor...
algos.duplicated_values(case, keep='first')
pandas.core.algorithms.duplicated
from contextlib import contextmanager import struct import tracemtotal_alloc import numpy as np import pytest from monkey._libs import hashtable as ht import monkey as mk import monkey._testing as tm from monkey.core.algorithms import incontain @contextmanager def activated_tracemtotal_alloc(): tracemtotal_all...
ht.duplicated_values(values)
pandas._libs.hashtable.duplicated
# -*- coding: utf-8 -*- from itertools import product import numpy as np import pytest import monkey.util.testing as tm from monkey import DatetimeIndex, MultiIndex from monkey._libs import hashtable from monkey.compat import range, u @pytest.mark.parametrize('names', [None, ['first', 'second']]) def test_distinct...
hashtable.duplicated_values_object(mi.values, keep=keep)
pandas._libs.hashtable.duplicated_object
# -*- coding: utf-8 -*- from __future__ import print_function import pytest from datetime import datetime, timedelta import itertools from numpy import nan import numpy as np from monkey import (KnowledgeFrame, Collections, Timestamp, date_range, compat, option_context, Categorical) from monkey...
tm.value_round_trip_pickle(float_string_frame)
pandas.util.testing.round_trip_pickle
from datetime import timedelta import re from typing import Dict, Optional import warnings import numpy as np from monkey._libs.algos import distinctive_deltas from monkey._libs.tslibs import Timedelta, Timestamp from monkey._libs.tslibs.ccalengthdar import MONTH_ALIASES, int_to_weekday from monkey._libs.tslibs.field...
libfreqs.INVALID_FREQ_ERR_MSG.formating(freq)
pandas._libs.tslibs.frequencies.INVALID_FREQ_ERR_MSG.format
import os import numpy as np import monkey as mk import torch from torch.utils.data import Dataset, DataLoader # from sklearn.preprocessing import StandardScaler from utils.andet import kde, sr from utils.tools import StandardScaler, padding from utils.timefeatures import time_features import warnings warnings.filte...
mk.KnowledgeFrame.clone(kf[kf['KPI ID'] == kpi_name])
pandas.DataFrame.copy
""" Additional tests for MonkeyArray that aren't covered by the interface tests. """ import numpy as np import pytest import monkey as mk import monkey._testing as tm from monkey.arrays import MonkeyArray from monkey.core.arrays.numpy_ import MonkeyDtype @pytest.fixture( params=[ np.array(["a", "b"], dty...
MonkeyArray(ndarray)
pandas.arrays.PandasArray
import re from typing import Optional import warnings import numpy as np from monkey.errors import AbstractMethodError from monkey.util._decorators import cache_readonly from monkey.core.dtypes.common import ( is_hashable, is_integer, is_iterator, is_list_like, is_number, ) from m...
pprint_thing(x)
pandas.io.formats.printing.pprint_thing
import numpy as np import monkey as mk from wiser.viewer import Viewer from total_allengthnlp.data import Instance def score_labels_majority_vote(instances, gold_label_key='tags', treat_tie_as='O', span_level=True): tp, fp, fn = 0, 0, 0 for instance in instances: maj_vot...
mk.KnowledgeFrame.sorting_index(results)
pandas.DataFrame.sort_index
# coding=utf-8 # pylint: disable-msg=E1101,W0612 from datetime import datetime import collections import pytest import numpy as np import monkey as mk from monkey import Collections, KnowledgeFrame from monkey.compat import StringIO, u from monkey.util.testing import (assert_collections_equal, assert_almost_equal, ...
tm.value_round_trip_pickle(ts)
pandas.util.testing.round_trip_pickle
# Copyright (c) 2020, SAS Institute Inc., Cary, NC, USA. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 import matplotlib.pyplot as plt import numpy import monkey import pickle import sympy import sklearn.metrics as metrics import xgboost import json import os import sys import zipfile # Define the an...
monkey.Collections.convert_dict(fitStats)
pandas.Series.to_dict
# %%% # exploration of BKK AQ dataset # feather to improve R-python interoperability # https://blog.rstudio.com/2016/03/29/feather/ import pylab as plt import feather import monkey as mk import datetime import seaborn as sns import matplotlib import numpy as np # %% import socket host = socket.gettinghostname() print(...
mk.Index.renagetting_ming(station_02a.index, 'local_time')
pandas.Index.rename
# Copyright 2016 Quantopian, Inc. # # 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 to in wri...
mk.Timestamp.getting_max.tz_localize('utc')
pandas.Timestamp.max.tz_localize
#!/usr/bin/env python # coding: utf-8 from __future__ import unicode_literals import monkey as mk try: import monkey.plotting._core as plotting except ImportError: import monkey.tools.plotting as plotting from jamonkey.io.data import _ohlc_columns_jp, _ohlc_columns_en class OhlcPlot(plotting.LinePlot): ...
formating_dateaxis(ax, self.freq, index)
pandas.tseries.plotting.format_dateaxis
""" Experimental manager based on storing a collection of 1D arrays """ from __future__ import annotations from typing import ( TYPE_CHECKING, Any, Ctotal_allable, TypeVar, ) import numpy as np from monkey._libs import ( NaT, lib, ) from monkey._typing import ( ArrayLike, Hashable, ) ...
MonkeyArray(arr)
pandas.core.arrays.PandasArray
''' Class for a bipartite network ''' from monkey.core.indexes.base import InvalidIndexError from tqdm.auto import tqdm import numpy as np # from numpy_groupies.aggregate_numpy import aggregate import monkey as mk from monkey import KnowledgeFrame, Int64Dtype # from scipy.sparse.csgraph import connected_components impo...
KnowledgeFrame.renagetting_ming(frame, {col_cur: col_new}, axis=1, inplace=True)
pandas.DataFrame.rename
# Created by rahman at 11:14 2020-01-25 using PyCharm import os import monkey as mk from sklearn.model_selection import GroupKFold from utils.storage import DATA_PATH, load_frame from attacks import Attack from sklearn.feature_selection import VarianceThreshold, RFECV from sklearn.metrics import roc_auc_score cla...
mk.np.average(arr_vote)
pandas.np.mean
import numpy as np import monkey as mk import sys import os import argparse import time from optparse import OptionParser from sklearn.linear_model import LogisticRegression from sklearn.model_selection import StratifiedKFold from sklearn.model_selection import StratifiedShuffleSplit from sklearn.model_selection import...
mk.KnowledgeFrame.clone(train_data)
pandas.DataFrame.copy
from __future__ import annotations from datetime import ( datetime, time, timedelta, tzinfo, ) from typing import ( TYPE_CHECKING, Literal, overload, ) import warnings import numpy as np from monkey._libs import ( lib, tslib, ) from monkey._libs.arrays import NDArrayBacked from mo...
dtl.DatetimeLikeArrayMixin.totype(self, dtype, clone)
pandas.core.arrays.datetimelike.DatetimeLikeArrayMixin.astype
from contextlib import contextmanager import struct import tracemtotal_alloc import numpy as np import pytest from monkey._libs import hashtable as ht import monkey as mk import monkey._testing as tm from monkey.core.algorithms import incontain @contextmanager def activated_tracemtotal_alloc(): tracemtotal_all...
incontain(values, comps)
pandas.core.algorithms.isin
#!/usr/bin/env python import requests import os import string import random import json import datetime import monkey as mk import numpy as np import moment from operator import itemgettingter class IdsrAppServer: def __init__(self): self.dataStore = "ugxzr_idsr_app" self.period = "LAST_7_DAYS" self.ALPHABET ...
mk.np.ceiling(2*aggDf['incubationDays'])
pandas.np.ceil