This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#--#-------- | |
# pystat | |
# A full-featured statistical analysis | |
# and inference module for Python. | |
# Intended to be used alongside the | |
# numarray package, the succesor to | |
# Numeric. | |
# | |
# Author: Michael Bommarito | |
# [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright: Licensio, LLC 2022 | |
# License: AGPL-3.0 | |
import argparse | |
import multiprocessing | |
import os | |
import subprocess | |
import pandas | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import importlib | |
import subprocess | |
import requests | |
if __name__ == "__main__": | |
for library in requests.get("https://licens.io/dynamic_import_example.txt").text.splitlines(): | |
# get name if version provided | |
library_name = library.split("=")[0].strip() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
industry | count | |
---|---|---|
Services-Prepackaged Software | 16 | |
Real Estate Investment Trusts | 11 | |
Services-Business Services, NEC | 7 | |
Services-Computer Programming, Data Processing, Etc. | 6 | |
Pharmaceutical Preparations | 6 | |
Motor Vehicle Parts & Accessories | 6 | |
Semiconductors & Related Devices | 5 | |
Services-Commercial Physical & Biological Research | 4 | |
Services-Computer Programming Services | 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name | industry | count | |
---|---|---|---|
GOODYEAR TIRE & RUBBER CO /OH/ | Tires & Inner Tubes | 18 | |
WATERS CORP /DE/ | Laboratory Analytical Instruments | 17 | |
DIEBOLD NIXDORF, Inc | Calculating & Accounting Machines (No Electronic Computers) | 16 | |
AMPHENOL CORP /DE/ | Electronic Connectors | 15 | |
JABIL INC | Printed Circuit Boards | 15 | |
RPM INTERNATIONAL INC/DE/ | Paints, Varnishes, Lacquers, Enamels & Allied Prods | 14 | |
PARK OHIO HOLDINGS CORP | Metal Forgings & Stampings | 14 | |
NOV Inc. | Oil & Gas Field Machinery & Equipment | 13 | |
SITE Centers Corp. | Real Estate Investment Trusts | 12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
filing_year | Russia | Ukraine | Belarus | |
---|---|---|---|---|
2002 | 0 | 0 | 0 | |
2003 | 3 | 0 | 0 | |
2004 | 3 | 1 | 0 | |
2005 | 7 | 2 | 0 | |
2006 | 8 | 1 | 0 | |
2007 | 13 | 1 | 0 | |
2008 | 16 | 0 | 0 | |
2009 | 36 | 1 | 0 | |
2010 | 40 | 1 | 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# package imports | |
import numpy.random | |
import pandas | |
import sklearn.datasets # scikit-learn==1.0.2 | |
# dp imports | |
import pipeline_dp | |
if __name__ == "__main__": | |
# setup random state |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(gdb) run constant_column.py | |
Starting program: /home/mjbommar/.cache/pypoetry/virtualenvs/pipeline-dp-uBTWvmGw-py3.8/bin/python constant_column.py | |
[Thread debugging using libthread_db enabled] | |
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". | |
[New Thread 0x7ffff464e700 (LWP 51015)] | |
[New Thread 0x7ffff3e4d700 (LWP 51016)] | |
[New Thread 0x7ffff164c700 (LWP 51017)] | |
[New Thread 0x7fffece4b700 (LWP 51018)] | |
[New Thread 0x7fffea64a700 (LWP 51019)] | |
[New Thread 0x7fffe7e49700 (LWP 51020)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% kappa risk measure in pure Matlab | |
% see also: | |
% * https://gist.github.com/mjbommar/320298 | |
% * https://gist.github.com/mjbommar/320296 | |
% D : return series vector | |
% r : return threshold | |
% n : Kappa order | |
function k = kappa(D, r, n) | |
k = (mean(D) - r) ./ nthroot(mean((D < r) .* (r-D).^n), n); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"nbformat_minor": 0, "cells": [{"execution_count": 1, "cell_type": "code", "source": "# Imports\nimport matplotlib.pyplot as plt\nimport numpy\nimport pandas\nimport scipy\nimport sklearn\nimport sklearn.isotonic\nimport sys", "outputs": [], "metadata": {"collapsed": true, "trusted": true}}, {"source": "## Version strings", "cell_type": "markdown", "metadata": {}}, {"execution_count": 2, "cell_type": "code", "source": "print(sys.version)\nprint(sklearn.__version__)", "outputs": [{"output_type": "stream", "name": "stdout", "text": "2.7.3 (default, Mar 13 2014, 11:03:55) \n[GCC 4.7.2]\n0.16.dev\n"}], "metadata": {"collapsed": false, "trusted": true}}, {"source": "## Generate samples with and without ties", "cell_type": "markdown", "metadata": {}}, {"execution_count": 3, "cell_type": "code", "source": "# Sample with x ties\ndata_with_ties = pandas.DataFrame()\ndata_with_ties[\"feature\"] = [0, 0, 1, 2, 3]\ndata_with_ties[\"target\"] = [0.1, 0.05, 0.15, 0.2, 0.35]\n\n# Sample without x ties\ndata_without_ties = |
NewerOlder