Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
export function ApolloMockedProvider(props: any) { | |
let { mocks, ...otherProps } = props; | |
let mockLink = new MockLink(mocks); | |
let errorLoggingLink = onError(({ networkError }) => { | |
if (networkError) { | |
/No more mocked responses for the query/.test(networkError.message); | |
console.warn(`[Network error]: ${networkError}`); | |
} |
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
# Hyperparameters for our network | |
input_size = 784 | |
hidden_sizes = [128, 64] | |
output_size = 10 | |
# Build a feed-forward network | |
model = nn.Sequential(nn.Linear(input_size, hidden_sizes[0]), | |
nn.ReLU(), | |
nn.Linear(hidden_sizes[0], hidden_sizes[1]), | |
nn.ReLU(), |
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
# vim:fileencoding=utf-8:ft=conf:foldmethod=marker | |
#: Fonts {{{ | |
#: kitty has very powerful font management. You can configure | |
#: individual font faces and even specify special fonts for particular | |
#: characters. | |
font_family Inconsolata Nerd Font | |
# bold_font auto |
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 "./styles.css"; | |
import axios from "axios"; | |
import { useDebouncedCallback } from "use-debounce"; | |
const App = () => { | |
const [results, setResults] = React.useState([]); | |
const debounced = useDebouncedCallback((term) => { | |
axios.get(`https://ticker-2e1ica8b9.now.sh/keyword/${term}`).then((res) => { |
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
const App = () => { | |
const [results, setResults] = React.useState([]); | |
const debouncedHandler = debounce((term) => { | |
if (term) { | |
axios | |
.get(`https://ticker-2e1ica8b9.now.sh/keyword/${term}`) | |
.then((res) => { | |
setResults(res.data); | |
}); |
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 debounce from "lodash.debounce"; | |
class App extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { results: [] }; | |
this.onInput = debounce(this.onInput.bind(this), 500); | |
} | |
onInput = (e) => { |
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
class App extends React.Component { | |
state = { results: [] }; | |
onInput = (e) => { | |
const term = e.target.value; | |
if (term) { | |
axios | |
.get(`https://ticker-2e1ica8b9.now.sh/keyword/${term}`) | |
.then((res) => { | |
this.setState({ results: res.data }); |
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
shoryuken sqs create User_Events.fifo |
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
event1 = {id: 'evt7', user_id: 'usr1', details: {...}} | |
UserEventsProcessor.perform_async event1, | |
message_group_id: event1.user_id, | |
message_deduplication_id: event1.id | |
event1 = {id: 'evt2', user_id: 'usr1', details: {...}} | |
UserEventsProcessor.perform_async event1, | |
message_group_id: event1.user_id, | |
message_deduplication_id: event1.id |
NewerOlder