100+ results for 'namedtuple _source'
Not the results you expected?
expectations.py (https://github.com/chromium/chromium.git) Python · 127 lines
PredictingPlayer.py (https://github.com/submitteddenied/planetwars.git) Python · 251 lines
5 '''
6 from BasePlayer import BasePlayer
7 from collections import namedtuple, deque
9 class PredictingPlayer(BasePlayer):
141 continue
142 strength = 0
143 best_source = self.best_source(planet, pw)
144 if best_source is None:
151 target_strength = strength
152 if strength == target_strength:
153 other_source = self.best_source(target, pw)
154 if other_source is None or best_source is None:
155 continue
156 if other_source.DistanceTo(target) < best_source.DistanceTo(planet):
157 target = planet
158 target_strength = strength
__init__.py (https://gitlab.com/dialogue/wsgiauth0) Python · 252 lines
rttddft.py (https://gitlab.com/5rXUTAIYJSBcdxFmjqpuwaPo71b283/gpaw) Python · 138 lines
ConstraintLocator.cpp (https://gitlab.com/dwiktor/swift) C++ · 240 lines
mouse.rst (https://github.com/smathot/psychopy.git) ReStructuredText · 59 lines
28 .. autoclass:: psychopy.iohub.devices.mouse.MouseInputEvent
29 :exclude-members: DEVICE_ID_INDEX, filter_id, device_id, NUMPY_DTYPE, BASE_EVENT_MAX_ATTRIBUTE_INDEX, CLASS_ATTRIBUTE_NAMES, EVENT_CONFIDENCE_INTERVAL_INDEX, EVENT_DELAY_INDEX, EVENT_DEVICE_TIME_INDEX, EVENT_EXPERIMENT_ID_INDEX, EVENT_FILTER_ID_INDEX, EVENT_HUB_TIME_INDEX, EVENT_ID_INDEX, EVENT_LOGGED_TIME_INDEX, EVENT_SESSION_ID_INDEX, EVENT_TYPE_ID, EVENT_TYPE_ID_INDEX, EVENT_TYPE_STRING, IOHUB_DATA_TABLE, PARENT_DEVICE, createEventAsClass, createEventAsDict, createEventAsNamedTuple, e, namedTupleClass
30 :member-order: bysource
32 .. autoclass:: psychopy.iohub.devices.mouse.MouseMoveEvent
33 :exclude-members: DEVICE_ID_INDEX, filter_id, device_id, NUMPY_DTYPE, BASE_EVENT_MAX_ATTRIBUTE_INDEX, CLASS_ATTRIBUTE_NAMES, EVENT_CONFIDENCE_INTERVAL_INDEX, EVENT_DELAY_INDEX, EVENT_DEVICE_TIME_INDEX, EVENT_EXPERIMENT_ID_INDEX, EVENT_FILTER_ID_INDEX, EVENT_HUB_TIME_INDEX, EVENT_ID_INDEX, EVENT_LOGGED_TIME_INDEX, EVENT_SESSION_ID_INDEX, EVENT_TYPE_ID, EVENT_TYPE_ID_INDEX, EVENT_TYPE_STRING, IOHUB_DATA_TABLE, PARENT_DEVICE, createEventAsClass, createEventAsDict, createEventAsNamedTuple, e, namedTupleClass
34 :member-order: bysource
36 .. autoclass:: psychopy.iohub.devices.mouse.MouseDragEvent
37 :exclude-members: DEVICE_ID_INDEX, filter_id, device_id, NUMPY_DTYPE, BASE_EVENT_MAX_ATTRIBUTE_INDEX, CLASS_ATTRIBUTE_NAMES, EVENT_CONFIDENCE_INTERVAL_INDEX, EVENT_DELAY_INDEX, EVENT_DEVICE_TIME_INDEX, EVENT_EXPERIMENT_ID_INDEX, EVENT_FILTER_ID_INDEX, EVENT_HUB_TIME_INDEX, EVENT_ID_INDEX, EVENT_LOGGED_TIME_INDEX, EVENT_SESSION_ID_INDEX, EVENT_TYPE_ID, EVENT_TYPE_ID_INDEX, EVENT_TYPE_STRING, IOHUB_DATA_TABLE, PARENT_DEVICE, createEventAsClass, createEventAsDict, createEventAsNamedTuple, e, namedTupleClass
38 :member-order: bysource
tagger.py (https://github.com/tomob/hyde.git) Python · 183 lines
parserll.py (https://github.com/tfviv79/junk.git) Python · 272 lines
sources.py (https://github.com/briot/geneapro.git) Python · 158 lines
13 CitationDetails = collections.namedtuple(
14 'CitationDetails', 'name value fromHigh')
42 sources=self.sources.values()) # Do not fetch them again
44 def fetch_higher_sources(self):
45 """
46 Fetch the 'higher' source relationships. This only gets the ids
49 return # already computed
51 logger.debug('SourceSet.fetch_higher_sources')
52 with django.db.connection.cursor() as cur:
53 ids = ", ".join(str(k) for k in self.sources.keys())
datatraces.py (https://gitlab.com/admin-github-cloud/jalangi2) Python · 177 lines
save_workspace.py (https://github.com/mantidproject/mantid.git) Python · 125 lines
5 # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6 # SPDX - License - Identifier: GPL - 3.0 +
7 from collections import namedtuple
8 from mantid.api import MatrixWorkspace
9 from mantid.dataobjects import EventWorkspace
15 ZERO_ERROR_DEFAULT = 1e6
17 file_format_with_append = namedtuple('file_format_with_append', 'file_format, append_file_format_name')
mouse.rst (https://gitlab.com/braintech/psychopy-brain) ReStructuredText · 348 lines
kpointsdata.py (https://github.com/mantidproject/mantid.git) Python · 163 lines
makedeps.py (https://github.com/shkolnik/HandBrake.git) Python · 116 lines
4 import plistlib
6 DepEntry = collections.namedtuple('DepEntry', 'widget dep enable die hide')
7 dep_map = (
8 DepEntry("title", "queue_add", "none", True, False),
68 DepEntry("x264_subme", "x264_psy_trell", "<6", True, False),
69 DepEntry("x264_trellis", "x264_psy_trell", "0", True, False),
70 DepEntry("use_source_name", "chapters_in_destination", "TRUE", False, False),
71 DepEntry("use_source_name", "title_no_in_destination", "TRUE", False, False),
build_api_test.py (https://github.com/adamgreen/gcc4mbed.git) Python · 225 lines
18 import unittest
19 from collections import namedtuple
20 from mock import patch, MagicMock
21 from tools.build_api import prepare_toolchain, build_project, build_library,\
67 toolchain.config_processed = True
68 toolchain.config_file = "junk"
69 toolchain.compile_sources(res)
71 assert any('percent' in msg[0] and msg[0]['percent'] == 100.0
82 """
83 app_config = "app_config"
84 mock_target = namedtuple("Target",
85 "init_hooks name features core")(lambda _, __ : None,
86 "Junk", [], "Cortex-M3")
subprocess.py (https://gitlab.com/frabad/garden) Python · 167 lines
_compat.py (https://github.com/rillian/firefox.git) Python · 189 lines
TypeVisitor.js (https://gitlab.com/nguyenthehiep3232/marius) JavaScript · 222 lines
deprecated.py (https://github.com/shoaibkamil/kdt-specializer.git) Python · 144 lines
apply_fixits.py (https://github.com/chromium/chromium.git) Python · 87 lines
kinds.d.ts (https://gitlab.com/varunsonavne/node-hello) TypeScript Typings · 264 lines
1 import { namedTypes } from "./namedTypes";
2 export declare type PrintableKind = namedTypes.File | namedTypes.Program | namedTypes.Identifier | namedTypes.BlockStatement | namedTypes.EmptyStatement | namedTypes.ExpressionStatement | namedTypes.IfStatement | namedTypes.LabeledStatement | namedTypes.BreakStatement | namedTypes.ContinueStatement | namedTypes.WithStatement | namedTypes.SwitchStatement | namedTypes.SwitchCase | namedTypes.ReturnStatement | namedTypes.ThrowStatement | namedTypes.TryStatement | namedTypes.CatchClause | namedTypes.WhileStatement | namedTypes.DoWhileStatement | namedTypes.ForStatement | namedTypes.VariableDeclaration | namedTypes.ForInStatement | namedTypes.DebuggerStatement | namedTypes.FunctionDeclaration | namedTypes.FunctionExpression | namedTypes.VariableDeclarator | namedTypes.ThisExpression | namedTypes.ArrayExpression | namedTypes.ObjectExpression | namedTypes.Property | namedTypes.Literal | namedTypes.SequenceExpression | namedTypes.UnaryExpression | namedTypes.BinaryExpression | namedTypes.AssignmentExpression | namedTypes.MemberExpression | namedTypes.UpdateExpression | namedTypes.LogicalExpression | namedTypes.ConditionalExpression | namedTypes.NewExpression | namedTypes.CallExpression | namedTypes.RestElement | namedTypes.TypeAnnotation | namedTypes.TSTypeAnnotation | namedTypes.SpreadElementPattern | namedTypes.ArrowFunctionExpression | namedTypes.ForOfStatement | namedTypes.YieldExpression | namedTypes.GeneratorExpression | namedTypes.ComprehensionBlock | namedTypes.ComprehensionExpression | namedTypes.ObjectProperty | namedTypes.PropertyPattern | namedTypes.ObjectPattern | namedTypes.ArrayPattern | namedTypes.MethodDefinition | namedTypes.SpreadElement | namedTypes.AssignmentPattern | namedTypes.ClassPropertyDefinition | namedTypes.ClassProperty | namedTypes.ClassBody | namedTypes.ClassDeclaration | namedTypes.ClassExpression | namedTypes.ImportSpecifier | namedTypes.ImportNamespaceSpecifier | namedTypes.ImportDefaultSpecifier | namedTypes.ImportDeclaration | namedTypes.TaggedTemplateExpression | namedTypes.TemplateLiteral | namedTypes.TemplateElement | namedTypes.SpreadProperty | namedTypes.SpreadPropertyPattern | namedTypes.AwaitExpression | namedTypes.ImportExpression | namedTypes.JSXAttribute | namedTypes.JSXIdentifier | namedTypes.JSXNamespacedName | namedTypes.JSXExpressionContainer | namedTypes.JSXMemberExpression | namedTypes.JSXSpreadAttribute | namedTypes.JSXElement | namedTypes.JSXOpeningElement | namedTypes.JSXClosingElement | namedTypes.JSXFragment | namedTypes.JSXText | namedTypes.JSXOpeningFragment | namedTypes.JSXClosingFragment | namedTypes.JSXEmptyExpression | namedTypes.JSXSpreadChild | namedTypes.TypeParameterDeclaration | namedTypes.TSTypeParameterDeclaration | namedTypes.TypeParameterInstantiation | namedTypes.TSTypeParameterInstantiation | namedTypes.ClassImplements | namedTypes.TSExpressionWithTypeArguments | namedTypes.AnyTypeAnnotation | namedTypes.EmptyTypeAnnotation | namedTypes.MixedTypeAnnotation | namedTypes.VoidTypeAnnotation | namedTypes.NumberTypeAnnotation | namedTypes.NumberLiteralTypeAnnotation | namedTypes.NumericLiteralTypeAnnotation | namedTypes.StringTypeAnnotation | namedTypes.StringLiteralTypeAnnotation | namedTypes.BooleanTypeAnnotation | namedTypes.BooleanLiteralTypeAnnotation | namedTypes.NullableTypeAnnotation | namedTypes.NullLiteralTypeAnnotation | namedTypes.NullTypeAnnotation | namedTypes.ThisTypeAnnotation | namedTypes.ExistsTypeAnnotation | namedTypes.ExistentialTypeParam | namedTypes.FunctionTypeAnnotation | namedTypes.FunctionTypeParam | namedTypes.ArrayTypeAnnotation | namedTypes.ObjectTypeAnnotation | namedTypes.ObjectTypeProperty | namedTypes.ObjectTypeSpreadProperty | namedTypes.ObjectTypeIndexer | namedTypes.ObjectTypeCallProperty | namedTypes.ObjectTypeInternalSlot | namedTypes.Variance | namedTypes.QualifiedTypeIdentifier | namedTypes.GenericTypeAnnotation | namedTypes.MemberTypeAnnotation | namedTypes.UnionTypeAnnotation | namedTypes.IntersectionTypeAnnotation | namedTypes.TypeofTypeAnnotation | namedTypes.TypeParameter | namedTypes.InterfaceTypeAnnotation | namedTypes.InterfaceExtends | namedTypes.InterfaceDeclaration | namedTypes.DeclareInterface | namedTypes.TypeAlias | namedTypes.OpaqueType | namedTypes.DeclareTypeAlias | namedTypes.DeclareOpaqueType | namedTypes.TypeCastExpression | namedTypes.TupleTypeAnnotation | namedTypes.DeclareVariable | namedTypes.DeclareFunction | namedTypes.DeclareClass | namedTypes.DeclareModule | namedTypes.DeclareModuleExports | namedTypes.DeclareExportDeclaration | namedTypes.ExportSpecifier | namedTypes.ExportBatchSpecifier | namedTypes.DeclareExportAllDeclaration | namedTypes.InferredPredicate | namedTypes.DeclaredPredicate | namedTypes.ExportDeclaration | namedTypes.Block | namedTypes.Line | namedTypes.Noop | namedTypes.DoExpression | namedTypes.Super | namedTypes.BindExpression | namedTypes.Decorator | namedTypes.MetaProperty | namedTypes.ParenthesizedExpression | namedTypes.ExportDefaultDeclaration | namedTypes.ExportNamedDeclaration | namedTypes.ExportNamespaceSpecifier | namedTypes.ExportDefaultSpecifier | namedTypes.ExportAllDeclaration | namedTypes.CommentBlock | namedTypes.CommentLine | namedTypes.Directive | namedTypes.DirectiveLiteral | namedTypes.InterpreterDirective | namedTypes.StringLiteral | namedTypes.NumericLiteral | namedTypes.BigIntLiteral | namedTypes.NullLiteral | namedTypes.BooleanLiteral | namedTypes.RegExpLiteral | namedTypes.ObjectMethod | namedTypes.ClassPrivateProperty | namedTypes.ClassMethod | namedTypes.ClassPrivateMethod | namedTypes.PrivateName | namedTypes.RestProperty | namedTypes.ForAwaitStatement | namedTypes.Import | namedTypes.TSQualifiedName | namedTypes.TSTypeReference | namedTypes.TSAsExpression | namedTypes.TSNonNullExpression | namedTypes.TSAnyKeyword | namedTypes.TSBigIntKeyword | namedTypes.TSBooleanKeyword | namedTypes.TSNeverKeyword | namedTypes.TSNullKeyword | namedTypes.TSNumberKeyword | namedTypes.TSObjectKeyword | namedTypes.TSStringKeyword | namedTypes.TSSymbolKeyword | namedTypes.TSUndefinedKeyword | namedTypes.TSUnknownKeyword | namedTypes.TSVoidKeyword | namedTypes.TSThisType | namedTypes.TSArrayType | namedTypes.TSLiteralType | namedTypes.TSUnionType | namedTypes.TSIntersectionType | namedTypes.TSConditionalType | namedTypes.TSInferType | namedTypes.TSTypeParameter | namedTypes.TSParenthesizedType | namedTypes.TSFunctionType | namedTypes.TSConstructorType | namedTypes.TSDeclareFunction | namedTypes.TSDeclareMethod | namedTypes.TSMappedType | namedTypes.TSTupleType | namedTypes.TSNamedTupleMember | namedTypes.TSRestType | namedTypes.TSOptionalType | namedTypes.TSIndexedAccessType | namedTypes.TSTypeOperator | namedTypes.TSIndexSignature | namedTypes.TSPropertySignature | namedTypes.TSMethodSignature | namedTypes.TSTypePredicate | namedTypes.TSCallSignatureDeclaration | namedTypes.TSConstructSignatureDeclaration | namedTypes.TSEnumMember | namedTypes.TSTypeQuery | namedTypes.TSImportType | namedTypes.TSTypeLiteral | namedTypes.TSTypeAssertion | namedTypes.TSEnumDeclaration | namedTypes.TSTypeAliasDeclaration | namedTypes.TSModuleBlock | namedTypes.TSModuleDeclaration | namedTypes.TSImportEqualsDeclaration | namedTypes.TSExternalModuleReference | namedTypes.TSExportAssignment | namedTypes.TSNamespaceExportDeclaration | namedTypes.TSInterfaceBody | namedTypes.TSInterfaceDeclaration | namedTypes.TSParameterProperty | namedTypes.OptionalMemberExpression | namedTypes.OptionalCallExpression;
3 export declare type SourceLocationKind = namedTypes.SourceLocation;
4 export declare type NodeKind = namedTypes.File | namedTypes.Program | namedTypes.Identifier | namedTypes.BlockStatement | namedTypes.EmptyStatement | namedTypes.ExpressionStatement | namedTypes.IfStatement | namedTypes.LabeledStatement | namedTypes.BreakStatement | namedTypes.ContinueStatement | namedTypes.WithStatement | namedTypes.SwitchStatement | namedTypes.SwitchCase | namedTypes.ReturnStatement | namedTypes.ThrowStatement | namedTypes.TryStatement | namedTypes.CatchClause | namedTypes.WhileStatement | namedTypes.DoWhileStatement | namedTypes.ForStatement | namedTypes.VariableDeclaration | namedTypes.ForInStatement | namedTypes.DebuggerStatement | namedTypes.FunctionDeclaration | namedTypes.FunctionExpression | namedTypes.VariableDeclarator | namedTypes.ThisExpression | namedTypes.ArrayExpression | namedTypes.ObjectExpression | namedTypes.Property | namedTypes.Literal | namedTypes.SequenceExpression | namedTypes.UnaryExpression | namedTypes.BinaryExpression | namedTypes.AssignmentExpression | namedTypes.MemberExpression | namedTypes.UpdateExpression | namedTypes.LogicalExpression | namedTypes.ConditionalExpression | namedTypes.NewExpression | namedTypes.CallExpression | namedTypes.RestElement | namedTypes.TypeAnnotation | namedTypes.TSTypeAnnotation | namedTypes.SpreadElementPattern | namedTypes.ArrowFunctionExpression | namedTypes.ForOfStatement | namedTypes.YieldExpression | namedTypes.GeneratorExpression | namedTypes.ComprehensionBlock | namedTypes.ComprehensionExpression | namedTypes.ObjectProperty | namedTypes.PropertyPattern | namedTypes.ObjectPattern | namedTypes.ArrayPattern | namedTypes.MethodDefinition | namedTypes.SpreadElement | namedTypes.AssignmentPattern | namedTypes.ClassPropertyDefinition | namedTypes.ClassProperty | namedTypes.ClassBody | namedTypes.ClassDeclaration | namedTypes.ClassExpression | namedTypes.ImportSpecifier | namedTypes.ImportNamespaceSpecifier | namedTypes.ImportDefaultSpecifier | namedTypes.ImportDeclaration | namedTypes.TaggedTemplateExpression | namedTypes.TemplateLiteral | namedTypes.TemplateElement | namedTypes.SpreadProperty | namedTypes.SpreadPropertyPattern | namedTypes.AwaitExpression | namedTypes.ImportExpression | namedTypes.JSXAttribute | namedTypes.JSXIdentifier | namedTypes.JSXNamespacedName | namedTypes.JSXExpressionContainer | namedTypes.JSXMemberExpression | namedTypes.JSXSpreadAttribute | namedTypes.JSXElement | namedTypes.JSXOpeningElement | namedTypes.JSXClosingElement | namedTypes.JSXFragment | namedTypes.JSXText | namedTypes.JSXOpeningFragment | namedTypes.JSXClosingFragment | namedTypes.JSXEmptyExpression | namedTypes.JSXSpreadChild | namedTypes.TypeParameterDeclaration | namedTypes.TSTypeParameterDeclaration | namedTypes.TypeParameterInstantiation | namedTypes.TSTypeParameterInstantiation | namedTypes.ClassImplements | namedTypes.TSExpressionWithTypeArguments | namedTypes.AnyTypeAnnotation | namedTypes.EmptyTypeAnnotation | namedTypes.MixedTypeAnnotation | namedTypes.VoidTypeAnnotation | namedTypes.NumberTypeAnnotation | namedTypes.NumberLiteralTypeAnnotation | namedTypes.NumericLiteralTypeAnnotation | namedTypes.StringTypeAnnotation | namedTypes.StringLiteralTypeAnnotation | namedTypes.BooleanTypeAnnotation | namedTypes.BooleanLiteralTypeAnnotation | namedTypes.NullableTypeAnnotation | namedTypes.NullLiteralTypeAnnotation | namedTypes.NullTypeAnnotation | namedTypes.ThisTypeAnnotation | namedTypes.ExistsTypeAnnotation | namedTypes.ExistentialTypeParam | namedTypes.FunctionTypeAnnotation | namedTypes.FunctionTypeParam | namedTypes.ArrayTypeAnnotation | namedTypes.ObjectTypeAnnotation | namedTypes.ObjectTypeProperty | namedTypes.ObjectTypeSpreadProperty | namedTypes.ObjectTypeIndexer | namedTypes.ObjectTypeCallProperty | namedTypes.ObjectTypeInternalSlot | namedTypes.Variance | namedTypes.QualifiedTypeIdentifier | namedTypes.GenericTypeAnnotation | namedTypes.MemberTypeAnnotation | namedTypes.UnionTypeAnnotation | namedTypes.IntersectionTypeAnnotation | namedTypes.TypeofTypeAnnotation | namedTypes.TypeParameter | namedTypes.InterfaceTypeAnnotation | namedTypes.InterfaceExtends | namedTypes.InterfaceDeclaration | namedTypes.DeclareInterface | namedTypes.TypeAlias | namedTypes.OpaqueType | namedTypes.DeclareTypeAlias | namedTypes.DeclareOpaqueType | namedTypes.TypeCastExpression | namedTypes.TupleTypeAnnotation | namedTypes.DeclareVariable | namedTypes.DeclareFunction | namedTypes.DeclareClass | namedTypes.DeclareModule | namedTypes.DeclareModuleExports | namedTypes.DeclareExportDeclaration | namedTypes.ExportSpecifier | namedTypes.ExportBatchSpecifier | namedTypes.DeclareExportAllDeclaration | namedTypes.InferredPredicate | namedTypes.DeclaredPredicate | namedTypes.ExportDeclaration | namedTypes.Noop | namedTypes.DoExpression | namedTypes.Super | namedTypes.BindExpression | namedTypes.Decorator | namedTypes.MetaProperty | namedTypes.ParenthesizedExpression | namedTypes.ExportDefaultDeclaration | namedTypes.ExportNamedDeclaration | namedTypes.ExportNamespaceSpecifier | namedTypes.ExportDefaultSpecifier | namedTypes.ExportAllDeclaration | namedTypes.Directive | namedTypes.DirectiveLiteral | namedTypes.InterpreterDirective | namedTypes.StringLiteral | namedTypes.NumericLiteral | namedTypes.BigIntLiteral | namedTypes.NullLiteral | namedTypes.BooleanLiteral | namedTypes.RegExpLiteral | namedTypes.ObjectMethod | namedTypes.ClassPrivateProperty | namedTypes.ClassMethod | namedTypes.ClassPrivateMethod | namedTypes.PrivateName | namedTypes.RestProperty | namedTypes.ForAwaitStatement | namedTypes.Import | namedTypes.TSQualifiedName | namedTypes.TSTypeReference | namedTypes.TSAsExpression | namedTypes.TSNonNullExpression | namedTypes.TSAnyKeyword | namedTypes.TSBigIntKeyword | namedTypes.TSBooleanKeyword | namedTypes.TSNeverKeyword | namedTypes.TSNullKeyword | namedTypes.TSNumberKeyword | namedTypes.TSObjectKeyword | namedTypes.TSStringKeyword | namedTypes.TSSymbolKeyword | namedTypes.TSUndefinedKeyword | namedTypes.TSUnknownKeyword | namedTypes.TSVoidKeyword | namedTypes.TSThisType | namedTypes.TSArrayType | namedTypes.TSLiteralType | namedTypes.TSUnionType | namedTypes.TSIntersectionType | namedTypes.TSConditionalType | namedTypes.TSInferType | namedTypes.TSTypeParameter | namedTypes.TSParenthesizedType | namedTypes.TSFunctionType | namedTypes.TSConstructorType | namedTypes.TSDeclareFunction | namedTypes.TSDeclareMethod | namedTypes.TSMappedType | namedTypes.TSTupleType | namedTypes.TSNamedTupleMember | namedTypes.TSRestType | namedTypes.TSOptionalType | namedTypes.TSIndexedAccessType | namedTypes.TSTypeOperator | namedTypes.TSIndexSignature | namedTypes.TSPropertySignature | namedTypes.TSMethodSignature | namedTypes.TSTypePredicate | namedTypes.TSCallSignatureDeclaration | namedTypes.TSConstructSignatureDeclaration | namedTypes.TSEnumMember | namedTypes.TSTypeQuery | namedTypes.TSImportType | namedTypes.TSTypeLiteral | namedTypes.TSTypeAssertion | namedTypes.TSEnumDeclaration | namedTypes.TSTypeAliasDeclaration | namedTypes.TSModuleBlock | namedTypes.TSModuleDeclaration | namedTypes.TSImportEqualsDeclaration | namedTypes.TSExternalModuleReference | namedTypes.TSExportAssignment | namedTypes.TSNamespaceExportDeclaration | namedTypes.TSInterfaceBody | namedTypes.TSInterfaceDeclaration | namedTypes.TSParameterProperty | namedTypes.OptionalMemberExpression | namedTypes.OptionalCallExpression;
106 export declare type TSTypeParameterInstantiationKind = namedTypes.TSTypeParameterInstantiation;
107 export declare type ClassImplementsKind = namedTypes.ClassImplements;
108 export declare type TSTypeKind = namedTypes.TSExpressionWithTypeArguments | namedTypes.TSTypeReference | namedTypes.TSAnyKeyword | namedTypes.TSBigIntKeyword | namedTypes.TSBooleanKeyword | namedTypes.TSNeverKeyword | namedTypes.TSNullKeyword | namedTypes.TSNumberKeyword | namedTypes.TSObjectKeyword | namedTypes.TSStringKeyword | namedTypes.TSSymbolKeyword | namedTypes.TSUndefinedKeyword | namedTypes.TSUnknownKeyword | namedTypes.TSVoidKeyword | namedTypes.TSThisType | namedTypes.TSArrayType | namedTypes.TSLiteralType | namedTypes.TSUnionType | namedTypes.TSIntersectionType | namedTypes.TSConditionalType | namedTypes.TSInferType | namedTypes.TSParenthesizedType | namedTypes.TSFunctionType | namedTypes.TSConstructorType | namedTypes.TSMappedType | namedTypes.TSTupleType | namedTypes.TSNamedTupleMember | namedTypes.TSRestType | namedTypes.TSOptionalType | namedTypes.TSIndexedAccessType | namedTypes.TSTypeOperator | namedTypes.TSTypePredicate | namedTypes.TSTypeQuery | namedTypes.TSImportType | namedTypes.TSTypeLiteral;
109 export declare type TSHasOptionalTypeParameterInstantiationKind = namedTypes.TSExpressionWithTypeArguments | namedTypes.TSTypeReference | namedTypes.TSImportType;
110 export declare type TSExpressionWithTypeArgumentsKind = namedTypes.TSExpressionWithTypeArguments;
234 export declare type TSMappedTypeKind = namedTypes.TSMappedType;
235 export declare type TSTupleTypeKind = namedTypes.TSTupleType;
236 export declare type TSNamedTupleMemberKind = namedTypes.TSNamedTupleMember;
237 export declare type TSRestTypeKind = namedTypes.TSRestType;
238 export declare type TSOptionalTypeKind = namedTypes.TSOptionalType;
test_convert.py (https://github.com/witten/borgmatic.git) Python · 120 lines
1 import os
2 from collections import OrderedDict, defaultdict, namedtuple
4 import pytest
7 from borgmatic.config import convert as module
9 Parsed_config = namedtuple('Parsed_config', ('location', 'storage', 'retention', 'consistency'))
22 def test_convert_legacy_parsed_config_transforms_source_config_to_mapping():
23 flexmock(module.yaml.comments).should_receive('CommentedMap').replace_with(OrderedDict)
24 flexmock(module.generate).should_receive('add_comments_to_configuration_map')
90 def test_guard_configuration_upgraded_raises_when_only_source_config_present():
91 flexmock(os.path).should_receive('exists').with_args('config').and_return(True)
92 flexmock(os.path).should_receive('exists').with_args('config.yaml').and_return(False)
__init__.py (https://gitlab.com/abhi1tb/build) Python · 153 lines
committees.py (https://github.com/mattgrayson/openstates.git) Python · 147 lines
pycompat.py (https://gitlab.com/padjis/mapan) Python · 115 lines
PiecewiseLinear.py (https://github.com/SPFlow/SPFlow.git) Python · 136 lines
5 @author: Antonio Vergari
6 """
7 from collections import namedtuple
9 import numpy as np
20 class PiecewiseLinear(Leaf):
21 type = Type.REAL
22 property_type = namedtuple("PiecewiseLinear", "x_range y_range bin_repr_points")
24 def __init__(self, x_range, y_range, bin_repr_points, scope=None):
86 meta_type = ds_context.meta_types[idx]
88 hist = create_histogram_leaf(data, ds_context, scope, alpha=False, hist_source=hist_source)
89 densities = hist.densities
90 bins = hist.breaks
__init__.py (https://github.com/veekun/spline.git) Python · 97 lines
1 from collections import defaultdict, namedtuple
2 from pkg_resources import resource_filename
3 import re
17 map.connect('/', controller='frontpage', action='index')
19 def load_sources_hook(config, *args, **kwargs):
20 """Hook to load all the known sources and stuff them in config. Run once,
21 on server startup.
91 return [
92 ('routes_mapping', Priority.NORMAL, add_routes_hook),
93 ('after_setup', Priority.NORMAL, load_sources_hook),
94 ('cron', Priority.NORMAL, source_cron_hook),
95 ('frontpage_updates_rss', Priority.NORMAL, FeedSource),
cn.py (https://bitbucket.org/peixuan/chromium_r197479_base.git) Python · 123 lines
InferMachineCreates.cs (https://github.com/p-org/P.git) C# · 194 lines
162 .Union(InferCreatesForExpr(mapAccessExpr.IndexExpr, handler));
164 case NamedTupleAccessExpr namedTupleAccessExpr:
165 return InferCreatesForExpr(namedTupleAccessExpr.SubExpr, handler);
167 case NamedTupleExpr namedTupleExpr:
168 return namedTupleExpr.TupleFields.SelectMany(expr1 => InferCreatesForExpr(expr1, handler));
181 return InferCreatesForExpr(unaryOpExpr.SubExpr, handler);
183 case UnnamedTupleExpr unnamedTupleExpr:
184 return unnamedTupleExpr.TupleFields.SelectMany(expr1 => InferCreatesForExpr(expr1, handler));
gevent_executor.py (https://gitlab.com/AntBar/pytango) Python · 182 lines
validations.py (https://github.com/feist/pcs.git) Python · 306 lines
common.py (https://github.com/autozimu/LanguageClient-neovim.git) Python · 159 lines
resource_options.py (https://github.com/aio-libs/aiohttp-cors.git) Python · 153 lines
31 class ResourceOptions(collections.namedtuple(
32 "Base",
33 ("allow_credentials", "expose_headers", "allow_headers", "max_age",
80 def __new__(cls, *, allow_credentials=False, expose_headers=(),
81 allow_headers=(), max_age=None, allow_methods=None):
82 """Normalize source parameters and store them in namedtuple."""
84 if not isinstance(allow_credentials, bool):
preset.py (https://github.com/dagster-io/dagster.git) Python · 214 lines
test_prototype.py (https://gitlab.com/Haritiana/server-tools) Python · 113 lines
PyNamedTupleInspection.kt (https://github.com/JetBrains/intellij-community.git) Kotlin · 169 lines
9 import com.intellij.psi.ResolveState
10 import com.intellij.psi.scope.PsiScopeProcessor
11 import com.jetbrains.python.codeInsight.stdlib.PyNamedTupleTypeProvider
12 import com.jetbrains.python.psi.LanguageLevel
13 import com.jetbrains.python.psi.PyClass
16 import java.util.*
18 class PyNamedTupleInspection : PyInspection() {
20 companion object {
122 if (LanguageLevel.forElement(node).isAtLeast(LanguageLevel.PYTHON36) &&
123 PyNamedTupleTypeProvider.isTypingNamedTupleDirectInheritor(node, myTypeEvalContext)) {
124 inspectFieldsOrder(node, { it == node }, false,
125 myTypeEvalContext,
list_command_test.py (https://github.com/Yelp/data_pipeline.git) Python · 238 lines
47 )
49 TopicsArgs = namedtuple(
50 "Namespace", [
51 "source_id",
117 @pytest.fixture(
118 params=[True, False],
119 ids=['with_active_sources', 'without_active_sources']
120 )
121 def good_source_args(self, request, namespace_one):
124 sort_by="name",
125 descending_order=False,
126 active_sources=request.param,
127 verbosity=0
128 )
system.py (https://github.com/dagster-io/dagster.git) Python · 359 lines
svhn.py (https://github.com/jerryli27/TwinGAN.git) Python · 114 lines
57 Returns:
58 A `Dataset` namedtuple.
60 Raises:
104 return slim.dataset.Dataset(
105 data_sources=file_pattern,
106 reader=reader,
107 decoder=decoder,
112 items_used=['image', 'label', 'source', 'target', 'conditional_labels'],
113 items_need_preprocessing=['image', 'label', 'source', 'target', 'conditional_labels'],
114 has_source=True,)
magic.py (https://bitbucket.org/freebsd/freebsd-base.git) Python · 288 lines
7 import ctypes
9 from collections import namedtuple
11 from ctypes import *
51 MAGIC_NO_CHECK_BUILTIN = NO_CHECK_BUILTIN = 4173824
53 FileMagic = namedtuple('FileMagic', ('mime_type', 'encoding', 'name'))
261 '''Detect mime type, encoding and file type from a filename
263 Returns a `FileMagic` namedtuple.
264 '''
api.py (https://github.com/ROCmSoftwarePlatform/pytorch.git) Python · 206 lines
sellgains.py (https://github.com/beancount/beancount.git) Python · 156 lines
xinput_gamepad.rst (https://github.com/smathot/psychopy.git) ReStructuredText · 73 lines
20 .. autoclass:: psychopy.iohub.devices.xinput.GamepadStateChangeEvent
21 :exclude-members: DEVICE_ID_INDEX, filter_id, device_id, NUMPY_DTYPE, BASE_EVENT_MAX_ATTRIBUTE_INDEX, CLASS_ATTRIBUTE_NAMES, EVENT_CONFIDENCE_INTERVAL_INDEX, EVENT_DELAY_INDEX, EVENT_DEVICE_TIME_INDEX, EVENT_EXPERIMENT_ID_INDEX, EVENT_FILTER_ID_INDEX, EVENT_HUB_TIME_INDEX, EVENT_ID_INDEX, EVENT_LOGGED_TIME_INDEX, EVENT_SESSION_ID_INDEX, EVENT_TYPE_ID, EVENT_TYPE_ID_INDEX, EVENT_TYPE_STRING, IOHUB_DATA_TABLE, PARENT_DEVICE, createEventAsClass, createEventAsDict, createEventAsNamedTuple, e, namedTupleClass
22 :member-order: bysource
changeset.py (https://github.com/sphinx-doc/sphinx.git) Python · 155 lines
9 """
11 from collections import namedtuple
12 from typing import Any, Dict, List
13 from typing import cast
43 # TODO: move to typing.NamedTuple after dropping py35 support (see #5958)
44 ChangeSet = namedtuple('ChangeSet',
59 node = addnodes.versionmodified()
60 node.document = self.state.document
61 self.set_source_info(node)
62 node['type'] = self.name
63 node['version'] = self.arguments[0]
67 self.lineno + 1)
68 para = nodes.paragraph(self.arguments[1], '', *inodes, translatable=False)
69 self.set_source_info(para)
70 node.append(para)
71 else:
type_test.cpp (https://github.com/ROCmSoftwarePlatform/pytorch.git) C++ · 209 lines
4 #include <ATen/core/jit_type.h>
5 #include <torch/csrc/jit/frontend/resolver.h>
6 #include <torch/csrc/jit/serialization/import_source.h>
8 namespace c10 {
52 }
54 TEST(TypeCustomPrinter, NamedTuples) {
55 TypePrinter printer =
56 [](const ConstTypePtr& t) -> c10::optional<std::string> {
57 if (auto tupleType = t->cast<TupleType>()) {
58 // Rewrite only NamedTuples
59 if (tupleType->name()) {
60 return "Rewritten";
devices.rst (https://github.com/jeremygray/psychopy.git) ReStructuredText · 96 lines
62 .. autoclass:: psychopy.iohub.devices.DeviceEvent
63 :exclude-members: filter_id, device_id, NUMPY_DTYPE, DEVICE_ID_INDEX, BASE_EVENT_MAX_ATTRIBUTE_INDEX, CLASS_ATTRIBUTE_NAMES, EVENT_CONFIDENCE_INTERVAL_INDEX, EVENT_DELAY_INDEX, EVENT_DEVICE_TIME_INDEX, EVENT_EXPERIMENT_ID_INDEX, EVENT_FILTER_ID_INDEX, EVENT_HUB_TIME_INDEX, EVENT_ID_INDEX, EVENT_LOGGED_TIME_INDEX, EVENT_SESSION_ID_INDEX, EVENT_TYPE_ID, EVENT_TYPE_ID_INDEX, EVENT_TYPE_STRING, IOHUB_DATA_TABLE, PARENT_DEVICE, createEventAsClass, createEventAsDict, createEventAsNamedTuple, e, namedTupleClass
64 :member-order: bysource
file.py (https://github.com/wamdam/backy2.git) Python · 232 lines
__init__.py (https://bitbucket.org/macdylan/py-vendors.git) Python · 34 lines
l2dist_regs.py (https://github.com/neka-nat/probreg.git) Python · 195 lines
1 from __future__ import print_function
2 from __future__ import division
3 from collections import namedtuple
4 import logging
5 import numpy as np
28 sigma=1.0, delta=0.9,
29 use_estimated_sigma=True):
30 self._source = source
31 self._feature_gen = feature_gen
32 self._cost_fn = cost_fn
65 for _ in range(maxiter):
66 self._feature_gen.init()
67 mu_source, phi_source = self._feature_gen.compute(self._source)
68 mu_target, phi_target = self._feature_gen.compute(target)
69 args = (mu_source, phi_source,
bh_plugin.py (https://bitbucket.org/thomazrb/sublime-text-2.git) Python · 142 lines
shader.py (https://gitlab.com/depp/gamedev) Python · 127 lines
bots_test.py (https://github.com/google/clusterfuzz.git) Python · 121 lines
PyGotoTypeDeclarationTest.kt (https://github.com/JetBrains/intellij-community.git) Kotlin · 134 lines
80 // PY-41452
81 fun testNamedTupleClass() {
82 val type = findSymbolType(
83 "from typing import NamedTuple\n" +
84 "class MyNT(NamedTuple):\n" +
85 " field_1: int\n" +
86 " field_2: str\n" +
93 // PY-41452
94 fun testNamedTupleTarget() {
95 val type = findSymbolType(
96 "from typing import NamedTuple\n" +
97 "Employee = NamedTuple('Employee', [('name', str), ('id', int)])\n" +
98 "my_n<caret>t: Employee = undefined"
99 )
flowers.py (https://gitlab.com/ll14ec/Portfolio) Python · 98 lines
__init__.py (https://github.com/learnables/learn2learn.git) Python · 128 lines
12 import learn2learn as l2l
14 from collections import namedtuple
15 from .omniglot_benchmark import omniglot_tasksets
16 from .mini_imagenet_benchmark import mini_imagenet_tasksets
25 BenchmarkTasksets = namedtuple('BenchmarkTasksets', ('train', 'validation', 'test'))
27 _TASKSETS = {
70 Returns the tasksets for a particular benchmark, using literature standard data and task transformations.
72 The returned object is a namedtuple with attributes `train`, `validation`, `test` which
73 correspond to their respective TaskDatasets.
74 See `examples/vision/maml_miniimagenet.py` for an example.
__init__.py (https://github.com/geo-data/medin-rdbms-tool.git) Python · 34 lines
evangelist.py (https://gitlab.com/made-financial/made-financial-scripts) Python · 114 lines
_registry.py (https://github.com/Ciphey/Ciphey.git) Python · 172 lines
grouper.py (https://github.com/spidaboy7/hyde.git) Python · 217 lines
search.py (https://gitlab.com/iceman201/COSC_Algorithm.git) Python · 180 lines
storage_utils.py (https://github.com/capitalone/cloud-custodian.git) Python · 161 lines
2 # Copyright The Cloud Custodian Authors.
3 # SPDX-License-Identifier: Apache-2.0
4 from collections import namedtuple
5 from functools import wraps
6 from urllib.parse import urlparse
153 token = StorageUtilities.get_storage_token(session)
155 Storage = namedtuple('Storage', 'container_name, storage_name, token, file_prefix')
157 return Storage(
ConstraintLocatorPathElts.def (https://github.com/apple/swift.git) Module-Definition · 201 lines
remove_transfer_account.py (https://github.com/jbms/beancount-import.git) Python · 208 lines
1 """Interactive tool for removing an account that was used for pending transfers."""
3 from typing import List, Set, Tuple, NamedTuple, Union, Dict
4 import argparse
5 import datetime
14 from .posting_date import get_posting_date
16 PendingEntry = NamedTuple('PendingEntry', [
17 ('date', datetime.date),
18 ('transaction', Transaction),
extractors.py (https://github.com/Microsoft/Recognizers-Text.git) Python · 245 lines
1 import regex
2 from typing import Pattern, List, NamedTuple
4 from recognizers_text.utilities import RegExpUtility
80 class PortugueseIntegerExtractor(BaseNumberExtractor):
81 @property
82 def regexes(self) -> List[NamedTuple('re_val', [('re', Pattern), ('val', str)])]:
83 return self.__regexes
132 @property
133 def regexes(self) -> List[NamedTuple('re_val', [('re', Pattern), ('val', str)])]:
134 return self.__regexes
180 class PortugueseFractionExtractor(BaseNumberExtractor):
181 @property
182 def regexes(self) -> List[NamedTuple('re_val', [('re', Pattern), ('val', str)])]:
183 return self.__regexes
mysql_metadata_extractor.py (https://github.com/lyft/amundsendatabuilder.git) Python · 139 lines
4 import logging
5 from collections import namedtuple
6 from itertools import groupby
7 from typing import (
16 from databuilder.models.table_metadata import ColumnMetadata, TableMetadata
18 TableKey = namedtuple('TableKey', ['schema', 'table_name'])
20 LOGGER = logging.getLogger(__name__)
73 self.sql_stmt = MysqlMetadataExtractor.SQL_STATEMENT.format(
74 where_clause_suffix=conf.get_string(MysqlMetadataExtractor.WHERE_CLAUSE_SUFFIX_KEY),
75 cluster_source=cluster_source
76 )
core.py (https://github.com/blaze/odo.git) Python · 200 lines
processes.py (https://gitlab.com/meetly/dd-agent) Python · 95 lines
commando.py (https://github.com/bewest/commando.git) Python · 200 lines
wallet_util.py (https://github.com/soitun/bitcoin.git) Python · 121 lines
4 # file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 """Useful util functions for testing the wallet"""
6 from collections import namedtuple
8 from test_framework.address import (
24 )
26 Key = namedtuple('Key', ['privkey',
27 'pubkey',
28 'p2pkh_script',
34 'p2sh_p2wpkh_addr'])
36 Multisig = namedtuple('Multisig', ['privkeys',
37 'pubkeys',
38 'p2sh_script',
disgen.py (https://gitlab.com/0072016/coveragepy) Python · 206 lines
journal.py (https://github.com/pombredanne/md.git) Python · 211 lines
test_import_order.py (https://gitlab.com/Ivy001/pants) Python · 152 lines
grouped_parameter.py (https://github.com/QCoDeS/Qcodes.git) Python · 234 lines
1 from collections import OrderedDict, namedtuple
2 from typing import (
3 TYPE_CHECKING,
69 The value returned by the get method is passed through a formatter.
70 By default, the formatter returns the :class:`.DelegateParameter`
71 values in a namedtuple, where the keys are the names of the
72 :class:`.DelegateParameter` s. In the special case where the
73 :class:`.DelegateGroup` only contains one :class:`.DelegateParameter`,
90 parameter.
91 formatter: Optional formatter for value returned by get_parameters(),
92 defaults to a namedtuple with the parameter names as keys.
93 """
94 def __init__(
120 self._formatter = lambda result: result
121 elif formatter is None:
122 self._formatter = self._namedtuple
123 else:
124 self._formatter = formatter
iterator.py (https://github.com/VectorFist/RNN-NMT.git) Python · 92 lines
input_producer.py (https://github.com/qjadud1994/Text_Detector.git) Python · 116 lines
mkflags.py (https://github.com/nyetwurk/mumble.git) Python · 111 lines
gen_nearest_neighbor_ops_pywrapper.py (https://github.com/ryfeus/lambda-packs.git) Python · 130 lines
__init__.py (https://github.com/Infinidat/infi.dtypes.hctl.git) Python · 64 lines
3 import sys
4 from collections import namedtuple
6 PY2 = sys.version_info[0] == 2
7 string_type = basestring if PY2 else str
9 class NamedTupleAddress(object):
10 _TUPLE = None
11 def __init__(self, *args, **kwargs):
12 super(NamedTupleAddress, self).__init__()
13 self._value = self._TUPLE(*args, **kwargs) #pylint: disable-msg=E1102
14 def __eq__(self, other):
test_ops.py (https://github.com/ryfeus/lambda-packs.git) Python · 266 lines
gsr_processor.py (https://bitbucket.org/sathappanspm/embers.git) Python · 96 lines
12 from etool import args, queue
13 from collections import namedtuple
14 import xlrd
15 from datetime import datetime
16 import re
18 GSR_TITLES = namedtuple('GSR_Warning', 'eventId, eventSubId, EntryRevisionDate, recordStatus, country, state, city, eventCode, population, date, earliestReportedDate, source, headline, eventDescription, firstRepLink, otherLinks_gss, otherLinks1, otherLinks2, encodingComment')
50 title_deDup.append(k)
51 title_str = ','.join([re.sub('[^a-z0-9]', '', k.lower()) for k in title_deDup])
52 return namedtuple('GSR_Warning', title_str)
compat.py (https://bitbucket.org/zzzeek/mako.git) Python · 177 lines
battery.py (https://github.com/Nemo157/.configs.git) Python · 126 lines
18 from powerline.lib.humanize_bytes import humanize_bytes
19 from powerline.theme import requires_segment_info
20 from collections import namedtuple
41 def _get_battery_info():
42 raw = _run_cmd(['/usr/bin/pmset', '-g', 'batt'])
43 current_source = _current_source_regex.search(raw)
44 if current_source is not None:
45 current_source = current_source.group(2)
46 current_percent = _current_percent_regex.search(raw)
47 if current_percent is not None:
59 time_remaining = ''
60 return {
61 "current_source": current_source,
62 "current_percent": current_percent,
63 "charging": charging,
types.py (https://gitlab.com/wilane/compose) Python · 198 lines
generate_sql.py (https://github.com/osm2vectortiles/osm2vectortiles.git) Python · 128 lines
device_stats_monitor.py (https://bitbucket.org/peixuan/chromium_r197479_base.git) Python · 116 lines
__init__.py (https://gitlab.com/pooja043/Globus_Docker_3) Python · 47 lines
subgraph.py (https://github.com/common-workflow-language/cwltool.git) Python · 146 lines
base.py (https://gitlab.com/hrishikeshvganu/tensorflow) Python · 101 lines
dedup_data.py (https://gitlab.com/lwd17/enhanced_examplar_ae) Python · 91 lines
1 import argparse
2 from collections import namedtuple
3 import os
24 LanguagePair = namedtuple("LanguagePair", ["src", "tgt"])
59 if os.path.exists(train_filenames.src) and os.path.exists(train_filenames.tgt):
60 with open(train_filenames.src) as f:
61 train_source = f.readlines()
63 with open(train_filenames.tgt) as f:
75 assert len(new_train_source) == len(new_train_target)
76 assert len(new_train_source) <= len(train_source)
78 with open(output_filenames.src, "w") as o:
kube.py (https://github.com/miracle2k/k8s-snapshots.git) Python · 181 lines
2 import threading
3 from typing import (Optional, Iterable, AsyncGenerator, TypeVar, Type,
4 NamedTuple, Callable)
6 import pykube
19 ClientFactory = Callable[[], pykube.HTTPClient]
21 # Copy of a locally-defined namedtuple in
22 # pykube.query.WatchQuery.object_stream()
23 _WatchEvent = NamedTuple('_WatchEvent', [
compilation.py (https://gitlab.com/Alioth-Project/clang-r445002) Python · 140 lines
9 import collections
11 __all__ = ['split_command', 'classify_source', 'compiler_language']
13 # Ignored compiler options map for compilation database creation.
68 # the result of this method
69 result = collections.namedtuple('Compilation',
70 ['compiler', 'flags', 'files'])
71 result.compiler = compiler_language(command)
92 result.flags.extend([arg, next(args)])
93 # parameter which looks source file is taken...
94 elif re.match(r'^[^-].+', arg) and classify_source(arg):
95 result.files.append(arg)
96 # and consider everything else as compile option.
content.py (https://gitlab.com/taler/merchant-frontends) Python · 131 lines
22 from bs4 import BeautifulSoup
23 from pkg_resources import resource_stream, resource_filename
24 from collections import namedtuple
25 import logging
26 import os
29 logger = logging.getLogger(__name__)
31 Article = namedtuple("Article", "slug title teaser main_file extra_files")
33 articles = OrderedDict()
execution.py (https://github.com/isaacs/node.git) Python · 95 lines
__init__.py (https://github.com/sqlalchemy/sqlalchemy.git) Python · 162 lines
td1.py (https://github.com/Arg0s1080/mrz.git) Python · 140 lines
16 from ..base.countries_ops import *
17 from ..base.functions import hash_is_ok, namedtuple_maker, anset
18 from ._hash_fields import _HashChecker
19 from ._fields import _FieldsChecker
118 def fields(self, zeroes_fill=False):
119 """Returns a namedtuple with all fields strings
121 Available strings for ID Cards and others TD1's:
131 extra_fields = anset(self._optional_data_2, zeroes_fill), self._final_hash
132 extra_names = "optional_data_2 final_hash"
133 return namedtuple_maker(self._str_common_fields(zeroes_fill), self._str_common_hashes(),
134 extra_fields, extra_names)
keyboard.rst (https://github.com/smathot/psychopy.git) ReStructuredText · 49 lines
23 :members:
24 :inherited-members:
25 :exclude-members: DEVICE_ID_INDEX, filter_id, device_id, NUMPY_DTYPE, BASE_EVENT_MAX_ATTRIBUTE_INDEX, CLASS_ATTRIBUTE_NAMES, EVENT_CONFIDENCE_INTERVAL_INDEX, EVENT_DELAY_INDEX, EVENT_DEVICE_TIME_INDEX, EVENT_EXPERIMENT_ID_INDEX, EVENT_FILTER_ID_INDEX, EVENT_HUB_TIME_INDEX, EVENT_ID_INDEX, EVENT_LOGGED_TIME_INDEX, EVENT_SESSION_ID_INDEX, EVENT_TYPE_ID, EVENT_TYPE_ID_INDEX, EVENT_TYPE_STRING, IOHUB_DATA_TABLE, PARENT_DEVICE, createEventAsClass, createEventAsDict, createEventAsNamedTuple, e, namedTupleClass
26 :member-order: bysource
29 :members:
30 :inherited-members:
31 :exclude-members: DEVICE_ID_INDEX, filter_id, device_id, NUMPY_DTYPE, BASE_EVENT_MAX_ATTRIBUTE_INDEX, CLASS_ATTRIBUTE_NAMES, EVENT_CONFIDENCE_INTERVAL_INDEX, EVENT_DELAY_INDEX, EVENT_DEVICE_TIME_INDEX, EVENT_EXPERIMENT_ID_INDEX, EVENT_FILTER_ID_INDEX, EVENT_HUB_TIME_INDEX, EVENT_ID_INDEX, EVENT_LOGGED_TIME_INDEX, EVENT_SESSION_ID_INDEX, EVENT_TYPE_ID, EVENT_TYPE_ID_INDEX, EVENT_TYPE_STRING, IOHUB_DATA_TABLE, PARENT_DEVICE, createEventAsClass, createEventAsDict, createEventAsNamedTuple, e, namedTupleClass
32 :member-order: bysource
35 :members:
36 :inherited-members:
37 :exclude-members: DEVICE_ID_INDEX, filter_id, device_id, NUMPY_DTYPE, BASE_EVENT_MAX_ATTRIBUTE_INDEX, CLASS_ATTRIBUTE_NAMES, EVENT_CONFIDENCE_INTERVAL_INDEX, EVENT_DELAY_INDEX, EVENT_DEVICE_TIME_INDEX, EVENT_EXPERIMENT_ID_INDEX, EVENT_FILTER_ID_INDEX, EVENT_HUB_TIME_INDEX, EVENT_ID_INDEX, EVENT_LOGGED_TIME_INDEX, EVENT_SESSION_ID_INDEX, EVENT_TYPE_ID, EVENT_TYPE_ID_INDEX, EVENT_TYPE_STRING, IOHUB_DATA_TABLE, PARENT_DEVICE, createEventAsClass, createEventAsDict, createEventAsNamedTuple, e, namedTupleClass
38 :member-order: bysource
pad.py (https://github.com/beancount/beancount.git) Python · 171 lines
resource_policies.py (https://github.com/awslabs/serverless-application-model.git) Python · 200 lines
1 from enum import Enum
2 from collections import namedtuple
4 from six import string_types
7 from samtranslator.model.exceptions import InvalidTemplateException
9 PolicyEntry = namedtuple("PolicyEntry", "data type")
45 Iterator method that "yields" the next policy entry on subsequent calls to this method.
47 :yields namedtuple("data", "type"): Yields a named tuple containing the policy data and its type
48 """
bh_plugin.py (https://github.com/facelessuser/BracketHighlighter.git) Python · 198 lines
test_hg_access.py (https://gitlab.com/b_perraudin_catie/yotta) Python · 72 lines
9 import unittest
10 import os
11 from collections import namedtuple
13 # hgapi, pip install hgapi, python api to hg command, "Do whatever you want,
56 def test_installDeps(self):
57 Args = namedtuple('Args', ['component', 'target', 'act_globally', 'install_linked', 'install_test_deps', 'config'])
58 install.installComponent(Args(Test_Deps_Name, Test_Deps_Target, False, False, 'own', {}))
isolated.py (https://github.com/tox-dev/tox.git) Python · 149 lines
intellisense_registry.py (https://github.com/ninja-ide/ninja-ide.git) Python · 168 lines
extractors.py (https://github.com/Microsoft/Recognizers-Text.git) Python · 224 lines
1 from typing import Pattern, List, NamedTuple
3 from recognizers_text.utilities import RegExpUtility
74 @property
75 def regexes(self) -> List[
76 NamedTuple('re_val', [('re', Pattern), ('val', str)])]:
77 return self.__regexes
119 @property
120 def regexes(self) -> List[
121 NamedTuple('re_val', [('re', Pattern), ('val', str)])]:
122 return self.__regexes
164 @property
165 def regexes(self) -> List[
166 NamedTuple('re_val', [('re', Pattern), ('val', str)])]:
167 return self.__regexes
__init__.py (https://github.com/mantidproject/mantid.git) Python · 127 lines
18 """
19 # std imports
20 from collections import namedtuple
21 import os
22 import sys
30 # Type to hold properties for additional QMainWindow instances
31 WindowConfig = namedtuple("WindowConfig", ("parent", "flags"))
33 # -----------------------------------------------------------------------------
frontpage_sources.py (https://github.com/veekun/spline.git) Python · 101 lines
1 from collections import namedtuple
2 import datetime
11 from splinext.frontpage.sources import Source
13 FrontPageThread = namedtuple('FrontPageThread', ['source', 'time', 'post'])
14 class ForumSource(Source):
15 """Represents a forum whose threads are put on the front page.
71 return updates
73 FrontPageActivity = namedtuple('FrontPageActivity', ['template', 'threads'])
74 def forum_activity(*args, **kwargs):
75 """Show recently-active threads on the front page.
get_configuration_files.py (https://github.com/duckietown/Software.git) Python · 159 lines
util.cr (https://github.com/veelenga/ameba.git) Crystal · 154 lines
21 when Crystal::HashLiteral
22 node.entries.all? { |entry| literal?(entry.key) && literal?(entry.value) }
23 when Crystal::NamedTupleLiteral
24 node.entries.all? { |entry| literal?(entry.value) }
25 else
31 # This method uses `node.location` and `node.end_location`
32 # to determine and cut a piece of source of the node.
33 def node_source(node, code_lines)
34 loc, end_loc = node.location, node.end_location
testable.py (https://github.com/hyperledger/indy-plenum.git) Python · 158 lines
gen_model_ops.py (https://github.com/nimeshabuddhika/Tensorflow-Chatbot.git) Python · 333 lines
resources.py (https://github.com/dagster-io/dagster.git) Python · 140 lines
finders.py (https://github.com/dimagi/commcare-hq.git) Python · 128 lines
1 from collections import namedtuple
2 from functools import partial
9 from corehq.motech.finders import MATCH_FUNCTIONS, MATCH_TYPE_EXACT
10 from corehq.motech.value_source import deserialize, get_value
12 CandidateScore = namedtuple('CandidateScore', 'candidate score')
30 def attr_type_id_value_source_by_case_property(self):
31 return {
32 value_source["case_property"]: (attr_type_id, value_source)
33 for attr_type_id, value_source in self.case_config.attributes.items()
95 for property_weight in self.property_weights:
96 case_property = property_weight['case_property']
97 (attr_type_id, value_source_config) = self.attr_type_id_value_source_by_case_property[case_property]
99 candidate_value = get_tei_attr(candidate, attr_type_id)
extract_gpl5175_info.py (https://gitlab.com/kmeyer/cns-count-analyses) Python · 70 lines
generate_tfrecord.py (https://github.com/Microsoft/AdaptiveCards.git) Python · 134 lines
19 import io
20 import os
21 from collections import namedtuple
23 import pandas as pd
118 path = os.path.join(FLAGS.image_dir)
119 examples = pd.read_csv(FLAGS.csv_input)
120 data = namedtuple("data", ["filename", "object"])
121 gb = examples.groupby("filename")
122 grouped = [data(filename, gb.get_group(x))
expressions.py (https://github.com/ramalho/kaminpy.git) Python · 189 lines
make_css_property_instances.py (https://github.com/chromium/chromium.git) Python · 93 lines
gen_resampler_ops.py (https://github.com/ryfeus/lambda-packs.git) Python · 167 lines
EXAC1.jl (https://github.com/NREL/PowerSystems.jl.git) Julia · 220 lines
9 Ka::Float64
10 Ta::Float64
11 Vr_lim::NamedTuple{(:min, :max), Tuple{Float64, Float64}}
12 Te::Float64
13 Kf::Float64
37 - `Ka::Float64`: Regulator output gain, validation range: `(0, 1000)`
38 - `Ta::Float64`: Regulator output time constant in s, validation range: `(0, 10)`, action if invalid: `warn`
39 - `Vr_lim::NamedTuple{(:min, :max), Tuple{Float64, Float64}}`: Limits for regulator output `(Vr_min, Vr_max)`
40 - `Te::Float64`: Exciter field time constant in s, validation range: `(eps(), 2)`, action if invalid: `error`
41 - `Kf::Float64`: Rate feedback excitation system stabilizer gain, validation range: `(0, 0.3)`, action if invalid: `warn`
71 Ta::Float64
72 "Limits for regulator output `(Vr_min, Vr_max)`"
73 Vr_lim::NamedTuple{(:min, :max), Tuple{Float64, Float64}}
74 "Exciter field time constant in s"
75 Te::Float64
monsoon_profiler.py (https://gitlab.com/jonnialva90/iridium-browser) Python · 97 lines
cfml_view.py (https://github.com/jcberquist/sublimetext-cfml.git) Python · 267 lines
2 import sublime
3 from collections import defaultdict
4 from collections import namedtuple
5 from . import utils
6 from . import buffer_metadata
8 CompletionList = namedtuple(
9 "CompletionList", "completions priority exclude_lower_priority"
10 )
11 Documentation = namedtuple(
12 "Documentation", "doc_regions doc_html_variables on_navigate priority"
13 )
__init__.py (https://gitlab.com/ztane/sqlalchemy) Python · 45 lines
7 from .compat import callable, cmp, reduce, \
8 threading, py3k, py33, py2k, jython, pypy, cpython, win32, \
9 pickle, dottedgetter, parse_qsl, namedtuple, next, reraise, \
10 raise_from_cause, text_type, string_types, int_types, binary_type, \
11 quote_plus, with_metaclass, print_, itertools_filterfalse, u, ue, b,\