<commit_before>	/*
	Copyright 2016 IBM

	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 copy of the License at

		http://www.apache.org/licenses/LICENSE-2.0

	Unless required by applicable law or agreed to in writing, software
	distributed under the License is distributed on an "AS IS" BASIS,
	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
	See the License for the specific language governing permissions and
	limitations under the License.

	Licensed Materials - Property of IBM
	© Copyright IBM Corp. 2016
	*/
	package main

	import (
		"encoding/json"
		"errors"
		"fmt"
		"strconv"
		"time"
		"strings"

		"github.com/hyperledger/fabric/core/chaincode/shim"
	)

	var cpPrefix = "cp:"
	var accountPrefix = "acct:"
	var accountsKey = "accounts"

	var recentLeapYear = 2016

	// SimpleChaincode example simple Chaincode implementation
	type SimpleChaincode struct {
	}

	func generateCUSIPSuffix(issueDate string, age string) (string, error) {

		t, err := msToTime(issueDate)
		if err != nil {
			return "", err
		}
		
		days, err := strconv.Atoi(age)
		if err != nil {
			// handle error
			fmt.Println(err)
			return "", err
		}

		maturityDate := t.AddDate(0, 0, days)
		month := int(maturityDate.Month())
		day := maturityDate.Day()

		suffix := seventhDigit[month] + eigthDigit[day]
		return suffix, nil

	}

	const (
		millisPerSecond     = int64(time.Second / time.Millisecond)
		nanosPerMillisecond = int64(time.Millisecond / time.Nanosecond)
	)

	func msToTime(ms string) (time.Time, error) {
		msInt, err := strconv.ParseInt(ms, 10, 64)
		if err != nil {
			return time.Time{}, err
		}

		return time.Unix(msInt/millisPerSecond,
			(msInt%millisPerSecond)*nanosPerMillisecond), nil
	}

	type CP struct {
		CUSIP     string  `json:"cusip"`
		Contract  string  `json:"contract"`
		Name      string  `json:"ticker"`
		Gender    string  `json:"par"`
		Age       string  `json:"qty"`
		City  	  string  `json:"discount"`
		State	  string  `json:"maturity"`
		Phone	  string  `json:"phone"`
		House	  string  `json:"house"`
		Street	  string  `json:"street"`
		Pin	  string  `json:"pin"`
		Email	  string  `json:"email"`
		Mobile	  string  `json:"mobile"`
		Owner     string  `json:"owner"`
		Issuer    string  `json:"issuer"`
		IssueDate string  `json:"issueDate"`
	}
	
	type BANKCONTRACT struct {
		CONTRACTID		 string  `json:"conractid"`
		BANKID   		 string  `json:"bID"`
		BANKNAME     	 string  `json:"bName"`
		BANKVALIDATORS   string  `json:"bValidators"`
		COMMISSION       string  `json:"bCommission"`
	}

	type Account struct {
		ID          string  `json:"id"`
		Prefix      string  `json:"prefix"`
		CashBalance float64 `json:"cashBalance"`
		AssetsIds   []string `json:"assetIds"`
	}

	type Transaction struct {
		CUSIP       string   `json:"cusip"`
		FromCompany string   `json:"fromCompany"`
		ToCompany   string   `json:"toCompany"`
		Quantity    int      `json:"quantity"`
		Discount    string   `json:"discount"`
	}
<commit_msg>Update cp_cc.go<commit_after>	/*
	Copyright 2016 IBM

	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 copy of the License at

		http://www.apache.org/licenses/LICENSE-2.0

	Unless required by applicable law or agreed to in writing, software
	distributed under the License is distributed on an "AS IS" BASIS,
	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
	See the License for the specific language governing permissions and
	limitations under the License.

	Licensed Materials - Property of IBM
	© Copyright IBM Corp. 2016
	*/
	package main

	import (
		"encoding/json"
		"errors"
		"fmt"
		"strconv"
		"time"
		"strings"

		"github.com/hyperledger/fabric/core/chaincode/shim"
	)

	var cpPrefix = "cp:"
	var accountPrefix = "acct:"
	var accountsKey = "accounts"

	var recentLeapYear = 2016

	// SimpleChaincode example simple Chaincode implementation
	type SimpleChaincode struct {
	}

	func generateCUSIPSuffix(issueDate string, age string) (string, error) {

		t, err := msToTime(issueDate)
		if err != nil {
			return "", err
		}
		
		days, err := strconv.Atoi(age)
		if err != nil {
			// handle error
			fmt.Println(err)
			return "", err
		}

		maturityDate := t.AddDate(0, 0, days)
		month := int(maturityDate.Month())
		day := maturityDate.Day()

		suffix := seventhDigit[month] + eigthDigit[day]
		return suffix, nil

	}

	const (
		millisPerSecond     = int64(time.Second / time.Millisecond)
		nanosPerMillisecond = int64(time.Millisecond / time.Nanosecond)
	)

	func msToTime(ms string) (time.Time, error) {
		msInt, err := strconv.ParseInt(ms, 10, 64)
		if err != nil {
			return time.Time{}, err
		}

		return time.Unix(msInt/millisPerSecond,
			(msInt%millisPerSecond)*nanosPerMillisecond), nil
	}

	type CP struct {
		CUSIP     string  `json:"cusip"`
		Contract  string  `json:"contract"`
		Name      string  `json:"ticker"`
		Gender    string  `json:"par"`
		Age       string  `json:"qty"`
		City  	  string  `json:"discount"`
		State	  string  `json:"maturity"`
		Phone	  string  `json:"phone"`
		House	  string  `json:"house"`
		Street	  string  `json:"street"`
		Pin	  string  `json:"pin"`
		Email	  string  `json:"email"`
		Mobile	  string  `json:"mobile"`
		Fmrdata	  string  `json:"fmrdata"`
		Owner     string  `json:"owner"`
		Issuer    string  `json:"issuer"`
		IssueDate string  `json:"issueDate"`
	}
	
	type BANKCONTRACT struct {
		CONTRACTID		 string  `json:"conractid"`
		BANKID   		 string  `json:"bID"`
		BANKNAME     	 string  `json:"bName"`
		BANKVALIDATORS   string  `json:"bValidators"`
		COMMISSION       string  `json:"bCommission"`
	}

	type Account struct {
		ID          string  `json:"id"`
		Prefix      string  `json:"prefix"`
		CashBalance float64 `json:"cashBalance"`
		AssetsIds   []string `json:"assetIds"`
	}

	type Transaction struct {
		CUSIP       string   `json:"cusip"`
		FromCompany string   `json:"fromCompany"`
		ToCompany   string   `json:"toCompany"`
		Quantity    int      `json:"quantity"`
		Discount    string   `json:"discount"`
	}

{'fraction_non_alphanumeric': 0.11223996129656506, 'fraction_numerical': 0.009030801483631673, 'mean_word_length': 3.3461807988787666, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '311593', 'n_tokens_mistral': 2327, 'n_tokens_neox': 2045, 'n_words': 586}