uid
stringlengths
24
24
split
stringclasses
1 value
category
stringclasses
2 values
content
stringlengths
5
482k
signature
stringlengths
1
14k
suffix
stringlengths
1
482k
prefix
stringlengths
9
14k
prefix_token_count
int64
3
5.01k
prefix_token_budget
int64
64
256
element_token_count
int64
1
292k
signature_token_count
int64
1
5.01k
prefix_context_token_count
int64
0
255
repo
stringlengths
7
112
path
stringlengths
4
208
language
stringclasses
1 value
name
stringlengths
1
218
qualname
stringlengths
1
218
start_line
int64
1
26.7k
end_line
int64
1
26.7k
signature_start_line
int64
1
26.7k
signature_end_line
int64
1
26.7k
source_hash
stringlengths
40
40
source_dataset
stringclasses
1 value
source_split
stringclasses
1 value
60ececfb5a3d32f2d50f0745
train
class
class DataCatalogInputDefinition(BaseModel): """ Represents how metadata stored in the Glue Data Catalog is defined in a DataBrew dataset. """ CatalogId: Optional[CatalogId] = None DatabaseName: DatabaseName TableName: TableName TempDirectory: Optional[S3Location] = None
class DataCatalogInputDefinition(BaseModel):
""" Represents how metadata stored in the Glue Data Catalog is defined in a DataBrew dataset. """ CatalogId: Optional[CatalogId] = None DatabaseName: DatabaseName TableName: TableName TempDirectory: Optional[S3Location] = None
class S3Location(BaseModel): """ Represents an Amazon S3 location (bucket name and object key) where DataBrew can read input data, or write output from a job. """ Bucket: Bucket Key: Optional[Key] = None class DataCatalogInputDefinition(BaseModel):
64
64
69
8
55
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
DataCatalogInputDefinition
DataCatalogInputDefinition
795
803
795
795
d0fd2c080ae3b5ffac4cdaa3d32e6ef6ac32c9f8
bigcode/the-stack
train
131252de90547126f16004a2
train
class
class ProjectList(BaseModel): __root__: List[Project]
class ProjectList(BaseModel):
__root__: List[Project]
NameList(BaseModel): __root__: Annotated[List[SheetName], Field(max_items=1, min_items=1)] class SheetIndexList(BaseModel): __root__: Annotated[List[SheetIndex], Field(max_items=1, min_items=1)] class ProjectList(BaseModel):
63
64
14
6
57
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
ProjectList
ProjectList
1,055
1,056
1,055
1,055
7f2aa23b1dc8bdbc087c5a739d0bc228bd95232b
bigcode/the-stack
train
48f12b910f5da839738d69ec
train
class
class ConditionExpressionList(BaseModel): __root__: List[ConditionExpression]
class ConditionExpressionList(BaseModel):
__root__: List[ConditionExpression]
a DataBrew dataset. For more information, see <a href="https://docs.aws.amazon.com/databrew/latest/dg/recipe-actions-reference.html">Recipe actions reference</a>. """ Operation: Operation Parameters: Optional[ParameterMap] = None class ConditionExpressionList(BaseModel):
64
64
16
7
56
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
ConditionExpressionList
ConditionExpressionList
941
942
941
941
3734706b27986068b93888187cc580235b5d57a7
bigcode/the-stack
train
a6003ff71f6f1ff9c59880e8
train
class
class StartedBy(CreatedBy): pass
class StartedBy(CreatedBy):
pass
RUNNING = 'RUNNING' STOPPING = 'STOPPING' STOPPED = 'STOPPED' SUCCEEDED = 'SUCCEEDED' FAILED = 'FAILED' TIMEOUT = 'TIMEOUT' class LogGroupName(CronExpression): pass class StartedBy(CreatedBy):
64
64
10
7
56
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
StartedBy
StartedBy
487
488
487
487
29febcef1587dffc2e6734650a62585347ff4b2b
bigcode/the-stack
train
6cea70e4c377701f8b74bbaf
train
class
class TagResourceResponse(BaseModel): pass
class TagResourceResponse(BaseModel):
pass
: RecipeName class StartColumnIndex(BaseModel): __root__: Annotated[int, Field(ge=0.0)] class ColumnRange(BaseModel): __root__: Annotated[int, Field(ge=0.0, le=20.0)] class TagResourceResponse(BaseModel):
63
64
10
7
56
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
TagResourceResponse
TagResourceResponse
113
114
113
113
a41f7fca6ada73d0bbbed8bb51da4a7014a2dfa3
bigcode/the-stack
train
817969370cc45f4cef818649
train
class
class CreateColumn(AssumeControl): pass
class CreateColumn(AssumeControl):
pass
<code>ConditionExpression</code> elements. Each condition is applied to the rows in a dataset first, before the recipe action is performed.</p> """ Condition: Condition Value: Optional[ConditionValue] = None TargetColumn: TargetColumn class CreateColumn(AssumeControl):
64
64
11
8
55
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
CreateColumn
CreateColumn
226
227
226
226
d4f4705fcb9d1e270b29b9998c1d054b78ef76fc
bigcode/the-stack
train
46a6ff9c24fa9a440853507e
train
class
class PublishedBy(CreatedBy): pass
class PublishedBy(CreatedBy):
pass
ROTATING = 'ROTATING' TERMINATED = 'TERMINATED' TERMINATING = 'TERMINATING' UPDATING = 'UPDATING' class OpenedBy(CreatedBy): pass class DescribeRecipeRequest(BaseModel): pass class PublishedBy(CreatedBy):
64
64
10
7
56
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
PublishedBy
PublishedBy
516
517
516
516
b25ff385723ae7f16d68bb6228a2135a3b61b30b
bigcode/the-stack
train
d0152adf2f621a8d566c16ca
train
class
class StatisticList(BaseModel): __root__: Annotated[List[Statistic], Field(min_items=1)]
class StatisticList(BaseModel):
__root__: Annotated[List[Statistic], Field(min_items=1)]
root__: Annotated[str, Field(max_length=31, min_length=1)] class StartJobRunRequest(BaseModel): pass class StartProjectSessionRequest(BaseModel): AssumeControl: Optional[AssumeControl] = None class Statistic(Condition): pass class StatisticList(BaseModel):
64
64
22
6
57
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
StatisticList
StatisticList
716
717
716
716
408c1d9ea210071df62e2fb82eaffa1ac81dfc1e
bigcode/the-stack
train
ed28c61e1280dbf6960d66e6
train
class
class DatabaseOutput(BaseModel): """ Represents a JDBC database output object which defines the output destination for a DataBrew recipe job to write into. """ GlueConnectionName: GlueConnectionName DatabaseOptions: DatabaseTableOutputOptions DatabaseOutputMode: Optional[DatabaseOutputMode] = N...
class DatabaseOutput(BaseModel):
""" Represents a JDBC database output object which defines the output destination for a DataBrew recipe job to write into. """ GlueConnectionName: GlueConnectionName DatabaseOptions: DatabaseTableOutputOptions DatabaseOutputMode: Optional[DatabaseOutputMode] = None
= None DatabaseName: DatabaseName TableName: TableName S3Options: Optional[S3TableOutputOptions] = None DatabaseOptions: Optional[DatabaseTableOutputOptions] = None Overwrite: Optional[OverwriteOutput] = None class DatabaseOutput(BaseModel):
64
64
65
6
57
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
DatabaseOutput
DatabaseOutput
1,119
1,126
1,119
1,119
78662c639960503a5a1c5cf89380ca897e636724
bigcode/the-stack
train
109030737112fee8eb27d507
train
class
class DataCatalogOutput(BaseModel): """ Represents options that specify how and where in the Glue Data Catalog DataBrew writes the output generated by recipe jobs. """ CatalogId: Optional[CatalogId] = None DatabaseName: DatabaseName TableName: TableName S3Options: Optional[S3TableOutputOpti...
class DataCatalogOutput(BaseModel):
""" Represents options that specify how and where in the Glue Data Catalog DataBrew writes the output generated by recipe jobs. """ CatalogId: Optional[CatalogId] = None DatabaseName: DatabaseName TableName: TableName S3Options: Optional[S3TableOutputOptions] = None DatabaseOptions: Opt...
[List[ColumnStatisticsConfiguration], Field(min_items=1)] class RecipeStep(BaseModel): """ Represents a single step from a DataBrew recipe to be performed. """ Action: RecipeAction ConditionExpressions: Optional[ConditionExpressionList] = None class DataCatalogOutput(BaseModel):
64
64
102
7
56
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
DataCatalogOutput
DataCatalogOutput
1,106
1,116
1,106
1,106
bf8d8671a72745cb63d0c843fbc3910bb43421a1
bigcode/the-stack
train
cd169ca0a6b321d0ee704555
train
class
class LogGroupName(CronExpression): pass
class LogGroupName(CronExpression):
pass
(Enum): STARTING = 'STARTING' RUNNING = 'RUNNING' STOPPING = 'STOPPING' STOPPED = 'STOPPED' SUCCEEDED = 'SUCCEEDED' FAILED = 'FAILED' TIMEOUT = 'TIMEOUT' class LogGroupName(CronExpression):
64
64
11
8
56
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
LogGroupName
LogGroupName
483
484
483
483
75633c1d3a55401500b0aac62a6708c877090b65
bigcode/the-stack
train
0efe85adb38d728cad355711
train
class
class StartJobRunRequest(BaseModel): pass
class StartJobRunRequest(BaseModel):
pass
class SheetIndex(BaseModel): __root__: Annotated[int, Field(ge=0.0, le=200.0)] class SheetName(BaseModel): __root__: Annotated[str, Field(max_length=31, min_length=1)] class StartJobRunRequest(BaseModel):
63
64
11
8
55
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
StartJobRunRequest
StartJobRunRequest
704
705
704
704
969b89da007f707a6abf66978d3882fcc2255d58
bigcode/the-stack
train
dd8cb1e466338f4438c15110
train
class
class ListProjectsResponse(BaseModel): Projects: ProjectList NextToken: Optional[NextToken] = None
class ListProjectsResponse(BaseModel):
Projects: ProjectList NextToken: Optional[NextToken] = None
Represents a JDBC database output object which defines the output destination for a DataBrew recipe job to write into. """ GlueConnectionName: GlueConnectionName DatabaseOptions: DatabaseTableOutputOptions DatabaseOutputMode: Optional[DatabaseOutputMode] = None class ListProjectsResponse(BaseModel)...
64
64
25
7
56
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
ListProjectsResponse
ListProjectsResponse
1,129
1,131
1,129
1,129
f72615bb72838ab4651b70db96fe9ac5596f799f
bigcode/the-stack
train
822af3ac2be9a362df9c57df
train
class
class CsvOutputOptions(BaseModel): """ Represents a set of options that define how DataBrew will write a comma-separated value (CSV) file. """ Delimiter: Optional[Delimiter] = None
class CsvOutputOptions(BaseModel):
""" Represents a set of options that define how DataBrew will write a comma-separated value (CSV) file. """ Delimiter: Optional[Delimiter] = None
None Name: ScheduleName class CreatedBy(BaseModel): __root__: str class Delimiter(BaseModel): __root__: Annotated[str, Field(max_length=1, min_length=1)] class HeaderRow(AssumeControl): pass class CsvOutputOptions(BaseModel):
64
64
45
7
56
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
CsvOutputOptions
CsvOutputOptions
349
354
349
349
0dc36c07b5dc950ff40f546bd9b1cad3beb258ee
bigcode/the-stack
train
005695f63da2e0c3940ca8a2
train
class
class CreateDatasetResponse(BaseModel): Name: DatasetName
class CreateDatasetResponse(BaseModel):
Name: DatasetName
NameList] = None CronExpression: CronExpression class ValueReference(BaseModel): __root__: Annotated[ str, Field(max_length=128, min_length=2, regex='^:[A-Za-z0-9_]+$') ] class CreateDatasetResponse(BaseModel):
63
64
13
7
56
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
CreateDatasetResponse
CreateDatasetResponse
765
766
765
765
de3c6ef2dea68f4cb9db8a2cad2e6421ab19adcc
bigcode/the-stack
train
1f943176db5346d7d354594c
train
class
class ListJobsRequest(BaseModel): pass
class ListJobsRequest(BaseModel):
pass
, le=100.0)] class NextToken(BaseModel): __root__: Annotated[str, Field(max_length=2000, min_length=1)] class ListDatasetsRequest(BaseModel): pass class ListJobRunsRequest(BaseModel): pass class ListJobsRequest(BaseModel):
64
64
10
7
56
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
ListJobsRequest
ListJobsRequest
574
575
574
574
2b5b367cb7ff4900ee8369ec392b6e9b419aeac0
bigcode/the-stack
train
9a98719cfaf8e3d5eefd0649
train
class
class JobType(Enum): PROFILE = 'PROFILE' RECIPE = 'RECIPE'
class JobType(Enum):
PROFILE = 'PROFILE' RECIPE = 'RECIPE'
JobRequest(BaseModel): pass class DeleteProjectRequest(BaseModel): pass class DeleteRecipeVersionRequest(BaseModel): pass class DeleteScheduleRequest(BaseModel): pass class DescribeDatasetRequest(BaseModel): pass class DescribeJobRequest(BaseModel): pass class JobType(Enum):
64
64
19
5
58
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
JobType
JobType
452
454
452
452
c6da7654688dc43c67fd293642703e647675c7ae
bigcode/the-stack
train
a84348e2d139e2733cadfd0e
train
class
class RecipeErrorList(BaseModel): __root__: List[RecipeVersionErrorDetail]
class RecipeErrorList(BaseModel):
__root__: List[RecipeVersionErrorDetail]
OutputMode] = None class ListProjectsResponse(BaseModel): Projects: ProjectList NextToken: Optional[NextToken] = None class ListSchedulesResponse(BaseModel): Schedules: ScheduleList NextToken: Optional[NextToken] = None class RecipeErrorList(BaseModel):
64
64
18
7
56
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
RecipeErrorList
RecipeErrorList
1,139
1,140
1,139
1,139
049a2170c7e8b060c61d064864fe99af2d7ca033
bigcode/the-stack
train
918daff47bebf6682a8e5e72
train
class
class Statistic(Condition): pass
class Statistic(Condition):
pass
class SheetName(BaseModel): __root__: Annotated[str, Field(max_length=31, min_length=1)] class StartJobRunRequest(BaseModel): pass class StartProjectSessionRequest(BaseModel): AssumeControl: Optional[AssumeControl] = None class Statistic(Condition):
64
64
8
5
58
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
Statistic
Statistic
712
713
712
712
310edb27a67397e5739d0aec2d6495405a67b1fb
bigcode/the-stack
train
9650f16687fc472f92081125
train
class
class ListSchedulesResponse(BaseModel): Schedules: ScheduleList NextToken: Optional[NextToken] = None
class ListSchedulesResponse(BaseModel):
Schedules: ScheduleList NextToken: Optional[NextToken] = None
GlueConnectionName: GlueConnectionName DatabaseOptions: DatabaseTableOutputOptions DatabaseOutputMode: Optional[DatabaseOutputMode] = None class ListProjectsResponse(BaseModel): Projects: ProjectList NextToken: Optional[NextToken] = None class ListSchedulesResponse(BaseModel):
64
64
26
7
56
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
ListSchedulesResponse
ListSchedulesResponse
1,134
1,136
1,134
1,134
1ed42e11a0b74d6b552387b55b662dcf9d294390
bigcode/the-stack
train
313e54962e8acd696801568d
train
class
class Project(BaseModel): """ Represents all of the attributes of a DataBrew project. """ AccountId: Optional[AccountId] = None CreateDate: Optional[Date] = None CreatedBy: Optional[CreatedBy] = None DatasetName: Optional[DatasetName] = None LastModifiedDate: Optional[Date] = None L...
class Project(BaseModel):
""" Represents all of the attributes of a DataBrew project. """ AccountId: Optional[AccountId] = None CreateDate: Optional[Date] = None CreatedBy: Optional[CreatedBy] = None DatasetName: Optional[DatasetName] = None LastModifiedDate: Optional[Date] = None LastModifiedBy: Optional[La...
: extra = Extra.allow class ParameterName(BaseModel): __root__: Annotated[ str, Field(max_length=128, min_length=1, regex='^[A-Za-z0-9]+$') ] class Preview(AssumeControl): pass class Project(BaseModel):
64
64
175
5
58
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
Project
Project
642
660
642
642
aaf756d31b8d588ed356f71c5ad29e658315120d
bigcode/the-stack
train
dc99dd68e8f829651a0ae0e4
train
class
class ProjectName(RecipeName): pass
class ProjectName(RecipeName):
pass
Sample</code> value isn't provided, the default is used. The default value is CUSTOM_ROWS for the mode parameter and 20,000 for the size parameter. """ Mode: Optional[SampleMode] = None Size: Optional[JobSize] = None class ProjectName(RecipeName):
64
64
10
7
56
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
ProjectName
ProjectName
283
284
283
283
8b4e915124a8b52fe0fe92aaeda7b1f2787ad321
bigcode/the-stack
train
e6504b983c93f617cc4b2e95
train
class
class CreateScheduleRequest(BaseModel): JobNames: Optional[JobNameList] = None CronExpression: CronExpression Tags: Optional[TagMap] = None Name: ScheduleName
class CreateScheduleRequest(BaseModel):
JobNames: Optional[JobNameList] = None CronExpression: CronExpression Tags: Optional[TagMap] = None Name: ScheduleName
(BaseModel): __root__: Annotated[List[JobName], Field(max_items=50)] class CronExpression(BaseModel): __root__: Annotated[str, Field(max_length=512, min_length=1)] class ScheduleName(RecipeName): pass class CreateScheduleRequest(BaseModel):
64
64
44
7
56
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
CreateScheduleRequest
CreateScheduleRequest
330
334
330
330
72bbc4604a567742d7e118cdfb55556c48443895
bigcode/the-stack
train
77bd13501cb1d49103426818
train
class
class HeaderRow(AssumeControl): pass
class HeaderRow(AssumeControl):
pass
Tags: Optional[TagMap] = None Name: ScheduleName class CreatedBy(BaseModel): __root__: str class Delimiter(BaseModel): __root__: Annotated[str, Field(max_length=1, min_length=1)] class HeaderRow(AssumeControl):
63
64
11
8
55
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
HeaderRow
HeaderRow
345
346
345
345
af6d1ea29eb53439737cd61075ebf4945a4c846d
bigcode/the-stack
train
59d757e7eb4c8293a08e1864
train
class
class ListDatasetsResponse(BaseModel): Datasets: DatasetList NextToken: Optional[NextToken] = None
class ListDatasetsResponse(BaseModel):
Datasets: DatasetList NextToken: Optional[NextToken] = None
] = None Name: RecipeName Steps: Optional[RecipeStepList] = None Tags: Optional[TagMap] = None ResourceArn: Optional[Arn] = None RecipeVersion: Optional[RecipeVersion] = None class ListDatasetsResponse(BaseModel):
64
64
27
8
55
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
ListDatasetsResponse
ListDatasetsResponse
1,460
1,462
1,460
1,460
ddf3b9f00fd8a237a755e91b7b742b84aa4d5981
bigcode/the-stack
train
e2677ab2a33736ac9512ea83
train
class
class SendProjectSessionActionResponse(BaseModel): Result: Optional[Result] = None Name: ProjectName ActionId: Optional[ActionId] = None
class SendProjectSessionActionResponse(BaseModel):
Result: Optional[Result] = None Name: ProjectName ActionId: Optional[ActionId] = None
[Arn] = None CronExpression: Optional[CronExpression] = None Tags: Optional[TagMap] = None Name: ScheduleName class ListTagsForResourceResponse(BaseModel): Tags: Optional[TagMap] = None class SendProjectSessionActionResponse(BaseModel):
64
64
37
9
54
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
SendProjectSessionActionResponse
SendProjectSessionActionResponse
926
929
926
926
57715276825cb6adaa1b1db7c7bffc6090378954
bigcode/the-stack
train
5468cf079ac86f4de8b5dea1
train
class
class StepIndex(StartColumnIndex): pass
class StepIndex(StartColumnIndex):
pass
By] = None LastModifiedDate: Optional[Date] = None ResourceArn: Optional[Arn] = None CronExpression: Optional[CronExpression] = None Tags: Optional[TagMap] = None Name: ScheduleName class StepIndex(StartColumnIndex):
64
64
10
7
56
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
StepIndex
StepIndex
692
693
692
692
5cbadf825c2da482c64f9586d52d8685eed9a248
bigcode/the-stack
train
d28488cac51df69863346ae1
train
class
class GlueConnectionName(RecipeName): pass
class GlueConnectionName(RecipeName):
pass
will write a comma-separated value (CSV) file. """ Delimiter: Optional[Delimiter] = None class DatabaseName(RecipeName): pass class TableName(RecipeName): pass class OverwriteOutput(AssumeControl): pass class GlueConnectionName(RecipeName):
64
64
11
8
55
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
GlueConnectionName
GlueConnectionName
369
370
369
369
874cd92766535148a6aee14d2ff0b3e7e046bd07
bigcode/the-stack
train
548bc30562d1b1d797e12dcf
train
class
class ListTagsForResourceResponse(BaseModel): Tags: Optional[TagMap] = None
class ListTagsForResourceResponse(BaseModel):
Tags: Optional[TagMap] = None
= None LastModifiedDate: Optional[Date] = None ResourceArn: Optional[Arn] = None CronExpression: Optional[CronExpression] = None Tags: Optional[TagMap] = None Name: ScheduleName class ListTagsForResourceResponse(BaseModel):
64
64
20
9
54
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
ListTagsForResourceResponse
ListTagsForResourceResponse
922
923
922
922
c21a023a42b81e26b93e4d990a1f8f584e7e890e
bigcode/the-stack
train
0f9db206d68bb419719c9546
train
class
class OutputFormatOptions(BaseModel): """ Represents a set of options that define the structure of comma-separated (CSV) job output. """ Csv: Optional[CsvOutputOptions] = None
class OutputFormatOptions(BaseModel):
""" Represents a set of options that define the structure of comma-separated (CSV) job output. """ Csv: Optional[CsvOutputOptions] = None
ET = 'PARQUET' GLUEPARQUET = 'GLUEPARQUET' AVRO = 'AVRO' ORC = 'ORC' XML = 'XML' TABLEAUHYPER = 'TABLEAUHYPER' class OutputFormatOptions(BaseModel):
64
64
42
7
57
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
OutputFormatOptions
OutputFormatOptions
613
618
613
613
2e29b2e266fad961f75f2ddded9cc9206f07d175
bigcode/the-stack
train
59660c74a5302c2313c31963
train
class
class FormatOptions(BaseModel): """ Represents a set of options that define the structure of either comma-separated value (CSV), Excel, or JSON input. """ Json: Optional[JsonOptions] = None Excel: Optional[ExcelOptions] = None Csv: Optional[CsvOptions] = None
class FormatOptions(BaseModel):
""" Represents a set of options that define the structure of either comma-separated value (CSV), Excel, or JSON input. """ Json: Optional[JsonOptions] = None Excel: Optional[ExcelOptions] = None Csv: Optional[CsvOptions] = None
List NextToken: Optional[NextToken] = None class ListSchedulesResponse(BaseModel): Schedules: ScheduleList NextToken: Optional[NextToken] = None class RecipeErrorList(BaseModel): __root__: List[RecipeVersionErrorDetail] class FormatOptions(BaseModel):
64
64
67
6
58
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
FormatOptions
FormatOptions
1,143
1,150
1,143
1,143
2482631652e3e17963b366db6b336eca5086b320
bigcode/the-stack
train
d38ea4eae9dc996d39d22f79
train
class
class TagResourceRequest(BaseModel): Tags: TagMap
class TagResourceRequest(BaseModel):
Tags: TagMap
root__: Annotated[List[StatisticOverride], Field(min_items=1)] class StopJobRunRequest(BaseModel): pass class TagKeyList(BaseModel): __root__: Annotated[List[TagKey], Field(max_items=200, min_items=1)] class TagResourceRequest(BaseModel):
63
64
13
7
56
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
TagResourceRequest
TagResourceRequest
741
742
741
741
5df2324fa3c0ad788b98b64b68df6777b66262c8
bigcode/the-stack
train
e7689e0443c7e98e28734bf1
train
class
class StatisticOverride(BaseModel): """ Override of a particular evaluation for a profile job. """ Statistic: Statistic Parameters: ParameterMap
class StatisticOverride(BaseModel):
""" Override of a particular evaluation for a profile job. """ Statistic: Statistic Parameters: ParameterMap
(BaseModel): pass class StartProjectSessionRequest(BaseModel): AssumeControl: Optional[AssumeControl] = None class Statistic(Condition): pass class StatisticList(BaseModel): __root__: Annotated[List[Statistic], Field(min_items=1)] class StatisticOverride(BaseModel):
63
64
32
6
57
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
StatisticOverride
StatisticOverride
720
726
720
720
d617d182f68e71d6bdbafab5dc28c51cec433a08
bigcode/the-stack
train
c66a532f880b3cb8882f3b82
train
class
class ListRecipeVersionsResponse(BaseModel): NextToken: Optional[NextToken] = None Recipes: RecipeList
class ListRecipeVersionsResponse(BaseModel):
NextToken: Optional[NextToken] = None Recipes: RecipeList
: JobRunList NextToken: Optional[NextToken] = None class ListJobsResponse(BaseModel): Jobs: JobList NextToken: Optional[NextToken] = None class RecipeList(BaseModel): __root__: List[Recipe] class ListRecipeVersionsResponse(BaseModel):
64
64
26
8
56
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
ListRecipeVersionsResponse
ListRecipeVersionsResponse
1,479
1,481
1,479
1,479
7c396e232f2528beb8c70fd41fd81688a947b9f6
bigcode/the-stack
train
657ac1e433106dbf3f5225c0
train
class
class UntagResourceResponse(TagResourceResponse): pass
class UntagResourceResponse(TagResourceResponse):
pass
__root__: Annotated[int, Field(ge=0.0)] class ColumnRange(BaseModel): __root__: Annotated[int, Field(ge=0.0, le=20.0)] class TagResourceResponse(BaseModel): pass class UntagResourceResponse(TagResourceResponse):
64
64
12
9
54
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
UntagResourceResponse
UntagResourceResponse
117
118
117
117
93864bc729fc4415627436834af7135258212085
bigcode/the-stack
train
4f31d70a666971bed4687f04
train
class
class PathOptions(BaseModel): """ Represents a set of options that define how DataBrew selects files for a given Amazon S3 path in a dataset. """ LastModifiedDateCondition: Optional[FilterExpression] = None FilesLimit: Optional[FilesLimit] = None Parameters: Optional[PathParametersMap] = None
class PathOptions(BaseModel):
""" Represents a set of options that define how DataBrew selects files for a given Amazon S3 path in a dataset. """ LastModifiedDateCondition: Optional[FilterExpression] = None FilesLimit: Optional[FilesLimit] = None Parameters: Optional[PathParametersMap] = None
, in either the Glue Data Catalog or Amazon S3. """ S3InputDefinition: Optional[S3Location] = None DataCatalogInputDefinition: Optional[DataCatalogInputDefinition] = None DatabaseInputDefinition: Optional[DatabaseInputDefinition] = None class PathOptions(BaseModel):
64
64
73
6
57
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
PathOptions
PathOptions
994
1,001
994
994
f7996764aed1285654aada1858b5656265d271c9
bigcode/the-stack
train
2f1a9bd06d9af32b2fa723a0
train
class
class JobList(BaseModel): __root__: List[Job]
class JobList(BaseModel):
__root__: List[Job]
= None ResourceArn: Optional[Arn] = None RoleArn: Optional[Arn] = None Timeout: Optional[Timeout] = None Tags: Optional[TagMap] = None JobSample: Optional[JobSample] = None class JobList(BaseModel):
64
64
14
6
57
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
JobList
JobList
1,279
1,280
1,279
1,279
5afdb5a7cdebecf00907731e306ac8936b893629
bigcode/the-stack
train
6de6ff53861a6cbdf0a751f0
train
class
class JobName(BaseModel): __root__: Annotated[str, Field(max_length=240, min_length=1)]
class JobName(BaseModel):
__root__: Annotated[str, Field(max_length=240, min_length=1)]
_N = 'FIRST_N' LAST_N = 'LAST_N' RANDOM = 'RANDOM' class InternalServerException(ConflictException): pass class RecipeName(BaseModel): __root__: Annotated[str, Field(max_length=255, min_length=1)] class JobName(BaseModel):
63
64
25
6
57
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
JobName
JobName
88
89
88
88
64aa77fd4cca3e42357134610d29475bfd204eed
bigcode/the-stack
train
cf1a1f96909164f72676a713
train
class
class LocaleCode(BaseModel): __root__: Annotated[ str, Field(max_length=100, min_length=2, regex='^[A-Za-z0-9_\\.#@\\-]+$') ]
class LocaleCode(BaseModel):
__root__: Annotated[ str, Field(max_length=100, min_length=2, regex='^[A-Za-z0-9_\\.#@\\-]+$') ]
__root__: Annotated[ str, Field( max_length=6, min_length=1, regex='^(Z|[-+](\\d|\\d{2}|\\d{2}:?\\d{2}))$' ), ] class LocaleCode(BaseModel):
63
64
47
6
57
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
LocaleCode
LocaleCode
418
421
418
418
b85f2df053578644ccb40b3b1b858cd6aafa1572
bigcode/the-stack
train
cfd6076429a90c2d83ed7717
train
class
class ValidationException(ConflictException): pass
class ValidationException(ConflictException):
pass
BaseModel, Extra, Field class RecipeVersion(BaseModel): __root__: Annotated[str, Field(max_length=16, min_length=1)] class ConflictException(BaseModel): __root__: Any class ResourceNotFoundException(ConflictException): pass class ValidationException(ConflictException):
64
64
10
7
56
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
ValidationException
ValidationException
26
27
26
26
94d593f2007a7f4929dc8a10dbb7e4a5b60f2e55
bigcode/the-stack
train
8c5e2549822beec3e6ec76b0
train
class
class SampleSize(BaseModel): __root__: Annotated[int, Field(ge=1.0, le=5000.0)]
class SampleSize(BaseModel):
__root__: Annotated[int, Field(ge=1.0, le=5000.0)]
Model): __root__: Annotated[str, Field(max_length=1280, min_length=1)] class SampleMode(Enum): FULL_DATASET = 'FULL_DATASET' CUSTOM_ROWS = 'CUSTOM_ROWS' class JobSize(BaseModel): __root__: int class SampleSize(BaseModel):
64
64
29
6
57
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
SampleSize
SampleSize
70
71
70
70
6be9fcdc5fd98613564e61a6b0822fd32951eda1
bigcode/the-stack
train
0fa143a33c5e8abcea75818e
train
class
class ScheduleList(BaseModel): __root__: List[Schedule]
class ScheduleList(BaseModel):
__root__: List[Schedule]
Name], Field(max_items=1, min_items=1)] class SheetIndexList(BaseModel): __root__: Annotated[List[SheetIndex], Field(max_items=1, min_items=1)] class ProjectList(BaseModel): __root__: List[Project] class ScheduleList(BaseModel):
64
64
14
6
58
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
ScheduleList
ScheduleList
1,059
1,060
1,059
1,059
bcb6f333b5633b8ae02f642cdcca0082f2fa5084
bigcode/the-stack
train
21edce7bb38e077765b6ab63
train
class
class MultiLine(AssumeControl): pass
class MultiLine(AssumeControl):
pass
class OrderedBy(Enum): LAST_MODIFIED_DATE = 'LAST_MODIFIED_DATE' class Order(Enum): DESCENDING = 'DESCENDING' ASCENDING = 'ASCENDING' class ValuesMap(BaseModel): pass class Config: extra = Extra.allow class MultiLine(AssumeControl):
64
64
11
8
55
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
MultiLine
MultiLine
554
555
554
554
e0c8bf156c3ecfde4706389de1751b59df7fbdf6
bigcode/the-stack
train
8ce57280869b7e699d46f371
train
class
class EncryptionKeyArn(Arn): pass
class EncryptionKeyArn(Arn):
pass
pass class InputFormat(Enum): CSV = 'CSV' JSON = 'JSON' PARQUET = 'PARQUET' EXCEL = 'EXCEL' class TagMap(BaseModel): pass class Config: extra = Extra.allow class EncryptionKeyArn(Arn):
64
64
10
7
56
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
EncryptionKeyArn
EncryptionKeyArn
248
249
248
248
0bcfaee8bf1927113f4c1fb448e4819b0b498a9c
bigcode/the-stack
train
c0b13d51170afd23bb6e871a
train
class
class HiddenColumnList(BaseModel): __root__: List[ColumnName]
class HiddenColumnList(BaseModel):
__root__: List[ColumnName]
://docs.aws.amazon.com/databrew/latest/dg/recipe-actions-reference.html">Recipe actions reference</a>. """ Operation: Operation Parameters: Optional[ParameterMap] = None class ConditionExpressionList(BaseModel): __root__: List[ConditionExpression] class HiddenColumnList(BaseModel):
64
64
16
7
57
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
HiddenColumnList
HiddenColumnList
945
946
945
945
00f0358a4aa3cdbed3d1a540987bd4ba300d02d4
bigcode/the-stack
train
1217d700049bed55ccf248a3
train
class
class Condition(BaseModel): __root__: Annotated[str, Field(max_length=128, min_length=1, regex='^[A-Z\\_]+$')]
class Condition(BaseModel):
__root__: Annotated[str, Field(max_length=128, min_length=1, regex='^[A-Z\\_]+$')]
= 'SNAPPY' BZIP2 = 'BZIP2' DEFLATE = 'DEFLATE' LZO = 'LZO' BROTLI = 'BROTLI' ZSTD = 'ZSTD' ZLIB = 'ZLIB' class Condition(BaseModel):
64
64
34
5
59
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
Condition
Condition
204
205
204
204
8fe8d490a43ce79ccc257312ed78aaedbbca7245
bigcode/the-stack
train
34ec79df28f22fd78722e0dd
train
class
class DatasetParameter(BaseModel): """ Represents a dataset paramater that defines type and conditions for a parameter in the Amazon S3 path of the dataset. """ Name: PathParameterName Type: ParameterType DatetimeOptions: Optional[DatetimeOptions] = None CreateColumn: Optional[CreateColumn]...
class DatasetParameter(BaseModel):
""" Represents a dataset paramater that defines type and conditions for a parameter in the Amazon S3 path of the dataset. """ Name: PathParameterName Type: ParameterType DatetimeOptions: Optional[DatetimeOptions] = None CreateColumn: Optional[CreateColumn] = None Filter: Optional[Filter...
): """ Represents additional options for correct interpretation of datetime parameters used in the Amazon S3 path of a dataset. """ Format: DatetimeFormat TimezoneOffset: Optional[TimezoneOffset] = None LocaleCode: Optional[LocaleCode] = None class DatasetParameter(BaseModel):
64
64
83
6
57
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
DatasetParameter
DatasetParameter
1,035
1,044
1,035
1,035
7c8304698ac7296d0ae147547ad6036000c1f84f
bigcode/the-stack
train
5617ea30af3828cdf0d1aaed
train
class
class UpdateProjectRequest(BaseModel): Sample: Optional[Sample] = None RoleArn: Arn
class UpdateProjectRequest(BaseModel):
Sample: Optional[Sample] = None RoleArn: Arn
pass class TagKeyList(BaseModel): __root__: Annotated[List[TagKey], Field(max_items=200, min_items=1)] class TagResourceRequest(BaseModel): Tags: TagMap class UntagResourceRequest(BaseModel): pass class UpdateProjectRequest(BaseModel):
64
64
23
7
56
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
UpdateProjectRequest
UpdateProjectRequest
749
751
749
749
1e4ea23e345df354c3ba8200fdc5bc0997f230a9
bigcode/the-stack
train
4994d3363fb0dadeb8814a2d
train
class
class DatabaseInputDefinition(BaseModel): """ Connection information for dataset input files stored in a database. """ GlueConnectionName: GlueConnectionName DatabaseTableName: DatabaseTableName TempDirectory: Optional[S3Location] = None
class DatabaseInputDefinition(BaseModel):
""" Connection information for dataset input files stored in a database. """ GlueConnectionName: GlueConnectionName DatabaseTableName: DatabaseTableName TempDirectory: Optional[S3Location] = None
how metadata stored in the Glue Data Catalog is defined in a DataBrew dataset. """ CatalogId: Optional[CatalogId] = None DatabaseName: DatabaseName TableName: TableName TempDirectory: Optional[S3Location] = None class DatabaseInputDefinition(BaseModel):
64
64
53
7
56
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
DatabaseInputDefinition
DatabaseInputDefinition
806
813
806
806
cea0d4420146388053e09bde8342cd9ded3f52ac
bigcode/the-stack
train
49a4928efd27a1b316369b41
train
class
class UpdateRecipeJobResponse(DeleteJobResponse): pass
class UpdateRecipeJobResponse(DeleteJobResponse):
pass
Response): pass class TagKey(BaseModel): __root__: Annotated[str, Field(max_length=128, min_length=1)] class UpdateProfileJobResponse(DeleteJobResponse): pass class UpdateRecipeResponse(PublishRecipeResponse): pass class UpdateRecipeJobResponse(DeleteJobResponse):
64
64
12
9
54
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
UpdateRecipeJobResponse
UpdateRecipeJobResponse
133
134
133
133
879dc2f5cd9b9eadd26eb95911880f169aedfe90
bigcode/the-stack
train
79915a6811ecbde04e91de9a
train
class
class DescribeScheduleRequest(BaseModel): pass
class DescribeScheduleRequest(BaseModel):
pass
ATED = 'TERMINATED' TERMINATING = 'TERMINATING' UPDATING = 'UPDATING' class OpenedBy(CreatedBy): pass class DescribeRecipeRequest(BaseModel): pass class PublishedBy(CreatedBy): pass class DescribeScheduleRequest(BaseModel):
64
64
10
7
56
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
DescribeScheduleRequest
DescribeScheduleRequest
520
521
520
520
18693bbfb55c1b91f60ca02cc58d62f1aa929cdb
bigcode/the-stack
train
005de23a30a4e6c0851a495f
train
class
class Job(BaseModel): """ Represents all of the attributes of a DataBrew job. """ AccountId: Optional[AccountId] = None CreatedBy: Optional[CreatedBy] = None CreateDate: Optional[Date] = None DatasetName: Optional[DatasetName] = None EncryptionKeyArn: Optional[EncryptionKeyArn] = None ...
class Job(BaseModel):
""" Represents all of the attributes of a DataBrew job. """ AccountId: Optional[AccountId] = None CreatedBy: Optional[CreatedBy] = None CreateDate: Optional[Date] = None DatasetName: Optional[DatasetName] = None EncryptionKeyArn: Optional[EncryptionKeyArn] = None EncryptionMode: Opt...
ModifiedDate: Optional[Date] = None LastModifiedBy: Optional[LastModifiedBy] = None Source: Optional[Source] = None PathOptions: Optional[PathOptions] = None Tags: Optional[TagMap] = None ResourceArn: Optional[Arn] = None class DatasetList(BaseModel): __root__: List[Dataset] class Job(BaseMode...
87
87
292
5
82
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
Job
Job
1,249
1,276
1,249
1,249
f64c310914d4275f46755e32f7300959a524aee8
bigcode/the-stack
train
e206187e942c11758e06b199
train
class
class StartColumnIndex(BaseModel): __root__: Annotated[int, Field(ge=0.0)]
class StartColumnIndex(BaseModel):
__root__: Annotated[int, Field(ge=0.0)]
_length=240, min_length=1)] class DeleteJobResponse(BaseModel): Name: JobName class DeleteRecipeVersionResponse(BaseModel): Name: RecipeName RecipeVersion: RecipeVersion class PublishRecipeResponse(BaseModel): Name: RecipeName class StartColumnIndex(BaseModel):
64
64
23
7
56
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
StartColumnIndex
StartColumnIndex
105
106
105
105
1344845b6ffdacac864aa7f50294093d90e9cf59
bigcode/the-stack
train
e62b3db7cf34e803e42b5911
train
class
class DatabaseName(RecipeName): pass
class DatabaseName(RecipeName):
pass
class HeaderRow(AssumeControl): pass class CsvOutputOptions(BaseModel): """ Represents a set of options that define how DataBrew will write a comma-separated value (CSV) file. """ Delimiter: Optional[Delimiter] = None class DatabaseName(RecipeName):
64
64
10
7
56
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
DatabaseName
DatabaseName
357
358
357
357
c65ed302a9070e264fb0e57e4176f41bf0824873
bigcode/the-stack
train
00e83398182c44974c9c5758
train
class
class CreateProjectRequest(BaseModel): DatasetName: DatasetName Name: ProjectName RecipeName: RecipeName Sample: Optional[Sample] = None RoleArn: Arn Tags: Optional[TagMap] = None
class CreateProjectRequest(BaseModel):
DatasetName: DatasetName Name: ProjectName RecipeName: RecipeName Sample: Optional[Sample] = None RoleArn: Arn Tags: Optional[TagMap] = None
None class ProjectName(RecipeName): pass class Sample(BaseModel): """ Represents the sample size and sampling type for DataBrew to use for interactive data analysis. """ Size: Optional[SampleSize] = None Type: SampleType class CreateProjectRequest(BaseModel):
64
64
54
7
56
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
CreateProjectRequest
CreateProjectRequest
296
302
296
296
4b23b45567e2146ecf2d25d83577a85631c5f2a7
bigcode/the-stack
train
ce1088740d5c093d5f059c0e
train
class
class JobRunErrorMessage(CreatedBy): pass
class JobRunErrorMessage(CreatedBy):
pass
): pass class DescribeJobRequest(BaseModel): pass class JobType(Enum): PROFILE = 'PROFILE' RECIPE = 'RECIPE' class JobRunId(RecipeName): pass class DescribeJobRunRequest(BaseModel): pass class JobRunErrorMessage(CreatedBy):
64
64
12
9
54
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
JobRunErrorMessage
JobRunErrorMessage
465
466
465
465
95862a1eff1a58b45ff8a5075e4f46faf4fe0dea
bigcode/the-stack
train
cf55d9f031e4de166f2f625f
train
class
class DescribeJobRunRequest(BaseModel): pass
class DescribeJobRunRequest(BaseModel):
pass
(BaseModel): pass class DescribeDatasetRequest(BaseModel): pass class DescribeJobRequest(BaseModel): pass class JobType(Enum): PROFILE = 'PROFILE' RECIPE = 'RECIPE' class JobRunId(RecipeName): pass class DescribeJobRunRequest(BaseModel):
64
64
11
8
55
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
DescribeJobRunRequest
DescribeJobRunRequest
461
462
461
461
3be3c08d40245f9a5c78d4f68ae0d2d19ab03f7c
bigcode/the-stack
train
909ba9c9dd875ae98c5f2675
train
class
class ListRecipesRequest(BaseModel): pass
class ListRecipesRequest(BaseModel):
pass
=1)] class ListDatasetsRequest(BaseModel): pass class ListJobRunsRequest(BaseModel): pass class ListJobsRequest(BaseModel): pass class ListProjectsRequest(BaseModel): pass class ListRecipeVersionsRequest(BaseModel): pass class ListRecipesRequest(BaseModel):
64
64
10
7
56
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
ListRecipesRequest
ListRecipesRequest
586
587
586
586
e1cc7912360d234a83ada4349db5fee388c724b7
bigcode/the-stack
train
eb882af3b04a20a1bbaa70c1
train
class
class Source(Enum): S3 = 'S3' DATA_CATALOG = 'DATA-CATALOG' DATABASE = 'DATABASE'
class Source(Enum):
S3 = 'S3' DATA_CATALOG = 'DATA-CATALOG' DATABASE = 'DATABASE'
pass class GlueConnectionName(RecipeName): pass class DatabaseTableName(RecipeName): pass class DatabaseOutputMode(Enum): NEW_TABLE = 'NEW_TABLE' class Date(BaseModel): __root__: datetime class LastModifiedBy(CreatedBy): pass class Source(Enum):
64
64
28
4
59
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
Source
Source
389
392
389
389
8664414c817be8639c5d4cbef1cd1454cae3bdd4
bigcode/the-stack
train
e87dbda3df06c8c81cd960b7
train
class
class RecipeStepList(BaseModel): __root__: List[RecipeStep]
class RecipeStepList(BaseModel):
__root__: List[RecipeStep]
OutputList] = None ProjectName: Optional[ProjectName] = None RecipeReference: Optional[RecipeReference] = None RoleArn: Arn Tags: Optional[TagMap] = None Timeout: Optional[Timeout] = None class RecipeStepList(BaseModel):
64
64
16
7
56
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
RecipeStepList
RecipeStepList
1,214
1,215
1,214
1,214
c816606d51d84032901c2a199f6fc068cc129a48
bigcode/the-stack
train
cacc39bf14c60ce99758b941
train
class
class S3TableOutputOptions(BaseModel): """ Represents options that specify how and where DataBrew writes the Amazon S3 output generated by recipe jobs. """ Location: S3Location
class S3TableOutputOptions(BaseModel):
""" Represents options that specify how and where DataBrew writes the Amazon S3 output generated by recipe jobs. """ Location: S3Location
Optional[FilterExpression] = None FilesLimit: Optional[FilesLimit] = None Parameters: Optional[PathParametersMap] = None class OutputList(BaseModel): __root__: Annotated[List[Output], Field(min_items=1)] class S3TableOutputOptions(BaseModel):
63
64
42
9
54
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
S3TableOutputOptions
S3TableOutputOptions
1,008
1,013
1,008
1,008
46815649f53eb4373f95b5216edd92424eb21fdc
bigcode/the-stack
train
cee46cd9d1ee6733c8c21390
train
class
class DeleteScheduleResponse(CreateScheduleResponse): pass
class DeleteScheduleResponse(CreateScheduleResponse):
pass
Optional[OverwriteOutput] = None FormatOptions: Optional[OutputFormatOptions] = None class CreateScheduleResponse(BaseModel): Name: ScheduleName class DeleteDatasetResponse(CreateDatasetResponse): pass class DeleteProjectResponse(CreateProjectResponse): pass class DeleteScheduleResponse(CreateSch...
64
64
11
8
55
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
DeleteScheduleResponse
DeleteScheduleResponse
889
890
889
889
c96e9f0dbb18b0625787e0d5667f57f69f7c0eaa
bigcode/the-stack
train
ab20ab0f977e8441b41e2cf6
train
class
class AccessDeniedException(ConflictException): pass
class AccessDeniedException(ConflictException):
pass
the Amazon S3 path of a dataset to their definitions. A definition includes parameter type and conditions. """ pass class Config: extra = Extra.allow class TagValue(BaseModel): __root__: Annotated[str, Field(max_length=256)] class AccessDeniedException(ConflictException):
63
64
11
8
55
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
AccessDeniedException
AccessDeniedException
45
46
45
45
d8b30518cb3af86087889cf254a58f79bf197280
bigcode/the-stack
train
b984bff96a5823a1249b86ba
train
class
class UpdateRecipeResponse(PublishRecipeResponse): pass
class UpdateRecipeResponse(PublishRecipeResponse):
pass
Model): pass class UntagResourceResponse(TagResourceResponse): pass class TagKey(BaseModel): __root__: Annotated[str, Field(max_length=128, min_length=1)] class UpdateProfileJobResponse(DeleteJobResponse): pass class UpdateRecipeResponse(PublishRecipeResponse):
64
64
12
9
54
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
UpdateRecipeResponse
UpdateRecipeResponse
129
130
129
129
81eb3a63a6baaed13f9f6d3803d94a21afe51c3d
bigcode/the-stack
train
ab6f0b4de594e9998b3f6cd1
train
class
class StatisticsConfiguration(BaseModel): """ Configuration of evaluations for a profile job. This configuration can be used to select evaluations and override the parameters of selected evaluations. """ IncludedStatistics: Optional[StatisticList] = None Overrides: Optional[StatisticOverrideList] =...
class StatisticsConfiguration(BaseModel):
""" Configuration of evaluations for a profile job. This configuration can be used to select evaluations and override the parameters of selected evaluations. """ IncludedStatistics: Optional[StatisticList] = None Overrides: Optional[StatisticOverrideList] = None
that should be selected for a dataset from a connected Amazon S3 path. """ MaxFiles: MaxFiles OrderedBy: Optional[OrderedBy] = None Order: Optional[Order] = None class CreateProfileJobResponse(DeleteJobResponse): pass class StatisticsConfiguration(BaseModel):
64
64
59
6
57
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
StatisticsConfiguration
StatisticsConfiguration
839
845
839
839
66a9b3411e14eca89a68fc0c25dfa3e185d3644e
bigcode/the-stack
train
c3ea8acc667125f787d9f7d0
train
class
class Arn(BaseModel): __root__: Annotated[str, Field(max_length=2048, min_length=20)]
class Arn(BaseModel):
__root__: Annotated[str, Field(max_length=2048, min_length=20)]
Response): pass class UpdateRecipeResponse(PublishRecipeResponse): pass class UpdateRecipeJobResponse(DeleteJobResponse): pass class AccountId(BaseModel): __root__: Annotated[str, Field(max_length=255)] class ActionId(JobSize): pass class Arn(BaseModel):
64
64
25
5
58
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
Arn
Arn
145
146
145
145
cfa210c5ad079cb0c705089e4cd53eab3b42d341
bigcode/the-stack
train
c4b1f92f2d3167c54ecb23dd
train
class
class Timeout(StartColumnIndex): pass
class Timeout(StartColumnIndex):
pass
_KMS = 'SSE-KMS' SSE_S3 = 'SSE-S3' class LogSubscription(Enum): ENABLE = 'ENABLE' DISABLE = 'DISABLE' class MaxCapacity(JobSize): pass class MaxRetries(StartColumnIndex): pass class Timeout(StartColumnIndex):
64
64
9
6
57
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
Timeout
Timeout
270
271
270
270
3657c4967a9f38adf1970fadaba4f6685a652fa3
bigcode/the-stack
train
52f383e36532df007a9e2082
train
class
class ServiceQuotaExceededException(ConflictException): pass
class ServiceQuotaExceededException(ConflictException):
pass
A definition includes parameter type and conditions. """ pass class Config: extra = Extra.allow class TagValue(BaseModel): __root__: Annotated[str, Field(max_length=256)] class AccessDeniedException(ConflictException): pass class ServiceQuotaExceededException(ConflictException):
64
64
12
9
54
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
ServiceQuotaExceededException
ServiceQuotaExceededException
49
50
49
49
67e71336dba6f5b05467bdec1bbb90799b9acf5b
bigcode/the-stack
train
8df7ac6e1f4e742e1a30619a
train
class
class PublishRecipeResponse(BaseModel): Name: RecipeName
class PublishRecipeResponse(BaseModel):
Name: RecipeName
(BaseModel): __root__: Annotated[str, Field(max_length=240, min_length=1)] class DeleteJobResponse(BaseModel): Name: JobName class DeleteRecipeVersionResponse(BaseModel): Name: RecipeName RecipeVersion: RecipeVersion class PublishRecipeResponse(BaseModel):
64
64
13
7
56
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
PublishRecipeResponse
PublishRecipeResponse
101
102
101
101
121684fe5ff77cf78ce08afe9487a9ebc1fca05f
bigcode/the-stack
train
0702411ee5f6052b8963a131
train
class
class JobSize(BaseModel): __root__: int
class JobSize(BaseModel):
__root__: int
=63, min_length=3)] class Key(BaseModel): __root__: Annotated[str, Field(max_length=1280, min_length=1)] class SampleMode(Enum): FULL_DATASET = 'FULL_DATASET' CUSTOM_ROWS = 'CUSTOM_ROWS' class JobSize(BaseModel):
64
64
12
6
58
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
JobSize
JobSize
66
67
66
66
76bb98a16d4fb2dbbe43ace6011d38f189e1a234
bigcode/the-stack
train
74a5ad4b933f03a9bd60c4a1
train
class
class SendProjectSessionActionRequest(BaseModel): Preview: Optional[Preview] = None RecipeStep: Optional[RecipeStep] = None StepIndex: Optional[StepIndex] = None ClientSessionId: Optional[ClientSessionId] = None ViewFrame: Optional[ViewFrame] = None
class SendProjectSessionActionRequest(BaseModel):
Preview: Optional[Preview] = None RecipeStep: Optional[RecipeStep] = None StepIndex: Optional[StepIndex] = None ClientSessionId: Optional[ClientSessionId] = None ViewFrame: Optional[ViewFrame] = None
= None Name: RecipeName ResourceArn: Optional[Arn] = None Steps: Optional[RecipeStepList] = None Tags: Optional[TagMap] = None RecipeVersion: Optional[RecipeVersion] = None class SendProjectSessionActionRequest(BaseModel):
64
64
69
9
54
RyanJarv/Pacu2
pacu/models/awsapi/databrew.py
Python
SendProjectSessionActionRequest
SendProjectSessionActionRequest
1,331
1,336
1,331
1,331
462d0e9ca93d9027bc50c619da0b2dfe815df6c5
bigcode/the-stack
train
36c4d1365a180a758e935d61
train
function
def calRatio(_after, _before): _ratio = _after / _before * 100 return _ratio
def calRatio(_after, _before):
_ratio = _after / _before * 100 return _ratio
= 8 def inversion(_data): for d in range(len(_data)): if _data[d] == 0: _data[d] = 1 else: _data[d] = 0 return _data def calRatio(_after, _before):
64
64
27
9
54
hyu-iot/gem5
DBE/DBE.py
Python
calRatio
calRatio
17
20
17
17
2de42f63baf8f00e54d4c2f2a0f445378bbf8ea6
bigcode/the-stack
train
c61481f099b48fc69af1178d
train
function
def inversion(_data): for d in range(len(_data)): if _data[d] == 0: _data[d] = 1 else: _data[d] = 0 return _data
def inversion(_data):
for d in range(len(_data)): if _data[d] == 0: _data[d] = 1 else: _data[d] = 0 return _data
import random length = 10000 row = 2 col = 8 def inversion(_data):
24
64
51
5
18
hyu-iot/gem5
DBE/DBE.py
Python
inversion
inversion
7
15
7
7
51e4fe25e9cc66cd5e0d2e022aab131bc0e391f3
bigcode/the-stack
train
5ed55febfd3cda1d249c181f
train
class
class Flag: def __init__(self,_data): self.Flags = [0 for j in range(4)] self.data = _data self.power = 0 self.col = len(_data[0]) self.row = len(_data) def countFlag(self): for i in range(self.col): if self.data[0][i] == 0 and self.data[1][i] == 0: ...
class Flag:
def __init__(self,_data): self.Flags = [0 for j in range(4)] self.data = _data self.power = 0 self.col = len(_data[0]) self.row = len(_data) def countFlag(self): for i in range(self.col): if self.data[0][i] == 0 and self.data[1][i] == 0: # <= 0...
8 def inversion(_data): for d in range(len(_data)): if _data[d] == 0: _data[d] = 1 else: _data[d] = 0 return _data def calRatio(_after, _before): _ratio = _after / _before * 100 return _ratio # Flag : Calculate the number of 00/01/10/11 Data each for compa...
105
105
350
3
101
hyu-iot/gem5
DBE/DBE.py
Python
Flag
Flag
23
60
23
23
a524d745640144abeddbce3702c9158ae4bb7d9e
bigcode/the-stack
train
d0373b884fa1b86a6efe4ce8
train
function
def read_colormap(fh, byteorder, dtype, count, offsetsize): """Read ColorMap data from file and return as numpy array.""" cmap = fh.read_array(byteorder + dtype[-1], count) cmap.shape = (3, -1) return cmap
def read_colormap(fh, byteorder, dtype, count, offsetsize):
"""Read ColorMap data from file and return as numpy array.""" cmap = fh.read_array(byteorder + dtype[-1], count) cmap.shape = (3, -1) return cmap
size): """Read tag data from file and return as numpy array.""" dtype = 'b' if dtype[-1] == 's' else byteorder + dtype[-1] return fh.read_array(dtype, count) def read_colormap(fh, byteorder, dtype, count, offsetsize):
64
64
60
17
47
pearcetm/svs-deidentifier
tiffparser.py
Python
read_colormap
read_colormap
6,590
6,594
6,590
6,590
d123211e4832a209795477e179917ed89c2ba239
bigcode/the-stack
train
be629a103c3a45065e9ca151
train
function
def read_mm_stamp(fh, byteorder, dtype, count, offsetsize): """Read FluoView mm_stamp tag from file and return as numpy.ndarray.""" return fh.read_array(byteorder + 'f8', 8)
def read_mm_stamp(fh, byteorder, dtype, count, offsetsize):
"""Read FluoView mm_stamp tag from file and return as numpy.ndarray.""" return fh.read_array(byteorder + 'f8', 8)
Channel'] mmh['GrayChannel'] = ( bytes2str(d[0]).strip(), d[1], d[2], d[3], bytes2str(d[4]).strip()) return mmh def read_mm_stamp(fh, byteorder, dtype, count, offsetsize):
64
64
49
17
46
pearcetm/svs-deidentifier
tiffparser.py
Python
read_mm_stamp
read_mm_stamp
6,619
6,621
6,619
6,619
d237e69aa4db694285d4db1628e182cfde33fe41
bigcode/the-stack
train
b8efa02ba1a42dfc7cf4ac40
train
function
def read_interoperability_ifd(fh, byteorder, dtype, count, offsetsize): """Read Interoperability tags from file and return as dict.""" tag_names = {1: 'InteroperabilityIndex'} return read_tags(fh, byteorder, offsetsize, tag_names, maxifds=1)
def read_interoperability_ifd(fh, byteorder, dtype, count, offsetsize):
"""Read Interoperability tags from file and return as dict.""" tag_names = {1: 'InteroperabilityIndex'} return read_tags(fh, byteorder, offsetsize, tag_names, maxifds=1)
dtype, count, offsetsize): """Read GPS tags from file and return as dict.""" return read_tags(fh, byteorder, offsetsize, TIFF.GPS_TAGS, maxifds=1) def read_interoperability_ifd(fh, byteorder, dtype, count, offsetsize):
64
64
69
20
44
pearcetm/svs-deidentifier
tiffparser.py
Python
read_interoperability_ifd
read_interoperability_ifd
6,561
6,564
6,561
6,561
dad1ec5003659b3bfa9255b3be819f6305d4e1a3
bigcode/the-stack
train
380aba8254bd475498fe2e85
train
function
def reorient(image, orientation): raise TiffParserError('reorient is not supported by TiffParser')
def reorient(image, orientation):
raise TiffParserError('reorient is not supported by TiffParser')
(image, colormap, contig=True): raise TiffParserError('apply_colormap is not supported by TiffParser') def parse_filenames(files, pattern, axesorder=None): raise TiffParserError('parse_filenames is not supported by TiffParser') def reorient(image, orientation):
64
64
24
7
57
pearcetm/svs-deidentifier
tiffparser.py
Python
reorient
reorient
7,837
7,838
7,837
7,837
daa5d45d046e16fa0b3ca2f01c9d5ef88151f209
bigcode/the-stack
train
d877d68ca514113a83fa5043
train
function
def read_sis_ini(fh, byteorder, dtype, count, offsetsize): """Read OlympusSIS INI string and return as dict.""" inistr = fh.read(count) inistr = bytes2str(stripnull(inistr)) try: return olympusini_metadata(inistr) except Exception as exc: log_warning(f'olympusini_metadata: {exc.__cla...
def read_sis_ini(fh, byteorder, dtype, count, offsetsize):
"""Read OlympusSIS INI string and return as dict.""" inistr = fh.read(count) inistr = bytes2str(stripnull(inistr)) try: return olympusini_metadata(inistr) except Exception as exc: log_warning(f'olympusini_metadata: {exc.__class__.__name__}: {exc}') return {}
= emv # result['cameraname2'] = bytes2str(stripnull(camname)) # result['microscopename'] = bytes2str(stripnull(mictype)) return result def read_sis_ini(fh, byteorder, dtype, count, offsetsize):
64
64
94
18
45
pearcetm/svs-deidentifier
tiffparser.py
Python
read_sis_ini
read_sis_ini
6,993
7,001
6,993
6,993
e6ccd0716e342e43c5c55f682d9bdcd05482c02e
bigcode/the-stack
train
107437392a678f93221a432c
train
function
def pformat_xml(xml): """Return pretty formatted XML.""" try: from lxml import etree # delayed import if not isinstance(xml, bytes): xml = xml.encode() xml = etree.parse(io.BytesIO(xml)) xml = etree.tostring(xml, pretty_print=True, xml_declaration=True, ...
def pformat_xml(xml):
"""Return pretty formatted XML.""" try: from lxml import etree # delayed import if not isinstance(xml, bytes): xml = xml.encode() xml = etree.parse(io.BytesIO(xml)) xml = etree.tostring(xml, pretty_print=True, xml_declaration=True, encod...
: for a, b in ( ('\n', ' '), ('[ ', '['), (' ', ' '), (' ', ' '), (' ', ' ') ): string = string.replace(a, b) return string.strip() def pformat_xml(xml):
64
64
131
6
58
pearcetm/svs-deidentifier
tiffparser.py
Python
pformat_xml
pformat_xml
8,287
8,302
8,287
8,287
d67a80d65b245ad1c4fddd35f943e933bd7afe7c
bigcode/the-stack
train
cbc0b5ccb129a39d4f5d364e
train
function
def read_tvips_header(fh, byteorder, dtype, count, offsetsize): """Read TVIPS EM-MENU headers and return as dict.""" result = {} header = fh.read_record(TIFF.TVIPS_HEADER_V1, byteorder=byteorder) for name, typestr in TIFF.TVIPS_HEADER_V1: result[name] = header[name].tolist() if header['Versi...
def read_tvips_header(fh, byteorder, dtype, count, offsetsize):
"""Read TVIPS EM-MENU headers and return as dict.""" result = {} header = fh.read_record(TIFF.TVIPS_HEADER_V1, byteorder=byteorder) for name, typestr in TIFF.TVIPS_HEADER_V1: result[name] = header[name].tolist() if header['Version'] == 2: header = fh.read_record(TIFF.TVIPS_HEADER_V2,...
string and return as dict.""" inistr = fh.read(count) inistr = bytes2str(stripnull(inistr)) try: return olympusini_metadata(inistr) except Exception as exc: log_warning(f'olympusini_metadata: {exc.__class__.__name__}: {exc}') return {} def read_tvips_header(fh, byteorder, dtype,...
86
87
292
18
68
pearcetm/svs-deidentifier
tiffparser.py
Python
read_tvips_header
read_tvips_header
7,004
7,029
7,004
7,004
891042a9665b7a202b462591d6544440f4c8a745
bigcode/the-stack
train
cae90cc849f47208767b8b46
train
function
def read_nih_image_header(fh, byteorder, dtype, count, offsetsize): """Read NIH_IMAGE_HEADER tag from file and return as dict.""" a = fh.read_record(TIFF.NIH_IMAGE_HEADER, byteorder=byteorder) a = a.newbyteorder(byteorder) a = recarray2dict(a) a['XUnit'] = a['XUnit'][:a['XUnitSize']] a['UM'] = a...
def read_nih_image_header(fh, byteorder, dtype, count, offsetsize):
"""Read NIH_IMAGE_HEADER tag from file and return as dict.""" a = fh.read_record(TIFF.NIH_IMAGE_HEADER, byteorder=byteorder) a = a.newbyteorder(byteorder) a = recarray2dict(a) a['XUnit'] = a['XUnit'][:a['XUnitSize']] a['UM'] = a['UM'][:a['UMsize']] return a
(name.strip(), value) if unit: result[key] += (unit,) key = None else: result[''] += (astype(line, (int, float)),) return result def read_nih_image_header(fh, byteorder, dtype, count, offsetsize):
64
64
110
19
44
pearcetm/svs-deidentifier
tiffparser.py
Python
read_nih_image_header
read_nih_image_header
7,097
7,104
7,097
7,097
a2deb99c51fee36ada772633392d171877731601
bigcode/the-stack
train
a74d3a5c5f6d3385f002aa78
train
function
def scanimage_description_metadata(description): """Return metatata from ScanImage image description as dict.""" return matlabstr2py(description)
def scanimage_description_metadata(description):
"""Return metatata from ScanImage image description as dict.""" return matlabstr2py(description)
else: result[i] = v return result adict = parse(root, {}) if 'Description' in adict: adict['Description'] = adict['Description'].replace('&#13;&#10;', '\n') return adict def scanimage_description_metadata(description):
64
64
29
7
56
pearcetm/svs-deidentifier
tiffparser.py
Python
scanimage_description_metadata
scanimage_description_metadata
7,708
7,710
7,708
7,708
e8f94226f597714e96ad74046e5601d4086f2e9e
bigcode/the-stack
train
acacc1b49389bdfbe580bbfe
train
function
def stk_description_metadata(description): """Return metadata from MetaMorph image description as list of dict. The MetaMorph image description format is unspecified. Expect failures. """ description = description.strip() if not description: return [] try: description = bytes2s...
def stk_description_metadata(description):
"""Return metadata from MetaMorph image description as list of dict. The MetaMorph image description format is unspecified. Expect failures. """ description = description.strip() if not description: return [] try: description = bytes2str(description) except UnicodeDecodeErr...
[1].split('|') result[''] = items[0].strip() # TODO: parse this? for item in items[1:]: key, value = item.split(' = ') result[key.strip()] = astype(value.strip()) return result def stk_description_metadata(description):
64
64
209
6
57
pearcetm/svs-deidentifier
tiffparser.py
Python
stk_description_metadata
stk_description_metadata
7,636
7,668
7,636
7,636
c4014e28706bef3e9431d4e7c8425f51c181a186
bigcode/the-stack
train
c5172546e678e1cb8a873410
train
function
def xml2dict(xml, sanitize=True, prefix=None): """Return XML as dict. >>> xml2dict('<?xml version="1.0" ?><root attr="name"><key>1</key></root>') {'root': {'key': 1, 'attr': 'name'}} >>> xml2dict('<level1><level2>3.5322</level2></level1>') {'level1': {'level2': 3.5322}} """ from xml.etree ...
def xml2dict(xml, sanitize=True, prefix=None):
"""Return XML as dict. >>> xml2dict('<?xml version="1.0" ?><root attr="name"><key>1</key></root>') {'root': {'key': 1, 'attr': 'name'}} >>> xml2dict('<level1><level2>3.5322</level2></level1>') {'level1': {'level2': 3.5322}} """ from xml.etree import cElementTree as etree # delayed import ...
little': '<'} return keys.get(byteorder, byteorder) == keys[sys.byteorder] def recarray2dict(recarray): """Return numpy.recarray as dict.""" # TODO: subarrays result = {} for descr, value in zip(recarray.dtype.descr, recarray): name, dtype = descr[:2] if dtype[1] == 'S': ...
132
132
440
12
119
pearcetm/svs-deidentifier
tiffparser.py
Python
xml2dict
xml2dict
8,114
8,165
8,114
8,114
f8cf3bb990e6cddbb286ec51392d8d663a874024
bigcode/the-stack
train
1649e8f1066f592ccc764526
train
function
def read_scanimage_metadata(fh): """Read ScanImage BigTIFF v3 static and ROI metadata from open file. Return non-varying frame data as dict and ROI group data as JSON. The settings can be used to read image data and metadata without parsing the TIFF file. Raise ValueError if file does not contain...
def read_scanimage_metadata(fh):
"""Read ScanImage BigTIFF v3 static and ROI metadata from open file. Return non-varying frame data as dict and ROI group data as JSON. The settings can be used to read image data and metadata without parsing the TIFF file. Raise ValueError if file does not contain valid ScanImage v3 metadata. ...
, byteorder=byteorder) a = a.newbyteorder(byteorder) a = recarray2dict(a) a['XUnit'] = a['XUnit'][:a['XUnitSize']] a['UM'] = a['UM'][:a['UMsize']] return a def read_scanimage_metadata(fh):
73
73
246
8
64
pearcetm/svs-deidentifier
tiffparser.py
Python
read_scanimage_metadata
read_scanimage_metadata
7,107
7,132
7,107
7,107
4ae1a6a81bbebccf47c5ea633a2ce390914ecf95
bigcode/the-stack
train
25e1a9b09814f4d505f03f50
train
class
class NullContext: """Null context manager. >>> with NullContext(): ... pass """ __slots = () def __enter__(self): return self def __exit__(self, exc_type, exc_value, traceback): pass
class NullContext:
"""Null context manager. >>> with NullContext(): ... pass """ __slots = () def __enter__(self): return self def __exit__(self, exc_type, exc_value, traceback): pass
@property def closed(self): return self._fh is None @property def lock(self): return self._lock @lock.setter def lock(self, value): self._lock = threading.RLock() if value else NullContext() class NullContext:
64
64
57
4
60
pearcetm/svs-deidentifier
tiffparser.py
Python
NullContext
NullContext
4,005
4,019
4,005
4,005
ce0b64ab15e9173c7d938bc3473e78a687ecf247
bigcode/the-stack
train
b57b9e4e914dd438335853a3
train
function
def read_uic4tag(fh, byteorder, dtype, planecount, offsetsize): """Read MetaMorph STK UIC4Tag from file and return as dict.""" if dtype != '1I' or byteorder != '<': raise ValueError('invalid UIC4Tag') result = {} while True: tagid = struct.unpack('<H', fh.read(2))[0] if tagid == ...
def read_uic4tag(fh, byteorder, dtype, planecount, offsetsize):
"""Read MetaMorph STK UIC4Tag from file and return as dict.""" if dtype != '1I' or byteorder != '<': raise ValueError('invalid UIC4Tag') result = {} while True: tagid = struct.unpack('<H', fh.read(2))[0] if tagid == 0: break name, value = read_uic_tag(fh, tagi...
values = fh.read_array('<u4', 2 * planecount).reshape(planecount, 2) return {'Wavelengths': values[:, 0] / values[:, 1]} def read_uic4tag(fh, byteorder, dtype, planecount, offsetsize):
63
64
132
21
42
pearcetm/svs-deidentifier
tiffparser.py
Python
read_uic4tag
read_uic4tag
6,671
6,682
6,671
6,671
7388cb1a850428e4fa5bcc26fa341b53af723988
bigcode/the-stack
train
680d2e80ebf9e2d4ef3e7d22
train
class
class OpenFileCache: """Keep files open.""" __slots__ = ('files', 'past', 'lock', 'size') def __init__(self, size, lock=None): """Initialize open file cache.""" self.past = [] # FIFO of opened files self.files = {} # refcounts of opened files self.lock = NullContext() if ...
class OpenFileCache:
"""Keep files open.""" __slots__ = ('files', 'past', 'lock', 'size') def __init__(self, size, lock=None): """Initialize open file cache.""" self.past = [] # FIFO of opened files self.files = {} # refcounts of opened files self.lock = NullContext() if lock is None else loc...
None @property def lock(self): return self._lock @lock.setter def lock(self, value): self._lock = threading.RLock() if value else NullContext() class NullContext: """Null context manager. >>> with NullContext(): ... pass """ __slots = () def __enter__...
106
106
356
5
100
pearcetm/svs-deidentifier
tiffparser.py
Python
OpenFileCache
OpenFileCache
4,022
4,069
4,022
4,022
424c4603bfbd21192a5043bc5263889e6c020d0c
bigcode/the-stack
train
5a829d89d61926b3196870b1
train
function
def read_uic3tag(fh, byteorder, dtype, planecount, offsetsize): """Read MetaMorph STK UIC3Tag from file and return as dict.""" if dtype != '2I' or byteorder != '<': raise ValueError('invalid UIC3Tag') values = fh.read_array('<u4', 2 * planecount).reshape(planecount, 2) return {'Wavelengths': val...
def read_uic3tag(fh, byteorder, dtype, planecount, offsetsize):
"""Read MetaMorph STK UIC3Tag from file and return as dict.""" if dtype != '2I' or byteorder != '<': raise ValueError('invalid UIC3Tag') values = fh.read_array('<u4', 2 * planecount).reshape(planecount, 2) return {'Wavelengths': values[:, 0] / values[:, 1]}
Created': values[:, 3], # milliseconds 'DateModified': values[:, 4], # julian days 'TimeModified': values[:, 5], # milliseconds } def read_uic3tag(fh, byteorder, dtype, planecount, offsetsize):
64
64
107
21
43
pearcetm/svs-deidentifier
tiffparser.py
Python
read_uic3tag
read_uic3tag
6,663
6,668
6,663
6,663
5833811007cf5924b7b999f81cc62095fe266cf3
bigcode/the-stack
train
9c29644033c1b79f1817b13b
train
class
class FileHandle: """Binary file handle. A limited, special purpose file handle that can: * handle embedded files (for CZI within CZI files) * re-open closed files (for multi-file formats, such as OME-TIFF) * read and write numpy arrays and records from file like objects Only 'rb' and 'wb' mo...
class FileHandle:
"""Binary file handle. A limited, special purpose file handle that can: * handle embedded files (for CZI within CZI files) * re-open closed files (for multi-file formats, such as OME-TIFF) * read and write numpy arrays and records from file like objects Only 'rb' and 'wb' modes are supported....
= self.fromfile(fname, **kwargs) result[index] = im if len(self.files) < 3: ioworkers = 1 elif ioworkers is None or ioworkers < 1: import multiprocessing ioworkers = max(multiprocessing.cpu_count() * 5, 1) if ioworkers < 2: for index...
256
256
1,933
4
252
pearcetm/svs-deidentifier
tiffparser.py
Python
FileHandle
FileHandle
3,743
4,002
3,743
3,743
f061fff8f461a960666b1b8aa69498b6fa0639d6
bigcode/the-stack
train
b6cdcafdbf0289ab4eb7cb20
train
function
def read_metaseries_catalog(fh): """Read MetaSeries non-TIFF hint catalog from file. Raise ValueError if the file does not contain a valid hint catalog. """ # TODO: implement read_metaseries_catalog raise NotImplementedError()
def read_metaseries_catalog(fh):
"""Read MetaSeries non-TIFF hint catalog from file. Raise ValueError if the file does not contain a valid hint catalog. """ # TODO: implement read_metaseries_catalog raise NotImplementedError()
(byteorder + 'II', fh.read(8)) if header != 84720485: raise ValueError('invalid MicroManager comments header') result['Comments'] = read_json(fh, byteorder, None, count, None) return result def read_metaseries_catalog(fh):
64
64
56
9
54
pearcetm/svs-deidentifier
tiffparser.py
Python
read_metaseries_catalog
read_metaseries_catalog
7,200
7,207
7,200
7,200
5e4c74b07fd3025cedc779984d948abcb799782d
bigcode/the-stack
train
59776c6ca32c5b4bf94febf9
train
class
class TiffFileError(Exception): """Exception to indicate invalid TIFF structure."""
class TiffFileError(Exception):
"""Exception to indicate invalid TIFF structure."""
try: value = self.func(instance) except AttributeError as exc: raise RuntimeError(exc) if value is NotImplemented: return getattr(super(owner, instance), self.func.__name__) setattr(instance, self.func.__name__, value) return value class TiffFileError(Exception):
64
64
16
7
56
pearcetm/svs-deidentifier
tiffparser.py
Python
TiffFileError
TiffFileError
210
211
210
210
0e4886d58a2b805aa49d7c84a26262757d9c047e
bigcode/the-stack
train
7d16d36bd2063e5dbe754113
train
class
class TiffPages: """Sequence of TIFF image file directories (IFD chain). Instances of TiffPages have a state (cache, keyframe, etc.) and are not thread-safe. """ def __init__(self, parent): """Initialize instance and read first TiffPage from file. If parent is a TiffFile, the fil...
class TiffPages:
"""Sequence of TIFF image file directories (IFD chain). Instances of TiffPages have a state (cache, keyframe, etc.) and are not thread-safe. """ def __init__(self, parent): """Initialize instance and read first TiffPage from file. If parent is a TiffFile, the file position must b...
romanager: return None # from file header result = read_micromanager_metadata(self._fh) # from MicroManagerMetadata tag result.update(self.pages[0].tags[51123].value) return result @lazyattr def scanimage_metadata(self): """Return ScanImage non-varyin...
256
256
3,134
5
250
pearcetm/svs-deidentifier
tiffparser.py
Python
TiffPages
TiffPages
1,456
1,859
1,456
1,456
9bca19928358bc53fbb9fd94be568f79bef5aa2f
bigcode/the-stack
train
ca814334dbc406efb0f1415d
train
function
def create_output(out, shape, dtype, mode='w+', suffix=None): raise TiffParserError('create_output is not supported by TiffParser')
def create_output(out, shape, dtype, mode='w+', suffix=None):
raise TiffParserError('create_output is not supported by TiffParser')
ParserError('reshape_axes is not supported by TiffParser') def stack_pages(pages, out=None, maxworkers=None, **kwargs): raise TiffParserError('stack_pages is not supported by TiffParser') def create_output(out, shape, dtype, mode='w+', suffix=None):
63
64
33
16
47
pearcetm/svs-deidentifier
tiffparser.py
Python
create_output
create_output
7,870
7,871
7,870
7,870
e7b0c13faba5ae8cfc688dceee645202393e94a9
bigcode/the-stack
train
2b4b47de7bb810e9da3b6389
train
function
def stripnull(string, null=b'\x00'): """Return string truncated at first null character. Clean NULL terminated C strings. For unicode strings use null='\\0'. >>> stripnull(b'string\\x00') b'string' >>> stripnull('string\\x00', null='\\0') 'string' """ i = string.find(null) return ...
def stripnull(string, null=b'\x00'):
"""Return string truncated at first null character. Clean NULL terminated C strings. For unicode strings use null='\\0'. >>> stripnull(b'string\\x00') b'string' >>> stripnull('string\\x00', null='\\0') 'string' """ i = string.find(null) return string if (i < 0) else string[:i]
dtype, mode='w+', suffix=None): raise TiffParserError('create_output is not supported by TiffParser') def matlabstr2py(string): raise TiffParserError('matlabstr2py is not supported by TiffParser') def stripnull(string, null=b'\x00'):
64
64
96
11
53
pearcetm/svs-deidentifier
tiffparser.py
Python
stripnull
stripnull
7,878
7,890
7,878
7,878
f1440c82736753476806beb10a783c13e3854541
bigcode/the-stack
train
a330ed34cc848cabefad9a97
train
function
def stripascii(string): """Return string truncated at last byte that is 7-bit ASCII. Clean NULL separated and terminated TIFF strings. >>> stripascii(b'string\\x00string\\n\\x01\\x00') b'string\\x00string\\n' >>> stripascii(b'\\x00') b'' """ # TODO: pythonize this i = len(string) ...
def stripascii(string):
"""Return string truncated at last byte that is 7-bit ASCII. Clean NULL separated and terminated TIFF strings. >>> stripascii(b'string\\x00string\\n\\x01\\x00') b'string\\x00string\\n' >>> stripascii(b'\\x00') b'' """ # TODO: pythonize this i = len(string) while i: i -...
>>> stripnull(b'string\\x00') b'string' >>> stripnull('string\\x00', null='\\0') 'string' """ i = string.find(null) return string if (i < 0) else string[:i] def stripascii(string):
64
64
133
5
59
pearcetm/svs-deidentifier
tiffparser.py
Python
stripascii
stripascii
7,893
7,912
7,893
7,893
37be9784d74b715a30e5690eb08569d292335a45
bigcode/the-stack
train
1205a31bb28e55f3c9274cc2
train
class
class TiffTag: """TIFF tag structure. Attributes ---------- name : string Name of tag, TIFF.TAGS[code]. code : int Decimal code of tag. dtype : str Datatype of tag data. One of TIFF DATA_FORMATS. count : int Number of values. value : various types ...
class TiffTag:
"""TIFF tag structure. Attributes ---------- name : string Name of tag, TIFF.TAGS[code]. code : int Decimal code of tag. dtype : str Datatype of tag data. One of TIFF DATA_FORMATS. count : int Number of values. value : various types Tag data as Py...
this error could be raised because an AttributeError was # raised inside a @property function raise AttributeError( f'{self.__class__.__name__!r} object has no attribute {name!r}' ) def __str__(self, detail=0, width=79): """Return string containing information about Tif...
255
256
1,238
5
250
pearcetm/svs-deidentifier
tiffparser.py
Python
TiffTag
TiffTag
3,038
3,182
3,038
3,038
4ee04fc3514e770dc017fd8d67213e23d1a6aeb9
bigcode/the-stack
train
999cec8d4df30e9198e09cdd
train
function
def apply_colormap(image, colormap, contig=True): raise TiffParserError('apply_colormap is not supported by TiffParser')
def apply_colormap(image, colormap, contig=True):
raise TiffParserError('apply_colormap is not supported by TiffParser')
numpy.array(band['LUT'], 'uint8') return result def unpack_rgb(data, dtype=None, bitspersample=None, rescale=True): raise TiffParserError('unpack_rgb is not supported by TiffParser') def apply_colormap(image, colormap, contig=True):
64
64
31
13
51
pearcetm/svs-deidentifier
tiffparser.py
Python
apply_colormap
apply_colormap
7,830
7,831
7,830
7,830
ea225f7bbf7e5cee24c6bc4e548ed6a6db2d568c
bigcode/the-stack
train
7955e91bb557fde232daf874
train
function
def repeat_nd(a, repeats): raise TiffParserError('repeat_nd is not supported by TiffParser')
def repeat_nd(a, repeats):
raise TiffParserError('repeat_nd is not supported by TiffParser')
iffParser') def parse_filenames(files, pattern, axesorder=None): raise TiffParserError('parse_filenames is not supported by TiffParser') def reorient(image, orientation): raise TiffParserError('reorient is not supported by TiffParser') def repeat_nd(a, repeats):
64
64
24
7
57
pearcetm/svs-deidentifier
tiffparser.py
Python
repeat_nd
repeat_nd
7,841
7,842
7,841
7,841
c397a09b60b3fee9145011984da0cff777727468
bigcode/the-stack
train