This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
list1 = ['a', 'b', 'c'] | |
list2 = map(lambda x: x+'z' if x == 'b' else x, list1) | |
print list2 | |
>>>結果 | |
['a', 'bz', 'c'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
#ダイクストラ法 | |
from maya import cmds | |
from collections import OrderedDict | |
import maya.api.OpenMaya as om2 | |
import math | |
import copy | |
import time | |
def dijkstras(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
#A*アルゴリズム | |
from maya import cmds | |
from collections import OrderedDict | |
import maya.api.OpenMaya as om2 | |
import math | |
import copy | |
import time | |
#ヒューリスティック関数,ゴールからのユークリッド距離を算出 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from maya import cmds | |
from maya import OpenMayaUI | |
from collections import OrderedDict | |
import maya.api.OpenMaya as om | |
import math | |
import copy | |
import time | |
import numpy as np | |
#PySide2、PySide両対応 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import math | |
import imp | |
try: | |
imp.find_module('PySide2') | |
from PySide2.QtWidgets import * | |
from PySide2.QtGui import * | |
from PySide2.QtCore import * | |
except ImportError: | |
from PySide.QtGui import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from maya import cmds | |
import math | |
import imp | |
try: | |
imp.find_module('PySide2') | |
from PySide2.QtWidgets import * | |
from PySide2.QtGui import * | |
from PySide2.QtCore import * | |
except ImportError: | |
from PySide.QtGui import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import imp | |
try: | |
imp.find_module('PySide2') | |
from PySide2.QtWidgets import * | |
from PySide2.QtGui import * | |
from PySide2.QtCore import * | |
except ImportError: | |
from PySide.QtGui import * | |
from PySide.QtCore import * | |
from maya.app.general.mayaMixin import MayaQWidgetBaseMixin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import imp | |
try: | |
imp.find_module('PySide2') | |
from PySide2.QtWidgets import * | |
from PySide2.QtGui import * | |
from PySide2.QtCore import * | |
except ImportError: | |
from PySide.QtGui import * | |
from PySide.QtCore import * | |
from maya.app.general.mayaMixin import MayaQWidgetBaseMixin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import imp | |
try: | |
imp.find_module('PySide2') | |
from PySide2.QtWidgets import * | |
from PySide2.QtGui import * | |
from PySide2.QtCore import * | |
except ImportError: | |
from PySide.QtGui import * | |
from PySide.QtCore import * | |
from maya.app.general.mayaMixin import MayaQWidgetBaseMixin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from maya import cmds | |
from maya.app.general.mayaMixin import MayaQWidgetBaseMixin | |
import time | |
import imp | |
try: | |
imp.find_module('PySide2') | |
from PySide2.QtWidgets import * | |
from PySide2.QtGui import * | |
from PySide2.QtCore import * |
OlderNewer