Skip to main content

sekigae program

Project description

Sekigae Program

For Sekigae Program

Japanese How To -> https://qiita.com/kamuiroeru/items/ae934e07882dfca64786

Requirements

  • python >= 3.6 ( Use f-strings )

Install

shell

pip install sekigae

Shell Command Usage

Simple usage

shell

# 45 Students to 6 rows.
sekigae 45 6

output

             FRONT
-------------------------------
| 23 | 21 | 25 |  1 |  8 | 45 |
-------------------------------
| 18 | 29 | 44 |  4 | 20 | 42 |
-------------------------------
|  2 | 10 | 35 | 30 | 15 | 31 |
-------------------------------
| 37 |  6 | 27 | 40 | 36 | 11 |
-------------------------------
| 16 | 39 |  5 | 14 |  3 | 17 |
-------------------------------
| 28 | 34 |  9 | 13 | 19 | 43 |
-------------------------------
| 32 | 26 |  7 | 12 | 41 | 22 |
-------------------------------
| 38 | 33 | 24 |

Edit top label

shell

# set tag as "WhiteBoard"
sekigae 25 6 -t WhiteBoard

output

          WhiteBoard
-------------------------------
| 24 | 21 |  7 | 17 | 13 | 15 |
-------------------------------
|  9 |  5 | 10 | 25 | 22 | 16 |
-------------------------------
| 19 | 18 | 20 |  4 |  1 |  6 |
-------------------------------
| 11 |  8 |  3 | 23 | 12 |  2 |
-------------------------------
| 14 |

Read CSV

out.csv

9,12,6,10,8
5,11,2,4,7
3,1

shell

# choose csv (ignore simple use options)
sekigae 45 6 --csv out.csv

output

          FRONT
--------------------------
|  9 | 12 |  6 | 10 |  8 |
--------------------------
|  5 | 11 |  2 |  4 |  7 |
--------------------------
|  3 |  1 |

Write CSV

shell

# write table to "test.csv"
sekigae 11 4 -o test.csv

output

        FRONT
---------------------
| 11 |  6 | 10 |  1 |
---------------------
|  8 |  5 |  2 |  4 |
---------------------
|  9 |  3 |  7 |
csv wrote

test.csv

11,6,10,1
8,5,2,4
9,3,7

fix student specific place

shell

# format is "row:col:number"
# fix '7' to 1st row 2nd col and fix '9' 1st row 4th col
sekigae 11 4 -s 1:2:7,1:4:9

output

        FRONT
---------------------
|  6 |  7 |  1 |  9 |
---------------------
|  3 |  8 |  2 | 10 |
---------------------
|  4 | 11 |  5 |

        FRONT        
---------------------
|  5 |  7 |  8 |  9 |
---------------------
|  6 | 11 | 10 |  2 |
---------------------
|  1 |  3 |  4 |

        FRONT        
---------------------
|  8 |  7 | 11 |  9 |
---------------------
| 10 |  6 |  2 |  4 |
---------------------
|  3 |  5 |  1 |

7 is fixed 1st row 2nd col. 9 is fixed 1st row 4th col.

Pipeline

Pipeline input

out.csv

10,12,3,5,6
11,4,9,1,13
7,8,2
cat out.csv | sekigae

output

          FRONT
--------------------------
| 10 | 12 |  3 |  5 |  6 |
--------------------------
| 11 |  4 |  9 |  1 | 13 |
--------------------------
|  7 |  8 |  2 |

Pipeline output

sekigae 13 5 -f | awk '{ if (gsub(/,/, " ")) print }'

output

8 5 7 10 12
11 6 3 4 1
13 2 9

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sekigae-0.0.6.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

sekigae-0.0.6-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file sekigae-0.0.6.tar.gz.

File metadata

  • Download URL: sekigae-0.0.6.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/46.0.0.post20200309 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.6.10

File hashes

Hashes for sekigae-0.0.6.tar.gz
Algorithm Hash digest
SHA256 7a47079819e9fd4313f6a4b9389f1852be353a2efe84d9fc02588157524298e0
MD5 0dbd2d38baea94f71fa91526c51995ec
BLAKE2b-256 1d9298e498fdead24af633369b62b0ccc877289517b250dbc28eaa7c57f4788f

See more details on using hashes here.

File details

Details for the file sekigae-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: sekigae-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/46.0.0.post20200309 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.6.10

File hashes

Hashes for sekigae-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 91438f2f9d6e3dcef8f993eb4ad319b901dbccb423e3aa75e2008fd5257b06d1
MD5 e8d68e2b1ff5064478fdfe2cdf2ca869
BLAKE2b-256 df8cbbc99821fe2b550a45b325173cb1c5e80f15e35393c36c739e71dcc5b8fd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page