Description |
""" | |
a simple script that reads tweets inside a json file, uses openai to compute embeddings and creates two files, metadata.tsv and output.tsv, which cam be used to visualise the tweets and their embeddings in TensorFlow Projector (https://projector.tensorflow.org/) | |
""" | |
# obtain tweets.json from https://gist.github.com/gd3kr/948296cf675469f5028911f8eb276dbc | |
import pandas as pd | |
import json | |
from openai import OpenAI |
import requests | |
API = "https://api.wmdb.tv/api/v1/top?type={movie_type}&skip=0&limit={limit}" | |
def get_top_movies(movie_type, limit=250): | |
r = requests.get(API.format(movie_type=movie_type, limit=limit)) | |
if not r.ok: | |
raise Exception(f"Can not get movies for {movie_type} type") | |
return r.json() |
.ProseMirror .MathBlock pre { | |
background: var(--default-back); | |
color: rgb(var(--default-font)); | |
font-size: 0.8em; | |
display: flex; | |
padding: 1em; | |
} | |
.ProseMirror .MathBlock { | |
display: flex; |
.ProseMirror .Math { | |
display: contents; | |
} | |
.ProseMirror .Math .katex-editor { | |
display: inline; | |
} | |
.ProseMirror .Math .katex-render .katex { | |
font-size: 1em; |
This gist is an ES module which provides functions to import and export data from an IndexedDB database as JSON. It's based on Justin Emery's indexeddb-export-import
package, but applies some adjustments that reflect better on the current browser landscape (i.e. better developer ergonomics but no support for Internet Explorer).
For each of the provided functionalities, you need a connected IDBDatabase
instance.
import { idb } from 'some-database'
module.exports = { | |
chainWebpack: config => { | |
config.module.rule('pdf') | |
.test(/\.(pdf)(\?.*)?$/) | |
.use('file-loader') | |
.loader('file-loader') | |
.options({ | |
name: 'assets/pdf/[name].[hash:8].[ext]' | |
}) |
IaaS指提供系统(可以自己选)或者储存空间之类的硬件,软件要自己手动装;PaaS提供语言环境和框架(可以自己选);SaaS只能使用开发好的软件(卖软件本身);BaaS一般类似于非关系数据库,但各家不通用,有时还有一些其它东西。
- https://education.github.com/pack GitHub学生包,需用教育邮箱验证。各种福利,可从DigitalOcean上手
- https://github.com/ripienaar/free-for-dev 本文尽量不与此项目重复
- https://free.zhelper.net/
- https://github.com/AchoArnold/discount-for-student-dev
<template> | |
<div class="c-code-block"> | |
<div class="c-code-block__meta" contenteditable="false" v-if="editable"> | |
<icon-btn | |
class="c-code-block__action-icon" | |
name="more" | |
:dropdown-props="{ closeOnClick: false }" | |
ref="icon" | |
> | |
<template v-slot:dropdown> |
The following outlines how to setup Heroku + Cloudflare with a full SSL certificate. What this means is that communication between the browser and the Cloudflare CDN is encrypted as well as communication between Cloudflare and Heroku’s origin server. Follow these steps exactly and the setup is a breeze.
First you want to add the root domain and the www domain to heroku. You do this by clicking into your production application, then going to settings and then scrolling down to Domains and certificates.
Here you will add <your_domain>.com
and www.<your_domain>.com
. This will give you two CNAME records. They will look something like <your_domain>.com.herokudns.com
and www.<your_domain>.com.herokudns.com
.