Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Author: Chris Lattner
The following are examples of the four types rate limiters discussed in the accompanying blog post. In the examples below I've used pseudocode-like Ruby, so if you're unfamiliar with Ruby you should be able to easily translate this approach to other languages. Complete examples in Ruby are also provided later in this gist.
In most cases you'll want all these examples to be classes, but I've used simple functions here to keep the code samples brief.
This uses a basic token bucket algorithm and relies on the fact that Redis scripts execute atomically. No other operations can run between fetching the count and writing the new count.
I wrote this answer on stackexchange, here: https://stackoverflow.com/posts/12597919/
It was wrongly deleted for containing "proprietary information" years later. I think that's bullshit so I am posting it here. Come at me.
Amazon is a SOA system with 100s of services (or so says Amazon Chief Technology Officer Werner Vogels). How do they handle build and release?
# List unique values in a DataFrame column | |
df['Column Name'].unique() | |
# To extract a specific column (subset the dataframe), you can use [ ] (brackets) or attribute notation. | |
df.height | |
df['height'] | |
# are same thing!!! (from http://www.stephaniehicks.com/learnPython/pages/pandas.html | |
# -or- | |
# http://www.datacarpentry.org/python-ecology-lesson/02-index-slice-subset/) |
IAM Permission | Params | |
---|---|---|
amplify:CreateApp | iamServiceRoleArn | |
amplify:UpdateApp | iamServiceRoleArn | |
appconfig:CreateConfigurationProfile | RetrievalRoleArn | |
appconfig:UpdateConfigurationProfile | RetrievalRoleArn | |
appflow:CreateConnectorProfile | connectorProfileConfig.connectorProfileProperties.Redshift.roleArn | |
appflow:UpdateConnectorProfile | connectorProfileConfig.connectorProfileProperties.Redshift.roleArn | |
application-autoscaling:RegisterScalableTarget | RoleARN | |
apprunner:CreateService | SourceConfiguration.AuthenticationConfiguration.AccessRoleArn|InstanceConfiguration.InstanceRoleArn | |
apprunner:UpdateService | SourceConfiguration.AuthenticationConfiguration.AccessRoleArn|InstanceConfiguration.InstanceRoleArn |
This is how to connect to another host with your docker client, without modifying your local Docker installation or when you don't have a local Docker installation.
First be sure to enable the Docker Remote API on the remote host.
This can easily be done with a container.
For HTTP connection use jarkt/docker-remote-api.
/* *** *** *** *** *** *** *** *** *** *** *** *** *** | |
Now, migrated to GitHub: | |
https://github.com/YOCKOW/SwiftTimeSpecification | |
This gist will not be updated. | |
*** *** *** *** *** *** *** *** *** *** *** *** *** */ | |
/* TimeSpecification.swift | |
* © 2016 YOCKOW. | |
* You can do whatever you want with this code AT YOUR OWN RISK. | |
*/ |