This file contains hidden or 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
| ``` | |
| план на тыщу шагов так что на каждый вызывай субагента, не передавай им лишний контекст, только необходимое. Переформулируй задачу перед каждым запуском с учетом информации полученной с прошлого шага. | |
| Он делает задачу, а ты проверяешь его работу, принимаешь по гейту (не субагент а ты), не проходит - значит анализируй ошибки его, правь задачу субагента и делай вторую попытку с 0, если получилось то делай коммит в этот репозиторий. | |
| задача 1) получи доступ ssh до сервера Alpha , креды не пали (в .env файле адрес, пароль и логин), проверь права, обнови пакеты, сеть, проверь версии софта. | |
| твой гейт 1: запись о конфигурации в файл alhpaspec.md, правах, контейнерах и портах и софте установленном на сервере в этом репозитории |
This file contains hidden or 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
| def clarify_skus_by_clustering(faces_features, skus_features): | |
| """ | |
| :param faces_features: фичи реальных боксов, классов и ценников (после PCA) | |
| :param skus_features: данные от клиента о физ. размерах товара, диапазоне цен ит.п. (после PCA) | |
| :return: cluster_centers_mapped, skus, where | |
| cluster_centers_mapped is dict(skuname: clustercenter features) | |
| sksu is list() with corresponding skus_features idx for each face feature. | |
| """ | |
| max_n_clusters = min(len(skus_features), len(np.unique(faces_features, axis=0))) |
This file contains hidden or 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
| def decode_prediction(self): | |
| boxes, scores, classes = self.result_q['results'][0], self.result_q['results'][1], self.result_q['results'][2] | |
| event = self.result_q['extras']['event'] | |
| # If we have no symbol names here, we can not handle it further | |
| if classes.any(): | |
| event.sm_boxes = [boxes[i][_slice] for i, _slice in enumerate(scores.astype(bool))] | |
| event.sm_scores = [scores[i][_slice] for i, _slice in enumerate(scores.astype(bool))] | |
| sm_names = [classes[i][_slice] for i, _slice in enumerate(scores.astype(bool))] | |
| sm_names = [list(map(lambda x: self.category_index[x]['name'], x)) for x in sm_names] |
This file contains hidden or 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
| Python 3.5.2 (default, Nov 12 2018, 13:43:14) | |
| [GCC 5.4.0 20160609] on linux | |
| >>> class A: | |
| ... def __init__(self): | |
| ... self.x = 5 | |
| ... | |
| >>> r = A() | |
| >>> r.x | |
| 5 | |
| >>> A().x |
This file contains hidden or 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
| class SoundMaster(threading.Thread): | |
| def run(self): | |
| print('Playing Sound!!!') | |
| subprocess.call(["ffplay", "-nodisp", "-autoexit", "-loglevel", "panic", audio_file_path]) | |
| print('End of sound.') | |
| class MainProgram: | |
| def __init__(self): | |
| self._sound_thread = None |
This file contains hidden or 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
| class Movable: | |
| def move_up(self, distance): | |
| self.y -= distance | |
| def move_down(self, distance): | |
| self.y += distance | |
| def move_left(self, distance): | |
| self.x -= distance |
This file contains hidden or 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
| def move_up(self, distance): | |
| self.y -= distance | |
| def move_down(self, distance): | |
| self.y += distance | |
| def move_left(self, distance): | |
| self.x -= distance |
This file contains hidden or 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
| ActionThread.ThreadFunc: [1099/1126] Link (ld) libUE4Editor-AndroidMediaEditor.so | |
| ActionThread.ThreadFunc: [1100/1126] Link (ld) libUE4Editor-TextureFormatASTC.so | |
| ActionThread.ThreadFunc: [1101/1126] Link (ld) libUE4Editor-AndroidMediaFactory.so | |
| ActionThread.ThreadFunc: [1102/1126] Link (ld) libUE4Editor-AndroidDeviceProfileSelector.so | |
| ActionThread.ThreadFunc: [1103/1126] Link (ld) libUE4Editor-KDevelopSourceCodeAccess.so | |
| ActionThread.ThreadFunc: [1104/1126] Link (ld) libUE4Editor-CodeLiteSourceCodeAccess.so | |
| ActionThread.ThreadFunc: [1105/1126] Link (ld) libUE4Editor-NullNetworkReplayStreaming.so | |
| ActionThread.ThreadFunc: [1106/1126] Link (ld) libUE4Editor-AvfMediaFactory.so | |
| ActionThread.ThreadFunc: [1107/1126] Link (ld) libUE4Editor-VisualStudioCodeSourceCodeAccess.so | |
| ActionThread.ThreadFunc: [1108/1126] Link (ld) libUE4Editor-ArchVisCharacter.so |
This file contains hidden or 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 plotly import __version__ | |
| from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot | |
| from plotly import graph_objs as go | |
| init_notebook_mode(connected = True) | |
| def plotly_df(df, title = ''): | |
| data = [] | |
| for column in df.columns: | |
| trace = go.Scatter( |
This file contains hidden or 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
| for i , j in enumerate((2 ** x for x in range(0,11))): | |
| print(i, j) | |
| 0 1 | |
| 1 2 | |
| 2 4 | |
| 3 8 | |
| 4 16 | |
| 5 32 | |
| 6 64 |
NewerOlder