Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.1%) to scientific vocabulary
Keywords
Repository
MIT's Supply Chain Python Package
Basic Info
Statistics
- Stars: 25
- Watchers: 3
- Forks: 3
- Open Issues: 0
- Releases: 5
Topics
Metadata Files
README.md
SCx
MIT's Supply Chain Micromaster (SCx) Python Package
Documentation
Technical documentation can be found here.
Examples
Setup
Cloud Setup (Google Colab)
- You can access google colab here
- Create a new notebook
- Install the
scxpackage by adding the following to a new code cell at the top of your notebook and running it:pip install scx
Local Setup
Make sure you have Python 3.11.x (or higher) installed on your system. You can download it here.
Recommended (but Optional) -> Expand this section to setup and activate a virtual environment.
- Install (or upgrade) virtualenv:
python3 -m pip install --upgrade virtualenv - Create your virtualenv named
venv:python3 -m virtualenv venv - Activate your virtual environment
- On Unix (Mac or Linux):
source venv/bin/activate - On Windows:
venv\scripts\activate
- On Unix (Mac or Linux):
pip install scx
Optimization Getting Started
See all of the optimization examples here.
Basic Usage
py
from scx.optimize import Model
Simple Optimization
```py from scx.optimize import Model
Create variables
product1amt = Model.variable(name="product1", lowBound=0) product2amt = Model.variable(name="product2", lowBound=0)
Initialize the model
mymodel = Model(name="GenericProblem", sense='maximize')
Add the Objective Fn
mymodel.addobjective( fn = (product1amt1)+(product2amt1) )
Add Constraints
mymodel.addconstraint( name = 'input1constraint', fn = product1amt1+product2amt2 <= 100 ) mymodel.addconstraint( name = 'input2constraint', fn = product1amt3+product2amt1 <= 200 )
Solve the model
mymodel.solve(getduals=True, get_slacks=True)
Show the outputs
NOTE: outputs can be fetched directly as a dictionary with my_model.get_outputs()
mymodel.showoutputs()
Outputs:
py
{'duals': {'input1constraint': 0.4, 'input2constraint': 0.2},
'objective': 80.0,
'slacks': {'input1constraint': -0.0, 'input2constraint': -0.0},
'status': 'Optimal',
'variables': {'product1': 60.0, 'product2': 20.0}}
```
Database Getting Started
See all of the database examples here
Basic Usage
```py from scx.database import Database
Specify the S3 path to the data
data_folder = 's3://scx-dev/databases/supermarket/'
Create the database
db = Database(f''' CREATE TABLE Customers AS SELECT * FROM readparquet('{datafolder}customers.parquet'); ''')
Show the database Schema
db.show_info()
Query the database
db.query("SELECT * FROM Customers LIMIT 5") ```
Owner
- Name: Connor Makowski
- Login: connor-makowski
- Kind: user
- Location: Cambridge, MA
- Repositories: 12
- Profile: https://github.com/connor-makowski
Cave Lab Project Manager and Digital Learning Lead at MIT
Citation (CITATION.cff)
cff-version: 1.2.1
title: >-
SCX
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Connor
family-names: Makowski
email: conmak@mit.edu
affiliation: MIT
orcid: 'https://orcid.org/0009-0005-1522-022X'
repository-code: 'https://github.com/connor-makowski/scx'
url: >-
https://connor-makowski.github.io/scx/scx.html
abstract: >-
MIT's Supply Chain Micromaster (SCx) Python Package
license: MIT
GitHub Events
Total
- Release event: 4
- Watch event: 5
- Delete event: 16
- Push event: 4
- Fork event: 1
- Create event: 8
Last Year
- Release event: 4
- Watch event: 5
- Delete event: 16
- Push event: 4
- Fork event: 1
- Create event: 8
Committers
Last synced: 9 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Connor Makowski | c****8@g****m | 58 |
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 0
- Total pull requests: 17
- Average time to close issues: N/A
- Average time to close pull requests: less than a minute
- Total issue authors: 0
- Total pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 17
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 2
- Average time to close issues: N/A
- Average time to close pull requests: less than a minute
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 2
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
- connor-makowski (19)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 925 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 14
- Total maintainers: 1
pypi.org: scx
MIT Supply Chain Python Package
- Homepage: https://github.com/connor-makowski/scx
- Documentation: https://connor-makowski.github.io/scx/scx.html
- License: MIT License
-
Latest release: 1.2.1
published 9 months ago
Rankings
Maintainers (1)
Dependencies
- Mako ==1.1.4
- Markdown ==3.3.4
- MarkupSafe ==1.1.1
- autoflake ==1.4
- black ==22.3.0
- pamda ==0.0.13
- pdoc3 ==0.9.2
- twine ==4.0.0
- PuLP ==2.7.0
- duckdb ==1.0.0
- type_enforced >=1.2.0
- python 3.13-slim build