├── .gitignore ├── LICENSE ├── README.md ├── args.py ├── attention.py ├── calendar[1].csv ├── decoders.py ├── enc_and_utils.py ├── features.py ├── logsampler.py ├── palsoftmax.py ├── trainer.py └── transformer.py /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | pip-wheel-metadata/ 24 | share/python-wheels/ 25 | *.egg-info/ 26 | .installed.cfg 27 | *.egg 28 | MANIFEST 29 | 30 | # PyInstaller 31 | # Usually these files are written by a python script from a template 32 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 33 | *.manifest 34 | *.spec 35 | 36 | # Installer logs 37 | pip-log.txt 38 | pip-delete-this-directory.txt 39 | 40 | # Unit test / coverage reports 41 | htmlcov/ 42 | .tox/ 43 | .nox/ 44 | .coverage 45 | .coverage.* 46 | .cache 47 | nosetests.xml 48 | coverage.xml 49 | *.cover 50 | *.py,cover 51 | .hypothesis/ 52 | .pytest_cache/ 53 | 54 | # Translations 55 | *.mo 56 | *.pot 57 | 58 | # Django stuff: 59 | *.log 60 | local_settings.py 61 | db.sqlite3 62 | db.sqlite3-journal 63 | 64 | # Flask stuff: 65 | instance/ 66 | .webassets-cache 67 | 68 | # Scrapy stuff: 69 | .scrapy 70 | 71 | # Sphinx documentation 72 | docs/_build/ 73 | 74 | # PyBuilder 75 | target/ 76 | 77 | # Jupyter Notebook 78 | .ipynb_checkpoints 79 | 80 | # IPython 81 | profile_default/ 82 | ipython_config.py 83 | 84 | # pyenv 85 | .python-version 86 | 87 | # pipenv 88 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 89 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 90 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 91 | # install all needed dependencies. 92 | #Pipfile.lock 93 | 94 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 95 | __pypackages__/ 96 | 97 | # Celery stuff 98 | celerybeat-schedule 99 | celerybeat.pid 100 | 101 | # SageMath parsed files 102 | *.sage.py 103 | 104 | # Environments 105 | .env 106 | .venv 107 | env/ 108 | venv/ 109 | ENV/ 110 | env.bak/ 111 | venv.bak/ 112 | 113 | # Spyder project settings 114 | .spyderproject 115 | .spyproject 116 | 117 | # Rope project settings 118 | .ropeproject 119 | 120 | # mkdocs documentation 121 | /site 122 | 123 | # mypy 124 | .mypy_cache/ 125 | .dmypy.json 126 | dmypy.json 127 | 128 | # Pyre type checker 129 | .pyre/ 130 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # M5 Starter (Python Version) 2 | 3 | Python framework for a good neural network for the Makidrakis 5 (M5) competition hosted on Kaggle. 4 | 5 | This was originally supposed to be hosted on Google Colab but the memory and GPU are very restrictive over there. However, on GitHub it is easier for me to share my code. I hope that I will be of some use. 6 | 7 | This is a truncated version of my model, so please bear if it scores significantly lesser. 8 | 9 | # Directory Structure 10 | 11 | It is structured like this: 12 | ``` 13 | m5-python-starter 14 | |__________model.py 15 | |__________features.py 16 | |__________palsoftmax.py 17 | |__________data_______________ 18 | ||____sales_train_validation.csv 19 | ||____sell_prices.csv 20 | ||____sample_submission.csv 21 | ||____calendar.csv 22 | ``` 23 | 24 | The model was trained on Google Colab and with the following parameters was able to attain a 0.53 (without overfitting): 25 | 26 | ``` 27 | Transformer( 28 | n_token=1000, 29 | n_layer=36, 30 | n_head=64, 31 | d_model=512, 32 | d_head=64, 33 | d_inner=1024, 34 | dropout=0.2, 35 | dropatt=0.2, 36 | dtype=torch.float32, 37 | attention_dropout_prob=0.15, 38 | output_dropout_prob=0.175, 39 | init_method=torch.optim.SGD, 40 | bi_data=10 41 | ) 42 | ``` 43 | -------------------------------------------------------------------------------- /args.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | parser = argparse.ArgumentParser( 3 | formatter_class=argparse.ArgumentDefaultsHelpFormatter) 4 | 5 | parser.add_argument('--d_model', type=int, default=0, help='d_model') 6 | parser.add_argument('--d_head', type=int, default=2, help='head') 7 | parser.add_argument('--d_inner', type=bool, default=True, help='inner layers') 8 | 9 | parser.add_argument('--n_token', type=str, default='roberta-base', help='number of tokens') 10 | parser.add_argument('--n_layer', type=str, default='gru', help='number of hidden layers') 11 | parser.add_argument('--n_head', type=int, default=2, help='num attention heads') 12 | 13 | parser.add_argument('--dropout', type=int, default=1024, help='dropout') 14 | parser.add_argument('--dropatt', type=int, default=0.5, help='dropatt') 15 | 16 | parser.add_argument('--attention_dropout_prob', type=int, default=1024, help='attention_dropout_prob') 17 | parser.add_argument('--output_dropout_prob', type=int, default=0.5, help='output_dropout_prob') 18 | 19 | 20 | args = parser.parse_args() 21 | args = vars(args) 22 | -------------------------------------------------------------------------------- /attention.py: -------------------------------------------------------------------------------- 1 | import numpy as np # linear algebra 2 | import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) 3 | 4 | import gc; import os 5 | import torch 6 | from torch.nn import * 7 | import torch.nn as nn 8 | import torch.nn.functional as F 9 | import warnings 10 | warnings.filterwarnings('ignore') 11 | import pandas as pd 12 | import numpy as np 13 | import matplotlib.pyplot as plt 14 | import seaborn as sns 15 | import gc 16 | import os 17 | from tqdm.notebook import tqdm 18 | 19 | class RelMultiHeadAttn(nn.Module): 20 | def __init__(self, n_head, d_model, d_head, dropout, dropatt=0, 21 | tgt_len=None, ext_len=None, mem_len=None, pre_lnorm=False): 22 | super(RelMultiHeadAttn, self).__init__() 23 | 24 | self.n_head = n_head 25 | self.d_model = d_model 26 | self.d_head = d_head 27 | self.dropout = dropout 28 | 29 | self.qkv_net = nn.Linear(d_model, 3 * n_head * d_head, bias=False) 30 | 31 | self.drop = nn.Dropout(dropout) 32 | self.dropatt = nn.Dropout(dropatt) 33 | self.o_net = nn.Linear(n_head * d_head, d_model, bias=False) 34 | 35 | self.layer_norm = nn.LayerNorm(d_model) 36 | 37 | self.scale = 1 / (d_head ** 0.5) 38 | 39 | self.pre_lnorm = pre_lnorm 40 | 41 | def _parallelogram_mask(self, h, w, left=False): 42 | mask = torch.ones((h, w)).byte() 43 | m = min(h, w) 44 | mask[:m,:m] = torch.triu(mask[:m,:m]) 45 | mask[-m:,-m:] = torch.tril(mask[-m:,-m:]) 46 | 47 | if left: 48 | return mask 49 | else: 50 | return mask.flip(0) 51 | 52 | def _shift(self, x, qlen, klen, mask, left=False): 53 | if qlen > 1: 54 | zero_pad = torch.zeros((x.size(0), qlen-1, x.size(2), x.size(3)), 55 | device=x.device, dtype=x.dtype) 56 | else: 57 | zero_pad = torch.zeros(0, device=x.device, dtype=x.dtype) 58 | 59 | if left: 60 | mask = mask.flip(1) 61 | x_padded = torch.cat([zero_pad, x], dim=1).expand(qlen, -1, -1, -1) 62 | else: 63 | x_padded = torch.cat([x, zero_pad], dim=1).expand(qlen, -1, -1, -1) 64 | 65 | x = x_padded.masked_select(mask[:,:,None,None]) \ 66 | .view(qlen, klen, x.size(2), x.size(3)) 67 | 68 | return x 69 | 70 | def _rel_shift(self, x, zero_triu=False): 71 | zero_pad = torch.zeros((x.size(0), 1, *x.size()[2:]), 72 | device=x.device, dtype=x.dtype) 73 | x_padded = torch.cat([zero_pad, x], dim=1) 74 | 75 | x_padded = x_padded.view(x.size(1) + 1, x.size(0), *x.size()[2:]) 76 | 77 | x = x_padded[1:].view_as(x) 78 | 79 | if zero_triu: 80 | ones = torch.ones((x.size(0), x.size(1))) 81 | x = x * torch.tril(ones, x.size(1) - x.size(0))[:,:,None,None] 82 | 83 | return x 84 | 85 | def forward(self, w, r, attn_mask=None, mems=None): 86 | raise NotImplementedError 87 | 88 | class RelPartialLearnableMultiHeadAttn(RelMultiHeadAttn): 89 | def __init__(self, *args, **kwargs): 90 | super(RelPartialLearnableMultiHeadAttn, self).__init__(*args, **kwargs) 91 | 92 | self.r_net = nn.Linear(self.d_model, self.n_head * self.d_head, bias=False) 93 | 94 | def forward(self, w, r, r_w_bias, r_r_bias, attn_mask=None, mems=None): 95 | qlen, rlen, bsz = w.size(0), r.size(0), w.size(1) 96 | 97 | if mems is not None: 98 | cat = torch.cat([mems, w], 0) 99 | if self.pre_lnorm: 100 | w_heads = self.qkv_net(self.layer_norm(cat)) 101 | else: 102 | w_heads = self.qkv_net(cat) 103 | r_head_k = self.r_net(r) 104 | 105 | w_head_q, w_head_k, w_head_v = torch.chunk(w_heads, 3, dim=-1) 106 | w_head_q = w_head_q[-qlen:] 107 | else: 108 | if self.pre_lnorm: 109 | w_heads = self.qkv_net(self.layer_norm(w)) 110 | else: 111 | w_heads = self.qkv_net(w) 112 | r_head_k = self.r_net(r) 113 | 114 | w_head_q, w_head_k, w_head_v = torch.chunk(w_heads, 3, dim=-1) 115 | 116 | klen = w_head_k.size(0) 117 | 118 | w_head_q = w_head_q.view(qlen, bsz, self.n_head, self.d_head) # qlen x bsz x n_head x d_head 119 | w_head_k = w_head_k.view(klen, bsz, self.n_head, self.d_head) # qlen x bsz x n_head x d_head 120 | w_head_v = w_head_v.view(klen, bsz, self.n_head, self.d_head) # qlen x bsz x n_head x d_head 121 | 122 | r_head_k = r_head_k.view(rlen, self.n_head, self.d_head) # qlen x n_head x d_head 123 | 124 | #### compute attention score 125 | rw_head_q = w_head_q + r_w_bias # qlen x bsz x n_head x d_head 126 | AC = torch.einsum('ibnd,jbnd->ijbn', (rw_head_q, w_head_k)) # qlen x klen x bsz x n_head 127 | 128 | rr_head_q = w_head_q + r_r_bias 129 | BD = torch.einsum('ibnd,jnd->ijbn', (rr_head_q, r_head_k)) # qlen x klen x bsz x n_head 130 | BD = self._rel_shift(BD) 131 | 132 | # [qlen x klen x bsz x n_head] 133 | attn_score = AC + BD 134 | attn_score.mul_(self.scale) 135 | 136 | #### compute attention probability 137 | if attn_mask is not None and attn_mask.any().item(): 138 | if attn_mask.dim() == 2: 139 | attn_score = attn_score.float().masked_fill( 140 | attn_mask[None,:,:,None], -float('inf')).type_as(attn_score) 141 | elif attn_mask.dim() == 3: 142 | attn_score = attn_score.float().masked_fill( 143 | attn_mask[:,:,:,None], -float('inf')).type_as(attn_score) 144 | 145 | # [qlen x klen x bsz x n_head] 146 | attn_prob = F.softmax(attn_score, dim=1) 147 | attn_prob = self.dropatt(attn_prob) 148 | 149 | #### compute attention vector 150 | attn_vec = torch.einsum('ijbn,jbnd->ibnd', (attn_prob, w_head_v)) 151 | 152 | # [qlen x bsz x n_head x d_head] 153 | attn_vec = attn_vec.contiguous().view( 154 | attn_vec.size(0), attn_vec.size(1), self.n_head * self.d_head) 155 | 156 | ##### linear projection 157 | attn_out = self.o_net(attn_vec) 158 | attn_out = self.drop(attn_out) 159 | 160 | if self.pre_lnorm: 161 | ##### residual connection 162 | output = w + attn_out 163 | else: 164 | ##### residual connection + layer normalization 165 | output = self.layer_norm(w + attn_out) 166 | 167 | return output 168 | 169 | class RelLearnableMultiHeadAttn(RelMultiHeadAttn): 170 | def __init__(self, *args, **kwargs): 171 | super(RelLearnableMultiHeadAttn, self).__init__(*args, **kwargs) 172 | 173 | def forward(self, w, r_emb, r_w_bias, r_bias, attn_mask=None, mems=None): 174 | # r_emb: [klen, n_head, d_head], used for term B 175 | # r_w_bias: [n_head, d_head], used for term C 176 | # r_bias: [klen, n_head], used for term D 177 | 178 | qlen, bsz = w.size(0), w.size(1) 179 | 180 | if mems is not None: 181 | cat = torch.cat([mems, w], 0) 182 | if self.pre_lnorm: 183 | w_heads = self.qkv_net(self.layer_norm(cat)) 184 | else: 185 | w_heads = self.qkv_net(cat) 186 | w_head_q, w_head_k, w_head_v = torch.chunk(w_heads, 3, dim=-1) 187 | 188 | w_head_q = w_head_q[-qlen:] 189 | else: 190 | if self.pre_lnorm: 191 | w_heads = self.qkv_net(self.layer_norm(w)) 192 | else: 193 | w_heads = self.qkv_net(w) 194 | w_head_q, w_head_k, w_head_v = torch.chunk(w_heads, 3, dim=-1) 195 | 196 | klen = w_head_k.size(0) 197 | 198 | w_head_q = w_head_q.view(qlen, bsz, self.n_head, self.d_head) 199 | w_head_k = w_head_k.view(klen, bsz, self.n_head, self.d_head) 200 | w_head_v = w_head_v.view(klen, bsz, self.n_head, self.d_head) 201 | 202 | if klen > r_emb.size(0): 203 | r_emb_pad = r_emb[0:1].expand(klen-r_emb.size(0), -1, -1) 204 | r_emb = torch.cat([r_emb_pad, r_emb], 0) 205 | r_bias_pad = r_bias[0:1].expand(klen-r_bias.size(0), -1) 206 | r_bias = torch.cat([r_bias_pad, r_bias], 0) 207 | else: 208 | r_emb = r_emb[-klen:] 209 | r_bias = r_bias[-klen:] 210 | 211 | #### compute attention score 212 | rw_head_q = w_head_q + r_w_bias[None] # qlen x bsz x n_head x d_head 213 | 214 | AC = torch.einsum('ibnd,jbnd->ijbn', (rw_head_q, w_head_k)) # qlen x klen x bsz x n_head 215 | B_ = torch.einsum('ibnd,jnd->ijbn', (w_head_q, r_emb)) # qlen x klen x bsz x n_head 216 | D_ = r_bias[None, :, None] # 1 x klen x 1 x n_head 217 | BD = self._rel_shift(B_ + D_) 218 | 219 | # [qlen x klen x bsz x n_head] 220 | attn_score = AC + BD 221 | attn_score.mul_(self.scale) 222 | 223 | #### compute attention probability 224 | if attn_mask is not None and attn_mask.any().item(): 225 | if attn_mask.dim() == 2: 226 | attn_score.masked_fill_(attn_mask[None,:,:,None], -float('inf')) 227 | elif attn_mask.dim() == 3: 228 | attn_score.masked_fill_(attn_mask[:,:,:,None], -float('inf')) 229 | 230 | # [qlen x klen x bsz x n_head] 231 | attn_prob = F.softmax(attn_score, dim=1) 232 | attn_prob = self.dropatt(attn_prob) 233 | 234 | #### compute attention vector 235 | attn_vec = torch.einsum('ijbn,jbnd->ibnd', (attn_prob, w_head_v)) 236 | 237 | # [qlen x bsz x n_head x d_head] 238 | attn_vec = attn_vec.contiguous().view( 239 | attn_vec.size(0), attn_vec.size(1), self.n_head * self.d_head) 240 | 241 | ##### linear projection 242 | attn_out = self.o_net(attn_vec) 243 | attn_out = self.drop(attn_out) 244 | 245 | if self.pre_lnorm: 246 | ##### residual connection 247 | output = w + attn_out 248 | else: 249 | ##### residual connection + layer normalization 250 | output = self.layer_norm(w + attn_out) 251 | 252 | return output 253 | class PositionwiseGRUFF(torch.nn.Module): 254 | def __init__(self, d_model, d_inner, dropout, pre_lnorm=False): 255 | super(PositionwiseGRUFF, self).__init__() 256 | 257 | self.d_model = d_model 258 | self.d_inner = d_inner 259 | self.dropout = dropout 260 | 261 | self.CoreNet = nn.Sequential( 262 | nn.Linear(d_model, d_inner), 263 | nn.GRUCell(d_model, d_inner), 264 | nn.ReLU(inplace=True), 265 | nn.Dropout(dropout), 266 | nn.Linear(d_inner, d_model), 267 | nn.Dropout(dropout), 268 | ) 269 | 270 | self.layer_norm = nn.LayerNorm(d_model) 271 | 272 | self.pre_lnorm = pre_lnorm 273 | 274 | def forward(self, inp): 275 | if self.pre_lnorm: 276 | # layer normalization + positionwise feed-forward 277 | core_out = self.CoreNet(self.layer_norm(inp)) 278 | 279 | # residual connection 280 | output = core_out + inp 281 | else: 282 | # positionwise feed-forward 283 | core_out = self.CoreNet(inp) 284 | 285 | # residual connection + layer normalization 286 | output = self.layer_norm(inp + core_out) 287 | 288 | return output 289 | -------------------------------------------------------------------------------- /calendar[1].csv: -------------------------------------------------------------------------------- 1 | date,wm_yr_wk,weekday,wday,month,year,d,event_name_1,event_type_1,event_name_2,event_type_2,snap_CA,snap_TX,snap_WI 2 | 2011-01-29,11101,Saturday,1,1,2011,d_1,,,,,0,0,0 3 | 2011-01-30,11101,Sunday,2,1,2011,d_2,,,,,0,0,0 4 | 2011-01-31,11101,Monday,3,1,2011,d_3,,,,,0,0,0 5 | 2011-02-01,11101,Tuesday,4,2,2011,d_4,,,,,1,1,0 6 | 2011-02-02,11101,Wednesday,5,2,2011,d_5,,,,,1,0,1 7 | 2011-02-03,11101,Thursday,6,2,2011,d_6,,,,,1,1,1 8 | 2011-02-04,11101,Friday,7,2,2011,d_7,,,,,1,0,0 9 | 2011-02-05,11102,Saturday,1,2,2011,d_8,,,,,1,1,1 10 | 2011-02-06,11102,Sunday,2,2,2011,d_9,SuperBowl,Sporting,,,1,1,1 11 | 2011-02-07,11102,Monday,3,2,2011,d_10,,,,,1,1,0 12 | 2011-02-08,11102,Tuesday,4,2,2011,d_11,,,,,1,0,1 13 | 2011-02-09,11102,Wednesday,5,2,2011,d_12,,,,,1,1,1 14 | 2011-02-10,11102,Thursday,6,2,2011,d_13,,,,,1,0,0 15 | 2011-02-11,11102,Friday,7,2,2011,d_14,,,,,0,1,1 16 | 2011-02-12,11103,Saturday,1,2,2011,d_15,,,,,0,1,1 17 | 2011-02-13,11103,Sunday,2,2,2011,d_16,,,,,0,1,0 18 | 2011-02-14,11103,Monday,3,2,2011,d_17,ValentinesDay,Cultural,,,0,0,1 19 | 2011-02-15,11103,Tuesday,4,2,2011,d_18,,,,,0,1,1 20 | 2011-02-16,11103,Wednesday,5,2,2011,d_19,,,,,0,0,0 21 | 2011-02-17,11103,Thursday,6,2,2011,d_20,,,,,0,0,0 22 | 2011-02-18,11103,Friday,7,2,2011,d_21,,,,,0,0,0 23 | 2011-02-19,11104,Saturday,1,2,2011,d_22,,,,,0,0,0 24 | 2011-02-20,11104,Sunday,2,2,2011,d_23,,,,,0,0,0 25 | 2011-02-21,11104,Monday,3,2,2011,d_24,PresidentsDay,National,,,0,0,0 26 | 2011-02-22,11104,Tuesday,4,2,2011,d_25,,,,,0,0,0 27 | 2011-02-23,11104,Wednesday,5,2,2011,d_26,,,,,0,0,0 28 | 2011-02-24,11104,Thursday,6,2,2011,d_27,,,,,0,0,0 29 | 2011-02-25,11104,Friday,7,2,2011,d_28,,,,,0,0,0 30 | 2011-02-26,11105,Saturday,1,2,2011,d_29,,,,,0,0,0 31 | 2011-02-27,11105,Sunday,2,2,2011,d_30,,,,,0,0,0 32 | 2011-02-28,11105,Monday,3,2,2011,d_31,,,,,0,0,0 33 | 2011-03-01,11105,Tuesday,4,3,2011,d_32,,,,,1,1,0 34 | 2011-03-02,11105,Wednesday,5,3,2011,d_33,,,,,1,0,1 35 | 2011-03-03,11105,Thursday,6,3,2011,d_34,,,,,1,1,1 36 | 2011-03-04,11105,Friday,7,3,2011,d_35,,,,,1,0,0 37 | 2011-03-05,11106,Saturday,1,3,2011,d_36,,,,,1,1,1 38 | 2011-03-06,11106,Sunday,2,3,2011,d_37,,,,,1,1,1 39 | 2011-03-07,11106,Monday,3,3,2011,d_38,,,,,1,1,0 40 | 2011-03-08,11106,Tuesday,4,3,2011,d_39,,,,,1,0,1 41 | 2011-03-09,11106,Wednesday,5,3,2011,d_40,LentStart,Religious,,,1,1,1 42 | 2011-03-10,11106,Thursday,6,3,2011,d_41,,,,,1,0,0 43 | 2011-03-11,11106,Friday,7,3,2011,d_42,,,,,0,1,1 44 | 2011-03-12,11107,Saturday,1,3,2011,d_43,,,,,0,1,1 45 | 2011-03-13,11107,Sunday,2,3,2011,d_44,,,,,0,1,0 46 | 2011-03-14,11107,Monday,3,3,2011,d_45,,,,,0,0,1 47 | 2011-03-15,11107,Tuesday,4,3,2011,d_46,,,,,0,1,1 48 | 2011-03-16,11107,Wednesday,5,3,2011,d_47,LentWeek2,Religious,,,0,0,0 49 | 2011-03-17,11107,Thursday,6,3,2011,d_48,StPatricksDay,Cultural,,,0,0,0 50 | 2011-03-18,11107,Friday,7,3,2011,d_49,,,,,0,0,0 51 | 2011-03-19,11108,Saturday,1,3,2011,d_50,,,,,0,0,0 52 | 2011-03-20,11108,Sunday,2,3,2011,d_51,Purim End,Religious,,,0,0,0 53 | 2011-03-21,11108,Monday,3,3,2011,d_52,,,,,0,0,0 54 | 2011-03-22,11108,Tuesday,4,3,2011,d_53,,,,,0,0,0 55 | 2011-03-23,11108,Wednesday,5,3,2011,d_54,,,,,0,0,0 56 | 2011-03-24,11108,Thursday,6,3,2011,d_55,,,,,0,0,0 57 | 2011-03-25,11108,Friday,7,3,2011,d_56,,,,,0,0,0 58 | 2011-03-26,11109,Saturday,1,3,2011,d_57,,,,,0,0,0 59 | 2011-03-27,11109,Sunday,2,3,2011,d_58,,,,,0,0,0 60 | 2011-03-28,11109,Monday,3,3,2011,d_59,,,,,0,0,0 61 | 2011-03-29,11109,Tuesday,4,3,2011,d_60,,,,,0,0,0 62 | 2011-03-30,11109,Wednesday,5,3,2011,d_61,,,,,0,0,0 63 | 2011-03-31,11109,Thursday,6,3,2011,d_62,,,,,0,0,0 64 | 2011-04-01,11109,Friday,7,4,2011,d_63,,,,,1,1,0 65 | 2011-04-02,11110,Saturday,1,4,2011,d_64,,,,,1,0,1 66 | 2011-04-03,11110,Sunday,2,4,2011,d_65,,,,,1,1,1 67 | 2011-04-04,11110,Monday,3,4,2011,d_66,,,,,1,0,0 68 | 2011-04-05,11110,Tuesday,4,4,2011,d_67,,,,,1,1,1 69 | 2011-04-06,11110,Wednesday,5,4,2011,d_68,,,,,1,1,1 70 | 2011-04-07,11110,Thursday,6,4,2011,d_69,,,,,1,1,0 71 | 2011-04-08,11110,Friday,7,4,2011,d_70,,,,,1,0,1 72 | 2011-04-09,11111,Saturday,1,4,2011,d_71,,,,,1,1,1 73 | 2011-04-10,11111,Sunday,2,4,2011,d_72,,,,,1,0,0 74 | 2011-04-11,11111,Monday,3,4,2011,d_73,,,,,0,1,1 75 | 2011-04-12,11111,Tuesday,4,4,2011,d_74,,,,,0,1,1 76 | 2011-04-13,11111,Wednesday,5,4,2011,d_75,,,,,0,1,0 77 | 2011-04-14,11111,Thursday,6,4,2011,d_76,,,,,0,0,1 78 | 2011-04-15,11111,Friday,7,4,2011,d_77,,,,,0,1,1 79 | 2011-04-16,11112,Saturday,1,4,2011,d_78,,,,,0,0,0 80 | 2011-04-17,11112,Sunday,2,4,2011,d_79,,,,,0,0,0 81 | 2011-04-18,11112,Monday,3,4,2011,d_80,,,,,0,0,0 82 | 2011-04-19,11112,Tuesday,4,4,2011,d_81,,,,,0,0,0 83 | 2011-04-20,11112,Wednesday,5,4,2011,d_82,,,,,0,0,0 84 | 2011-04-21,11112,Thursday,6,4,2011,d_83,,,,,0,0,0 85 | 2011-04-22,11112,Friday,7,4,2011,d_84,,,,,0,0,0 86 | 2011-04-23,11113,Saturday,1,4,2011,d_85,,,,,0,0,0 87 | 2011-04-24,11113,Sunday,2,4,2011,d_86,OrthodoxEaster,Religious,Easter,Cultural,0,0,0 88 | 2011-04-25,11113,Monday,3,4,2011,d_87,,,,,0,0,0 89 | 2011-04-26,11113,Tuesday,4,4,2011,d_88,Pesach End,Religious,,,0,0,0 90 | 2011-04-27,11113,Wednesday,5,4,2011,d_89,,,,,0,0,0 91 | 2011-04-28,11113,Thursday,6,4,2011,d_90,,,,,0,0,0 92 | 2011-04-29,11113,Friday,7,4,2011,d_91,,,,,0,0,0 93 | 2011-04-30,11114,Saturday,1,4,2011,d_92,,,,,0,0,0 94 | 2011-05-01,11114,Sunday,2,5,2011,d_93,,,,,1,1,0 95 | 2011-05-02,11114,Monday,3,5,2011,d_94,,,,,1,0,1 96 | 2011-05-03,11114,Tuesday,4,5,2011,d_95,,,,,1,1,1 97 | 2011-05-04,11114,Wednesday,5,5,2011,d_96,,,,,1,0,0 98 | 2011-05-05,11114,Thursday,6,5,2011,d_97,Cinco De Mayo,Cultural,,,1,1,1 99 | 2011-05-06,11114,Friday,7,5,2011,d_98,,,,,1,1,1 100 | 2011-05-07,11115,Saturday,1,5,2011,d_99,,,,,1,1,0 101 | 2011-05-08,11115,Sunday,2,5,2011,d_100,Mother's day,Cultural,,,1,0,1 102 | 2011-05-09,11115,Monday,3,5,2011,d_101,,,,,1,1,1 103 | 2011-05-10,11115,Tuesday,4,5,2011,d_102,,,,,1,0,0 104 | 2011-05-11,11115,Wednesday,5,5,2011,d_103,,,,,0,1,1 105 | 2011-05-12,11115,Thursday,6,5,2011,d_104,,,,,0,1,1 106 | 2011-05-13,11115,Friday,7,5,2011,d_105,,,,,0,1,0 107 | 2011-05-14,11116,Saturday,1,5,2011,d_106,,,,,0,0,1 108 | 2011-05-15,11116,Sunday,2,5,2011,d_107,,,,,0,1,1 109 | 2011-05-16,11116,Monday,3,5,2011,d_108,,,,,0,0,0 110 | 2011-05-17,11116,Tuesday,4,5,2011,d_109,,,,,0,0,0 111 | 2011-05-18,11116,Wednesday,5,5,2011,d_110,,,,,0,0,0 112 | 2011-05-19,11116,Thursday,6,5,2011,d_111,,,,,0,0,0 113 | 2011-05-20,11116,Friday,7,5,2011,d_112,,,,,0,0,0 114 | 2011-05-21,11117,Saturday,1,5,2011,d_113,,,,,0,0,0 115 | 2011-05-22,11117,Sunday,2,5,2011,d_114,,,,,0,0,0 116 | 2011-05-23,11117,Monday,3,5,2011,d_115,,,,,0,0,0 117 | 2011-05-24,11117,Tuesday,4,5,2011,d_116,,,,,0,0,0 118 | 2011-05-25,11117,Wednesday,5,5,2011,d_117,,,,,0,0,0 119 | 2011-05-26,11117,Thursday,6,5,2011,d_118,,,,,0,0,0 120 | 2011-05-27,11117,Friday,7,5,2011,d_119,,,,,0,0,0 121 | 2011-05-28,11118,Saturday,1,5,2011,d_120,,,,,0,0,0 122 | 2011-05-29,11118,Sunday,2,5,2011,d_121,,,,,0,0,0 123 | 2011-05-30,11118,Monday,3,5,2011,d_122,MemorialDay,National,,,0,0,0 124 | 2011-05-31,11118,Tuesday,4,5,2011,d_123,NBAFinalsStart,Sporting,,,0,0,0 125 | 2011-06-01,11118,Wednesday,5,6,2011,d_124,,,,,1,1,0 126 | 2011-06-02,11118,Thursday,6,6,2011,d_125,,,,,1,0,1 127 | 2011-06-03,11118,Friday,7,6,2011,d_126,,,,,1,1,1 128 | 2011-06-04,11119,Saturday,1,6,2011,d_127,,,,,1,0,0 129 | 2011-06-05,11119,Sunday,2,6,2011,d_128,,,,,1,1,1 130 | 2011-06-06,11119,Monday,3,6,2011,d_129,,,,,1,1,1 131 | 2011-06-07,11119,Tuesday,4,6,2011,d_130,,,,,1,1,0 132 | 2011-06-08,11119,Wednesday,5,6,2011,d_131,,,,,1,0,1 133 | 2011-06-09,11119,Thursday,6,6,2011,d_132,,,,,1,1,1 134 | 2011-06-10,11119,Friday,7,6,2011,d_133,,,,,1,0,0 135 | 2011-06-11,11120,Saturday,1,6,2011,d_134,,,,,0,1,1 136 | 2011-06-12,11120,Sunday,2,6,2011,d_135,NBAFinalsEnd,Sporting,,,0,1,1 137 | 2011-06-13,11120,Monday,3,6,2011,d_136,,,,,0,1,0 138 | 2011-06-14,11120,Tuesday,4,6,2011,d_137,,,,,0,0,1 139 | 2011-06-15,11120,Wednesday,5,6,2011,d_138,,,,,0,1,1 140 | 2011-06-16,11120,Thursday,6,6,2011,d_139,,,,,0,0,0 141 | 2011-06-17,11120,Friday,7,6,2011,d_140,,,,,0,0,0 142 | 2011-06-18,11121,Saturday,1,6,2011,d_141,,,,,0,0,0 143 | 2011-06-19,11121,Sunday,2,6,2011,d_142,Father's day,Cultural,,,0,0,0 144 | 2011-06-20,11121,Monday,3,6,2011,d_143,,,,,0,0,0 145 | 2011-06-21,11121,Tuesday,4,6,2011,d_144,,,,,0,0,0 146 | 2011-06-22,11121,Wednesday,5,6,2011,d_145,,,,,0,0,0 147 | 2011-06-23,11121,Thursday,6,6,2011,d_146,,,,,0,0,0 148 | 2011-06-24,11121,Friday,7,6,2011,d_147,,,,,0,0,0 149 | 2011-06-25,11122,Saturday,1,6,2011,d_148,,,,,0,0,0 150 | 2011-06-26,11122,Sunday,2,6,2011,d_149,,,,,0,0,0 151 | 2011-06-27,11122,Monday,3,6,2011,d_150,,,,,0,0,0 152 | 2011-06-28,11122,Tuesday,4,6,2011,d_151,,,,,0,0,0 153 | 2011-06-29,11122,Wednesday,5,6,2011,d_152,,,,,0,0,0 154 | 2011-06-30,11122,Thursday,6,6,2011,d_153,,,,,0,0,0 155 | 2011-07-01,11122,Friday,7,7,2011,d_154,,,,,1,1,0 156 | 2011-07-02,11123,Saturday,1,7,2011,d_155,,,,,1,0,1 157 | 2011-07-03,11123,Sunday,2,7,2011,d_156,,,,,1,1,1 158 | 2011-07-04,11123,Monday,3,7,2011,d_157,IndependenceDay,National,,,1,0,0 159 | 2011-07-05,11123,Tuesday,4,7,2011,d_158,,,,,1,1,1 160 | 2011-07-06,11123,Wednesday,5,7,2011,d_159,,,,,1,1,1 161 | 2011-07-07,11123,Thursday,6,7,2011,d_160,,,,,1,1,0 162 | 2011-07-08,11123,Friday,7,7,2011,d_161,,,,,1,0,1 163 | 2011-07-09,11124,Saturday,1,7,2011,d_162,,,,,1,1,1 164 | 2011-07-10,11124,Sunday,2,7,2011,d_163,,,,,1,0,0 165 | 2011-07-11,11124,Monday,3,7,2011,d_164,,,,,0,1,1 166 | 2011-07-12,11124,Tuesday,4,7,2011,d_165,,,,,0,1,1 167 | 2011-07-13,11124,Wednesday,5,7,2011,d_166,,,,,0,1,0 168 | 2011-07-14,11124,Thursday,6,7,2011,d_167,,,,,0,0,1 169 | 2011-07-15,11124,Friday,7,7,2011,d_168,,,,,0,1,1 170 | 2011-07-16,11125,Saturday,1,7,2011,d_169,,,,,0,0,0 171 | 2011-07-17,11125,Sunday,2,7,2011,d_170,,,,,0,0,0 172 | 2011-07-18,11125,Monday,3,7,2011,d_171,,,,,0,0,0 173 | 2011-07-19,11125,Tuesday,4,7,2011,d_172,,,,,0,0,0 174 | 2011-07-20,11125,Wednesday,5,7,2011,d_173,,,,,0,0,0 175 | 2011-07-21,11125,Thursday,6,7,2011,d_174,,,,,0,0,0 176 | 2011-07-22,11125,Friday,7,7,2011,d_175,,,,,0,0,0 177 | 2011-07-23,11126,Saturday,1,7,2011,d_176,,,,,0,0,0 178 | 2011-07-24,11126,Sunday,2,7,2011,d_177,,,,,0,0,0 179 | 2011-07-25,11126,Monday,3,7,2011,d_178,,,,,0,0,0 180 | 2011-07-26,11126,Tuesday,4,7,2011,d_179,,,,,0,0,0 181 | 2011-07-27,11126,Wednesday,5,7,2011,d_180,,,,,0,0,0 182 | 2011-07-28,11126,Thursday,6,7,2011,d_181,,,,,0,0,0 183 | 2011-07-29,11126,Friday,7,7,2011,d_182,,,,,0,0,0 184 | 2011-07-30,11127,Saturday,1,7,2011,d_183,,,,,0,0,0 185 | 2011-07-31,11127,Sunday,2,7,2011,d_184,,,,,0,0,0 186 | 2011-08-01,11127,Monday,3,8,2011,d_185,Ramadan starts,Religious,,,1,1,0 187 | 2011-08-02,11127,Tuesday,4,8,2011,d_186,,,,,1,0,1 188 | 2011-08-03,11127,Wednesday,5,8,2011,d_187,,,,,1,1,1 189 | 2011-08-04,11127,Thursday,6,8,2011,d_188,,,,,1,0,0 190 | 2011-08-05,11127,Friday,7,8,2011,d_189,,,,,1,1,1 191 | 2011-08-06,11128,Saturday,1,8,2011,d_190,,,,,1,1,1 192 | 2011-08-07,11128,Sunday,2,8,2011,d_191,,,,,1,1,0 193 | 2011-08-08,11128,Monday,3,8,2011,d_192,,,,,1,0,1 194 | 2011-08-09,11128,Tuesday,4,8,2011,d_193,,,,,1,1,1 195 | 2011-08-10,11128,Wednesday,5,8,2011,d_194,,,,,1,0,0 196 | 2011-08-11,11128,Thursday,6,8,2011,d_195,,,,,0,1,1 197 | 2011-08-12,11128,Friday,7,8,2011,d_196,,,,,0,1,1 198 | 2011-08-13,11129,Saturday,1,8,2011,d_197,,,,,0,1,0 199 | 2011-08-14,11129,Sunday,2,8,2011,d_198,,,,,0,0,1 200 | 2011-08-15,11129,Monday,3,8,2011,d_199,,,,,0,1,1 201 | 2011-08-16,11129,Tuesday,4,8,2011,d_200,,,,,0,0,0 202 | 2011-08-17,11129,Wednesday,5,8,2011,d_201,,,,,0,0,0 203 | 2011-08-18,11129,Thursday,6,8,2011,d_202,,,,,0,0,0 204 | 2011-08-19,11129,Friday,7,8,2011,d_203,,,,,0,0,0 205 | 2011-08-20,11130,Saturday,1,8,2011,d_204,,,,,0,0,0 206 | 2011-08-21,11130,Sunday,2,8,2011,d_205,,,,,0,0,0 207 | 2011-08-22,11130,Monday,3,8,2011,d_206,,,,,0,0,0 208 | 2011-08-23,11130,Tuesday,4,8,2011,d_207,,,,,0,0,0 209 | 2011-08-24,11130,Wednesday,5,8,2011,d_208,,,,,0,0,0 210 | 2011-08-25,11130,Thursday,6,8,2011,d_209,,,,,0,0,0 211 | 2011-08-26,11130,Friday,7,8,2011,d_210,,,,,0,0,0 212 | 2011-08-27,11131,Saturday,1,8,2011,d_211,,,,,0,0,0 213 | 2011-08-28,11131,Sunday,2,8,2011,d_212,,,,,0,0,0 214 | 2011-08-29,11131,Monday,3,8,2011,d_213,,,,,0,0,0 215 | 2011-08-30,11131,Tuesday,4,8,2011,d_214,,,,,0,0,0 216 | 2011-08-31,11131,Wednesday,5,8,2011,d_215,Eid al-Fitr,Religious,,,0,0,0 217 | 2011-09-01,11131,Thursday,6,9,2011,d_216,,,,,1,1,0 218 | 2011-09-02,11131,Friday,7,9,2011,d_217,,,,,1,0,1 219 | 2011-09-03,11132,Saturday,1,9,2011,d_218,,,,,1,1,1 220 | 2011-09-04,11132,Sunday,2,9,2011,d_219,,,,,1,0,0 221 | 2011-09-05,11132,Monday,3,9,2011,d_220,LaborDay,National,,,1,1,1 222 | 2011-09-06,11132,Tuesday,4,9,2011,d_221,,,,,1,1,1 223 | 2011-09-07,11132,Wednesday,5,9,2011,d_222,,,,,1,1,0 224 | 2011-09-08,11132,Thursday,6,9,2011,d_223,,,,,1,0,1 225 | 2011-09-09,11132,Friday,7,9,2011,d_224,,,,,1,1,1 226 | 2011-09-10,11133,Saturday,1,9,2011,d_225,,,,,1,0,0 227 | 2011-09-11,11133,Sunday,2,9,2011,d_226,,,,,0,1,1 228 | 2011-09-12,11133,Monday,3,9,2011,d_227,,,,,0,1,1 229 | 2011-09-13,11133,Tuesday,4,9,2011,d_228,,,,,0,1,0 230 | 2011-09-14,11133,Wednesday,5,9,2011,d_229,,,,,0,0,1 231 | 2011-09-15,11133,Thursday,6,9,2011,d_230,,,,,0,1,1 232 | 2011-09-16,11133,Friday,7,9,2011,d_231,,,,,0,0,0 233 | 2011-09-17,11134,Saturday,1,9,2011,d_232,,,,,0,0,0 234 | 2011-09-18,11134,Sunday,2,9,2011,d_233,,,,,0,0,0 235 | 2011-09-19,11134,Monday,3,9,2011,d_234,,,,,0,0,0 236 | 2011-09-20,11134,Tuesday,4,9,2011,d_235,,,,,0,0,0 237 | 2011-09-21,11134,Wednesday,5,9,2011,d_236,,,,,0,0,0 238 | 2011-09-22,11134,Thursday,6,9,2011,d_237,,,,,0,0,0 239 | 2011-09-23,11134,Friday,7,9,2011,d_238,,,,,0,0,0 240 | 2011-09-24,11135,Saturday,1,9,2011,d_239,,,,,0,0,0 241 | 2011-09-25,11135,Sunday,2,9,2011,d_240,,,,,0,0,0 242 | 2011-09-26,11135,Monday,3,9,2011,d_241,,,,,0,0,0 243 | 2011-09-27,11135,Tuesday,4,9,2011,d_242,,,,,0,0,0 244 | 2011-09-28,11135,Wednesday,5,9,2011,d_243,,,,,0,0,0 245 | 2011-09-29,11135,Thursday,6,9,2011,d_244,,,,,0,0,0 246 | 2011-09-30,11135,Friday,7,9,2011,d_245,,,,,0,0,0 247 | 2011-10-01,11136,Saturday,1,10,2011,d_246,,,,,1,1,0 248 | 2011-10-02,11136,Sunday,2,10,2011,d_247,,,,,1,0,1 249 | 2011-10-03,11136,Monday,3,10,2011,d_248,,,,,1,1,1 250 | 2011-10-04,11136,Tuesday,4,10,2011,d_249,,,,,1,0,0 251 | 2011-10-05,11136,Wednesday,5,10,2011,d_250,,,,,1,1,1 252 | 2011-10-06,11136,Thursday,6,10,2011,d_251,,,,,1,1,1 253 | 2011-10-07,11136,Friday,7,10,2011,d_252,,,,,1,1,0 254 | 2011-10-08,11137,Saturday,1,10,2011,d_253,,,,,1,0,1 255 | 2011-10-09,11137,Sunday,2,10,2011,d_254,,,,,1,1,1 256 | 2011-10-10,11137,Monday,3,10,2011,d_255,ColumbusDay,National,,,1,0,0 257 | 2011-10-11,11137,Tuesday,4,10,2011,d_256,,,,,0,1,1 258 | 2011-10-12,11137,Wednesday,5,10,2011,d_257,,,,,0,1,1 259 | 2011-10-13,11137,Thursday,6,10,2011,d_258,,,,,0,1,0 260 | 2011-10-14,11137,Friday,7,10,2011,d_259,,,,,0,0,1 261 | 2011-10-15,11138,Saturday,1,10,2011,d_260,,,,,0,1,1 262 | 2011-10-16,11138,Sunday,2,10,2011,d_261,,,,,0,0,0 263 | 2011-10-17,11138,Monday,3,10,2011,d_262,,,,,0,0,0 264 | 2011-10-18,11138,Tuesday,4,10,2011,d_263,,,,,0,0,0 265 | 2011-10-19,11138,Wednesday,5,10,2011,d_264,,,,,0,0,0 266 | 2011-10-20,11138,Thursday,6,10,2011,d_265,,,,,0,0,0 267 | 2011-10-21,11138,Friday,7,10,2011,d_266,,,,,0,0,0 268 | 2011-10-22,11139,Saturday,1,10,2011,d_267,,,,,0,0,0 269 | 2011-10-23,11139,Sunday,2,10,2011,d_268,,,,,0,0,0 270 | 2011-10-24,11139,Monday,3,10,2011,d_269,,,,,0,0,0 271 | 2011-10-25,11139,Tuesday,4,10,2011,d_270,,,,,0,0,0 272 | 2011-10-26,11139,Wednesday,5,10,2011,d_271,,,,,0,0,0 273 | 2011-10-27,11139,Thursday,6,10,2011,d_272,,,,,0,0,0 274 | 2011-10-28,11139,Friday,7,10,2011,d_273,,,,,0,0,0 275 | 2011-10-29,11140,Saturday,1,10,2011,d_274,,,,,0,0,0 276 | 2011-10-30,11140,Sunday,2,10,2011,d_275,,,,,0,0,0 277 | 2011-10-31,11140,Monday,3,10,2011,d_276,Halloween,Cultural,,,0,0,0 278 | 2011-11-01,11140,Tuesday,4,11,2011,d_277,,,,,1,1,0 279 | 2011-11-02,11140,Wednesday,5,11,2011,d_278,,,,,1,0,1 280 | 2011-11-03,11140,Thursday,6,11,2011,d_279,,,,,1,1,1 281 | 2011-11-04,11140,Friday,7,11,2011,d_280,,,,,1,0,0 282 | 2011-11-05,11141,Saturday,1,11,2011,d_281,,,,,1,1,1 283 | 2011-11-06,11141,Sunday,2,11,2011,d_282,,,,,1,1,1 284 | 2011-11-07,11141,Monday,3,11,2011,d_283,EidAlAdha,Religious,,,1,1,0 285 | 2011-11-08,11141,Tuesday,4,11,2011,d_284,,,,,1,0,1 286 | 2011-11-09,11141,Wednesday,5,11,2011,d_285,,,,,1,1,1 287 | 2011-11-10,11141,Thursday,6,11,2011,d_286,,,,,1,0,0 288 | 2011-11-11,11141,Friday,7,11,2011,d_287,VeteransDay,National,,,0,1,1 289 | 2011-11-12,11142,Saturday,1,11,2011,d_288,,,,,0,1,1 290 | 2011-11-13,11142,Sunday,2,11,2011,d_289,,,,,0,1,0 291 | 2011-11-14,11142,Monday,3,11,2011,d_290,,,,,0,0,1 292 | 2011-11-15,11142,Tuesday,4,11,2011,d_291,,,,,0,1,1 293 | 2011-11-16,11142,Wednesday,5,11,2011,d_292,,,,,0,0,0 294 | 2011-11-17,11142,Thursday,6,11,2011,d_293,,,,,0,0,0 295 | 2011-11-18,11142,Friday,7,11,2011,d_294,,,,,0,0,0 296 | 2011-11-19,11143,Saturday,1,11,2011,d_295,,,,,0,0,0 297 | 2011-11-20,11143,Sunday,2,11,2011,d_296,,,,,0,0,0 298 | 2011-11-21,11143,Monday,3,11,2011,d_297,,,,,0,0,0 299 | 2011-11-22,11143,Tuesday,4,11,2011,d_298,,,,,0,0,0 300 | 2011-11-23,11143,Wednesday,5,11,2011,d_299,,,,,0,0,0 301 | 2011-11-24,11143,Thursday,6,11,2011,d_300,Thanksgiving,National,,,0,0,0 302 | 2011-11-25,11143,Friday,7,11,2011,d_301,,,,,0,0,0 303 | 2011-11-26,11144,Saturday,1,11,2011,d_302,,,,,0,0,0 304 | 2011-11-27,11144,Sunday,2,11,2011,d_303,,,,,0,0,0 305 | 2011-11-28,11144,Monday,3,11,2011,d_304,,,,,0,0,0 306 | 2011-11-29,11144,Tuesday,4,11,2011,d_305,,,,,0,0,0 307 | 2011-11-30,11144,Wednesday,5,11,2011,d_306,,,,,0,0,0 308 | 2011-12-01,11144,Thursday,6,12,2011,d_307,,,,,1,1,0 309 | 2011-12-02,11144,Friday,7,12,2011,d_308,,,,,1,0,1 310 | 2011-12-03,11145,Saturday,1,12,2011,d_309,,,,,1,1,1 311 | 2011-12-04,11145,Sunday,2,12,2011,d_310,,,,,1,0,0 312 | 2011-12-05,11145,Monday,3,12,2011,d_311,,,,,1,1,1 313 | 2011-12-06,11145,Tuesday,4,12,2011,d_312,,,,,1,1,1 314 | 2011-12-07,11145,Wednesday,5,12,2011,d_313,,,,,1,1,0 315 | 2011-12-08,11145,Thursday,6,12,2011,d_314,,,,,1,0,1 316 | 2011-12-09,11145,Friday,7,12,2011,d_315,,,,,1,1,1 317 | 2011-12-10,11146,Saturday,1,12,2011,d_316,,,,,1,0,0 318 | 2011-12-11,11146,Sunday,2,12,2011,d_317,,,,,0,1,1 319 | 2011-12-12,11146,Monday,3,12,2011,d_318,,,,,0,1,1 320 | 2011-12-13,11146,Tuesday,4,12,2011,d_319,,,,,0,1,0 321 | 2011-12-14,11146,Wednesday,5,12,2011,d_320,,,,,0,0,1 322 | 2011-12-15,11146,Thursday,6,12,2011,d_321,,,,,0,1,1 323 | 2011-12-16,11146,Friday,7,12,2011,d_322,,,,,0,0,0 324 | 2011-12-17,11147,Saturday,1,12,2011,d_323,,,,,0,0,0 325 | 2011-12-18,11147,Sunday,2,12,2011,d_324,,,,,0,0,0 326 | 2011-12-19,11147,Monday,3,12,2011,d_325,,,,,0,0,0 327 | 2011-12-20,11147,Tuesday,4,12,2011,d_326,,,,,0,0,0 328 | 2011-12-21,11147,Wednesday,5,12,2011,d_327,,,,,0,0,0 329 | 2011-12-22,11147,Thursday,6,12,2011,d_328,,,,,0,0,0 330 | 2011-12-23,11147,Friday,7,12,2011,d_329,,,,,0,0,0 331 | 2011-12-24,11148,Saturday,1,12,2011,d_330,,,,,0,0,0 332 | 2011-12-25,11148,Sunday,2,12,2011,d_331,Christmas,National,,,0,0,0 333 | 2011-12-26,11148,Monday,3,12,2011,d_332,,,,,0,0,0 334 | 2011-12-27,11148,Tuesday,4,12,2011,d_333,,,,,0,0,0 335 | 2011-12-28,11148,Wednesday,5,12,2011,d_334,Chanukah End,Religious,,,0,0,0 336 | 2011-12-29,11148,Thursday,6,12,2011,d_335,,,,,0,0,0 337 | 2011-12-30,11148,Friday,7,12,2011,d_336,,,,,0,0,0 338 | 2011-12-31,11149,Saturday,1,12,2011,d_337,,,,,0,0,0 339 | 2012-01-01,11149,Sunday,2,1,2012,d_338,NewYear,National,,,1,1,0 340 | 2012-01-02,11149,Monday,3,1,2012,d_339,,,,,1,0,1 341 | 2012-01-03,11149,Tuesday,4,1,2012,d_340,,,,,1,1,1 342 | 2012-01-04,11149,Wednesday,5,1,2012,d_341,,,,,1,0,0 343 | 2012-01-05,11149,Thursday,6,1,2012,d_342,,,,,1,1,1 344 | 2012-01-06,11149,Friday,7,1,2012,d_343,,,,,1,1,1 345 | 2012-01-07,11150,Saturday,1,1,2012,d_344,OrthodoxChristmas,Religious,,,1,1,0 346 | 2012-01-08,11150,Sunday,2,1,2012,d_345,,,,,1,0,1 347 | 2012-01-09,11150,Monday,3,1,2012,d_346,,,,,1,1,1 348 | 2012-01-10,11150,Tuesday,4,1,2012,d_347,,,,,1,0,0 349 | 2012-01-11,11150,Wednesday,5,1,2012,d_348,,,,,0,1,1 350 | 2012-01-12,11150,Thursday,6,1,2012,d_349,,,,,0,1,1 351 | 2012-01-13,11150,Friday,7,1,2012,d_350,,,,,0,1,0 352 | 2012-01-14,11151,Saturday,1,1,2012,d_351,,,,,0,0,1 353 | 2012-01-15,11151,Sunday,2,1,2012,d_352,,,,,0,1,1 354 | 2012-01-16,11151,Monday,3,1,2012,d_353,MartinLutherKingDay,National,,,0,0,0 355 | 2012-01-17,11151,Tuesday,4,1,2012,d_354,,,,,0,0,0 356 | 2012-01-18,11151,Wednesday,5,1,2012,d_355,,,,,0,0,0 357 | 2012-01-19,11151,Thursday,6,1,2012,d_356,,,,,0,0,0 358 | 2012-01-20,11151,Friday,7,1,2012,d_357,,,,,0,0,0 359 | 2012-01-21,11152,Saturday,1,1,2012,d_358,,,,,0,0,0 360 | 2012-01-22,11152,Sunday,2,1,2012,d_359,,,,,0,0,0 361 | 2012-01-23,11152,Monday,3,1,2012,d_360,,,,,0,0,0 362 | 2012-01-24,11152,Tuesday,4,1,2012,d_361,,,,,0,0,0 363 | 2012-01-25,11152,Wednesday,5,1,2012,d_362,,,,,0,0,0 364 | 2012-01-26,11152,Thursday,6,1,2012,d_363,,,,,0,0,0 365 | 2012-01-27,11152,Friday,7,1,2012,d_364,,,,,0,0,0 366 | 2012-01-28,11201,Saturday,1,1,2012,d_365,,,,,0,0,0 367 | 2012-01-29,11201,Sunday,2,1,2012,d_366,,,,,0,0,0 368 | 2012-01-30,11201,Monday,3,1,2012,d_367,,,,,0,0,0 369 | 2012-01-31,11201,Tuesday,4,1,2012,d_368,,,,,0,0,0 370 | 2012-02-01,11201,Wednesday,5,2,2012,d_369,,,,,1,1,0 371 | 2012-02-02,11201,Thursday,6,2,2012,d_370,,,,,1,0,1 372 | 2012-02-03,11201,Friday,7,2,2012,d_371,,,,,1,1,1 373 | 2012-02-04,11202,Saturday,1,2,2012,d_372,,,,,1,0,0 374 | 2012-02-05,11202,Sunday,2,2,2012,d_373,SuperBowl,Sporting,,,1,1,1 375 | 2012-02-06,11202,Monday,3,2,2012,d_374,,,,,1,1,1 376 | 2012-02-07,11202,Tuesday,4,2,2012,d_375,,,,,1,1,0 377 | 2012-02-08,11202,Wednesday,5,2,2012,d_376,,,,,1,0,1 378 | 2012-02-09,11202,Thursday,6,2,2012,d_377,,,,,1,1,1 379 | 2012-02-10,11202,Friday,7,2,2012,d_378,,,,,1,0,0 380 | 2012-02-11,11203,Saturday,1,2,2012,d_379,,,,,0,1,1 381 | 2012-02-12,11203,Sunday,2,2,2012,d_380,,,,,0,1,1 382 | 2012-02-13,11203,Monday,3,2,2012,d_381,,,,,0,1,0 383 | 2012-02-14,11203,Tuesday,4,2,2012,d_382,ValentinesDay,Cultural,,,0,0,1 384 | 2012-02-15,11203,Wednesday,5,2,2012,d_383,,,,,0,1,1 385 | 2012-02-16,11203,Thursday,6,2,2012,d_384,,,,,0,0,0 386 | 2012-02-17,11203,Friday,7,2,2012,d_385,,,,,0,0,0 387 | 2012-02-18,11204,Saturday,1,2,2012,d_386,,,,,0,0,0 388 | 2012-02-19,11204,Sunday,2,2,2012,d_387,,,,,0,0,0 389 | 2012-02-20,11204,Monday,3,2,2012,d_388,PresidentsDay,National,,,0,0,0 390 | 2012-02-21,11204,Tuesday,4,2,2012,d_389,,,,,0,0,0 391 | 2012-02-22,11204,Wednesday,5,2,2012,d_390,LentStart,Religious,,,0,0,0 392 | 2012-02-23,11204,Thursday,6,2,2012,d_391,,,,,0,0,0 393 | 2012-02-24,11204,Friday,7,2,2012,d_392,,,,,0,0,0 394 | 2012-02-25,11205,Saturday,1,2,2012,d_393,,,,,0,0,0 395 | 2012-02-26,11205,Sunday,2,2,2012,d_394,,,,,0,0,0 396 | 2012-02-27,11205,Monday,3,2,2012,d_395,,,,,0,0,0 397 | 2012-02-28,11205,Tuesday,4,2,2012,d_396,,,,,0,0,0 398 | 2012-02-29,11205,Wednesday,5,2,2012,d_397,LentWeek2,Religious,,,0,0,0 399 | 2012-03-01,11205,Thursday,6,3,2012,d_398,,,,,1,1,0 400 | 2012-03-02,11205,Friday,7,3,2012,d_399,,,,,1,0,1 401 | 2012-03-03,11206,Saturday,1,3,2012,d_400,,,,,1,1,1 402 | 2012-03-04,11206,Sunday,2,3,2012,d_401,,,,,1,0,0 403 | 2012-03-05,11206,Monday,3,3,2012,d_402,,,,,1,1,1 404 | 2012-03-06,11206,Tuesday,4,3,2012,d_403,,,,,1,1,1 405 | 2012-03-07,11206,Wednesday,5,3,2012,d_404,,,,,1,1,0 406 | 2012-03-08,11206,Thursday,6,3,2012,d_405,Purim End,Religious,,,1,0,1 407 | 2012-03-09,11206,Friday,7,3,2012,d_406,,,,,1,1,1 408 | 2012-03-10,11207,Saturday,1,3,2012,d_407,,,,,1,0,0 409 | 2012-03-11,11207,Sunday,2,3,2012,d_408,,,,,0,1,1 410 | 2012-03-12,11207,Monday,3,3,2012,d_409,,,,,0,1,1 411 | 2012-03-13,11207,Tuesday,4,3,2012,d_410,,,,,0,1,0 412 | 2012-03-14,11207,Wednesday,5,3,2012,d_411,,,,,0,0,1 413 | 2012-03-15,11207,Thursday,6,3,2012,d_412,,,,,0,1,1 414 | 2012-03-16,11207,Friday,7,3,2012,d_413,,,,,0,0,0 415 | 2012-03-17,11208,Saturday,1,3,2012,d_414,StPatricksDay,Cultural,,,0,0,0 416 | 2012-03-18,11208,Sunday,2,3,2012,d_415,,,,,0,0,0 417 | 2012-03-19,11208,Monday,3,3,2012,d_416,,,,,0,0,0 418 | 2012-03-20,11208,Tuesday,4,3,2012,d_417,,,,,0,0,0 419 | 2012-03-21,11208,Wednesday,5,3,2012,d_418,,,,,0,0,0 420 | 2012-03-22,11208,Thursday,6,3,2012,d_419,,,,,0,0,0 421 | 2012-03-23,11208,Friday,7,3,2012,d_420,,,,,0,0,0 422 | 2012-03-24,11209,Saturday,1,3,2012,d_421,,,,,0,0,0 423 | 2012-03-25,11209,Sunday,2,3,2012,d_422,,,,,0,0,0 424 | 2012-03-26,11209,Monday,3,3,2012,d_423,,,,,0,0,0 425 | 2012-03-27,11209,Tuesday,4,3,2012,d_424,,,,,0,0,0 426 | 2012-03-28,11209,Wednesday,5,3,2012,d_425,,,,,0,0,0 427 | 2012-03-29,11209,Thursday,6,3,2012,d_426,,,,,0,0,0 428 | 2012-03-30,11209,Friday,7,3,2012,d_427,,,,,0,0,0 429 | 2012-03-31,11210,Saturday,1,3,2012,d_428,,,,,0,0,0 430 | 2012-04-01,11210,Sunday,2,4,2012,d_429,,,,,1,1,0 431 | 2012-04-02,11210,Monday,3,4,2012,d_430,,,,,1,0,1 432 | 2012-04-03,11210,Tuesday,4,4,2012,d_431,,,,,1,1,1 433 | 2012-04-04,11210,Wednesday,5,4,2012,d_432,,,,,1,0,0 434 | 2012-04-05,11210,Thursday,6,4,2012,d_433,,,,,1,1,1 435 | 2012-04-06,11210,Friday,7,4,2012,d_434,,,,,1,1,1 436 | 2012-04-07,11211,Saturday,1,4,2012,d_435,,,,,1,1,0 437 | 2012-04-08,11211,Sunday,2,4,2012,d_436,Easter,Cultural,,,1,0,1 438 | 2012-04-09,11211,Monday,3,4,2012,d_437,,,,,1,1,1 439 | 2012-04-10,11211,Tuesday,4,4,2012,d_438,,,,,1,0,0 440 | 2012-04-11,11211,Wednesday,5,4,2012,d_439,,,,,0,1,1 441 | 2012-04-12,11211,Thursday,6,4,2012,d_440,,,,,0,1,1 442 | 2012-04-13,11211,Friday,7,4,2012,d_441,,,,,0,1,0 443 | 2012-04-14,11212,Saturday,1,4,2012,d_442,Pesach End,Religious,,,0,0,1 444 | 2012-04-15,11212,Sunday,2,4,2012,d_443,OrthodoxEaster,Religious,,,0,1,1 445 | 2012-04-16,11212,Monday,3,4,2012,d_444,,,,,0,0,0 446 | 2012-04-17,11212,Tuesday,4,4,2012,d_445,,,,,0,0,0 447 | 2012-04-18,11212,Wednesday,5,4,2012,d_446,,,,,0,0,0 448 | 2012-04-19,11212,Thursday,6,4,2012,d_447,,,,,0,0,0 449 | 2012-04-20,11212,Friday,7,4,2012,d_448,,,,,0,0,0 450 | 2012-04-21,11213,Saturday,1,4,2012,d_449,,,,,0,0,0 451 | 2012-04-22,11213,Sunday,2,4,2012,d_450,,,,,0,0,0 452 | 2012-04-23,11213,Monday,3,4,2012,d_451,,,,,0,0,0 453 | 2012-04-24,11213,Tuesday,4,4,2012,d_452,,,,,0,0,0 454 | 2012-04-25,11213,Wednesday,5,4,2012,d_453,,,,,0,0,0 455 | 2012-04-26,11213,Thursday,6,4,2012,d_454,,,,,0,0,0 456 | 2012-04-27,11213,Friday,7,4,2012,d_455,,,,,0,0,0 457 | 2012-04-28,11214,Saturday,1,4,2012,d_456,,,,,0,0,0 458 | 2012-04-29,11214,Sunday,2,4,2012,d_457,,,,,0,0,0 459 | 2012-04-30,11214,Monday,3,4,2012,d_458,,,,,0,0,0 460 | 2012-05-01,11214,Tuesday,4,5,2012,d_459,,,,,1,1,0 461 | 2012-05-02,11214,Wednesday,5,5,2012,d_460,,,,,1,0,1 462 | 2012-05-03,11214,Thursday,6,5,2012,d_461,,,,,1,1,1 463 | 2012-05-04,11214,Friday,7,5,2012,d_462,,,,,1,0,0 464 | 2012-05-05,11215,Saturday,1,5,2012,d_463,Cinco De Mayo,Cultural,,,1,1,1 465 | 2012-05-06,11215,Sunday,2,5,2012,d_464,,,,,1,1,1 466 | 2012-05-07,11215,Monday,3,5,2012,d_465,,,,,1,1,0 467 | 2012-05-08,11215,Tuesday,4,5,2012,d_466,,,,,1,0,1 468 | 2012-05-09,11215,Wednesday,5,5,2012,d_467,,,,,1,1,1 469 | 2012-05-10,11215,Thursday,6,5,2012,d_468,,,,,1,0,0 470 | 2012-05-11,11215,Friday,7,5,2012,d_469,,,,,0,1,1 471 | 2012-05-12,11216,Saturday,1,5,2012,d_470,,,,,0,1,1 472 | 2012-05-13,11216,Sunday,2,5,2012,d_471,Mother's day,Cultural,,,0,1,0 473 | 2012-05-14,11216,Monday,3,5,2012,d_472,,,,,0,0,1 474 | 2012-05-15,11216,Tuesday,4,5,2012,d_473,,,,,0,1,1 475 | 2012-05-16,11216,Wednesday,5,5,2012,d_474,,,,,0,0,0 476 | 2012-05-17,11216,Thursday,6,5,2012,d_475,,,,,0,0,0 477 | 2012-05-18,11216,Friday,7,5,2012,d_476,,,,,0,0,0 478 | 2012-05-19,11217,Saturday,1,5,2012,d_477,,,,,0,0,0 479 | 2012-05-20,11217,Sunday,2,5,2012,d_478,,,,,0,0,0 480 | 2012-05-21,11217,Monday,3,5,2012,d_479,,,,,0,0,0 481 | 2012-05-22,11217,Tuesday,4,5,2012,d_480,,,,,0,0,0 482 | 2012-05-23,11217,Wednesday,5,5,2012,d_481,,,,,0,0,0 483 | 2012-05-24,11217,Thursday,6,5,2012,d_482,,,,,0,0,0 484 | 2012-05-25,11217,Friday,7,5,2012,d_483,,,,,0,0,0 485 | 2012-05-26,11218,Saturday,1,5,2012,d_484,,,,,0,0,0 486 | 2012-05-27,11218,Sunday,2,5,2012,d_485,,,,,0,0,0 487 | 2012-05-28,11218,Monday,3,5,2012,d_486,MemorialDay,National,,,0,0,0 488 | 2012-05-29,11218,Tuesday,4,5,2012,d_487,,,,,0,0,0 489 | 2012-05-30,11218,Wednesday,5,5,2012,d_488,,,,,0,0,0 490 | 2012-05-31,11218,Thursday,6,5,2012,d_489,,,,,0,0,0 491 | 2012-06-01,11218,Friday,7,6,2012,d_490,,,,,1,1,0 492 | 2012-06-02,11219,Saturday,1,6,2012,d_491,,,,,1,0,1 493 | 2012-06-03,11219,Sunday,2,6,2012,d_492,,,,,1,1,1 494 | 2012-06-04,11219,Monday,3,6,2012,d_493,,,,,1,0,0 495 | 2012-06-05,11219,Tuesday,4,6,2012,d_494,,,,,1,1,1 496 | 2012-06-06,11219,Wednesday,5,6,2012,d_495,,,,,1,1,1 497 | 2012-06-07,11219,Thursday,6,6,2012,d_496,,,,,1,1,0 498 | 2012-06-08,11219,Friday,7,6,2012,d_497,,,,,1,0,1 499 | 2012-06-09,11220,Saturday,1,6,2012,d_498,,,,,1,1,1 500 | 2012-06-10,11220,Sunday,2,6,2012,d_499,,,,,1,0,0 501 | 2012-06-11,11220,Monday,3,6,2012,d_500,,,,,0,1,1 502 | 2012-06-12,11220,Tuesday,4,6,2012,d_501,NBAFinalsStart,Sporting,,,0,1,1 503 | 2012-06-13,11220,Wednesday,5,6,2012,d_502,,,,,0,1,0 504 | 2012-06-14,11220,Thursday,6,6,2012,d_503,,,,,0,0,1 505 | 2012-06-15,11220,Friday,7,6,2012,d_504,,,,,0,1,1 506 | 2012-06-16,11221,Saturday,1,6,2012,d_505,,,,,0,0,0 507 | 2012-06-17,11221,Sunday,2,6,2012,d_506,Father's day,Cultural,,,0,0,0 508 | 2012-06-18,11221,Monday,3,6,2012,d_507,,,,,0,0,0 509 | 2012-06-19,11221,Tuesday,4,6,2012,d_508,,,,,0,0,0 510 | 2012-06-20,11221,Wednesday,5,6,2012,d_509,,,,,0,0,0 511 | 2012-06-21,11221,Thursday,6,6,2012,d_510,NBAFinalsEnd,Sporting,,,0,0,0 512 | 2012-06-22,11221,Friday,7,6,2012,d_511,,,,,0,0,0 513 | 2012-06-23,11222,Saturday,1,6,2012,d_512,,,,,0,0,0 514 | 2012-06-24,11222,Sunday,2,6,2012,d_513,,,,,0,0,0 515 | 2012-06-25,11222,Monday,3,6,2012,d_514,,,,,0,0,0 516 | 2012-06-26,11222,Tuesday,4,6,2012,d_515,,,,,0,0,0 517 | 2012-06-27,11222,Wednesday,5,6,2012,d_516,,,,,0,0,0 518 | 2012-06-28,11222,Thursday,6,6,2012,d_517,,,,,0,0,0 519 | 2012-06-29,11222,Friday,7,6,2012,d_518,,,,,0,0,0 520 | 2012-06-30,11223,Saturday,1,6,2012,d_519,,,,,0,0,0 521 | 2012-07-01,11223,Sunday,2,7,2012,d_520,,,,,1,1,0 522 | 2012-07-02,11223,Monday,3,7,2012,d_521,,,,,1,0,1 523 | 2012-07-03,11223,Tuesday,4,7,2012,d_522,,,,,1,1,1 524 | 2012-07-04,11223,Wednesday,5,7,2012,d_523,IndependenceDay,National,,,1,0,0 525 | 2012-07-05,11223,Thursday,6,7,2012,d_524,,,,,1,1,1 526 | 2012-07-06,11223,Friday,7,7,2012,d_525,,,,,1,1,1 527 | 2012-07-07,11224,Saturday,1,7,2012,d_526,,,,,1,1,0 528 | 2012-07-08,11224,Sunday,2,7,2012,d_527,,,,,1,0,1 529 | 2012-07-09,11224,Monday,3,7,2012,d_528,,,,,1,1,1 530 | 2012-07-10,11224,Tuesday,4,7,2012,d_529,,,,,1,0,0 531 | 2012-07-11,11224,Wednesday,5,7,2012,d_530,,,,,0,1,1 532 | 2012-07-12,11224,Thursday,6,7,2012,d_531,,,,,0,1,1 533 | 2012-07-13,11224,Friday,7,7,2012,d_532,,,,,0,1,0 534 | 2012-07-14,11225,Saturday,1,7,2012,d_533,,,,,0,0,1 535 | 2012-07-15,11225,Sunday,2,7,2012,d_534,,,,,0,1,1 536 | 2012-07-16,11225,Monday,3,7,2012,d_535,,,,,0,0,0 537 | 2012-07-17,11225,Tuesday,4,7,2012,d_536,,,,,0,0,0 538 | 2012-07-18,11225,Wednesday,5,7,2012,d_537,,,,,0,0,0 539 | 2012-07-19,11225,Thursday,6,7,2012,d_538,,,,,0,0,0 540 | 2012-07-20,11225,Friday,7,7,2012,d_539,Ramadan starts,Religious,,,0,0,0 541 | 2012-07-21,11226,Saturday,1,7,2012,d_540,,,,,0,0,0 542 | 2012-07-22,11226,Sunday,2,7,2012,d_541,,,,,0,0,0 543 | 2012-07-23,11226,Monday,3,7,2012,d_542,,,,,0,0,0 544 | 2012-07-24,11226,Tuesday,4,7,2012,d_543,,,,,0,0,0 545 | 2012-07-25,11226,Wednesday,5,7,2012,d_544,,,,,0,0,0 546 | 2012-07-26,11226,Thursday,6,7,2012,d_545,,,,,0,0,0 547 | 2012-07-27,11226,Friday,7,7,2012,d_546,,,,,0,0,0 548 | 2012-07-28,11227,Saturday,1,7,2012,d_547,,,,,0,0,0 549 | 2012-07-29,11227,Sunday,2,7,2012,d_548,,,,,0,0,0 550 | 2012-07-30,11227,Monday,3,7,2012,d_549,,,,,0,0,0 551 | 2012-07-31,11227,Tuesday,4,7,2012,d_550,,,,,0,0,0 552 | 2012-08-01,11227,Wednesday,5,8,2012,d_551,,,,,1,1,0 553 | 2012-08-02,11227,Thursday,6,8,2012,d_552,,,,,1,0,1 554 | 2012-08-03,11227,Friday,7,8,2012,d_553,,,,,1,1,1 555 | 2012-08-04,11228,Saturday,1,8,2012,d_554,,,,,1,0,0 556 | 2012-08-05,11228,Sunday,2,8,2012,d_555,,,,,1,1,1 557 | 2012-08-06,11228,Monday,3,8,2012,d_556,,,,,1,1,1 558 | 2012-08-07,11228,Tuesday,4,8,2012,d_557,,,,,1,1,0 559 | 2012-08-08,11228,Wednesday,5,8,2012,d_558,,,,,1,0,1 560 | 2012-08-09,11228,Thursday,6,8,2012,d_559,,,,,1,1,1 561 | 2012-08-10,11228,Friday,7,8,2012,d_560,,,,,1,0,0 562 | 2012-08-11,11229,Saturday,1,8,2012,d_561,,,,,0,1,1 563 | 2012-08-12,11229,Sunday,2,8,2012,d_562,,,,,0,1,1 564 | 2012-08-13,11229,Monday,3,8,2012,d_563,,,,,0,1,0 565 | 2012-08-14,11229,Tuesday,4,8,2012,d_564,,,,,0,0,1 566 | 2012-08-15,11229,Wednesday,5,8,2012,d_565,,,,,0,1,1 567 | 2012-08-16,11229,Thursday,6,8,2012,d_566,,,,,0,0,0 568 | 2012-08-17,11229,Friday,7,8,2012,d_567,,,,,0,0,0 569 | 2012-08-18,11230,Saturday,1,8,2012,d_568,,,,,0,0,0 570 | 2012-08-19,11230,Sunday,2,8,2012,d_569,Eid al-Fitr,Religious,,,0,0,0 571 | 2012-08-20,11230,Monday,3,8,2012,d_570,,,,,0,0,0 572 | 2012-08-21,11230,Tuesday,4,8,2012,d_571,,,,,0,0,0 573 | 2012-08-22,11230,Wednesday,5,8,2012,d_572,,,,,0,0,0 574 | 2012-08-23,11230,Thursday,6,8,2012,d_573,,,,,0,0,0 575 | 2012-08-24,11230,Friday,7,8,2012,d_574,,,,,0,0,0 576 | 2012-08-25,11231,Saturday,1,8,2012,d_575,,,,,0,0,0 577 | 2012-08-26,11231,Sunday,2,8,2012,d_576,,,,,0,0,0 578 | 2012-08-27,11231,Monday,3,8,2012,d_577,,,,,0,0,0 579 | 2012-08-28,11231,Tuesday,4,8,2012,d_578,,,,,0,0,0 580 | 2012-08-29,11231,Wednesday,5,8,2012,d_579,,,,,0,0,0 581 | 2012-08-30,11231,Thursday,6,8,2012,d_580,,,,,0,0,0 582 | 2012-08-31,11231,Friday,7,8,2012,d_581,,,,,0,0,0 583 | 2012-09-01,11232,Saturday,1,9,2012,d_582,,,,,1,1,0 584 | 2012-09-02,11232,Sunday,2,9,2012,d_583,,,,,1,0,1 585 | 2012-09-03,11232,Monday,3,9,2012,d_584,LaborDay,National,,,1,1,1 586 | 2012-09-04,11232,Tuesday,4,9,2012,d_585,,,,,1,0,0 587 | 2012-09-05,11232,Wednesday,5,9,2012,d_586,,,,,1,1,1 588 | 2012-09-06,11232,Thursday,6,9,2012,d_587,,,,,1,1,1 589 | 2012-09-07,11232,Friday,7,9,2012,d_588,,,,,1,1,0 590 | 2012-09-08,11233,Saturday,1,9,2012,d_589,,,,,1,0,1 591 | 2012-09-09,11233,Sunday,2,9,2012,d_590,,,,,1,1,1 592 | 2012-09-10,11233,Monday,3,9,2012,d_591,,,,,1,0,0 593 | 2012-09-11,11233,Tuesday,4,9,2012,d_592,,,,,0,1,1 594 | 2012-09-12,11233,Wednesday,5,9,2012,d_593,,,,,0,1,1 595 | 2012-09-13,11233,Thursday,6,9,2012,d_594,,,,,0,1,0 596 | 2012-09-14,11233,Friday,7,9,2012,d_595,,,,,0,0,1 597 | 2012-09-15,11234,Saturday,1,9,2012,d_596,,,,,0,1,1 598 | 2012-09-16,11234,Sunday,2,9,2012,d_597,,,,,0,0,0 599 | 2012-09-17,11234,Monday,3,9,2012,d_598,,,,,0,0,0 600 | 2012-09-18,11234,Tuesday,4,9,2012,d_599,,,,,0,0,0 601 | 2012-09-19,11234,Wednesday,5,9,2012,d_600,,,,,0,0,0 602 | 2012-09-20,11234,Thursday,6,9,2012,d_601,,,,,0,0,0 603 | 2012-09-21,11234,Friday,7,9,2012,d_602,,,,,0,0,0 604 | 2012-09-22,11235,Saturday,1,9,2012,d_603,,,,,0,0,0 605 | 2012-09-23,11235,Sunday,2,9,2012,d_604,,,,,0,0,0 606 | 2012-09-24,11235,Monday,3,9,2012,d_605,,,,,0,0,0 607 | 2012-09-25,11235,Tuesday,4,9,2012,d_606,,,,,0,0,0 608 | 2012-09-26,11235,Wednesday,5,9,2012,d_607,,,,,0,0,0 609 | 2012-09-27,11235,Thursday,6,9,2012,d_608,,,,,0,0,0 610 | 2012-09-28,11235,Friday,7,9,2012,d_609,,,,,0,0,0 611 | 2012-09-29,11236,Saturday,1,9,2012,d_610,,,,,0,0,0 612 | 2012-09-30,11236,Sunday,2,9,2012,d_611,,,,,0,0,0 613 | 2012-10-01,11236,Monday,3,10,2012,d_612,,,,,1,1,0 614 | 2012-10-02,11236,Tuesday,4,10,2012,d_613,,,,,1,0,1 615 | 2012-10-03,11236,Wednesday,5,10,2012,d_614,,,,,1,1,1 616 | 2012-10-04,11236,Thursday,6,10,2012,d_615,,,,,1,0,0 617 | 2012-10-05,11236,Friday,7,10,2012,d_616,,,,,1,1,1 618 | 2012-10-06,11237,Saturday,1,10,2012,d_617,,,,,1,1,1 619 | 2012-10-07,11237,Sunday,2,10,2012,d_618,,,,,1,1,0 620 | 2012-10-08,11237,Monday,3,10,2012,d_619,ColumbusDay,National,,,1,0,1 621 | 2012-10-09,11237,Tuesday,4,10,2012,d_620,,,,,1,1,1 622 | 2012-10-10,11237,Wednesday,5,10,2012,d_621,,,,,1,0,0 623 | 2012-10-11,11237,Thursday,6,10,2012,d_622,,,,,0,1,1 624 | 2012-10-12,11237,Friday,7,10,2012,d_623,,,,,0,1,1 625 | 2012-10-13,11238,Saturday,1,10,2012,d_624,,,,,0,1,0 626 | 2012-10-14,11238,Sunday,2,10,2012,d_625,,,,,0,0,1 627 | 2012-10-15,11238,Monday,3,10,2012,d_626,,,,,0,1,1 628 | 2012-10-16,11238,Tuesday,4,10,2012,d_627,,,,,0,0,0 629 | 2012-10-17,11238,Wednesday,5,10,2012,d_628,,,,,0,0,0 630 | 2012-10-18,11238,Thursday,6,10,2012,d_629,,,,,0,0,0 631 | 2012-10-19,11238,Friday,7,10,2012,d_630,,,,,0,0,0 632 | 2012-10-20,11239,Saturday,1,10,2012,d_631,,,,,0,0,0 633 | 2012-10-21,11239,Sunday,2,10,2012,d_632,,,,,0,0,0 634 | 2012-10-22,11239,Monday,3,10,2012,d_633,,,,,0,0,0 635 | 2012-10-23,11239,Tuesday,4,10,2012,d_634,,,,,0,0,0 636 | 2012-10-24,11239,Wednesday,5,10,2012,d_635,,,,,0,0,0 637 | 2012-10-25,11239,Thursday,6,10,2012,d_636,,,,,0,0,0 638 | 2012-10-26,11239,Friday,7,10,2012,d_637,EidAlAdha,Religious,,,0,0,0 639 | 2012-10-27,11240,Saturday,1,10,2012,d_638,,,,,0,0,0 640 | 2012-10-28,11240,Sunday,2,10,2012,d_639,,,,,0,0,0 641 | 2012-10-29,11240,Monday,3,10,2012,d_640,,,,,0,0,0 642 | 2012-10-30,11240,Tuesday,4,10,2012,d_641,,,,,0,0,0 643 | 2012-10-31,11240,Wednesday,5,10,2012,d_642,Halloween,Cultural,,,0,0,0 644 | 2012-11-01,11240,Thursday,6,11,2012,d_643,,,,,1,1,0 645 | 2012-11-02,11240,Friday,7,11,2012,d_644,,,,,1,0,1 646 | 2012-11-03,11241,Saturday,1,11,2012,d_645,,,,,1,1,1 647 | 2012-11-04,11241,Sunday,2,11,2012,d_646,,,,,1,0,0 648 | 2012-11-05,11241,Monday,3,11,2012,d_647,,,,,1,1,1 649 | 2012-11-06,11241,Tuesday,4,11,2012,d_648,,,,,1,1,1 650 | 2012-11-07,11241,Wednesday,5,11,2012,d_649,,,,,1,1,0 651 | 2012-11-08,11241,Thursday,6,11,2012,d_650,,,,,1,0,1 652 | 2012-11-09,11241,Friday,7,11,2012,d_651,,,,,1,1,1 653 | 2012-11-10,11242,Saturday,1,11,2012,d_652,,,,,1,0,0 654 | 2012-11-11,11242,Sunday,2,11,2012,d_653,VeteransDay,National,,,0,1,1 655 | 2012-11-12,11242,Monday,3,11,2012,d_654,,,,,0,1,1 656 | 2012-11-13,11242,Tuesday,4,11,2012,d_655,,,,,0,1,0 657 | 2012-11-14,11242,Wednesday,5,11,2012,d_656,,,,,0,0,1 658 | 2012-11-15,11242,Thursday,6,11,2012,d_657,,,,,0,1,1 659 | 2012-11-16,11242,Friday,7,11,2012,d_658,,,,,0,0,0 660 | 2012-11-17,11243,Saturday,1,11,2012,d_659,,,,,0,0,0 661 | 2012-11-18,11243,Sunday,2,11,2012,d_660,,,,,0,0,0 662 | 2012-11-19,11243,Monday,3,11,2012,d_661,,,,,0,0,0 663 | 2012-11-20,11243,Tuesday,4,11,2012,d_662,,,,,0,0,0 664 | 2012-11-21,11243,Wednesday,5,11,2012,d_663,,,,,0,0,0 665 | 2012-11-22,11243,Thursday,6,11,2012,d_664,Thanksgiving,National,,,0,0,0 666 | 2012-11-23,11243,Friday,7,11,2012,d_665,,,,,0,0,0 667 | 2012-11-24,11244,Saturday,1,11,2012,d_666,,,,,0,0,0 668 | 2012-11-25,11244,Sunday,2,11,2012,d_667,,,,,0,0,0 669 | 2012-11-26,11244,Monday,3,11,2012,d_668,,,,,0,0,0 670 | 2012-11-27,11244,Tuesday,4,11,2012,d_669,,,,,0,0,0 671 | 2012-11-28,11244,Wednesday,5,11,2012,d_670,,,,,0,0,0 672 | 2012-11-29,11244,Thursday,6,11,2012,d_671,,,,,0,0,0 673 | 2012-11-30,11244,Friday,7,11,2012,d_672,,,,,0,0,0 674 | 2012-12-01,11245,Saturday,1,12,2012,d_673,,,,,1,1,0 675 | 2012-12-02,11245,Sunday,2,12,2012,d_674,,,,,1,0,1 676 | 2012-12-03,11245,Monday,3,12,2012,d_675,,,,,1,1,1 677 | 2012-12-04,11245,Tuesday,4,12,2012,d_676,,,,,1,0,0 678 | 2012-12-05,11245,Wednesday,5,12,2012,d_677,,,,,1,1,1 679 | 2012-12-06,11245,Thursday,6,12,2012,d_678,,,,,1,1,1 680 | 2012-12-07,11245,Friday,7,12,2012,d_679,,,,,1,1,0 681 | 2012-12-08,11246,Saturday,1,12,2012,d_680,,,,,1,0,1 682 | 2012-12-09,11246,Sunday,2,12,2012,d_681,,,,,1,1,1 683 | 2012-12-10,11246,Monday,3,12,2012,d_682,,,,,1,0,0 684 | 2012-12-11,11246,Tuesday,4,12,2012,d_683,,,,,0,1,1 685 | 2012-12-12,11246,Wednesday,5,12,2012,d_684,,,,,0,1,1 686 | 2012-12-13,11246,Thursday,6,12,2012,d_685,,,,,0,1,0 687 | 2012-12-14,11246,Friday,7,12,2012,d_686,,,,,0,0,1 688 | 2012-12-15,11247,Saturday,1,12,2012,d_687,,,,,0,1,1 689 | 2012-12-16,11247,Sunday,2,12,2012,d_688,Chanukah End,Religious,,,0,0,0 690 | 2012-12-17,11247,Monday,3,12,2012,d_689,,,,,0,0,0 691 | 2012-12-18,11247,Tuesday,4,12,2012,d_690,,,,,0,0,0 692 | 2012-12-19,11247,Wednesday,5,12,2012,d_691,,,,,0,0,0 693 | 2012-12-20,11247,Thursday,6,12,2012,d_692,,,,,0,0,0 694 | 2012-12-21,11247,Friday,7,12,2012,d_693,,,,,0,0,0 695 | 2012-12-22,11248,Saturday,1,12,2012,d_694,,,,,0,0,0 696 | 2012-12-23,11248,Sunday,2,12,2012,d_695,,,,,0,0,0 697 | 2012-12-24,11248,Monday,3,12,2012,d_696,,,,,0,0,0 698 | 2012-12-25,11248,Tuesday,4,12,2012,d_697,Christmas,National,,,0,0,0 699 | 2012-12-26,11248,Wednesday,5,12,2012,d_698,,,,,0,0,0 700 | 2012-12-27,11248,Thursday,6,12,2012,d_699,,,,,0,0,0 701 | 2012-12-28,11248,Friday,7,12,2012,d_700,,,,,0,0,0 702 | 2012-12-29,11249,Saturday,1,12,2012,d_701,,,,,0,0,0 703 | 2012-12-30,11249,Sunday,2,12,2012,d_702,,,,,0,0,0 704 | 2012-12-31,11249,Monday,3,12,2012,d_703,,,,,0,0,0 705 | 2013-01-01,11249,Tuesday,4,1,2013,d_704,NewYear,National,,,1,1,0 706 | 2013-01-02,11249,Wednesday,5,1,2013,d_705,,,,,1,0,1 707 | 2013-01-03,11249,Thursday,6,1,2013,d_706,,,,,1,1,1 708 | 2013-01-04,11249,Friday,7,1,2013,d_707,,,,,1,0,0 709 | 2013-01-05,11250,Saturday,1,1,2013,d_708,,,,,1,1,1 710 | 2013-01-06,11250,Sunday,2,1,2013,d_709,,,,,1,1,1 711 | 2013-01-07,11250,Monday,3,1,2013,d_710,OrthodoxChristmas,Religious,,,1,1,0 712 | 2013-01-08,11250,Tuesday,4,1,2013,d_711,,,,,1,0,1 713 | 2013-01-09,11250,Wednesday,5,1,2013,d_712,,,,,1,1,1 714 | 2013-01-10,11250,Thursday,6,1,2013,d_713,,,,,1,0,0 715 | 2013-01-11,11250,Friday,7,1,2013,d_714,,,,,0,1,1 716 | 2013-01-12,11251,Saturday,1,1,2013,d_715,,,,,0,1,1 717 | 2013-01-13,11251,Sunday,2,1,2013,d_716,,,,,0,1,0 718 | 2013-01-14,11251,Monday,3,1,2013,d_717,,,,,0,0,1 719 | 2013-01-15,11251,Tuesday,4,1,2013,d_718,,,,,0,1,1 720 | 2013-01-16,11251,Wednesday,5,1,2013,d_719,,,,,0,0,0 721 | 2013-01-17,11251,Thursday,6,1,2013,d_720,,,,,0,0,0 722 | 2013-01-18,11251,Friday,7,1,2013,d_721,,,,,0,0,0 723 | 2013-01-19,11252,Saturday,1,1,2013,d_722,,,,,0,0,0 724 | 2013-01-20,11252,Sunday,2,1,2013,d_723,,,,,0,0,0 725 | 2013-01-21,11252,Monday,3,1,2013,d_724,MartinLutherKingDay,National,,,0,0,0 726 | 2013-01-22,11252,Tuesday,4,1,2013,d_725,,,,,0,0,0 727 | 2013-01-23,11252,Wednesday,5,1,2013,d_726,,,,,0,0,0 728 | 2013-01-24,11252,Thursday,6,1,2013,d_727,,,,,0,0,0 729 | 2013-01-25,11252,Friday,7,1,2013,d_728,,,,,0,0,0 730 | 2013-01-26,11301,Saturday,1,1,2013,d_729,,,,,0,0,0 731 | 2013-01-27,11301,Sunday,2,1,2013,d_730,,,,,0,0,0 732 | 2013-01-28,11301,Monday,3,1,2013,d_731,,,,,0,0,0 733 | 2013-01-29,11301,Tuesday,4,1,2013,d_732,,,,,0,0,0 734 | 2013-01-30,11301,Wednesday,5,1,2013,d_733,,,,,0,0,0 735 | 2013-01-31,11301,Thursday,6,1,2013,d_734,,,,,0,0,0 736 | 2013-02-01,11301,Friday,7,2,2013,d_735,,,,,1,1,0 737 | 2013-02-02,11302,Saturday,1,2,2013,d_736,,,,,1,0,1 738 | 2013-02-03,11302,Sunday,2,2,2013,d_737,SuperBowl,Sporting,,,1,1,1 739 | 2013-02-04,11302,Monday,3,2,2013,d_738,,,,,1,0,0 740 | 2013-02-05,11302,Tuesday,4,2,2013,d_739,,,,,1,1,1 741 | 2013-02-06,11302,Wednesday,5,2,2013,d_740,,,,,1,1,1 742 | 2013-02-07,11302,Thursday,6,2,2013,d_741,,,,,1,1,0 743 | 2013-02-08,11302,Friday,7,2,2013,d_742,,,,,1,0,1 744 | 2013-02-09,11303,Saturday,1,2,2013,d_743,,,,,1,1,1 745 | 2013-02-10,11303,Sunday,2,2,2013,d_744,,,,,1,0,0 746 | 2013-02-11,11303,Monday,3,2,2013,d_745,,,,,0,1,1 747 | 2013-02-12,11303,Tuesday,4,2,2013,d_746,,,,,0,1,1 748 | 2013-02-13,11303,Wednesday,5,2,2013,d_747,LentStart,Religious,,,0,1,0 749 | 2013-02-14,11303,Thursday,6,2,2013,d_748,ValentinesDay,Cultural,,,0,0,1 750 | 2013-02-15,11303,Friday,7,2,2013,d_749,,,,,0,1,1 751 | 2013-02-16,11304,Saturday,1,2,2013,d_750,,,,,0,0,0 752 | 2013-02-17,11304,Sunday,2,2,2013,d_751,,,,,0,0,0 753 | 2013-02-18,11304,Monday,3,2,2013,d_752,PresidentsDay,National,,,0,0,0 754 | 2013-02-19,11304,Tuesday,4,2,2013,d_753,,,,,0,0,0 755 | 2013-02-20,11304,Wednesday,5,2,2013,d_754,LentWeek2,Religious,,,0,0,0 756 | 2013-02-21,11304,Thursday,6,2,2013,d_755,,,,,0,0,0 757 | 2013-02-22,11304,Friday,7,2,2013,d_756,,,,,0,0,0 758 | 2013-02-23,11305,Saturday,1,2,2013,d_757,,,,,0,0,0 759 | 2013-02-24,11305,Sunday,2,2,2013,d_758,Purim End,Religious,,,0,0,0 760 | 2013-02-25,11305,Monday,3,2,2013,d_759,,,,,0,0,0 761 | 2013-02-26,11305,Tuesday,4,2,2013,d_760,,,,,0,0,0 762 | 2013-02-27,11305,Wednesday,5,2,2013,d_761,,,,,0,0,0 763 | 2013-02-28,11305,Thursday,6,2,2013,d_762,,,,,0,0,0 764 | 2013-03-01,11305,Friday,7,3,2013,d_763,,,,,1,1,0 765 | 2013-03-02,11306,Saturday,1,3,2013,d_764,,,,,1,0,1 766 | 2013-03-03,11306,Sunday,2,3,2013,d_765,,,,,1,1,1 767 | 2013-03-04,11306,Monday,3,3,2013,d_766,,,,,1,0,0 768 | 2013-03-05,11306,Tuesday,4,3,2013,d_767,,,,,1,1,1 769 | 2013-03-06,11306,Wednesday,5,3,2013,d_768,,,,,1,1,1 770 | 2013-03-07,11306,Thursday,6,3,2013,d_769,,,,,1,1,0 771 | 2013-03-08,11306,Friday,7,3,2013,d_770,,,,,1,0,1 772 | 2013-03-09,11307,Saturday,1,3,2013,d_771,,,,,1,1,1 773 | 2013-03-10,11307,Sunday,2,3,2013,d_772,,,,,1,0,0 774 | 2013-03-11,11307,Monday,3,3,2013,d_773,,,,,0,1,1 775 | 2013-03-12,11307,Tuesday,4,3,2013,d_774,,,,,0,1,1 776 | 2013-03-13,11307,Wednesday,5,3,2013,d_775,,,,,0,1,0 777 | 2013-03-14,11307,Thursday,6,3,2013,d_776,,,,,0,0,1 778 | 2013-03-15,11307,Friday,7,3,2013,d_777,,,,,0,1,1 779 | 2013-03-16,11308,Saturday,1,3,2013,d_778,,,,,0,0,0 780 | 2013-03-17,11308,Sunday,2,3,2013,d_779,StPatricksDay,Cultural,,,0,0,0 781 | 2013-03-18,11308,Monday,3,3,2013,d_780,,,,,0,0,0 782 | 2013-03-19,11308,Tuesday,4,3,2013,d_781,,,,,0,0,0 783 | 2013-03-20,11308,Wednesday,5,3,2013,d_782,,,,,0,0,0 784 | 2013-03-21,11308,Thursday,6,3,2013,d_783,,,,,0,0,0 785 | 2013-03-22,11308,Friday,7,3,2013,d_784,,,,,0,0,0 786 | 2013-03-23,11309,Saturday,1,3,2013,d_785,,,,,0,0,0 787 | 2013-03-24,11309,Sunday,2,3,2013,d_786,,,,,0,0,0 788 | 2013-03-25,11309,Monday,3,3,2013,d_787,,,,,0,0,0 789 | 2013-03-26,11309,Tuesday,4,3,2013,d_788,,,,,0,0,0 790 | 2013-03-27,11309,Wednesday,5,3,2013,d_789,,,,,0,0,0 791 | 2013-03-28,11309,Thursday,6,3,2013,d_790,,,,,0,0,0 792 | 2013-03-29,11309,Friday,7,3,2013,d_791,,,,,0,0,0 793 | 2013-03-30,11310,Saturday,1,3,2013,d_792,,,,,0,0,0 794 | 2013-03-31,11310,Sunday,2,3,2013,d_793,Easter,Cultural,,,0,0,0 795 | 2013-04-01,11310,Monday,3,4,2013,d_794,,,,,1,1,0 796 | 2013-04-02,11310,Tuesday,4,4,2013,d_795,Pesach End,Religious,,,1,0,1 797 | 2013-04-03,11310,Wednesday,5,4,2013,d_796,,,,,1,1,1 798 | 2013-04-04,11310,Thursday,6,4,2013,d_797,,,,,1,0,0 799 | 2013-04-05,11310,Friday,7,4,2013,d_798,,,,,1,1,1 800 | 2013-04-06,11311,Saturday,1,4,2013,d_799,,,,,1,1,1 801 | 2013-04-07,11311,Sunday,2,4,2013,d_800,,,,,1,1,0 802 | 2013-04-08,11311,Monday,3,4,2013,d_801,,,,,1,0,1 803 | 2013-04-09,11311,Tuesday,4,4,2013,d_802,,,,,1,1,1 804 | 2013-04-10,11311,Wednesday,5,4,2013,d_803,,,,,1,0,0 805 | 2013-04-11,11311,Thursday,6,4,2013,d_804,,,,,0,1,1 806 | 2013-04-12,11311,Friday,7,4,2013,d_805,,,,,0,1,1 807 | 2013-04-13,11312,Saturday,1,4,2013,d_806,,,,,0,1,0 808 | 2013-04-14,11312,Sunday,2,4,2013,d_807,,,,,0,0,1 809 | 2013-04-15,11312,Monday,3,4,2013,d_808,,,,,0,1,1 810 | 2013-04-16,11312,Tuesday,4,4,2013,d_809,,,,,0,0,0 811 | 2013-04-17,11312,Wednesday,5,4,2013,d_810,,,,,0,0,0 812 | 2013-04-18,11312,Thursday,6,4,2013,d_811,,,,,0,0,0 813 | 2013-04-19,11312,Friday,7,4,2013,d_812,,,,,0,0,0 814 | 2013-04-20,11313,Saturday,1,4,2013,d_813,,,,,0,0,0 815 | 2013-04-21,11313,Sunday,2,4,2013,d_814,,,,,0,0,0 816 | 2013-04-22,11313,Monday,3,4,2013,d_815,,,,,0,0,0 817 | 2013-04-23,11313,Tuesday,4,4,2013,d_816,,,,,0,0,0 818 | 2013-04-24,11313,Wednesday,5,4,2013,d_817,,,,,0,0,0 819 | 2013-04-25,11313,Thursday,6,4,2013,d_818,,,,,0,0,0 820 | 2013-04-26,11313,Friday,7,4,2013,d_819,,,,,0,0,0 821 | 2013-04-27,11314,Saturday,1,4,2013,d_820,,,,,0,0,0 822 | 2013-04-28,11314,Sunday,2,4,2013,d_821,,,,,0,0,0 823 | 2013-04-29,11314,Monday,3,4,2013,d_822,,,,,0,0,0 824 | 2013-04-30,11314,Tuesday,4,4,2013,d_823,,,,,0,0,0 825 | 2013-05-01,11314,Wednesday,5,5,2013,d_824,,,,,1,1,0 826 | 2013-05-02,11314,Thursday,6,5,2013,d_825,,,,,1,0,1 827 | 2013-05-03,11314,Friday,7,5,2013,d_826,,,,,1,1,1 828 | 2013-05-04,11315,Saturday,1,5,2013,d_827,,,,,1,0,0 829 | 2013-05-05,11315,Sunday,2,5,2013,d_828,OrthodoxEaster,Religious,Cinco De Mayo,Cultural,1,1,1 830 | 2013-05-06,11315,Monday,3,5,2013,d_829,,,,,1,1,1 831 | 2013-05-07,11315,Tuesday,4,5,2013,d_830,,,,,1,1,0 832 | 2013-05-08,11315,Wednesday,5,5,2013,d_831,,,,,1,0,1 833 | 2013-05-09,11315,Thursday,6,5,2013,d_832,,,,,1,1,1 834 | 2013-05-10,11315,Friday,7,5,2013,d_833,,,,,1,0,0 835 | 2013-05-11,11316,Saturday,1,5,2013,d_834,,,,,0,1,1 836 | 2013-05-12,11316,Sunday,2,5,2013,d_835,Mother's day,Cultural,,,0,1,1 837 | 2013-05-13,11316,Monday,3,5,2013,d_836,,,,,0,1,0 838 | 2013-05-14,11316,Tuesday,4,5,2013,d_837,,,,,0,0,1 839 | 2013-05-15,11316,Wednesday,5,5,2013,d_838,,,,,0,1,1 840 | 2013-05-16,11316,Thursday,6,5,2013,d_839,,,,,0,0,0 841 | 2013-05-17,11316,Friday,7,5,2013,d_840,,,,,0,0,0 842 | 2013-05-18,11317,Saturday,1,5,2013,d_841,,,,,0,0,0 843 | 2013-05-19,11317,Sunday,2,5,2013,d_842,,,,,0,0,0 844 | 2013-05-20,11317,Monday,3,5,2013,d_843,,,,,0,0,0 845 | 2013-05-21,11317,Tuesday,4,5,2013,d_844,,,,,0,0,0 846 | 2013-05-22,11317,Wednesday,5,5,2013,d_845,,,,,0,0,0 847 | 2013-05-23,11317,Thursday,6,5,2013,d_846,,,,,0,0,0 848 | 2013-05-24,11317,Friday,7,5,2013,d_847,,,,,0,0,0 849 | 2013-05-25,11318,Saturday,1,5,2013,d_848,,,,,0,0,0 850 | 2013-05-26,11318,Sunday,2,5,2013,d_849,,,,,0,0,0 851 | 2013-05-27,11318,Monday,3,5,2013,d_850,MemorialDay,National,,,0,0,0 852 | 2013-05-28,11318,Tuesday,4,5,2013,d_851,,,,,0,0,0 853 | 2013-05-29,11318,Wednesday,5,5,2013,d_852,,,,,0,0,0 854 | 2013-05-30,11318,Thursday,6,5,2013,d_853,,,,,0,0,0 855 | 2013-05-31,11318,Friday,7,5,2013,d_854,,,,,0,0,0 856 | 2013-06-01,11319,Saturday,1,6,2013,d_855,,,,,1,1,0 857 | 2013-06-02,11319,Sunday,2,6,2013,d_856,,,,,1,0,1 858 | 2013-06-03,11319,Monday,3,6,2013,d_857,,,,,1,1,1 859 | 2013-06-04,11319,Tuesday,4,6,2013,d_858,,,,,1,0,0 860 | 2013-06-05,11319,Wednesday,5,6,2013,d_859,,,,,1,1,1 861 | 2013-06-06,11319,Thursday,6,6,2013,d_860,NBAFinalsStart,Sporting,,,1,1,1 862 | 2013-06-07,11319,Friday,7,6,2013,d_861,,,,,1,1,0 863 | 2013-06-08,11320,Saturday,1,6,2013,d_862,,,,,1,0,1 864 | 2013-06-09,11320,Sunday,2,6,2013,d_863,,,,,1,1,1 865 | 2013-06-10,11320,Monday,3,6,2013,d_864,,,,,1,0,0 866 | 2013-06-11,11320,Tuesday,4,6,2013,d_865,,,,,0,1,1 867 | 2013-06-12,11320,Wednesday,5,6,2013,d_866,,,,,0,1,1 868 | 2013-06-13,11320,Thursday,6,6,2013,d_867,,,,,0,1,0 869 | 2013-06-14,11320,Friday,7,6,2013,d_868,,,,,0,0,1 870 | 2013-06-15,11321,Saturday,1,6,2013,d_869,,,,,0,1,1 871 | 2013-06-16,11321,Sunday,2,6,2013,d_870,Father's day,Cultural,,,0,0,0 872 | 2013-06-17,11321,Monday,3,6,2013,d_871,,,,,0,0,0 873 | 2013-06-18,11321,Tuesday,4,6,2013,d_872,,,,,0,0,0 874 | 2013-06-19,11321,Wednesday,5,6,2013,d_873,,,,,0,0,0 875 | 2013-06-20,11321,Thursday,6,6,2013,d_874,NBAFinalsEnd,Sporting,,,0,0,0 876 | 2013-06-21,11321,Friday,7,6,2013,d_875,,,,,0,0,0 877 | 2013-06-22,11322,Saturday,1,6,2013,d_876,,,,,0,0,0 878 | 2013-06-23,11322,Sunday,2,6,2013,d_877,,,,,0,0,0 879 | 2013-06-24,11322,Monday,3,6,2013,d_878,,,,,0,0,0 880 | 2013-06-25,11322,Tuesday,4,6,2013,d_879,,,,,0,0,0 881 | 2013-06-26,11322,Wednesday,5,6,2013,d_880,,,,,0,0,0 882 | 2013-06-27,11322,Thursday,6,6,2013,d_881,,,,,0,0,0 883 | 2013-06-28,11322,Friday,7,6,2013,d_882,,,,,0,0,0 884 | 2013-06-29,11323,Saturday,1,6,2013,d_883,,,,,0,0,0 885 | 2013-06-30,11323,Sunday,2,6,2013,d_884,,,,,0,0,0 886 | 2013-07-01,11323,Monday,3,7,2013,d_885,,,,,1,1,0 887 | 2013-07-02,11323,Tuesday,4,7,2013,d_886,,,,,1,0,1 888 | 2013-07-03,11323,Wednesday,5,7,2013,d_887,,,,,1,1,1 889 | 2013-07-04,11323,Thursday,6,7,2013,d_888,IndependenceDay,National,,,1,0,0 890 | 2013-07-05,11323,Friday,7,7,2013,d_889,,,,,1,1,1 891 | 2013-07-06,11324,Saturday,1,7,2013,d_890,,,,,1,1,1 892 | 2013-07-07,11324,Sunday,2,7,2013,d_891,,,,,1,1,0 893 | 2013-07-08,11324,Monday,3,7,2013,d_892,,,,,1,0,1 894 | 2013-07-09,11324,Tuesday,4,7,2013,d_893,Ramadan starts,Religious,,,1,1,1 895 | 2013-07-10,11324,Wednesday,5,7,2013,d_894,,,,,1,0,0 896 | 2013-07-11,11324,Thursday,6,7,2013,d_895,,,,,0,1,1 897 | 2013-07-12,11324,Friday,7,7,2013,d_896,,,,,0,1,1 898 | 2013-07-13,11325,Saturday,1,7,2013,d_897,,,,,0,1,0 899 | 2013-07-14,11325,Sunday,2,7,2013,d_898,,,,,0,0,1 900 | 2013-07-15,11325,Monday,3,7,2013,d_899,,,,,0,1,1 901 | 2013-07-16,11325,Tuesday,4,7,2013,d_900,,,,,0,0,0 902 | 2013-07-17,11325,Wednesday,5,7,2013,d_901,,,,,0,0,0 903 | 2013-07-18,11325,Thursday,6,7,2013,d_902,,,,,0,0,0 904 | 2013-07-19,11325,Friday,7,7,2013,d_903,,,,,0,0,0 905 | 2013-07-20,11326,Saturday,1,7,2013,d_904,,,,,0,0,0 906 | 2013-07-21,11326,Sunday,2,7,2013,d_905,,,,,0,0,0 907 | 2013-07-22,11326,Monday,3,7,2013,d_906,,,,,0,0,0 908 | 2013-07-23,11326,Tuesday,4,7,2013,d_907,,,,,0,0,0 909 | 2013-07-24,11326,Wednesday,5,7,2013,d_908,,,,,0,0,0 910 | 2013-07-25,11326,Thursday,6,7,2013,d_909,,,,,0,0,0 911 | 2013-07-26,11326,Friday,7,7,2013,d_910,,,,,0,0,0 912 | 2013-07-27,11327,Saturday,1,7,2013,d_911,,,,,0,0,0 913 | 2013-07-28,11327,Sunday,2,7,2013,d_912,,,,,0,0,0 914 | 2013-07-29,11327,Monday,3,7,2013,d_913,,,,,0,0,0 915 | 2013-07-30,11327,Tuesday,4,7,2013,d_914,,,,,0,0,0 916 | 2013-07-31,11327,Wednesday,5,7,2013,d_915,,,,,0,0,0 917 | 2013-08-01,11327,Thursday,6,8,2013,d_916,,,,,1,1,0 918 | 2013-08-02,11327,Friday,7,8,2013,d_917,,,,,1,0,1 919 | 2013-08-03,11328,Saturday,1,8,2013,d_918,,,,,1,1,1 920 | 2013-08-04,11328,Sunday,2,8,2013,d_919,,,,,1,0,0 921 | 2013-08-05,11328,Monday,3,8,2013,d_920,,,,,1,1,1 922 | 2013-08-06,11328,Tuesday,4,8,2013,d_921,,,,,1,1,1 923 | 2013-08-07,11328,Wednesday,5,8,2013,d_922,,,,,1,1,0 924 | 2013-08-08,11328,Thursday,6,8,2013,d_923,Eid al-Fitr,Religious,,,1,0,1 925 | 2013-08-09,11328,Friday,7,8,2013,d_924,,,,,1,1,1 926 | 2013-08-10,11329,Saturday,1,8,2013,d_925,,,,,1,0,0 927 | 2013-08-11,11329,Sunday,2,8,2013,d_926,,,,,0,1,1 928 | 2013-08-12,11329,Monday,3,8,2013,d_927,,,,,0,1,1 929 | 2013-08-13,11329,Tuesday,4,8,2013,d_928,,,,,0,1,0 930 | 2013-08-14,11329,Wednesday,5,8,2013,d_929,,,,,0,0,1 931 | 2013-08-15,11329,Thursday,6,8,2013,d_930,,,,,0,1,1 932 | 2013-08-16,11329,Friday,7,8,2013,d_931,,,,,0,0,0 933 | 2013-08-17,11330,Saturday,1,8,2013,d_932,,,,,0,0,0 934 | 2013-08-18,11330,Sunday,2,8,2013,d_933,,,,,0,0,0 935 | 2013-08-19,11330,Monday,3,8,2013,d_934,,,,,0,0,0 936 | 2013-08-20,11330,Tuesday,4,8,2013,d_935,,,,,0,0,0 937 | 2013-08-21,11330,Wednesday,5,8,2013,d_936,,,,,0,0,0 938 | 2013-08-22,11330,Thursday,6,8,2013,d_937,,,,,0,0,0 939 | 2013-08-23,11330,Friday,7,8,2013,d_938,,,,,0,0,0 940 | 2013-08-24,11331,Saturday,1,8,2013,d_939,,,,,0,0,0 941 | 2013-08-25,11331,Sunday,2,8,2013,d_940,,,,,0,0,0 942 | 2013-08-26,11331,Monday,3,8,2013,d_941,,,,,0,0,0 943 | 2013-08-27,11331,Tuesday,4,8,2013,d_942,,,,,0,0,0 944 | 2013-08-28,11331,Wednesday,5,8,2013,d_943,,,,,0,0,0 945 | 2013-08-29,11331,Thursday,6,8,2013,d_944,,,,,0,0,0 946 | 2013-08-30,11331,Friday,7,8,2013,d_945,,,,,0,0,0 947 | 2013-08-31,11332,Saturday,1,8,2013,d_946,,,,,0,0,0 948 | 2013-09-01,11332,Sunday,2,9,2013,d_947,,,,,1,1,0 949 | 2013-09-02,11332,Monday,3,9,2013,d_948,LaborDay,National,,,1,0,1 950 | 2013-09-03,11332,Tuesday,4,9,2013,d_949,,,,,1,1,1 951 | 2013-09-04,11332,Wednesday,5,9,2013,d_950,,,,,1,0,0 952 | 2013-09-05,11332,Thursday,6,9,2013,d_951,,,,,1,1,1 953 | 2013-09-06,11332,Friday,7,9,2013,d_952,,,,,1,1,1 954 | 2013-09-07,11333,Saturday,1,9,2013,d_953,,,,,1,1,0 955 | 2013-09-08,11333,Sunday,2,9,2013,d_954,,,,,1,0,1 956 | 2013-09-09,11333,Monday,3,9,2013,d_955,,,,,1,1,1 957 | 2013-09-10,11333,Tuesday,4,9,2013,d_956,,,,,1,0,0 958 | 2013-09-11,11333,Wednesday,5,9,2013,d_957,,,,,0,1,1 959 | 2013-09-12,11333,Thursday,6,9,2013,d_958,,,,,0,1,1 960 | 2013-09-13,11333,Friday,7,9,2013,d_959,,,,,0,1,0 961 | 2013-09-14,11334,Saturday,1,9,2013,d_960,,,,,0,0,1 962 | 2013-09-15,11334,Sunday,2,9,2013,d_961,,,,,0,1,1 963 | 2013-09-16,11334,Monday,3,9,2013,d_962,,,,,0,0,0 964 | 2013-09-17,11334,Tuesday,4,9,2013,d_963,,,,,0,0,0 965 | 2013-09-18,11334,Wednesday,5,9,2013,d_964,,,,,0,0,0 966 | 2013-09-19,11334,Thursday,6,9,2013,d_965,,,,,0,0,0 967 | 2013-09-20,11334,Friday,7,9,2013,d_966,,,,,0,0,0 968 | 2013-09-21,11335,Saturday,1,9,2013,d_967,,,,,0,0,0 969 | 2013-09-22,11335,Sunday,2,9,2013,d_968,,,,,0,0,0 970 | 2013-09-23,11335,Monday,3,9,2013,d_969,,,,,0,0,0 971 | 2013-09-24,11335,Tuesday,4,9,2013,d_970,,,,,0,0,0 972 | 2013-09-25,11335,Wednesday,5,9,2013,d_971,,,,,0,0,0 973 | 2013-09-26,11335,Thursday,6,9,2013,d_972,,,,,0,0,0 974 | 2013-09-27,11335,Friday,7,9,2013,d_973,,,,,0,0,0 975 | 2013-09-28,11336,Saturday,1,9,2013,d_974,,,,,0,0,0 976 | 2013-09-29,11336,Sunday,2,9,2013,d_975,,,,,0,0,0 977 | 2013-09-30,11336,Monday,3,9,2013,d_976,,,,,0,0,0 978 | 2013-10-01,11336,Tuesday,4,10,2013,d_977,,,,,1,1,0 979 | 2013-10-02,11336,Wednesday,5,10,2013,d_978,,,,,1,0,1 980 | 2013-10-03,11336,Thursday,6,10,2013,d_979,,,,,1,1,1 981 | 2013-10-04,11336,Friday,7,10,2013,d_980,,,,,1,0,0 982 | 2013-10-05,11337,Saturday,1,10,2013,d_981,,,,,1,1,1 983 | 2013-10-06,11337,Sunday,2,10,2013,d_982,,,,,1,1,1 984 | 2013-10-07,11337,Monday,3,10,2013,d_983,,,,,1,1,0 985 | 2013-10-08,11337,Tuesday,4,10,2013,d_984,,,,,1,0,1 986 | 2013-10-09,11337,Wednesday,5,10,2013,d_985,,,,,1,1,1 987 | 2013-10-10,11337,Thursday,6,10,2013,d_986,,,,,1,0,0 988 | 2013-10-11,11337,Friday,7,10,2013,d_987,,,,,0,1,1 989 | 2013-10-12,11338,Saturday,1,10,2013,d_988,,,,,0,1,1 990 | 2013-10-13,11338,Sunday,2,10,2013,d_989,,,,,0,1,0 991 | 2013-10-14,11338,Monday,3,10,2013,d_990,ColumbusDay,National,,,0,0,1 992 | 2013-10-15,11338,Tuesday,4,10,2013,d_991,EidAlAdha,Religious,,,0,1,1 993 | 2013-10-16,11338,Wednesday,5,10,2013,d_992,,,,,0,0,0 994 | 2013-10-17,11338,Thursday,6,10,2013,d_993,,,,,0,0,0 995 | 2013-10-18,11338,Friday,7,10,2013,d_994,,,,,0,0,0 996 | 2013-10-19,11339,Saturday,1,10,2013,d_995,,,,,0,0,0 997 | 2013-10-20,11339,Sunday,2,10,2013,d_996,,,,,0,0,0 998 | 2013-10-21,11339,Monday,3,10,2013,d_997,,,,,0,0,0 999 | 2013-10-22,11339,Tuesday,4,10,2013,d_998,,,,,0,0,0 1000 | 2013-10-23,11339,Wednesday,5,10,2013,d_999,,,,,0,0,0 1001 | 2013-10-24,11339,Thursday,6,10,2013,d_1000,,,,,0,0,0 1002 | 2013-10-25,11339,Friday,7,10,2013,d_1001,,,,,0,0,0 1003 | 2013-10-26,11340,Saturday,1,10,2013,d_1002,,,,,0,0,0 1004 | 2013-10-27,11340,Sunday,2,10,2013,d_1003,,,,,0,0,0 1005 | 2013-10-28,11340,Monday,3,10,2013,d_1004,,,,,0,0,0 1006 | 2013-10-29,11340,Tuesday,4,10,2013,d_1005,,,,,0,0,0 1007 | 2013-10-30,11340,Wednesday,5,10,2013,d_1006,,,,,0,0,0 1008 | 2013-10-31,11340,Thursday,6,10,2013,d_1007,Halloween,Cultural,,,0,0,0 1009 | 2013-11-01,11340,Friday,7,11,2013,d_1008,,,,,1,1,0 1010 | 2013-11-02,11341,Saturday,1,11,2013,d_1009,,,,,1,0,1 1011 | 2013-11-03,11341,Sunday,2,11,2013,d_1010,,,,,1,1,1 1012 | 2013-11-04,11341,Monday,3,11,2013,d_1011,,,,,1,0,0 1013 | 2013-11-05,11341,Tuesday,4,11,2013,d_1012,,,,,1,1,1 1014 | 2013-11-06,11341,Wednesday,5,11,2013,d_1013,,,,,1,1,1 1015 | 2013-11-07,11341,Thursday,6,11,2013,d_1014,,,,,1,1,0 1016 | 2013-11-08,11341,Friday,7,11,2013,d_1015,,,,,1,0,1 1017 | 2013-11-09,11342,Saturday,1,11,2013,d_1016,,,,,1,1,1 1018 | 2013-11-10,11342,Sunday,2,11,2013,d_1017,,,,,1,0,0 1019 | 2013-11-11,11342,Monday,3,11,2013,d_1018,VeteransDay,National,,,0,1,1 1020 | 2013-11-12,11342,Tuesday,4,11,2013,d_1019,,,,,0,1,1 1021 | 2013-11-13,11342,Wednesday,5,11,2013,d_1020,,,,,0,1,0 1022 | 2013-11-14,11342,Thursday,6,11,2013,d_1021,,,,,0,0,1 1023 | 2013-11-15,11342,Friday,7,11,2013,d_1022,,,,,0,1,1 1024 | 2013-11-16,11343,Saturday,1,11,2013,d_1023,,,,,0,0,0 1025 | 2013-11-17,11343,Sunday,2,11,2013,d_1024,,,,,0,0,0 1026 | 2013-11-18,11343,Monday,3,11,2013,d_1025,,,,,0,0,0 1027 | 2013-11-19,11343,Tuesday,4,11,2013,d_1026,,,,,0,0,0 1028 | 2013-11-20,11343,Wednesday,5,11,2013,d_1027,,,,,0,0,0 1029 | 2013-11-21,11343,Thursday,6,11,2013,d_1028,,,,,0,0,0 1030 | 2013-11-22,11343,Friday,7,11,2013,d_1029,,,,,0,0,0 1031 | 2013-11-23,11344,Saturday,1,11,2013,d_1030,,,,,0,0,0 1032 | 2013-11-24,11344,Sunday,2,11,2013,d_1031,,,,,0,0,0 1033 | 2013-11-25,11344,Monday,3,11,2013,d_1032,,,,,0,0,0 1034 | 2013-11-26,11344,Tuesday,4,11,2013,d_1033,,,,,0,0,0 1035 | 2013-11-27,11344,Wednesday,5,11,2013,d_1034,,,,,0,0,0 1036 | 2013-11-28,11344,Thursday,6,11,2013,d_1035,Thanksgiving,National,,,0,0,0 1037 | 2013-11-29,11344,Friday,7,11,2013,d_1036,,,,,0,0,0 1038 | 2013-11-30,11345,Saturday,1,11,2013,d_1037,,,,,0,0,0 1039 | 2013-12-01,11345,Sunday,2,12,2013,d_1038,,,,,1,1,0 1040 | 2013-12-02,11345,Monday,3,12,2013,d_1039,,,,,1,0,1 1041 | 2013-12-03,11345,Tuesday,4,12,2013,d_1040,,,,,1,1,1 1042 | 2013-12-04,11345,Wednesday,5,12,2013,d_1041,,,,,1,0,0 1043 | 2013-12-05,11345,Thursday,6,12,2013,d_1042,Chanukah End,Religious,,,1,1,1 1044 | 2013-12-06,11345,Friday,7,12,2013,d_1043,,,,,1,1,1 1045 | 2013-12-07,11346,Saturday,1,12,2013,d_1044,,,,,1,1,0 1046 | 2013-12-08,11346,Sunday,2,12,2013,d_1045,,,,,1,0,1 1047 | 2013-12-09,11346,Monday,3,12,2013,d_1046,,,,,1,1,1 1048 | 2013-12-10,11346,Tuesday,4,12,2013,d_1047,,,,,1,0,0 1049 | 2013-12-11,11346,Wednesday,5,12,2013,d_1048,,,,,0,1,1 1050 | 2013-12-12,11346,Thursday,6,12,2013,d_1049,,,,,0,1,1 1051 | 2013-12-13,11346,Friday,7,12,2013,d_1050,,,,,0,1,0 1052 | 2013-12-14,11347,Saturday,1,12,2013,d_1051,,,,,0,0,1 1053 | 2013-12-15,11347,Sunday,2,12,2013,d_1052,,,,,0,1,1 1054 | 2013-12-16,11347,Monday,3,12,2013,d_1053,,,,,0,0,0 1055 | 2013-12-17,11347,Tuesday,4,12,2013,d_1054,,,,,0,0,0 1056 | 2013-12-18,11347,Wednesday,5,12,2013,d_1055,,,,,0,0,0 1057 | 2013-12-19,11347,Thursday,6,12,2013,d_1056,,,,,0,0,0 1058 | 2013-12-20,11347,Friday,7,12,2013,d_1057,,,,,0,0,0 1059 | 2013-12-21,11348,Saturday,1,12,2013,d_1058,,,,,0,0,0 1060 | 2013-12-22,11348,Sunday,2,12,2013,d_1059,,,,,0,0,0 1061 | 2013-12-23,11348,Monday,3,12,2013,d_1060,,,,,0,0,0 1062 | 2013-12-24,11348,Tuesday,4,12,2013,d_1061,,,,,0,0,0 1063 | 2013-12-25,11348,Wednesday,5,12,2013,d_1062,Christmas,National,,,0,0,0 1064 | 2013-12-26,11348,Thursday,6,12,2013,d_1063,,,,,0,0,0 1065 | 2013-12-27,11348,Friday,7,12,2013,d_1064,,,,,0,0,0 1066 | 2013-12-28,11349,Saturday,1,12,2013,d_1065,,,,,0,0,0 1067 | 2013-12-29,11349,Sunday,2,12,2013,d_1066,,,,,0,0,0 1068 | 2013-12-30,11349,Monday,3,12,2013,d_1067,,,,,0,0,0 1069 | 2013-12-31,11349,Tuesday,4,12,2013,d_1068,,,,,0,0,0 1070 | 2014-01-01,11349,Wednesday,5,1,2014,d_1069,NewYear,National,,,1,1,0 1071 | 2014-01-02,11349,Thursday,6,1,2014,d_1070,,,,,1,0,1 1072 | 2014-01-03,11349,Friday,7,1,2014,d_1071,,,,,1,1,1 1073 | 2014-01-04,11350,Saturday,1,1,2014,d_1072,,,,,1,0,0 1074 | 2014-01-05,11350,Sunday,2,1,2014,d_1073,,,,,1,1,1 1075 | 2014-01-06,11350,Monday,3,1,2014,d_1074,,,,,1,1,1 1076 | 2014-01-07,11350,Tuesday,4,1,2014,d_1075,OrthodoxChristmas,Religious,,,1,1,0 1077 | 2014-01-08,11350,Wednesday,5,1,2014,d_1076,,,,,1,0,1 1078 | 2014-01-09,11350,Thursday,6,1,2014,d_1077,,,,,1,1,1 1079 | 2014-01-10,11350,Friday,7,1,2014,d_1078,,,,,1,0,0 1080 | 2014-01-11,11351,Saturday,1,1,2014,d_1079,,,,,0,1,1 1081 | 2014-01-12,11351,Sunday,2,1,2014,d_1080,,,,,0,1,1 1082 | 2014-01-13,11351,Monday,3,1,2014,d_1081,,,,,0,1,0 1083 | 2014-01-14,11351,Tuesday,4,1,2014,d_1082,,,,,0,0,1 1084 | 2014-01-15,11351,Wednesday,5,1,2014,d_1083,,,,,0,1,1 1085 | 2014-01-16,11351,Thursday,6,1,2014,d_1084,,,,,0,0,0 1086 | 2014-01-17,11351,Friday,7,1,2014,d_1085,,,,,0,0,0 1087 | 2014-01-18,11352,Saturday,1,1,2014,d_1086,,,,,0,0,0 1088 | 2014-01-19,11352,Sunday,2,1,2014,d_1087,,,,,0,0,0 1089 | 2014-01-20,11352,Monday,3,1,2014,d_1088,MartinLutherKingDay,National,,,0,0,0 1090 | 2014-01-21,11352,Tuesday,4,1,2014,d_1089,,,,,0,0,0 1091 | 2014-01-22,11352,Wednesday,5,1,2014,d_1090,,,,,0,0,0 1092 | 2014-01-23,11352,Thursday,6,1,2014,d_1091,,,,,0,0,0 1093 | 2014-01-24,11352,Friday,7,1,2014,d_1092,,,,,0,0,0 1094 | 2014-01-25,11353,Saturday,1,1,2014,d_1093,,,,,0,0,0 1095 | 2014-01-26,11353,Sunday,2,1,2014,d_1094,,,,,0,0,0 1096 | 2014-01-27,11353,Monday,3,1,2014,d_1095,,,,,0,0,0 1097 | 2014-01-28,11353,Tuesday,4,1,2014,d_1096,,,,,0,0,0 1098 | 2014-01-29,11353,Wednesday,5,1,2014,d_1097,,,,,0,0,0 1099 | 2014-01-30,11353,Thursday,6,1,2014,d_1098,,,,,0,0,0 1100 | 2014-01-31,11353,Friday,7,1,2014,d_1099,,,,,0,0,0 1101 | 2014-02-01,11401,Saturday,1,2,2014,d_1100,,,,,1,1,0 1102 | 2014-02-02,11401,Sunday,2,2,2014,d_1101,SuperBowl,Sporting,,,1,0,1 1103 | 2014-02-03,11401,Monday,3,2,2014,d_1102,,,,,1,1,1 1104 | 2014-02-04,11401,Tuesday,4,2,2014,d_1103,,,,,1,0,0 1105 | 2014-02-05,11401,Wednesday,5,2,2014,d_1104,,,,,1,1,1 1106 | 2014-02-06,11401,Thursday,6,2,2014,d_1105,,,,,1,1,1 1107 | 2014-02-07,11401,Friday,7,2,2014,d_1106,,,,,1,1,0 1108 | 2014-02-08,11402,Saturday,1,2,2014,d_1107,,,,,1,0,1 1109 | 2014-02-09,11402,Sunday,2,2,2014,d_1108,,,,,1,1,1 1110 | 2014-02-10,11402,Monday,3,2,2014,d_1109,,,,,1,0,0 1111 | 2014-02-11,11402,Tuesday,4,2,2014,d_1110,,,,,0,1,1 1112 | 2014-02-12,11402,Wednesday,5,2,2014,d_1111,,,,,0,1,1 1113 | 2014-02-13,11402,Thursday,6,2,2014,d_1112,,,,,0,1,0 1114 | 2014-02-14,11402,Friday,7,2,2014,d_1113,ValentinesDay,Cultural,,,0,0,1 1115 | 2014-02-15,11403,Saturday,1,2,2014,d_1114,,,,,0,1,1 1116 | 2014-02-16,11403,Sunday,2,2,2014,d_1115,,,,,0,0,0 1117 | 2014-02-17,11403,Monday,3,2,2014,d_1116,PresidentsDay,National,,,0,0,0 1118 | 2014-02-18,11403,Tuesday,4,2,2014,d_1117,,,,,0,0,0 1119 | 2014-02-19,11403,Wednesday,5,2,2014,d_1118,,,,,0,0,0 1120 | 2014-02-20,11403,Thursday,6,2,2014,d_1119,,,,,0,0,0 1121 | 2014-02-21,11403,Friday,7,2,2014,d_1120,,,,,0,0,0 1122 | 2014-02-22,11404,Saturday,1,2,2014,d_1121,,,,,0,0,0 1123 | 2014-02-23,11404,Sunday,2,2,2014,d_1122,,,,,0,0,0 1124 | 2014-02-24,11404,Monday,3,2,2014,d_1123,,,,,0,0,0 1125 | 2014-02-25,11404,Tuesday,4,2,2014,d_1124,,,,,0,0,0 1126 | 2014-02-26,11404,Wednesday,5,2,2014,d_1125,,,,,0,0,0 1127 | 2014-02-27,11404,Thursday,6,2,2014,d_1126,,,,,0,0,0 1128 | 2014-02-28,11404,Friday,7,2,2014,d_1127,,,,,0,0,0 1129 | 2014-03-01,11405,Saturday,1,3,2014,d_1128,,,,,1,1,0 1130 | 2014-03-02,11405,Sunday,2,3,2014,d_1129,,,,,1,0,1 1131 | 2014-03-03,11405,Monday,3,3,2014,d_1130,,,,,1,1,1 1132 | 2014-03-04,11405,Tuesday,4,3,2014,d_1131,,,,,1,0,0 1133 | 2014-03-05,11405,Wednesday,5,3,2014,d_1132,LentStart,Religious,,,1,1,1 1134 | 2014-03-06,11405,Thursday,6,3,2014,d_1133,,,,,1,1,1 1135 | 2014-03-07,11405,Friday,7,3,2014,d_1134,,,,,1,1,0 1136 | 2014-03-08,11406,Saturday,1,3,2014,d_1135,,,,,1,0,1 1137 | 2014-03-09,11406,Sunday,2,3,2014,d_1136,,,,,1,1,1 1138 | 2014-03-10,11406,Monday,3,3,2014,d_1137,,,,,1,0,0 1139 | 2014-03-11,11406,Tuesday,4,3,2014,d_1138,,,,,0,1,1 1140 | 2014-03-12,11406,Wednesday,5,3,2014,d_1139,LentWeek2,Religious,,,0,1,1 1141 | 2014-03-13,11406,Thursday,6,3,2014,d_1140,,,,,0,1,0 1142 | 2014-03-14,11406,Friday,7,3,2014,d_1141,,,,,0,0,1 1143 | 2014-03-15,11407,Saturday,1,3,2014,d_1142,,,,,0,1,1 1144 | 2014-03-16,11407,Sunday,2,3,2014,d_1143,Purim End,Religious,,,0,0,0 1145 | 2014-03-17,11407,Monday,3,3,2014,d_1144,StPatricksDay,Cultural,,,0,0,0 1146 | 2014-03-18,11407,Tuesday,4,3,2014,d_1145,,,,,0,0,0 1147 | 2014-03-19,11407,Wednesday,5,3,2014,d_1146,,,,,0,0,0 1148 | 2014-03-20,11407,Thursday,6,3,2014,d_1147,,,,,0,0,0 1149 | 2014-03-21,11407,Friday,7,3,2014,d_1148,,,,,0,0,0 1150 | 2014-03-22,11408,Saturday,1,3,2014,d_1149,,,,,0,0,0 1151 | 2014-03-23,11408,Sunday,2,3,2014,d_1150,,,,,0,0,0 1152 | 2014-03-24,11408,Monday,3,3,2014,d_1151,,,,,0,0,0 1153 | 2014-03-25,11408,Tuesday,4,3,2014,d_1152,,,,,0,0,0 1154 | 2014-03-26,11408,Wednesday,5,3,2014,d_1153,,,,,0,0,0 1155 | 2014-03-27,11408,Thursday,6,3,2014,d_1154,,,,,0,0,0 1156 | 2014-03-28,11408,Friday,7,3,2014,d_1155,,,,,0,0,0 1157 | 2014-03-29,11409,Saturday,1,3,2014,d_1156,,,,,0,0,0 1158 | 2014-03-30,11409,Sunday,2,3,2014,d_1157,,,,,0,0,0 1159 | 2014-03-31,11409,Monday,3,3,2014,d_1158,,,,,0,0,0 1160 | 2014-04-01,11409,Tuesday,4,4,2014,d_1159,,,,,1,1,0 1161 | 2014-04-02,11409,Wednesday,5,4,2014,d_1160,,,,,1,0,1 1162 | 2014-04-03,11409,Thursday,6,4,2014,d_1161,,,,,1,1,1 1163 | 2014-04-04,11409,Friday,7,4,2014,d_1162,,,,,1,0,0 1164 | 2014-04-05,11410,Saturday,1,4,2014,d_1163,,,,,1,1,1 1165 | 2014-04-06,11410,Sunday,2,4,2014,d_1164,,,,,1,1,1 1166 | 2014-04-07,11410,Monday,3,4,2014,d_1165,,,,,1,1,0 1167 | 2014-04-08,11410,Tuesday,4,4,2014,d_1166,,,,,1,0,1 1168 | 2014-04-09,11410,Wednesday,5,4,2014,d_1167,,,,,1,1,1 1169 | 2014-04-10,11410,Thursday,6,4,2014,d_1168,,,,,1,0,0 1170 | 2014-04-11,11410,Friday,7,4,2014,d_1169,,,,,0,1,1 1171 | 2014-04-12,11411,Saturday,1,4,2014,d_1170,,,,,0,1,1 1172 | 2014-04-13,11411,Sunday,2,4,2014,d_1171,,,,,0,1,0 1173 | 2014-04-14,11411,Monday,3,4,2014,d_1172,,,,,0,0,1 1174 | 2014-04-15,11411,Tuesday,4,4,2014,d_1173,,,,,0,1,1 1175 | 2014-04-16,11411,Wednesday,5,4,2014,d_1174,,,,,0,0,0 1176 | 2014-04-17,11411,Thursday,6,4,2014,d_1175,,,,,0,0,0 1177 | 2014-04-18,11411,Friday,7,4,2014,d_1176,,,,,0,0,0 1178 | 2014-04-19,11412,Saturday,1,4,2014,d_1177,,,,,0,0,0 1179 | 2014-04-20,11412,Sunday,2,4,2014,d_1178,Easter,Cultural,OrthodoxEaster,Religious,0,0,0 1180 | 2014-04-21,11412,Monday,3,4,2014,d_1179,,,,,0,0,0 1181 | 2014-04-22,11412,Tuesday,4,4,2014,d_1180,Pesach End,Religious,,,0,0,0 1182 | 2014-04-23,11412,Wednesday,5,4,2014,d_1181,,,,,0,0,0 1183 | 2014-04-24,11412,Thursday,6,4,2014,d_1182,,,,,0,0,0 1184 | 2014-04-25,11412,Friday,7,4,2014,d_1183,,,,,0,0,0 1185 | 2014-04-26,11413,Saturday,1,4,2014,d_1184,,,,,0,0,0 1186 | 2014-04-27,11413,Sunday,2,4,2014,d_1185,,,,,0,0,0 1187 | 2014-04-28,11413,Monday,3,4,2014,d_1186,,,,,0,0,0 1188 | 2014-04-29,11413,Tuesday,4,4,2014,d_1187,,,,,0,0,0 1189 | 2014-04-30,11413,Wednesday,5,4,2014,d_1188,,,,,0,0,0 1190 | 2014-05-01,11413,Thursday,6,5,2014,d_1189,,,,,1,1,0 1191 | 2014-05-02,11413,Friday,7,5,2014,d_1190,,,,,1,0,1 1192 | 2014-05-03,11414,Saturday,1,5,2014,d_1191,,,,,1,1,1 1193 | 2014-05-04,11414,Sunday,2,5,2014,d_1192,,,,,1,0,0 1194 | 2014-05-05,11414,Monday,3,5,2014,d_1193,Cinco De Mayo,Cultural,,,1,1,1 1195 | 2014-05-06,11414,Tuesday,4,5,2014,d_1194,,,,,1,1,1 1196 | 2014-05-07,11414,Wednesday,5,5,2014,d_1195,,,,,1,1,0 1197 | 2014-05-08,11414,Thursday,6,5,2014,d_1196,,,,,1,0,1 1198 | 2014-05-09,11414,Friday,7,5,2014,d_1197,,,,,1,1,1 1199 | 2014-05-10,11415,Saturday,1,5,2014,d_1198,,,,,1,0,0 1200 | 2014-05-11,11415,Sunday,2,5,2014,d_1199,Mother's day,Cultural,,,0,1,1 1201 | 2014-05-12,11415,Monday,3,5,2014,d_1200,,,,,0,1,1 1202 | 2014-05-13,11415,Tuesday,4,5,2014,d_1201,,,,,0,1,0 1203 | 2014-05-14,11415,Wednesday,5,5,2014,d_1202,,,,,0,0,1 1204 | 2014-05-15,11415,Thursday,6,5,2014,d_1203,,,,,0,1,1 1205 | 2014-05-16,11415,Friday,7,5,2014,d_1204,,,,,0,0,0 1206 | 2014-05-17,11416,Saturday,1,5,2014,d_1205,,,,,0,0,0 1207 | 2014-05-18,11416,Sunday,2,5,2014,d_1206,,,,,0,0,0 1208 | 2014-05-19,11416,Monday,3,5,2014,d_1207,,,,,0,0,0 1209 | 2014-05-20,11416,Tuesday,4,5,2014,d_1208,,,,,0,0,0 1210 | 2014-05-21,11416,Wednesday,5,5,2014,d_1209,,,,,0,0,0 1211 | 2014-05-22,11416,Thursday,6,5,2014,d_1210,,,,,0,0,0 1212 | 2014-05-23,11416,Friday,7,5,2014,d_1211,,,,,0,0,0 1213 | 2014-05-24,11417,Saturday,1,5,2014,d_1212,,,,,0,0,0 1214 | 2014-05-25,11417,Sunday,2,5,2014,d_1213,,,,,0,0,0 1215 | 2014-05-26,11417,Monday,3,5,2014,d_1214,MemorialDay,National,,,0,0,0 1216 | 2014-05-27,11417,Tuesday,4,5,2014,d_1215,,,,,0,0,0 1217 | 2014-05-28,11417,Wednesday,5,5,2014,d_1216,,,,,0,0,0 1218 | 2014-05-29,11417,Thursday,6,5,2014,d_1217,,,,,0,0,0 1219 | 2014-05-30,11417,Friday,7,5,2014,d_1218,,,,,0,0,0 1220 | 2014-05-31,11418,Saturday,1,5,2014,d_1219,,,,,0,0,0 1221 | 2014-06-01,11418,Sunday,2,6,2014,d_1220,,,,,1,1,0 1222 | 2014-06-02,11418,Monday,3,6,2014,d_1221,,,,,1,0,1 1223 | 2014-06-03,11418,Tuesday,4,6,2014,d_1222,,,,,1,1,1 1224 | 2014-06-04,11418,Wednesday,5,6,2014,d_1223,,,,,1,0,0 1225 | 2014-06-05,11418,Thursday,6,6,2014,d_1224,NBAFinalsStart,Sporting,,,1,1,1 1226 | 2014-06-06,11418,Friday,7,6,2014,d_1225,,,,,1,1,1 1227 | 2014-06-07,11419,Saturday,1,6,2014,d_1226,,,,,1,1,0 1228 | 2014-06-08,11419,Sunday,2,6,2014,d_1227,,,,,1,0,1 1229 | 2014-06-09,11419,Monday,3,6,2014,d_1228,,,,,1,1,1 1230 | 2014-06-10,11419,Tuesday,4,6,2014,d_1229,,,,,1,0,0 1231 | 2014-06-11,11419,Wednesday,5,6,2014,d_1230,,,,,0,1,1 1232 | 2014-06-12,11419,Thursday,6,6,2014,d_1231,,,,,0,1,1 1233 | 2014-06-13,11419,Friday,7,6,2014,d_1232,,,,,0,1,0 1234 | 2014-06-14,11420,Saturday,1,6,2014,d_1233,,,,,0,0,1 1235 | 2014-06-15,11420,Sunday,2,6,2014,d_1234,NBAFinalsEnd,Sporting,Father's day,Cultural,0,1,1 1236 | 2014-06-16,11420,Monday,3,6,2014,d_1235,,,,,0,0,0 1237 | 2014-06-17,11420,Tuesday,4,6,2014,d_1236,,,,,0,0,0 1238 | 2014-06-18,11420,Wednesday,5,6,2014,d_1237,,,,,0,0,0 1239 | 2014-06-19,11420,Thursday,6,6,2014,d_1238,,,,,0,0,0 1240 | 2014-06-20,11420,Friday,7,6,2014,d_1239,,,,,0,0,0 1241 | 2014-06-21,11421,Saturday,1,6,2014,d_1240,,,,,0,0,0 1242 | 2014-06-22,11421,Sunday,2,6,2014,d_1241,,,,,0,0,0 1243 | 2014-06-23,11421,Monday,3,6,2014,d_1242,,,,,0,0,0 1244 | 2014-06-24,11421,Tuesday,4,6,2014,d_1243,,,,,0,0,0 1245 | 2014-06-25,11421,Wednesday,5,6,2014,d_1244,,,,,0,0,0 1246 | 2014-06-26,11421,Thursday,6,6,2014,d_1245,,,,,0,0,0 1247 | 2014-06-27,11421,Friday,7,6,2014,d_1246,,,,,0,0,0 1248 | 2014-06-28,11422,Saturday,1,6,2014,d_1247,,,,,0,0,0 1249 | 2014-06-29,11422,Sunday,2,6,2014,d_1248,Ramadan starts,Religious,,,0,0,0 1250 | 2014-06-30,11422,Monday,3,6,2014,d_1249,,,,,0,0,0 1251 | 2014-07-01,11422,Tuesday,4,7,2014,d_1250,,,,,1,1,0 1252 | 2014-07-02,11422,Wednesday,5,7,2014,d_1251,,,,,1,0,1 1253 | 2014-07-03,11422,Thursday,6,7,2014,d_1252,,,,,1,1,1 1254 | 2014-07-04,11422,Friday,7,7,2014,d_1253,IndependenceDay,National,,,1,0,0 1255 | 2014-07-05,11423,Saturday,1,7,2014,d_1254,,,,,1,1,1 1256 | 2014-07-06,11423,Sunday,2,7,2014,d_1255,,,,,1,1,1 1257 | 2014-07-07,11423,Monday,3,7,2014,d_1256,,,,,1,1,0 1258 | 2014-07-08,11423,Tuesday,4,7,2014,d_1257,,,,,1,0,1 1259 | 2014-07-09,11423,Wednesday,5,7,2014,d_1258,,,,,1,1,1 1260 | 2014-07-10,11423,Thursday,6,7,2014,d_1259,,,,,1,0,0 1261 | 2014-07-11,11423,Friday,7,7,2014,d_1260,,,,,0,1,1 1262 | 2014-07-12,11424,Saturday,1,7,2014,d_1261,,,,,0,1,1 1263 | 2014-07-13,11424,Sunday,2,7,2014,d_1262,,,,,0,1,0 1264 | 2014-07-14,11424,Monday,3,7,2014,d_1263,,,,,0,0,1 1265 | 2014-07-15,11424,Tuesday,4,7,2014,d_1264,,,,,0,1,1 1266 | 2014-07-16,11424,Wednesday,5,7,2014,d_1265,,,,,0,0,0 1267 | 2014-07-17,11424,Thursday,6,7,2014,d_1266,,,,,0,0,0 1268 | 2014-07-18,11424,Friday,7,7,2014,d_1267,,,,,0,0,0 1269 | 2014-07-19,11425,Saturday,1,7,2014,d_1268,,,,,0,0,0 1270 | 2014-07-20,11425,Sunday,2,7,2014,d_1269,,,,,0,0,0 1271 | 2014-07-21,11425,Monday,3,7,2014,d_1270,,,,,0,0,0 1272 | 2014-07-22,11425,Tuesday,4,7,2014,d_1271,,,,,0,0,0 1273 | 2014-07-23,11425,Wednesday,5,7,2014,d_1272,,,,,0,0,0 1274 | 2014-07-24,11425,Thursday,6,7,2014,d_1273,,,,,0,0,0 1275 | 2014-07-25,11425,Friday,7,7,2014,d_1274,,,,,0,0,0 1276 | 2014-07-26,11426,Saturday,1,7,2014,d_1275,,,,,0,0,0 1277 | 2014-07-27,11426,Sunday,2,7,2014,d_1276,,,,,0,0,0 1278 | 2014-07-28,11426,Monday,3,7,2014,d_1277,,,,,0,0,0 1279 | 2014-07-29,11426,Tuesday,4,7,2014,d_1278,Eid al-Fitr,Religious,,,0,0,0 1280 | 2014-07-30,11426,Wednesday,5,7,2014,d_1279,,,,,0,0,0 1281 | 2014-07-31,11426,Thursday,6,7,2014,d_1280,,,,,0,0,0 1282 | 2014-08-01,11426,Friday,7,8,2014,d_1281,,,,,1,1,0 1283 | 2014-08-02,11427,Saturday,1,8,2014,d_1282,,,,,1,0,1 1284 | 2014-08-03,11427,Sunday,2,8,2014,d_1283,,,,,1,1,1 1285 | 2014-08-04,11427,Monday,3,8,2014,d_1284,,,,,1,0,0 1286 | 2014-08-05,11427,Tuesday,4,8,2014,d_1285,,,,,1,1,1 1287 | 2014-08-06,11427,Wednesday,5,8,2014,d_1286,,,,,1,1,1 1288 | 2014-08-07,11427,Thursday,6,8,2014,d_1287,,,,,1,1,0 1289 | 2014-08-08,11427,Friday,7,8,2014,d_1288,,,,,1,0,1 1290 | 2014-08-09,11428,Saturday,1,8,2014,d_1289,,,,,1,1,1 1291 | 2014-08-10,11428,Sunday,2,8,2014,d_1290,,,,,1,0,0 1292 | 2014-08-11,11428,Monday,3,8,2014,d_1291,,,,,0,1,1 1293 | 2014-08-12,11428,Tuesday,4,8,2014,d_1292,,,,,0,1,1 1294 | 2014-08-13,11428,Wednesday,5,8,2014,d_1293,,,,,0,1,0 1295 | 2014-08-14,11428,Thursday,6,8,2014,d_1294,,,,,0,0,1 1296 | 2014-08-15,11428,Friday,7,8,2014,d_1295,,,,,0,1,1 1297 | 2014-08-16,11429,Saturday,1,8,2014,d_1296,,,,,0,0,0 1298 | 2014-08-17,11429,Sunday,2,8,2014,d_1297,,,,,0,0,0 1299 | 2014-08-18,11429,Monday,3,8,2014,d_1298,,,,,0,0,0 1300 | 2014-08-19,11429,Tuesday,4,8,2014,d_1299,,,,,0,0,0 1301 | 2014-08-20,11429,Wednesday,5,8,2014,d_1300,,,,,0,0,0 1302 | 2014-08-21,11429,Thursday,6,8,2014,d_1301,,,,,0,0,0 1303 | 2014-08-22,11429,Friday,7,8,2014,d_1302,,,,,0,0,0 1304 | 2014-08-23,11430,Saturday,1,8,2014,d_1303,,,,,0,0,0 1305 | 2014-08-24,11430,Sunday,2,8,2014,d_1304,,,,,0,0,0 1306 | 2014-08-25,11430,Monday,3,8,2014,d_1305,,,,,0,0,0 1307 | 2014-08-26,11430,Tuesday,4,8,2014,d_1306,,,,,0,0,0 1308 | 2014-08-27,11430,Wednesday,5,8,2014,d_1307,,,,,0,0,0 1309 | 2014-08-28,11430,Thursday,6,8,2014,d_1308,,,,,0,0,0 1310 | 2014-08-29,11430,Friday,7,8,2014,d_1309,,,,,0,0,0 1311 | 2014-08-30,11431,Saturday,1,8,2014,d_1310,,,,,0,0,0 1312 | 2014-08-31,11431,Sunday,2,8,2014,d_1311,,,,,0,0,0 1313 | 2014-09-01,11431,Monday,3,9,2014,d_1312,LaborDay,National,,,1,1,0 1314 | 2014-09-02,11431,Tuesday,4,9,2014,d_1313,,,,,1,0,1 1315 | 2014-09-03,11431,Wednesday,5,9,2014,d_1314,,,,,1,1,1 1316 | 2014-09-04,11431,Thursday,6,9,2014,d_1315,,,,,1,0,0 1317 | 2014-09-05,11431,Friday,7,9,2014,d_1316,,,,,1,1,1 1318 | 2014-09-06,11432,Saturday,1,9,2014,d_1317,,,,,1,1,1 1319 | 2014-09-07,11432,Sunday,2,9,2014,d_1318,,,,,1,1,0 1320 | 2014-09-08,11432,Monday,3,9,2014,d_1319,,,,,1,0,1 1321 | 2014-09-09,11432,Tuesday,4,9,2014,d_1320,,,,,1,1,1 1322 | 2014-09-10,11432,Wednesday,5,9,2014,d_1321,,,,,1,0,0 1323 | 2014-09-11,11432,Thursday,6,9,2014,d_1322,,,,,0,1,1 1324 | 2014-09-12,11432,Friday,7,9,2014,d_1323,,,,,0,1,1 1325 | 2014-09-13,11433,Saturday,1,9,2014,d_1324,,,,,0,1,0 1326 | 2014-09-14,11433,Sunday,2,9,2014,d_1325,,,,,0,0,1 1327 | 2014-09-15,11433,Monday,3,9,2014,d_1326,,,,,0,1,1 1328 | 2014-09-16,11433,Tuesday,4,9,2014,d_1327,,,,,0,0,0 1329 | 2014-09-17,11433,Wednesday,5,9,2014,d_1328,,,,,0,0,0 1330 | 2014-09-18,11433,Thursday,6,9,2014,d_1329,,,,,0,0,0 1331 | 2014-09-19,11433,Friday,7,9,2014,d_1330,,,,,0,0,0 1332 | 2014-09-20,11434,Saturday,1,9,2014,d_1331,,,,,0,0,0 1333 | 2014-09-21,11434,Sunday,2,9,2014,d_1332,,,,,0,0,0 1334 | 2014-09-22,11434,Monday,3,9,2014,d_1333,,,,,0,0,0 1335 | 2014-09-23,11434,Tuesday,4,9,2014,d_1334,,,,,0,0,0 1336 | 2014-09-24,11434,Wednesday,5,9,2014,d_1335,,,,,0,0,0 1337 | 2014-09-25,11434,Thursday,6,9,2014,d_1336,,,,,0,0,0 1338 | 2014-09-26,11434,Friday,7,9,2014,d_1337,,,,,0,0,0 1339 | 2014-09-27,11435,Saturday,1,9,2014,d_1338,,,,,0,0,0 1340 | 2014-09-28,11435,Sunday,2,9,2014,d_1339,,,,,0,0,0 1341 | 2014-09-29,11435,Monday,3,9,2014,d_1340,,,,,0,0,0 1342 | 2014-09-30,11435,Tuesday,4,9,2014,d_1341,,,,,0,0,0 1343 | 2014-10-01,11435,Wednesday,5,10,2014,d_1342,,,,,1,1,0 1344 | 2014-10-02,11435,Thursday,6,10,2014,d_1343,,,,,1,0,1 1345 | 2014-10-03,11435,Friday,7,10,2014,d_1344,,,,,1,1,1 1346 | 2014-10-04,11436,Saturday,1,10,2014,d_1345,EidAlAdha,Religious,,,1,0,0 1347 | 2014-10-05,11436,Sunday,2,10,2014,d_1346,,,,,1,1,1 1348 | 2014-10-06,11436,Monday,3,10,2014,d_1347,,,,,1,1,1 1349 | 2014-10-07,11436,Tuesday,4,10,2014,d_1348,,,,,1,1,0 1350 | 2014-10-08,11436,Wednesday,5,10,2014,d_1349,,,,,1,0,1 1351 | 2014-10-09,11436,Thursday,6,10,2014,d_1350,,,,,1,1,1 1352 | 2014-10-10,11436,Friday,7,10,2014,d_1351,,,,,1,0,0 1353 | 2014-10-11,11437,Saturday,1,10,2014,d_1352,,,,,0,1,1 1354 | 2014-10-12,11437,Sunday,2,10,2014,d_1353,,,,,0,1,1 1355 | 2014-10-13,11437,Monday,3,10,2014,d_1354,ColumbusDay,National,,,0,1,0 1356 | 2014-10-14,11437,Tuesday,4,10,2014,d_1355,,,,,0,0,1 1357 | 2014-10-15,11437,Wednesday,5,10,2014,d_1356,,,,,0,1,1 1358 | 2014-10-16,11437,Thursday,6,10,2014,d_1357,,,,,0,0,0 1359 | 2014-10-17,11437,Friday,7,10,2014,d_1358,,,,,0,0,0 1360 | 2014-10-18,11438,Saturday,1,10,2014,d_1359,,,,,0,0,0 1361 | 2014-10-19,11438,Sunday,2,10,2014,d_1360,,,,,0,0,0 1362 | 2014-10-20,11438,Monday,3,10,2014,d_1361,,,,,0,0,0 1363 | 2014-10-21,11438,Tuesday,4,10,2014,d_1362,,,,,0,0,0 1364 | 2014-10-22,11438,Wednesday,5,10,2014,d_1363,,,,,0,0,0 1365 | 2014-10-23,11438,Thursday,6,10,2014,d_1364,,,,,0,0,0 1366 | 2014-10-24,11438,Friday,7,10,2014,d_1365,,,,,0,0,0 1367 | 2014-10-25,11439,Saturday,1,10,2014,d_1366,,,,,0,0,0 1368 | 2014-10-26,11439,Sunday,2,10,2014,d_1367,,,,,0,0,0 1369 | 2014-10-27,11439,Monday,3,10,2014,d_1368,,,,,0,0,0 1370 | 2014-10-28,11439,Tuesday,4,10,2014,d_1369,,,,,0,0,0 1371 | 2014-10-29,11439,Wednesday,5,10,2014,d_1370,,,,,0,0,0 1372 | 2014-10-30,11439,Thursday,6,10,2014,d_1371,,,,,0,0,0 1373 | 2014-10-31,11439,Friday,7,10,2014,d_1372,Halloween,Cultural,,,0,0,0 1374 | 2014-11-01,11440,Saturday,1,11,2014,d_1373,,,,,1,1,0 1375 | 2014-11-02,11440,Sunday,2,11,2014,d_1374,,,,,1,0,1 1376 | 2014-11-03,11440,Monday,3,11,2014,d_1375,,,,,1,1,1 1377 | 2014-11-04,11440,Tuesday,4,11,2014,d_1376,,,,,1,0,0 1378 | 2014-11-05,11440,Wednesday,5,11,2014,d_1377,,,,,1,1,1 1379 | 2014-11-06,11440,Thursday,6,11,2014,d_1378,,,,,1,1,1 1380 | 2014-11-07,11440,Friday,7,11,2014,d_1379,,,,,1,1,0 1381 | 2014-11-08,11441,Saturday,1,11,2014,d_1380,,,,,1,0,1 1382 | 2014-11-09,11441,Sunday,2,11,2014,d_1381,,,,,1,1,1 1383 | 2014-11-10,11441,Monday,3,11,2014,d_1382,,,,,1,0,0 1384 | 2014-11-11,11441,Tuesday,4,11,2014,d_1383,VeteransDay,National,,,0,1,1 1385 | 2014-11-12,11441,Wednesday,5,11,2014,d_1384,,,,,0,1,1 1386 | 2014-11-13,11441,Thursday,6,11,2014,d_1385,,,,,0,1,0 1387 | 2014-11-14,11441,Friday,7,11,2014,d_1386,,,,,0,0,1 1388 | 2014-11-15,11442,Saturday,1,11,2014,d_1387,,,,,0,1,1 1389 | 2014-11-16,11442,Sunday,2,11,2014,d_1388,,,,,0,0,0 1390 | 2014-11-17,11442,Monday,3,11,2014,d_1389,,,,,0,0,0 1391 | 2014-11-18,11442,Tuesday,4,11,2014,d_1390,,,,,0,0,0 1392 | 2014-11-19,11442,Wednesday,5,11,2014,d_1391,,,,,0,0,0 1393 | 2014-11-20,11442,Thursday,6,11,2014,d_1392,,,,,0,0,0 1394 | 2014-11-21,11442,Friday,7,11,2014,d_1393,,,,,0,0,0 1395 | 2014-11-22,11443,Saturday,1,11,2014,d_1394,,,,,0,0,0 1396 | 2014-11-23,11443,Sunday,2,11,2014,d_1395,,,,,0,0,0 1397 | 2014-11-24,11443,Monday,3,11,2014,d_1396,,,,,0,0,0 1398 | 2014-11-25,11443,Tuesday,4,11,2014,d_1397,,,,,0,0,0 1399 | 2014-11-26,11443,Wednesday,5,11,2014,d_1398,,,,,0,0,0 1400 | 2014-11-27,11443,Thursday,6,11,2014,d_1399,Thanksgiving,National,,,0,0,0 1401 | 2014-11-28,11443,Friday,7,11,2014,d_1400,,,,,0,0,0 1402 | 2014-11-29,11444,Saturday,1,11,2014,d_1401,,,,,0,0,0 1403 | 2014-11-30,11444,Sunday,2,11,2014,d_1402,,,,,0,0,0 1404 | 2014-12-01,11444,Monday,3,12,2014,d_1403,,,,,1,1,0 1405 | 2014-12-02,11444,Tuesday,4,12,2014,d_1404,,,,,1,0,1 1406 | 2014-12-03,11444,Wednesday,5,12,2014,d_1405,,,,,1,1,1 1407 | 2014-12-04,11444,Thursday,6,12,2014,d_1406,,,,,1,0,0 1408 | 2014-12-05,11444,Friday,7,12,2014,d_1407,,,,,1,1,1 1409 | 2014-12-06,11445,Saturday,1,12,2014,d_1408,,,,,1,1,1 1410 | 2014-12-07,11445,Sunday,2,12,2014,d_1409,,,,,1,1,0 1411 | 2014-12-08,11445,Monday,3,12,2014,d_1410,,,,,1,0,1 1412 | 2014-12-09,11445,Tuesday,4,12,2014,d_1411,,,,,1,1,1 1413 | 2014-12-10,11445,Wednesday,5,12,2014,d_1412,,,,,1,0,0 1414 | 2014-12-11,11445,Thursday,6,12,2014,d_1413,,,,,0,1,1 1415 | 2014-12-12,11445,Friday,7,12,2014,d_1414,,,,,0,1,1 1416 | 2014-12-13,11446,Saturday,1,12,2014,d_1415,,,,,0,1,0 1417 | 2014-12-14,11446,Sunday,2,12,2014,d_1416,,,,,0,0,1 1418 | 2014-12-15,11446,Monday,3,12,2014,d_1417,,,,,0,1,1 1419 | 2014-12-16,11446,Tuesday,4,12,2014,d_1418,,,,,0,0,0 1420 | 2014-12-17,11446,Wednesday,5,12,2014,d_1419,,,,,0,0,0 1421 | 2014-12-18,11446,Thursday,6,12,2014,d_1420,,,,,0,0,0 1422 | 2014-12-19,11446,Friday,7,12,2014,d_1421,,,,,0,0,0 1423 | 2014-12-20,11447,Saturday,1,12,2014,d_1422,,,,,0,0,0 1424 | 2014-12-21,11447,Sunday,2,12,2014,d_1423,,,,,0,0,0 1425 | 2014-12-22,11447,Monday,3,12,2014,d_1424,,,,,0,0,0 1426 | 2014-12-23,11447,Tuesday,4,12,2014,d_1425,,,,,0,0,0 1427 | 2014-12-24,11447,Wednesday,5,12,2014,d_1426,Chanukah End,Religious,,,0,0,0 1428 | 2014-12-25,11447,Thursday,6,12,2014,d_1427,Christmas,National,,,0,0,0 1429 | 2014-12-26,11447,Friday,7,12,2014,d_1428,,,,,0,0,0 1430 | 2014-12-27,11448,Saturday,1,12,2014,d_1429,,,,,0,0,0 1431 | 2014-12-28,11448,Sunday,2,12,2014,d_1430,,,,,0,0,0 1432 | 2014-12-29,11448,Monday,3,12,2014,d_1431,,,,,0,0,0 1433 | 2014-12-30,11448,Tuesday,4,12,2014,d_1432,,,,,0,0,0 1434 | 2014-12-31,11448,Wednesday,5,12,2014,d_1433,,,,,0,0,0 1435 | 2015-01-01,11448,Thursday,6,1,2015,d_1434,NewYear,National,,,1,1,0 1436 | 2015-01-02,11448,Friday,7,1,2015,d_1435,,,,,1,0,1 1437 | 2015-01-03,11449,Saturday,1,1,2015,d_1436,,,,,1,1,1 1438 | 2015-01-04,11449,Sunday,2,1,2015,d_1437,,,,,1,0,0 1439 | 2015-01-05,11449,Monday,3,1,2015,d_1438,,,,,1,1,1 1440 | 2015-01-06,11449,Tuesday,4,1,2015,d_1439,,,,,1,1,1 1441 | 2015-01-07,11449,Wednesday,5,1,2015,d_1440,OrthodoxChristmas,Religious,,,1,1,0 1442 | 2015-01-08,11449,Thursday,6,1,2015,d_1441,,,,,1,0,1 1443 | 2015-01-09,11449,Friday,7,1,2015,d_1442,,,,,1,1,1 1444 | 2015-01-10,11450,Saturday,1,1,2015,d_1443,,,,,1,0,0 1445 | 2015-01-11,11450,Sunday,2,1,2015,d_1444,,,,,0,1,1 1446 | 2015-01-12,11450,Monday,3,1,2015,d_1445,,,,,0,1,1 1447 | 2015-01-13,11450,Tuesday,4,1,2015,d_1446,,,,,0,1,0 1448 | 2015-01-14,11450,Wednesday,5,1,2015,d_1447,,,,,0,0,1 1449 | 2015-01-15,11450,Thursday,6,1,2015,d_1448,,,,,0,1,1 1450 | 2015-01-16,11450,Friday,7,1,2015,d_1449,,,,,0,0,0 1451 | 2015-01-17,11451,Saturday,1,1,2015,d_1450,,,,,0,0,0 1452 | 2015-01-18,11451,Sunday,2,1,2015,d_1451,,,,,0,0,0 1453 | 2015-01-19,11451,Monday,3,1,2015,d_1452,MartinLutherKingDay,National,,,0,0,0 1454 | 2015-01-20,11451,Tuesday,4,1,2015,d_1453,,,,,0,0,0 1455 | 2015-01-21,11451,Wednesday,5,1,2015,d_1454,,,,,0,0,0 1456 | 2015-01-22,11451,Thursday,6,1,2015,d_1455,,,,,0,0,0 1457 | 2015-01-23,11451,Friday,7,1,2015,d_1456,,,,,0,0,0 1458 | 2015-01-24,11452,Saturday,1,1,2015,d_1457,,,,,0,0,0 1459 | 2015-01-25,11452,Sunday,2,1,2015,d_1458,,,,,0,0,0 1460 | 2015-01-26,11452,Monday,3,1,2015,d_1459,,,,,0,0,0 1461 | 2015-01-27,11452,Tuesday,4,1,2015,d_1460,,,,,0,0,0 1462 | 2015-01-28,11452,Wednesday,5,1,2015,d_1461,,,,,0,0,0 1463 | 2015-01-29,11452,Thursday,6,1,2015,d_1462,,,,,0,0,0 1464 | 2015-01-30,11452,Friday,7,1,2015,d_1463,,,,,0,0,0 1465 | 2015-01-31,11501,Saturday,1,1,2015,d_1464,,,,,0,0,0 1466 | 2015-02-01,11501,Sunday,2,2,2015,d_1465,SuperBowl,Sporting,,,1,1,0 1467 | 2015-02-02,11501,Monday,3,2,2015,d_1466,,,,,1,0,1 1468 | 2015-02-03,11501,Tuesday,4,2,2015,d_1467,,,,,1,1,1 1469 | 2015-02-04,11501,Wednesday,5,2,2015,d_1468,,,,,1,0,0 1470 | 2015-02-05,11501,Thursday,6,2,2015,d_1469,,,,,1,1,1 1471 | 2015-02-06,11501,Friday,7,2,2015,d_1470,,,,,1,1,1 1472 | 2015-02-07,11502,Saturday,1,2,2015,d_1471,,,,,1,1,0 1473 | 2015-02-08,11502,Sunday,2,2,2015,d_1472,,,,,1,0,1 1474 | 2015-02-09,11502,Monday,3,2,2015,d_1473,,,,,1,1,1 1475 | 2015-02-10,11502,Tuesday,4,2,2015,d_1474,,,,,1,0,0 1476 | 2015-02-11,11502,Wednesday,5,2,2015,d_1475,,,,,0,1,1 1477 | 2015-02-12,11502,Thursday,6,2,2015,d_1476,,,,,0,1,1 1478 | 2015-02-13,11502,Friday,7,2,2015,d_1477,,,,,0,1,0 1479 | 2015-02-14,11503,Saturday,1,2,2015,d_1478,ValentinesDay,Cultural,,,0,0,1 1480 | 2015-02-15,11503,Sunday,2,2,2015,d_1479,,,,,0,1,1 1481 | 2015-02-16,11503,Monday,3,2,2015,d_1480,PresidentsDay,National,,,0,0,0 1482 | 2015-02-17,11503,Tuesday,4,2,2015,d_1481,,,,,0,0,0 1483 | 2015-02-18,11503,Wednesday,5,2,2015,d_1482,LentStart,Religious,,,0,0,0 1484 | 2015-02-19,11503,Thursday,6,2,2015,d_1483,,,,,0,0,0 1485 | 2015-02-20,11503,Friday,7,2,2015,d_1484,,,,,0,0,0 1486 | 2015-02-21,11504,Saturday,1,2,2015,d_1485,,,,,0,0,0 1487 | 2015-02-22,11504,Sunday,2,2,2015,d_1486,,,,,0,0,0 1488 | 2015-02-23,11504,Monday,3,2,2015,d_1487,,,,,0,0,0 1489 | 2015-02-24,11504,Tuesday,4,2,2015,d_1488,,,,,0,0,0 1490 | 2015-02-25,11504,Wednesday,5,2,2015,d_1489,LentWeek2,Religious,,,0,0,0 1491 | 2015-02-26,11504,Thursday,6,2,2015,d_1490,,,,,0,0,0 1492 | 2015-02-27,11504,Friday,7,2,2015,d_1491,,,,,0,0,0 1493 | 2015-02-28,11505,Saturday,1,2,2015,d_1492,,,,,0,0,0 1494 | 2015-03-01,11505,Sunday,2,3,2015,d_1493,,,,,1,1,0 1495 | 2015-03-02,11505,Monday,3,3,2015,d_1494,,,,,1,0,1 1496 | 2015-03-03,11505,Tuesday,4,3,2015,d_1495,,,,,1,1,1 1497 | 2015-03-04,11505,Wednesday,5,3,2015,d_1496,,,,,1,0,0 1498 | 2015-03-05,11505,Thursday,6,3,2015,d_1497,Purim End,Religious,,,1,1,1 1499 | 2015-03-06,11505,Friday,7,3,2015,d_1498,,,,,1,1,1 1500 | 2015-03-07,11506,Saturday,1,3,2015,d_1499,,,,,1,1,0 1501 | 2015-03-08,11506,Sunday,2,3,2015,d_1500,,,,,1,0,1 1502 | 2015-03-09,11506,Monday,3,3,2015,d_1501,,,,,1,1,1 1503 | 2015-03-10,11506,Tuesday,4,3,2015,d_1502,,,,,1,0,0 1504 | 2015-03-11,11506,Wednesday,5,3,2015,d_1503,,,,,0,1,1 1505 | 2015-03-12,11506,Thursday,6,3,2015,d_1504,,,,,0,1,1 1506 | 2015-03-13,11506,Friday,7,3,2015,d_1505,,,,,0,1,0 1507 | 2015-03-14,11507,Saturday,1,3,2015,d_1506,,,,,0,0,1 1508 | 2015-03-15,11507,Sunday,2,3,2015,d_1507,,,,,0,1,1 1509 | 2015-03-16,11507,Monday,3,3,2015,d_1508,,,,,0,0,0 1510 | 2015-03-17,11507,Tuesday,4,3,2015,d_1509,StPatricksDay,Cultural,,,0,0,0 1511 | 2015-03-18,11507,Wednesday,5,3,2015,d_1510,,,,,0,0,0 1512 | 2015-03-19,11507,Thursday,6,3,2015,d_1511,,,,,0,0,0 1513 | 2015-03-20,11507,Friday,7,3,2015,d_1512,,,,,0,0,0 1514 | 2015-03-21,11508,Saturday,1,3,2015,d_1513,,,,,0,0,0 1515 | 2015-03-22,11508,Sunday,2,3,2015,d_1514,,,,,0,0,0 1516 | 2015-03-23,11508,Monday,3,3,2015,d_1515,,,,,0,0,0 1517 | 2015-03-24,11508,Tuesday,4,3,2015,d_1516,,,,,0,0,0 1518 | 2015-03-25,11508,Wednesday,5,3,2015,d_1517,,,,,0,0,0 1519 | 2015-03-26,11508,Thursday,6,3,2015,d_1518,,,,,0,0,0 1520 | 2015-03-27,11508,Friday,7,3,2015,d_1519,,,,,0,0,0 1521 | 2015-03-28,11509,Saturday,1,3,2015,d_1520,,,,,0,0,0 1522 | 2015-03-29,11509,Sunday,2,3,2015,d_1521,,,,,0,0,0 1523 | 2015-03-30,11509,Monday,3,3,2015,d_1522,,,,,0,0,0 1524 | 2015-03-31,11509,Tuesday,4,3,2015,d_1523,,,,,0,0,0 1525 | 2015-04-01,11509,Wednesday,5,4,2015,d_1524,,,,,1,1,0 1526 | 2015-04-02,11509,Thursday,6,4,2015,d_1525,,,,,1,0,1 1527 | 2015-04-03,11509,Friday,7,4,2015,d_1526,,,,,1,1,1 1528 | 2015-04-04,11510,Saturday,1,4,2015,d_1527,,,,,1,0,0 1529 | 2015-04-05,11510,Sunday,2,4,2015,d_1528,Easter,Cultural,,,1,1,1 1530 | 2015-04-06,11510,Monday,3,4,2015,d_1529,,,,,1,1,1 1531 | 2015-04-07,11510,Tuesday,4,4,2015,d_1530,,,,,1,1,0 1532 | 2015-04-08,11510,Wednesday,5,4,2015,d_1531,,,,,1,0,1 1533 | 2015-04-09,11510,Thursday,6,4,2015,d_1532,,,,,1,1,1 1534 | 2015-04-10,11510,Friday,7,4,2015,d_1533,,,,,1,0,0 1535 | 2015-04-11,11511,Saturday,1,4,2015,d_1534,Pesach End,Religious,,,0,1,1 1536 | 2015-04-12,11511,Sunday,2,4,2015,d_1535,OrthodoxEaster,Religious,,,0,1,1 1537 | 2015-04-13,11511,Monday,3,4,2015,d_1536,,,,,0,1,0 1538 | 2015-04-14,11511,Tuesday,4,4,2015,d_1537,,,,,0,0,1 1539 | 2015-04-15,11511,Wednesday,5,4,2015,d_1538,,,,,0,1,1 1540 | 2015-04-16,11511,Thursday,6,4,2015,d_1539,,,,,0,0,0 1541 | 2015-04-17,11511,Friday,7,4,2015,d_1540,,,,,0,0,0 1542 | 2015-04-18,11512,Saturday,1,4,2015,d_1541,,,,,0,0,0 1543 | 2015-04-19,11512,Sunday,2,4,2015,d_1542,,,,,0,0,0 1544 | 2015-04-20,11512,Monday,3,4,2015,d_1543,,,,,0,0,0 1545 | 2015-04-21,11512,Tuesday,4,4,2015,d_1544,,,,,0,0,0 1546 | 2015-04-22,11512,Wednesday,5,4,2015,d_1545,,,,,0,0,0 1547 | 2015-04-23,11512,Thursday,6,4,2015,d_1546,,,,,0,0,0 1548 | 2015-04-24,11512,Friday,7,4,2015,d_1547,,,,,0,0,0 1549 | 2015-04-25,11513,Saturday,1,4,2015,d_1548,,,,,0,0,0 1550 | 2015-04-26,11513,Sunday,2,4,2015,d_1549,,,,,0,0,0 1551 | 2015-04-27,11513,Monday,3,4,2015,d_1550,,,,,0,0,0 1552 | 2015-04-28,11513,Tuesday,4,4,2015,d_1551,,,,,0,0,0 1553 | 2015-04-29,11513,Wednesday,5,4,2015,d_1552,,,,,0,0,0 1554 | 2015-04-30,11513,Thursday,6,4,2015,d_1553,,,,,0,0,0 1555 | 2015-05-01,11513,Friday,7,5,2015,d_1554,,,,,1,1,0 1556 | 2015-05-02,11514,Saturday,1,5,2015,d_1555,,,,,1,0,1 1557 | 2015-05-03,11514,Sunday,2,5,2015,d_1556,,,,,1,1,1 1558 | 2015-05-04,11514,Monday,3,5,2015,d_1557,,,,,1,0,0 1559 | 2015-05-05,11514,Tuesday,4,5,2015,d_1558,Cinco De Mayo,Cultural,,,1,1,1 1560 | 2015-05-06,11514,Wednesday,5,5,2015,d_1559,,,,,1,1,1 1561 | 2015-05-07,11514,Thursday,6,5,2015,d_1560,,,,,1,1,0 1562 | 2015-05-08,11514,Friday,7,5,2015,d_1561,,,,,1,0,1 1563 | 2015-05-09,11515,Saturday,1,5,2015,d_1562,,,,,1,1,1 1564 | 2015-05-10,11515,Sunday,2,5,2015,d_1563,Mother's day,Cultural,,,1,0,0 1565 | 2015-05-11,11515,Monday,3,5,2015,d_1564,,,,,0,1,1 1566 | 2015-05-12,11515,Tuesday,4,5,2015,d_1565,,,,,0,1,1 1567 | 2015-05-13,11515,Wednesday,5,5,2015,d_1566,,,,,0,1,0 1568 | 2015-05-14,11515,Thursday,6,5,2015,d_1567,,,,,0,0,1 1569 | 2015-05-15,11515,Friday,7,5,2015,d_1568,,,,,0,1,1 1570 | 2015-05-16,11516,Saturday,1,5,2015,d_1569,,,,,0,0,0 1571 | 2015-05-17,11516,Sunday,2,5,2015,d_1570,,,,,0,0,0 1572 | 2015-05-18,11516,Monday,3,5,2015,d_1571,,,,,0,0,0 1573 | 2015-05-19,11516,Tuesday,4,5,2015,d_1572,,,,,0,0,0 1574 | 2015-05-20,11516,Wednesday,5,5,2015,d_1573,,,,,0,0,0 1575 | 2015-05-21,11516,Thursday,6,5,2015,d_1574,,,,,0,0,0 1576 | 2015-05-22,11516,Friday,7,5,2015,d_1575,,,,,0,0,0 1577 | 2015-05-23,11517,Saturday,1,5,2015,d_1576,,,,,0,0,0 1578 | 2015-05-24,11517,Sunday,2,5,2015,d_1577,,,,,0,0,0 1579 | 2015-05-25,11517,Monday,3,5,2015,d_1578,MemorialDay,National,,,0,0,0 1580 | 2015-05-26,11517,Tuesday,4,5,2015,d_1579,,,,,0,0,0 1581 | 2015-05-27,11517,Wednesday,5,5,2015,d_1580,,,,,0,0,0 1582 | 2015-05-28,11517,Thursday,6,5,2015,d_1581,,,,,0,0,0 1583 | 2015-05-29,11517,Friday,7,5,2015,d_1582,,,,,0,0,0 1584 | 2015-05-30,11518,Saturday,1,5,2015,d_1583,,,,,0,0,0 1585 | 2015-05-31,11518,Sunday,2,5,2015,d_1584,,,,,0,0,0 1586 | 2015-06-01,11518,Monday,3,6,2015,d_1585,,,,,1,1,0 1587 | 2015-06-02,11518,Tuesday,4,6,2015,d_1586,,,,,1,0,1 1588 | 2015-06-03,11518,Wednesday,5,6,2015,d_1587,,,,,1,1,1 1589 | 2015-06-04,11518,Thursday,6,6,2015,d_1588,NBAFinalsStart,Sporting,,,1,0,0 1590 | 2015-06-05,11518,Friday,7,6,2015,d_1589,,,,,1,1,1 1591 | 2015-06-06,11519,Saturday,1,6,2015,d_1590,,,,,1,1,1 1592 | 2015-06-07,11519,Sunday,2,6,2015,d_1591,,,,,1,1,0 1593 | 2015-06-08,11519,Monday,3,6,2015,d_1592,,,,,1,0,1 1594 | 2015-06-09,11519,Tuesday,4,6,2015,d_1593,,,,,1,1,1 1595 | 2015-06-10,11519,Wednesday,5,6,2015,d_1594,,,,,1,0,0 1596 | 2015-06-11,11519,Thursday,6,6,2015,d_1595,,,,,0,1,1 1597 | 2015-06-12,11519,Friday,7,6,2015,d_1596,,,,,0,1,1 1598 | 2015-06-13,11520,Saturday,1,6,2015,d_1597,,,,,0,1,0 1599 | 2015-06-14,11520,Sunday,2,6,2015,d_1598,,,,,0,0,1 1600 | 2015-06-15,11520,Monday,3,6,2015,d_1599,,,,,0,1,1 1601 | 2015-06-16,11520,Tuesday,4,6,2015,d_1600,NBAFinalsEnd,Sporting,,,0,0,0 1602 | 2015-06-17,11520,Wednesday,5,6,2015,d_1601,,,,,0,0,0 1603 | 2015-06-18,11520,Thursday,6,6,2015,d_1602,Ramadan starts,Religious,,,0,0,0 1604 | 2015-06-19,11520,Friday,7,6,2015,d_1603,,,,,0,0,0 1605 | 2015-06-20,11521,Saturday,1,6,2015,d_1604,,,,,0,0,0 1606 | 2015-06-21,11521,Sunday,2,6,2015,d_1605,Father's day,Cultural,,,0,0,0 1607 | 2015-06-22,11521,Monday,3,6,2015,d_1606,,,,,0,0,0 1608 | 2015-06-23,11521,Tuesday,4,6,2015,d_1607,,,,,0,0,0 1609 | 2015-06-24,11521,Wednesday,5,6,2015,d_1608,,,,,0,0,0 1610 | 2015-06-25,11521,Thursday,6,6,2015,d_1609,,,,,0,0,0 1611 | 2015-06-26,11521,Friday,7,6,2015,d_1610,,,,,0,0,0 1612 | 2015-06-27,11522,Saturday,1,6,2015,d_1611,,,,,0,0,0 1613 | 2015-06-28,11522,Sunday,2,6,2015,d_1612,,,,,0,0,0 1614 | 2015-06-29,11522,Monday,3,6,2015,d_1613,,,,,0,0,0 1615 | 2015-06-30,11522,Tuesday,4,6,2015,d_1614,,,,,0,0,0 1616 | 2015-07-01,11522,Wednesday,5,7,2015,d_1615,,,,,1,1,0 1617 | 2015-07-02,11522,Thursday,6,7,2015,d_1616,,,,,1,0,1 1618 | 2015-07-03,11522,Friday,7,7,2015,d_1617,,,,,1,1,1 1619 | 2015-07-04,11523,Saturday,1,7,2015,d_1618,IndependenceDay,National,,,1,0,0 1620 | 2015-07-05,11523,Sunday,2,7,2015,d_1619,,,,,1,1,1 1621 | 2015-07-06,11523,Monday,3,7,2015,d_1620,,,,,1,1,1 1622 | 2015-07-07,11523,Tuesday,4,7,2015,d_1621,,,,,1,1,0 1623 | 2015-07-08,11523,Wednesday,5,7,2015,d_1622,,,,,1,0,1 1624 | 2015-07-09,11523,Thursday,6,7,2015,d_1623,,,,,1,1,1 1625 | 2015-07-10,11523,Friday,7,7,2015,d_1624,,,,,1,0,0 1626 | 2015-07-11,11524,Saturday,1,7,2015,d_1625,,,,,0,1,1 1627 | 2015-07-12,11524,Sunday,2,7,2015,d_1626,,,,,0,1,1 1628 | 2015-07-13,11524,Monday,3,7,2015,d_1627,,,,,0,1,0 1629 | 2015-07-14,11524,Tuesday,4,7,2015,d_1628,,,,,0,0,1 1630 | 2015-07-15,11524,Wednesday,5,7,2015,d_1629,,,,,0,1,1 1631 | 2015-07-16,11524,Thursday,6,7,2015,d_1630,,,,,0,0,0 1632 | 2015-07-17,11524,Friday,7,7,2015,d_1631,,,,,0,0,0 1633 | 2015-07-18,11525,Saturday,1,7,2015,d_1632,Eid al-Fitr,Religious,,,0,0,0 1634 | 2015-07-19,11525,Sunday,2,7,2015,d_1633,,,,,0,0,0 1635 | 2015-07-20,11525,Monday,3,7,2015,d_1634,,,,,0,0,0 1636 | 2015-07-21,11525,Tuesday,4,7,2015,d_1635,,,,,0,0,0 1637 | 2015-07-22,11525,Wednesday,5,7,2015,d_1636,,,,,0,0,0 1638 | 2015-07-23,11525,Thursday,6,7,2015,d_1637,,,,,0,0,0 1639 | 2015-07-24,11525,Friday,7,7,2015,d_1638,,,,,0,0,0 1640 | 2015-07-25,11526,Saturday,1,7,2015,d_1639,,,,,0,0,0 1641 | 2015-07-26,11526,Sunday,2,7,2015,d_1640,,,,,0,0,0 1642 | 2015-07-27,11526,Monday,3,7,2015,d_1641,,,,,0,0,0 1643 | 2015-07-28,11526,Tuesday,4,7,2015,d_1642,,,,,0,0,0 1644 | 2015-07-29,11526,Wednesday,5,7,2015,d_1643,,,,,0,0,0 1645 | 2015-07-30,11526,Thursday,6,7,2015,d_1644,,,,,0,0,0 1646 | 2015-07-31,11526,Friday,7,7,2015,d_1645,,,,,0,0,0 1647 | 2015-08-01,11527,Saturday,1,8,2015,d_1646,,,,,1,1,0 1648 | 2015-08-02,11527,Sunday,2,8,2015,d_1647,,,,,1,0,1 1649 | 2015-08-03,11527,Monday,3,8,2015,d_1648,,,,,1,1,1 1650 | 2015-08-04,11527,Tuesday,4,8,2015,d_1649,,,,,1,0,0 1651 | 2015-08-05,11527,Wednesday,5,8,2015,d_1650,,,,,1,1,1 1652 | 2015-08-06,11527,Thursday,6,8,2015,d_1651,,,,,1,1,1 1653 | 2015-08-07,11527,Friday,7,8,2015,d_1652,,,,,1,1,0 1654 | 2015-08-08,11528,Saturday,1,8,2015,d_1653,,,,,1,0,1 1655 | 2015-08-09,11528,Sunday,2,8,2015,d_1654,,,,,1,1,1 1656 | 2015-08-10,11528,Monday,3,8,2015,d_1655,,,,,1,0,0 1657 | 2015-08-11,11528,Tuesday,4,8,2015,d_1656,,,,,0,1,1 1658 | 2015-08-12,11528,Wednesday,5,8,2015,d_1657,,,,,0,1,1 1659 | 2015-08-13,11528,Thursday,6,8,2015,d_1658,,,,,0,1,0 1660 | 2015-08-14,11528,Friday,7,8,2015,d_1659,,,,,0,0,1 1661 | 2015-08-15,11529,Saturday,1,8,2015,d_1660,,,,,0,1,1 1662 | 2015-08-16,11529,Sunday,2,8,2015,d_1661,,,,,0,0,0 1663 | 2015-08-17,11529,Monday,3,8,2015,d_1662,,,,,0,0,0 1664 | 2015-08-18,11529,Tuesday,4,8,2015,d_1663,,,,,0,0,0 1665 | 2015-08-19,11529,Wednesday,5,8,2015,d_1664,,,,,0,0,0 1666 | 2015-08-20,11529,Thursday,6,8,2015,d_1665,,,,,0,0,0 1667 | 2015-08-21,11529,Friday,7,8,2015,d_1666,,,,,0,0,0 1668 | 2015-08-22,11530,Saturday,1,8,2015,d_1667,,,,,0,0,0 1669 | 2015-08-23,11530,Sunday,2,8,2015,d_1668,,,,,0,0,0 1670 | 2015-08-24,11530,Monday,3,8,2015,d_1669,,,,,0,0,0 1671 | 2015-08-25,11530,Tuesday,4,8,2015,d_1670,,,,,0,0,0 1672 | 2015-08-26,11530,Wednesday,5,8,2015,d_1671,,,,,0,0,0 1673 | 2015-08-27,11530,Thursday,6,8,2015,d_1672,,,,,0,0,0 1674 | 2015-08-28,11530,Friday,7,8,2015,d_1673,,,,,0,0,0 1675 | 2015-08-29,11531,Saturday,1,8,2015,d_1674,,,,,0,0,0 1676 | 2015-08-30,11531,Sunday,2,8,2015,d_1675,,,,,0,0,0 1677 | 2015-08-31,11531,Monday,3,8,2015,d_1676,,,,,0,0,0 1678 | 2015-09-01,11531,Tuesday,4,9,2015,d_1677,,,,,1,1,0 1679 | 2015-09-02,11531,Wednesday,5,9,2015,d_1678,,,,,1,0,1 1680 | 2015-09-03,11531,Thursday,6,9,2015,d_1679,,,,,1,1,1 1681 | 2015-09-04,11531,Friday,7,9,2015,d_1680,,,,,1,0,0 1682 | 2015-09-05,11532,Saturday,1,9,2015,d_1681,,,,,1,1,1 1683 | 2015-09-06,11532,Sunday,2,9,2015,d_1682,,,,,1,1,1 1684 | 2015-09-07,11532,Monday,3,9,2015,d_1683,LaborDay,National,,,1,1,0 1685 | 2015-09-08,11532,Tuesday,4,9,2015,d_1684,,,,,1,0,1 1686 | 2015-09-09,11532,Wednesday,5,9,2015,d_1685,,,,,1,1,1 1687 | 2015-09-10,11532,Thursday,6,9,2015,d_1686,,,,,1,0,0 1688 | 2015-09-11,11532,Friday,7,9,2015,d_1687,,,,,0,1,1 1689 | 2015-09-12,11533,Saturday,1,9,2015,d_1688,,,,,0,1,1 1690 | 2015-09-13,11533,Sunday,2,9,2015,d_1689,,,,,0,1,0 1691 | 2015-09-14,11533,Monday,3,9,2015,d_1690,,,,,0,0,1 1692 | 2015-09-15,11533,Tuesday,4,9,2015,d_1691,,,,,0,1,1 1693 | 2015-09-16,11533,Wednesday,5,9,2015,d_1692,,,,,0,0,0 1694 | 2015-09-17,11533,Thursday,6,9,2015,d_1693,,,,,0,0,0 1695 | 2015-09-18,11533,Friday,7,9,2015,d_1694,,,,,0,0,0 1696 | 2015-09-19,11534,Saturday,1,9,2015,d_1695,,,,,0,0,0 1697 | 2015-09-20,11534,Sunday,2,9,2015,d_1696,,,,,0,0,0 1698 | 2015-09-21,11534,Monday,3,9,2015,d_1697,,,,,0,0,0 1699 | 2015-09-22,11534,Tuesday,4,9,2015,d_1698,,,,,0,0,0 1700 | 2015-09-23,11534,Wednesday,5,9,2015,d_1699,,,,,0,0,0 1701 | 2015-09-24,11534,Thursday,6,9,2015,d_1700,EidAlAdha,Religious,,,0,0,0 1702 | 2015-09-25,11534,Friday,7,9,2015,d_1701,,,,,0,0,0 1703 | 2015-09-26,11535,Saturday,1,9,2015,d_1702,,,,,0,0,0 1704 | 2015-09-27,11535,Sunday,2,9,2015,d_1703,,,,,0,0,0 1705 | 2015-09-28,11535,Monday,3,9,2015,d_1704,,,,,0,0,0 1706 | 2015-09-29,11535,Tuesday,4,9,2015,d_1705,,,,,0,0,0 1707 | 2015-09-30,11535,Wednesday,5,9,2015,d_1706,,,,,0,0,0 1708 | 2015-10-01,11535,Thursday,6,10,2015,d_1707,,,,,1,1,0 1709 | 2015-10-02,11535,Friday,7,10,2015,d_1708,,,,,1,0,1 1710 | 2015-10-03,11536,Saturday,1,10,2015,d_1709,,,,,1,1,1 1711 | 2015-10-04,11536,Sunday,2,10,2015,d_1710,,,,,1,0,0 1712 | 2015-10-05,11536,Monday,3,10,2015,d_1711,,,,,1,1,1 1713 | 2015-10-06,11536,Tuesday,4,10,2015,d_1712,,,,,1,1,1 1714 | 2015-10-07,11536,Wednesday,5,10,2015,d_1713,,,,,1,1,0 1715 | 2015-10-08,11536,Thursday,6,10,2015,d_1714,,,,,1,0,1 1716 | 2015-10-09,11536,Friday,7,10,2015,d_1715,,,,,1,1,1 1717 | 2015-10-10,11537,Saturday,1,10,2015,d_1716,,,,,1,0,0 1718 | 2015-10-11,11537,Sunday,2,10,2015,d_1717,,,,,0,1,1 1719 | 2015-10-12,11537,Monday,3,10,2015,d_1718,ColumbusDay,National,,,0,1,1 1720 | 2015-10-13,11537,Tuesday,4,10,2015,d_1719,,,,,0,1,0 1721 | 2015-10-14,11537,Wednesday,5,10,2015,d_1720,,,,,0,0,1 1722 | 2015-10-15,11537,Thursday,6,10,2015,d_1721,,,,,0,1,1 1723 | 2015-10-16,11537,Friday,7,10,2015,d_1722,,,,,0,0,0 1724 | 2015-10-17,11538,Saturday,1,10,2015,d_1723,,,,,0,0,0 1725 | 2015-10-18,11538,Sunday,2,10,2015,d_1724,,,,,0,0,0 1726 | 2015-10-19,11538,Monday,3,10,2015,d_1725,,,,,0,0,0 1727 | 2015-10-20,11538,Tuesday,4,10,2015,d_1726,,,,,0,0,0 1728 | 2015-10-21,11538,Wednesday,5,10,2015,d_1727,,,,,0,0,0 1729 | 2015-10-22,11538,Thursday,6,10,2015,d_1728,,,,,0,0,0 1730 | 2015-10-23,11538,Friday,7,10,2015,d_1729,,,,,0,0,0 1731 | 2015-10-24,11539,Saturday,1,10,2015,d_1730,,,,,0,0,0 1732 | 2015-10-25,11539,Sunday,2,10,2015,d_1731,,,,,0,0,0 1733 | 2015-10-26,11539,Monday,3,10,2015,d_1732,,,,,0,0,0 1734 | 2015-10-27,11539,Tuesday,4,10,2015,d_1733,,,,,0,0,0 1735 | 2015-10-28,11539,Wednesday,5,10,2015,d_1734,,,,,0,0,0 1736 | 2015-10-29,11539,Thursday,6,10,2015,d_1735,,,,,0,0,0 1737 | 2015-10-30,11539,Friday,7,10,2015,d_1736,,,,,0,0,0 1738 | 2015-10-31,11540,Saturday,1,10,2015,d_1737,Halloween,Cultural,,,0,0,0 1739 | 2015-11-01,11540,Sunday,2,11,2015,d_1738,,,,,1,1,0 1740 | 2015-11-02,11540,Monday,3,11,2015,d_1739,,,,,1,0,1 1741 | 2015-11-03,11540,Tuesday,4,11,2015,d_1740,,,,,1,1,1 1742 | 2015-11-04,11540,Wednesday,5,11,2015,d_1741,,,,,1,0,0 1743 | 2015-11-05,11540,Thursday,6,11,2015,d_1742,,,,,1,1,1 1744 | 2015-11-06,11540,Friday,7,11,2015,d_1743,,,,,1,1,1 1745 | 2015-11-07,11541,Saturday,1,11,2015,d_1744,,,,,1,1,0 1746 | 2015-11-08,11541,Sunday,2,11,2015,d_1745,,,,,1,0,1 1747 | 2015-11-09,11541,Monday,3,11,2015,d_1746,,,,,1,1,1 1748 | 2015-11-10,11541,Tuesday,4,11,2015,d_1747,,,,,1,0,0 1749 | 2015-11-11,11541,Wednesday,5,11,2015,d_1748,VeteransDay,National,,,0,1,1 1750 | 2015-11-12,11541,Thursday,6,11,2015,d_1749,,,,,0,1,1 1751 | 2015-11-13,11541,Friday,7,11,2015,d_1750,,,,,0,1,0 1752 | 2015-11-14,11542,Saturday,1,11,2015,d_1751,,,,,0,0,1 1753 | 2015-11-15,11542,Sunday,2,11,2015,d_1752,,,,,0,1,1 1754 | 2015-11-16,11542,Monday,3,11,2015,d_1753,,,,,0,0,0 1755 | 2015-11-17,11542,Tuesday,4,11,2015,d_1754,,,,,0,0,0 1756 | 2015-11-18,11542,Wednesday,5,11,2015,d_1755,,,,,0,0,0 1757 | 2015-11-19,11542,Thursday,6,11,2015,d_1756,,,,,0,0,0 1758 | 2015-11-20,11542,Friday,7,11,2015,d_1757,,,,,0,0,0 1759 | 2015-11-21,11543,Saturday,1,11,2015,d_1758,,,,,0,0,0 1760 | 2015-11-22,11543,Sunday,2,11,2015,d_1759,,,,,0,0,0 1761 | 2015-11-23,11543,Monday,3,11,2015,d_1760,,,,,0,0,0 1762 | 2015-11-24,11543,Tuesday,4,11,2015,d_1761,,,,,0,0,0 1763 | 2015-11-25,11543,Wednesday,5,11,2015,d_1762,,,,,0,0,0 1764 | 2015-11-26,11543,Thursday,6,11,2015,d_1763,Thanksgiving,National,,,0,0,0 1765 | 2015-11-27,11543,Friday,7,11,2015,d_1764,,,,,0,0,0 1766 | 2015-11-28,11544,Saturday,1,11,2015,d_1765,,,,,0,0,0 1767 | 2015-11-29,11544,Sunday,2,11,2015,d_1766,,,,,0,0,0 1768 | 2015-11-30,11544,Monday,3,11,2015,d_1767,,,,,0,0,0 1769 | 2015-12-01,11544,Tuesday,4,12,2015,d_1768,,,,,1,1,0 1770 | 2015-12-02,11544,Wednesday,5,12,2015,d_1769,,,,,1,0,1 1771 | 2015-12-03,11544,Thursday,6,12,2015,d_1770,,,,,1,1,1 1772 | 2015-12-04,11544,Friday,7,12,2015,d_1771,,,,,1,0,0 1773 | 2015-12-05,11545,Saturday,1,12,2015,d_1772,,,,,1,1,1 1774 | 2015-12-06,11545,Sunday,2,12,2015,d_1773,,,,,1,1,1 1775 | 2015-12-07,11545,Monday,3,12,2015,d_1774,,,,,1,1,0 1776 | 2015-12-08,11545,Tuesday,4,12,2015,d_1775,,,,,1,0,1 1777 | 2015-12-09,11545,Wednesday,5,12,2015,d_1776,,,,,1,1,1 1778 | 2015-12-10,11545,Thursday,6,12,2015,d_1777,,,,,1,0,0 1779 | 2015-12-11,11545,Friday,7,12,2015,d_1778,,,,,0,1,1 1780 | 2015-12-12,11546,Saturday,1,12,2015,d_1779,,,,,0,1,1 1781 | 2015-12-13,11546,Sunday,2,12,2015,d_1780,,,,,0,1,0 1782 | 2015-12-14,11546,Monday,3,12,2015,d_1781,Chanukah End,Religious,,,0,0,1 1783 | 2015-12-15,11546,Tuesday,4,12,2015,d_1782,,,,,0,1,1 1784 | 2015-12-16,11546,Wednesday,5,12,2015,d_1783,,,,,0,0,0 1785 | 2015-12-17,11546,Thursday,6,12,2015,d_1784,,,,,0,0,0 1786 | 2015-12-18,11546,Friday,7,12,2015,d_1785,,,,,0,0,0 1787 | 2015-12-19,11547,Saturday,1,12,2015,d_1786,,,,,0,0,0 1788 | 2015-12-20,11547,Sunday,2,12,2015,d_1787,,,,,0,0,0 1789 | 2015-12-21,11547,Monday,3,12,2015,d_1788,,,,,0,0,0 1790 | 2015-12-22,11547,Tuesday,4,12,2015,d_1789,,,,,0,0,0 1791 | 2015-12-23,11547,Wednesday,5,12,2015,d_1790,,,,,0,0,0 1792 | 2015-12-24,11547,Thursday,6,12,2015,d_1791,,,,,0,0,0 1793 | 2015-12-25,11547,Friday,7,12,2015,d_1792,Christmas,National,,,0,0,0 1794 | 2015-12-26,11548,Saturday,1,12,2015,d_1793,,,,,0,0,0 1795 | 2015-12-27,11548,Sunday,2,12,2015,d_1794,,,,,0,0,0 1796 | 2015-12-28,11548,Monday,3,12,2015,d_1795,,,,,0,0,0 1797 | 2015-12-29,11548,Tuesday,4,12,2015,d_1796,,,,,0,0,0 1798 | 2015-12-30,11548,Wednesday,5,12,2015,d_1797,,,,,0,0,0 1799 | 2015-12-31,11548,Thursday,6,12,2015,d_1798,,,,,0,0,0 1800 | 2016-01-01,11548,Friday,7,1,2016,d_1799,NewYear,National,,,1,1,0 1801 | 2016-01-02,11549,Saturday,1,1,2016,d_1800,,,,,1,0,1 1802 | 2016-01-03,11549,Sunday,2,1,2016,d_1801,,,,,1,1,1 1803 | 2016-01-04,11549,Monday,3,1,2016,d_1802,,,,,1,0,0 1804 | 2016-01-05,11549,Tuesday,4,1,2016,d_1803,,,,,1,1,1 1805 | 2016-01-06,11549,Wednesday,5,1,2016,d_1804,,,,,1,1,1 1806 | 2016-01-07,11549,Thursday,6,1,2016,d_1805,OrthodoxChristmas,Religious,,,1,1,0 1807 | 2016-01-08,11549,Friday,7,1,2016,d_1806,,,,,1,0,1 1808 | 2016-01-09,11550,Saturday,1,1,2016,d_1807,,,,,1,1,1 1809 | 2016-01-10,11550,Sunday,2,1,2016,d_1808,,,,,1,0,0 1810 | 2016-01-11,11550,Monday,3,1,2016,d_1809,,,,,0,1,1 1811 | 2016-01-12,11550,Tuesday,4,1,2016,d_1810,,,,,0,1,1 1812 | 2016-01-13,11550,Wednesday,5,1,2016,d_1811,,,,,0,1,0 1813 | 2016-01-14,11550,Thursday,6,1,2016,d_1812,,,,,0,0,1 1814 | 2016-01-15,11550,Friday,7,1,2016,d_1813,,,,,0,1,1 1815 | 2016-01-16,11551,Saturday,1,1,2016,d_1814,,,,,0,0,0 1816 | 2016-01-17,11551,Sunday,2,1,2016,d_1815,,,,,0,0,0 1817 | 2016-01-18,11551,Monday,3,1,2016,d_1816,MartinLutherKingDay,National,,,0,0,0 1818 | 2016-01-19,11551,Tuesday,4,1,2016,d_1817,,,,,0,0,0 1819 | 2016-01-20,11551,Wednesday,5,1,2016,d_1818,,,,,0,0,0 1820 | 2016-01-21,11551,Thursday,6,1,2016,d_1819,,,,,0,0,0 1821 | 2016-01-22,11551,Friday,7,1,2016,d_1820,,,,,0,0,0 1822 | 2016-01-23,11552,Saturday,1,1,2016,d_1821,,,,,0,0,0 1823 | 2016-01-24,11552,Sunday,2,1,2016,d_1822,,,,,0,0,0 1824 | 2016-01-25,11552,Monday,3,1,2016,d_1823,,,,,0,0,0 1825 | 2016-01-26,11552,Tuesday,4,1,2016,d_1824,,,,,0,0,0 1826 | 2016-01-27,11552,Wednesday,5,1,2016,d_1825,,,,,0,0,0 1827 | 2016-01-28,11552,Thursday,6,1,2016,d_1826,,,,,0,0,0 1828 | 2016-01-29,11552,Friday,7,1,2016,d_1827,,,,,0,0,0 1829 | 2016-01-30,11601,Saturday,1,1,2016,d_1828,,,,,0,0,0 1830 | 2016-01-31,11601,Sunday,2,1,2016,d_1829,,,,,0,0,0 1831 | 2016-02-01,11601,Monday,3,2,2016,d_1830,,,,,1,1,0 1832 | 2016-02-02,11601,Tuesday,4,2,2016,d_1831,,,,,1,0,1 1833 | 2016-02-03,11601,Wednesday,5,2,2016,d_1832,,,,,1,1,1 1834 | 2016-02-04,11601,Thursday,6,2,2016,d_1833,,,,,1,0,0 1835 | 2016-02-05,11601,Friday,7,2,2016,d_1834,,,,,1,1,1 1836 | 2016-02-06,11602,Saturday,1,2,2016,d_1835,,,,,1,1,1 1837 | 2016-02-07,11602,Sunday,2,2,2016,d_1836,SuperBowl,Sporting,,,1,1,0 1838 | 2016-02-08,11602,Monday,3,2,2016,d_1837,,,,,1,0,1 1839 | 2016-02-09,11602,Tuesday,4,2,2016,d_1838,,,,,1,1,1 1840 | 2016-02-10,11602,Wednesday,5,2,2016,d_1839,LentStart,Religious,,,1,0,0 1841 | 2016-02-11,11602,Thursday,6,2,2016,d_1840,,,,,0,1,1 1842 | 2016-02-12,11602,Friday,7,2,2016,d_1841,,,,,0,1,1 1843 | 2016-02-13,11603,Saturday,1,2,2016,d_1842,,,,,0,1,0 1844 | 2016-02-14,11603,Sunday,2,2,2016,d_1843,ValentinesDay,Cultural,,,0,0,1 1845 | 2016-02-15,11603,Monday,3,2,2016,d_1844,PresidentsDay,National,,,0,1,1 1846 | 2016-02-16,11603,Tuesday,4,2,2016,d_1845,,,,,0,0,0 1847 | 2016-02-17,11603,Wednesday,5,2,2016,d_1846,LentWeek2,Religious,,,0,0,0 1848 | 2016-02-18,11603,Thursday,6,2,2016,d_1847,,,,,0,0,0 1849 | 2016-02-19,11603,Friday,7,2,2016,d_1848,,,,,0,0,0 1850 | 2016-02-20,11604,Saturday,1,2,2016,d_1849,,,,,0,0,0 1851 | 2016-02-21,11604,Sunday,2,2,2016,d_1850,,,,,0,0,0 1852 | 2016-02-22,11604,Monday,3,2,2016,d_1851,,,,,0,0,0 1853 | 2016-02-23,11604,Tuesday,4,2,2016,d_1852,,,,,0,0,0 1854 | 2016-02-24,11604,Wednesday,5,2,2016,d_1853,,,,,0,0,0 1855 | 2016-02-25,11604,Thursday,6,2,2016,d_1854,,,,,0,0,0 1856 | 2016-02-26,11604,Friday,7,2,2016,d_1855,,,,,0,0,0 1857 | 2016-02-27,11605,Saturday,1,2,2016,d_1856,,,,,0,0,0 1858 | 2016-02-28,11605,Sunday,2,2,2016,d_1857,,,,,0,0,0 1859 | 2016-02-29,11605,Monday,3,2,2016,d_1858,,,,,0,0,0 1860 | 2016-03-01,11605,Tuesday,4,3,2016,d_1859,,,,,1,1,0 1861 | 2016-03-02,11605,Wednesday,5,3,2016,d_1860,,,,,1,0,1 1862 | 2016-03-03,11605,Thursday,6,3,2016,d_1861,,,,,1,1,1 1863 | 2016-03-04,11605,Friday,7,3,2016,d_1862,,,,,1,0,0 1864 | 2016-03-05,11606,Saturday,1,3,2016,d_1863,,,,,1,1,1 1865 | 2016-03-06,11606,Sunday,2,3,2016,d_1864,,,,,1,1,1 1866 | 2016-03-07,11606,Monday,3,3,2016,d_1865,,,,,1,1,0 1867 | 2016-03-08,11606,Tuesday,4,3,2016,d_1866,,,,,1,0,1 1868 | 2016-03-09,11606,Wednesday,5,3,2016,d_1867,,,,,1,1,1 1869 | 2016-03-10,11606,Thursday,6,3,2016,d_1868,,,,,1,0,0 1870 | 2016-03-11,11606,Friday,7,3,2016,d_1869,,,,,0,1,1 1871 | 2016-03-12,11607,Saturday,1,3,2016,d_1870,,,,,0,1,1 1872 | 2016-03-13,11607,Sunday,2,3,2016,d_1871,,,,,0,1,0 1873 | 2016-03-14,11607,Monday,3,3,2016,d_1872,,,,,0,0,1 1874 | 2016-03-15,11607,Tuesday,4,3,2016,d_1873,,,,,0,1,1 1875 | 2016-03-16,11607,Wednesday,5,3,2016,d_1874,,,,,0,0,0 1876 | 2016-03-17,11607,Thursday,6,3,2016,d_1875,StPatricksDay,Cultural,,,0,0,0 1877 | 2016-03-18,11607,Friday,7,3,2016,d_1876,,,,,0,0,0 1878 | 2016-03-19,11608,Saturday,1,3,2016,d_1877,,,,,0,0,0 1879 | 2016-03-20,11608,Sunday,2,3,2016,d_1878,,,,,0,0,0 1880 | 2016-03-21,11608,Monday,3,3,2016,d_1879,,,,,0,0,0 1881 | 2016-03-22,11608,Tuesday,4,3,2016,d_1880,,,,,0,0,0 1882 | 2016-03-23,11608,Wednesday,5,3,2016,d_1881,,,,,0,0,0 1883 | 2016-03-24,11608,Thursday,6,3,2016,d_1882,Purim End,Religious,,,0,0,0 1884 | 2016-03-25,11608,Friday,7,3,2016,d_1883,,,,,0,0,0 1885 | 2016-03-26,11609,Saturday,1,3,2016,d_1884,,,,,0,0,0 1886 | 2016-03-27,11609,Sunday,2,3,2016,d_1885,Easter,Cultural,,,0,0,0 1887 | 2016-03-28,11609,Monday,3,3,2016,d_1886,,,,,0,0,0 1888 | 2016-03-29,11609,Tuesday,4,3,2016,d_1887,,,,,0,0,0 1889 | 2016-03-30,11609,Wednesday,5,3,2016,d_1888,,,,,0,0,0 1890 | 2016-03-31,11609,Thursday,6,3,2016,d_1889,,,,,0,0,0 1891 | 2016-04-01,11609,Friday,7,4,2016,d_1890,,,,,1,1,0 1892 | 2016-04-02,11610,Saturday,1,4,2016,d_1891,,,,,1,0,1 1893 | 2016-04-03,11610,Sunday,2,4,2016,d_1892,,,,,1,1,1 1894 | 2016-04-04,11610,Monday,3,4,2016,d_1893,,,,,1,0,0 1895 | 2016-04-05,11610,Tuesday,4,4,2016,d_1894,,,,,1,1,1 1896 | 2016-04-06,11610,Wednesday,5,4,2016,d_1895,,,,,1,1,1 1897 | 2016-04-07,11610,Thursday,6,4,2016,d_1896,,,,,1,1,0 1898 | 2016-04-08,11610,Friday,7,4,2016,d_1897,,,,,1,0,1 1899 | 2016-04-09,11611,Saturday,1,4,2016,d_1898,,,,,1,1,1 1900 | 2016-04-10,11611,Sunday,2,4,2016,d_1899,,,,,1,0,0 1901 | 2016-04-11,11611,Monday,3,4,2016,d_1900,,,,,0,1,1 1902 | 2016-04-12,11611,Tuesday,4,4,2016,d_1901,,,,,0,1,1 1903 | 2016-04-13,11611,Wednesday,5,4,2016,d_1902,,,,,0,1,0 1904 | 2016-04-14,11611,Thursday,6,4,2016,d_1903,,,,,0,0,1 1905 | 2016-04-15,11611,Friday,7,4,2016,d_1904,,,,,0,1,1 1906 | 2016-04-16,11612,Saturday,1,4,2016,d_1905,,,,,0,0,0 1907 | 2016-04-17,11612,Sunday,2,4,2016,d_1906,,,,,0,0,0 1908 | 2016-04-18,11612,Monday,3,4,2016,d_1907,,,,,0,0,0 1909 | 2016-04-19,11612,Tuesday,4,4,2016,d_1908,,,,,0,0,0 1910 | 2016-04-20,11612,Wednesday,5,4,2016,d_1909,,,,,0,0,0 1911 | 2016-04-21,11612,Thursday,6,4,2016,d_1910,,,,,0,0,0 1912 | 2016-04-22,11612,Friday,7,4,2016,d_1911,,,,,0,0,0 1913 | 2016-04-23,11613,Saturday,1,4,2016,d_1912,,,,,0,0,0 1914 | 2016-04-24,11613,Sunday,2,4,2016,d_1913,,,,,0,0,0 1915 | 2016-04-25,11613,Monday,3,4,2016,d_1914,,,,,0,0,0 1916 | 2016-04-26,11613,Tuesday,4,4,2016,d_1915,,,,,0,0,0 1917 | 2016-04-27,11613,Wednesday,5,4,2016,d_1916,,,,,0,0,0 1918 | 2016-04-28,11613,Thursday,6,4,2016,d_1917,,,,,0,0,0 1919 | 2016-04-29,11613,Friday,7,4,2016,d_1918,,,,,0,0,0 1920 | 2016-04-30,11614,Saturday,1,4,2016,d_1919,Pesach End,Religious,,,0,0,0 1921 | 2016-05-01,11614,Sunday,2,5,2016,d_1920,OrthodoxEaster,Religious,,,1,1,0 1922 | 2016-05-02,11614,Monday,3,5,2016,d_1921,,,,,1,0,1 1923 | 2016-05-03,11614,Tuesday,4,5,2016,d_1922,,,,,1,1,1 1924 | 2016-05-04,11614,Wednesday,5,5,2016,d_1923,,,,,1,0,0 1925 | 2016-05-05,11614,Thursday,6,5,2016,d_1924,Cinco De Mayo,Cultural,,,1,1,1 1926 | 2016-05-06,11614,Friday,7,5,2016,d_1925,,,,,1,1,1 1927 | 2016-05-07,11615,Saturday,1,5,2016,d_1926,,,,,1,1,0 1928 | 2016-05-08,11615,Sunday,2,5,2016,d_1927,Mother's day,Cultural,,,1,0,1 1929 | 2016-05-09,11615,Monday,3,5,2016,d_1928,,,,,1,1,1 1930 | 2016-05-10,11615,Tuesday,4,5,2016,d_1929,,,,,1,0,0 1931 | 2016-05-11,11615,Wednesday,5,5,2016,d_1930,,,,,0,1,1 1932 | 2016-05-12,11615,Thursday,6,5,2016,d_1931,,,,,0,1,1 1933 | 2016-05-13,11615,Friday,7,5,2016,d_1932,,,,,0,1,0 1934 | 2016-05-14,11616,Saturday,1,5,2016,d_1933,,,,,0,0,1 1935 | 2016-05-15,11616,Sunday,2,5,2016,d_1934,,,,,0,1,1 1936 | 2016-05-16,11616,Monday,3,5,2016,d_1935,,,,,0,0,0 1937 | 2016-05-17,11616,Tuesday,4,5,2016,d_1936,,,,,0,0,0 1938 | 2016-05-18,11616,Wednesday,5,5,2016,d_1937,,,,,0,0,0 1939 | 2016-05-19,11616,Thursday,6,5,2016,d_1938,,,,,0,0,0 1940 | 2016-05-20,11616,Friday,7,5,2016,d_1939,,,,,0,0,0 1941 | 2016-05-21,11617,Saturday,1,5,2016,d_1940,,,,,0,0,0 1942 | 2016-05-22,11617,Sunday,2,5,2016,d_1941,,,,,0,0,0 1943 | 2016-05-23,11617,Monday,3,5,2016,d_1942,,,,,0,0,0 1944 | 2016-05-24,11617,Tuesday,4,5,2016,d_1943,,,,,0,0,0 1945 | 2016-05-25,11617,Wednesday,5,5,2016,d_1944,,,,,0,0,0 1946 | 2016-05-26,11617,Thursday,6,5,2016,d_1945,,,,,0,0,0 1947 | 2016-05-27,11617,Friday,7,5,2016,d_1946,,,,,0,0,0 1948 | 2016-05-28,11618,Saturday,1,5,2016,d_1947,,,,,0,0,0 1949 | 2016-05-29,11618,Sunday,2,5,2016,d_1948,,,,,0,0,0 1950 | 2016-05-30,11618,Monday,3,5,2016,d_1949,MemorialDay,National,,,0,0,0 1951 | 2016-05-31,11618,Tuesday,4,5,2016,d_1950,,,,,0,0,0 1952 | 2016-06-01,11618,Wednesday,5,6,2016,d_1951,,,,,1,1,0 1953 | 2016-06-02,11618,Thursday,6,6,2016,d_1952,NBAFinalsStart,Sporting,,,1,0,1 1954 | 2016-06-03,11618,Friday,7,6,2016,d_1953,,,,,1,1,1 1955 | 2016-06-04,11619,Saturday,1,6,2016,d_1954,,,,,1,0,0 1956 | 2016-06-05,11619,Sunday,2,6,2016,d_1955,,,,,1,1,1 1957 | 2016-06-06,11619,Monday,3,6,2016,d_1956,,,,,1,1,1 1958 | 2016-06-07,11619,Tuesday,4,6,2016,d_1957,Ramadan starts,Religious,,,1,1,0 1959 | 2016-06-08,11619,Wednesday,5,6,2016,d_1958,,,,,1,0,1 1960 | 2016-06-09,11619,Thursday,6,6,2016,d_1959,,,,,1,1,1 1961 | 2016-06-10,11619,Friday,7,6,2016,d_1960,,,,,1,0,0 1962 | 2016-06-11,11620,Saturday,1,6,2016,d_1961,,,,,0,1,1 1963 | 2016-06-12,11620,Sunday,2,6,2016,d_1962,,,,,0,1,1 1964 | 2016-06-13,11620,Monday,3,6,2016,d_1963,,,,,0,1,0 1965 | 2016-06-14,11620,Tuesday,4,6,2016,d_1964,,,,,0,0,1 1966 | 2016-06-15,11620,Wednesday,5,6,2016,d_1965,,,,,0,1,1 1967 | 2016-06-16,11620,Thursday,6,6,2016,d_1966,,,,,0,0,0 1968 | 2016-06-17,11620,Friday,7,6,2016,d_1967,,,,,0,0,0 1969 | 2016-06-18,11621,Saturday,1,6,2016,d_1968,,,,,0,0,0 1970 | 2016-06-19,11621,Sunday,2,6,2016,d_1969,NBAFinalsEnd,Sporting,Father's day,Cultural,0,0,0 1971 | -------------------------------------------------------------------------------- /decoders.py: -------------------------------------------------------------------------------- 1 | import numpy as np # linear algebra 2 | import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) 3 | 4 | import gc; import os 5 | import torch 6 | from torch.nn import * 7 | import torch.nn as nn 8 | import torch.nn.functional as F 9 | import warnings 10 | warnings.filterwarnings('ignore') 11 | import pandas as pd 12 | import numpy as np 13 | import matplotlib.pyplot as plt 14 | import seaborn as sns 15 | import gc 16 | import os 17 | from tqdm.notebook import tqdm 18 | from fastai.tabular import * 19 | 20 | from enc_and_utils import * 21 | from palsoftmax import * 22 | from attention import * 23 | from logsampler import * 24 | 25 | class AdaptiveEmbedding(torch.nn.Module): 26 | def __init__(self, n_token, d_embed, d_proj, cutoffs, div_val=1, 27 | sample_softmax=False): 28 | super(AdaptiveEmbedding, self).__init__() 29 | 30 | self.n_token = n_token 31 | self.d_embed = d_embed 32 | 33 | self.cutoffs = [cutoffs] + [n_token] 34 | self.div_val = div_val 35 | self.d_proj = d_proj 36 | 37 | self.emb_scale = d_proj ** 0.5 38 | 39 | self.cutoff_ends = [0] + [self.cutoffs] 40 | 41 | self.emb_layers = nn.ModuleList() 42 | self.emb_projs = nn.ParameterList() 43 | if div_val == 1: 44 | for i in range(1,self.n_token): 45 | self.emb_layers.append( 46 | nn.Embedding(n_token, d_embed, sparse=(sample_softmax > 0)) 47 | ) 48 | if d_proj != d_embed: 49 | self.emb_projs.append(nn.Parameter(torch.Tensor(d_proj, d_embed))) 50 | else: 51 | for i in range(len(self.cutoffs)): 52 | l_idx, r_idx = self.cutoff_ends[i], self.cutoff_ends[i+1] 53 | d_emb_i = d_embed // (div_val ** i) 54 | self.emb_layers.append(nn.Embedding(r_idx-l_idx, d_emb_i)) 55 | self.emb_projs.append(nn.Parameter(torch.Tensor(d_proj, d_emb_i))) 56 | 57 | def forward(self, inp): 58 | if self.div_val == 1: 59 | for i in range(1,self.n_token): 60 | embed = [] 61 | embed.append(self.emb_layers[i](inp)) 62 | if self.d_proj != self.d_embed: 63 | embed = F.linear(embed, self.emb_projs[0]) 64 | else: 65 | param = next(self.parameters()) 66 | inp_flat = inp.view(-1) 67 | emb_flat = torch.zeros([inp_flat.size(0), self.d_proj], 68 | dtype=param.dtype, device=param.device) 69 | for i in range(len(self.cutoffs)): 70 | l_idx, r_idx = self.cutoff_ends[i], self.cutoff_ends[i + 1] 71 | 72 | mask_i = (inp_flat >= l_idx) & (inp_flat < r_idx) 73 | indices_i = mask_i.nonzero().squeeze() 74 | 75 | if indices_i.numel() == 0: 76 | continue 77 | 78 | inp_i = inp_flat.index_select(0, indices_i) - l_idx 79 | emb_i = self.emb_layers[i](inp_i) 80 | emb_i = F.linear(emb_i, self.emb_projs[i]) 81 | 82 | emb_flat.index_copy_(0, indices_i, emb_i) 83 | 84 | embed = emb_flat.view(*inp.size(), self.d_proj) 85 | 86 | embed.mul_(self.emb_scale) 87 | 88 | return embed 89 | class GPT2OptimizedDecoderLayer(torch.nn.Module): 90 | def __init__(self, n_head, d_model, d_head, d_inner, dropout, hidden_size, **kwargs): 91 | super(GPT2OptimizedDecoderLayer, self).__init__() 92 | 93 | self.dec_attn = MultiHeadAttn(n_head, d_model, d_head, dropout, **kwargs) 94 | self.pos_ff = PositionwiseLSTMFF(d_model, d_inner, dropout, 95 | pre_lnorm=kwargs.get('pre_lnorm')) 96 | self.dec_attn2 = MultiHeadAttn(n_head, d_model, d_head, dropout, **kwargs) 97 | self.pos_gru_ff = PositionwiseGRUFF(d_model, d_inner, dropout, 98 | pre_lnorm=kwargs.get('pre_lnorm')) 99 | 100 | 101 | ###### ATTENTION ##################################### 102 | # self.dec_attn3 = GPT2ParallelSelfAttn(hidden_size, ) 103 | ###MUST WORK ON GPT2 ATTENTION######################## 104 | 105 | def forward(self, dec_inp, dec_attn_mask=None, mems=None): 106 | 107 | output = self.dec_attn(dec_inp, attn_mask=dec_attn_mask, 108 | mems=mems) 109 | output = self.pos_gru_ff(output) 110 | output = self.dec_attn2(dec_inp, attn_mask=dec_attn_mask, 111 | mems=mems) 112 | output = self.pos_ff(output) 113 | 114 | return output 115 | 116 | 117 | class RelLearnableDecoderLayer(torch.nn.Module): 118 | def __init__(self, n_head, d_model, d_head, d_inner, dropout, 119 | **kwargs): 120 | super(RelLearnableDecoderLayer, self).__init__() 121 | 122 | self.dec_attn = RelLearnableMultiHeadAttn(n_head, d_model, d_head, 123 | dropout, **kwargs) 124 | self.pos_gru_ff = PositionwiseGRUFF(d_model, d_inner, dropout, 125 | pre_lnorm=kwargs.get('pre_lnorm')) 126 | self.dec_attn2 = RelLearnableMultiHeadAttn(n_head, d_model, d_head, 127 | dropout, **kwargs) 128 | self.pos_ff = PositionwiseLSTMFF(d_model, d_inner, dropout, 129 | pre_lnorm=kwargs.get('pre_lnorm')) 130 | 131 | def forward(self, dec_inp, r_emb, r_w_bias, r_bias, dec_attn_mask=None, mems=None): 132 | 133 | output = self.dec_attn(dec_inp, r_emb, r_w_bias, r_bias, 134 | attn_mask=dec_attn_mask, 135 | mems=mems) 136 | output = self.pos_gru_ff(output) 137 | output = self.dec_attn2(dec_inp, r_emb, r_w_bias, r_bias, 138 | attn_mask=dec_attn_mask, 139 | mems=mems) 140 | output = self.pos_ff(output) 141 | 142 | return output 143 | 144 | 145 | class RelPartialLearnableDecoderLayer(torch.nn.Module): 146 | def __init__(self, n_head, d_model, d_head, d_inner, dropout, 147 | **kwargs): 148 | super(RelPartialLearnableDecoderLayer, self).__init__() 149 | 150 | self.dec_attn = RelPartialLearnableMultiHeadAttn(n_head, d_model, 151 | d_head, dropout, 152 | **kwargs) 153 | self.pos_ff = PositionwiseLSTMFF(d_model, d_inner, dropout, 154 | pre_lnorm=kwargs.get('pre_lnorm')) 155 | 156 | def forward(self, dec_inp, r, r_w_bias, r_r_bias, dec_attn_mask=None, mems=None): 157 | 158 | output = self.dec_attn(dec_inp, r, r_w_bias, r_r_bias, 159 | attn_mask=dec_attn_mask, 160 | mems=mems) 161 | output = self.pos_ff(output) 162 | -------------------------------------------------------------------------------- /enc_and_utils.py: -------------------------------------------------------------------------------- 1 | import numpy as np # linear algebra 2 | import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) 3 | 4 | import gc; import os 5 | import torch 6 | from torch.nn import * 7 | import torch.nn as nn 8 | import torch.nn.functional as F 9 | import warnings 10 | warnings.filterwarnings('ignore') 11 | import pandas as pd 12 | import numpy as np 13 | import matplotlib.pyplot as plt 14 | import seaborn as sns 15 | import gc 16 | import os 17 | from tqdm.notebook import tqdm 18 | from fastai.tabular import * 19 | 20 | from palsoftmax import * 21 | from attention import * 22 | from logsampler import * 23 | 24 | class PositionwiseLSTMFF(torch.nn.Module): 25 | def __init__(self, d_model, d_inner, dropout, pre_lnorm=False): 26 | super(PositionwiseLSTMFF, self).__init__() 27 | 28 | self.d_model = d_model 29 | self.d_inner = d_inner 30 | self.dropout = dropout 31 | 32 | self.CoreNet = nn.Sequential( 33 | nn.Linear(d_model, d_inner), 34 | nn.LSTMCell(d_model, d_inner), 35 | nn.ReLU(inplace=True), 36 | nn.Dropout(dropout), 37 | nn.Linear(d_inner, d_model), 38 | nn.Dropout(dropout), 39 | ) 40 | 41 | self.layer_norm = nn.LayerNorm(d_model) 42 | 43 | self.pre_lnorm = pre_lnorm 44 | 45 | def forward(self, inp): 46 | if self.pre_lnorm: 47 | # layer normalization + positionwise feed-forward 48 | core_out = self.CoreNet(self.layer_norm(inp)) 49 | 50 | # residual connection 51 | output = core_out + inp 52 | else: 53 | # positionwise feed-forward 54 | core_out = self.CoreNet(inp) 55 | 56 | # residual connection + layer normalization 57 | output = self.layer_norm(inp + core_out) 58 | 59 | return output 60 | 61 | # Create Attention mask 62 | def create_mask(qlen, mlen, dtype=torch.float32, same_length=False): 63 | """Creates attention mask when single-side context allowed only.""" 64 | attn_mask = torch.ones([qlen, qlen], dtype=dtype) 65 | mask_u = torch.triu(attn_mask, 0, -1) 66 | mask_dia = torch.triu(attn_mask, 0, 0) 67 | attn_mask_pad = torch.zeros([qlen, mlen], dtype=dtype) 68 | ret = torch.concat([attn_mask_pad, mask_u - mask_dia], 1) 69 | if same_length: 70 | mask_l = torch.triu(attn_mask, -1, 0) 71 | ret = torch.concat([ret[:, :qlen] + mask_l - mask_dia, ret[:, qlen:]], 1) 72 | 73 | return ret 74 | 75 | class PositionalEmbedding(Module): 76 | def __init__(self, dim, **kwargs): 77 | super(PositionalEmbedding, self).__init__(**kwargs) 78 | self.dim = dim 79 | 80 | """Constructs inversed frequency vector for positional embedding layer.""" 81 | self.inv_freq = 1.0 / (10000.0**(torch.range(0, 19380, 10.0) / self.dim)) 82 | 83 | def forward(self, pos_seq, batch_size): 84 | """Implements call() for the layer.""" 85 | sinusoid_inp = torch.einsum('i,d->id', pos_seq, self.inv_freq) 86 | pos_emb = torch.cat([torch.sin(sinusoid_inp), torch.cos(sinusoid_inp)], -1) 87 | pos_emb = pos_emb[:, None, :] 88 | 89 | if batch_size is not None: 90 | pos_emb = tile(pos_emb, 2, self.dim) 91 | 92 | return pos_emb 93 | 94 | def positionalencoding2d(d_model, height, width): 95 | """ 96 | :param d_model: dimension of the model 97 | :param height: height of the positions 98 | :param width: width of the positions 99 | :return: d_model*height*width position matrix 100 | """ 101 | if d_model % 4 != 0: 102 | raise ValueError("Cannot use sin/cos positional encoding with " 103 | "odd dimension (got dim={:d})".format(d_model)) 104 | pe = torch.zeros(d_model, height, width) 105 | # Each dimension use half of d_model 106 | d_model = int(d_model / 2) 107 | div_term = torch.exp(torch.arange(0., d_model, 2) * 108 | -(math.log(10000.0) / d_model)) 109 | pos_w = torch.arange(0., width).unsqueeze(1) 110 | pos_h = torch.arange(0., height).unsqueeze(1) 111 | pe[0:d_model:2, :, :] = torch.sin(pos_w * div_term).transpose(0, 1).unsqueeze(1).repeat(1, height, 1) 112 | pe[1:d_model:2, :, :] = torch.cos(pos_w * div_term).transpose(0, 1).unsqueeze(1).repeat(1, height, 1) 113 | pe[d_model::2, :, :] = torch.sin(pos_h * div_term).transpose(0, 1).unsqueeze(2).repeat(1, 1, width) 114 | pe[d_model + 1::2, :, :] = torch.cos(pos_h * div_term).transpose(0, 1).unsqueeze(2).repeat(1, 1, width) 115 | 116 | return pe 117 | 118 | ## Took this from the TF GitHub repo and translated into Pytorch ## 119 | class RelativeAttention(Module): 120 | """Core calculations for relative attention.""" 121 | 122 | def __init__(self, dropout_att, scale): 123 | super(RelativeAttention, self).__init__() 124 | self.scale = scale 125 | self.dropout_att = dropout_att 126 | 127 | def build(self, unused_input_shapes): 128 | self.attention_probs_dropout = torch.nn.Dropout( 129 | p=self.dropout_att) 130 | 131 | super(RelativeAttention, self).build(unused_input_shapes) 132 | 133 | def call(self, q_head, k_head_h, v_head_h, k_head_r, seg_embed, seg_mat, 134 | r_w_bias, r_r_bias, r_s_bias, attn_mask): 135 | # content based attention score 136 | ac = torch.einsum('ibnd,jbnd->ijbn', q_head + r_w_bias, k_head_h) 137 | 138 | # position based attention score 139 | bd = torch.einsum('ibnd,jbnd->ijbn', q_head + r_r_bias, k_head_r) 140 | bd = rel_shift(bd, klen=tf.shape(ac)[1]) 141 | 142 | # segment-based attention score 143 | if seg_mat is None: 144 | ef = 0 145 | else: 146 | ef = torch.einsum('ibnd,snd->isbn', q_head + r_s_bias, seg_embed) 147 | tgt_shape = torch.shape(bd) 148 | ef = torch.where( 149 | torch.Tensor(np.broadcast_to(torch.expand_dims(seg_mat, 3), tgt_shape)), 150 | torch.Tensor(np.broadcast_to(ef[:, 1:, :, :], tgt_shape)), 151 | torch.Tensor(np.broadcast_to(ef[:, :1, :, :], tgt_shape))) 152 | 153 | # merges attention scores and performs masking 154 | attn_score = (ac + bd + ef) * self.scale 155 | if attn_mask is not None: 156 | attn_score = attn_score - 1e30 * attn_mask 157 | 158 | # attention probability 159 | attn_prob = functional.softmax(attn_score, 1) 160 | attn_prob = self.attention_probs_dropout(attn_prob) 161 | 162 | # attention output 163 | attn_vec = torch.einsum('ijbn,jbnd->ibnd', attn_prob, v_head_h) 164 | class MultiHeadAttn(torch.nn.Module): 165 | def __init__(self, n_head, d_model, d_head, dropout, dropatt=0, 166 | pre_lnorm=False): 167 | super(MultiHeadAttn, self).__init__() 168 | 169 | self.n_head = n_head 170 | self.d_model = d_model 171 | self.d_head = d_head 172 | self.dropout = dropout 173 | 174 | self.q_net = nn.Linear(d_model, n_head * d_head, bias=False) 175 | self.kv_net = nn.Linear(d_model, 2 * n_head * d_head, bias=False) 176 | 177 | self.drop = nn.Dropout(dropout) 178 | self.dropatt = nn.Dropout(dropatt) 179 | self.o_net = nn.Linear(n_head * d_head, d_model, bias=False) 180 | 181 | self.layer_norm = nn.LayerNorm(d_model) 182 | 183 | self.scale = 1 / (d_head ** 0.5) 184 | 185 | self.pre_lnorm = pre_lnorm 186 | 187 | def forward(self, h, attn_mask=None, mems=None): 188 | ##### multihead attention 189 | # [hlen x bsz x n_head x d_head] 190 | 191 | if mems is not None: 192 | c = torch.cat([mems, h], 0) 193 | else: 194 | c = h 195 | 196 | if self.pre_lnorm: 197 | ##### layer normalization 198 | c = self.layer_norm(c) 199 | 200 | head_q = self.q_net(h) 201 | head_k, head_v = torch.chunk(self.kv_net(c), 2, -1) 202 | 203 | head_q = head_q.view(h.size(0), h.size(1), self.n_head, self.d_head) 204 | head_k = head_k.view(c.size(0), c.size(1), self.n_head, self.d_head) 205 | head_v = head_v.view(c.size(0), c.size(1), self.n_head, self.d_head) 206 | 207 | # [qlen x klen x bsz x n_head] 208 | attn_score = torch.einsum('ibnd,jbnd->ijbn', (head_q, head_k)) 209 | attn_score.mul_(self.scale) 210 | if attn_mask is not None and attn_mask.any().item(): 211 | if attn_mask.dim() == 2: 212 | attn_score.masked_fill_(attn_mask[None,:,:,None], -float('inf')) 213 | elif attn_mask.dim() == 3: 214 | attn_score.masked_fill_(attn_mask[:,:,:,None], -float('inf')) 215 | 216 | # [qlen x klen x bsz x n_head] 217 | attn_prob = F.softmax(attn_score, dim=1) 218 | attn_prob = self.dropatt(attn_prob) 219 | 220 | # [qlen x klen x bsz x n_head] + [klen x bsz x n_head x d_head] -> [qlen x bsz x n_head x d_head] 221 | attn_vec = torch.einsum('ijbn,jbnd->ibnd', (attn_prob, head_v)) 222 | attn_vec = attn_vec.contiguous().view( 223 | attn_vec.size(0), attn_vec.size(1), self.n_head * self.d_head) 224 | 225 | ##### linear projection 226 | attn_out = self.o_net(attn_vec) 227 | attn_out = self.drop(attn_out) 228 | 229 | if self.pre_lnorm: 230 | ##### residual connection 231 | output = h + attn_out 232 | else: 233 | ##### residual connection + layer normalization 234 | output = self.layer_norm(h + attn_out) 235 | 236 | return output 237 | 238 | class RelMultiHeadAttn(torch.nn.Module): 239 | def __init__(self, n_head, d_model, d_head, dropout, dropatt=0, 240 | tgt_len=None, ext_len=None, mem_len=None, pre_lnorm=False): 241 | super(RelMultiHeadAttn, self).__init__() 242 | 243 | self.n_head = n_head 244 | self.d_model = d_model 245 | self.d_head = d_head 246 | self.dropout = dropout 247 | 248 | self.qkv_net = nn.Linear(d_model, 3 * n_head * d_head, bias=False) 249 | 250 | self.drop = nn.Dropout(dropout) 251 | self.dropatt = nn.Dropout(dropatt) 252 | self.o_net = nn.Linear(n_head * d_head, d_model, bias=False) 253 | 254 | self.layer_norm = nn.LayerNorm(d_model) 255 | 256 | self.scale = 1 / (d_head ** 0.5) 257 | 258 | self.pre_lnorm = pre_lnorm 259 | 260 | def _parallelogram_mask(self, h, w, left=False): 261 | mask = torch.ones((h, w)).byte() 262 | m = min(h, w) 263 | mask[:m,:m] = torch.triu(mask[:m,:m]) 264 | mask[-m:,-m:] = torch.tril(mask[-m:,-m:]) 265 | 266 | if left: 267 | return mask 268 | else: 269 | return mask.flip(0) 270 | 271 | def _shift(self, x, qlen, klen, mask, left=False): 272 | if qlen > 1: 273 | zero_pad = torch.zeros((x.size(0), qlen-1, x.size(2), x.size(3)), 274 | device=x.device, dtype=x.dtype) 275 | else: 276 | zero_pad = torch.zeros(0, device=x.device, dtype=x.dtype) 277 | 278 | if left: 279 | mask = mask.flip(1) 280 | x_padded = torch.cat([zero_pad, x], dim=1).expand(qlen, -1, -1, -1) 281 | else: 282 | x_padded = torch.cat([x, zero_pad], dim=1).expand(qlen, -1, -1, -1) 283 | 284 | x = x_padded.masked_select(mask[:,:,None,None]) \ 285 | .view(qlen, klen, x.size(2), x.size(3)) 286 | 287 | return x 288 | 289 | def _rel_shift(self, x, zero_triu=False): 290 | zero_pad = torch.zeros((x.size(0), 1, *x.size()[2:]), 291 | device=x.device, dtype=x.dtype) 292 | x_padded = torch.cat([zero_pad, x], dim=1) 293 | 294 | x_padded = x_padded.view(x.size(1) + 1, x.size(0), *x.size()[2:]) 295 | 296 | x = x_padded[1:].view_as(x) 297 | 298 | if zero_triu: 299 | ones = torch.ones((x.size(0), x.size(1))) 300 | x = x * torch.tril(ones, x.size(1) - x.size(0))[:,:,None,None] 301 | 302 | return x 303 | 304 | def forward(self, w, r, attn_mask=None, mems=None): 305 | raise NotImplementedError 306 | def CBR(x, out_layer, kernel, stride, dilation): 307 | x = torch.nn.Conv1d(out_layer, kernel_size=kernel, dilation_rate=dilation, strides=stride, padding="same")(x) 308 | x = torch.nn.BatchNormalization()(x) 309 | x = torch.nn.functional.Activation("relu")(x) 310 | return x 311 | 312 | def se_block(x_in, layer_n): 313 | x = torch.nn.GlobalAveragePooling1D()(x_in) 314 | x = torch.nn.Dense(layer_n//8, activation="relu")(x) 315 | x = torch.nn.Dense(layer_n, activation="sigmoid")(x) 316 | x_out=torch.nn.Multiply()([x_in, x]) 317 | return x_out 318 | 319 | def resblock(x_in, layer_n, kernel, dilation, use_se=True): 320 | x = CBR(x_in, layer_n, kernel, 1, dilation) 321 | x = CBR(x, layer_n, kernel, 1, dilation) 322 | if use_se: 323 | x = se_block(x, layer_n) 324 | x = torch.nn.Add()([x_in, x]) 325 | return x 326 | class TimeDistributed(torch.nn.Module): 327 | def __init__(self, layer, time_steps, *args): 328 | super(TimeDistributed, self).__init__() 329 | 330 | self.layers = nn.ModuleList([layer(*args) for i in range(time_steps)]) 331 | 332 | def forward(self, x): 333 | 334 | batch_size, time_steps, C, H, W = x.size() 335 | output = torch.tensor([]) 336 | for i in range(time_steps): 337 | output_t = self.layers[i](x[:, i, :, :, :]) 338 | output_t = y.unsqueeze(1) 339 | output = torch.cat((output, output_t ), 1) 340 | return output 341 | 342 | class TransformerXLHybridEncoder(torch.nn.Module): 343 | def __init__(self, 344 | n_token, 345 | n_layer, 346 | d_model, 347 | n_head, 348 | d_head, 349 | d_inner, 350 | dropout, 351 | dropout_att, 352 | attn_type, 353 | bi_data, 354 | is_training, 355 | initializer, 356 | mem_len=None, 357 | same_length=False, 358 | clamp_len=-1, 359 | untie_r=False, 360 | use_tpu=True, 361 | reuse_len=None, 362 | ff_activation='relu', 363 | use_cls_mask=False, 364 | **kwargs): 365 | 366 | super(TransformerXLHybridEncoder, self).__init__(**kwargs) 367 | 368 | self.n_token = n_token 369 | self.initializer = initializer 370 | self.attn_type = attn_type 371 | self.n_layer = n_layer 372 | self.d_model = d_model 373 | self.n_head = n_head 374 | self.d_head = d_head 375 | self.d_inner = d_inner 376 | self.ff_activation = ff_activation 377 | self.untie_r = untie_r 378 | self.use_tpu = use_tpu 379 | self.dropout = dropout 380 | self.dropout_att = dropout_att 381 | 382 | self.mem_len = mem_len 383 | self.reuse_len = reuse_len 384 | self.bi_data = bi_data 385 | self.clamp_len = clamp_len 386 | self.same_length = same_length 387 | self.use_cls_mask = use_cls_mask 388 | 389 | def build(self, unused_input_shapes): 390 | 391 | torch_float = torch.float32 392 | tf_float = torch_float 393 | self.inp = torch.nn.Input((28, -1)) 394 | self.cbr = CBR(self.inp, 64, 7, 1, 1) 395 | self.embedding_lookup = EmbeddingLookup( 396 | n_token=self.n_token, 397 | d_embed=self.d_model, 398 | initializer=self.initializer, 399 | dtype=self.tf_float, 400 | name='embedding1') 401 | 402 | self.h_dropout = torch.nn.Dropout(p=self.dropout) 403 | self.g_dropout = torch.nn.Dropout(p=self.dropout) 404 | 405 | if self.untie_r: 406 | self.r_w_bias = ( 407 | self.add_weight( 408 | 'r_w_bias', 409 | shape=[self.n_layer, self.n_head, self.d_head], 410 | dtype=self.torch_float, 411 | initializer=self.initializer)) 412 | self.r_r_bias = ( 413 | self.add_weight( 414 | 'r_r_bias', 415 | shape=[self.n_layer, self.n_head, self.d_head], 416 | dtype=self.torch_float, 417 | initializer=self.initializer)) 418 | self.r_s_bias = ( 419 | self.add_weight( 420 | 'r_s_bias', 421 | shape=[self.n_layer, self.n_head, self.d_head], 422 | dtype=self.torch_float, 423 | initializer=self.initializer)) 424 | else: 425 | self.r_w_bias = ( 426 | self.add_weight( 427 | 'r_w_bias', 428 | shape=[self.n_head, self.d_head], 429 | dtype=self.torch_float, 430 | initializer=self.initializer)) 431 | self.r_r_bias = ( 432 | self.add_weight( 433 | 'r_r_bias', 434 | shape=[self.n_head, self.d_head], 435 | dtype=self.torch_float, 436 | initializer=self.initializer)) 437 | self.r_s_bias = ( 438 | self.add_weight( 439 | 'r_s_bias', [self.n_head, self.d_head], 440 | dtype=self.torch_float, 441 | initializer=self.initializer)) 442 | 443 | self.seg_embed = self.add_weight( 444 | 'seg_embed', [self.n_layer, 2, self.n_head, self.d_head], 445 | dtype=self.torch_float, 446 | initializer=self.initializer) 447 | 448 | self.mask_emb = self.add_weight( 449 | 'mask_emb/mask_emb', shape=[1, 1, self.d_model], dtype=self.torch_float) 450 | 451 | self.emb_dropout = torch.nn.Dropout(p=self.dropout) 452 | self.fwd_position_embedding = positionalencoding2d(self.d_model, self.n_head, self.d_head) 453 | self.fwd_td = TimeDistributed(self.fwd_position_embedding, time_steps=20) 454 | self.fwd_lstm = torch.nn.LSTM(128)(self.fwd_td) 455 | self.hidden_vect_1 = ( 456 | Variable(torch.zeros(1, 1, hidden_size)), 457 | Variable(torch.zeros(1, 1, hidden_size))) 458 | self.output1, self.hidden1 = self.fwd_lstm(Variable(torch.rand(1, 5, 10)), hidden_vect_1) 459 | self.bwd_position_embedding = PositionalEmbedding(self.d_model, self.n_head, self.d_head) 460 | self.bwd_td = TimeDistributed(self.bwd_position_embedding, time_steps=20) 461 | self.bwd_lstm = torch.nn.LSTM(128)(self.bwd_td) 462 | self.hidden_position_embedding = PositionalEmbedding(self.d_model, self.n_head, self.d_head) 463 | self.hidden_td = TimeDistributed(self.hidden_position_embedding, time_steps=20) 464 | self.hidden_lstm = torch.nn.LSTM(128)(self.hidden_td) 465 | self.hidden_vect_1 = ( 466 | Variable(torch.zeros(1, 1, hidden_size)), 467 | Variable(torch.zeros(1, 1, hidden_size))) 468 | self.output2, self.hidden2 = self.bwd_lstm(Variable(torch.rand(1, 5, 10)), hidden_vect_1) 469 | 470 | self.rel_multihead_layers = [] 471 | self.h_positionwise_ffn_layers = [] 472 | self.layer_norm_layers = [] 473 | for i in range(self.n_layer): 474 | self.rel_multihead_layers.append( 475 | RelMultiHeadAttn( 476 | d_model=self.d_model, 477 | dropout=self.dropout, 478 | n_head=self.n_head, 479 | d_head=self.d_head, 480 | name='layer_%d/rel_attn' % (i))) 481 | self.h_positionwise_ffn_layers.append( 482 | PositionwiseFF( 483 | d_model=self.d_model, 484 | d_inner=self.d_inner, 485 | dropout=self.dropout, 486 | kernel_initializer=self.initializer, 487 | activation_type=self.ff_activation, 488 | name='layer_%d/ff' % (i))) 489 | 490 | self.output_dropout = torch.nn.Dropout(p=self.dropout) 491 | 492 | def __call__(self, 493 | inp_k, 494 | seg_id=None, 495 | input_mask=None, 496 | mems=None, 497 | perm_mask=None, 498 | target_mapping=None, 499 | inp_q=None, 500 | **kwargs): 501 | # Uses dict to feed inputs into call() in order to keep mems as a python 502 | # list. 503 | inputs = { 504 | 'inp_k': inp_k, 505 | 'seg_id': seg_id, 506 | 'input_mask': input_mask, 507 | 'mems': mems, 508 | 'perm_mask': perm_mask, 509 | 'target_mapping': target_mapping, 510 | 'inp_q': inp_q 511 | } 512 | return super(TransformerXLModel, self).__call__(inputs, **kwargs) 513 | 514 | def call(self, inputs): 515 | """Implements call() for the layer.""" 516 | inp_k = inputs['inp_k'] 517 | seg_id = inputs['seg_id'] 518 | input_mask = inputs['input_mask'] 519 | mems = inputs['mems'] 520 | perm_mask = inputs['perm_mask'] 521 | target_mapping = inputs['target_mapping'] 522 | inp_q = inputs['inp_q'] 523 | 524 | new_mems = [] 525 | 526 | bsz = torch.shape(inp_k)[1] 527 | 528 | qlen = inp_k.shape.as_list()[0] 529 | 530 | mlen = mems[0].shape.as_list()[0] if mems is not None else 0 531 | klen = mlen + qlen 532 | 533 | ##### Attention mask 534 | # causal attention mask 535 | if self.attn_type == 'uni': 536 | attn_mask = _create_mask(qlen, mlen, self.tf_float, self.same_length) 537 | # pylint: enable=protected-access 538 | attn_mask = attn_mask[:, :, None, None] 539 | elif self.attn_type == 'bi': 540 | attn_mask = None 541 | else: 542 | raise ValueError('Unsupported attention type: {}'.format(self.attn_type)) 543 | 544 | # data mask: input mask & perm mask 545 | if input_mask is not None and perm_mask is not None: 546 | data_mask = input_mask[None] + perm_mask 547 | 548 | elif input_mask is not None and perm_mask is None: 549 | data_mask = input_mask[None] 550 | elif input_mask is None and perm_mask is not None: 551 | data_mask = perm_mask 552 | else: 553 | data_mask = None 554 | 555 | if data_mask is not None: 556 | # all mems can be attended to 557 | mems_mask = torch.zeros([tf.shape(data_mask)[0], mlen, bsz], 558 | dtype=self.tf_float) 559 | data_mask = torch.cat([mems_mask, data_mask], 1) 560 | if attn_mask is None: 561 | attn_mask = data_mask[:, :, :, None] 562 | else: 563 | attn_mask += data_mask[:, :, :, None] 564 | 565 | if attn_mask is not None: 566 | attn_mask = torch.cast(attn_mask > 0, dtype=self.tf_float) 567 | 568 | if attn_mask is not None: 569 | non_tgt_mask = -torch.eye(qlen, dtype=self.tf_float) 570 | non_tgt_mask = torch.cat( 571 | [tf.zeros([qlen, mlen], dtype=self.tf_float), non_tgt_mask], axis=-1) 572 | non_tgt_mask = torch.cast( 573 | (attn_mask + non_tgt_mask[:, :, None, None]) > 0, dtype=self.tf_float) 574 | else: 575 | non_tgt_mask = None 576 | 577 | word_emb_k = self.embedding_lookup(inp_k) 578 | 579 | if inp_q is not None: 580 | if target_mapping is not None: 581 | word_emb_q = torch.tile(self.mask_emb, 582 | [tf.shape(target_mapping)[0], bsz, 1]) 583 | else: 584 | inp_q_ext = inp_q[:, :, None] 585 | word_emb_q = inp_q_ext * self.mask_emb + (1 - inp_q_ext) * word_emb_k 586 | 587 | output_h = self.h_dropout(word_emb_k) 588 | output_g = None 589 | if inp_q is not None: 590 | output_g = self.g_dropout(word_emb_q) 591 | 592 | ##### Segment embedding 593 | if seg_id is not None: 594 | 595 | # Convert `seg_id` to one-hot `seg_mat` 596 | 597 | mem_pad = torch.zeros([mlen, bsz], dtype=tf.int32) 598 | 599 | cat_id = torch.concat([mem_pad, seg_id], 0) 600 | 601 | if self.use_cls_mask: 602 | # `1` indicates not in the same segment [qlen x klen x bsz] 603 | # seg_id: [qlen x bsz] & cat_id: [klen x bsz] 604 | cls_mat = torch.logical_or( 605 | torch.equal(seg_id, tf.constant([data_utils.SEG_ID_CLS]))[:, None], 606 | torch.equal(cat_id, tf.constant([data_utils.SEG_ID_CLS]))[None, :]) 607 | seg_mat = torch.equal(seg_id[:, None], cat_id[None, :]) 608 | seg_mat = torch.logical_or(cls_mat, seg_mat) 609 | else: 610 | seg_mat = tf.logical_not(tf.equal(seg_id[:, None], cat_id[None, :])) 611 | else: 612 | seg_mat = None 613 | 614 | dtype = self.tf_float 615 | freq_seq = tf.range(0, self.d_model, 2.0) 616 | if dtype is not None and dtype != tf.float32: 617 | freq_seq = tf.cast(freq_seq, dtype=self.dtype) 618 | 619 | if self.attn_type == 'bi': 620 | beg, end = klen, -qlen 621 | elif self.attn_type == 'uni': 622 | beg, end = klen, -1 623 | else: 624 | raise ValueError('Unknown `attn_type` {}.'.format(self.attn_type)) 625 | 626 | if self.bi_data: 627 | fwd_pos_seq = torch.range(beg, end, -1.0) 628 | bwd_pos_seq = torch.range(-beg, -end, 1.0) 629 | 630 | if dtype is not None and dtype != tf.float32: 631 | fwd_pos_seq = torch.cast(fwd_pos_seq, dtype=dtype) 632 | bwd_pos_seq = torxh.cast(bwd_pos_seq, dtype=dtype) 633 | 634 | if self.clamp_len > 0: 635 | fwd_pos_seq = torch.clip_by_value(fwd_pos_seq, -self.clamp_len, 636 | self.clamp_len) 637 | bwd_pos_seq = torch.clip_by_value(bwd_pos_seq, -self.clamp_len, 638 | self.clamp_len) 639 | 640 | if bsz is not None: 641 | fwd_pos_emb = self.fwd_position_embedding(fwd_pos_seq, bsz // 2) 642 | bwd_pos_emb = self.bwd_position_embedding(bwd_pos_seq, bsz // 2) 643 | else: 644 | fwd_pos_emb = self.fwd_position_embedding(fwd_pos_seq, None) 645 | bwd_pos_emb = self.bwd_position_embedding(bwd_pos_seq, None) 646 | 647 | pos_emb = tf.concat([fwd_pos_emb, bwd_pos_emb], axis=1) 648 | else: 649 | fwd_pos_seq = tf.range(beg, end, -1.0) 650 | if dtype is not None and dtype != tf.float32: 651 | fwd_pos_seq = tf.cast(fwd_pos_seq, dtype=dtype) 652 | if self.clamp_len > 0: 653 | fwd_pos_seq = tf.clip_by_value(fwd_pos_seq, -self.clamp_len, 654 | self.lamp_len) 655 | 656 | pos_emb = self.fwd_position_embedding(fwd_pos_seq, bsz) 657 | 658 | pos_emb = self.emb_dropout(pos_emb) 659 | 660 | if mems is None: 661 | mems = [None] * self.n_layer 662 | for i in range(self.n_layer): 663 | # cache new mems 664 | new_mems.append( 665 | _cache_mem(output_h, mems[i], self.mem_len, self.reuse_len)) 666 | # pylint: enable=protected-access 667 | 668 | # segment bias 669 | if seg_id is None: 670 | r_s_bias_i = None 671 | seg_embed_i = None 672 | else: 673 | r_s_bias_i = self.r_s_bias if not self.untie_r else self.r_s_bias[i] 674 | seg_embed_i = self.seg_embed[i] 675 | 676 | ffn_layer = self.h_positionwise_ffn_layers[i] 677 | attention_layer = self.rel_multihead_layers[i] 678 | output_h, output_g = attention_layer( 679 | h=output_h, 680 | g=output_g, 681 | r=pos_emb, 682 | r_w_bias=self.r_w_bias if not self.untie_r else self.r_w_bias[i], 683 | r_r_bias=self.r_r_bias if not self.untie_r else self.r_r_bias[i], 684 | seg_mat=seg_mat, 685 | r_s_bias=r_s_bias_i, 686 | seg_embed=seg_embed_i, 687 | attn_mask_h=non_tgt_mask, 688 | attn_mask_g=attn_mask, 689 | mems=mems[i], 690 | target_mapping=target_mapping) 691 | output_h = ffn_layer(output_h) 692 | if output_g is not None: 693 | output_g = ffn_layer(output_g) 694 | 695 | if inp_q is not None: 696 | output = output_g 697 | else: 698 | output = output_h 699 | 700 | return output 701 | -------------------------------------------------------------------------------- /features.py: -------------------------------------------------------------------------------- 1 | import numpy as np # linear algebra 2 | import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) 3 | import scipy;from scipy import stats 4 | sales = pd.read_csv('sales_train_validation.csv') 5 | stonks = pd.read_csv('sell_prices.csv') 6 | cal = pd.read_csv('calendar[1].csv') 7 | COLUMN_1 = [14, 30, 60, 120, 180, 360] 8 | COLUMN_2 = [7, 14, 28, 56] 9 | 10 | def rolling_mean_gen(df): 11 | for i in COLUMN_1: 12 | df[f'rolling_s{i}'] = df.groupby(['id'])['d_1'].transform(lambda x: x.shift(28).rolling(i).mean()) 13 | return df 14 | 15 | def lag_feats(df): 16 | for i in range(1, 1913): 17 | df['lag_t14'] = df.groupby(['id'])[f'd_{i}'].transform(lambda x: x.shift(14)) 18 | df['lag_t7'] = df.groupby(['id'])[f'd_{i}'].transform(lambda x: x.shift(7)) 19 | df['lag_t28'] = df.groupby(['id'])[f'd_{i}'].transform(lambda x: x.shift(28)) 20 | df['lag_t56'] = df.groupby(['id'])[f'd_{i}'].transform(lambda x: x.shift(56)) 21 | df['stddev'] = df.groupby(['id'])[f'd_{i}'].transform('std') 22 | df['lag_t14'] = df.groupby(['id'])[f'd_{i}'].transform(lambda x: np.std(x.shift(14))) 23 | df['lag_t7'] = df.groupby(['id'])[f'd_{i}'].transform(lambda x: np.std(x.shift(7))) 24 | df['lag_t28'] = df.groupby(['id'])[f'd_{i}'].transform(lambda x: np.std(x.shift(28))) 25 | df['lag_t56'] = df.groupby(['id'])[f'd_{i}'].transform(lambda x: np.std(x.shift(56))) 26 | return df 27 | 28 | def fourier_et_al(df): 29 | for i in range(1, 1913): 30 | df['fourier_lag_t14'] = df.groupby(['id'])[f'd_{i}'].transform(lambda x: np.fft.fft(x.shift(14))) 31 | df['fourier_lag_t7'] = df.groupby(['id'])[f'd_{i}'].transform(lambda x: np.fft.fft(x.shift(7))) 32 | df['fourier_lag_t28'] = df.groupby(['id'])[f'd_{i}'].transform(lambda x: np.fft.fft(x.shift(28))) 33 | df['fourier_lag_t56'] = df.groupby(['id'])[f'd_{i}'].transform(lambda x: np.fft.fft(x.shift(56))) 34 | 35 | df['ifourier_lag_t14'] = df.groupby(['id'])[f'd_{i}'].transform(lambda x: np.fft.ifft(x.shift(14))) 36 | df['ifourier_lag_t7'] = df.groupby(['id'])[f'd_{i}'].transform(lambda x: np.fft.ifft(x.shift(7))) 37 | df['ifourier_lag_t28'] = df.groupby(['id'])[f'd_{i}'].transform(lambda x: np.fft.ifft(x.shift(28))) 38 | df['ifourier_lag_t56'] = df.groupby(['id'])[f'd_{i}'].transform(lambda x: np.fft.ifft(x.shift(56))) 39 | 40 | df['dfourier_lag_t14'] = df.groupby(['id'])[f'd_{i}'].transform(lambda x: scipy.fft.dct(x.shift(14), type=2, norm='ortho')) 41 | df['dfourier_lag_t7'] = df.groupby(['id'])[f'd_{i}'].transform(lambda x: scipy.fft.dct(x.shift(7), type=2, norm='ortho')) 42 | df['dfourier_lag_t28'] = df.groupby(['id'])[f'd_{i}'].transform(lambda x: scipy.fft.dct(x.shift(28), type=2, norm='ortho')) 43 | df['dfourier_lag_t56'] = df.groupby(['id'])[f'd_{i}'].transform(lambda x: scipy.fft.dct(x.shift(56), type=2, norm='ortho')) 44 | 45 | df['idfourier_lag_t14'] = df.groupby(['id'])[f'd_{i}'].transform(lambda x: scipy.fft.idct(x.shift(14), type=2, norm='ortho')) 46 | df['idfourier_lag_t7'] = df.groupby(['id'])[f'd_{i}'].transform(lambda x: scipy.fft.idct(x.shift(7), type=2, norm='ortho')) 47 | df['idfourier_lag_t28'] = df.groupby(['id'])[f'd_{i}'].transform(lambda x: scipy.fft.idct(x.shift(28), type=2, norm='ortho')) 48 | df['idfourier_lag_t56'] = df.groupby(['id'])[f'd_{i}'].transform(lambda x: scipy.fft.idct(x.shift(56), type=2, norm='ortho')) 49 | 50 | df['dsfourier_lag_t14'] = df.groupby(['id'])[f'd_{i}'].transform(lambda x: scipy.fft.dst(x.shift(14), type=2, norm='ortho')) 51 | df['dsfourier_lag_t7'] = df.groupby(['id'])[f'd_{i}'].transform(lambda x: scipy.fft.dst(x.shift(7), type=2, norm='ortho')) 52 | df['dsfourier_lag_t28'] = df.groupby(['id'])[f'd_{i}'].transform(lambda x: scipy.fft.dst(x.shift(28), type=2, norm='ortho')) 53 | df['dsfourier_lag_t56'] = df.groupby(['id'])[f'd_{i}'].transform(lambda x: scipy.fft.dst(x.shift(56), type=2, norm='ortho')) 54 | 55 | df['idfourier_lag_t14'] = df.groupby(['id'])[f'd_{i}'].transform(lambda x: scipy.fft.idst(x.shift(14), type=2, norm='ortho')) 56 | df['idfourier_lag_t28'] = df.groupby(['id'])[f'd_{i}'].transform(lambda x: scipy.fft.idst(x.shift(28), type=2, norm='ortho')) 57 | df['idfourier_lag_t56'] = df.groupby(['id'])[f'd_{i}'].transform(lambda x: scipy.fft.idst(x.shift(56), type=2, norm='ortho')) 58 | 59 | 60 | def other_feats(df): 61 | df['price_max'] = df.groupby(['store_id','item_id'])['sell_price'].transform('max') 62 | df['price_min'] = df.groupby(['store_id','item_id'])['sell_price'].transform('min') 63 | df['price_std'] = df.groupby(['store_id','item_id'])['sell_price'].transform('std') 64 | df['price_mean'] = df.groupby(['store_id','item_id'])['sell_price'].transform('mean') 65 | return df 66 | 67 | import gc 68 | lag_feats(sales) 69 | rolling_mean_gen(sales) 70 | fourier_et_al(sales) 71 | sales.to_csv('training.csv.zip', index=False) 72 | gc.collect() 73 | -------------------------------------------------------------------------------- /logsampler.py: -------------------------------------------------------------------------------- 1 | class LogUniformSampler(object): 2 | def __init__(self, range_max, n_sample): 3 | """ 4 | Reference : https://github.com/tensorflow/tensorflow/blob/r1.10/tensorflow/python/ops/candidate_sampling_ops.py 5 | `P(class) = (log(class + 2) - log(class + 1)) / log(range_max + 1)` 6 | expected count can be approximated by 1 - (1 - p)^n 7 | and we use a numerically stable version -expm1(num_tries * log1p(-p)) 8 | Our implementation fixes num_tries at 2 * n_sample, and the actual #samples will vary from run to run 9 | """ 10 | with torch.no_grad(): 11 | self.range_max = range_max 12 | log_indices = torch.arange(1., range_max+2., 1.).log_() 13 | self.dist = (log_indices[1:] - log_indices[:-1]) / log_indices[-1] 14 | # print('P', self.dist.numpy().tolist()[-30:]) 15 | 16 | self.log_q = (- (-self.dist.double().log1p_() * 2 * n_sample).expm1_()).log_().float() 17 | 18 | self.n_sample = n_sample 19 | 20 | def sample(self, labels): 21 | """ 22 | labels: [b1, b2] 23 | Return 24 | true_log_probs: [b1, b2] 25 | samp_log_probs: [n_sample] 26 | neg_samples: [n_sample] 27 | """ 28 | 29 | # neg_samples = torch.empty(0).long() 30 | n_sample = self.n_sample 31 | n_tries = 2 * n_sample 32 | 33 | with torch.no_grad(): 34 | neg_samples = torch.multinomial(self.dist, n_tries, replacement=True).unique() 35 | device = labels.device 36 | neg_samples = neg_samples.to(device) 37 | true_log_probs = self.log_q[labels].to(device) 38 | samp_log_probs = self.log_q[neg_samples].to(device) 39 | return true_log_probs, samp_log_probs, neg_samples 40 | 41 | def sample_logits(embedding, bias, labels, inputs, sampler): 42 | """ 43 | embedding: an nn.Embedding layer 44 | bias: [n_vocab] 45 | labels: [b1, b2] 46 | inputs: [b1, b2, n_emb] 47 | sampler: you may use a LogUniformSampler 48 | Return 49 | logits: [b1, b2, 1 + n_sample] 50 | """ 51 | true_log_probs, samp_log_probs, neg_samples = sampler.sample(labels) 52 | n_sample = neg_samples.size(0) 53 | b1, b2 = labels.size(0), labels.size(1) 54 | all_ids = torch.cat([labels.view(-1), neg_samples]) 55 | all_w = embedding(all_ids) 56 | true_w = all_w[: -n_sample].view(b1, b2, -1) 57 | sample_w = all_w[- n_sample:].view(n_sample, -1) 58 | 59 | all_b = bias[all_ids] 60 | true_b = all_b[: -n_sample].view(b1, b2) 61 | sample_b = all_b[- n_sample:] 62 | 63 | hit = (labels[:, :, None] == neg_samples).detach() 64 | 65 | true_logits = torch.einsum('ijk,ijk->ij', 66 | [true_w, inputs]) + true_b - true_log_probs 67 | sample_logits = torch.einsum('lk,ijk->ijl', 68 | [sample_w, inputs]) + sample_b - samp_log_probs 69 | sample_logits.masked_fill_(hit, -1e30) 70 | logits = torch.cat([true_logits[:, :, None], sample_logits], -1) 71 | 72 | return logits 73 | -------------------------------------------------------------------------------- /palsoftmax.py: -------------------------------------------------------------------------------- 1 | import numpy as np # linear algebra 2 | import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) 3 | 4 | import gc; import os 5 | import torch 6 | from torch.nn import * 7 | import torch.nn as nn 8 | import torch.nn.functional as F 9 | import warnings 10 | warnings.filterwarnings('ignore') 11 | import pandas as pd 12 | import numpy as np 13 | import matplotlib.pyplot as plt 14 | import seaborn as sns 15 | import gc 16 | import os 17 | from tqdm.notebook import tqdm 18 | from fastai.tabular import * 19 | 20 | import torch.nn.functional as F 21 | import math 22 | 23 | # Very dirty codes, please forgive me 24 | 25 | from torch.nn.utils.rnn import pack_padded_sequence 26 | from torch.nn.utils.rnn import pad_packed_sequence 27 | def tile(a, dim, n_tile): 28 | init_dim = a.size(dim) 29 | repeat_idx = [1] * a.dim() 30 | repeat_idx[dim] = n_tile 31 | a = a.repeat(*(repeat_idx)) 32 | order_index = torch.LongTensor(np.concatenate([init_dim * np.arange(n_tile) + i for i in range(init_dim)])) 33 | return torch.index_select(a, dim, order_index) 34 | 35 | class ProjectedAdaptiveLogSoftmax(nn.Module): 36 | def __init__(self, n_token, d_embed, d_proj, cutoffs, div_val=1, 37 | tie_projs=None, out_layers_weights=None, out_projs=None, 38 | keep_order=False): 39 | super().__init__() 40 | 41 | self.n_token = n_token 42 | self.d_embed = d_embed 43 | self.d_proj = d_proj 44 | 45 | self.cutoffs = cutoffs + [n_token] 46 | self.cutoff_ends = [0] + self.cutoffs 47 | self.div_val = div_val 48 | 49 | self.shortlist_size = self.cutoffs[0] 50 | self.n_clusters = len(self.cutoffs) - 1 51 | self.head_size = self.shortlist_size + self.n_clusters 52 | 53 | self.tie_projs = tie_projs 54 | 55 | if self.n_clusters > 0: 56 | self.cluster_weight = nn.Parameter(torch.zeros(self.n_clusters, self.d_embed)) 57 | self.cluster_bias = nn.Parameter(torch.zeros(self.n_clusters)) 58 | 59 | if not out_layers_weights: 60 | self.out_layers_weights = nn.ParameterList() 61 | else: 62 | self.out_layers_weights = out_layers_weights 63 | 64 | self.out_layers_biases = nn.ParameterList() 65 | 66 | self.shared_out_projs = out_projs 67 | self.out_projs = nn.ParameterList() 68 | 69 | if div_val == 1: 70 | if d_proj != d_embed: 71 | for i in range(len(self.cutoffs)): 72 | if tie_projs[i]: 73 | self.out_projs.append(None) 74 | else: 75 | self.out_projs.append( 76 | nn.Parameter(torch.zeros(d_proj, d_embed)) 77 | ) 78 | else: 79 | # self.out_projs = [None] * len(self.cutoffs) 80 | self.out_projs.append(None) 81 | 82 | self.out_layers_biases.append( 83 | nn.Parameter(torch.zeros(n_token)) 84 | ) 85 | 86 | if not out_layers_weights: 87 | self.out_layers_weights.append( 88 | nn.Parameter(torch.zeros(n_token, d_embed)) 89 | ) 90 | else: 91 | for i in range(len(self.cutoffs)): 92 | l_idx, r_idx = self.cutoff_ends[i], self.cutoff_ends[i+1] 93 | d_emb_i = d_embed // (div_val ** i) 94 | 95 | if tie_projs[i]: 96 | self.out_projs.append(None) 97 | else: 98 | self.out_projs.append( 99 | nn.Parameter(torch.zeros(d_proj, d_emb_i)) 100 | ) 101 | 102 | self.out_layers_biases.append( 103 | nn.Parameter(torch.zeros(r_idx - l_idx)) 104 | ) 105 | if not out_layers_weights: 106 | self.out_layers_weights.append( 107 | nn.Parameter(torch.zeros(r_idx - l_idx, d_emb_i)) 108 | ) 109 | 110 | self.keep_order = keep_order 111 | 112 | def _compute_logit(self, hidden, weight, bias, proj): 113 | if proj is None: 114 | logit = F.linear(hidden, weight, bias=bias) 115 | else: 116 | logit = torch.einsum('bd,de,ev->bv', (hidden, proj, weight.t())) 117 | if bias is not None: 118 | logit = logit + bias 119 | return logit 120 | 121 | def get_out_proj(self, i): 122 | if self.tie_projs[i]: 123 | if len(self.shared_out_projs) == 0: 124 | return None 125 | elif len(self.shared_out_projs) == 1: 126 | return self.shared_out_projs[0] 127 | else: 128 | return self.shared_out_projs[i] 129 | else: 130 | return self.out_projs[i] 131 | 132 | def forward(self, hidden, target, keep_order=False): 133 | ''' 134 | hidden :: [len*bsz x d_proj] 135 | target :: [len*bsz] 136 | ''' 137 | 138 | if hidden.size(0) != target.size(0): 139 | raise RuntimeError('Input and target should have the same size ' 140 | 'in the batch dimension.') 141 | 142 | if self.n_clusters == 0: 143 | logit = self._compute_logit(hidden, self.out_layers_weights[0], 144 | self.out_layers_biases[0], self.get_out_proj(0)) 145 | nll = -F.log_softmax(logit, dim=-1) \ 146 | .gather(1, target.unsqueeze(1)).squeeze(1) 147 | else: 148 | # construct weights and biases 149 | weights, biases = [], [] 150 | for i in range(len(self.cutoffs)): 151 | if self.div_val == 1: 152 | l_idx, r_idx = self.cutoff_ends[i], self.cutoff_ends[i + 1] 153 | weight_i = self.out_layers_weights[0][l_idx:r_idx] 154 | bias_i = self.out_layers_biases[0][l_idx:r_idx] 155 | else: 156 | weight_i = self.out_layers_weights[i] 157 | bias_i = self.out_layers_biases[i] 158 | 159 | if i == 0: 160 | weight_i = torch.cat( 161 | [weight_i, self.cluster_weight], dim=0) 162 | bias_i = torch.cat( 163 | [bias_i, self.cluster_bias], dim=0) 164 | 165 | weights.append(weight_i) 166 | biases.append(bias_i) 167 | 168 | head_weight, head_bias, head_proj = weights[0], biases[0], self.get_out_proj(0) 169 | 170 | head_logit = self._compute_logit(hidden, head_weight, head_bias, head_proj) 171 | head_logprob = F.log_softmax(head_logit, dim=1) 172 | 173 | nll = torch.zeros_like(target, dtype=hidden.dtype, device=hidden.device) 174 | 175 | offset = 0 176 | cutoff_values = [0] + self.cutoffs 177 | for i in range(len(cutoff_values) - 1): 178 | l_idx, r_idx = cutoff_values[i], cutoff_values[i + 1] 179 | 180 | mask_i = (target >= l_idx) & (target < r_idx) 181 | indices_i = mask_i.nonzero().squeeze() 182 | 183 | if indices_i.numel() == 0: 184 | continue 185 | 186 | target_i = target.index_select(0, indices_i) - l_idx 187 | head_logprob_i = head_logprob.index_select(0, indices_i) 188 | 189 | if i == 0: 190 | logprob_i = head_logprob_i.gather(1, target_i[:, None]).squeeze(1) 191 | else: 192 | weight_i, bias_i, proj_i = weights[i], biases[i], self.get_out_proj(i) 193 | 194 | hidden_i = hidden.index_select(0, indices_i) 195 | 196 | tail_logit_i = self._compute_logit(hidden_i, weight_i, bias_i, proj_i) 197 | tail_logprob_i = F.log_softmax(tail_logit_i, dim=1) 198 | 199 | logprob_i = head_logprob_i[:, -i] \ 200 | + tail_logprob_i.gather(1, target_i[:, None]).squeeze(1) 201 | 202 | if self.keep_order or keep_order: 203 | nll.index_copy_(0, indices_i, -logprob_i) 204 | else: 205 | nll[offset:offset+logprob_i.size(0)].copy_(-logprob_i) 206 | 207 | offset += logprob_i.size(0) 208 | 209 | return nll 210 | 211 | -------------------------------------------------------------------------------- /trainer.py: -------------------------------------------------------------------------------- 1 | import numpy as np # linear algebra 2 | import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) 3 | 4 | import gc; import os 5 | import torch 6 | from torch.nn import * 7 | import torch.nn as nn 8 | import torch.nn.functional as F 9 | 10 | from transformer import * 11 | from args import args 12 | from features import * 13 | 14 | X = Transformer( 15 | n_token=args["n_token"], 16 | n_layer=args["n_layer"], 17 | n_head=args["n_head"], 18 | d_model=args["d_model"], 19 | d_head=args["d_head"], 20 | d_inner=args["d_inner"], 21 | dropout=args["dropout"], 22 | dropatt=args["dropatt"], 23 | dtype=torch.float32, 24 | attention_dropout_prob=args["attention_dropout_prob"], 25 | output_dropout_prob=args["output_dropout_prob"], 26 | init_method=torch.optim.SGD, 27 | bi_data=10 28 | ) 29 | 30 | import torch.optim as optim 31 | 32 | criterion = nn.MSELoss() 33 | optimizer = optim.SGD(X.parameters(), lr=0.001, momentum=0.9) 34 | 35 | from sklearn.model_selection import train_test_split as T 36 | train = pd.read_csv('training.csv.zip') 37 | train = train.drop(['id'], axis=1) 38 | train = train.drop(['item_id'], axis=1) 39 | train = train.drop(['dept_id'], axis=1) 40 | train = train.drop(['cat_id'], axis=1) 41 | train = train.drop(['store_id'], axis=1) 42 | train = train.drop(['state_id'], axis=1) 43 | X_train, _ = T(train, test_size=0.1) 44 | 45 | # A clarification: when using recursive features 46 | # using last day as labels is recommended 47 | 48 | #X_train = X_train.head(28) 49 | #X_train = torch.LongTensor(X_train.values) 50 | print(X_train.size(0)) 51 | for epoch in range(5): # loop over the dataset multiple times 52 | running_loss = 0.0 53 | gc.collect() 54 | for i, data in enumerate(train.head(1500), 0): 55 | X.train() 56 | # get the inputs; data is a list of [inputs, labels] 57 | inputs, labels = X_train, y_train 58 | # zero the parameter gradients 59 | optimizer.zero_grad() 60 | 61 | # forward + backward + optimize 62 | outputs = X(inputs, torch.LongTensor(train['d_1913'].head(28).values.astype("float64")), crit=None, mems=None) 63 | gc.collect() 64 | outputs = torch.FloatTensor(outputs) 65 | outputs.requires_grad = True 66 | loss = criterion(outputs.view(-1).reshape(14336, 1939), torch.FloatTensor(train.head(14336).values.astype("float64"))) 67 | gc.collect() 68 | loss.backward() 69 | optimizer.step() 70 | gc.collect() 71 | 72 | # print statistics 73 | running_loss += loss.item() 74 | HIST = [] 75 | if i % 28 == 0: 76 | !nvidia-smi 77 | print('[%d, %5d] loss: %.3f' % 78 | (epoch + 1, i + 1, running_loss / 2000)) 79 | # average across batches 80 | HIST.append(outputs) 81 | gc.collect() 82 | running_loss = 0.0 83 | -------------------------------------------------------------------------------- /transformer.py: -------------------------------------------------------------------------------- 1 | import numpy as np # linear algebra 2 | import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) 3 | 4 | import gc; import os 5 | import torch 6 | from torch.nn import * 7 | import torch.nn as nn 8 | import torch.nn.functional as F 9 | import warnings 10 | warnings.filterwarnings('ignore') 11 | import pandas as pd 12 | import numpy as np 13 | import matplotlib.pyplot as plt 14 | import seaborn as sns 15 | import gc 16 | import os 17 | from tqdm.notebook import tqdm 18 | from fastai.tabular import * 19 | 20 | from enc_and_utils import * 21 | from palsoftmax import * 22 | from attention import * 23 | from logsampler import * 24 | from decoders import * 25 | 26 | class Transformer(torch.nn.Module): 27 | def __init__(self, n_token, n_layer, n_head, d_model, d_head, d_inner, 28 | dropout, dropatt, dtype, attention_dropout_prob, output_dropout_prob, 29 | init_method, bi_data, tie_weight=True, d_embed=None, 30 | div_val=1, tie_projs=[False], pre_lnorm=False, 31 | tgt_len=384, ext_len=10, mem_len=384, 32 | cutoffs=[], adapt_inp=False, 33 | same_length=False, attn_type=2, clamp_len=-1, 34 | sample_softmax=-1): 35 | super(Transformer, self).__init__() 36 | self.n_token = n_token 37 | 38 | d_embed = d_model if d_embed is None else d_embed 39 | self.d_embed = d_embed 40 | self.d_model = d_model 41 | self.n_head = n_head 42 | self.d_head = d_head 43 | self.drop = nn.Dropout(dropout) 44 | 45 | self.tie_weight = tie_weight 46 | self.tie_projs = tie_projs 47 | self.div_val = div_val 48 | 49 | self.n_layer = n_layer 50 | 51 | self.tgt_len = tgt_len 52 | self.mem_len = mem_len 53 | self.ext_len = ext_len 54 | self.max_klen = tgt_len + ext_len + mem_len 55 | 56 | self.attn_type = attn_type 57 | 58 | self.word_emb = PositionalEmbedding(d_model) 59 | 60 | self.layers = nn.ModuleList() 61 | self.layers.append( 62 | TransformerXLHybridEncoder( 63 | n_token, 64 | n_layer, 65 | d_model, 66 | n_head, 67 | d_head, 68 | d_inner, 69 | dropout, 70 | dropatt, 71 | bi_data, 72 | attn_type, 73 | is_training=True, 74 | initializer=torch.optim.SGD, 75 | ) 76 | ) 77 | self.layers.append( 78 | TransformerXLHybridEncoder( 79 | n_token, 80 | n_layer, 81 | d_model, 82 | n_head, 83 | d_head, 84 | d_inner, 85 | dropout, 86 | dropatt, 87 | bi_data, 88 | attn_type, 89 | is_training=True, 90 | initializer=torch.optim.SGD, 91 | ) 92 | ) 93 | # the default attention 94 | if attn_type == 0: 95 | for i in range(n_layer): 96 | self.layers.append( 97 | RelPartialLearnableDecoderLayer( 98 | n_head, d_model, d_head, d_inner, dropout, 99 | tgt_len=tgt_len, ext_len=ext_len, mem_len=mem_len, 100 | dropatt=dropatt, pre_lnorm=pre_lnorm) 101 | ) 102 | 103 | # learnable embeddings 104 | elif attn_type == 1: 105 | for i in range(n_layer): 106 | self.layers.append( 107 | RelLearnableDecoderLayer( 108 | n_head, d_model, d_head, d_inner, dropout, 109 | tgt_len=tgt_len, ext_len=ext_len, mem_len=mem_len, 110 | dropatt=dropatt, pre_lnorm=pre_lnorm) 111 | ) 112 | # absolute embeddings 113 | elif attn_type in [2, 3]: 114 | for i in range(n_layer): 115 | self.layers.append( 116 | GPT2OptimizedDecoderLayer( 117 | n_head, d_model, d_head, d_inner, dropout, 118 | dropatt=dropatt, pre_lnorm=pre_lnorm, hidden_size=16) 119 | ) 120 | self.layers.append ( 121 | GPT2OptimizedDecoderLayer( 122 | n_head, d_model, d_head, d_inner, dropout, 123 | dropatt=dropatt, pre_lnorm=pre_lnorm, hidden_size=16) 124 | ) 125 | 126 | self.sample_softmax = sample_softmax 127 | self.out_layer = nn.Linear(d_model, n_token) 128 | self.sampler = LogUniformSampler(n_token, 1) 129 | # use sampled softmax 130 | if sample_softmax > 0: 131 | self.out_layer = nn.Linear(d_model, n_token) 132 | self.tie_weight = tie_weight 133 | self.sampler = LogUniformSampler(n_token, sample_softmax) 134 | 135 | 136 | 137 | # use adaptive softmax (including standard softmax) 138 | 139 | emb_layers = [i.weight for i in AdaptiveEmbedding(d_model, d_head, d_inner, n_head).emb_layers] 140 | emb_projs = AdaptiveEmbedding(d_model, d_head, d_inner, n_head).emb_projs 141 | 142 | self.crit = ProjectedAdaptiveLogSoftmax(n_token, d_embed, d_model, 143 | cutoffs, div_val=div_val, 144 | tie_projs=tie_projs, 145 | out_projs=emb_projs, 146 | out_layers_weights=emb_layers) 147 | 148 | 149 | emb_projs = AdaptiveEmbedding(d_model, d_head, d_inner, n_head).emb_projs 150 | 151 | self.same_length = same_length 152 | self.clamp_len = clamp_len 153 | 154 | self._create_params() 155 | 156 | def backward_compatible(self): 157 | self.sample_softmax = -1 158 | cutoffs=[] 159 | 160 | def _create_params(self): 161 | # default attention 162 | cutoffs=[] 163 | if self.attn_type == 0: 164 | self.pos_emb = AdaptiveEmbedding(self.n_token, self.d_embed, self.d_model, cutoffs, 165 | div_val=self.div_val) 166 | self.r_w_bias = nn.Parameter(torch.Tensor(self.n_head, self.d_head)) 167 | self.r_r_bias = nn.Parameter(torch.Tensor(self.n_head, self.d_head)) 168 | # learnable 169 | elif self.attn_type == 1: 170 | self.r_emb = nn.Parameter(torch.Tensor( 171 | self.n_layer, self.max_klen, self.n_head, self.d_head)) 172 | self.r_w_bias = nn.Parameter(torch.Tensor( 173 | self.n_layer, self.n_head, self.d_head)) 174 | self.r_bias = nn.Parameter(torch.Tensor( 175 | self.n_layer, self.max_klen, self.n_head)) 176 | # absolute standard 177 | elif self.attn_type == 2: 178 | self.pos_emb = PositionalEmbedding(self.d_model) 179 | # absolute deeper SA 180 | elif self.attn_type == 3: 181 | self.r_emb = nn.Parameter(torch.Tensor( 182 | self.n_layer, self.max_klen, self.d_model)) 183 | 184 | def reset_length(self, tgt_len, ext_len, mem_len): 185 | self.tgt_len = tgt_len 186 | self.mem_len = mem_len 187 | self.ext_len = ext_len 188 | 189 | def init_mems(self): 190 | if self.mem_len > 0: 191 | mems = [] 192 | param = next(self.parameters()) 193 | for i in range(self.n_layer+1): 194 | empty = torch.empty(0, dtype=param.dtype, device=param.device) 195 | mems.append(empty) 196 | 197 | return mems 198 | else: 199 | return None 200 | 201 | def _update_mems(self, hids, mems, qlen, mlen): 202 | # does not deal with None 203 | if mems is None: 204 | return None 205 | 206 | # mems is not None 207 | assert len(hids) == len(mems), 'len(hids) != len(mems)' 208 | 209 | # There are `mlen + qlen` steps that can be cached into mems 210 | # For the next step, the last `ext_len` of the `qlen` tokens 211 | # will be used as the extended context. Hence, we only cache 212 | # the tokens from `mlen + qlen - self.ext_len - self.mem_len` 213 | # to `mlen + qlen - self.ext_len`. 214 | with torch.no_grad(): 215 | new_mems = [] 216 | end_idx = mlen + max(0, qlen - 0 - self.ext_len) 217 | beg_idx = max(0, end_idx - self.mem_len) 218 | for i in range(len(hids)): 219 | 220 | cat = torch.cat([mems[i], hids[i]], dim=0) 221 | new_mems.append(cat[beg_idx:end_idx].detach()) 222 | 223 | return new_mems 224 | 225 | def _forward(self, dec_inp, mems=None): 226 | qlen, bsz = dec_inp.size() 227 | true_size = 7 228 | 229 | word_emb = PositionalEmbedding(dec_inp) 230 | 231 | mlen = mems[0].size(0) if mems is not None else 0 232 | klen = mlen + qlen 233 | 234 | # absolute 235 | if self.attn_type == 2: 236 | pos_seq = torch.LongTensor(torch.arange(klen - 1, -1, -1.0, dtype=torch.long)) 237 | if self.clamp_len > 0: 238 | pos_seq.clamp_(max=self.clamp_len) 239 | pos_emb = self.pos_emb(pos_seq, 64) 240 | 241 | core_out = self.drop(pos_emb[-qlen:]) 242 | hids = [] 243 | hids.append(core_out) 244 | for i, layer in enumerate(self.layers): 245 | mems_i = None if mems is None else mems[i] 246 | if mems_i is not None and len(mems_i) and i == 0: 247 | mems_i += pos_emb[:mlen] 248 | core_out = core_out 249 | hids.append(core_out) 250 | elif self.attn_type == 3: 251 | core_out = self.drop(word_emb) 252 | 253 | hids.append(core_out) 254 | for i, layer in enumerate(self.layers): 255 | mems_i = None if mems is None else mems[i] 256 | if mems_i is not None and len(mems_i) and mlen > 0: 257 | cur_emb = self.r_emb[i][:-qlen] 258 | cur_size = cur_emb.size(0) 259 | if cur_size < mlen: 260 | cur_emb_pad = cur_emb[0:1].expand(mlen-cur_size, -1, -1) 261 | cur_emb = torch.cat([cur_emb_pad, cur_emb], 0) 262 | else: 263 | cur_emb = cur_emb[-mlen:] 264 | mems_i += cur_emb.view(mlen, 1, -1) 265 | core_out += self.r_emb[i][-qlen:].view(qlen, 1, -1) 266 | 267 | core_out = layer(core_out, dec_attn_mask=dec_attn_mask, 268 | mems=mems_i) 269 | hids.append(core_out) 270 | 271 | core_out = self.drop(core_out) 272 | 273 | new_mems = self._update_mems(hids, mems, qlen, mlen) 274 | 275 | return core_out, new_mems 276 | 277 | def forward(self, data, target, crit, mems): 278 | # nn.DataParallel does not allow size(0) tensors to be broadcasted. 279 | # So, have to initialize size(0) mems inside the model forward. 280 | # Moreover, have to return new_mems to allow nn.DataParallel to piece 281 | # them together. 282 | 283 | self.criter = crit 284 | if mems is None: 285 | mems = self.init_mems() 286 | 287 | tgt_len = target.size(0) 288 | hidden, new_mems = self._forward(data, mems=None) 289 | 290 | pred_hid = hidden[-tgt_len:] 291 | 292 | assert self.tie_weight 293 | criter = torch.nn.MSELoss() 294 | 295 | loss = criter(pred_hid.view(-1).reshape(512, 54292), target.view(-1)) 296 | loss = loss.view(1, -1) 297 | return torch.Tensor(pred_hid) 298 | --------------------------------------------------------------------------------