- Elasticsearch Internals
- Lucene Indexing
- Java Library
- Shard
- A shard is an instance of Lucene
- max # of documents in a shard is Integer.MAX_VALUE - 128
- clients do not refer to shards directly (use index instead
- What's in a shard?
- indexed document gets analyzed, put in buffer
- Lucene Indexing
- buffer defaults to 10% of node heap (set with indices.memory.index_buffer_size)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWSTemplateFormatVersion: 2010-09-09 | |
Outputs: | |
HelloWorldApi: | |
Description: API Gateway endpoint URL for Prod stage for Hello World function | |
Value: !Sub >- | |
https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/hello/ | |
HelloWorldFunctionIamRole: | |
Description: Implicit IAM Role created for Hello World function | |
Value: !GetAtt | |
- HelloWorldFunctionRole |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Return-Path: <[email protected]> | |
Received: from shell.com ([37.120.146.95]) by | |
inbound-smtp.us-east-1.amazonaws.com with SMTP id | |
d8j5m6dfae652tfcrm9gpnmhp8lnv79c5re4ss01 for [email protected]; Sun, 20 Jan | |
2019 22:55:43 +0000 | |
Received-SPF: fail (spfCheck: domain of shell.com does not designate | |
37.120.146.95 as permitted sender) client-ip=37.120.146.95; | |
[email protected]; helo=37.120.146.95; | |
Subject: EMPLOYMENT OFFER 2019 | |
From: =?windows-1252?Q?JAMIE_WILLIAMS_-_=28HR_Dept-_SHELL_OIL_COMPANY=29?= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
def format_name(response): | |
email_address = response['Email Address'] | |
name = email_address.split('@')[0].replace('.', ' ').title() | |
return "%s (%s)" % (name, response['What is your role?']) | |
def response_id(field_index, response): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
from botocore.vendored import requests | |
client = boto3.client('cloudfront') | |
def handler(event, context): | |
for record in event['Records']: | |
key = record['s3']['object']['key'] | |
items = [key] | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@d1e2b187-78bb-4979-4a61-ead7 ~]# ps ax | |
PID TTY STAT TIME COMMAND | |
1 ? Ss 0:00 /tmp/garden-init | |
6 ? Ss 0:01 httpd (mod_wsgi-express) -f /tmp/mod_wsgi-localhost:8000:0/httpd.conf -DMOD_WSGI_MPM_ENABLE_EVENT_MODULE -DMOD_WSGI_MPM_EXISTS_EVENT_MODULE -DMOD_WSGI_MPM_EXISTS_WOR | |
13 ? Ssl 0:00 /tmp/lifecycle/diego-sshd --allowedKeyExchanges= --address=0.0.0.0:2222 --allowUnauthenticatedClients=false --inheritDaemonEnv=true --allowedCiphers= --allowedMACs= | |
56 ? Sl 0:02 (wsgi:localhost:8000:0) -f /tmp/mod_wsgi-localhost:8000:0/httpd.conf -DMOD_WSGI_MPM_ENABLE_EVENT_MODULE -DMOD_WSGI_MPM_EXISTS_EVENT_MODULE -DMOD_WSGI_MPM_EXISTS_WOR | |
57 ? Sl 0:00 httpd (mod_wsgi-express) -f /tmp/mod_wsgi-localhost:8000:0/httpd.conf -DMOD_WSGI_MPM_ENABLE_EVENT_MODULE -DMOD_WSGI_MPM_EXISTS_EVENT_MODULE -DMOD_WSGI_MPM_EXISTS_WOR | |
72 ? Ssl 0:00 /etc/cf-assets/healthcheck/healthcheck -port=8000 -timeout=1000ms -liveness-interval=30 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM centos:7 | |
RUN yum install -y centos-release-scl https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-centos10-10-2.noarch.rpm && \ | |
yum install -y rh-python36 rh-python36-mod_wsgi httpd24 postgresql10 && \ | |
echo "source scl_source enable rh-python36" > /etc/profile.d/scl_python.sh && \ | |
echo "source scl_source enable httpd24" > /etc/profile.d/scl_httpd.sh && \ | |
source /etc/profile && \ | |
pip3 install --no-cache-dir -U pip setuptools wheel virtualenv && yum clean all && rm -rf /var/cache/yum |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWSTemplateFormatVersion: '2010-09-09' | |
Transform: AWS::Serverless-2016-10-31 | |
Resources: | |
ServerlessRestApi: | |
Type: 'AWS::Serverless::Api' | |
Properties: | |
StageName: Prod | |
DefinitionBody: | |
info: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func _integrate_forces(state): | |
# enforce min and max speed | |
# based on: https://godotengine.org/qa/44040/how-to-set-a-max-speed-of-a-rigidbody2d?show=44086#c44086 | |
# no, I don't totally understand the math | |
state.linear_velocity=state.linear_velocity.normalized()*clamp(state.linear_velocity.length(), 700, 1000) |