本文整理汇总了Python中ShareYourSystem.filterNone方法的典型用法代码示例。如果您正苦于以下问题:Python ShareYourSystem.filterNone方法的具体用法?Python ShareYourSystem.filterNone怎么用?Python ShareYourSystem.filterNone使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ShareYourSystem
的用法示例。
在下文中一共展示了ShareYourSystem.filterNone方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: do_recruit
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import filterNone [as 别名]
def do_recruit(self):
#Check
if type(self.VisitingBeforeUpdateList)!=list:
self.VisitingBeforeUpdateList=[]
#add
self.VisitingBeforeUpdateList+=[
(
'PickingKeyVariablesList',['/']
),
(
'ConcludingConditionVariable',
self.RecruitingConcludeConditionVariable
),
(
'cumulate',
SYS.ApplyDictClass()
)
]
#visit
self.visit()
#debug
'''
self.debug(('self.',self,['CumulatedVariablesList']))
'''
#flat
self.RecruitedFlatCumulateVariablesList=SYS.filterNone(
SYS.flat(
self.CumulatedVariablesList
)
)
示例2: findAfter
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import filterNone [as 别名]
def findAfter(self,**_FindingVariablesDict):
#debug
self.debug('Start of the method')
#debug
self.debug(
[
('Are we going to do a where with the FoundFilteredRowedDictsList and the '),
('filtering JoinedFindingTuplesList?'),
('self.ModeledDict ',self.ModeledDict,[
'ModelStr',
'FoundFilteredRowedDictsList'
]),
("'JoinedFindingTuplesList' in self.ModeledDict is "+str(
'JoinedFindingTuplesList' in self.ModeledDict))
]
)
if 'JoinedFindingTuplesList' in self.ModeledDict:
#debug
self.debug(
[
'Ok we are going to do the where',
"self.ModeledDict['JoinedFindingTuplesList'] is "+str(
self.ModeledDict['JoinedFindingTuplesList'])
]
)
#Where
self.ModeledDict['FoundFilteredRowedDictsList']=SYS.filterNone(SYS.where(
self.ModeledDict['FoundFilteredRowedDictsList'],
self.ModeledDict['JoinedFindingTuplesList']
)
)
#debug
self.debug('Ok the where is done.')
#debug
self.debug(
[
'After intersection',
('self.ModeledDict ',self.ModeledDict,[
'ModelStr',
'FoundFilteredRowedDictsList'
]
)
]
)
#debug
self.debug('End of the method')
示例3: getPrintManagerItemTuple
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import filterNone [as 别名]
def getPrintManagerItemTuple(_ManagerItemTuple):
#Debug
'''
print('Pymongoer l 31')
print('_ManagerItemTuple is ')
print(_ManagerItemTuple)
print('')
'''
#filter
PrintCollectionList=filter(
lambda __PymongoviewDict:
len(__PymongoviewDict)>0,
SYS.filterNone(
map(
lambda __NoderItemTuple:
__NoderItemTuple[1].pymongoview()
if hasattr(
__NoderItemTuple[1],
'pymongoview'
)
else None,
_ManagerItemTuple[1].ManagementDict.items()
)
)
)
#Debug
'''
print('PrintCollectionList is ')
print(PrintCollectionList)
print('')
'''
#Check
if len(PrintCollectionList)>0:
return (
_ManagerItemTuple[0],
PrintCollectionList
)
else:
return None
示例4: do_feature
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import filterNone [as 别名]
def do_feature(self):
#Check
if self.NodePointDeriveNoder!=None:
#map
self.FeaturedJoinDatabasersList=SYS.filterNone(
map(
lambda __NodedDatabaser:
__NodedDatabaser if hasattr(
__NodedDatabaser,'JoiningDownGetKeyStrsList')
and __NodedDatabaser.JoiningDownGetKeyStrsList !=None and
self.NodedDatabaseKeyStr in __NodedDatabaser.JoiningDownGetKeyStrsList
else None,
self.DatabasedDeriveDatabasersOrderedDict.values()
)
)
#debug
'''
示例5: getPrintDatabaseDict
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import filterNone [as 别名]
def getPrintDatabaseDict(_Database):
#map
PrintDatabaseOrderedDictDict=collections.OrderedDict(
SYS.filterNone
(
map(
lambda __CollectionStr:
(
__CollectionStr,
list(_Database[__CollectionStr].find())
)
if __CollectionStr not in ['system.indexes']
else None,
_Database.collection_names()
)
)
)
#Debug
'''
print('_Database is ')
print(_Database)
print('id(_Database) is')
print(id(_Database))
print("'ParentDerivePymongoer' in _Database.__dict__")
print('ParentDerivePymongoer' in _Database.__dict__)
print('')
'''
#Get the childs database dicts
if 'ParentDerivePymongoer' in _Database.__dict__:
#Debug
'''
print('_Database.ParentDerivePymongoer is '+SYS._str(_Database.__dict__[
'ParentDerivePymongoer']))
print('')
'''
#update
PrintDatabaseOrderedDictDict.update(
collections.OrderedDict(
filter(
lambda __ItemTuple:
len(__ItemTuple[1])>0,
SYS.filterNone(
map(
lambda __ManagerItemTuple:
getPrintManagerItemTuple(__ManagerItemTuple),
_Database.__dict__[
'ParentDerivePymongoer'
].TeamDict.items()
)
)
)
)
)
#return
return {_Database._Database__name:PrintDatabaseOrderedDictDict}
示例6: do_command
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import filterNone [as 别名]
def do_command(self):
""" """
#/####################/#
# Adapt the type for getting things to command
#
#debug
'''
self.debug(
[
'Adapt the type for getting things to command',
("self.",self,[
'CommandingGetVariable',
'CommandingSetVariable'
])
]
)
'''
#Check
if type(self.CommandingGetVariable)!=list:
#debug
'''
self.debug(
[
'We get nicely',
('self.',self,['CommandingGetVariable'])
]
)
'''
#get
CommandedValueVariablesList=self[
self.CommandingGetVariable
]
#Check
if type(CommandedValueVariablesList)!=list:
CommandedValueVariablesList=[CommandedValueVariablesList]
else:
#map a get
CommandedValueVariablesList=map(
lambda __CommandingGetVariable:
self[__CommandingGetVariable],
self.CommandingGetVariable
)
#flat maybe
CommandedValueVariablesList=SYS.flat(CommandedValueVariablesList)
#filter
CommandedValueVariablesList=SYS.filterNone(CommandedValueVariablesList)
#debug
'''
self.debug(
[
'in the end, CommandedValueVariablesList is ',
SYS._str(CommandedValueVariablesList)
]
)
'''
#/###################/#
# Check if we have to walk before
#
#Check
if self.CommandingBeforeWalkRigidBool:
#debug
'''
self.debug(
[
'we are going to walk before the command',
'CommandedValueVariablesList is '+SYS._str(CommandedValueVariablesList),
'self.getDoing(SYS.CommanderClass).values() is '+SYS._str
(self.getDoing(
SYS.CommanderClass).values())
]
)
'''
#Debug
'''
for __CommandedValueVariable in CommandedValueVariablesList:
#debug
self.debug(
'__CommandedValueVariable is '+SYS._str( __CommandedValueVariable)
)
#set
__CommandedValueVariable.set(
'GettingNewBool',False
).command(
#.........这里部分代码省略.........
示例7: setCommandingExtraKeyVariable
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import filterNone [as 别名]
#.........这里部分代码省略.........
elif StructuringTeamerCommandKeyVariable=="#all":
#all the key
StructureKeyStrsList=self.TeamDict.keys()
else:
#mapCondition
StructureKeyStrsList=self.mapCondition(
StructuringTeamerCommandKeyVariable,
self.TeamDict.keys(),
_SetAttrOrCallBool=True
)
#/###############/#
# Now get and filter in the team
#
#debug
'''
self.debug(
[
'We get the managed values in the Teamer',
'StructureKeyStrsList is ',
SYS._str(StructureKeyStrsList)
]
)
'''
#set
setattr(
self,
CommandingKeyVariableKeyStr,
SYS.filterNone(
map(
lambda __KeyStr:
self.TeamDict[__KeyStr]
if __KeyStr in self.TeamDict
else None,
StructureKeyStrsList
)
)
)
else:
#/###############/#
# Determine the CommandedLiargVariablesList
#
#debug
'''
self.debug(
[
'We setCommandingKeyVariable in a manager',
('self.',self,['StructuringManagerCommandKeyVariable'])
]
)
'''
#/##################/#
# get
#
#set
StructuringCommandKeyVariableKeyStr='StructuringManagerCommand'+_ExtraStr+'KeyVariable'
示例8: do_parent
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import filterNone [as 别名]
#.........这里部分代码省略.........
)
)
#debug
'''
self.debug(
[
'The ParentedTotalListDict is setted',
'self.ParentedTotalListDict.keys() is ',
str(self.ParentedTotalListDict.keys())
]
)
'''
#Check
if self.ParentDeriveTeamerVariable.TeamTagStr!='':
#init with
self.ParentedTotalSingularListDict=ListDict(
[(
SYS.getSingularStrWithPluralStr(
self.ParentDeriveTeamerVariable.TeamTagStr
),
self.ParentDeriveTeamerVariable.ParentDeriveTeamerVariable
)]
)
else:
#init
self.ParentedTotalSingularListDict=ListDict()
#dict
self.ParentedTotalSingularListDict.update(
SYS.filterNone(
map(
lambda __ParentedTotalDeriveTeamer:
(
SYS.getSingularStrWithPluralStr(
__ParentedTotalDeriveTeamer.ParentDeriveTeamerVariable.TeamTagStr
),
__ParentedTotalDeriveTeamer
)
if __ParentedTotalDeriveTeamer.ParentDeriveTeamerVariable!=None
else None,
self.ParentedTotalDeriveTeamersList
)
)
)
#/####################/#
# Now build the paths
#
#map
[
self.ParentedTotalPathStr,
self.ParentedTeamPathStr,
self.ParentedManagementPathStr,
]=map(
lambda __ParentedList:
Pather.PathPrefixStr+Pather.PathPrefixStr.join(
SYS.reverse(
map(
lambda __ParentedDeriveTeamer:
示例9: do_explore
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import filterNone [as 别名]
def do_explore(self):
""" """
#debug
'''
self.debug(
[
"We explore here"
]
)
'''
#Check
if self.ExploredSucessesInt < self.ExploringSuccessesInt:
#
# Prepare
#
#Check
if hasattr(self.ExploringRangeVariable,'items'):
self.ExploredRangeTuplesList=self.ExploringRangeVariable.items()
#Check
if hasattr(self.ExploringConditionVariable,'items'):
self.ExploredConditionTuplesList=self.ExploringConditionVariable.items()
#Check
if len(self.ExploredRangeTuplesList)!=len(self.ExploredParameterStrsList):
self.ExploredParameterStrsList = map(
lambda __TuplesList:__TuplesList[0],
self.ExploredRangeTuplesList
)
#
# Prepare Children
#
#Check
if self.ExploredManagersVariable == None:
#debug
self.debug(
[
('self.',self,[
'TeamingClassesDict'
])
]
)
#sum
self.ExploredManagersVariable = SYS.sum(
SYS.filterNone(
map(
lambda __TeamStr:
self.TeamDict[__TeamStr].ManagementDict.values()
if __TeamStr in self.TeamDict
else None,
self.TeamingClassesDict.keys()
)
)
)
#Check
if self.ParentDeriveTeamerVariable == None:
#coordinate one first time
self.coordinate(self.ExploringMethodStr)
#set
ExploredTopMethodStr=self.ExploringMethodStr+"Top"
#Check
if hasattr(self,ExploredTopMethodStr):
#set
self.ExploredMethodStr = ExploredTopMethodStr
if self.ExploredMethodStr=="":
self.ExploredMethodStr = self.ExploringMethodStr
#
# Pick
#
#Check
while self.ExploringTrialsInt > self.ExploredTrialsInt :
#count
self.ExploredTrialsInt +=1
#debug
'''
self.debug(
[
"We test with a new trial set",
('self.',self,[
'ExploredTrialsInt'
])
]
#.........这里部分代码省略.........
示例10: do_reboot
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import filterNone [as 别名]
def do_reboot(self):
# debug
"""
self.debug(
[
'self.__dict__.keys() is '+str(self.__dict__.keys()),
('self.',self,[
'RebootingDoStrsList',
'RebootingNameStrsList'
])
]
)
"""
# filter
self.RebootedWatchBoolKeyStrsList = SYS._filter(
lambda _KeyStr: (_KeyStr.startswith("_Watch") or _KeyStr.startswith("Watch"))
and (
"Watch".join(_KeyStr.split("Watch")[1:]).split("With")[0] in self.RebootingDoStrsList
if self.RebootingAllDoBool == False
else True
)
and (
any(map(lambda __NameStr: _KeyStr.endswith(__NameStr + "Bool"), self.RebootingNameStrsList))
if self.RebootingAllNameBool == False
else True
),
self.__dict__.keys(),
)
# map
map(
lambda __RebootedWatchBoolKeyStr: self.__setattr__(
__RebootedWatchBoolKeyStr if __RebootedWatchBoolKeyStr[0] != "_" else __RebootedWatchBoolKeyStr[1:],
False,
),
self.RebootedWatchBoolKeyStrsList,
)
# Check
if self.RebootingSetDoIsBool:
# set
if self.RebootingAllNameBool:
# filter
self.RebootingNameStrsList = SYS.filterNone(
map(
lambda __MroClass: __MroClass.NameStr if hasattr(__MroClass, "DoStr") else None,
self.__class__.__mro__,
)
)
# debug
"""
self.debug(('self.',self,['RebootingNameStrsList']))
"""
# map
map(
lambda __RebootingClass: self.setDone(__RebootingClass)
# if hasattr(__RebootingClass,'DoneAttributeVariablesOrderedDict')
# else None,
,
map(
lambda __RebootingClassStr: getattr(SYS, __RebootingClassStr)
# if hasattr(SYS,__RebootingClassStr)
# else None
,
map(SYS.getClassStrWithNameStr, self.RebootingNameStrsList),
),
)
示例11: setCommandingKeyVariable
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import filterNone [as 别名]
def setCommandingKeyVariable(self):
#/##################/#
# Switch case depending on the team or manage level
#
#debug
'''
self.debug(
[
'We setCommandingKeyVariable here',
('self.',self,[
'TeamedOnceBool',
'StructureTeamerCommandKeyRigidVariable',
'StructureManagerCommandKeyRigidVariable'
]),
'We get the good team or management keys'
]
)
'''
#Check
if self.TeamedOnceBool:
#/##################/#
# get
#
#get
StructureTeamerCommandKeyRigidVariable=getattr(
self,
'StructureTeamerCommandKeyRigidVariable'
)
#debug
'''
self.debug(
[
'StructureTeamerCommandKeyRigidVariable is ',
SYS._str(StructureTeamerCommandKeyRigidVariable)
]
)
'''
#/###############/#
# Determine the CommandedLiargVariablesList
#
#Check
if StructureTeamerCommandKeyRigidVariable==None:
#all the key
StructureKeyStrsList=[]
#Check
elif type(StructureTeamerCommandKeyRigidVariable)==list and len(
StructureTeamerCommandKeyRigidVariable
)>0 and type(
StructureTeamerCommandKeyRigidVariable[0]
)==str:
#alias
StructureKeyStrsList=StructureTeamerCommandKeyRigidVariable
#Check
elif StructureTeamerCommandKeyRigidVariable=="#all":
#all the key
StructureKeyStrsList=self.TeamDict.keys()
else:
#mapCondition
StructureKeyStrsList=self.mapCondition(
StructureTeamerCommandKeyRigidVariable,
self.TeamDict.keys(),
_SetAttrOrCallBool=True
)
#/###############/#
# Now get and filter in the team
#
#debug
'''
self.debug(
[
'We get the managed values in the Teamer',
'StructureKeyStrsList is ',
SYS._str(StructureKeyStrsList)
]
)
'''
#set
setattr(
self,
'CommandingKeyVariable',
SYS.filterNone(
map(
#.........这里部分代码省略.........
示例12: do_find
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import filterNone [as 别名]
def do_find(self):
#debug
'''
self.debug(
[
'we are going to find',
("self.",self,[
'FindingWhereVariable'
])
]
)
'''
#/###################/#
# Case of mongo
#
#If the FoundMongoIsBool was not yet setted
if self.FoundMongoIsBool==False:
#debug
'''
self.debug(
[
'FoundMongoRowDictsList was not yet setted'
]
)
'''
#Check
if self.ModelMongoBool:
#find in the list
self.FoundMongoRowDictsList=list(
self.ModeledMongoCollection.find(
self.FindingWhereVariable
)
)
#set
self.FoundMongoIsBool=True
#debug
'''
self.debug(
[
("self.",self,['FoundMongoRowDictsList'])
]
)
'''
#/###################/#
# Case of hdf
#
#If the FoundHdfIsBool was not yet setted
if self.FoundHdfIsBool==False:
#debug
'''
self.debug(
[
'FoundHdfRowDictsList was not yet setted',
]
)
'''
#Check
if self.ModelHdfBool:
#Take the first one in the list
self.FoundHdfRowDictsList=Rower.getRowedDictsListWithTable(
#self.TabularedHdfGroupVariable._f_getChild(
# self.TabularedHdfKeyStrsList[0]
#)
self.ModeledHdfTable
)
#set
self.FoundHdfIsBool=True
#debug
'''
self.debug(
[
("self.",self,['FoundHdfRowDictsList'])
]
)
'''
#Now we find with a condition Tuples list
self.FoundHdfRowDictsList=SYS.filterNone(
SYS.where(
self.FoundHdfRowDictsList,
self.FindingWhereVariable
)
)
#debug
#.........这里部分代码省略.........
示例13: do_merge
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import filterNone [as 别名]
def do_merge(self):
#Check
if self.ModelingHdfBool:
#debug
'''
self.debug(
('self.',self,[
'ModeledKeyStr',
'MergingConditionVariable',
'TabularedTableKeyStrsList'
])
)
'''
#Debug
'''
print(
map(
lambda __TabularedKeyStr:
__TabularedKeyStr.split(Shaper.ShapingJoiningStr),
self.TabularedTableKeyStrsList
)
)
'''
#Bind with MergedShapingDictsList setting
MergedShapingDictsList=map(
lambda __StrsList:
dict(
map(
lambda __ShapingStr:
SYS.getUnSerializedTuple(
self.NodePointDeriveNoder,
__ShapingStr.split(
Shaper.ShapingTuplingStr
)
)
#Remove the suffix and the prefix
,__StrsList[1:-1] if len(__StrsList)>2 else []
)
),
map(
lambda __TabularedKeyStr:
__TabularedKeyStr.split(Shaper.ShapingJoiningStr),
self.TabularedTableKeyStrsList
)
)
#debug
'''
self.debug('MergedShapingDictsList is '+str(MergedShapingDictsList))
'''
#Bind with MergedFilteredShapingDictsList
MergedFilteredShapingDictsList=SYS.where(
MergedShapingDictsList,
self.MergingConditionVariable
)
#debug
'''
self.debug('MergedFilteredShapingDictsList is '+str(MergedFilteredShapingDictsList))
'''
#Bind with MergedTablesList setting
MergedTablesList=SYS.filterNone(
map(
lambda __Table,__MergedFilteredShapingDict:
__Table
if __MergedFilteredShapingDict!=None
else None,
self.TabularedTablesOrderedDict.values(),
MergedFilteredShapingDictsList
))
MergedRowedDictsListsList=map(
lambda __MergedTable:
map(
lambda __RowedDict:
dict(__RowedDict,**{
'TabledInt':int(
__MergedTable.name.split(Tabler.TablingOrderStr)[1]
)
}
),
Rower.getRowedDictsListWithTable(__MergedTable)
),
MergedTablesList
)
#debug
'''
self.debug('MergedRowedDictsListsList is '+str(MergedRowedDictsListsList))
'''
#Reduce
if len(MergedRowedDictsListsList)>0:
#.........这里部分代码省略.........
示例14: do_reboot
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import filterNone [as 别名]
def do_reboot(self):
#set
if self.RebootingAllNameBool:
#filter
self.RebootingNameStrsList=SYS.filterNone(
map(
lambda __MroClass:
__MroClass.NameStr
if hasattr(__MroClass,'DoStr')
else None,
self.__class__.__mro__
)
)
#set
if self.RebootingAllDoBool:
#filter
self.RebootingDoStrsList=SYS.filterNone(
map(
lambda __MroClass:
__MroClass.DoStr
if hasattr(__MroClass,'DoStr')
else None,
self.__class__.__mro__
)
)
#debug
'''
self.debug(
('self.',self,[
'RebootingDoStrsList',
'RebootingNameStrsList'
])
)
'''
#map
map(
lambda __RebootingNameStr:
self.setSwitch(
__RebootingNameStr,
self.RebootingDoStrsList
),
self.RebootingNameStrsList
)
#Check
if self.RebootingSetDoIsBool:
#debug
'''
self.debug(('self.',self,['RebootingNameStrsList']))
'''
#map
map(
lambda __RebootingClass:
self.setDone(
__RebootingClass
)
#if hasattr(__RebootingClass,'DoneAttributeVariablesOrderedDict')
#else None,
,map(
lambda __RebootingClassStr:
getattr(
SYS,
__RebootingClassStr
)
#if hasattr(SYS,__RebootingClassStr)
#else None
,map(SYS.getClassStrWithNameStr,self.RebootingNameStrsList)
)
)