bonus tip: for more darkness > https://darkreader.org/
package sse | |
import ( | |
"encoding/json" | |
"fmt" | |
"github.com/alexandria-oss/core" | |
"github.com/go-kit/kit/log" | |
"net/http" | |
"sync" | |
) |
countries = [ | |
{'timezones': ['Asia/Kabul'], 'code': 'AF', 'name': 'Afghanistan'}, | |
{'timezones': ['Europe/Mariehamn'], 'code': 'AX', 'name': 'Aland Islands'}, | |
{'timezones': ['Europe/Tirane'], 'code': 'AL', 'name': 'Albania'}, | |
{'timezones': ['Africa/Algiers'], 'code': 'DZ', 'name': 'Algeria'}, | |
{'timezones': ['Pacific/Pago_Pago'], 'code': 'AS', 'name': 'American Samoa'}, | |
{'timezones': ['Europe/Andorra'], 'code': 'AD', 'name': 'Andorra'}, | |
{'timezones': ['Africa/Luanda'], 'code': 'AO', 'name': 'Angola'}, | |
{'timezones': ['America/Anguilla'], 'code': 'AI', 'name': 'Anguilla'}, | |
{'timezones': ['Antarctica/Casey', 'Antarctica/Davis', 'Antarctica/DumontDUrville', 'Antarctica/Mawson', 'Antarctica/McMurdo', 'Antarctica/Palmer', 'Antarctica/Rothera', 'Antarctica/Syowa', 'Antarctica/Troll', 'Antarctica/Vostok'], 'code': 'AQ', 'name': 'Antarctica'}, |
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"net/http" | |
"time" | |
"github.com/hashicorp/vault/api" | |
"github.com/hashicorp/vault/builtin/credential/aws" |
# Requirements: pip install tweepy fuzzywuzzy python-Levenshtein | |
import tweepy | |
import re | |
from fuzzywuzzy import fuzz | |
# Credentials go here (generate at: https://apps.twitter.com) | |
auth = tweepy.OAuthHandler('consumer_key', 'consumer_secret') | |
auth.set_access_token('access_token', 'access_token_secret') | |
# Connect to Twitter |
# Example of using an InitContainer in place of a GitRepo volume. | |
# Unilke GitRepo volumes, this approach runs the git command in a container, | |
# with the associated hardening. | |
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: git-repo-demo | |
annotations: | |
seccomp.security.alpha.kubernetes.io/pod: 'docker/default' | |
spec: |
pragma solidity ^0.4.10; | |
/** | |
* Base contract that all upgradeable contracts should use. | |
* | |
* Contracts implementing this interface are all called using delegatecall from | |
* a dispatcher. As a result, the _sizes and _dest variables are shared with the | |
* dispatcher contract, which allows the called contract to update these at will. | |
* | |
* _sizes is a map of function signatures to return value sizes. Due to EVM |
Author: Chris Lattner
- Proposal: SE-XXXX
- Authors: Chris Lattner, Joe Groff
Modern Cocoa development involves a lot of asynchronous programming using closures and completion handlers, but these APIs are hard to use. This gets particularly problematic when many asynchronous operations are used, error handling is required, or control flow between asynchronous calls gets complicated. This proposal describes a language extension to make this a lot more natural and less error prone.
This paper introduces a first class Coroutine model to Swift. Functions can opt into to being async, allowing the programmer to compose complex logic involving asynchronous operations, leaving the compiler in charge of producing the necessary closures and state machines to implement that logic.
Responding to requests via simple route matching is built in to Go's net/http
standard library package. Just register the path prefixes and callbacks you want invoked and then call the ListenAndServe
to have the default request handler invoked on each request. For example:
package main
import (