safetensors 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +3 -0
- data/Cargo.lock +414 -0
- data/Cargo.toml +6 -0
- data/LICENSE.txt +201 -0
- data/README.md +67 -0
- data/ext/safetensors/Cargo.toml +17 -0
- data/ext/safetensors/extconf.rb +4 -0
- data/ext/safetensors/src/lib.rs +464 -0
- data/lib/safetensors/numo.rb +93 -0
- data/lib/safetensors/torch.rb +141 -0
- data/lib/safetensors/version.rb +3 -0
- data/lib/safetensors.rb +37 -0
- metadata +69 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 93170fb42d80a72a583e68284799a36ee9b1f2e44b3ef404e432fb608321d757
|
4
|
+
data.tar.gz: 300a5d3e6487ec2298f0c054ccd24671c84f443815330721832cee25a95ae472
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 4477e5433fb15f3e2a45c484bfb4fd32ca312b33b9792631997d143d870cd29cd809c66dc09ad1ab35c708c270fa8c0f2d44fa90d49e8967adeb132ef1602de9
|
7
|
+
data.tar.gz: 68cd9a2e48aa24269aed08ccf2a071f66b771c8468a17075ad39ef8a925397d2dbfd1480d48987d66760db1c0301866eb1c6aab572ee9b5108b0fdf07ba1605c
|
data/CHANGELOG.md
ADDED
data/Cargo.lock
ADDED
@@ -0,0 +1,414 @@
|
|
1
|
+
# This file is automatically @generated by Cargo.
|
2
|
+
# It is not intended for manual editing.
|
3
|
+
version = 3
|
4
|
+
|
5
|
+
[[package]]
|
6
|
+
name = "aho-corasick"
|
7
|
+
version = "1.1.2"
|
8
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
9
|
+
checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0"
|
10
|
+
dependencies = [
|
11
|
+
"memchr",
|
12
|
+
]
|
13
|
+
|
14
|
+
[[package]]
|
15
|
+
name = "bindgen"
|
16
|
+
version = "0.69.4"
|
17
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
18
|
+
checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0"
|
19
|
+
dependencies = [
|
20
|
+
"bitflags",
|
21
|
+
"cexpr",
|
22
|
+
"clang-sys",
|
23
|
+
"itertools",
|
24
|
+
"lazy_static",
|
25
|
+
"lazycell",
|
26
|
+
"proc-macro2",
|
27
|
+
"quote",
|
28
|
+
"regex",
|
29
|
+
"rustc-hash",
|
30
|
+
"shlex",
|
31
|
+
"syn",
|
32
|
+
]
|
33
|
+
|
34
|
+
[[package]]
|
35
|
+
name = "bitflags"
|
36
|
+
version = "2.4.2"
|
37
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
38
|
+
checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf"
|
39
|
+
|
40
|
+
[[package]]
|
41
|
+
name = "cexpr"
|
42
|
+
version = "0.6.0"
|
43
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
44
|
+
checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766"
|
45
|
+
dependencies = [
|
46
|
+
"nom",
|
47
|
+
]
|
48
|
+
|
49
|
+
[[package]]
|
50
|
+
name = "cfg-if"
|
51
|
+
version = "1.0.0"
|
52
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
53
|
+
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
54
|
+
|
55
|
+
[[package]]
|
56
|
+
name = "clang-sys"
|
57
|
+
version = "1.7.0"
|
58
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
59
|
+
checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1"
|
60
|
+
dependencies = [
|
61
|
+
"glob",
|
62
|
+
"libc",
|
63
|
+
"libloading",
|
64
|
+
]
|
65
|
+
|
66
|
+
[[package]]
|
67
|
+
name = "either"
|
68
|
+
version = "1.10.0"
|
69
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
70
|
+
checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a"
|
71
|
+
|
72
|
+
[[package]]
|
73
|
+
name = "glob"
|
74
|
+
version = "0.3.1"
|
75
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
76
|
+
checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
|
77
|
+
|
78
|
+
[[package]]
|
79
|
+
name = "itertools"
|
80
|
+
version = "0.12.1"
|
81
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
82
|
+
checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569"
|
83
|
+
dependencies = [
|
84
|
+
"either",
|
85
|
+
]
|
86
|
+
|
87
|
+
[[package]]
|
88
|
+
name = "itoa"
|
89
|
+
version = "1.0.10"
|
90
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
91
|
+
checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c"
|
92
|
+
|
93
|
+
[[package]]
|
94
|
+
name = "lazy_static"
|
95
|
+
version = "1.4.0"
|
96
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
97
|
+
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
98
|
+
|
99
|
+
[[package]]
|
100
|
+
name = "lazycell"
|
101
|
+
version = "1.3.0"
|
102
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
103
|
+
checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
|
104
|
+
|
105
|
+
[[package]]
|
106
|
+
name = "libc"
|
107
|
+
version = "0.2.153"
|
108
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
109
|
+
checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd"
|
110
|
+
|
111
|
+
[[package]]
|
112
|
+
name = "libloading"
|
113
|
+
version = "0.8.1"
|
114
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
115
|
+
checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161"
|
116
|
+
dependencies = [
|
117
|
+
"cfg-if",
|
118
|
+
"windows-sys",
|
119
|
+
]
|
120
|
+
|
121
|
+
[[package]]
|
122
|
+
name = "magnus"
|
123
|
+
version = "0.6.2"
|
124
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
125
|
+
checksum = "4778544796676e8428e9c622460ebf284bea52d8b10db3aeb449d8b5e61b3a13"
|
126
|
+
dependencies = [
|
127
|
+
"magnus-macros",
|
128
|
+
"rb-sys",
|
129
|
+
"rb-sys-env",
|
130
|
+
"seq-macro",
|
131
|
+
]
|
132
|
+
|
133
|
+
[[package]]
|
134
|
+
name = "magnus-macros"
|
135
|
+
version = "0.6.0"
|
136
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
137
|
+
checksum = "5968c820e2960565f647819f5928a42d6e874551cab9d88d75e3e0660d7f71e3"
|
138
|
+
dependencies = [
|
139
|
+
"proc-macro2",
|
140
|
+
"quote",
|
141
|
+
"syn",
|
142
|
+
]
|
143
|
+
|
144
|
+
[[package]]
|
145
|
+
name = "memchr"
|
146
|
+
version = "2.7.1"
|
147
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
148
|
+
checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149"
|
149
|
+
|
150
|
+
[[package]]
|
151
|
+
name = "memmap2"
|
152
|
+
version = "0.5.10"
|
153
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
154
|
+
checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327"
|
155
|
+
dependencies = [
|
156
|
+
"libc",
|
157
|
+
]
|
158
|
+
|
159
|
+
[[package]]
|
160
|
+
name = "minimal-lexical"
|
161
|
+
version = "0.2.1"
|
162
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
163
|
+
checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
|
164
|
+
|
165
|
+
[[package]]
|
166
|
+
name = "nom"
|
167
|
+
version = "7.1.3"
|
168
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
169
|
+
checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
|
170
|
+
dependencies = [
|
171
|
+
"memchr",
|
172
|
+
"minimal-lexical",
|
173
|
+
]
|
174
|
+
|
175
|
+
[[package]]
|
176
|
+
name = "proc-macro2"
|
177
|
+
version = "1.0.78"
|
178
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
179
|
+
checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae"
|
180
|
+
dependencies = [
|
181
|
+
"unicode-ident",
|
182
|
+
]
|
183
|
+
|
184
|
+
[[package]]
|
185
|
+
name = "quote"
|
186
|
+
version = "1.0.35"
|
187
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
188
|
+
checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef"
|
189
|
+
dependencies = [
|
190
|
+
"proc-macro2",
|
191
|
+
]
|
192
|
+
|
193
|
+
[[package]]
|
194
|
+
name = "rb-sys"
|
195
|
+
version = "0.9.89"
|
196
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
197
|
+
checksum = "0d197f2c03751ef006f29d593d22aa9068c9c358e04ca503afea0329c366147c"
|
198
|
+
dependencies = [
|
199
|
+
"rb-sys-build",
|
200
|
+
]
|
201
|
+
|
202
|
+
[[package]]
|
203
|
+
name = "rb-sys-build"
|
204
|
+
version = "0.9.89"
|
205
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
206
|
+
checksum = "2b50caf8fd028f12abe00d6debe2ae2adf6202c9ca3caa59487eda710d90fa28"
|
207
|
+
dependencies = [
|
208
|
+
"bindgen",
|
209
|
+
"lazy_static",
|
210
|
+
"proc-macro2",
|
211
|
+
"quote",
|
212
|
+
"regex",
|
213
|
+
"shell-words",
|
214
|
+
"syn",
|
215
|
+
]
|
216
|
+
|
217
|
+
[[package]]
|
218
|
+
name = "rb-sys-env"
|
219
|
+
version = "0.1.2"
|
220
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
221
|
+
checksum = "a35802679f07360454b418a5d1735c89716bde01d35b1560fc953c1415a0b3bb"
|
222
|
+
|
223
|
+
[[package]]
|
224
|
+
name = "regex"
|
225
|
+
version = "1.10.3"
|
226
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
227
|
+
checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15"
|
228
|
+
dependencies = [
|
229
|
+
"aho-corasick",
|
230
|
+
"memchr",
|
231
|
+
"regex-automata",
|
232
|
+
"regex-syntax",
|
233
|
+
]
|
234
|
+
|
235
|
+
[[package]]
|
236
|
+
name = "regex-automata"
|
237
|
+
version = "0.4.5"
|
238
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
239
|
+
checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd"
|
240
|
+
dependencies = [
|
241
|
+
"aho-corasick",
|
242
|
+
"memchr",
|
243
|
+
"regex-syntax",
|
244
|
+
]
|
245
|
+
|
246
|
+
[[package]]
|
247
|
+
name = "regex-syntax"
|
248
|
+
version = "0.8.2"
|
249
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
250
|
+
checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"
|
251
|
+
|
252
|
+
[[package]]
|
253
|
+
name = "rustc-hash"
|
254
|
+
version = "1.1.0"
|
255
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
256
|
+
checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
|
257
|
+
|
258
|
+
[[package]]
|
259
|
+
name = "ryu"
|
260
|
+
version = "1.0.17"
|
261
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
262
|
+
checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1"
|
263
|
+
|
264
|
+
[[package]]
|
265
|
+
name = "safetensors"
|
266
|
+
version = "0.1.0"
|
267
|
+
dependencies = [
|
268
|
+
"magnus",
|
269
|
+
"memmap2",
|
270
|
+
"safetensors 0.4.2",
|
271
|
+
"serde_json",
|
272
|
+
]
|
273
|
+
|
274
|
+
[[package]]
|
275
|
+
name = "safetensors"
|
276
|
+
version = "0.4.2"
|
277
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
278
|
+
checksum = "8d980e6bfb34436fb0a81e42bc41af43f11805bbbca443e7f68e9faaabe669ed"
|
279
|
+
dependencies = [
|
280
|
+
"serde",
|
281
|
+
"serde_json",
|
282
|
+
]
|
283
|
+
|
284
|
+
[[package]]
|
285
|
+
name = "seq-macro"
|
286
|
+
version = "0.3.5"
|
287
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
288
|
+
checksum = "a3f0bf26fd526d2a95683cd0f87bf103b8539e2ca1ef48ce002d67aad59aa0b4"
|
289
|
+
|
290
|
+
[[package]]
|
291
|
+
name = "serde"
|
292
|
+
version = "1.0.197"
|
293
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
294
|
+
checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2"
|
295
|
+
dependencies = [
|
296
|
+
"serde_derive",
|
297
|
+
]
|
298
|
+
|
299
|
+
[[package]]
|
300
|
+
name = "serde_derive"
|
301
|
+
version = "1.0.197"
|
302
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
303
|
+
checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b"
|
304
|
+
dependencies = [
|
305
|
+
"proc-macro2",
|
306
|
+
"quote",
|
307
|
+
"syn",
|
308
|
+
]
|
309
|
+
|
310
|
+
[[package]]
|
311
|
+
name = "serde_json"
|
312
|
+
version = "1.0.114"
|
313
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
314
|
+
checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0"
|
315
|
+
dependencies = [
|
316
|
+
"itoa",
|
317
|
+
"ryu",
|
318
|
+
"serde",
|
319
|
+
]
|
320
|
+
|
321
|
+
[[package]]
|
322
|
+
name = "shell-words"
|
323
|
+
version = "1.1.0"
|
324
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
325
|
+
checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde"
|
326
|
+
|
327
|
+
[[package]]
|
328
|
+
name = "shlex"
|
329
|
+
version = "1.3.0"
|
330
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
331
|
+
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
|
332
|
+
|
333
|
+
[[package]]
|
334
|
+
name = "syn"
|
335
|
+
version = "2.0.50"
|
336
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
337
|
+
checksum = "74f1bdc9872430ce9b75da68329d1c1746faf50ffac5f19e02b71e37ff881ffb"
|
338
|
+
dependencies = [
|
339
|
+
"proc-macro2",
|
340
|
+
"quote",
|
341
|
+
"unicode-ident",
|
342
|
+
]
|
343
|
+
|
344
|
+
[[package]]
|
345
|
+
name = "unicode-ident"
|
346
|
+
version = "1.0.12"
|
347
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
348
|
+
checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
|
349
|
+
|
350
|
+
[[package]]
|
351
|
+
name = "windows-sys"
|
352
|
+
version = "0.48.0"
|
353
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
354
|
+
checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
|
355
|
+
dependencies = [
|
356
|
+
"windows-targets",
|
357
|
+
]
|
358
|
+
|
359
|
+
[[package]]
|
360
|
+
name = "windows-targets"
|
361
|
+
version = "0.48.5"
|
362
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
363
|
+
checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
|
364
|
+
dependencies = [
|
365
|
+
"windows_aarch64_gnullvm",
|
366
|
+
"windows_aarch64_msvc",
|
367
|
+
"windows_i686_gnu",
|
368
|
+
"windows_i686_msvc",
|
369
|
+
"windows_x86_64_gnu",
|
370
|
+
"windows_x86_64_gnullvm",
|
371
|
+
"windows_x86_64_msvc",
|
372
|
+
]
|
373
|
+
|
374
|
+
[[package]]
|
375
|
+
name = "windows_aarch64_gnullvm"
|
376
|
+
version = "0.48.5"
|
377
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
378
|
+
checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
|
379
|
+
|
380
|
+
[[package]]
|
381
|
+
name = "windows_aarch64_msvc"
|
382
|
+
version = "0.48.5"
|
383
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
384
|
+
checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
|
385
|
+
|
386
|
+
[[package]]
|
387
|
+
name = "windows_i686_gnu"
|
388
|
+
version = "0.48.5"
|
389
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
390
|
+
checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
|
391
|
+
|
392
|
+
[[package]]
|
393
|
+
name = "windows_i686_msvc"
|
394
|
+
version = "0.48.5"
|
395
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
396
|
+
checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
|
397
|
+
|
398
|
+
[[package]]
|
399
|
+
name = "windows_x86_64_gnu"
|
400
|
+
version = "0.48.5"
|
401
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
402
|
+
checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
|
403
|
+
|
404
|
+
[[package]]
|
405
|
+
name = "windows_x86_64_gnullvm"
|
406
|
+
version = "0.48.5"
|
407
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
408
|
+
checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
|
409
|
+
|
410
|
+
[[package]]
|
411
|
+
name = "windows_x86_64_msvc"
|
412
|
+
version = "0.48.5"
|
413
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
414
|
+
checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
|
data/Cargo.toml
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,201 @@
|
|
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.
|