I hereby claim:
- I am linuskohl on github.
- I am linuskohl (https://keybase.io/linuskohl) on keybase.
- I have a public key ASBe5pRAYVrsgPvHl3Qyi0M8NSLVuPfTOXX0tHtO-d_WpQo
To claim this, I am signing this object:
| <?php | |
| namespace app\components; | |
| use yii\base\InvalidConfigException; | |
| /** | |
| * Class CustomSerializer | |
| * | |
| * Serializer |
I hereby claim:
To claim this, I am signing this object:
| var gaProperty = 'UA-XXXXXXXX-X'; | |
| // Get the name of the GA tracking disable cookie | |
| var disableStr = 'ga-disable-' + gaProperty; | |
| // Check if GA cookie exists | |
| window[disableStr] = (document.cookie.indexOf(disableStr + '=true') > -1) | |
| // Opt-out function | |
| function gaOptout() { |
| from math import ceil, sqrt | |
| import numpy as np | |
| import pandas as pd | |
| def movmean(v, kb, kf): | |
| """ | |
| Computes the mean with a window of length kb+kf+1 that includes the element | |
| in the current position, kb elements backward, and kf elements forward. | |
| Nonexisting elements at the edges get substituted with NaN. |
| # import client and input model | |
| from ambiverseclient.clients import AmbiverseNLU, KnowledgeGraph | |
| from ambiverseclient.models import AnalyzeInput | |
| # specify the API endpoints | |
| a_endpoint = AmbiverseNLU_ENDPOINT | |
| kg_endpoint = KnowledgeGraph_ENDPOINT | |
| # setup the clients | |
| a_client = AmbiverseNLU(a_endpoint, port=8080) |
| # pip install newsapi-python | |
| import time | |
| import pandas as pd | |
| import numpy as np | |
| import seaborn as sns | |
| from newsapi import NewsApiClient | |
| newsapi = NewsApiClient(api_key=API_KEY) | |
| # get 100 latest news items | |
| top_news = newsapi.get_top_headlines(language='en', page_size=100) |
| # GitLab CI/CD Variables | |
| # AWS_S3_BUCKET_PROD: S3 bucket that hosts production files | |
| # AWS_S3_BUCKET_DEV: S3 bucket that hosts development files | |
| # AWS_ACCESS_KEY_ID: AWS Key ID | |
| # AWS_SECRET_ACCESS_KEY: AWS Secret | |
| stages: | |
| - build | |
| - deploy |
| #!/usr/bin/env python | |
| # coding: utf-8 | |
| import os | |
| import feedparser | |
| import requests | |
| import sqlite3 | |
| from sqlite3 import IntegrityError | |
| from lxml import html | |
| import lxml | |
| from string import Template |
| from functools import wraps | |
| from flask import request, abort, g | |
| import json | |
| import jwt | |
| import requests | |
| from typing import Union, List | |
| from ..config import cache | |
| from ..env import JWT_ISSUER, JWT_CLIENTID, JWT_AUDIENCE | |
| DISCOVERY_URL = "/.well-known/oauth-authorization-server" |
| // load jQuery if it is not loaded already | |
| var jq = document.createElement('script'); | |
| jq.src = "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"; | |
| document.getElementsByTagName('head')[0].appendChild(jq); | |
| jQuery.noConflict(); | |
| clear(); | |
| var links = []; | |
| $(CLASS).each(function(){ links.push($(this).attr('href')) }); | |
| links; |