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
| #include <iostream> | |
| #include <cassert> | |
| #include <string> | |
| // Algebraic type | |
| enum ShapeType { CIRCLE, RECTANGLE, ZERO }; | |
| struct Circle { int cx, cy, r; static const ShapeType type = CIRCLE; }; | |
| struct Rectangle { int x, y, w, h; static const ShapeType type = RECTANGLE; }; | |
| struct Zero { static const ShapeType type = ZERO; }; |
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
| #!/usr/bin/env python3 | |
| import socket | |
| import pyarrow as pa | |
| import pyarrow.ipc | |
| listen = "127.0.0.1" | |
| port = 56565 | |
| with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock: |
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
| /* | |
| * Minimal C++ implementation of Functor, Monad and Maybe. | |
| * | |
| * Requires c++0x variadic templates and lambda expressions: | |
| * | |
| * g++ -std=c++0x main.cpp -o main | |
| * | |
| * fmap, monadic bind and return implementations for std::vector | |
| * and Maybe. | |
| * |
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
| CheckOptions: | |
| - key: readability-identifier-naming.ClassCase | |
| value: CamelCase | |
| - key: readability-identifier-naming.ClassMemberCase | |
| value: lower_case | |
| - key: readability-identifier-naming.ConstexprVariableCase | |
| value: CamelCase | |
| - key: readability-identifier-naming.ConstexprVariablePrefix | |
| value: k | |
| - key: readability-identifier-naming.EnumCase |
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
| """ | |
| Pcap class to more easily interact with pcaps | |
| When in doubt, aim for simplicity of requests API | |
| Like pyshark, but for the wireshark utilities | |
| """ | |
| import os | |
| import subprocess as sp | |
| import re | |
| import pprint | |
| import tempfile |
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
| // an example to create a new mapping `ctrl-y` | |
| mapkey("<Ctrl-y>", "Show me the money", function () { | |
| Front.showPopup( | |
| "a well-known phrase uttered by characters in the 1996 film Jerry Maguire (Escape to close)." | |
| ); | |
| }); | |
| // an example to replace `T` with `gt`, click `Default mappings` to see how `T` works. | |
| map("gt", "T"); | |
| // an example to remove mapkey `Ctrl-i` |
This file has been truncated, but you can view the full file.
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
| Configuration: | |
| [settings] | |
| arch=x86_64 | |
| arch_build=x86_64 | |
| build_type=Debug | |
| compiler=clang | |
| compiler.libcxx=libstdc++11 | |
| compiler.version=10 | |
| os=Linux | |
| os_build=Linux |
This file has been truncated, but you can view the full file.
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
| Configuration: | |
| [settings] | |
| arch=x86_64 | |
| arch_build=x86_64 | |
| build_type=Debug | |
| compiler=clang | |
| compiler.libcxx=libstdc++11 | |
| compiler.version=10 | |
| os=Linux | |
| os_build=Linux |
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
| #!/usr/bin/python3 | |
| import asyncio | |
| import time | |
| import socket | |
| import sys | |
| import aiohttp | |
| class MyConnector(aiohttp.TCPConnector): |
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
| style: | |
| @for src in $(SOURCES) ; do \ | |
| echo "Formatting $$src..." ; \ | |
| clang-format -i "$(SRC_DIR)/$$src" ; \ | |
| clang-tidy -checks='-*,readability-identifier-naming' \ | |
| -config="{CheckOptions: [ \ | |
| { key: readability-identifier-naming.NamespaceCase, value: lower_case },\ | |
| { key: readability-identifier-naming.ClassCase, value: CamelCase },\ | |
| { key: readability-identifier-naming.StructCase, value: CamelCase },\ | |
| { key: readability-identifier-naming.FunctionCase, value: camelBack },\ |
NewerOlder