For some reason, the subtitles become the chapters in the PDF generated for my docs by ReadTheDocs.
Check it out here: https://yarsaw.namantech.me/_/downloads/en/latest/pdf/
Here's the code for the index file
######################
**Welcome to YARSAW!**
######################
YARSAW is an open source, free and easy to use API Wrapper for the `Random Stuff API`_.
***************
Overview
***************
Features:
* Wraps all of the `Random Stuff API <https://api-info.pgamerx.com>`_
* Async-ready
* Easy to use
* Saves you a lot of time
*****************
Installation
*****************
To install the latest stable version of YARSAW, run the following command:
.. code-block:: bash
python -m pip install yarsaw
To install a specific version of YARSAW, run the following command:
.. code-block:: bash
python -m pip install yarsaw==<version>
To install the beta version of YARSAW, run the following command:
.. code-block:: bash
python -m pip install git+https://github.com/BruceCodesGithub/yarsaw --upgrade
****************
Getting Started
****************
Get your API Keys
==================
1. Register to get an API Key at the `Random Stuff API resgistration page <https://api-docs.pgamerx.com/Getting%20Started/register/>`_. This is used for authentication.
2. Register at `RapidAPI <https://rapidapi.com/pgamerxdev/api/random-stuff-api>`_ for a RapidAPI Key and Account, and subscribe to the Random Stuff API. This is used to make requests to the Random Stuff API and keep track of them. You can go to `The RapidAPI Developer Dashboard <https://rapidapi.com/developer/apps>`_ after logging in, select an application, head over to security, and copy its key. This is your RapidAPI Key.
Examples
========
.. code-block:: python
import yarsaw
import asyncio # builtin, used for asynchronous calls
client = yarsaw.Client("your_api_key", "your_rapidapi_key")
async def joke():
joke = await client.get_joke() # get the joke in form of a dict
formatted_joke = yarsaw.Utils().format_joke(joke) # format the joke (optional)
print(formatted_joke) # print the joke
asyncio.get_event_loop().run_until_complete(joke()) # run the joke() function
Now just start reading the documentation!
****************
Contents
****************
.. tip::
The :doc:`client` page contains all of the methods you can use to interact with the Random Stuff API, so we recommend reading that first.
.. toctree::
:maxdepth: 1
:caption: Documentation
client
utils
.. toctree::
:maxdepth: 1
:caption: Other Pages and Resources
faq
changelog
Documentation Last Updated on |today|
I want Welcome to YARSAW to be the first chapter, the next file to be the next. Instead, the subtitles become the chapters, and all the other content becomes subtitle.
I followed convention syntax from https://readthedocs.org/projects/documentation-style-guide-sphinx/downloads/pdf/latest/.
It works fine on the docs page itself (https://yarsaw.namantech.me).
Changing heading signs does not work.
Full code: https://github.com/BruceCodesGithub/yarsaw
[SOLVED]
The problem was that the toctree was below headers, which caused issues. Moving to the top of the file solves it.
Related
I am attempting to get the volar vue language server to work in place of vetur for neovim's native lsp.
Using both lspconfig and lspinstall I was able to create a working custom install for sumneko_lua (unrelated but had to manually build due to some issues with the built-in :LspInstall lua). Below is that code duplicated and modified for an attempt at using this new vue server:
local vue_config = require'lspinstall/util'.extract_config('vuels')
vue_config.default_config.cmd = {'node', './node_modules/vscode-vue-languageservice/out/index.js', '--stdio'}
require'lspinstall/servers'.newvue = vim.tbl_extend('error', vue_config, {
install_script = [[
! test -f package.json && npm init -y --scope=lspinstall || true
npm install vscode-vue-languageservice#latest
]],
uninstall_script = nil
})
Running :LspInstall newvue installs properly, however :LspInfo shows this language server is attached to the buffer (of a .vue file) but not active. I believe the issue is with this path: ./node_modules/vscode-vue-languageservice/out/index.js. It exists, but may not be the correct entry point? The default vue ls simply has vls as the command because it provides a binary. Am I missing something in this package? I have yet to come across another language server without a single binary to pick out.
Thanks!
Can you try an absolute path to the out.js file? In my pretty elaborate config for a custom Volar install I'm using something just /home/myuser/dev/volar/packages/server/out/index.js (where the volar folder is just the whole volar cloned github repo). My full config is here
I don't think you can use relative paths like you did. I know you're assuming that the "./node_modules" means "workspace directory" but it's hard to tell in which directory nvim-lspconfig opens up those executables.
I have yet to come across another language server without a single binary to pick out.
Volar also provides a binary, it's volar-server (after running npm i -g #volar/server), it's just with a custom install (ie. alongside the real volar) you can't use it, because I assume you want to use your local install with custom code.
As for more indepth debugging/logging, you can check ~/.cache/nvim/lsp.log to see why the language server dies in detail.
Summary
Seems the guys did a great work with the built-in filtering, clustering and caching on the ClusterBuster vector tile server.
I'm really excited about this project that looks very promising and i'm eager to try it!
I'm working on a project on plotting Deck.gl layers (MVTLayer) on top of Google Maps from a vector tile server through their integration.
I want to try to integrate and to serve from ClusterBuster server some clustered points saved in PostGIS.
Expected result:
I want to receive tile data from ClusterBuster vector tile server like in their provided sample example.
Actual result:
Provided sample example not working (points not showing on map, neither on Mapbox, nor on Google Maps with Deck.gl).
My attempts
I tried building and running the example provided but somehow, i'm not able to do this.
I ran the provided express server clusterbuster/example/express.ts and for frontend tried with the provided mapbox example from clusterbuster/example/mapbox.html (with my mapbox token) but nothing appears on mapbox map (nor on Google maps with my Deck.gl example).
As stated in the clusterbuster/example/readme.md i created an .env file with PostGIS connections settings.
After running the following commands:
yarn
yarn start
i get this output:
C:\zFVStuff\Google Maps - Deck.gl\_Servers\ClusterBuster\clusterbuster-master> yarn start
yarn run v1.22.4
$ yarn build && ts-node example/express.ts
$ rollup --config rollup.config.js
./lib/index.ts → dist/index.d.ts...
created dist/index.d.ts in 5.7s
./lib/index.ts → dist/index.js...
created dist/index.js in 5.1s
attempting to create supporting SQL functions
failure in creating First SQL function
failure in creating TileBBox SQL function
failure in creating TileDoubleBBox SQL function
Example app listening on port 3005!
send3663284b-0e58-4587-af82-b35604a99303: 4.964ms
3663284b-0e58-4587-af82-b35604a99303: 817.819ms
sendd0bdd671-1f47-4b40-84ba-2fed6adfd045: 3.451ms
d0bdd671-1f47-4b40-84ba-2fed6adfd045: 1276.588ms
sendcd36f672-4c4b-4a95-b772-7584e6eb8c55: 1.349ms
cd36f672-4c4b-4a95-b772-7584e6eb8c55: 1754.146ms
The requests seems to be ok, returning status 200 but tile data from ClusterBuster server is undefined nothing appears on the map (neither your Mapbox, or my Google Maps).
Also, it's curious that all tile responses seems to have the same size 216 B.
The data was imported ok in the PostGIS database.
Result is undefined after debugging the express.ts server file with VSCode Javascript Debug Terminal and starting it with the command ts-node .\example\express.ts.
In the Chrome network tab, in none of the sub-tabs Preview or Response i can't see any data.
I also tried logging the result tile in the express server in the success function,
server({
...//excluded for visibility
}).then(result => {
...//excluded for visibility
console.log(result)
res.status(200).send(result);
})
and below is the output, i get undefined:
Any help or advice is really appreciate! Thank you in advance!
After enabling debug in the TileServer configuration (with debug: true), i noticed 2 errors:
SELECT ST_AsMVT(tile, 'points', 4096, 'geom') AS mvt FROM tile
{
e: error: password authentication failed for user "userXYZ"
...
SELECT ST_AsMVT(tile, 'points', 4096, 'geom') AS mvt FROM tile
{
e: Error: read ECONNRESET
at TCP.onStreamRead (internal/stream_base_commons.js:205:27) {
...
Initially I ran from the root of clusterbuster with ts-node .\example\express.ts or with yarn start (that underneath uses the same and it tries to connect with my user instead of .env config file)
After running ts-node express.ts from the example folder it took into account the .env config file with postgres user instead of my user. Now the tile data from the server is returned ok and the example works at expected.
Many thanks to the contributor cosmin-petrescu that helped me.
Entire thread can be seen here on github.
I am current running on Debian 8 Jessie with Python 2.7 and the current google-cloud-speech and storage (pip'd in with upgrade today). When I attempt to config it fails with:
ValueError: Protocol message RecognitionConfig has no "enable_automatic_punctuation" field.
from this call:
config = speech.types.RecognitionConfig(
encoding=speech.enums.RecognitionConfig.AudioEncoding.LINEAR16,
sample_rate_hertz=8000,
language_code='en-US',
# Enable automatic punctuation
enable_automatic_punctuation=True)
The call was directly copy/paste'd from "https://cloud.google.com/speech-to-text/docs/automatic-punctuation#speech-enhanced-model-python".
Huh?
enable_automatic_punctuation is only available if you import speech_v1p1beta1 instead of speech_v1. Compare the documentation for RecognitionConfig for both beta and non beta.
Also, in the very same example that you have linked, if you click on View on Github, you can see the following import:
from google.cloud import speech_v1p1beta1 as speech
Also, related to this topic.
EDIT:
Also, that code is on Python 3, and you are using Python 2.7, be aware of that.
The Get, Get request key words in requests library documentation does not provide any examples where user credentials/AUTH_TOKEN and other arguments passed in the API call.
As Bryan pinted, the examples are in the libraries tests.
For basic authentification, there is:
Get With Auth
[Tags] get get-cert
${auth}= Create List user passwd
Create Session httpbin https://httpbin.org auth=${auth} verify=${CURDIR}${/}cacert.pem
${resp}= Get Request httpbin /basic-auth/user/passwd
Should Be Equal As Strings ${resp.status_code} 200
Should Be Equal As Strings ${resp.json()['authenticated']} True
If you get No keyword with name 'Create Session' found., that means that you are not importing the library correctly or not having it installed correctly.
If you just running the testcase.txt, wrong import is the most like reason. It imports the keywords directly from the source file in author's local repository, instead of installed library package:
Library ../src/RequestsLibrary/RequestsKeywords.py
Instead, import it like in the examples in the librarie's GIT homepage/readme.MD
Library RequestsLibrary
If there is issue with installation, just do:
pip install -U requests
pip install -U robotframework-requests
I am trying to install TurboGear 2. I was following the steps given in this documentation. Link: http://toscawidgets.org/documentation/tw2.core/turbogears.html
On executing this command
pip install -e .
i got this error
No distributions at all found for repose.who-friendlyform>=1.0.4 (from example==0.1dev)
Then with this command
python setup.py develop
i got this error
Searching for repose.who-friendlyform>=1.0.4
Reading https://pypi.python.org/simple/repose.who-friendlyform/
Couldn't find index page for 'repose.who-friendlyform' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
No local packages or download links found for repose.who-friendlyform>=1.0.4
error: Could not find suitable distribution for Requirement.parse('repose.who-friendlyform>=1.0.4')
I tried to install it with easy_install but it didn't work. How can i overcome this error?
The documentation you are pointing to is quite outdated, which TurboGears version are you trying to use? Latest TG versions don't depend on repoze.who-friendlyform anymore. Try to delete your virtualenv, recreate it and then install TurboGears with pip install tg.devtools.
You can find latest TG version documentation on http://turbogears.readthedocs.org/en/latest/#installing-turbogears with a tutorial on using ToscaWidgets at http://turbogears.readthedocs.org/en/latest/cookbook/TwForms.html
Also latest ToscaWidgets documentation has been moved at http://tw2core.readthedocs.org/en/latest/
If you want to experiment with TG2 and Forms there are also a bunch of runnables you can play with: http://runnable.com/TurboGears