| "The Turing Option" | Modern AI/LLM Equivalent |
|---|---|
| Agents (mindless basic units) | Individual sub-agents. Tools, skills. Mixture of Experts (MoE). |
| Agent Societies (agents coordinating together) | Multiple agents working together, Counsil of LLMs |
| A-brain (primary processing) |
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
| const token = localStorage.getItem('token') | |
| const response = await fetch(apiURL, { | |
| method: 'POST', | |
| headers: { | |
| 'Content-type': 'application/json', | |
| 'Authorization': `Bearer ${token}`, // notice the Bearer before your token | |
| }, | |
| body: JSON.stringify(yourNewData) | |
| }) |
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
| # @ https://cheat.readthedocs.io/en/latest/python/mock.html | |
| obj.call_count # number of times it was called | |
| obj.called == obj.call_count > 0 | |
| obj.call_args_list # a list of (args,kwargs), one for each call | |
| obj.call_args # obj.call_args_list[-1] (args,kwargs from last call) | |
| obj.return_value # set to what it should return | |
| obj.side_effect # set to an exception class or instance that should be raised when its called | |
| obj.assert_called() # doesn't work with autospec=True? just assert obj.called | |
| obj.assert_called_with(*args, **kwargs) # last call was with (*args, **kwargs) |
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
| <?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
| <!--Created by yFiles for HTML 2.1.0.3-RC3--> | |
| <graphml xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://www.yworks.com/xml/schema/graphml.html/2.0/ygraphml.xsd " xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:demostyle="http://www.yworks.com/yFilesHTML/demos/FlatDemoStyle/1.0" xmlns:bpmn="http://www.yworks.com/xml/yfiles-for-html/bpmn/2.0" xmlns:demotablestyle="http://www.yworks.com/yFilesHTML/demos/FlatDemoTableStyle/1.0" xmlns:uml="http://www.yworks.com/yFilesHTML/demos/UMLDemoStyle/1.0" xmlns:compat="http://www.yworks.com/xml/yfiles-compat-arrows/1.0" xmlns:VuejsNodeStyle="http://www.yworks.com/demos/yfiles-vuejs-node-style/1.0" xmlns:y="http://www.yworks.com/xml/yfiles-common/3.0" xmlns:x="http://www.yworks.com/xml/yfiles-common/markup/3.0" xmlns:yjs="http://www.yworks.com/xml/yfiles-for-html/2.0/xaml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
| <key id="d0" for="node" attr.type="boolean" attr.name="Expanded" y:attr.ur |
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
| import dask | |
| class MongoDaskBag: | |
| def __init__(db_name, collection_name): | |
| self.db_name =self.db_name | |
| self.collection_name = collection_name | |
| def bag(self, partition_size: int = 1000, partitions_num: int = None): | |
| with pymongo.MongoClient() as mongo_client: | |
| collection = mongo_client[self.db_name][self.collection_name] |
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 AttentionWithContext(Layer): | |
| """ | |
| Attention operation, with a context/query vector, for temporal data. | |
| Supports Masking. | |
| Follows the work of Yang et al. [https://www.cs.cmu.edu/~diyiy/docs/naacl16.pdf] | |
| "Hierarchical Attention Networks for Document Classification" | |
| by using a context vector to assist the attention | |
| # Input shape | |
| 3D tensor with shape: `(samples, steps, features)`. | |
| # Output shape |
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
| # coding=utf-8 | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| from scipy.spatial import Voronoi | |
| from shapely.geometry import Polygon | |
| def voronoi_finite_polygons_2d(vor, radius=None): | |
| """ | |
| Reconstruct infinite voronoi regions in a 2D diagram to finite | |
| regions. |
Tornado HTTP web page with embedded Bokeh widget which communicates with other page of the same application
Tornado HTTP web page with embedded Bokeh widget which communicates with other page of the same application.
- Full Tornado server
- Bokeh server is started from Tornado server and is executed in the same ioloop
- Embedded Bohek widget by
autoload_server - 2 web page communication:
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
| test_1 | |
| tst_2 |