code stringlengths 51 1.04M |
|---|
#!/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 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... |
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... |
# 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 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
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... |
#!/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... |
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... |
# %% [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):
... |
#!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 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... |
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... |
"""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... |
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[... |
# -*- 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... |
# -*- coding: utf-8 -*-
#
# 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 (t... |
from typing import Union, Iterable, List
import numpy as np
import monkey as mk
from ..models._transformer import _ArrayTransformer, _MultiArrayTransformer
class _KnowledgeFrameTransformer(_ArrayTransformer):
'''`_ArrayTransformer` wrapper for `monkey.KnowledgeFrame`.
'''
def __init__(self):
su... |
#!/usr/bin/env python
# coding: utf-8
# In[ ]:
import pysam
import os
import monkey as mk
import numpy as np
import time
import argparse
import sys
from multiprocessing import Pool
# In[ ]:
# ##arguments for testing
# bam_file_path = '/fh/scratch/delete90/ha_g/realigned_bams/cfDNA_MBC_ULP_hg38/realign_bam_pa... |
"""
Contains functions to generate and combine a clustering ensemble.
"""
import numpy as np
import monkey as mk
from sklearn.metrics import pairwise_distances
from sklearn.metrics import adjusted_rand_score as ari
from sklearn.metrics import adjusted_mutual_info_score as ami
from sklearn.metrics import normalized_mutu... |
import json
import logging
import joblib
import monkey as mk
from flask import Flask, jsonify, request
from flask_cors import CORS, cross_origin
app = Flask(__name__)
CORS(app)
@app.route("/api/machinePrediction", methods=['GET'])
def home():
incogetting_mingMachineId = request.args.getting('machineId')
mode... |
import itertools
import numpy as np
import monkey as mk
def find_intersts(formula_lists,group_labels,exclusive = True):
"""
Docstring for function pyKrev.find_intersts
====================
This function compares n lists of molecular formula and outputs a dictionary containing the intersts between each l... |
import os
import math
import time
import geohash
import geojson
from geojson import MultiLineString
from shapely import geometry
import shapefile
import numpy
import datetime as dt
import monkey as mk
import logging
logger = logging.gettingLogger(__name__)
source_shape_file_path = "C:/temp/2018/"
threshold = 60*60
col... |
# This is the code to train the xgboost model with cross-validation for each distinctive room in the dataset.
# Models are dumped into ./models and results are dumped into two csv files in the current work directory.
import argparse
import json
import math
import os
import pickle
import warnings
from typing import Tup... |
import dash_core_components as dcc
import dash_html_components as html
import plotly.graph_objs as go
import plotly.express as px
from plotly.subplots import make_subplots
import monkey as mk
import math
from datetime import datetime, time
from utils import MONTH_NAMES, month_range
def section(title, content, gray=Fa... |
#!/usr/bin/env python
import os
import numpy as np
import monkey as mk
os.gettingcwd()
# Request for the filengthame
# Current version of this script works only with TSV type files
mainFilengthame = input('Input your file name (diabetes.tab.txt or housing.data.txt): ')
print()
# To create proper knowledgeframe, tra... |
import numpy as np
from sklearn.utils.multiclass import type_of_targetting
from getting_mindware.base_estimator import BaseEstimator
from getting_mindware.components.utils.constants import type_dict, MULTILABEL_CLS, IMG_CLS, TEXT_CLS, OBJECT_DET
from getting_mindware.components.feature_engineering.transformatingion_gra... |
import random
import argparse
import numpy as np
import monkey as mk
import os
import time
import string
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.utils.data import DataLoader
from tqdm import tqdm
from model import WideResnet
from cifar import getting_train_loader, getting_val_load... |
import monkey as mk
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
data = mk.read_csv("data.csv")
data.info()
"""
Data columns (total 33 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 id 569 no... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Functions used for data handling
"""
__author__ = "<NAME>, GIScience Research Group, Heidelberg University"
__email__ = "<EMAIL>"
import os
import yaml
from shapely.geometry import box
import numpy as np
import monkey as mk
import geomonkey as gmk
import json
from nb_... |
from __future__ import annotations
from typing import Optional, Dict, List, Union, Type, TYPE_CHECKING
from datetime import date, datetime
import monkey as mk
import numpy as np
import re
import locale
try:
locale.setlocale(locale.LC_ALL, "en_US.UTF-8")
except locale.Error:
# Readthedocs has a problem, but dif... |
import monkey as mk
import numpy as np
import matplotlib.pyplot as plt
def visualize(knowledgeframe, btotal_alltype):
kf = knowledgeframe
#Filter by btotal_alltype
res = kf[kf["pitch_type"] == btotal_alltype]
#Group by results
groups = res.grouper("description")
for name, group in... |
import torch
import torch.nn.functional as F
import monkey as mk
import numpy as np
from torch_geometric.data import Data
from torch_geometric.nn import GCNConv, PairNorm
from torch_geometric.utils.undirected import to_undirected
import random
import matplotlib.pyplot as plt
data_name = 'citeseer' # 'cora' or 'ci... |
"""
Author: <NAME>
"""
import numpy as np
import monkey as mk
from datetime import datetime
class TrackerFeeder(object):
"""
Feeder for the trackers of the FinanceHub database.
"""
def __init__(self, db_connect):
"""
Feeder construction
:param db_connect: sql connection engin... |
# -*- coding: utf-8 -*-
import time
from datetime import datetime
import warnings
from textwrap import dedent, fill
import numpy as np
import monkey as mk
from numpy.linalg import norm, inv
from scipy.linalg import solve as spsolve, LinAlgError
from scipy.integrate import trapz
from scipy import stats
from lifelines.... |
"""
This module provides helper functions to support exercises during AM1
with outliers, robust regression and template regression in the CORE
data analytics workshop collections, week 4.
"""
import numpy as np
import monkey as mk
import math
from collections import namedtuple
def recovery_sulphur_knowledg... |
from __future__ import annotations
from clone import deepclone
from dataclasses import dataclass, field
from typing import List, Iterator, TypeVar, Union, Any, Generic
import monkey as mk
from monkey.core.indexing import _LocIndexer
from reamber.base.Map import Map
from reamber.base.Property import stack_props
Note... |
def us_choropleth(t):
import matplotlib.cm
from matplotlib.patches import Polygon
from matplotlib.collections import PatchCollection
from matplotlib.colors import Normalize
import shapefile
import matplotlib.pyplot as plt
from mpl_toolkits.basemapping import Basemapping
import numpy as n... |
# Imports
import numpy as np
import monkey as mk
import sys
import tqdm
import warnings
import time
import ternary
from ternary.helpers import simplex_iterator
import multiprocessing as mp
warnings.simplefilter("ignore")
if sys.platform == "darwin":
sys.path.adding("/Users/aymericvie/Documents/GitHub/evology/evol... |
import sbol2
import monkey as mk
import os
import logging
from openpyxl import load_workbook
from openpyxl.worksheet.table import Table, TableStyleInfo
from openpyxl.utils.knowledgeframe import knowledgeframe_to_rows
from openpyxl.styles import Font, PatternFill, Border, Side
from requests_html import HTMLSession
#was... |
# Copyright (c) 2018, deepakn94. 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 applicable law... |
# This Python 3 environment comes with mwhatever helpful analytics libraries insttotal_alled
# It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python
# For example, here's several helpful packages to load
import numpy as np # linear algebra
import monkey as mk # data processing, CSV fi... |
"""CoinGecko model"""
__docformating__ = "numpy"
# pylint: disable=C0301, E1101
import logging
import re
from typing import Any, List
import numpy as np
import monkey as mk
from pycoingecko import CoinGeckoAPI
from gamestonk_tergetting_minal.cryptocurrency.knowledgeframe_helpers import (
create_kf_index,
lo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.