How To Deploy a Rails App with Puma and Nginx on Ubuntu 14.04
Introduction
When you are ready to deploy your Ruby on Rails application, there are many valid setups to consider. This tutorial will help you deploy the production environment of your Ruby on Rails application, with PostgreSQL as the database, using Puma and Nginx on Ubuntu 14.04.
Puma is an application server, like Passenger or Unicorn, that enables your Rails application to process requests concurrently. As Puma is not designed to be accessed by users directly, we will use Nginx as a reverse proxy that will buffer requests and responses between users and your Rails application.
Prerequisites
This tutorial assumes that you have an Ubuntu 14.04 server with the following software installed, on the user that will deploy the application:
If you do not have that set up already, follow the tutorials that are linked above. We will assume that your user is called deploy.
Also, this tutorial does not cover how to set up your development or test environments. If you need help with that, follow the example in the PostgreSQL with Rails tutorial.
Create Rails Application
Ideally, you already have a Rails application that you want to deploy. If this is the case, you may skip this section, and make the appropriate substitutions while following along. If not, the first step is to create a new Rails application that uses PostgreSQL as its database.
This command will create a new Rails application, named "appname" that will use PostgreSQL as the database. Feel free to substitute the highlighted "appname" with something else:
rails new appname -d postgresql
Then change into the application directory:
cd appname
Let's take a moment to create the PostgreSQL user that will be used by the production environment of your Rails application.
Create Production Database User
To keep things simple, let's name the production database user the same as your application name. For example, if your application is called "appname", you should create a PostgreSQL user like this:
sudo -u postgres createuser -s appname
We want to set the database user's password, so enter the PostgreSQL console like this:
sudo -u postgres psql
Then set the password for the database user, "appname" in the example, like this:
\password appname
Enter your desired password and confirm it.
Exit the PostgreSQL console with this command:
\q
Now we're ready to configure the your application with the proper database connection information.
Configure Database Connection
Ensure that you are in your application's root directory (cd ~/appname
).
Open your application's database configuration file in your favorite text editor. We'll use vi:
vi config/database.yml
Update the production
section so it looks something like this:
production:
<<: *default
host: localhost
adapter: postgresql
encoding: utf8
database: appname_production
pool: 5
username: <%= ENV['APPNAME_DATABASE_USER'] %>
password: <%= ENV['APPNAME_DATABASE_PASSWORD'] %>
Note that the database username and password are configured to be read by environment variables, APPNAME_DATABASE_USER
and APPNAME_DATABASE_PASSWORD
. It is considered best practice to keep production passwords and secrets outside of your application codebase, as they can easily be exposed if you are using a distributed version control system such as Git. We will go over how to set up the database authentication with environment variables next.
Save and exit.
Install rbenv-vars Plugin
Before deploying a production Rails application, you should set the production secret key and database password using environment variables. An easy way to manage environment variables, which we can use to load passwords and secrets into our application at runtime, is to use the rbenv-vars plugin.
To install the rbenv-vars plugin, simply change to the .rbenv/plugins
directory and clone it from GitHub. For example, if rbenv is installed in your home directory, run these commands:
cd ~/.rbenv/plugins
git clone https://github.com/sstephenson/rbenv-vars.git
Set Environment Variables
Now that the rbenv-vars plugin is installed, let's set up the required environment variables.
First, generate the secret key, which will be used to verify the integrity of signed cookies:
cd ~/appname
rake secret
Copy the secret key that is generated, then open the .rbenv-vars
file with your favorite editor. We will use vi:
vi .rbenv-vars
Any environment variables that you set here can be read by your Rails application.
First, set the SECRET_KEY_BASE
variable like this (replace the highlighted text with the secret that you just generated and copied):
SECRET_KEY_BASE=your_generated_secret
Next, set the APPNAME_DATABASE_USER
variable like this (replace the highlighted "APPNAME" with your your application name, and "appname" with your production database username):
APPNAME_DATABASE_USER=appname
Lastly, set the APPNAME_DATABASE_PASSWORD
variable like this (replace the highlighted "APPNAME" with your your application name, and "prod_db_pass" with your production database user password):
APPNAME_DATABASE_PASSWORD=prod_db_pass
Save and exit.
You may view which environment variables are set for your application with the rbenv-vars plugin by running this command:
rbenv vars
If you change your secret or database password, update your .rbenv-vars
file. Be careful to keep this file private, and don't include it any public code repositories.
Create Production Database
Now that your application is configured to talk to your PostgreSQL database, let's create the production database:
RAILS_ENV=production rake db:create
Generate a Controller
If you are following along with the example, we will generate a scaffold controller so our application will have something to look at:
rails generate scaffold Task title:string note:text
Now run this command to update the production database:
RAILS_ENV=production rake db:migrate
You should also precompile the assets:
RAILS_ENV=production rake assets:precompile
To test out if your application works, you can run the production environment, and bind it to the public IP address of your server (substitute your server's public IP address):
RAILS_ENV=production rails server --binding=server_public_IP
Now visit this URL in a web browser:
http://server_public_IP:3000/tasks
If it's working properly, you should see this page:
Go back to your Rails server, and press Ctrl-c
to stop the application.
Install Puma
Now we are ready to install Puma.
An easy way to do this is to add it to your application's Gemfile
. Open the Gemfile in your favorite editor (make sure you are in your application's root directory):
vi Gemfile
At the end of the file, add the Puma gem with this line:
gem 'puma'
Save and exit.
To install Puma, and any outstanding dependencies, run Bundler:
bundle
Puma is now installed, but we need to configure it.
Configure Puma
Before configuring Puma, you should look up the number of CPU cores your server has. You can easily to that with this command:
grep -c processor /proc/cpuinfo
Now, let's add our Puma configuration to config/puma.rb
. Open the file in a text editor:
vi config/puma.rb
Copy and paste this configuration into the file:
# Change to match your CPU core count
workers 2
# Min and Max threads per worker
threads 1, 6
app_dir = File.expand_path("../..", __FILE__)
shared_dir = "#{app_dir}/shared"
# Default to production
rails_env = ENV['RAILS_ENV'] || "production"
environment rails_env
# Set up socket location
bind "unix://#{shared_dir}/sockets/puma.sock"
# Logging
stdout_redirect "#{shared_dir}/log/puma.stdout.log", "#{shared_dir}/log/puma.stderr.log", true
# Set master PID and state locations
pidfile "#{shared_dir}/pids/puma.pid"
state_path "#{shared_dir}/pids/puma.state"
activate_control_app
on_worker_boot do
require "active_record"
ActiveRecord::Base.connection.disconnect! rescue ActiveRecord::ConnectionNotEstablished
ActiveRecord::Base.establish_connection(YAML.load_file("#{app_dir}/config/database.yml")[rails_env])
end
Change the number of workers
to the number of CPU cores of your server.
Save and exit.  Feel free to modify the file, or add any other options that you require.
Now create the directories that were referred to in the configuration file:
mkdir -p shared/pids shared/sockets shared/log
Create Puma Upstart Script
Let's create an Upstart init script so we can easily start and stop Puma, and ensure that it will start on boot.
Download the Jungle Upstart tool from the Puma GitHub repository to your home directory:
cd ~
wget https://raw.githubusercontent.com/puma/puma/master/tools/jungle/upstart/puma-manager.conf
wget https://raw.githubusercontent.com/puma/puma/master/tools/jungle/upstart/puma.conf
Now open the provided puma.conf
file, so we can configure the Puma deployment user:
vi puma.conf
Look for the two lines that specify setuid
and setgid
, and replace "apps" with the name of your deployment user and group. For example, if your deployment user is called "deploy", the lines should look like this:
setuid deploy
setgid deploy
Save and exit.
Now copy the scripts to the Upstart services directory:
sudo cp puma.conf puma-manager.conf /etc/init
The puma-manager.conf
script references /etc/puma.conf
for the applications that it should manage. Let's create and edit that inventory file now:
sudo vi /etc/puma.conf
Each line in this file should be the path to an application that you want puma-manager
to manage. Add the path to your application now. For example:
/home/deploy/appname
Save and exit.
Now your application is configured to start at boot time, through Upstart. This means that your application will start even after your server is rebooted.
Start Puma Applications Manually
To start all of your managed Puma apps now, run this command:
sudo start puma-manager
You may also start a single Puma application by using the puma
Upstart script, like this:
sudo start puma app=/home/deploy/appname
You may also use stop
and restart
to control the application, like so:
sudo stop puma-manager
sudo restart puma-manager
Now your Rails application's production environment is running under Puma, and it's listening on the shared/sockets/puma.sock
socket. Before your application will be accessible to an outside user, you must set up the Nginx reverse proxy.
Install and Configure Nginx
Install Nginx using apt-get:
sudo apt-get install nginx
Now open the default server block with a text editor:
sudo vi /etc/nginx/sites-available/default
Replace the contents of the file with the following code block. Be sure to replace the the highlighted parts with the appropriate username and application name (two locations):
upstream app {
# Path to Puma SOCK file, as defined previously
server unix:/home/deploy/appname/shared/sockets/puma.sock fail_timeout=0;
}
server {
listen 80;
server_name localhost;
root /home/deploy/appname/public;
try_files $uri/index.html $uri @app;
location @app {
proxy_pass http://app;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
}
error_page 500 502 503 504 /500.html;
client_max_body_size 4G;
keepalive_timeout 10;
}
Save and exit. This configures Nginx as a reverse proxy, so HTTP requests get forwarded to the Puma application server via a Unix socket. Feel free to make any changes as you see fit.
Restart Nginx to put the changes into effect:
sudo service nginx restart
Now the production environment of your Rails application is accessible via your server's public IP address or FQDN. To access the Tasks controller that we created earlier, visit your application server in a web browser:
http://server_public_IP/tasks
You should see the same page that you saw the first time you tested your application, but now it's being served through Nginx and Puma.
Conclusion
Congratulations! You have deployed the production environment of your Ruby on Rails application using Nginx and Puma.
If you are looking to improve your production Rails application deployment, you should check out our tutorial series on How To Use Capistrano to Automate Deployments. The series is based on CentOS, but it should still be helpful in automating your deployments.
40 Comments


Hi @Exile13
Here art some basic ommands that you can use.
To start StakedNotary and all its chains: `./start.sh`
To issue commands to a coin: asset-cli <COINS_NAME> <COMMAND> eg, `./asset-cli CFEKORC getinfo` or `./asset-cli CFEKORC help`
To issue commands to all assetchains: assets-cli <COMMAND> eg, `./assets-cli getinfo` or `./assets-cli getbalance`
To kill everything: ./stop.sh


This documentation is targeted for JavaScript developers who
are using Marpit framework, not for users of
Marp presentation ecosystem. If you are a consumer of Marp who are not familiar with
engineering, it may be hard to understand the contents.
Marp team is planning a unified documentation for Marp users.
Track the progress at
marp-team/marp#126.


Rock Paper Scissors
Hi Pavan. You are player 1
Waiting for Ahmed to choose || It's your turn
Ellis
Paper
wins: 0 Losses: 0
Samson
Rock
wins: 0 Losses: 0
send


Fuse comes with variety of different Theme Layouts which you can see and try them from the configuration sidebar (Click on the animated, spinning cog button from the right side of your screen). These layouts are accessible from /src/app/layouts directory and you can modify them however you like.
Each layout has its own options. Those options allow you to configure the layout elements such as Toolbar, Footer and Navbar.
Inside the /layouts directory, you will find the following structure:
Fuse has a powerful layout system which allows you to configure and use a different layout per route. Each route can have its own layout configuration meaning that it's very easy to have pages like login page where there isn't any toolbar or navbar showing, without leaving the Fuse.
You can get more information about the Fuse Config Service and its usage from Config documantation page.


Any movies you save to Quix will be displayed on this page. To save a movie, do a search and then press the save icon in the bottom right corner of each movie.
Do you want to keep using Quix? Upgrade your temporary login to a personal account and permanently access your saved movies.
Save to favourites?
Something has gone wrong.
This movie is already in your list of favourites.


Say Yes to Happiness and No to Depression the preview page. Sadness is a normal emotion, and we all feel it at certain times of life. While there are many factors that lead sadness to depression, one of the most sinister is “reward erosion.” If you’ve been depressed, you almost certainly experienced the shoreline of your life shrinking, plunging your life into pits of depression like a house falling into the sea..
Happy DU is a nonprofit organization working for the mentally depressed students. It established in February 2018 after hearing back to back news of suicide of the beloved students of our university. From the urge of doing something for the depressed students Musabbir Hussain, a student of Zoology (Session: 2011-12) with Md. Atiqur Rahman and Ishrat Jahan Emu ( Department of Software Engineering, Session: 2016-17, Third year) started Happy DU. Later former student of Banking and Finance Tahmina Akhter, Kaifa Ibrahim from Disaster Management, Shaila Islam from Accounting Information System, Sadia Afroz Shams from Psychology joined Happy DU.
No one can proceed without struggling. We are also struggling from the beginning till now. It was not easy at first to understand someone about our operation. We started with few depressed people and got their positive feedback that helped us to thrive forward. We didn’t have professional psychotherapist when we started Happy DU. But we had to deal with those depressed students in spite of having all of these shortages. We dealt with students and still dealing who are determined to commit suicide. But at first it was not easy at all.
“Moner Chithi” is a google form where a person can share his/her problems or views anonymously. Then we post the problems in our group for discussion and solution. We also referred the critically depressed students immediately to the professional psychotherapist. Anyone can contact us through our official page of Happy DU. Then we provide the necessary steps needed for the students. We started giving scholarship among the students who are depressed for financial crisis but it stopped due to lack of funding.


This lesson covers the basics of programming languages. The topics covered here apply to most modern programming languages today. In the ‘Tools of the Trade’ section, you’ll learn about useful software that helps you as a developer.
Sketchnote by Tomomi Imura
In this lesson, we’ll cover:
Programming (also known as coding) is the process of writing instructions to a device, such as a computer or mobile device. We write these instructions with a programming language, which is then interpreted by the device. These sets of instructions may be referred to by various names, but program, computer program, application (app), and executable are a few popular names.
A program can be anything that is written with code; websites, games, and phone apps are programs. While it’s possible to create a program without writing code, the underlying logic is interpreted to the device and that logic was most likely written with code. A program that is running or executing code is carrying out instructions. The device that you’re currently reading this lesson with is running a program to print it to your screen.
✅ Do a little research: who is considered to have been the world’s first computer programmer?
Programming languages serve a main purpose: for developers to build instructions to send to a device. Devices only can understand binary (1s and 0s), and for most developers that’s not a very efficient way to communicate. Programming languages are a vehicle for communication between humans and computers.
Programming languages come in different formats and may serve different purposes. For example, JavaScript is primarily used for web applications, while Bash is primarily used for operating systems.
Low level languages typically require fewer steps than high level languages for a device to interpret instructions. However, what makes high level languages popular is its readability and support. JavaScript is considered a high level language.
The following code illustrates the difference between a high level language with JavaScript and low level language with ARM assembly code.
let number = 10;
let n1 = 0,
n2 = 1,
nextTerm;
for (let i = 1; i <= number; i++) {
console.log(n1);
nextTerm = n1 + n2;
n1 = n2;
n2 = nextTerm;
}
area ascen,code,readonly
entry
code32
adr r0,thumb+1
bx r0
code16
thumb
mov r0,#00
sub r0,r0,#01
mov r1,#01
mov r4,#10
ldr r2,=0x40000000
back add r0,r1
str r0,[r2]
add r2,#04
mov r3,r0
mov r0,r1
mov r1,r3
sub r4,#01
cmp r4,#00
bne back
end
Believe it or not, they’re both doing the same thing: printing a Fibonacci sequence up to 10.
✅ A Fibonacci sequence is defined as a set of numbers such that each number is the sum of the two preceding ones, starting from 0 and 1.
A single instruction in a program is called a statement and will usually have a character or line spacing that marks where the instruction ends, or terminates. How a program terminates varies with each language.
Most programs rely on using data from a user or elsewhere, where statements may rely on data to carry out instructions. Data can change how a program behaves, so programming languages come with a way to temporarily store data that can be used later. This data is called variables. Variables are statements that instruct a device to save data in its memory. Variables in programs are similar to ones in algebra, where they have a unique name and their value may change over time.
There’s a chance that some statements will not be executed by a device.
This is usually by design when written by the developer or by accident
when an unexpected error occurs. This type of control of an application
makes it more robust and maintainable. Typically these changes in control
happen when certain decisions are met. A common statement in modern
programming languages to control how a program is run is the
if..else
statement.
✅ You’ll learn more about this type of statement in subsequent lessons
In this section, you’ll learn about some software that you might find very useful as you start your professional development journey.
A development environment is a unique set of tools and features that a developer will use often when writing software. Some of these tools have been customized for a developer specific needs, and may change over time if a developer changes priorities in work or personal projects, or when they use a different programming language. Development environments are as unique as the developers who use them.
One of the most crucial tools for software development is the editor. Editors are where you write your code and sometimes where you will run your code.
Developers rely on editors for a few additional reasons:
Another crucial tool is the browser. Web developers rely on the browser to observe how their code runs on the web, it’s also used to view visual elements of a web page that are written in the editor, like HTML.
Many browsers come with developer tools (DevTools) that contain a set of helpful features and information to assist developers to collect and capture important insights about their application. For example: If a web page has errors, it’s sometimes helpful to know when they occurred. DevTools in a browser can be configured to capture this information.
Some developers prefer a less graphical view for their daily tasks and rely on the command line to achieve this. Developing code requires a significant amount of typing, and some developers prefer to not disrupt their flow on the keyboard and will use keyboard shortcuts to swap between desktop windows, work on different files, and use tools. Most tasks can be completed with a mouse, but one benefit of using the command line is that a lot can be done with command line tools without the need of swapping between the mouse and keyboard. Another benefit of the command line is that they’re configurable and you can save your custom configuration, change it later, and also import it to new development machines. Because development environments are so unique to each developer, some will avoid using the command line, some will rely on it entirely, and some prefer a mix of the two.
Options for the command line will differ based on the operating system you use.
💻 = comes preinstalled on the operating system.
When a developer wants to learn something new, they’ll most likely turn to documentation to learn how to use it. Developers rely on documentation often to guide them through how to use tools and languages properly, and also to gain deeper knowledge of how it works.
✅ Do some research: Now that you know the basics of a web developer’s environment, compare and contrast it with a web designer’s environment.
Compare some programming languages. What are some of the unique traits of JavaScript vs. Java? How about COBOL vs. Go?
Study a bit on the different languages available to the programmer. Try to write a line in one language, and then redo it in two others. What do you learn?


{% load i18n %}
{% blocktrans with instance=effects.0.instance %} Create a team for the contributor. Make the user the owner of the team, and allow him/her to invite other users. {% endblocktrans %}


from collections.abc import Sequence
import numpy as np
from . import _batoid
from .constants import vacuum, globalCoordSys
from .coordsys import CoordSys, CoordTransform
from .utils import fieldToDirCos
[docs]class Ray:
"""A geometric ray to trace through an optical system. May also be thought
of as a monochromatic propagating plane wave.
Parameters
----------
r : ndarray of float, shape (3,)
Position of ray in meters.
v : ndarray of float, shape (3,)
Velocity vector in units of the speed of light in vacuum. Note this
may have magnitude < 1 if the Ray is inside a refractive medium.
t : float
Reference time (divided by the speed of light in vacuum) in units of
meters. Equivalent to the optical path length.
wavelength : float
Vacuum wavelength in meters.
flux : float
Flux in arbitrary units.
vignetted : bool
Whether Ray has been vignetted or not.
failed : bool
Whether Ray is in failed state or not, which may happen if an
intersection with a surface is requested but cannot be found.
coordSys : CoordSys
Coordinate system in which this ray is expressed. Default: the global
coordinate system.
"""
def __init__(self, r=None, v=None, t=0.0, wavelength=0.0, flux=1.0,
vignetted=False, failed=False, coordSys=globalCoordSys):
if failed:
self._r = _batoid.CPPRay(failed=True)
elif r is None and v is None:
self._r = _batoid.CPPRay()
else:
self._r = _batoid.CPPRay(r, v, t, wavelength, flux, vignetted)
self.coordSys = coordSys
@classmethod
def _fromCPPRay(cls, _r, coordSys=globalCoordSys):
"""Turn a c++ Ray into a python Ray."""
ret = cls.__new__(cls)
ret._r = _r
ret.coordSys = coordSys
return ret
[docs] @classmethod
def fromStop(
cls, x, y,
optic=None, backDist=None, medium=None, stopSurface=None,
wavelength=None,
source=None, dirCos=None,
theta_x=None, theta_y=None, projection='postel',
flux=1, coordSys=globalCoordSys
):
"""Create a Ray that intersects the "stop" surface at a given point.
The algorithm used here starts by placing the ray on the "stop"
surface, and then backing it up such that it is in front of any
surfaces of the optic it's intended to trace.
The stop surface of most large telescopes is the plane perpendicular to
the optic axis and flush with the rim of the primary mirror. This
plane is usually also the entrance pupil since there are no earlier
refractive or reflective surfaces. However, since this plane is a bit
difficult to locate automatically, the default stop surface in batoid
is the global x-y plane.
If a telescope has an stopSurface attribute in its yaml file, then this
is usually a good choice to use in this function. Using a curved
surface for the stop surface is allowed, but is usually a bad idea as
this may lead to a non-uniformly illuminated pupil and is inconsistent
with, say, an incoming uniform spherical wave or uniform plane wave.
Parameters
----------
x, y : float
X/Y coordinates on the stop surface where the ray would intersect
if not refracted or reflected first.
optic : `batoid.Optic`, optional
If present, then try to extract values for ``backDist``,
``medium``, and ``stopSurface`` from the Optic. Note that values
explicitly passed here as keyword arguments override those
extracted from ``optic``.
backDist : float, optional
Map ray backwards from the stop surface to the plane that is
perpendicular to the ray and ``backDist`` meters from the point
(0, 0, z(0,0)) on the stop surface. This should generally be set
large enough that any obscurations or phantom surfaces occuring
before the stop surface are now "in front" of the ray. If this
keyword is set to ``None`` and the ``optic`` keyword is set, then
infer a value from ``optic.backDist``. If both this keyword and
``optic`` are ``None``, then use a default of 40 meters, which
should be sufficiently large for foreseeable telescopes.
medium : `batoid.Medium`, optional
Initial medium of ray. If this keyword is set to ``None`` and
the ``optic`` keyword is set, then infer a value from
``optic.inMedium``. If both this keyword and ``optic`` are
``None``, then use a default of vacuum.
stopSurface : batoid.Interface, optional
Surface defining the system stop. If this keyword is set to
``None`` and the ``optic`` keyword is set, then infer a value from
``optic.stopSurface``. If both this keyword and ``optic`` are
``None``, then use a default ``Interface(Plane())``, which is the
global x-y plane.
wavelength : float
Vacuum wavelength of ray in meters.
source : None or ndarray of float, shape (3,), optional
Where the ray originates. If None, then the ray originates an
infinite distance away, in which case the ``dirCos`` kwarg must also
be specified to set the direction of ray propagation. If an
ndarray, then the ray originates from this point in global
coordinates and the ``dirCos`` kwarg is ignored.
dirCos : ndarray of float, shape (3,), optional
If source is None, then indicates the direction of ray propagation.
If source is not None, then this is ignored.
theta_x, theta_y : float, optional
Field angle in radians. If source is None, then this indicates the
initial direction of propagation of the ray. If source is not
None, then this is ignored. Uses `utils.fieldToDirCos` to convert
to direction cosines. Also see ``dirCos`` as an alternative to
this keyword.
projection : {'postel', 'zemax', 'gnomonic', 'stereographic', 'lambert', 'orthographic'}, optional
Projection used to convert field angle to direction cosines.
flux : float, optional
Flux of ray. Default is 1.0.
coordSys : CoordSys
Coordinate system in which ray is expressed. Default: the global
coordinate system.
"""
from .optic import Interface
from .surface import Plane
if optic is not None:
if backDist is None:
backDist = optic.backDist
if medium is None:
medium = optic.inMedium
if stopSurface is None:
stopSurface = optic.stopSurface
if backDist is None:
backDist = 40.0
if stopSurface is None:
stopSurface = Interface(Plane())
if medium is None:
medium = vacuum
if dirCos is None and source is None:
dirCos = fieldToDirCos(theta_x, theta_y, projection=projection)
if wavelength is None:
raise ValueError("Missing wavelength keyword")
z = stopSurface.surface.sag(x, y)
transform = CoordTransform(stopSurface.coordSys, globalCoordSys)
x, y, z = transform.applyForward(x, y, z)
t = 0.0
n = medium.getN(wavelength)
if source is None:
v = np.array(dirCos, dtype=float)
v /= n*np.sqrt(np.dot(v, v))
ray = Ray((x, y, z), -v, t, wavelength, flux)
zhat = -n*v
xhat = np.cross(np.array([1.0, 0.0, 0.0]), zhat)
xhat /= np.sqrt(np.dot(xhat, xhat))
yhat = np.cross(xhat, zhat)
origin = zhat*backDist
coordSys = CoordSys(origin, np.stack([xhat, yhat, zhat]).T)
transform = CoordTransform(globalCoordSys, coordSys)
transform.applyForwardInPlace(ray)
plane = Plane()
plane.intersectInPlace(ray)
transform.applyReverseInPlace(ray)
return Ray(
(ray.x, ray.y, ray.z),
v, t, wavelength, flux,
coordSys=globalCoordSys
)
else:
vx = x - source[0]
vy = y - source[1]
vz = z - source[2]
v = np.array([vx, vy, vz])
v /= n*np.sqrt(np.dot(v, v))
return Ray((x, y, z), v, t, w, flux, coordSys=globalCoordSys)
[docs] def copy(self):
"""Return a copy of this Ray."""
return Ray._fromCPPRay(_batoid.CPPRay(self._r), self.coordSys)
def __repr__(self):
return repr(self._r)
[docs] def amplitude(self, r, t):
"""Calculate (scalar) complex electric-field amplitude at given
position and time.
Parameters
----------
r : ndarray of float, shape (3,)
Position in meters.
t : float
Time (over vacuum speed of light; in meters).
Returns
-------
complex
"""
return self._r.amplitude(r, t)
[docs] def positionAtTime(self, t):
"""Calculate the position of the Ray at a given time.
Parameters
----------
t : float
Time (over vacuum speed of light; in meters).
Returns
-------
ndarray of float, shape (3,)
Position in meters.
"""
return self._r.positionAtTime(t)
[docs] def propagatedToTime(self, t):
"""Return a Ray propagated to given time.
Parameters
----------
t : float
Time (over vacuum speed of light; in meters).
Returns
-------
Ray
"""
return self._r.propagatedToTime(t)
[docs] def propagateInPlace(self, t):
"""Propagate Ray to given time.
Parameters
----------
t : float
Time (over vacuum speed of light; in meters).
"""
self._r.propagateInPlace(t)
[docs] def phase(self, r, t):
"""Calculate plane wave phase at given position and time.
Parameters
----------
r : ndarray of float, shape (3,)
Position in meters at which to compute phase
t : float
Time (over vacuum speed of light; in meters).
Returns
-------
float
"""
return self._r.phase(r, t)
[docs] def toCoordSys(self, coordSys):
"""Transform ray into new coordinate system.
Parameters
----------
coordSys: batoid.CoordSys
Destination coordinate system.
Returns
-------
Ray
"""
transform = CoordTransform(self.coordSys, coordSys)
return transform.applyForward(self)
[docs] def toCoordSysInPlace(self, coordSys):
"""Transform ray into new coordinate system in place.
Parameters
----------
coordSys: batoid.CoordSys
Destination coordinate system.
"""
transform = CoordTransform(self.coordSys, coordSys)
transform.applyForwardInPlace(self)
@property
def r(self):
"""ndarray of float, shape (3,): Position of ray in meters."""
return self._r.r
@property
def v(self):
"""ndarray of float, shape (3,): Velocity of ray in units of the speed
of light in vacuum. Note that this may have magnitude < 1 if the ray is
inside a refractive medium.
"""
return self._r.v
@property
def t(self):
"""Reference time (divided by the speed of light in vacuum) in units of
meters, also known as the optical path length.
"""
return self._r.t
@property
def wavelength(self):
"""Vacuum wavelength in meters."""
return self._r.wavelength
@property
def flux(self):
"""Ray flux in arbitrary units."""
return self._r.flux
@property
def vignetted(self):
"""True if ray has been vignetted."""
return self._r.vignetted
@property
def failed(self):
"""True if ray is in a failed state. This may occur, for example, if
batoid failed to find the intersection of a ray with a surface.
"""
return self._r.failed
@property
def x(self):
"""The x component of the ray position in meters."""
return self._r.x
@property
def y(self):
"""The y component of the ray position in meters."""
return self._r.y
@property
def z(self):
"""The z component of the ray position in meters."""
return self._r.z
@property
def vx(self):
"""The x component of the ray velocity in units of the vacuum speed of
light.
"""
return self._r.vx
@property
def vy(self):
"""The y component of the ray velocity in units of the vacuum speed of
light.
"""
return self._r.vy
@property
def vz(self):
"""The z component of the ray velocity in units of the vacuum speed of
light.
"""
return self._r.vz
@property
def k(self):
r"""ndarray of float, shape (3,): Wavevector of plane wave in units of
radians per meter. The magnitude of the wavevector is equal to
:math:`2 \pi n / \lambda`, where :math:`n` is the refractive index and
:math:`\lambda` is the wavelength.
"""
return self._r.k
@property
def kx(self):
"""The x component of the ray wave vector in radians per meter."""
return self._r.kx
@property
def ky(self):
"""The y component of the ray wave vector in radians per meter."""
return self._r.ky
@property
def kz(self):
"""The z component of the ray wave vector in radians per meter."""
return self._r.kz
@property
def omega(self):
r"""The temporal angular frequency of the plane wave divided by the
vacuum speed of light in units of radians per meter. Equals
:math:`2 \pi / \lambda`.
"""
return self._r.omega
def __eq__(self, rhs):
if not isinstance(rhs, Ray): return False
return self._r == rhs._r and self.coordSys == rhs.coordSys
def __ne__(self, rhs):
return not (self == rhs)


pragma solidity 0.4.15;
//This contract is meant as a "singleton" forwarding contract.
//Eventually, it will be able to forward any transaction to
//Any contract that is built to accept it.
contract TxRelay {
// Note: This is a local nonce.
// Different from the nonce defined w/in protocol.
mapping(address => uint) nonce;
/*
* @dev Relays meta transactions
* @param sigV, sigR, sigS ECDSA signature on some data to be forwarded
* @param destination Location the meta-tx should be forwarded to
* @param data The bytes necessary to call the function in the destination contract.
Note, the first encoded argument in data must be address of the signer
*/
function relayMetaTx(
uint8 sigV,
bytes32 sigR,
bytes32 sigS,
address destination,
bytes data
) public {
address claimedSender = getAddress(data);
// relay :: nonce :: destination :: data :: relayer
bytes32 h = sha3(this, nonce[claimedSender], destination, data, msg.sender);
address addressFromSig = ecrecover(h, sigV, sigR, sigS);
require(claimedSender == addressFromSig);
nonce[claimedSender]++; //if we are going to do tx, update nonce
if (!destination.call(data)) {
//In the future, add event here. Has semi-complex gas considerations. See EIP 150
}
}
/*
* @dev Gets an address encoded as the first argument in transaction data
* @param b The byte array that should have an address as first argument
* @returns a The address retrieved from the array
(Optimization based on work by tjade273)
*/
function getAddress(bytes b) public constant returns (address a) {
if (b.length < 36) return address(0);
assembly {
let mask := 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
a := and(mask, mload(add(b, 36)))
//36 is the offset of the first param of the data, if encoded properly.
//4 bytes for the function signature, and 32 for the addess.
}
}
/*
* @dev Returns the local nonce of an account.
* @param add The address to return the nonce for.
* @return The specific-to-this-contract nonce of the address provided
*/
function getNonce(address add) public constant returns (uint) {
return nonce[add];
}
}
|


A GAE proxy to your Dropbox account.
The DropbProx aims to allow you to use your own domain to get files published in your Dropbox. So, after setting up your Dropbox account number at the application and publish it on Google App Engine (GAE), you will access your files in the Dropbox linking them to a more significant domain than that presented by URL http://dl.dropbox.com/u/YOURDROPBOXNUMBER
.
This code is a very simple reduction/adaptation of mirrorrr project (by Brett Slatkin) held specifically to achieve the goals to build a proxy for public files from a user account in the Dropbox. If you want a full (and FREE) proxy to run on GAE, use the mirrorrr!
I was looking for a FREE alternative to the problem described above. That's because I canceled my account on a virtual private server (VPS), which kept my domains. So, I could not use Apache 2 as reverse proxy or his mod_rewrite as a solution to this problem. With just a few searches on Google, I found a proxy written in Python (and able to run on GAE). Thus, I adapted his code to suit my needs.
pj74arqs
. A good tutorial about how to do this (for windows users) is the post "Setup your own Proxy Server in 5 Minutes for Free"
application
variable at file app.yaml
to the name of your created project on GAE;
DROPBOX_NUMBER
variable at file mirror.py
to your own Dropbox number;
pj74arqs.appspot.com
. But, this wasn't good for me yet. So, I changed the URL for that application to my subdomain: a.paulojeronimo.com
. That was much better!
http://dl.dropbox.com/u/YOURDROPBOXNUMBER
) you can now use the GAE application URL.
http://dl.dropbox.com/u/345266
, I can now do that using http://a.paulojeronimo.com
. For example, the files http://dl.dropbox.com/u/345266/curriculo/curriculo-pj.html and http://a.paulojeronimo.com/curriculo/curriculo-pj.html (my portuguese resume ;-) are the same, but the second is much more expressive, isn't it?


Achievers
Craig Tompkins has been named a student ambassador at McKendree University in Lebanon, Illinois.
Student ambassadors represent and serve the university as they share what it is like to be a student in an engaged, active and intellectual campus environment, a news release stated.
Craig is a junior psychology major from Oklahoma City.
To be considered for this column, please email achievement announcements and photos to LLynn@Oklahoman.com.


jQuery emitter factory of CSS3 sprites with transitions
Clash the DOM with the most optimized jQuery plugin on earth ^^
Live edit plugin funny emitter properties !
Tips :
Up/Down arrow to inc the numbers values in the textarea editable JSON string
Add your properties, set unwanted existing ones to "null" (live editor constrain)
transition : 'all 3000ms linear' is more fast than 'cubic-bezier(0,0,0,0)'
gradient, boxShadow, pacity, borderRadius... are CPU consumming
As i said : Kill your own PC before killing the ones of your visitors
That a good "STRECSS case" plugin if you overload settings... ^^
Questions something to share ? Contact me → Send yours effects
Fork it and get updated on GitHub


API Example
List Sensor Types
An example of how to list the sensor metadata for the various types in the system


Quiz App
Please fill out all categories.
Number of Questions
{{num}}
Category
{{category}}
Difficulty
{{difficulty}}
Question Type
{{type}}
Submit


I'm pleased to introduce to you my project website. Armed with determination and passion, I will be updating it with one new project everyday for the next two weeks.


Tickets For Redskins-Lions Being Sold For As Low As $5.00 (PIC)
by Darrelle LincolnThe Washington Redskins are fresh off being blown out at home by the New York Jets and having their fan base chant ‘sell the team’ in the second half.
Some might wonder why Redskins fans even come out even more since they don’t like the product on the field as well as owner Dan Snyder, but if you look at the price of tickets to the game, you’d see why.
For the upcoming Lions-Redskins game at FedEx Field, you can find seats for as low as $5, $6, and even $9 to watch two professional football teams do battle on the field.
The Redskins are currently 1-9 on the season, while the Lions are 3-6-1. Not exactly the sexiest matchup of teams fans would want to waste three hours to see.


{% extends "skeleton/_body.html" %}
{%hyde
title: "Getting Started with Cast"
created: 2011-03-26 18:09:05
listing: False
%}
{% block content_body %}
{% markdown %}
In this introductory tutorial we're going to show you how to get up and running
with Cast and use it to deploy Redis, a fast and lightweight key-value store.
This tutorial assumes you have sudo access on an Ubuntu server, as well as a
client OS supported by Cast (pretty much any *nix should do, including OSX),
but should work on most supported systems with only a few modifications.
### Server Setup
First you'll need to [install Cast on your server](/docs/guides/installation/).
Next, create and edit a config file with your favorite editor:
{% syntax bash %}
~ $ mkdir ~/.cast
~ $ vim ~/.cast/config.json
{% endsyntax %}
Edit the config file to look something like this, substituting your user name
into the `data_root` path (this path must be absolute).
{% syntax javascript %}
{
"data_root": "/home/russell/cast-data"
}
{% endsyntax %}
Now you just need to start runit and the cast-agent.
{% syntax bash %}
# This process must be running with an absolute path before Cast starts
~ $ runsvdir /home/russell/cast-data/services-enabled/ &
# Start cast-agent!
~ $ cast/bin/cast-agent
13 Apr 14:50:32 - info: Cast API listening at https://<IP_ADDRESS>:49443/
13 Apr 14:50:32 - info: Starting service Health
13 Apr 14:50:32 - info: health service started
13 Apr 14:50:32 - info: Fingerprint: 09:09:A2:EB:4B:F0:FB:3F:2A:C0:9C:0A:B5:E6:C5:66:BE:8C:77:D5
{% endsyntax %}
Ok, that wasn't so bad now was it?
### Client Setup
If your client and server are the same machine you can skip these steps - Cast
automatically adds a remote named `local` that points to the local Cast
instance, and you will be authorized automatically.
If you want to use the Cast client on a separate machine however, you'll need
to [install Cast](/docs/guides/installation/) then authorize the client:
{% syntax bash %}
# Add your server as a 'remote' in Cast
~ $ cast remotes add example https://apps.example.com
Your Email Address<EMAIL_ADDRESS>Name for this Client: russell-workstation
Certificate information
Subject:
CN: apps.example.com
Issuer:
CN: apps.example.com
Valid to: Apr 5 23:42:42 2016 GMT
Fingerprint: 09:09:A2:EB:4B:F0:FB:3F:2A:C0:9C:0A:B5:E6:C5:66:BE:8C:77:D5
Are you sure you want to accept this certificate (y/n) [n]? y
Remote added
{% endsyntax %}
The last command will prompt you for a hostname and email address. You can use
anything you like for these, but for the hostname you should choose something
that uniquely identifies the computer you are using as a client. It will also
ask you to to verify the agent's certificate before it sends any requests. You
should compare the fingerprint shown to the fingerprint that the agent
displayed when it started before accepting it.
Once the agent has been added, you must grant access to your client.
**Back on the server:**
{% syntax bash %}
# List pending requests - the one from your client should be the only one shown
~ $ cast ca list
Certificate Signing Requests (unsigned):
Hostname Status
russell-workstation Awaiting Approval
# Sign your request
~ $ cast ca sign russell-workstation
CSR for 'russell-workstation': Approved
{% endsyntax %}
The next time you connect to the agent, your signed certificate will be
automatically downloaded and used, without the need for further work on your
part.
### Deploying Redis
Now for the fun part, deploying Redis.
{% syntax bash %}
# We'll need the Redis source
~ $ git clone git://github.com/antirez/redis.git
~ $ cd redis
~/redis $ git checkout 2.2.4
# We need to create a hooks directory - more on this later
~/redis $ mkdir -p .cast-project/hooks
{% endsyntax %}
Because Redis is a compiled application we need to make sure it gets compiled
at some point before we try to run it. We could do this locally, but depending
on the client and server this might require cross compiling - something we'd
rather avoid. For a large deployment a better choice would be to run a buildbot
or similar system somewhere. But for our small deployment we can just use Cast's
hook system to compile Redis when it is deployed. We create
`.cast-project/hooks/post_prepare` which should look like this:
{% syntax bash %}
#!/bin/sh
make
{% endsyntax %}
By default Cast can run two types of applications - shell scripts and Node.js
applications. We'll create a shell script to run Redis called `run.sh`:
{% syntax bash %}
#!/bin/sh
exec ./src/redis-server redis.conf
{% endsyntax %}
We would also like Redis to be able to store data that will persist across
upgrades. To this end we find the `dbfilename` setting in `redis.conf` and
change it:
{% syntax nginx %}
# The filename where to dump the DB
dbfilename data/dump.rdb
{% endsyntax %}
Now we need to generate a Cast manifest to tell Cast a few details about our
application.
{% syntax bash %}
# Pass the shell script and data directory to 'cast init'
~ $ cast init --datafile data/ run.sh
Application Name: redis
Application Description: A fast networked datastore
Application Type: (nodejs/shell) [nodejs] shell
Manifest created
{% endsyntax %}
Now the application is all set up, we just need to upload and deploy it.
{% syntax bash %}
# Create a 'bundle' of the application - we have to tell it the version
~/redis $ cast bundles create v2.2.4-r0
Manifest validation succeeded, creating a bundle |
Bundle created
# Upload the bundle
~/redis $ cast bundles upload
Uploading<EMAIL_ADDRESS>(2668438 bytes)
100% [=========================================================================]
Waiting for response...
Upload Successful
# Create an instance using the most recently created bundle
~/redis $ cast instances create --enable redis0
Using bundle<EMAIL_ADDRESS>Instance 'redis0' created
# Redis is running! Check it out
~ $ cast services list
Available services:
Name Enabled Status
<EMAIL_ADDRESS>true pid: 1614, state: running
# We can even get a live feed Redis's logs
~ $ cast services tail -F<EMAIL_ADDRESS>2011-04-13_23:36:19.26323 [4140] 13 Apr 16:36:19 # Warning: no config file specified, using the default config. In order to specify a config file use 'redis-server /path/to/redis.conf'
2011-04-13_23:36:19.26407 [4140] 13 Apr 16:36:19 * Server started, Redis version 2.2.4
2011-04-13_23:36:19.26408 [4140] 13 Apr 16:36:19 * The server is now ready to accept connections on port 6379
2011-04-13_23:36:19.26523 [4140] 13 Apr 16:36:19 - 0 clients connected (0 slaves), 922064 bytes in use
2011-04-13_23:36:24.27118 [4140] 13 Apr 16:36:24 - 0 clients connected (0 slaves), 922064 bytes in use
2011-04-13_23:36:29.27802 [4140] 13 Apr 16:36:29 - 0 clients connected (0 slaves), 922064 bytes in use
^C
{% endsyntax %}
Neat!
{% endmarkdown %}
{%endblock%}


User Authentication
By default, Frontless supports user sessions and basic login. It comes with basic user model out of the box.
User model
Default user model consists of following fields:
_id: ObjectID [primary key]
usename: varchar
password: Bcrypt
group: varchar
agreed: bool
User is a MongoDB document so you can extend this model at will.
FeathersJS API
Frontless implements FeathersJS Local Auth Strategy. The user verification module can be found at components/verifier.js
.
On the client side Feathers.JS handles authentication per secification:
Login example:
this.client.authenticate({
strategy: 'local',
username: data.username,
password: data.password
}).
then((res) => {
return this.client.passport.verifyJWT(res.accessToken)
}).
then((res) => {
this.redirect('/profile')
}).
Logout example:
this.logout()
Resticting access to Pages
Add access
options to the page specifying if it should be accessed by loggedIn
users. Optionaly, it is also possible to verify user group
export default () => ({
access: {
loggedIn: true, // only logged users see this page
group: 'staff' // (optional) only staff has access to it
}
})


Suspicious vehicle stopped at White House, 1 in custody
WASHINGTON -- An unauthorized vehicle was stopped trying to enter the White House complex Thursday morning in Washington D.C., the U.S. Secret Service says.
The Secret Service says the vehicle was following another vehicle that lawfully entering an external checkpoint.
The vehicle was stopped and an individual was immediately taken into custody. Further details were not immediately available.


I Love web developement specially Back-end-development.I have made clones of Quora and Twitter as projects. I have also made a simple ping pong game and a web calender. I keep interest in public speaking and have been awarded Best Speakers in various All-India Inter School Debates. I am a vehement football fan and love playing football and basketball.
An opportunity to work and upgrade oneself, as well as being involved in an organization that believes in gaining a competitive edge and giving back to the community. I'm presently expanding my experience in Web Development. I focus on using my interpersonal skills to build good user experience. I hope to develop skills in backend and my knowledge of the Web, and become an honest asset to the business.As an individual, I'm self-confident and you will find me naturally passionate. I am a forward thinker, which others may find inspiring when working as a team.


Readings are Intro to Ray Tracing 2, Lighting PPT.
Intro to Ray Tracing 2
- The advantage of Ray Tracing: only a few lines to code; disadvantage: time-consuming.
- Mainly consist of two steps: one step to determine whether object is visible, and the other step to shade the points.
Shading Models
- This lecture PPT is very informative on shading models.
- Based on geometry, lighting and material, there are several layers of lighting which perfects the simulation.
- 1st layer / Diffuse reflection(漫反射): where light goes everywhere, and shades are colored by object color. This light has already been included in Ray Tracing model.
- Light reflects equally in all directions
- View independent
- Illumination on an oblique surface is less than on a normal one
- 2nd layer / Ambient reflection: don’t worry about where light comes from, just add a constant amount of light to account for other sources of illumination.
- Usually added onto the front surface of oblique objects to reflect illumination.
- View independent
- Reflected light strength depends on: diffuse coefficient, illumination from source.
- 3rd layer / Specular reflection(镜面反射): only happens near mirror configuration, usually white, enhances the appearance of object.
- Usually added onto the front surface of metallic objects to reflect illumination.
- View dependent
- bright near mirror configuration
- Reflected light strength depends on: specular coefficient, light intensity, angle between viewer and mirror direction, air permeation constant.
- Examples of shading models are:
- Diffuse shading:
- Diffuse + Specular shading:


Hello everyone! My name is Jade Kaleel.
I was born and raised in Brooklyn NY. I am currently a sophomore at Columbia University and I am majoring in Computer Science. Some of the courses I've enjoyed taking the most have been Chinese, Advanced Programming, and Data Structures.
Click here to see content created by server code.
Click here to get a random message:


What is wine-o-meter AI? It's a new beautiful AI model wrap into an API to help you predict your wine's quality based on its chemical composition.
https://wine-o-meter-vflo.herokuapp.com/predict
This endpoint allows you to make a prediction of wine's quality (note between 0 and 10).
You should request this endpoint using a POST method with a json. Each item (key:value) will give a prediction for a wine.
{666: [7.0, 0.27, 0.36, 20.7, 0.045, 45.0, 170.0, 1.001, 3.0, 0.45, 8.8]}
EXAMPLE:
>>> res = requests.post(https://wine-o-meter-vflo.herokuapp.com/predict, json={666: [7.0, 0.27, 0.36, 20.7, 0.045, 45.0, 170.0, 1.001, 3.0, 0.45, 8.8]})
>>> assert res.status_code == 200
>>> print(res.json())
If successful, it returns a JSON like:
'msg': 'After checking, the input has the needed information', 'predict': ['6']
Our API will return an error 400 and a JSON
"msg": "Apparently the prediction with id {id} has not 11 features, please provide 11 features"
"msg": "Apparently in the prediction with id {id} there is a not digit feature, please provide only digit"


Preparation time
overnight
Cooking time
10 to 30 mins
Serves
Serves 4-6
Place the gelatine into a bowl of iced water and leave to soften for five minutes. Pour the milk and cream into a small pan and bring to the boil.
Remove the softened gelatine from the iced water, gently squeeze out the excess water and stir into the milk and cream. Remove from the heat and stir until the gelatine has dissolved.
Pour this mixture through a fine sieve (to remove any lumps) into a small bowl. To start chilling the mixture and to allow it to start setting, fill a larger bowl with iced water and place the small bowl inside in it.
When the mixture starts to thicken slightly, pour in the Greek yoghurt and stir until completely combined and smooth.
Pour the mixture into four panna cotta moulds (2cm/½in deep x 10cm/4in wide), cover with cling film, place in the fridge and leave to set for at least three hours.
Heat the honey in a pan over a medium heat. When the honey starts to boil rapidly, add the figs and cook for two minutes, stirring a couple of times.
To serve the panna cotta, dip each mould into a little hot water, preferably from a just boiled kettle, for 2-3 seconds. Turn out onto four serving plates. Spoon the figs and hot honey around the panna cotta and serve.


Background: I am male, at the time of this experience 23 years old and weighing around 125 pounds. I take no prescription or OTC medications, but use marijuana and yerba mate on a daily basis. I am well versed in a variety of psychedelics including mushrooms, ayahuasca-type brews, hawaiian woodrose seeds, LSD, DMT, 5-MeO-DMT, MDMA, 2C-I, Trichocereus cacti and some dissociatives (Salvia divinorum, N2O, ketamine). Mushrooms are the first psychedelic I ever took, and they remain my most treasured ally for the depth, intensity and awe-inspiring mystical experiences they provoke.
Setting: Camping with several friends at our favourite campground in dense coniferous forest in the foothills of the mountains. Our campsite is near to the edge of a ridge, and by walking down hill from the ridge one reaches a mountain stream, icy-cold and babbling over rocks and gravel. It is a comfortable and familiar setting, and I have had many good trips in the woods here in the past.
Mindset: I was really excited to be out camping with friends, and was eagerly anticipating doing mushrooms in the forest because they just fit so perfectly with the natural environment. I had been at a really chill, small electronic music festival for the summer solstice the weekend before, and was still buzzing from the beautiful things I experience there. At that festival I had explored a really wonderful connection with a girl and experienced many magical things, some of which I hadn’t even believed were possible. So my mindset going into this trip was extremely positive.
I find that doing mushrooms in the city and walking around can be an anxious experience, trying to walk a straight line down the sidewalk and crossing roads safely amidst the roar and fumes of traffic. Walking around high on mushrooms in the forest, contrarily, feels totally natural as one steps over branches and around bushes. It is very comfortable feeling in the forest, and I can take higher doses than I would otherwise and not feel overwhelmed or anxious.
I used to get anxious a lot when doing mushrooms, but over time I have become very comfortable with the effects, knowing that they are entirely a medicinal substance. Whatever uncomfortable mental and physical effects I experience, I can now re-interpret and ask myself how the mushrooms are healing me or showing me things. These fun-guys have taught me so much, about myself and the world around me, and I have a great deal of respect for them.
There were to be five of us doing mushrooms today, and two participants had never taken a psychedelic before! So I was doubly stoked, to be introducing others to such an amazing state of consciousness.
The experience: When making the mushroom tea, I’d put into the pot three grams per person. But since it was a first time psychedelic experience for two of the five trippers, I gave them a little less of the final liquid, and the rest of us a little more. Neither of the first-timers finished their cups of tea, so I drank a fair bit of their dregs as well. Whatever dose I was on, which I estimated to be about five grams, was proving to be quite enough.
And these were not just any mushrooms. No, they were without a doubt the most potent, cosmic mushrooms I have ever had. First off, they were all dark blue little pinners, stunts and aborts making me think the person who grew them might have added chacruna or other DMT-containing plant materials to their substrate. Secondly, they had been freeze dried to preserve the fragile psilocin as well as the psilocybin. This batch of mushrooms practically spoiled me for other mushrooms. Taking two grams of these guys was like taking a full eighth of any other ‘shrooms, and taking an eighth was like WHOAAAH! So my dose tonight of around five grams was a heavy dose of the best batch ‘shrooms I had ever taken.
After maybe forty-five minutes, things were getting a little freaky at base camp. One first-time tripper is giggling, babbling and scarfing down food. He’s also a germaphobe and is constantly washing his hands in bottled water (because the well water is “unclean”) and then throwing the paper towels in the fire. Another bemushroomed first-time psychedelic casualty keeps moaning and putting his hood up and down. For a moment, pulling the hood down and looking at the sky, he reels backwards as if stunned with an “Oh shit..!” It was getting too much for me to handle, while coming up on a strong dose of mushroom tea. I fled into the woods, muttering something about going for a walk.
My feet draw me towards the ridge behind our campsite. I feel as though I am taking something with me from camp… some kind of unpleasant energy is sticking with me. As soon as I think this, I purge. Okay, let it out. The woods feel very clear, and as I resonate with the forest I feel that I too am becoming cleansed. I am becoming clear like the environment around me. The ridge is a beautiful place, even without drugs.  The thick clumps of skinny trees compete for space and light, none more than twice my height. All through this forest run little mossy paths, opening into clearings. A maze of possibilities.
I am stopped in my tracks when I see a spider sitting in the middle of its web, woven right across the path I had intended to take. The sun glints off the web spawning dancing rainbows. I am in awe as the mushrooms coursing through my system accentuate the rainbows, the delicate lace pattern of the web. Looking to my left I see more gossamer veils shifting in the breeze. A finely woven delicacy to make any loom-worker envious.
Taking another path I end up in a little mossy patch looking out, through the spruce and pine which are thick with old man’s beard lichen, looking across the river valley to a ridge on the other side. It is those long hours of perpetual dusk that grace the height of summer. Everything is warm and golden in the sun’s low light, especially the tops of the trees I am looking through down in the valley. There’s no real way to describe the beauty. This is heaven on earth. This is paradise. It’s too bad that there are so many mosquitos in paradise.
I am feeling enormously tapped in. Swaying and stretching, my sweeping hands leave visible trails as I clear my aura. It works pretty well on the mosqitos too, which buzz in a cloud around me. Swirling them away with motions of my body. Looking up at the trees and sky is almost too much. “Woooowww….” And I arch backwards, nearly falling over. Gratitude floods me. Emotional cathartic release. Touching the ground lovingly and feeling the flow of life within and around.
Finally I tear myself away from the ridge, listening to that little nagging urge to check up on my campmates. I go back and nothing has changing since when I left. Everyone is still doing exactly what they were doing when I left. Scarfing down food, sitting in chairs and moaning, and generally looking tripped out but not tapped in. I hang out with them for awhile, but eventually start to feel anxious and out of place. This isn’t where I am supposed to be right now.
At first I was just going to pee in the bushes, but as soon as I left camp I found I had a lot of psychological resistance to going back. I did not want to experience any more of the one fellow’s conspicuous consumption food-eating hand-cleaning garbage-burning-in-the-fire trip any longer. My feet started sucking me back to the ridge. Oh boy, here we go again…
All this phlegm kept filling me up. My nose was running heavily and I kept coughing up deep lung butter. The forest is so clear, so clean.... and I was dirty. Filled up with poisons and gunk and filth that was trying to come out. All those roasted hot dogs and the hard liquor from the night before were catching up to me.  It doesn’t stop though, the purgative coughing keeps coming. I am beginning to get flustered and anxious. Enormous flatulent rumbles as the cleansing reaches my intestines.
My feet are leading me down the slope now. Down, down, through moss sinking over my ankles. Falling back on the mossy slope and looking up for awhile, until the mosquitos become too much. At the bottom of the ridge is a natural swampy area. There is this grass growing over everything, and the dead grey pieces criss-cross forming intricate living mandalas everywhere. Small carnivorous bog plants, yellow wood orchids and of course the omnipresent moss form a living carpet.
I see star tetrahedrons and other sacred geometrical patterns formed from these living plants. This is what life does, what we ourselves do. We form these patterns, these harmonic resonances, just as a natural product of living. We create beauty, and we destroy other life. There is a balance. I think about the destruction of the forests and the tragedy of this loss of biomass. So much has already been lost. Yet there is hope, too. So much life still thriving in the small corners left over. So much potential, to restore the balance. Or to push the dynamic equilibrium in a different direction.
Still coughing now and my feet pull me towards the river. When will this stop? My pace is fast as if I am fleeing from something. I come to an area that was obviously flooded and then had dried out again. Twisted cinquefoil shrubs, mostly dry and grey twigs with just a few green leafy shoots. It seems very clear to me that I should harvest some of the dry twigs, and some of this dry rotted driftwood over here, to take down the river. An idea forms in my mind to do a cleansing ritual. To burn all this snotty kleenex in my pockets and consciously ask for everything that needs to come out of me, to come out and be done with. No more purging please.
When I reach the river I am drawn to cross a shallow channel and find myself on a large gravel island, with water flowing all around me. There is one large rock looking like a crooked seat, with a hollow on the lee side filled with soft sand. On either side of the large rock lay washed up clumps of matted root and grass, perfect tinder material. Clearly this was the spot for my fire.
Turning in a circle, I invoke the spirits of the river, and of the mountains and the trees. I state my intention for cleansing, for clearing, for purification. That everything inside me that needs to come out, come out. I hear rattling rocks and branches, always to my side or behind, and when I turn there is nothing visibly there. Yet I know and feel the presence of the spirits. I thank them for their presence.
I arranged the tinder and wood and carefully lit it with my lighter, hoping the flames would catch easily the first time, knowing it would be a bad omen if they did not. The flames did catch, after an anxious moment or two, and I build the wood into a small teepee shape.  In the light of this new blaze a stone called to me.
The stone seemed to speak to me, it was a spirit stone. Spirit of the bear, and spirit of the river. The river of the bear. I placed it on a round rock, just in front of the flames so it could watch and facilitate the cleansing. This kind of stone is similar to a Blackfoot Iniskim:
“Iniskim (Buffalo Calling Stones):
Although our people began to live as makoyi (wolves) had shown them, life was still very hard and the people were often hungry. One day iinii (buffalo) took pity on our people.
A lady named Weasel Woman was collecting water from a river near her camp when she heard something calling to her from the bushes. When she looked closer, she found a stone that spoke to her. The stone explained how it could be used in a ceremony that would call the buffalo towards a pisskan (buffalo jump).
Weasel Woman took the iniskim, the buffalo calling stone, back to camp. She told the spiritual leaders about the ceremony to call the buffalo. The people followed her instructions and soon they had plenty of meat and many hides for new lodge covers.
There are numerous iniskim on the prairies. Many people still keep them as sacred bundles. We call on iniskim to help us have successful lives.”
Source: http://www.glenbow.org/blackfoot/EN/html/traditional_stories.htm
The flames were crackling brilliantly and so I placed my ball of used kleenex onto it, asking for cleansing. Hawked a final phlegm ball into the flames.  Let it all burn away to clean with ashes. I became to chant repetitively, different mantras interlaced, the words just came to me. As I was doing this, I would rub handfuls of the sand across my palms in a clockwise direction. Feeling the earth and charging it with intention, I chant.
“The vessel is holy. The vessel is pure. The vessel is holy. The vessel is pure.
I am the vessel. I am holy, and I am pure. I am the vessel. I am holy, and I am pure.
I am the vessel. I catalyze within me… I catalyze within me… the change.
Changing the poison in my environment. Catalyzing the change. Changing the poison. Into Pure… White… Light.
I accept. I accept. I accept. I accept. I accept.
The vessel is holy. The vessel is pure. I am the vessel.
I accept the poison and catalyze the change. Burning away to clean white ashes.
Catalyze the change within me, turning the poison into pure white light.
I accept. I accept. I accept and I catalyze the change within me. Into pure white light. Pure white light. Pure white light. Pure… white… light.
I accept. I accept. Pure white light. I accept. I accept. Pure white light. I accept pure white light. I accept pure white light. Burning away to clean white ashes.
I am. I accept. I am. Pure white light. I am pure white light. Pure… white… light… pure… white… Light.
I accept. I accept. I accept. Catalyzing the change within me. The vessel is holy. The vessel is pure. I am the vessel. I accept and I catalyze the change within me into pure white light.”
The fire burned and burned as I went through these repetitions. The smoke was fragrant and I pulled it over me, cleansing myself. Pulling it also over to the spirit stone, spirit of the bear, spirit of the river. I accept. I accept. I accept. When the last flames died out and the smoke trailed off, I knew the cleansing was nearly done. Taking handfuls of the sand so frequently rubbed through my fingers, I covered the fire by spiralling inwards in a clockwise direction. More sand, until the coals were completely covered. Placing my right hand over the pile I could feel a little bit of warmth coming up through the sand.
I accept. I accept. I accept. As the trance deepens further, I see my hand sinking down into the earth, and the earth rising up around my fingers. It is all covered in faint jewel-curtain patternings. The Other Side is leaking visibly into this reality.
The spirit rock is unsure whether it wants to come with me or not. I ask it what I need to do, in order for it to wish to come with me. I am directed to place an iron-bearing stone over the centre of the covered fire. Offerings of thanks to the spirits of the river, the moutains and the trees. I cleanse my hands and the spirit stone in the fast flowing water of the main current. Now the stone will come with me, and the cleansing is done. I am no longer congested. The vessel is pure. The vessel is holy. I am the vessel. I am pure and I am holy.
It is now getting to be truly dark, no longer the perpetual dusk of the last few hours. I feel slightly anxious about finding the path back to camp, as in the dark it would be easy to miss my way. My mantra now changes to: “I will find my way through the darkness, and I will be protected.”
I accept this walk through the cold because I am heading for the warmth of home camp. “I will find my way through the darkness, and I will be protected.” I keep repeating this, feeling as though watchful eyes are all around me. Very happy to see the twinkling of fire through the final trees.
Nothing in camp seems to have changed much. The one first-timer is still consuming food and now also drinking liquor, smoking bowls of weed and cigarettes, wandering around the camp talking to himself and wearing headphones. The other is still squirming and lazing in a chair before the fire.
I sit in a chair and stay meditating for awhile, not wanting to let this perfect clarity break. Not responding to the comments and giggling and actions of those around me. Now the mantra becomes: “I will not allow the energies around me to effect me. I am the vessel. The vessel is holy, and the vessel is pure. I am the vessel. I will not allow the energies around me to effect me.”
Eventually I came to a comfortably grounded place and resumed normal interactions with those around me. My friends comment that they could feel my presence the whole time, way out there in the forest. I could not believe how strongly I still felt effected by the mushrooms. I had gotten a whole lot out of this trip. It was a powerful and wonderful experience. I felt little hunger or thirst, and no desire to smoke the usual quantities of marijuana. A couple hours later when I went to bed, there was still that tugging of tryptamine consciousness as I fell into a peaceful sleep.
Love to all, thanks for reading.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


Either the room is still loading or there is not a room here.
Click the button below to initialize a room.
Be sure to give it a passcode so you can give access to others or yourself on another machine or after a cookie reset.
Room Editing Passcode:
Create Room


$JENKINS_HOME
This directory is where all your builds are performed, so if it fills up, all the builds will fail.


Stolen car with young kids inside crashes into Brooklyn tree
by Naveen DhaliwalCYPRESS HILLS, Brooklyn (WABC) -- A stolen car with children inside crashed into a tree in Brooklyn.
The two brothers, ages 5 and 9, were taken for a wild ride around 7 p.m. Friday in their family sedan. Police say the vehicle was stolen near Liberty Ave and 92nd Street in Ozone Park.
The car was seen speeding before it crashed into a parked vehicle. With police still hot on its trail, the car then smashed into a tree on Norwood Avenue with the two young boys inside.
A path of debris littered the street, including a broken street sign.
The suspect was arrested without incident.
The two boys were checked out by EMS, and are okay. They are now both back with their parents.
How the suspect got into the car is still being investigated.


☰
Dashboard
Create Party
Create Office
Logout
EDIT PARTY DETAILS
Party Name
*
Acronym
*
Headquarters Address
*
Logo
*
Update Party Details


Hierarchy Bar defines a hierarchy of nodes in any component which are contained inside a hierarchy-bar
element.
The popover in the hierarchy bar lists the child nodes and when clicked will highlight that node.
A hierarchy-bar
element has the following attributes:
The data the hierarchy bar should display. This array of objects contains a node and its parent and can contain
any properties, however all possible child items should be listed in an array under a children
property. The first item in the array should be the root node with the selected child node as the next
item in the array.
Allows you to configure the appearance and behavior of the hierarchy bar. All available options can be found
in the table below.
A function expression with parameters (function signature is sufficient) which is called when a hierarchy
item (node) in the hierarchy bar is clicked. This could be used to update the hierarchy bar or perform
actions on the element.
Provides the container class name. The hierarchy bar will clip/overflow based on the container dimensions (re-size).
Specifies whether or not the hierarchy bar will be shown.
If specified, a button on the left of the hierarchy bar will be shown. When clicked this
function will be called. The purpose of this would be to allow you to present more information
regarding the tree or a list of all items in the chart.
If specified, this function will be called and passed a node. It should return the url to an
image if one should be shown beside the hierarchy bar.
If specified, this function will be called and passed a node. It should return the text to display in the
hierarchy bar. By default it looks for a name
property.
Text to display along side the activity indicator displayed when data is loading.
A function that is called when an arrow is clicked. It will be passed the associated breadcrumb as a parameter.
To display a loading indicator in the dropdown have the function return a $q.defer().promise
.
The loading indicator will be displayed until the promise is resolved.
Note: Refer to the Organization Chart page for an example of the hierarchy bar with popovers on top of the chart.
Note: This component can be used in an Angular application by importing the HybridModule.


{% extends "base.html" %} {% import 'bootstrap/wtf.html' as wtf%} {% block content %}
Fill in the required fields below
Don't have an account? Sign Up Here


About Me
Hello, this webpage is all dedicated about me!! So, let’s start from the beginning! I was born and raise here, in Minneapolis Minnesota! I love the Vikings, SKOL!! I also love the Timberwolves, “All eyes north”! I have many hobbies, I like to play basketball, read, videos games, photography, eat, and travel! I am one out of 5 boys in my family. I know right all boys. I am the second oldest out of my brother! My mother immigrated here from Ecuador! A little country in south America. I live with my roommate in mounds view. I have experienced a lot in my 23 years of life, and I can’t wait to experience more!
I work for the Hyatt regency as a banquet server. I have many experiences interacting with guest on a daily basis. I also learned to organize my work and be able to divide my work accordingly
That is preety much it!


Chapter 3 Data Quality Metrics
First, we import the packages that we use in this section and read in the uncleaned data.
3.1 Libararies
The libraries loaded in below acts as a list of all of the libraries that will be used in this document.
###############################################
########## ### LIBRARIES ### ##########
###############################################
library(tidyverse)
library(plotly)
library(ggplot2)
library(gganimate)
library(magick)
library(gifski)
library(png)
library(knitr)
library(PerformanceAnalytics)
library(ggpubr)
library(lubridate)
library(ggthemes)
library(extrafont)
library(tm)
library(tidytext)
library(textdata)
library(gridExtra)
library(scales)
library(wordcloud)
library(reshape2)
library(textstem)
library(RColorBrewer)
library(echarts4r)
library(devtools)
library(rayshader)
library(kableExtra)
library(stringi)
library(data.table)
3.2 The Functions
CONSISTENT REPRESENTATION
con_rep <- function(df){
"
A function that quantitatively scores an input data frame on the consistancy of representation data quality metric.
Input:
df: a data frame
Output:
con_rep_score: A numeric score on consistency of representation ranging from 1 to 0, where 1 is perfectly consistent representation and 0 is inconsistent representation.
"
type = vector()
for(i in 1:ncol(df)){
col_type <- typeof(df[1,i])
type[i] <- col_type
}
con_rep_score <- 1 - ((length(unique(type)) - 1)/6)
return(con_rep_score)
}
COMPLETENESS AND EASE OF MANIPULATION
data_quality <- function(df){
"
A function to quantitatively compute scores for a dataframe on the completeness and ease of manipulation data quality metrics.
Input:
df: A data frame
Output:
qualityTable: A table reporting the scores on completeness and ease of manipulation for each column in the input data frame.
"
# Setting the index value, which will be used to index the column name
index <- 1
# Instantiating empty data frames for each of the queries
completeness <- data.frame(Completeness=double())
eom <- data.frame(Ease_of_Manipulation=double())
names <- data.frame(ColumnName=character())
# Populating the data frames using a for-loop
for (i in df){
# COLLECTING THE NAMES OF EACH COLUMN PASSED
col <- colnames(df[index])
# COMPLETENESS
# Takes the sum of the total NA, NULL, and NaN values in a column
# Divides them by the length of the column
# Subtracts this from one, as was suggested by Pipinio, Lee, and Wang
# And then rounds to output to the third decimal place
c <- 1-(sum(is.na(i) + is.null(i) + is.nan(i))/length(i)) %>%
round(digits = 3)
# EASE OF MANIPULATION
# "Case when" vectorises a series of if/else statements
# The function checks the type of the column and then sets the variable,
# e, to the corresponding value.
e <- case_when(
typeof(i) == "logical" ~ 1,
typeof(i) == "integer" ~ .9,
typeof(i) == "numeric" ~ .8,
typeof(i) == "double" ~ .8,
typeof(i) == "complex" ~ .7,
typeof(i) == "character" ~ .6,
typeof(i) == "list" ~ .5,
typeof(i) == "raw" ~ 0,
TRUE ~ 0)
#The index used to collect column names is increased by one
index = index + 1
#Appending the output for each column to their respective data frames
completeness[nrow(completeness)+1,] <- c
eom[nrow(eom)+1,] <- e
names[nrow(names)+1,] <- col
}
#Binding the columns of the three tables into an output table
qualityTable <- cbind(names, completeness, eom)
return(qualityTable)
}
3.3 Quality Assessments
We assessed data quality using the metrics outlined in Pipino, Lee, and Wang (2002). For each of these metrics, we provide a brief commentary on how the data fared. Several of the data quality metrics were more pertinent to our analysis, so we provide deeper insight into them. For the subjective measures, each member of the research team produced a subjective score based off of their experience with working with the data. These scores were averaged to produce the score given by the team to the data as a whole. The objective measurements will be preformed on all four of the raw datasets used.
Accessibility
The data were fairly accessible; the card and set information could be directly downloaded as a CSV. Given our skill set, the JSON file used in the 2019 data was not difficult to gather. Collecting the 2020 market data presented a slight hurtle, but not so far as it made the data inaccessible. All of the raters provided similar scores, which was averaged for a total score of 7.Believability
All of these data were originally web-scraped from either official information about the cards and the sets, the process for which is explained in detail on the MTGJSON website, or from the official Magic the Gathering card market itself. All of the raters provided similar scores, which were averaged for a score of 9.3.Conciseness
Conciseness varied between data sets; the cards data provided extraneous and duplicate information. However, the other data sets were more streamlined because we had control over which variables we scraped or selected. All raters provided very similar scores for this metric, for an average score of 7.Consistent Representation
The output of our objective function can be seen below.
cc <- con_rep(c)
cs <- con_rep(s)
c19c <- con_rep(c19)
c20c <- con_rep(c20)
con_vector <- c("Cards" = cc, "Sets" = cs, "Market Data 2019" = c19c, "Market Data 2020" = c20c)
con_vector %>%
kable("html", col.names="Score", escape = FALSE, caption = "Consistent Representation Scores") %>%
kable_styling(bootstrap_options = c("striped", "condensed", "bordered"),
full_width = FALSE)
| Score | |
|---|---|
| Cards | 1 |
| Sets | 1 |
| Market Data 2019 | 1 |
| Market Data 2020 | 1 |
- Completeness and Ease of Manipulation
| ColumnName | Completeness | Ease_of_Manipulation |
|---|---|---|
| index | 1.000 | 0.8 |
| id | 1.000 | 0.8 |
| artist | 1.000 | 0.6 |
| asciiName | 0.000 | 1.0 |
| availability | 1.000 | 0.6 |
| borderColor | 1.000 | 0.6 |
| cardKingdomFoilId | 0.506 | 0.8 |
| cardKingdomId | 0.762 | 0.8 |
| colorIdentity | 0.890 | 0.6 |
| colorIndicator | 0.000 | 1.0 |
| colors | 0.780 | 0.6 |
| convertedManaCost | 1.000 | 0.8 |
| duelDeck | 0.000 | 1.0 |
| edhrecRank | 0.911 | 0.8 |
| faceConvertedManaCost | 0.000 | 1.0 |
| faceName | 0.000 | 1.0 |
| flavorName | 0.000 | 1.0 |
| flavorText | 0.547 | 0.6 |
| frameEffects | 0.047 | 0.6 |
| frameVersion | 0.998 | 0.8 |
| hand | 0.000 | 1.0 |
| hasAlternativeDeckLimit | 1.000 | 0.8 |
| hasContentWarning | 1.000 | 0.8 |
| hasFoil | 1.000 | 0.8 |
| hasNonFoil | 1.000 | 0.8 |
| isAlternative | 1.000 | 0.8 |
| isFullArt | 1.000 | 0.8 |
| isOnlineOnly | 1.000 | 0.8 |
| isOversized | 1.000 | 0.8 |
| isPromo | 1.000 | 0.8 |
| isReprint | 1.000 | 0.8 |
| isReserved | 1.000 | 0.8 |
| isStarter | 1.000 | 0.8 |
| isStorySpotlight | 1.000 | 0.8 |
| isTextless | 1.000 | 0.8 |
| isTimeshifted | 1.000 | 0.8 |
| keywords | 0.362 | 0.6 |
| layout | 1.000 | 0.6 |
| leadershipSkills | 0.063 | 0.6 |
| life | 0.000 | 1.0 |
| loyalty | 0.014 | 0.8 |
| manaCost | 0.872 | 0.6 |
| mcmId | 0.773 | 0.8 |
| mcmMetaId | 0.691 | 0.8 |
| mtgArenaId | 0.000 | 1.0 |
| mtgjsonV4Id | 1.000 | 0.6 |
| mtgoFoilId | 0.441 | 0.8 |
| mtgoId | 0.567 | 0.8 |
| multiverseId | 0.737 | 0.8 |
| name | 1.000 | 0.6 |
| number | 1.000 | 0.6 |
| originalReleaseDate | 0.000 | 1.0 |
| originalText | 0.722 | 0.6 |
| originalType | 0.737 | 0.6 |
| otherFaceIds | 0.000 | 1.0 |
| power | 0.461 | 0.6 |
| printings | 1.000 | 0.6 |
| promoTypes | 0.102 | 0.6 |
| purchaseUrls | 0.884 | 0.6 |
| rarity | 1.000 | 0.6 |
| scryfallId | 1.000 | 0.6 |
| scryfallIllustrationId | 1.000 | 0.6 |
| scryfallOracleId | 1.000 | 0.6 |
| setCode | 1.000 | 0.6 |
| side | 0.000 | 1.0 |
| subtypes | 0.608 | 0.6 |
| supertypes | 0.134 | 0.6 |
| tcgplayerProductId | 0.878 | 0.8 |
| text | 0.983 | 0.6 |
| toughness | 0.461 | 0.6 |
| type | 1.000 | 0.6 |
| types | 1.000 | 0.6 |
| uuid | 1.000 | 0.6 |
| variations | 0.143 | 0.6 |
| watermark | 0.000 | 1.0 |
| ColumnName | Completeness | Ease_of_Manipulation |
|---|---|---|
| index | 1.000 | 0.8 |
| id | 1.000 | 0.8 |
| baseSetSize | 1.000 | 0.8 |
| block | 0.461 | 0.6 |
| booster | 0.266 | 0.6 |
| code | 1.000 | 0.6 |
| isFoilOnly | 1.000 | 0.8 |
| isForeignOnly | 1.000 | 0.8 |
| isNonFoilOnly | 1.000 | 0.8 |
| isOnlineOnly | 1.000 | 0.8 |
| isPartialPreview | 1.000 | 0.8 |
| keyruneCode | 1.000 | 0.6 |
| mcmId | 0.398 | 0.8 |
| mcmName | 0.398 | 0.6 |
| mtgoCode | 0.314 | 0.6 |
| name | 1.000 | 0.6 |
| parentCode | 0.211 | 0.6 |
| releaseDate | 1.000 | 0.8 |
| tcgplayerGroupId | 0.507 | 0.8 |
| totalSetSize | 1.000 | 0.8 |
| type | 1.000 | 0.6 |
| ColumnName | Completeness | Ease_of_Manipulation |
|---|---|---|
| uuid | 1 | 0.6 |
| mtgo | 1 | 0.8 |
| mtgoFoil | 1 | 0.8 |
| paper | 1 | 0.8 |
| paperFoil | 1 | 0.8 |
| ColumnName | Completeness | Ease_of_Manipulation |
|---|---|---|
| Card Name | 1.000 | 0.6 |
| Rarity | 1.000 | 0.6 |
| Serial no. | 0.798 | 0.8 |
| Market Price | 1.000 | 0.6 |
| Buylist Price | 1.000 | 0.6 |
| Listed Median | 1.000 | 0.6 |
| Set Name | 1.000 | 0.6 |
Reputation
As the data was scraped from official sources on the topic, the apparent reputation of the data is presumed to be high. Online research into public opinion on MTGJSON on the official Magic the Gathering Forum and the Magic the Gathering Reddit suggests that it has a very good reputation among data savvy MtG players and is thought to be very useful. The inter-rater scores for this category were very similar, and were considered in conjunction with a score produced for visible public opinion on the data. The reputation score was calculated as 8.75.Timeliness
The timeliness of the data is variable. Though the 2019 data was pulled at the end of the year and is relatively recent, respective to other data sets on the internet, was not sufficient for all of our needs. This is why we pulled the 2020 data directly from the live website. The cards and sets data were up to date. The inter-rater scores were again very similar for this category. These data were attributed a timeliness score of 7.33.


You've got correct so far.
by Uri Bram Website data from Alexa.com, correct as of May 2015
May 2015. MIT Licensed on Github.


SEND "SEEN" RECEIPTS
USERS NOT FOLLOWING BACK
SHOW FULL CHAT
LOGOUT
Search and select a chat to start.
New
Del
Add To List / Update
Remove From List
Spin And Copy


--- layout: archive title: Miscellaneous Projects type: page image: feature: map-gen-feature.jpg ---
When I am not working on increasing my web application knowledge I enjoy working on numerous other side projects. I have an odd fascination with procedural generation, artificial intelligence and game design so that is where my efforts tend to point when I want to explore something new. Below you will find a list of various projects I have completed in the past. If you wish to know more about a project, simply click on the relevant title below
This program procedurally generates landscapes based on elevation, temperature and precipitation maps. Every map generated is unique but still remains coherent and unified. I have always been fascinated by procedural generation and this project remains my outlet for sating those curiosity spikes. Programmed in Java.
Fealty is an online strategy game focused on acquiring land, complementary resource accumulation and dynamic player hierarchy. This was my first large program, created all the way back in high school. The spaghetti code is real with this one but it taught me an incredible amount about object oriented programming and creating large-scale applications. Programmed in Java.
I have been working my way through problems on the Project Euler website. They are a great way to practice my Ruby coding and allow me little challenges every day. The link will take you to my GitHub repository. Programmed in Ruby.


Notary server configuration file
Estimated reading time: 9 minutesThis document is for those who are running their own Notary service and want to specify custom options.
Overview
A configuration file is required by Notary server, and the path to the
configuration file must be specified using the -config
option on the command
line.
Notary server also allows you to increase/decrease the logging level without having to restart.
Here is a full server configuration file example:
{
"server": {
"http_addr": ":4443",
"tls_key_file": "./fixtures/notary-server.key",
"tls_cert_file": "./fixtures/notary-server.crt"
},
"trust-service": {
"type": "remote",
"hostname": "notarysigner",
"port": "7899",
"key_algorithm": "ecdsa",
"tls_ca_file": "./fixtures/root-ca.crt",
"tls_client_cert": "./fixtures/notary-server.crt",
"tls_client_key": "./fixtures/notary-server.key"
},
"storage": {
"backend": "mysql",
"db_url": "user:pass@tcp(notarymysql:3306)/databasename?parseTime=true"
},
"auth": {
"type": "token",
"options": {
"realm": "https://auth.docker.io/token",
"service": "notary-server",
"issuer": "auth.docker.io",
"rootcertbundle": "/path/to/auth.docker.io/cert"
}
},
"logging": {
"level": "debug"
},
"reporting": {
"bugsnag": {
"api_key": "c9d60ae4c7e70c4b6c4ebd3e8056d2b8",
"release_stage": "production"
}
},
"caching": {
"max_age": {
"current_metadata": 300,
"consistent_metadata": 31536000,
}
},
"repositories": {
"gun_prefixes": ["docker.io/", "my-own-registry.com/"]
}
}
For details on the reporting
and logging
sections, see the documentation on
common Notary configuration sections.
server section (required)
Example:
"server": {
"http_addr": ":4443",
"tls_key_file": "./fixtures/notary-server.key",
"tls_cert_file": "./fixtures/notary-server.crt"
}
| Parameter | Required | Description |
|---|---|---|
http_addr |
yes | The TCP address (IP and port) to listen on. Examples:
|
tls_key_file |
no | The path to the private key to use for
HTTPS. Must be provided together with tls_cert_file ,
or not at all. If neither are provided, the server uses HTTP
instead of HTTPS. The path is relative to the directory of the
configuration file. |
tls_cert_file |
no | The path to the certificate to use for HTTPS.
Must be provided together with tls_key_file , or not
at all. If neither are provided, the server uses HTTP instead
of HTTPS. The path is relative to the directory of the
configuration file. |
trust_service section (required)
This section configures either a remote trust service, such as Notary signer or a local in-memory ED25519 trust service.
Remote trust service example:
"trust_service": {
"type": "remote",
"hostname": "notarysigner",
"port": "7899",
"key_algorithm": "ecdsa",
"tls_ca_file": "./fixtures/root-ca.crt",
"tls_client_cert": "./fixtures/notary-server.crt",
"tls_client_key": "./fixtures/notary-server.key"
}
Local trust service example:
"trust_service": {
"type": "local"
}
| Parameter | Required | Description |
|---|---|---|
type |
yes | Must be "remote" or "local" |
hostname |
yes if remote | The hostname of the remote trust service |
port |
yes if remote | The GRPC port of the remote trust service |
key_algorithm |
yes if remote | Algorithm to use to generate keys stored on the
signing service. Valid values are "ecdsa" ,
"rsa" , and "ed25519" . |
tls_ca_file |
no | The path to the root CA that signed the TLS certificate of the remote service. This parameter must be provided if said root CA is not in the system's default trust roots. The path is relative to the directory of the configuration file. |
tls_client_key |
no | The path to the private key to use for TLS mutual
authentication. This must be provided together with
tls_client_cert or not at all. The path is relative
to the directory of the configuration file. |
tls_client_cert |
no | The path to the certificate to use for TLS mutual
authentication. This must be provided together with
tls_client_key or not at all. The path is relative
to the directory of the configuration file. |
storage section (required)
The storage section specifies which storage backend the server should use to store TUF metadata. Only MySQL or an in-memory store is supported.
DB storage example:
"storage": {
"backend": "mysql",
"db_url": "user:pass@tcp(notarymysql:3306)/databasename?parseTime=true"
}
| Parameter | Required | Description |
|---|---|---|
backend |
yes | Must be "mysql" or "memory" .
If "memory" is selected, the db_url
is ignored. |
db_url |
yes if not memory |
The
the Data Source Name used to access the DB.
( include parseTime=true as part of the DSN) |
auth section (optional)
This sections specifies the authentication options for the server. Currently, we only support token authentication.
Example:
"auth": {
"type": "token",
"options": {
"realm": "https://auth.docker.io",
"service": "notary-server",
"issuer": "auth.docker.io",
"rootcertbundle": "/path/to/auth.docker.io/cert"
}
}
This entire section is optional. However, if you would like authentication for your server, then you need the required parameters below to configure it.
Token authentication:
This is an implementation of the same authentication used by version 2 of the Docker Registry.
| Parameter | Required | Description |
|---|---|---|
type |
yes | Must be "token" ; all other values result in no
authentication (and the rest of the parameters are ignored) |
options |
yes | The options for token auth. See the registry token configuration documentation for the parameter details. |
caching section (optional)
Example:
"caching": {
"max_age": {
"current_metadata": 300,
"consistent_metadata": 31536000,
}
}
| Parameter | Required | Description |
|---|---|---|
max_age |
no | The max age, in seconds, for caching services to cache the latest metadata for a role and the metadata by checksum for a role. This value is set on the cache control headers for GET-ting metadata. `must-revalidate` is also set on the cache control headers for current metadata, as current metadata may change whenever new metadata is signed into a repo. Consistent metadata should never change, although it may be deleted, so the max age can be a higher value. |
repositories section (optional)
Example:
"repositories": {
"gun_prefixes": ["docker.io/", "my-own-registry.com/"]
}
| Parameter | Required | Description |
|---|---|---|
gun_prefixes |
no | A list of GUN prefixes accepted by this server. POST operations on an image beginning with any other prefix are rejected with a 400, and GET/DELETE operations are rejected with a 404. |
Hot logging level reload
We don’t support completely reloading notary configuration files yet at present. What we support for now is:
- increase logging level by signaling
SIGUSR1
- decrease logging level by signaling
SIGUSR2
Example:
To increase logging level
$ kill -s SIGUSR1 PID
or
$ docker container exec -i CONTAINER_ID kill -s SIGUSR1 PID
To decrease logging level
$ kill -s SIGUSR2 PID
or
$ docker container exec -i CONTAINER_ID kill -s SIGUSR2 PID
PID is the process id of notary-server
and it may not the PID 1 process if you are running
the container with some kind of wrapper startup script or something.
You can get the PID of notary-server
through
$ docker container exec CONTAINER_ID ps aux
or
$ ps aux | grep "notary-server -config" | grep -v "grep"


AJAX Example
This will show you how the form validator can be configured to post using AJAX.
First Name:
Last Name:
User Name:
Email:
Age:
Income ($):


9Axes, based off of 8values is a political quiz that attempts to assign percentages on nine different political axes. You will be presented by a statement, and then you will answer with your opinion on the statement, from Strongly Agree to Strongly Disagree, with each answer slightly affecting your scores. At the end of the quiz, your answers will be compared to the maximum possible for each value, thus giving you a percentage. Answer honestly!
There are two versions of the quiz: a full version with 24 questions per axis, for a total of 216 questions, and a short version with 5 questions per axis, for a total of 45 questions. Feel free to take whichever.
There are nine independent axes, where each has two opposing values assigned to them. They are:
Federal vs Unitary
Federal tends to favour stronger local governments, Unitary tends to prefer stronger national governments.
Democratic vs. Authoritarian
Democratic tends to favour elections and popular opinion, Authoritarian tends to prefer the judgement of the government.
Globalist vs. Isolationist
Globalist tends to favour international organizations, Isolationist tends to prefer avoiding international relations.
Militarist vs. Pacifist
Militarist tends to favour military action, Pacifist tends to prefer avoiding military action.
Security vs. Freedom
Security tends to favour government prioritizing safety, Freedom tends to prefer government prioritizing staying out of their lives
Equality vs. Markets
Equality tends to favour socialism, Markets tend to favour capitalism.
Secular vs. Religious
Secular tends to prefer religion to stay out of public life and government, those with highter religious scores tend to prefer religion having some effect on society
Progressive vs. Traditional
Progressive tends to favour scientific advancement and change, traditional tends to favour tradition.
Assimilationist vs. Multiculturalist
Assimilatinist tends to favour immigrants, if any, conforming to the national culture, Multiculturalist tends to prefer having many cultural identities in the nation
Based on feedback on this quiz and another quiz I made, I've made a new, better(hopefully) quiz. it can be accessed at https://prismquiz.github.io/
Another quiz I've created based on feedback on this quiz, it can be accessed at https://sixtriangles.github.io/
Legal notice: The 8values project's license grants the rights to "modify, merge, publish, distribute" the software as long as "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software." The included notice can be found here. This project is released under the same license.