|
99 | 99 | }, |
100 | 100 | { |
101 | 101 | "cell_type": "code", |
102 | | - "execution_count": 5, |
| 102 | + "execution_count": 3, |
103 | 103 | "metadata": {}, |
104 | 104 | "outputs": [ |
105 | 105 | { |
106 | | - "data": { |
107 | | - "text/html": [ |
108 | | - "<style type=\"text/css\">.highlight .hll { background-color: #ffffcc }\n", |
109 | | - ".highlight { background: #f8f8f8; }\n", |
110 | | - ".highlight .c { color: #408080; font-style: italic } /* Comment */\n", |
111 | | - ".highlight .err { border: 1px solid #FF0000 } /* Error */\n", |
112 | | - ".highlight .k { color: #008000; font-weight: bold } /* Keyword */\n", |
113 | | - ".highlight .o { color: #666666 } /* Operator */\n", |
114 | | - ".highlight .ch { color: #408080; font-style: italic } /* Comment.Hashbang */\n", |
115 | | - ".highlight .cm { color: #408080; font-style: italic } /* Comment.Multiline */\n", |
116 | | - ".highlight .cp { color: #BC7A00 } /* Comment.Preproc */\n", |
117 | | - ".highlight .cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */\n", |
118 | | - ".highlight .c1 { color: #408080; font-style: italic } /* Comment.Single */\n", |
119 | | - ".highlight .cs { color: #408080; font-style: italic } /* Comment.Special */\n", |
120 | | - ".highlight .gd { color: #A00000 } /* Generic.Deleted */\n", |
121 | | - ".highlight .ge { font-style: italic } /* Generic.Emph */\n", |
122 | | - ".highlight .gr { color: #FF0000 } /* Generic.Error */\n", |
123 | | - ".highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */\n", |
124 | | - ".highlight .gi { color: #00A000 } /* Generic.Inserted */\n", |
125 | | - ".highlight .go { color: #888888 } /* Generic.Output */\n", |
126 | | - ".highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */\n", |
127 | | - ".highlight .gs { font-weight: bold } /* Generic.Strong */\n", |
128 | | - ".highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */\n", |
129 | | - ".highlight .gt { color: #0044DD } /* Generic.Traceback */\n", |
130 | | - ".highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */\n", |
131 | | - ".highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */\n", |
132 | | - ".highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */\n", |
133 | | - ".highlight .kp { color: #008000 } /* Keyword.Pseudo */\n", |
134 | | - ".highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */\n", |
135 | | - ".highlight .kt { color: #B00040 } /* Keyword.Type */\n", |
136 | | - ".highlight .m { color: #666666 } /* Literal.Number */\n", |
137 | | - ".highlight .s { color: #BA2121 } /* Literal.String */\n", |
138 | | - ".highlight .na { color: #7D9029 } /* Name.Attribute */\n", |
139 | | - ".highlight .nb { color: #008000 } /* Name.Builtin */\n", |
140 | | - ".highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */\n", |
141 | | - ".highlight .no { color: #880000 } /* Name.Constant */\n", |
142 | | - ".highlight .nd { color: #AA22FF } /* Name.Decorator */\n", |
143 | | - ".highlight .ni { color: #999999; font-weight: bold } /* Name.Entity */\n", |
144 | | - ".highlight .ne { color: #D2413A; font-weight: bold } /* Name.Exception */\n", |
145 | | - ".highlight .nf { color: #0000FF } /* Name.Function */\n", |
146 | | - ".highlight .nl { color: #A0A000 } /* Name.Label */\n", |
147 | | - ".highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */\n", |
148 | | - ".highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */\n", |
149 | | - ".highlight .nv { color: #19177C } /* Name.Variable */\n", |
150 | | - ".highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */\n", |
151 | | - ".highlight .w { color: #bbbbbb } /* Text.Whitespace */\n", |
152 | | - ".highlight .mb { color: #666666 } /* Literal.Number.Bin */\n", |
153 | | - ".highlight .mf { color: #666666 } /* Literal.Number.Float */\n", |
154 | | - ".highlight .mh { color: #666666 } /* Literal.Number.Hex */\n", |
155 | | - ".highlight .mi { color: #666666 } /* Literal.Number.Integer */\n", |
156 | | - ".highlight .mo { color: #666666 } /* Literal.Number.Oct */\n", |
157 | | - ".highlight .sa { color: #BA2121 } /* Literal.String.Affix */\n", |
158 | | - ".highlight .sb { color: #BA2121 } /* Literal.String.Backtick */\n", |
159 | | - ".highlight .sc { color: #BA2121 } /* Literal.String.Char */\n", |
160 | | - ".highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */\n", |
161 | | - ".highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */\n", |
162 | | - ".highlight .s2 { color: #BA2121 } /* Literal.String.Double */\n", |
163 | | - ".highlight .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */\n", |
164 | | - ".highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */\n", |
165 | | - ".highlight .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */\n", |
166 | | - ".highlight .sx { color: #008000 } /* Literal.String.Other */\n", |
167 | | - ".highlight .sr { color: #BB6688 } /* Literal.String.Regex */\n", |
168 | | - ".highlight .s1 { color: #BA2121 } /* Literal.String.Single */\n", |
169 | | - ".highlight .ss { color: #19177C } /* Literal.String.Symbol */\n", |
170 | | - ".highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */\n", |
171 | | - ".highlight .fm { color: #0000FF } /* Name.Function.Magic */\n", |
172 | | - ".highlight .vc { color: #19177C } /* Name.Variable.Class */\n", |
173 | | - ".highlight .vg { color: #19177C } /* Name.Variable.Global */\n", |
174 | | - ".highlight .vi { color: #19177C } /* Name.Variable.Instance */\n", |
175 | | - ".highlight .vm { color: #19177C } /* Name.Variable.Magic */\n", |
176 | | - ".highlight .il { color: #666666 } /* Literal.Number.Integer.Long */</style><div class=\"highlight\"><pre><span></span><span class=\"p\">{</span>\n", |
177 | | - " <span class=\"nt\">"x_foo"</span><span class=\"p\">:</span> <span class=\"s2\">"bar"</span><span class=\"p\">,</span>\n", |
178 | | - " <span class=\"nt\">"type"</span><span class=\"p\">:</span> <span class=\"s2\">"identity"</span><span class=\"p\">,</span>\n", |
179 | | - " <span class=\"nt\">"id"</span><span class=\"p\">:</span> <span class=\"s2\">"identity--8d7f0697-e589-4e3b-aa57-cae798d2d138"</span><span class=\"p\">,</span>\n", |
180 | | - " <span class=\"nt\">"created"</span><span class=\"p\">:</span> <span class=\"s2\">"2017-09-26T21:02:19.465Z"</span><span class=\"p\">,</span>\n", |
181 | | - " <span class=\"nt\">"modified"</span><span class=\"p\">:</span> <span class=\"s2\">"2017-09-26T21:02:19.465Z"</span><span class=\"p\">,</span>\n", |
182 | | - " <span class=\"nt\">"name"</span><span class=\"p\">:</span> <span class=\"s2\">"John Smith"</span><span class=\"p\">,</span>\n", |
183 | | - " <span class=\"nt\">"identity_class"</span><span class=\"p\">:</span> <span class=\"s2\">"individual"</span>\n", |
184 | | - "<span class=\"p\">}</span>\n", |
185 | | - "</pre></div>\n" |
186 | | - ], |
187 | | - "text/plain": [ |
188 | | - "<IPython.core.display.HTML object>" |
189 | | - ] |
190 | | - }, |
191 | | - "execution_count": 5, |
192 | | - "metadata": {}, |
193 | | - "output_type": "execute_result" |
| 106 | + "name": "stdout", |
| 107 | + "output_type": "stream", |
| 108 | + "text": [ |
| 109 | + "{\n", |
| 110 | + " \"type\": \"identity\",\n", |
| 111 | + " \"id\": \"identity--10761df2-93f6-4eb4-9d02-4fccfe5dc91d\",\n", |
| 112 | + " \"created\": \"2017-11-03T18:20:48.145Z\",\n", |
| 113 | + " \"modified\": \"2017-11-03T18:20:48.145Z\",\n", |
| 114 | + " \"name\": \"John Smith\",\n", |
| 115 | + " \"identity_class\": \"individual\",\n", |
| 116 | + " \"x_foo\": \"bar\"\n", |
| 117 | + "}\n" |
| 118 | + ] |
194 | 119 | } |
195 | 120 | ], |
196 | 121 | "source": [ |
| 122 | + "from stix2 import Identity\n", |
| 123 | + "\n", |
197 | 124 | "identity = Identity(name=\"John Smith\",\n", |
198 | 125 | " identity_class=\"individual\",\n", |
199 | 126 | " custom_properties={\n", |
|
923 | 850 | "language_info": { |
924 | 851 | "codemirror_mode": { |
925 | 852 | "name": "ipython", |
926 | | - "version": 2 |
| 853 | + "version": 3 |
927 | 854 | }, |
928 | 855 | "file_extension": ".py", |
929 | 856 | "mimetype": "text/x-python", |
930 | 857 | "name": "python", |
931 | 858 | "nbconvert_exporter": "python", |
932 | | - "pygments_lexer": "ipython2", |
933 | | - "version": "2.7.12" |
| 859 | + "pygments_lexer": "ipython3", |
| 860 | + "version": "3.5.2" |
934 | 861 | } |
935 | 862 | }, |
936 | 863 | "nbformat": 4, |
|
0 commit comments