Skip to content

Instantly share code, notes, and snippets.

Summarizing news headlines with CPU and GPU

Section

Mix.install(
  [
    {:req, "~> 0.3.0"},
    {:elixir_feed_parser, "~> 2.1.0"},
    {:readability, "~> 0.10.0"},
@rrcook
rrcook / gist:5a262c768a330f8d374dcef7b7a50da1
Created January 23, 2021 02:47
Real-world use of JavaScript Symbols and class expressions in Lightning Web Components
// Code from Lightning Web Components source, taken from Chrome dev console
const Navigate = Symbol("Navigate");
const GenerateUrl = Symbol("GenerateUrl");
const NavigationMixin = Base => {
assertIsLightningElementSubclass(Base);
return class extends Base {
[Navigate](pageReference, replace) {
navigationService.getService(this).navigateTo(pageReference, {
replace
});
<apex:page docType="html-5.0" >
<html ng-app="restApiApp" >
<head>
<apex:includeScript value="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular.min.js"/>
</head>
<body ng-controller="MainCtrl">
<h1>Test REST API from JavaScript with AngularJS</h1>
<div ng-init="sessionId='{!$Api.Session_ID}'; url='/services/data/v30.0/query?q=SELECT+Name+FROM+Account+LIMIT+10'">
<input id="query" size="120" value="{{url}}" ng-model="url"/>
<button ng-click="submit()">Submit</button>
@rrcook
rrcook / gist:1041697
Created June 23, 2011 01:23 — forked from anonymous/gist:1033605
ReadyForZero solutions in Clojure
(ns readyforzero.core
(:use clojure.contrib.combinatorics))
(def *CT1* "en3pG3+nz+A2acXKrsyDouhViP9EDQS4JQK6uJqM3rBjKEBKC3yc=AA1=LUQqRPHvQ4dopgkbb/axClP3smzVcaTkRsCqHSG5aKFQ2TbOae0t5r4nWrCVesGK1Z3yEq+dClrDwXXOiAMyW09WdCS+CaKcfu=6kv9dUFBcS4KsUIgwMiXimoBpJZSWlBzILVf4zVA=7GjRP8RXn6uKjbjAPkpFEs/mYJpeOpEnhQfPhjoscgjfL5/SQsU6+jaAf5pg9MQzZdQAEJt7Jm1541fEmnumpjmJMd/MTJ5vzBttBBA7b5rbjDX0nHdTWn8C5suYKfNyYzc6x8S6FIepoEBsMS2mKhx5BRH5jSBrYRem4iQgYARzGnCFot3jPhp3cHj7qjXBWfZZASz8YJqi2d+r393AmdGm1L9NfU2f=FJprbLwJpuE7uT7xAlQA3Ry8aHRNgNkffP29Iqb2DSoQ0PK+9LX0t37HIAhI5zvoP6b4J7yQZEQDgeNlnPQMvSjw9pLWAxQ1VUY+NMU5BLZ2Bxuma1cIsHxcx4PwHcg0u1HYPJAWM2WK=xhJP5aQSc6oNMQK4s2=6guQRVFll6rvWkXTebrdsws7m/Kpa29spUFl8XzFx0ondEMCF3byAyWj875wAI3Hn8ZY92ddTAKj0s+a4X7qSti2lA0GzePHjBjMCD5g9kZYLtB94kkbVZ6eCle/xtto4LHH8GElc5YoUi=mk3nmQ5iOL1zMWfDyRUMLq+HCXbQL9NTejNa/yTdL3sayJOlMW1T7/Jmaz1FMbfBRFzruHeMT41=Zu3nYZJ3nIP22qKrFzNkt/24RuQ+7IMVCI2ngh2Yr8qLiL7QjSThRJPxA1wIJXwR2wqGiMhOqpun4DyQ5b/fTw1eTavpbFg6+tvqS4GKOt6p=bPoTV0GHIBBlXgHF/GUss90N0mXMKKiGwHhn/ky