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 asyncio | |
import atexit | |
import logging | |
import queue | |
import threading | |
import weakref | |
from concurrent.futures import Executor, Future, InvalidStateError | |
from typing import Any, Callable, Mapping, Optional, Set, Tuple | |
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 React, { useContext, createContext } from 'react'; | |
import useExampleModule from './useExampleModule'; | |
const ExampleContext = createContext(null); | |
export function ExampleProvider({ children }) { | |
const value = useExampleModule(); | |
return ( | |
<ExampleContext.Provider value={value}>{children}</ExampleContext.Provider> | |
); |
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
function logObjectAccess(target, name, depth = 1) { | |
const isProxied = new WeakSet(); | |
return new Proxy(target, { | |
get(target, key, receiver) { | |
const value = Reflect.get(...arguments); | |
console.warn(`Get access to ${name}[${key}]`, value); | |
if ( | |
typeof value === "object" && |
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 React from "react"; | |
import { parse } from "url"; | |
import PropTypes from "prop-types"; | |
import Router from "next/router"; | |
export default class LegacyPageWrapper extends React.Component { | |
static propTypes = { | |
backendHost: PropTypes.string, | |
pageContents: PropTypes.string, | |
allowFollowingLinkToLocation: PropTypes.func, |
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 asyncio | |
import threading | |
import queue | |
import serial | |
import logging | |
logger = logging.getLogger(__name__) | |
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
{ | |
"predef": [ | |
"jQuery", "Backbone", "_", "Handlebars", "window", "BIP", "module", "require", | |
"jasmine", "describe", "it", "expect", "fail", "beforeEach", "afterEach", "beforeAll", "afterAll", "spyOn", "xdescribe", "xit", "pending" | |
], | |
"bitwise": true, | |
"eqeqeq": true, | |
"forin": true, | |
"freeze": true, | |
"maxdepth": 5, |
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
{ | |
"auto_complete_commit_on_tab": true, | |
"bold_folder_labels": true, | |
"caret_extra_width": 1, | |
"color_scheme": "Packages/User/SublimeLinter/Monokai Low-Profile Gray (SL).tmTheme", | |
"default_line_ending": "linux", | |
"enabled_telemetry": false, | |
"file_exclude_patterns": | |
[ | |
"*.pyc", |
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
{ | |
"auto_complete_commit_on_tab": true, | |
"bold_folder_labels": true, | |
"caret_extra_width": 1, | |
"color_scheme": "Packages/User/SublimeLinter/Monokai Low-Profile Gray (SL).tmTheme", | |
"default_line_ending": "linux", | |
"enabled_telemetry": false, | |
"file_exclude_patterns": | |
[ | |
"db.sqlite3" |