This commit is contained in:
vosaul 2020-06-07 20:16:59 +03:00
Родитель 25c299fdb4
Коммит 47ffe18f7e
21 изменённых файлов: 1034 добавлений и 83 удалений

3
.vscode/settings.json поставляемый Normal file
Просмотреть файл

@ -0,0 +1,3 @@
{
"python.pythonPath": "/bin/python3"
}

Просмотреть файл

@ -20,6 +20,8 @@ collections:
output: true
pages:
output: true
docs:
output: true
defaults:
- scope:
@ -35,7 +37,11 @@ defaults:
- scope:
path: ""
values:
layout: "default"
layout: "docs"
- scope:
path: ""
values:
layout: "document"
# Exclude from processing.

Просмотреть файл

@ -2,34 +2,28 @@
info : Lorem ipsum dolor sit amet consectetur adipisicing elit. Vitae et quo mollitia molestiae dignissimos fuga, earum quas eveniet dolore sed?
link : "/blog"
icon : "https://ghicons.github.com/assets/images/blue/svg/issue.svg"
card_bg: "/assets/images/pngfuel.com (5).png"
- title: GitHub Actions
info : Lorem ipsum dolor sit amet consectetur adipisicing elit. Vitae et quo mollitia molestiae dignissimos fuga, earum quas eveniet dolore sed?
link : "/actions"
icon : "https://ghicons.github.com/assets/images/blue/svg/Actions.svg"
card_bg: "/assets/images/pngfuel.com (3).png"
- title: Repository Templates
info : Lorem ipsum dolor sit amet consectetur adipisicing elit. Vitae et quo mollitia molestiae dignissimos fuga, earum quas eveniet dolore sed?
link : "/"
icon : "https://ghicons.github.com/assets/images/blue/svg/Collection.svg"
card_bg: "/assets/images/pngfuel.com (7).png"
- title: Live Demos
info : Lorem ipsum dolor sit amet consectetur adipisicing elit. Vitae et quo mollitia molestiae dignissimos fuga, earum quas eveniet dolore sed?
link : "/demos"
icon : "https://ghicons.github.com/assets/images/blue/svg/Enterprise%20Observability.svg"
card_bg: "/assets/images/pngfuel.com (4).png"
- title: Documentation
info : Lorem ipsum dolor sit amet consectetur adipisicing elit. Vitae et quo mollitia molestiae dignissimos fuga, earum quas eveniet dolore sed?
link : "/documentation"
link : "/docs"
icon : "https://ghicons.github.com/assets/images/blue/svg/Documentation.svg"
card_bg: "/assets/images/pngfuel.com (6).png"
- title: Our Team
info : Lorem ipsum dolor sit amet consectetur adipisicing elit. Vitae et quo mollitia molestiae dignissimos fuga, earum quas eveniet dolore sed?
link : "/team"
icon : "https://ghicons.github.com/assets/images/blue/svg/GitHub%20for%20teams.svg"
card_bg: "/assets/images/pngfuel.com (9).png"

159
_docs/Issue-Label-Bot.md Normal file
Просмотреть файл

@ -0,0 +1,159 @@
---
title: Issue Label Bot
description: A GitHub App powered by machine learning, written in Python. A discussion of the motivation for building this app is described in this blog.
titles:
- Important links
- Files
- Prerequisites
- Environment Variables
- Run Locally
- Deploy As A Service
- Contributing
tags: [markdown, opera, github]
type: important
---
[![Python 3.6](https://img.shields.io/badge/python-3.6-blue.svg)](https://www.python.org/downloads/release/python-360/) [![License: MIT](https://img.shields.io/badge/License-MIT-darkgreen.svg)](https://opensource.org/licenses/MIT)
[![Install App](https://img.shields.io/badge/GitHub%20Marketplace-Install%20App-blueviolet.svg?logo=github)](https://github.com/marketplace/issue-label-bot)
[blog]: https://medium.com/@hamelhusain/mlapp-419f90e8f007?source=friends_link&sk=760e18a2d6e60999d7eb2887352a92a8
##### Code for: ["How to automate tasks on GitHub with machine learning for fun and profit"][blog]
<!-- TOC depthFrom:1 depthTo:6 withLinks:1 updateOnSave:1 orderedList:0 -->
Table of Contents
- [Issue-Label Bot](#issue-label-bot)
- [Important links](#important-links)
- [Files](#files)
- [Running This Code](#running-this-code)
- [Environment Variables](#environment-variables)
- [Run Locally](#run-locally)
- [Deploy As A Service](#deploy-as-a-service)
- [Contributing](#contributing)
- [Roadmap](#roadmap)
- [References](#references)
- [Disclaimers](#disclaimers)
<!-- /TOC -->
Original Authors: [@hamelsmu](https://github.com/hamelsmu), [@inc0](https://github.com/inc0), [@jlewi](https://github.com/jlewi)
<h1><img src="https://github.com/machine-learning-apps/MLapp/blob/master/images/Issue-Label-Bot7.png" width="100" height="100">Issue Label Bot</h1>
**Install this app [from the GitHub marketplace](https://github.com/marketplace/issue-label-bot)**
A GitHub App powered by machine learning, written in Python. A discussion of the motivation for building this app is described in this [blog post][blog].
When an issue is opened, the bot predicts if the label should be a: `feature request`, `bug` or `question` and applies a label automatically if appropriate. Here is a screenshot of the bot in action:
> ![alt text](images/example4_big.png)
More examples can be viewed on our [app's homepage](https://label-bot-prod.mlbot.net/). It should be noted that the bot may not apply any label in circumstances where the prediction is uncertain. See the [disclaimers](#Disclaimers) section for more caveats.
## Important links
- [Issue Label Bot homepage](https://label-bot-prod.mlbot.net/). Provides a way to view example predictions as well as other information regarding this bot.
- GitHub [App page](https://github.com/marketplace/issue-label-bot) for Issue Label Bot, where you can install the app. See [disclaimers](#Disclaimers) below before installing.
## Files
- [/notebooks](/notebooks): contains notebooks on how to train the model and interact with the GitHub API using a Python client.
- [/flask_app](/flask_app): code for a flask app that listens for [GitHub issue events](https://developer.github.com/v3/issues/events/) and responds with predictions. This is the main application that the user will interact with.
- [/argo](/argo): the code in this directory relates to the construction of [Argo ML Pipelines](https://argoproj.github.io/) for training and deploying ML workflows.
- [/deployment](/deployment): This directory contains files that are helpful in deploying the app.
- [Dockerfile](/deployment/Dockerfile) this is the definition of the container that is used to run the flask app. The build for this container is hosted on DockerHub at [hamelsmu/mlapp](https://hub.docker.com/r/hamelsmu/mlapp).
- [heroku.yml](/heroku.yml): this is used for [deploying to Heroku](https://devcenter.heroku.com/articles/container-registry-and-runtime).
- *.yaml: these files relate to a Kubernetes deployment.
# Running This Code
## Prerequisites
To utilize the code in this repository, you will need to register a GitHub App of your own and install this app on your desired repositories and store authentication secrets.
First, walk through the [prerequisites section of this getting started guide](https://developer.github.com/apps/quickstart-guides/using-the-github-api-in-your-app/#prerequisites) **except** "The Ruby programming language" section as we will be using Python instead as the client that interfaces with the GitHub API.
Second, [setup your development environment](https://developer.github.com/apps/quickstart-guides/setting-up-your-development-environment/). Make sure you create a Webhook secret, even though this step is optional.
Next, set up a Postgres database. You can do this [for free on Heroku](https://elements.heroku.com/addons/heroku-postgresql). Detailed instructions (stolen shamelessly from [here](https://www.edx.org/course/cs50s-web-programming-with-python-and-javascript)):
1. Navigate to https://www.heroku.com/, and create an account if you dont already have one.
2. On Herokus Dashboard, click “New” and choose “Create new app.”
3. Give your app a name, and click “Create app.”
4. On your apps “Overview” page, click the “Configure Add-ons” button.
5. In the “Add-ons” section of the page, type in and select “Heroku Postgres.”
6. Choose the “Hobby Dev - Free” plan, which will give you access to a free PostgreSQL database that will support up to 10,000 rows of data. Click “Provision.”
7. Now, click the “Heroku Postgres :: Database” link.
8. You should now be on your databases overview page. Click on 8 “Settings”, and then “View Credentials.” This is the information youll need to log into your database.
Finally, you need to create environment variables for all the secrets, which is described below.
## Environment Variables
1. `PRIVATE_KEY`: this is the private key you use to [authenticate as an app](https://developer.github.com/apps/quickstart-guides/setting-up-your-development-environment) with the GitHub API.
2. `WEBHOOK_SECRET`: this is used to verify that payloads received by your app are actually from GitHub. This is described [here](https://developer.github.com/apps/quickstart-guides/setting-up-your-development-environment/).
2. `DATABASE_URL`: this is the URL that contains the login information for your POSTGRESQL database, usually in the form: `postgres://<username>:<password>@<url>:5432/<database_name>`
3. `APP_ID`: this is a unique identifier provided to you by GitHub when you [register your app](https://developer.github.com/apps/quickstart-guides/setting-up-your-development-environment).
4. `FLASK_ENV`: this is usually set to either `production` or `development`. You will want to use `deployment` for local testing.
5. `PORT`: this is the port your app will be serving on. Note that if you are deploying to Heroku, Heroku will override this variable with their own value when building your app. For local development, you will want this to match the [port Smee is serving to](https://developer.github.com/apps/quickstart-guides/setting-up-your-development-environment/#step-1-start-a-new-smee-channel).
6. `APP_URL`: this is the url for the homepage of your app that is provided to users as a link in issue comments. You can set this to an arbitrary value for local development.
Note: If you are using [zsh](http://www.zsh.org/), the [dotenv](https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/dotenv) plugin can be useful for managing environment variables.
## Run Locally
1. **Install Dependencies**: Install [requirements.txt](/requirements.txt) into a virtual environment. If you are using [pipenv](https://pipenv.readthedocs.io/en/latest/) install the necessary dependencies from [Pipfile.lock](/Pipenv.lock) by typing `pipenv install` in the root of this repository.
2. **Run the flask app**: run `python flask_app/app.py` from the root of this repository. For this to work, you must correctly set the environment variables as described in the [Environment Variables](#Environment-Variables) section.
3. Optional - **Run app as docker container**. A Docker container that serves [Issue-Label Bot](https://github.com/apps/issue-label-bot) can be built with the command `bash script/bootstrap` from the root of this repository. This script builds a Docker image named `hamelsmu/mlapp`, which is also available [on Dockerhub](https://hub.docker.com/r/hamelsmu/mlapp). If you desire to run the Docker container locally for testing, you must [pass the necessary environment variables](https://stackoverflow.com/questions/30494050/how-do-i-pass-environment-variables-to-docker-containers) to the Docker container at runtime, as well as expose necessary ports for the app. See the [References](#References) section for more resources on using Docker.
## Deploy As A Service
The assets in this repo allow you to [deploy to Heroku](https://devcenter.heroku.com/articles/container-registry-and-runtime) (easier) or a Kubernetes cluster (more advanced).
In Heroku, secrets can be passed in as [configuration variables](https://devcenter.heroku.com/articles/config-vars). Furthermore, [this documentation](https://kubernetes.io/docs/concepts/configuration/secret/#creating-a-secret-manually) describes how you can set secrets in Kubernetes. Make sure you set the environment variable `FLASK_ENV` to `production` if you are going to deploy the app publicly.
# Contributing
We welcome all forms of contributions. We are especially interested in the following:
- Bug fixes
- Enhancements or additional features
- Improvements to the model, or expansion of the dataset(s) used for training.
## Roadmap
The authors of this project are interested in adding the following features in the near future:
- Constructing better labels and negative samples of items that do not belong in the label set to drive further improvements.
- Using the tools from [fastai](https://docs.fast.ai/) to explore:
- State of the art architectures, such as [Multi-Head Attention](https://docs.fast.ai/text.models.html#MultiHeadAttention)
- Utilizing transfer learning to predict unique labels and/or enhance accuracy.
- Using [GitHub Actions](https://github.com/features/actions) to trigger automated deploys of this code.
- Model pipeline orchestration on [Argo pipelines](https://argoproj.github.io/).
## References
- The code in this repo and associated tutorial(s) assume familiarity with Docker. [This blog post](https://towardsdatascience.com/how-docker-can-help-you-become-a-more-effective-data-scientist-7fc048ef91d5) offers a gentle introduction to Docker for data scientists.
- Need inspiration for other data products you can build using machine learning and public GitHub datasets? See these examples:
- [GitHub issue summarization](https://towardsdatascience.com/how-to-create-data-products-that-are-magical-using-sequence-to-sequence-models-703f86a231f8) and recommendation.
- Natural language [semantic code search](https://towardsdatascience.com/semantic-code-search-3cd6d244a39c).
- Excellent course on flask: [HarvardX CS50 Web](https://www.edx.org/course/cs50s-web-programming-with-python-and-javascript).
- MOOCs by [fastai](https://www.fast.ai/) for [machine learning](http://course18.fast.ai/ml) and [deep learning](http://course.fast.ai/).
# Disclaimers
[Issue-Label Bot](https://github.com/apps/issue-label-bot) is for educational and demonstration purposes only. Our goal was to provide a minimal working example for the community with the least amount of complexity as possible. Therefore, we believe the model demonstrated has great room from improvement. Furthermore, **this app only works on public repositories and will do nothing if installed on a private repo.**

265
_docs/Markdown-here.md Normal file
Просмотреть файл

@ -0,0 +1,265 @@
---
title: Markdown Here
description: Markdown Here is a Google Chrome, Firefox, Safari, Opera, and Thunderbird extension that lets you write email<sup>&dagger;</sup> in Markdown<sup>&Dagger;</sup> and render them before sending. It also supports syntax highlighting (just specify the language in a fenced code block).
titles:
- Markdown Here
- Table of Contents
- Installation Instructions
- Manual/Development
- Mozilla Add-ons site
- Things to know about converting/reverting a selection
- Next Steps
tipue_search_active: true
exclude_from_search: false
tags: [markdown, opera, github]
type: important
---
[**Visit the website.**](http://markdown-here.com)<br>
[**Get it for Chrome.**](https://chrome.google.com/webstore/detail/elifhakcjgalahccnjkneoccemfahfoa)<br>
[**Get it for Firefox.**](https://addons.mozilla.org/en-US/firefox/addon/markdown-here/)<br>
[**Get it for Safari.**](https://s3.amazonaws.com/markdown-here/markdown-here.safariextz)<br>
[**Get it for Thunderbird and Postbox.**](https://addons.mozilla.org/en-US/thunderbird/addon/markdown-here/)<br>
[**Get it for Opera.**](https://addons.opera.com/en/extensions/details/markdown-here/)<br>
[**Discuss it and ask questions in the Google Group.**](https://groups.google.com/forum/?fromgroups#!forum/markdown-here/)<br>
*Markdown Here* is a Google Chrome, Firefox, Safari, Opera, and Thunderbird extension that lets you write email<sup>&dagger;</sup> in Markdown<sup>&Dagger;</sup> and render them before sending. It also supports syntax highlighting (just specify the language in a fenced code block).
Writing email with code in it is pretty tedious. Writing Markdown with code in it is easy. I found myself writing email in Markdown in the Github in-browser editor, then copying the preview into email. This is a pretty absurd workflow, so I decided create a tool to write and render Markdown right in the email.
To discover what can be done with Markdown in *Markdown Here*, check out the [Markdown Here Cheatsheet](https://github.com/adam-p/markdown-here/wiki/Markdown-Here-Cheatsheet) and the other [wiki pages](https://github.com/adam-p/markdown-here/wiki).
<sup>&dagger;: And Google Groups posts, and Blogger posts, and Evernote notes, and Wordpress posts! [See more](#compatibility).</sup><br>
<sup>&Dagger;: And TeX mathematical formulae!</sup>
![screenshot of conversion](https://raw.github.com/adam-p/markdown-here/master/store-assets/markdown-here-image1.gimp.png)
### Table of Contents
**[Installation Instructions](#installation-instructions)**<br>
**[Usage Instructions](#usage-instructions)**<br>
**[Troubleshooting](#troubleshooting)**<br>
**[Compatibility](#compatibility)**<br>
**[Notes and Miscellaneous](#notes-and-miscellaneous)**<br>
**[Building the Extension Bundles](#building-the-extension-bundles)**<br>
**[Next Steps, Credits, Feedback, License](#next-steps)**<br>
## Installation Instructions
### Chrome
#### Chrome Web Store
Go to the [Chrome Web Store page for *Markdown Here*](https://chrome.google.com/webstore/detail/elifhakcjgalahccnjkneoccemfahfoa) and install normally.
After installing, make sure to reload your webmail or restart Chrome!
#### Manual/Development
1. Clone this repo.
2. In Chrome, open the Extensions settings. (Wrench button, Tools, Extensions.)
3. On the Extensions settings page, click the "Developer Mode" checkbox.
4. Click the now-visible "Load unpacked extension…" button. Navigate to the directory where you cloned the repo, then the `src` directory under that.
5. The *Markdown Here* extension should now be visible in your extensions list.
6. Reload your webmail page (and maybe application) before trying to convert an email.
### Firefox and Thunderbird
#### Mozilla Add-ons site
Go to the [Firefox Add-ons page for *Markdown Here*](https://addons.mozilla.org/en-US/firefox/addon/markdown-here/) and install normally.
Or go to the "Tools > Add-ons" menu and then search for "Markdown Here".
After installing, make sure to restart Firefox/Thunderbird!
**Note:** It takes up to a month for Mozilla to approve changes to the Firefox/Thunderbird extension, so updates (features, fixes) will lag behind what is shown here. You can manually choose to install the newest version before it's reviewed from the list of versions: [https://addons.mozilla.org/en-US/firefox/addon/markdown-here/versions/](https://addons.mozilla.org/en-US/firefox/addon/markdown-here/versions/)
#### Manual/Development
1. Clone this repo.
2. Follow the instructions in the MDN ["Setting up an extension development environment"](https://developer.mozilla.org/en/Setting_up_extension_development_environment) article.
### Safari
[Download the extension directly.](https://s3.amazonaws.com/markdown-here/markdown-here.safariextz) When it has finished downloading, double click it to install.
#### Preferences
To get to the Markdown Here preferences, open the Safari preferences and then go to the "Extensions" tab. Then click the "Click me to show Markdown Here options" box.
### Opera
Note that *Markdown Here* only works with Opera versions 16 and higher (i.e., the ones that are based on Chromium).
Go to the [Opera Add-ons store page for *Markdown Here*](https://addons.opera.com/en/extensions/details/markdown-here/) and install normally.
After installing, make sure to reload your webmail or restart Chrome!
## Usage Instructions
Install it, and then…
1. In Chrome/Safari/Opera, *make sure* you reload your web mail page before trying to use Markdown Here.
2. In Chrome/Firefox/Safari/Opera, log into your Gmail, Hotmail, or Yahoo account and start a new email. In Thunderbird, start a new message.
3. Make sure you're using the rich editor.
* In Gmail, click the "Rich formatting" link, if it's visible.
* In Thunderbird, make sure "Compose messages in HTML format" is enabled in your "Account Settings", "Composition & Addressing" pane.
4. Compose an email in Markdown. For example:
<pre>
**Hello** `world`.
```javascript
alert('Hello syntax highlighting.');
```
</pre>
5. Right-click in the compose box and choose the "Markdown Toggle" item from the context menu. Or click the button that appears in your address bar. Or use the hotkey (<kbd>CTRL</kbd>+<kbd>ALT</kbd>+<kbd>M</kbd> by default).
6. You should see your email rendered correctly from Markdown into rich HTML.
7. Send your awesome email to everyone you know. It will appear to them the same way it looks to you.
### Revert to Markdown
After rendering your Markdown to pretty HTML, you can still get back to your original Markdown. Just right-click anywhere in the newly rendered Markdown and click "Markdown Toggle" -- your email compose body will change back to the Markdown you had written.
Note that any changes you make to the pretty HTML will be lost when you revert to Markdown.
In Gmail, you can also use the browser's Undo command (<kbd>CTRL</kbd>+<kbd>Z</kbd> / <kbd>CMD</kbd>+<kbd>Z</kbd>, or from the Edit menu). Be warned that you might also lose the last few characters you entered.
### Replies
In Gmail, Thunderbird, and Google Groups, you can use "Markdown Toggle" normally: just write your reply (top, bottom, inline, wherever) and then convert. The original email that you're replying to will be left alone. (Technically: Existing `blockquote` blocks will be left intact.)
In Hotmail and Yahoo (which don't put the original in a `blockquote`), and optionally in Gmail, Thunderbird, and Google Groups, you can ensure that only the part of the reply that you wrote gets converted by selecting what you want to convert and then clicking "Markdown Toggle" -- see the next section.
### Selection/Piecemeal Conversion
Sometimes you don't want to convert the entire email; sometimes your email isn't entirely Markdown. To convert only part of the email, select the text (with your mouse or keyboard), right-click on it, and click the "Markdown Toggle" menu item. Your selection is magically rendered into pretty HTML.
To revert back to Markdown, just put your cursor anywhere in the block of converted text, right click, and click the "Markdown Toggle" menu item again. Now it's magically back to the original Markdown.
![screenshot of selection conversion](https://raw.github.com/adam-p/markdown-here/master/store-assets/markdown-here-image2.gimp.png)
#### Things to know about converting/reverting a selection
* If you select only part of a block of text, only that text will be converted. The converted block will be wrapped in a paragraph element, so the original line will be broken up. You probably don't want to ever do this.
* You can select and revert multiple converted blocks at the same time. One upshot of this is that you can select your entire email, click "Markdown Toggle", and all portions of it that you had converted will be reverted.
* If you don't have anything selected when you click "Markdown Toggle", *Markdown Here* will check if there are converted blocks anywhere in the message and revert them. If there no converted blocks are found, it will convert the entire email.
### Options
The *Markdown Here* Options page can be accessed via the Chrome, Firefox, Safari, or Thunderbird extensions list. The available options include:
* Styling modifications for the rendered Markdown.
* Syntax highlighting theme selection and modification.
* TeX math formulae processing enabling and customization.
* What the hotkey should be.
For Chrome and Firefox, any changes made in the *Markdown Here* Options are automatically synchronized between your other installations of that browser (if you have the sync feature enabled in the browser).
![screenshot of options](https://raw.githubusercontent.com/adam-p/markdown-here/master/store-assets/markdown-here-chrome-options-1.gimp.png)
## Troubleshooting
See the [Troubleshooting wiki page](https://github.com/adam-p/markdown-here/wiki/Troubleshooting).
## Compatibility
See the [Compatibility wiki page](https://github.com/adam-p/markdown-here/wiki/Compatibility).
## Notes and Miscellaneous
* *Markdown Here* uses [Github Flavored Markdown](http://github.github.com/github-flavored-markdown/), with the limitation that GFM special links are not supported ([issue #11](https://github.com/adam-p/markdown-here/issues/11)); nor will they be, as MDH is not Github-specific.
* Available languages for syntax highlighting (and the way they should be written in the fenced code block) can be seen on the [highlight.js demo page](http://softwaremaniacs.org/media/soft/highlight/test.html).
* Images embedded inline in your Markdown will be retained when you "Markdown Toggle". Gmail allows you to put images inline in your email -- this can be much easier than referencing an external image.
* Email signatures are automatically excluded from conversion. Specifically, anything after the semi-standard `'-- '` (note the trailing space) is left alone.
* Note that Hotmail and Yahoo do *not* automatically add the `'-- '` to signatures, so you have to add it yourself.
* The "Markdown Toggle" menu item shows up for more element types than it can correctly render. This is intended to help people realize that they're not using a rich editor. Otherwise they just don't see the menu item and don't know why.
* Styling:
* The use of browser-specific styles (-moz-, -webkit-) should be avoided. If used, they may not render correctly for people reading the email in a different browser from the one where the email was sent.
* The use of state-dependent styles (like `a:hover`) don't work because they don't match at the time the styles are made explicit. (In email, styles must be explicitly applied to all elements -- stylesheets get stripped.)
* For more tweaky features, visit the [Tips and Tricks](https://github.com/adam-p/markdown-here/wiki/Tips-and-Tricks) section.
## Building the Extension Bundles
```
cd utils
node build.js
```
### Chrome and Opera extension
Create a file with a `.zip` extension containing these files and directories:
```
manifest.json
common/
chrome/
```
### Firefox/Thunderbird extension
Create a file with a `.xpi` extension containing these files and directories:
```
chrome.manifest
install.rdf
common/
firefox/
```
### Safari extension
The browser-specific code is located in the [`markdown-here-safari`](https://github.com/adam-p/markdown-here-safari) project.
Use the Safari Extension Builder.
## Next Steps
See the [issues list](https://github.com/adam-p/markdown-here/issues) and the [Notes Wiki](https://github.com/adam-p/markdown-here/wiki/Development-Notes). All ideas, bugs, plans, complaints, and dreams will end up in one of those two places.
Feel free to create a feature request issue if what you want isn't already there. If you'd prefer a less formal approach to floating an idea, post to the ["markdown-here" Google Group](https://groups.google.com/forum/?fromgroups=#!forum/markdown-here).
It also takes a fair bit of work to stay up-to-date with the latest changes in all the applications and web sites where Markdown Here works.
## Credits
*Markdown Here* was coded on the shoulders of giants.
* Markdown-to-HTML: [chjj / marked](https://github.com/chjj/marked)
* Syntax highlighting: [isagalaev / highlight.js](https://github.com/isagalaev/highlight.js)
* HTML-to-text: [mtrimpe / jsHtmlToText](https://github.com/mtrimpe/jsHtmlToText)
## Feedback
All bugs, feature requests, pull requests, feedback, etc., are welcome. [Create an issue](https://github.com/adam-p/markdown-here/issues). Or [post to the "markdown-here" Google Group](https://groups.google.com/forum/?fromgroups=#!forum/markdown-here).
## License
### Code
MIT License: http://adampritchard.mit-license.org/ or see [the `LICENSE` file](https://github.com/adam-p/markdown-here/blob/master/LICENSE).
### Logo
Copyright 2015, [Austin Anderson](http://protractor.ninja/). Licensed to Markdown Here under the [MDH contributor license agreement](https://github.com/adam-p/markdown-here/blob/master/CLA-individual.md).
### Other images
[Creative Commons Attribution 3.0 Unported (CC BY 3.0) License](http://creativecommons.org/licenses/by/3.0/)
---
![Dos Equis man says](https://raw.github.com/adam-p/markdown-here/master/store-assets/dos-equis-MDH.jpg)

122
_docs/Markdownsource.md Normal file
Просмотреть файл

@ -0,0 +1,122 @@
---
layout: document
title: Sources for markdown
description: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam vitae felis vitae leo ornare auctor. Aenean nec magna elementum, euismod lectus et, commodo magna. Nunc eget urna in nisl tempor rutrum a in augue.
titles:
- Sources for markdown
- Heading One
tags: [markdown, source]
tipue_search_active: true
exclude_from_search: false
---
https://www.markdownguide.org/cheat-sheet/
http://sangsoonam.github.io/2019/01/20/syntax-highlighting-in-jekyll.html
Style inspiration for the site layout:
https://www.jetbrains.com/help/pycharm/quick-start-guide.html
# Heading One
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam vitae felis vitae leo ornare auctor. Aenean nec magna elementum, euismod lectus et, commodo magna. Nunc eget urna in nisl tempor rutrum a in augue.
Integer eu aliquet turpis. Sed ipsum diam, fermentum non leo et, imperdiet faucibus enim. Aenean fringilla ornare tortor porta auctor. Maecenas placerat purus vitae mi pulvinar, eu ornare purus gravida.
# Heading One
## Heading Two
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam vitae felis vitae leo ornare auctor. Aenean nec magna elementum, euismod lectus et, commodo magna. Nunc eget urna in nisl tempor rutrum a in augue.
### Heading Three
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam vitae felis vitae leo ornare auctor. Aenean nec magna elementum, euismod lectus et, commodo magna. Nunc eget urna in nisl tempor rutrum a in augue.
#### Heading Four
##### Heading Five
###### Heading Six
Unordered list
- This is a list 1
- This is a **list** 2, with some **bold** and some *italics*. And some ***bold and italics***
- This is a list 3
Ordered list
1. First item
2. Second item
3. Third item
Indented list
- First item
- Second item
- Third item
- Indented item
- Indented item
- Fourth item
### Underline
Does it work?
---
Yes it does.
### Blockquotes
> Blockquotes are very handy
> This line is part of the same quote.
Quote break.
> This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can *put* **Markdown** into a blockquote.
- The workspace synchronization will sync all your files, folders and settings automatically. This will allow you to fetch your workspace on any other device.
> This is a blockquoteTo start syncing your workspace, just sign in with Google in the menu.
Blockquotes can be nested
> Dorothy followed her through many of the beautiful rooms in her castle.
>
>> The Witch bade her clean the pots and kettles and sweep the floor and keep the fire fed with wood.
### Code with syntax highlighting
This is a test of `some inline code` and whether it formats `correctly`.
And now for blocks of code:
Ruby code
```ruby
def print_hi(name)
puts "Hi, #{name}"
end
print_hi('Tom')
#=> prints 'Hi, Tom' to STDOUT.
```
Python code
```python
print("Hello World")
def f(x):
"""a docstring"""
return x**2
```
### Tables
SmartyPants converts ASCII punctuation characters into "smart" typographic punctuation HTML entities. For example:
| |ASCII |HTML |
|----------------|-------------------------------|-----------------------------|
|Single backticks|`'Isn't this fun?'` |'Isn't this fun?' |
|Quotes |`"Isn't this fun?"` |"Isn't this fun?" |
|Dashes |`-- is en-dash, --- is em-dash`|-- is en-dash, --- is em-dash|
Try again:
Markdown | Less | Pretty
--- | --- | ---
*Still* | `renders` | **nicely**
1 | 2 | 3
What|is|up
What | is | up

68
_docs/readme.md Normal file
Просмотреть файл

@ -0,0 +1,68 @@
---
layout: document
title: Read Me
description: Create a Jekyll generated Static Site according to the following design specification. Provide me the Jekyll code and I will take care of creating and hosting it on my GitHub Pages repository.
titles:
- Request
- What I want to achieve
- Design
- Advanced features of this site which are not needed
tipue_search_active: true
exclude_from_search: false
tags: [jekyll]
---
# Request:
Create a Jekyll generated Static Site according to the following design specification. Provide me the Jekyll code and I will take care of creating and hosting it on my GitHub Pages repository.
### What I want to achieve:
This is a site primarily for writing content such as software instructions or lecture notes. I would like to easily sort content (posts) by category or date. Content should be written in markdown and I only want to store content in the "_posts" folder (no pages such as "About Me" are needed).
It is important to use **as little code as possible** to achieve this design. I do not want this implemented as a Jekyll theme laid upon a highly flexible site structure. Preferably no theme at all. I don't want unused code or folders related to comments section, social media, etc... The config file, in particular, should be simple.
# Design:
The design should match [this site](https://www.jetbrains.com/help/pycharm) by Jetbrains as closely as possible. Layout should react the same way as this site does to a pc screen or smarthphone, especially the left menu. Same formatting of links.
### Sections that are needed:
- A top bar with webpage title
- A search box also shown in the top bar
- A left menu showing post titles sorted by category or date. See below for further information (Left menu functionality is NB).
- The main section showing content
- Footer with "MIT License" and "This Page is generated with GitHubPages"
I need the following **markdown features** to be processed similar to the above site and/or GitHub itself (GFM):
- Headers, lists, bold, italics (obviously)
- Blockquotes. Preferably with dark grey bar on the left and on light grey background such as [here](https://www.markdownguide.org/basic-syntax/)
- Inline Code on light grey background
- Code blocks on very dark grey background
- If possible: Python syntax highlighting supported by GFM and also shown [here](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet)
### Advanced features of this site which are not needed:
- The right column showing Header titles of the current page.
- When using a smartphone, the left menu shows the header titles of current page under the term "On this page"
- Previous post and Next Post
### Parameters
Parameters should be kept in the main jekyll config file:
- Title
- Website address, if not using the default '___.github.io/"
- Default post to display as home page (I will not use a unique home page)
- I would like to define the colours of the top bar and the Website title in the top bar via the config file.
- Priority posts (see below)
# The Left Menu (NB)
- At the top should be written "Arrange by: Category or Date", where one can click on Category or Date. The text for "Category" and "Date" should have their own CSS colour so they can be highlighted.
- If arranging by Category: Each category is listed alphabetically in the left menu. Each post title is listed within each category, sorted by date.
- A post can be shown in multiple categories if it is labelled with multiple categories.
- If arranging by Date, each Year of posting is listed from highest to lowest. Each post title is listed within each year when it was posted, and sorted by date.
- Clicking on a Category or Year should only expand or collapse this section in the menu, it should have no associated link. Only posts can be clicked.
- Hovering over a Category, Year or Post Title should highlight the box grey.
- The currently displayed post should be in Bold
- Below "Arrange by: Category or Date" should be a list of post titles which are defined in the config file (priority posts). It should come before the list of categories or years. These post titles should be in line on the left with the list of categories. Separated from "Arrange by:..." and the "categories/years" by a horizontal line above and below.

104
_docs/spectral-interface.md Normal file
Просмотреть файл

@ -0,0 +1,104 @@
---
layout: document
title: Spectral Inference
titles:
- Spectral Inference Networks (SpIN)
- Prerequisites
- Installation
- Installation
- Usage
- Create variables for simple MLP
- Create function to construct simple MLP
- Squared exponential kernel.
tags: [spectral, python, network]
type: important
---
## Spectral Inference Networks (SpIN)
This package provides an implementation of Spectral Inference Networks,
as in [Pfau, Petersen, Agarwal, Barrett and Stachenfeld (2018)](https://arxiv.org/abs/1806.02215).
This is not an officially supported Google product.
## Prerequisites
SpIN requires a working installation of Python and TensorFlow. We recommend
running it on GPU for faster convergence.
If you want to make use of the GUI (on by default) you will also need Tcl/Tk
installed on your system.
## Installation
After cloning the repo, run pip to install the package and its Python
dependencies:
```bash
cd spectral_inference_networks
pip install .
```
## Usage
Training a spectral inference network is similar to most other deep learning
pipelines: you must construct a data source, network architecture and optimizer.
What makes spectral inference networks unique is that instead of a loss you
provide a linear operator to diagonalize. The code expects an object of the
LinearOperator class, which can be constructed from a similarity kernel or by
other means. LinearOperator objects can be added together or multiplied by a
scalar.
Below is a minimal example of training spectral inference networks:
```python
import tensorflow as tf
import spectral_inference_networks as spin
batch_size = 1024
input_dim = 10
num_eigenvalues = 5
iterations = 1000 # number of training iterations
## Create variables for simple MLP
w1 = tf.Variable(tf.random.normal([input_dim, 64]))
w2 = tf.Variable(tf.random.normal([64, num_eigenvalues]))
b1 = tf.Variable(tf.random.normal([64]))
b2 = tf.Variable(tf.random.normal([num_eigenvalues]))
## Create function to construct simple MLP
def network(x):
h1 = tf.nn.relu(tf.matmul(x, w1) + b1)
return tf.matmul(h1, w2) + b2
data = tf.random.normal([batch_size, input_dim]) # replace with actual data
## Squared exponential kernel.
kernel = lambda x, y: tf.exp(-(tf.norm(x-y, axis=1, keepdims=True)**2))
linop = spin.KernelOperator(kernel)
optim = tf.train.AdamOptimizer()
## Constructs the internal training ops for spectral inference networks.
spectral_net = spin.SpectralNetwork(
linop,
network,
data,
[w1, w2, b1, b2])
## Trivial defaults for logging and stats hooks.
logging_config = {
'config': {},
'log_image_every': iterations,
'save_params_every': iterations,
'saver_path': '/tmp',
'saver_name': 'example',
}
stats_hooks = {
'create': spin.util.create_default_stats,
'update': spin.util.update_default_stats,
}
## Executes the training of spectral inference networks.
stats = spectral_net.train(
optim,
iterations,
logging_config,
stats_hooks)

Просмотреть файл

@ -1,8 +1,15 @@
---
layout: post
layout: document
title: "Welcome to Jekyll!"
date: 2020-05-31 07:47:30 +0300
description: Youll find this post in your `_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run `jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated.
titles:
- Code snippets
- Check out the Jekyll docs
date: 2019-12-30 08:40:50 +0200
categories: jekyll update
tipue_search_active: true
exclude_from_search: false
tags: [jekyll, code]
---
Youll find this post in your `_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run `jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated.
@ -12,6 +19,8 @@ Jekyll requires blog post files to be named according to the following format:
Where `YEAR` is a four-digit number, `MONTH` and `DAY` are both two-digit numbers, and `MARKUP` is the file extension representing the format used in the file. After that, include the necessary front matter. Take a look at the source for this post to get an idea about how it works.
## Code snippets
Jekyll also offers powerful support for code snippets:
{% highlight ruby %}
@ -22,6 +31,8 @@ print_hi('Tom')
#=> prints 'Hi, Tom' to STDOUT.
{% endhighlight %}
## Check out the Jekyll docs
Check out the [Jekyll docs][jekyll-docs] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Jekylls GitHub repo][jekyll-gh]. If you have questions, you can ask them on [Jekyll Talk][jekyll-talk].
[jekyll-docs]: https://jekyllrb.com/docs/home

Просмотреть файл

@ -0,0 +1,48 @@
---
layout: document
title: "Work with run/debug configurations"
description: To run or debug your code in PyCharm, you can use numerous run/debug configurations. Each run/debug configuration represents a named set of run/debug startup properties. When you perform run, debug, or test operations with PyCharm, you always start a process based on one of the existing configurations using its parameters.
titles:
- Code snippets
- Check out the Jekyll docs
date: 2019-12-31 08:40:50 +0200
categories: jekyll run debug
tipue_search_active: true
exclude_from_search: false
tags: [jekyll, code]
type: important
---
To run or debug your code in PyCharm, you can use numerous run/debug configurations. Each run/debug configuration represents a named set of run/debug startup properties. When you perform run, debug, or test operations with PyCharm, you always start a process based on one of the existing configurations using its parameters.
PyCharm comes with a number of run/debug configuration types for the various running, debugging and testing issues. You can create your own run/debug configurations of specific types.
Each run/debug configuration type has its own default settings. Whenever a new run/debug configuration of the respective type is created, it is based on these default settings.
Temporary run/debug configurations
A temporary run/debug configuration is automatically created every time you choose Run <item_name> or Debug <item_name> for an item without a permanent configuration.
Temporary Run/Debug configurations are recorded in the <project directory>/.idea/workspace.xml file under the Run Manager section.
Save a temporary configuration as permanent
Select the temporary configuration in the Run/Debug Configurations Dialog and click the Save button on the toolbar.
Alternatively, select the temporary configuration in the run/debug configuration selector and then click Save <configuration name> Configuration.
Once you save a temporary configuration it becomes permanent and it is recorded in a separate XML file in the <project directory>/.idea/ directory. For example, MyProject/.idea/Car.xml.
Temporary configurations are marked with semi-transparent icons and are managed the same way as the permanent configurations.
By default, five temporary run/debug configurations are allowed per project, so when you create the sixth configuration, the one created first is removed, and so on. To change this limit, use the Temporary configurations limit field in the Templates page of the Run/Debug Configurations Dialog.
Permanent run/debug configurations
A permanent run/debug configuration is explicitly created for a particular class or method. If there is no permanent configuration for an item, PyCharm automatically creates a temporary configuration for it, when you choose Run <item_name> or Debug <item_name> from the context menu of this class or method.
Run/debug configuration templates
The templates with default run/debug configuration settings are listed in the Run/Debug Configurations dialog under the Templates node. They denote the settings that are used when new run/debug configurations are created.
Do not set up a working directory for the default Run/Debug Configurations listed under the Templates node. This may lead to unresolved targets in newly created Run/Debug Configurations.
You can set the default settings for a specific configuration type that will become applicable to any run/debug configuration of this type created later. Changing defaults does not affect the existing run/debug configurations.
The process of editing per-type default configuration settings is described in Change Templates of Run/Debug Configurations. The process of creating or editing custom run/debug configurations is described in Create and Edit Run/Debug Configurations.

Просмотреть файл

@ -9,7 +9,7 @@
{%- if jekyll.environment == 'production' and site.google_analytics -%}
{%- include google-analytics.html -%}
{%- endif -%}
<style>
<style>
body {
background: #1b1f23;
}

Просмотреть файл

@ -1,29 +0,0 @@
<header class="site-header" role="banner">
<div class="navbar">
{%- assign default_paths = site.pages | map: "path" -%}
{%- assign page_paths = site.header_pages | default: default_paths -%}
<a class="site-title" rel="author" href="{{ "/" | relative_url }}">{{ site.title | escape }}</a>
{%- if page_paths -%}
<nav class="site-nav">
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger">
<span class="menu-icon">
<svg viewBox="0 0 18 15" width="18px" height="15px">
<path d="M18,1.484c0,0.82-0.665,1.484-1.484,1.484H1.484C0.665,2.969,0,2.304,0,1.484l0,0C0,0.665,0.665,0,1.484,0 h15.032C17.335,0,18,0.665,18,1.484L18,1.484z M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0 c0-0.82,0.665-1.484,1.484-1.484h15.032C17.335,6.031,18,6.696,18,7.516L18,7.516z M18,13.516C18,14.335,17.335,15,16.516,15H1.484 C0.665,15,0,14.335,0,13.516l0,0c0-0.82,0.665-1.483,1.484-1.483h15.032C17.335,12.031,18,12.695,18,13.516L18,13.516z"/>
</svg>
</span>
</label>
<div class="trigger">
{%- for path in page_paths -%}
{%- assign my_page = site.pages | where: "path", path | first -%}
{%- if my_page.title -%}
<a class="page-link" href="{{ my_page.url | relative_url }}">{{ my_page.title | escape }}</a>
{%- endif -%}
{%- endfor -%}
</div>
</nav>
{%- endif -%}
</div>
</header>

Просмотреть файл

@ -1,10 +1,12 @@
<aside class="navigation left_sidebar">
<h2>Navigation</h2>
<ul>
{%- for item in site.data.navigation -%}
<aside class="sidebar_left">
<nav>
<h2>Sections</h2>
<ul>
{%- for item in site.docs -%}
<li>
<a href="{{item.link}}">{{item.title}}</a>
<a href="{{item.url}}">{{item.title}}</a>
</li>
{%- endfor -%}
</ul>
{%- endfor -%}
</ul>
</nav>
</aside>

Просмотреть файл

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="{{ page.lang | default: site.lang | default: "en" }}">
{%- include head.html -%}
<body class="doc_page">
{%- include header.html -%}
<main class="page-content docs" aria-label="Content">
{%- include sidebar.html -%}
{{ content }}
</main>
{%- include footer.html -%}
<script src="{{'/assets/js/common.js' | relative_url}}"></script>
</body>
</html>

26
_layouts/docs.html Normal file
Просмотреть файл

@ -0,0 +1,26 @@
---
layout : default_docs
permalink : /docs/
---
<div class="intro_wrapper">
<section class="intro">
<div class="image_box">
<img src="https://ghicons.github.com/assets/images/blue/svg/Documentation.svg" alt="docs">
</div>
<div class="text_box">
<h1>{{page.title}}</h1>
<p>{{page.description}}</p>
</div>
</section>
</div>
<section class="docs_content">
{{ content }}
<ul>
{%- for item in site.docs -%}
<li>
<a href="{{item.url}}">{{item.title}}"</a>
<p>{{item.description}}</p>
</li>
{%- endfor -%}
</ul>
</section>

29
_layouts/document.html Normal file
Просмотреть файл

@ -0,0 +1,29 @@
---
layout: default_docs
---
<article class="doc h-entry document" itemscope itemtype="http://schema.org/BlogPosting">
<div>
<header class="doc_header">
<h1 class="doc_title p-name" itemprop="name headline">{{ page.title | escape }}</h1>
</header>
<div class="doc_content e-content" itemprop="articleBody">
{{ content }}
</div>
</div>
<a class="u-url" href="{{ page.url | relative_url }}" hidden></a>
<aside class="sidebar_right">
{% if page.titles %}
<ul>
<h2>Titles:</h2>
{% for item in page.titles %}
<li>
<a class="p_link" href="#{{item | split: ' ' | join: '-' | downcase | remove: '/'}}">{{item}}</a>
</li>
{% endfor %}
</ul>
{% endif %}
</nav>
</aside>
</article>

Просмотреть файл

@ -5,7 +5,7 @@ body {
font-family: "Roboto", sans-serif;
}
h1 {
font-size: 48px;
font-size: 34px;
font-weight: 700;
color: $brand-color;
line-height: 1;
@ -15,6 +15,10 @@ h2 {
font-weight: 700;
line-height: 1.25;
}
h1, h2, h3, h4, h5, h6 {
scroll-snap-align: start;
scroll-margin-top: 100px;
}
p {
font-size: 16px;
line-height: 1.5;
@ -87,7 +91,7 @@ p {
display: grid;
}
.home_intro {
margin-top: 30px;
padding-top: 30px;
display: grid;
gap: 2em;
align-items: start;
@ -105,31 +109,34 @@ p {
margin-left: auto;
margin-right: auto;
}
.left_sidebar {
position: fixed;
.sidebar_left {
display: none;
left: 0;
top: 100px;
padding: 20px 2% 20px 2%;
ul {
list-style-type: none;
margin: 0;
a {
padding: 5px;
color: $sidebar-color;
&:hover {
color: $sidebar-hover;
nav {
top: 180px;
position: sticky;
ul {
list-style-type: none;
margin: 0;
a {
padding: 5px;
font-size: $sidebar_f_size;
color: $brand-color;
&:hover {
color: $sidebar-hover;
}
}
}
}
}
.page-content {
width: 100%;
display: grid;
grid-template-columns: 10% 1fr 10%;
grid-template-areas: ". c .";
}
.content {
grid-area: c;
margin: 0 auto;
padding: 30px;
.content_grid {
display: grid;
gap: 1rem;
@ -174,11 +181,6 @@ p {
}
}
/* Team page */
/* .team_intro .text_box p,
.team_grid {
color: $text-color-t;
} */
.team_grid {
display: grid;
gap: 4rem;
@ -236,7 +238,7 @@ p {
/* Blog page */
.blog_intro {
margin-bottom: 20px;
padding: 20px;
height: max-content;
img {
margin-bottom: 30px;
@ -263,15 +265,44 @@ p {
padding: 2%;
margin-left: auto;
margin-right: auto;
.footer-heading{
.footer-heading {
padding: 15px;
}
p {
margin: 0;
}
}
/* Document style */
.doc_page {
.docs {
display: grid;
background: $bg-color-doc;
color: $background-color;
.intro_wrapper {
background: $background-color;
color: $text-color;
grid-area: c;
}
.doc {
padding: 30px;
doc_title {
padding-top: 200px;
}
a:hover {
color: #000;
}
}
.docs_content {
padding: 20px;
display: grid;
}
}
}
/* media queries */
@media screen and (min-width: 768px) {
.intro {
padding: 30px;
}
.home_intro {
h1 {
font-size: 56px;
@ -289,14 +320,51 @@ p {
width: max-content;
}
}
.sidebar_left {
display: block;
padding: 20px;
}
.content_grid {
grid-template-columns: 1fr 1fr;
}
.author_image {
.author_image {
width: 50%;
}
}
@media screen and (min-width: 1024px) {
.docs {
width: 100%;
display: grid;
grid-template-columns: 320px 1fr;
grid-template-areas: "l c" "l d";
.docs_content {
grid-area: d;
max-width: 1000px;
padding: 40px;
}
.doc {
display: grid;
grid-template-columns: 1fr 260px;
h1, h2 {
padding-top: 30px;
}
.sidebar_right {
padding: 30px;
ul {
list-style: none;
position: sticky;
top: 150px;
a {
font-size: 14px;
&:hover {
color: #000;
}
}
}
}
}
}
.home_intro {
h1 {
font-size: 84px;
@ -306,8 +374,8 @@ p {
}
}
.intro {
margin-top: 5vw;
margin-bottom: 30px;
max-width: 1000px;
padding: 5vw 40px 30px;
display: grid;
gap: 40px;
grid-template-columns: 2fr 1fr;
@ -326,7 +394,7 @@ p {
grid-template-columns: 1fr 2fr;
gap: 4rem;
}
.author_image {
.author_image {
width: 80%;
}
}
@ -348,7 +416,10 @@ p {
grid-template-columns: 1fr 1fr 1fr;
}
.page-content {
grid-template-columns: 1fr 1000px 1fr;
/* grid-template-columns: 260px 1fr 260px; */
.content {
max-width: 1000px;
}
}
.home_intro {
min-height: 80vh;

Просмотреть файл

@ -65,7 +65,7 @@ h2 {
.image_box img {
width: 100%;
}
.left_sidebar {
.sidebar_left {
position: fixed;
left: 0;
top: 100px;

Просмотреть файл

@ -3,17 +3,18 @@
// Define defaults for each variable.
$base-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !default;
$base-font-size: 20px !default;
$base-font-weight: 400 !default;
$small-font-size: $base-font-size * 0.875 !default;
$base-line-height: 1.5 !default;
$spacing-unit: 30px !default;
$base-font-size : 20px !default;
$base-font-weight : 400 !default;
$small-font-size : $base-font-size * 0.875 !default;
$base-line-height : 1.5 !default;
$sidebar_f_size : 14px;
$spacing-unit : 30px !default;
$text-color: #fdfdfd !default;
$text-color-s: rgb(200,255,255) !default;
$text-color-t: #5a6170 !default;
$background-color: #1b1f23 !default;
$bg-color-doc: #ffffff !default;
$brand-color: #2a7ae2 !default;
$sidebar-color: #a6b4cf !default;
$sidebar-hover: #d8e2f5 !default;

Просмотреть файл

@ -16,7 +16,7 @@ dl, dd, ol, ul, figure {
body {
font: $base-font-weight #{$base-font-size}/#{$base-line-height} $base-font-family;
color: $text-color;
background-color: $background-color;
// background-color: $background-color;
-webkit-text-size-adjust: 100%;
-webkit-font-feature-settings: "kern" 1;
-moz-font-feature-settings: "kern" 1;

51
documents.md Normal file
Просмотреть файл

@ -0,0 +1,51 @@
---
layout : docs
permalink : /docs/
title : Documentation
description: "Lorem, ipsum dolor sit amet consectetur adipisicing elit. Provident voluptas voluptatum libero dignissimos reprehenderit doloribus, deserunt voluptatem nostrum repellat ab a cumque vitae reiciendis ut alias explicabo dolorem blanditiis, quisquam fuga. Dolores possimus aut perferendis enim unde architecto, debitis nihil! Lorem ipsum dolor sit amet consectetur adipisicing elit. Error at deleniti nulla voluptate eligendi iste modi, asperiores possimus architecto consectetur in dolore cum illum maxime neque molestias aspernatur culpa odio? "
---
## Migrating
:rotating_light: **If you currently use the `primer` or `primer-`-prefixed npm packages, please read [the migration guide](MIGRATING.md)!**
## Install
This repository is distributed with [npm]. After [installing npm][install-npm], you can install `@primer/css` with this command:
```sh
$ npm install --save @primer/css
```
## Usage
The included source files are written in [Sass] using SCSS syntax. After [installing](#install) with npm, you can add your project's `node_modules` directory to your Sass [include paths](https://github.com/sass/node-sass#includepaths) (AKA [load paths](http://technology.customink.com/blog/2014/10/09/understanding-and-using-sass-load-paths/) in Ruby), then import it like this:
```scss
@import "@primer/css/index.scss";
```
You can import individual Primer modules directly from the `@primer/css` package:
```scss
@import "@primer/css/core/index.scss";
@import "@primer/css/product/index.scss";
@import "@primer/css/marketing/index.scss";
```
## Development
See [DEVELOP.md](./DEVELOP.md) for development docs.
## Releasing (for GitHub staff)
You can find docs about our release process in [RELEASING.md](./RELEASING.md).
## Documentation
The [Primer CSS docs site](https://primer.style/css) is deployed from this repo with [primer/deploy](https://github.com/primer/deploy). See [the development docs](DEVELOP.md#docs-site) for more info.
## License
[MIT](./LICENSE) &copy; [GitHub](https://github.com/)
[install-npm]: https://docs.npmjs.com/getting-started/installing-node
[npm]: https://www.npmjs.com/
[primer]: https://primer.style
[sass]: http://sass-lang.com/