streamlit/streamlit#1083 (comment)
from streamlit.server.Server import Server
import streamlit as st
def get_headers():
# Hack to get the session object from Streamlit.
current_server = Server.get_current()
streamlit/streamlit#1083 (comment)
from streamlit.server.Server import Server
import streamlit as st
def get_headers():
# Hack to get the session object from Streamlit.
current_server = Server.get_current()
import streamlit as st | |
from persist import persist, load_widget_state | |
def main(): | |
if "page" not in st.session_state: | |
# Initialize session state. | |
st.session_state.update({ | |
# Default page. | |
"page": "home", |
import { injectable } from 'inversify'; | |
import { FrontendApplicationContribution, FrontendApplication } from '@theia/core/lib/browser'; | |
import { MaybePromise } from '@theia/core/lib/common/types'; | |
import { Widget } from '@theia/core/lib/browser/widgets'; | |
@injectable() | |
export class ExampleFrontendContribution implements FrontendApplicationContribution { | |
/** | |
* Called after the application shell has been attached in case there is no previous workbench layout state. | |
* Should return a promise if it runs asynchronously. |
Copyright © <year>
<copyright holders>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# .style.yapf | |
# | |
# DESCRIPTION | |
# Configuration file for the python formatter yapf. | |
# | |
# This configuration is based on the generic | |
# configuration published on GitHub. | |
# | |
# AUTHOR | |
# krnd |
import api from './api' | |
const routesMap = { | |
HOME: '/', // path only route | |
LIST: { // route object (with a path) | |
path: '/list/:slug', | |
thunk: async (dispatch, getState) => { | |
const { slug } = getState().location.payload | |
const response = await fetch(`/api/items/${slug}`) | |
const items = await data.json() |
public class Constants { | |
/** | |
* Contains the path to your Lambda function code. | |
*/ | |
public static final String LAMBDA_TASK_ROOT = System.getenv("LAMBDA_TASK_ROOT"); | |
/** | |
* The environment variable is set to one of the following options, depending on the runtime of the Lambda function: | |
* AWS_Lambda_nodejs, AWS_Lambda_nodejs4.3, AWS_Lambda_nodejs6.10 |
Short (72 chars or less) summary
More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).
Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages