|
SFML Game AI Demos
0.5.0
C++ intelligent agents for games, with demos using the SFML framework.
|
Class for game entities such as items, NPCs, tiles and the player character. More...
#include <Entity.hpp>
Public Member Functions | |
| Entity (sf::Vector2f size) | |
| Default constructor with an argument for the entity's size. More... | |
| Entity (sf::Vector2f size, sf::Vector2f position) | |
| Overloaded constructor with an additional argument for the entity's position in the game. More... | |
| Entity (sf::Vector2f size, std::string textureFilePath) | |
| Overloaded constructor with an argument for a file containing a texture for the entity. More... | |
| Entity (sf::Vector2f size, sf::Vector2f position, std::string textureFilePath) | |
| Overloaded constructor with an argument for position and texture file. More... | |
| virtual void | handleEvents (sf::Event sfEvent)=0 |
| Pure virtual method to handle events of the entity. More... | |
| virtual void | update (float deltaTime)=0 |
| Pure virtual method to update the entity. More... | |
| virtual void | draw ()=0 |
| Pure virtual method for drawing the entity. More... | |
| void | setTexture (sf::Texture texture) |
| Sets the texture for the entity. More... | |
| void | setTexture (std::string textureFilePath) |
| Sets the texture for the entity after loading the texture from the given file path. More... | |
| void | setColor (sf::Color color) |
| Sets the entity's rectangle's color. Most likely temporary and for debugging purposes. More... | |
| void | setSpriteColor (sf::Color color) |
| Sets the entity's sprite's color tint. More... | |
| void | setPosition (sf::Vector2f &position) |
| Sets the position of the entity in the game scene. More... | |
| void | toggleInfoPanel () |
| Toggles the entity's information panel on or off, depending on its current state. More... | |
| float | getRectWidth () |
| Gets the width of the entity's rectangle. More... | |
| float | getRectHeight () |
| Gets the height of the entity's rectangle. More... | |
| sf::Vector2f | getPosition () |
| Gets the position of the entity in the game scene. More... | |
| sf::RectangleShape | getRect () |
| Gets the entity's rectangle. More... | |
| sf::Sprite | getSprite () |
| Gets the entity's sprite. More... | |
| GameAIDemos::InfoPanel & | getInfoPanel () |
| Gets the entity's InfoPanel object. More... | |
| bool | isInfoPanelEnabled () |
| Returns a boolean indicating if this entity's info panel UI element is enabled and being displayed in the UI. More... | |
| bool | isSelected () |
| Returns a boolean indicating if this entity has been selected by the user via a mouse click. More... | |
| void | toggleSelected () |
| Toggles the entity's selected state to true or false, depending on its current value. More... | |
| BaseEntityState * | getState () |
| Returns a pointer to a BaseEntityState object for this entity's current state. More... | |
| void | setState (BaseEntityState *state) |
| Sets the entity's current state. Exits the entity's current state, sets the state and enters the new state. More... | |
Protected Attributes | |
| float | m_rectWidth |
| Returns a new instance of Collision for this entity, which can be used to handle and solve collisions between this entity and other entities in the game. More... | |
| float | m_rectHeight |
| Height of the entity's rectangle. More... | |
| sf::Vector2f | m_position |
| SFML Vector2f instance containing the position of the entity. More... | |
| sf::RectangleShape | m_rect |
| SFML RectangleShape instance for the entity's rectangle. More... | |
| sf::Sprite | m_sprite |
| SFML Sprite instance for the entity's sprite. More... | |
| sf::Texture | m_texture |
| SFML Texture instance for the entity's texture. More... | |
| sf::Color | m_color |
| SFML Color instance for the entity's rectangle color. More... | |
| InfoPanel | m_infoPanel |
| Instance of InfoPanel used for displaying entity information on screen. More... | |
| bool | m_displayInfoPanel = false |
| A boolean specifying if the entity's info panel should be displayed in the UI. An info panel displays useful information about an entity. More... | |
| bool | m_isSelected = false |
| A boolean specifying if the entity is currently selected by the user. More... | |
| BaseEntityState * | m_state |
| An pointer to a BaseEntityState object, representing the current state of this entity. More... | |
| Logger | m_logger |
| Instance of Logger for logging. More... | |
Class for game entities such as items, NPCs, tiles and the player character.
| GameAIDemos::Entity::Entity | ( | sf::Vector2f | size | ) |
Default constructor with an argument for the entity's size.
Initilizes the entity's Collision object.
| size | A SFML Vector2f containing the entity's size. |
| GameAIDemos::Entity::Entity | ( | sf::Vector2f | size, |
| sf::Vector2f | position | ||
| ) |
Overloaded constructor with an additional argument for the entity's position in the game.
| size | A SFML Vector2f containing the entity's size. |
| position | A SFML Vector2f containing the entity's position on the game scene. |
| GameAIDemos::Entity::Entity | ( | sf::Vector2f | size, |
| std::string | textureFilePath | ||
| ) |
Overloaded constructor with an argument for a file containing a texture for the entity.
| size | A SFML Vector2f containing the entity's size. |
| textureFilePath | A string specifying a filename of a texture image for this entity. |
| GameAIDemos::Entity::Entity | ( | sf::Vector2f | size, |
| sf::Vector2f | position, | ||
| std::string | textureFilePath | ||
| ) |
Overloaded constructor with an argument for position and texture file.
| size | A SFML Vector2f containing the entity's size. |
| position | A SFML Vector2f containing the entity's position on the game scene. |
| textureFilePath | A string specifying a filename of a texture image for this entity. |
|
pure virtual |
Pure virtual method for drawing the entity.
Implemented in GameAIDemos::AgentEntity, GameAIDemos::LiveEntity, and GameAIDemos::PlayerEntity.
| GameAIDemos::InfoPanel & GameAIDemos::Entity::getInfoPanel | ( | ) |
| sf::Vector2f GameAIDemos::Entity::getPosition | ( | ) |
Gets the position of the entity in the game scene.
| sf::RectangleShape GameAIDemos::Entity::getRect | ( | ) |
Gets the entity's rectangle.
| float GameAIDemos::Entity::getRectHeight | ( | ) |
Gets the height of the entity's rectangle.
| float GameAIDemos::Entity::getRectWidth | ( | ) |
Gets the width of the entity's rectangle.
| sf::Sprite GameAIDemos::Entity::getSprite | ( | ) |
Gets the entity's sprite.
| GameAIDemos::BaseEntityState * GameAIDemos::Entity::getState | ( | ) |
Returns a pointer to a BaseEntityState object for this entity's current state.
|
pure virtual |
Pure virtual method to handle events of the entity.
| sfEvent | A SFML event (e.g. generated user input) object. |
Implemented in GameAIDemos::AgentEntity, GameAIDemos::LiveEntity, and GameAIDemos::PlayerEntity.
| bool GameAIDemos::Entity::isInfoPanelEnabled | ( | ) |
Returns a boolean indicating if this entity's info panel UI element is enabled and being displayed in the UI.
| bool GameAIDemos::Entity::isSelected | ( | ) |
Returns a boolean indicating if this entity has been selected by the user via a mouse click.
| void GameAIDemos::Entity::setColor | ( | sf::Color | color | ) |
Sets the entity's rectangle's color. Most likely temporary and for debugging purposes.
| color | A reference to a SFML Color object. |
| void GameAIDemos::Entity::setPosition | ( | sf::Vector2f & | position | ) |
Sets the position of the entity in the game scene.
| position | A reference to a SFML Vector2f containing the new position for the entity on the game scene. |
| void GameAIDemos::Entity::setSpriteColor | ( | sf::Color | color | ) |
Sets the entity's sprite's color tint.
| color | A reference to a SFML Color object. |
| void GameAIDemos::Entity::setState | ( | BaseEntityState * | state | ) |
Sets the entity's current state. Exits the entity's current state, sets the state and enters the new state.
| state | A pointer to a new state object. |
| void GameAIDemos::Entity::setTexture | ( | sf::Texture | texture | ) |
Sets the texture for the entity.
Calls the setTexture method of this entity's SFML Sprite instance to give it a texture.
| texture | A pointer to a SFML Texture object required by SFML's setTexture method. |
| void GameAIDemos::Entity::setTexture | ( | std::string | textureFilePath | ) |
Sets the texture for the entity after loading the texture from the given file path.
| textureFilePath | A string specifying a filename of a texture image for this entity. |
| void GameAIDemos::Entity::toggleInfoPanel | ( | ) |
Toggles the entity's information panel on or off, depending on its current state.
| void GameAIDemos::Entity::toggleSelected | ( | ) |
Toggles the entity's selected state to true or false, depending on its current value.
|
pure virtual |
Pure virtual method to update the entity.
| deltaTime | The delta time for the update frequency rate. |
Implemented in GameAIDemos::AgentEntity, GameAIDemos::LiveEntity, and GameAIDemos::PlayerEntity.
|
protected |
SFML Color instance for the entity's rectangle color.
|
protected |
A boolean specifying if the entity's info panel should be displayed in the UI. An info panel displays useful information about an entity.
|
protected |
Instance of InfoPanel used for displaying entity information on screen.
|
protected |
A boolean specifying if the entity is currently selected by the user.
|
protected |
SFML Vector2f instance containing the position of the entity.
|
protected |
SFML RectangleShape instance for the entity's rectangle.
|
protected |
Height of the entity's rectangle.
|
protected |
|
protected |
SFML Sprite instance for the entity's sprite.
|
protected |
An pointer to a BaseEntityState object, representing the current state of this entity.
|
protected |
SFML Texture instance for the entity's texture.


pmt-ofl - Show processes using directories/files/mountpoints
-k NUM/NAME Signal to send (if any).
--help Show help message.
--usage Display brief usage message.
All processes are listed that access the given directories, files or mountpoints. The process information is read from the /proc filesystem.
This manpage was originally written by Bastian Kleineidam<EMAIL_ADDRESS>for the Debian distribution of libpam-mount but may be used by others.


My Team
German Adam
Manager
ID: 1
Email:
<EMAIL_ADDRESS>Office number:<PHONE_NUMBER>
Cynthia Mojica
Engineer
ID: 2
Email:
<EMAIL_ADDRESS>GitHub:
cynmojica1231
Mohammad Islam
Engineer
ID: 3
Email:
<EMAIL_ADDRESS>GitHub:
mislam
Buck Harris
Intern
ID: 4
Email:
School: Sacramento State University
Cali Harris
Intern
ID: 5
Email:
School: UC Davis


You can't view this page
This could be because:
- it doesn't exist
- you haven't done anything for a while, and your information has been removed to keep you safe online
Go back a page and try again. If that doesn't work, you'll have to start a new Access to Work application from GOV.UK.


public final class HexagonalGridImpl extends java.lang.Object implements HexagonalGrid
| Constructor and Description |
|---|
HexagonalGridImpl(HexagonalGridBuilder builder)
Instantiate a HexagonalGrid from a
HexagonalGridBuilder |
| Modifier and Type | Method and Description |
|---|---|
Hexagon |
addHexagon(int gridX,
int gridZ)
Adds a new
Hexagon at the given coordinates. |
void |
clearSatelliteData()
Clears all satellite data attached to the
Hexagon s in this grid. |
boolean |
containsCoordinate(int gridX,
int gridZ)
Tells whether the given axial coordinate is on the grid or not.
|
Hexagon |
getByGridCoordinate(int gridX,
int gridZ)
Fetches a
Hexagon by its grid coordinate. |
Hexagon |
getByPixelCoordinate(double x,
double y)
Returns a
Hexagon by a pixel coordinate. |
java.util.Map<java.lang.String,Hexagon> |
getHexagons()
Returns all
Hexagon s contained in this grid. |
java.util.Map<java.lang.String,Hexagon> |
getHexagonsByAxialRange(int gridXFrom,
int gridXTo,
int gridZFrom,
int gridZTo)
Returns all
Hexagon s contained in the given axial coordinate range. |
java.util.Map<java.lang.String,Hexagon> |
getHexagonsByOffsetRange(int gridXFrom,
int gridXTo,
int gridYFrom,
int gridYTo)
Returns all
Hexagon s contained in the given offset coordinate range. |
java.util.Set<Hexagon> |
getNeighborsOf(Hexagon hexagon)
Returns all neighbors of a
Hexagon . |
Hexagon |
removeHexagon(int gridX,
int gridZ)
Removes the
Hexagon at the given coordinates. |
public HexagonalGridImpl(HexagonalGridBuilder builder)
HexagonalGridBuilder
builder
- for the HexagonalGrid
public java.util.Map<java.lang.String,Hexagon> getHexagons()
HexagonalGrid
Hexagon
s contained in this grid.getHexagons
in interface HexagonalGrid
HexagonalGrid.getHexagons()
public java.util.Map<java.lang.String,Hexagon> getHexagonsByAxialRange(int gridXFrom, int gridXTo, int gridZFrom, int gridZTo) throws HexagonNotFoundException
HexagonalGrid
Hexagon
s contained in the given axial coordinate range.
If the range contains coordinates which are not part of the grid it will throw a HexagonNotFoundException
.getHexagonsByAxialRange
in interface HexagonalGrid
gridXFrom
- from x inclusivegridXTo
- to x inclusivegridZFrom
- from z inclusivegridZTo
- to z inclusiveHexagon
s in the given range.HexagonNotFoundException
HexagonalGrid.getHexagonsByAxialRange(int, int, int, int)
public java.util.Map<java.lang.String,Hexagon> getHexagonsByOffsetRange(int gridXFrom, int gridXTo, int gridYFrom, int gridYTo) throws HexagonNotFoundException
HexagonalGrid
Hexagon
s contained in the given offset coordinate range.getHexagonsByOffsetRange
in interface HexagonalGrid
gridXFrom
- from x inclusivegridXTo
- to x inclusivegridYFrom
- from z inclusivegridYTo
- to z inclusiveHexagon
s in the given range.HexagonNotFoundException
HexagonalGrid.getHexagonsByOffsetRange(int, int, int, int)
public Hexagon addHexagon(int gridX, int gridZ)
HexagonalGrid
Hexagon
at the given coordinates.addHexagon
in interface HexagonalGrid
Hexagon
created.HexagonalGrid.addHexagon(int, int)
public Hexagon removeHexagon(int gridX, int gridZ) throws HexagonNotFoundException
HexagonalGrid
Hexagon
at the given coordinates.removeHexagon
in interface HexagonalGrid
Map.remove(Object)
HexagonNotFoundException
HexagonalGrid.removeHexagon(int, int)
public boolean containsCoordinate(int gridX, int gridZ)
HexagonalGrid
CoordinateConverter
.containsCoordinate
in interface HexagonalGrid
HexagonalGrid.containsCoordinate(int, int)
public Hexagon getByGridCoordinate(int gridX, int gridZ) throws HexagonNotFoundException
HexagonalGrid
Hexagon
by its grid coordinate. If no Hexagon
found at the given location it throws a
HexagonNotFoundException
.getByGridCoordinate
in interface HexagonalGrid
gridX
- grid x coordinategridZ
- grid z coordinateHexagon
HexagonNotFoundException
HexagonalGrid.getByGridCoordinate(int, int)
public Hexagon getByPixelCoordinate(double x, double y) throws HexagonNotFoundException
HexagonalGrid
Hexagon
by a pixel coordinate. Throws HexagonNotFoundException
if there were no
Hexagon
at the given coordinates.
Please note that all pixel coordinates are relative to
the containing HexagonalGrid
.getByPixelCoordinate
in interface HexagonalGrid
x
- pixel x coordinatey
- pixel y coordinateHexagon
HexagonNotFoundException
HexagonalGrid.getByPixelCoordinate(double, double)
public java.util.Set<Hexagon> getNeighborsOf(Hexagon hexagon)
HexagonalGrid
Hexagon
.getNeighborsOf
in interface HexagonalGrid
hexagon
- Hexagon
Hexagon
's neighborsHexagonalGrid.getNeighborsOf(biz.pavonis.hexameter.api.Hexagon)
public void clearSatelliteData()
HexagonalGrid
Hexagon
s in this grid.clearSatelliteData
in interface HexagonalGrid
HexagonalGrid.clearSatelliteData()


X-WSSE Generator
Username
Password
MD5?
On
Off
Nonce
Automatic?
Yes
No
Created At
Automatic?
Yes
No
Generate Header
WSSE Header


Rhino.Python – Tessellation and Subdivision – first version
Part 3 of 4 of Series Rhino.Python
Using recursive loop and drawing to tessellate and subdivide surfaces. Warning: This is only the rough first version so contain lots of problems and bugs. Use it carefully, otherwise it will crash your computer. A lot of problem need to be solved. Problem: The dirction and orientation of subdivision faces should be organized. Using surface is not an efficient way. Should turn surfaces into meshes.
diagram
""" #################################################################### Computational Design Assignment 04 Tessellation and Subdivision Written by: Gene Ting-Chun Kao This is only the rough first version so contain lots of problems and bugs. Use it carefully, otherwise it will crash your computer. problem: The dirction and orientation of subdivision faces should be organized. Using surface is not a good way. Should turn surfaces into meshes. #################################################################### """ import rhinoscriptsyntax as rs import Rhino as rh import math import Rhino.Geometry as rg from scriptcontext import escape_test from scriptcontext import doc from random import * def DivideSrfUV(srf, dividU, dividV): """ Divid surface method return: uv vector uv position using vector, so uv can be calculate later. """ domainU = rs.SurfaceDomain(srf, 0) domainV = rs.SurfaceDomain(srf, 1) uStep = (domainU[1]-domainU[0])/dividU vStep = (domainV[1]-domainV[0])/dividV uvList = [] for i in range(dividU+1): u0 = domainU[0] + uStep*i if i < (dividU): u1 = domainU[0] + uStep*(i+1) for j in range(dividV+1): v0 = domainV[0] + vStep*j if j < (dividV): v1 = domainV[0] + vStep*(j+1) vec00 = rg.Vector3d(u0,v0,0) vec01 = rg.Vector3d(u1,v0,0) vec02 = rg.Vector3d(u1,v1,0) vec03 = rg.Vector3d(u0,v1,0) uvList.append( [ vec00, vec01, vec02, vec03 ] ) return uvList def subdivision(srf, uvList, iteration): newSrf = [] count = 0 ratio = 0.2 for panelUV in uvList: if count%2 == 1: midPt00 = vecRatio(panelUV[0], panelUV[1], ratio) midPt01 = vecRatio(panelUV[1], panelUV[2], ratio) midPt02 = vecRatio(panelUV[2], panelUV[3], ratio) midPt03 = vecRatio(panelUV[3], panelUV[0], ratio) else: midPt00 = vecRatio(panelUV[0], panelUV[1], ratio, True) midPt01 = vecRatio(panelUV[1], panelUV[2], ratio, True) midPt02 = vecRatio(panelUV[2], panelUV[3], ratio, True) midPt03 = vecRatio(panelUV[3], panelUV[0], ratio, True) midPts = [ midPt00, midPt01, midPt02, midPt03 ] centerPt = vecAverage(midPts) #centerPt = vecAverage(panelUV) pt0 = rs.EvaluateSurface(srf, panelUV[0][0], panelUV[0][1]) pt1 = rs.EvaluateSurface(srf, midPt00[0], midPt00[1]) pt2 = rs.EvaluateSurface(srf, panelUV[1][0], panelUV[1][1]) pt3 = rs.EvaluateSurface(srf, midPt03[0], midPt03[1]) pt4 = rs.EvaluateSurface(srf, centerPt[0], centerPt[1]) pt5 = rs.EvaluateSurface(srf, midPt01[0], midPt01[1]) pt6 = rs.EvaluateSurface(srf, panelUV[3][0], panelUV[3][1]) pt7 = rs.EvaluateSurface(srf, midPt02[0], midPt02[1]) pt8 = rs.EvaluateSurface(srf, panelUV[2][0], panelUV[2][1]) centerNormal = rs.SurfaceNormal( srf, pt4 ) centerPtExtrude = vecExtrude(pt4, centerNormal, iteration*3 + 0.4) pt4 = centerPtExtrude s0 = rs.AddSrfPt([pt0,pt1,pt4,pt3]) s1 = rs.AddSrfPt([pt1,pt2,pt5,pt4]) s2 = rs.AddSrfPt([pt4,pt5,pt8,pt7]) s3 = rs.AddSrfPt([pt3,pt4,pt7,pt6]) newSrf.append(s0) newSrf.append(s1) newSrf.append(s2) newSrf.append(s3) count += 1 escape_test() for s in newSrf: if iteration > 0: uv = DivideSrfUV(s, 1, 1) subdivision(s, uv, iteration-1) rs.DeleteObject(s) else: break return newSrf def vecAverage(vecList): preVec = rg.Vector3d(0,0,0) for vec in vecList: preVec = rg.Vector3d.Add(preVec, vec) return rg.Vector3d.Divide(preVec, len(vecList)) def vecRatio(vecA, vecB, r = 0.5, rotation = False): if rotation == False: if r > 1: r = 1 elif r < 0: r = 0 else: r = r else: if r > 1: r = 0 elif r < 0: r = 1 else: r = 1 - r vecBA = rg.Vector3d.Subtract(vecA, vecB) rVec = rg.Vector3d.Multiply(r, vecBA) + vecB return rVec def vecExtrude(vec, normal, s = 1): normal = rs.VectorScale(normal, s) extrudePt = rs.VectorAdd(vec, normal) return extrudePt def main(): surface = rs.GetObject("pick a surface.", rs.filter.surface) rs.EnableRedraw(False) uv = DivideSrfUV(surface, 3, 3) subdivision(surface, uv, 2) rs.EnableRedraw(True) if __name__ == "__main__": main()


Identify the person or family name that is of interest. It is best if you have a first and last name to search, but it is also possible to search for only a first or last name, or for a family name. For instance, in my case, I could search for my name, "Penland, Laurin" (notice how the last name is first), or I could simply search for "Penland" or "Penland family" or "Laurin." The less specific you are, the broader your search will be. For more tips for using names for searches, go to the Names page. For searching for enslaved ancestors, visit the Enslaved Ancestors page. Now that you have a name for which you would like to search, it's time to search in the library's catalog.
Let's start by searching the catalog. Open the David M. Rubenstein Rare Book & Manuscript Library's homepage. On this page you will notice that there is a search box with a drop-down menu on the left. Click on the drop-down menu and click "keyword" (this should be the default setting). You will also notice that there are a few other choices. Using the tabs on the left side, you can choose to search the Catalog, Collection Guides, or Digitized Collections. Choose catalog. On the bottom you'll notice choices to search all of the Rubenstein, University Archives, or the catalog for all of Duke Libraries. We'll be searching all of the Rubenstein. See the picture below for the correct settings.
Type in the name that you would like to search.
Pro tip: you can search for multiple variations of a name at once by adding "OR" between the names that you are searching. So, in the example shown below I searched for "Penland" OR "Penland, Laurin" OR "Penland family" OR "Penland." Notice that "OR" is capitalized. This is called a Boolean search.
Browse your results. It's okay if you strike out! In my case, none of the results were related to me or my family. Most of the results have to do with the Penland School of Craft. Let's try again with a different kind of search.
This time we're going to search Collection Guides instead of the catalog. Collection Guides often offer more detail about some of the larger manuscript collections. They may list folder titles, folder contents, item titles, and sometimes photograph captions. This time I am just going to search for my last name.
When I sift through the search results, I find items about my father and about my grandfather's general store.
Once you have identified items that you are interested in viewing, you need to request to see the items in the reading room at the Rubenstein Library. To do that, you will need to register an account at the Rubenstein and request the items in advance. There are detailed instructions on the Rubenstein's web page about how to do this. While the request and registration process may seem intimidating, don't let it stop you! Be brave. Librarians and archivists have worked very hard to preserve these materials so that they could be shared with people like you.


However, in the real world, probabilities are usually much more complicated to determine. To calculate your credit score, credit reporting agencies use many different factors - how long you've had loans or credit cards, how many times you have been late paying your bills, and the types of loans and credit cards that you have. There is no simple formula to calculate how likely you are to repay a loan. The credit score summarizes the complicated calculations that have gone into determining the likelihood of you paying back money that you borrow.
in-context


--- layout: post title: Inktober day six description: Inktober 2019, day six, "husky" date: '2019-10-06 20:48:12 +0100' categories: - Sketches ---
Day six, "husky".
"I'll do the talking"


I am a Web Designer who thrives on making beautiful websites and creating the best user experiences. When I'm not working or pursuing side projects, I can be found mountain biking around the mountains of Western North Carolina.
I am a Web Designer who thrives on making beautiful websites and creating the best user experiences. When I'm not working or pursuing side projects, I can be found mountain biking around the mountains of Western North Carolina.
Planning what to put on my website: I want to include what I do. Front-end development, web design, wireframes, protoypes. I'll definitely have a contact form and an about page. My home page will be the same as my Work page.
I know I want to have a grid of my work samples. I'll use tHRving, Founding Father's Distillery, and hopefully will build a site for Libby. I'm sure I can find some Skillcrush projects to use as well. Not sure if I want to show each work sample with a workflow like Joy Fonderson or just a pic and description for now.
About me: I'm a web designer based in Brevard, NC. I love creating beautiful websites that are user friendly. My web design journey began in 2017 when I realized I was not happy in my current career. I found Skillcrush.com and began taking classes and found something I truly love doing. This year I quit my corporate job to pursue a career in Web Design and haven't looked back since. Most of my free time is spent on my mountain bike!


Fubarino SD
Buy Fubarino SD on SEEED Bazaar.
Description
The Fubarino SD board brings affordable, breadboard compatible high speed computing power to the Arduino-compatible chipKIT/MPIDE platform. It is able to run almost all Arduino sketches right out of the box at a great price, and includes more memory, speed, and I/O pins than a typical Arduino or clone. And it includes a microSD card slot for easy sketch access to huge file storage.
Features
- PIC32MX440F256H - 256K Flash, 32K RAM @ 80MHz 32-bit MIPS core
- MPIDE (Mulit Platform IDE - a fork of the Arduino IDE) supports Fubarino SD board out of the box
- 45 Digital IO (many are 5V tolerant)
- 15 Analog inputs (10-bit)
- 2 hardware serial ports (UARTs) - one accessible on pins 28 (rx) and 29 (tx), the other on pins 8 and 9, plus a serial connection over USB (12Mbps)
- Comes with headers for easy mounting on a breadboard
- Directly compatible with 3.3V devices. No level converting necessary.
- Small form factor - easy to integrate into your project
- Great for projects that need two hardware serial ports plus a USB connection and file storage
- Easy to program, no additional hardware is required to load sketches – just plug into a USB port and run MPIDE
- Can be used as USB to microSD adapter
- ICSP Header for use with optional Microchip hardware programmer/debuggers (like PICKit3, ICD3 or REAL ICE)
- Can be powered through USB, or 2.3V to 13V DC input power
- Extra power and ground pins for ease of wiring into your project
- microSD slot connected to the PIC32 hardware SPI port
- microSD card accessible for large file access from your sketches
- USB bootloader (avrdude compatible) for seemless sketch uploading within MPIDE
Documents
Please visit our wiki page for more info about this product. It will be appreciated if you can help us improve the documents, add more demo code or tutorials. For technical support, please post your questions to our ChipKit MPIDE forum.
Programming mode
Press and hold the PRG button while pressing and releasing the RESET button, then release the PRG button. This causes the Fubarino SD to enter programming mode. You must do this before you upload a new sketch from MPIDE.
Licensing
The Fubarino SD hardware is licenced under the Solderpad Hardware License v0.5. All MPIDE source code is licenced under GPL or other open source software licenses.
Authors
Fubarino SD was designed by Brian Schmalz (from Schmalz Haus LLC) and Rick Anderson (from Fubar Labs). Both are also on the chipKIT/MPIDE development team.
External Links
Links to external webpages which provide more application ideas, documents/datasheet or software libraries


ProgressBar is a process status indicator.
ProgressBar has two modes; "determinate" and "indeterminate". Former requires a value between 0 and 100 to display the progress.
Indeterminate has no such a requirement and is simple enabled using mode property.
| Name | Type | Default | Description |
|---|---|---|---|
| value | number | null | Current value of the progress. |
| showValue | boolean | true | Show or hide progress bar value. |
| unit | string | % | Unit sign appended to the value. |
| mode | string | determinate | Defines the mode of the progress, valid values are "determinate" and "indeterminate". |
Following is the list of structural style classes, for theming classes visit theming page.
| Name | Element |
|---|---|
| p-progressbar | Container element. |
| p-progressbar-determinate | Container element of a determinate progressbar. |
| p-progressbar-indeterminate | Container element of an indeterminate progressbar. |
| p-progressbar-value | Element whose width changes according to value. |
| p-progressbar-label | Label element that displays the current value. |
None.


CA1a (15%)
How Stuff Works
Deadline: 8th June 2020Objective:
- To understand mechanical design, components and mechanisms through the practice of reverse engineering.
Tasks:
- Dismantle a discarded consumer product.
- Understand How it works.
- Write a report.
Report:
The report should cover the following content.
- How does this consumer product work?
- Identify 2 component and explain what material it is made out of and the manufacturing process that was employed to make it.
- Identify 1 mechanism and explain how it works.
Include photos in your report to better illustrate and explain.
 That means that it allows a human to interact with a computer.  Mice also have push buttons (also known as push switches) to allow the user to "click" on objects within the computer screen after the user has moved the mouse cursor to the desired object on the screen.
Nowadays, I see that most mice also have a scroll wheel in the middle, which is used to scroll pages on the computer screen. This scroll wheel can have an additional button for a "middle click" action as well.
Optical mice, as the name suggests, use light to track the user's movements. I remember the times where mice used a large rolling rubber ball to track the movements. That design caused those mice to collect lots of dust inside.
This mouse was discarded not because it was broken, but because its wireless dongle is missing. Unfortunately, even though I would imagine that all its features are working perfectly, it does not matter since the computer cannot connect to the mouse.
After removing the battery cover, we can see there is no wireless USB dongle. It seems that the mouse is only held together with one screw. Sometimes mice have screws under the circular pads, but not this one.
I continued by unscrewing the lone screw.
It seems like the top is stuck with some clips
After pulling the top half downwards, the two halves are unclipped.
I can start to see some witness marks that suggest injection moulding.
During injection moulding,
witness marks are created by ejector pins to separate the plastic part from its mold.
After pulling the top half downwards, the two halves are unclipped.
It seems like there are even more clips to hold the PCB inside.
Yet another plastic clip...
And finally the PCB is also unclipped
The scroll wheel has some interesting slots cut into it.
I suppose there are a few ways this could work.
I was thinking that it could use 3 sensors and detect the state transitions
But after searching online, I found this website talking about "quadrature encoding", which I realised was the same thing, but with the middle sensor removed.
Another mechanical part is this switch
It seems like it can be unclipped
This reveals quite a few parts, the outer casing, the white actuator, and some metal pieces.
The metal pieces are probably stamped out of a metal sheet. I found this video of the manufaturing of a switch. The plastic parts are probably manufatured using injection moulding.


The Sheldon Choir
Home
Events
Online Store
Buy Vocal T-Shirt
Honor Choir Audition
Tri-Tip Dinner
Donate
Portfolio
About Us
Donate
Your browser does not support HTML5 video.
Donate to
SHS Choirs
Enter your donation amount & confirm
Donation Amount
Card Holder
Card Number
valid thru
Month
/
Year
CVC


{% extends "base.html" %} {% block content %}
| Deployment uuid | Status | Container name | GPUs | Creation time | Deployed At | Actions |
|---|---|---|---|---|---|---|
| {{deployment.uuid}} | {% if "COMPLETE" in deployment.status %} {% elif "FAIL" in deployment.status %} {% else %} {% endif %} {{deployment.status}} | {{deployment.outputs['Docker_image']}} | {{deployment.outputs['Docker_num_gpus']}} | {{deployment.creationTime}} | {{deployment.cloudProviderName}} |
|


© Copyright 1993, 2000-2008 by the University of Washington. Permission is granted to copy this document provided that no fee is charged for it and that this copyright notice is not removed.
This program uses protein sequences to compute a distance matrix, under four different models of amino acid replacement. It can also compute a table of similarity between the amino acid sequences. The distance for each pair of species estimates the total branch length between the two species, and can be used in the distance matrix programs Fitch, Kitsch or Neighbor. This is an alternative to using the sequence data itself in the parsimony program Protpars.
The program reads in protein sequences and writes an output file containing the distance matrix or similarity table. The five models of amino acid substitution are one which is based on the Jones, Taylor and Thornton (1992) model of amino acid change, the PMB model (Veerassamy, Smith and Tillier, 2003) which is derived from the Blocks database of conserved protein motifs, the DCMut model (Kosiol and Goldman, 2005) based on the PAM matrices of Margaret Dayhoff, one due to Kimura (1983, p.75) which approximates it based simply on the fraction of similar amino acids, and one based on a model in which the amino acids are divided up into groups, with change occurring based on the genetic code but with greater difficulty of changing between groups. The program correctly takes into account a variety of sequence ambiguities.
The five methods are:
(1) The Dayhoff PAM matrix. This uses the DCMut model (Kosiol and Goldman, 2005) which is a version of the PAM model of Margaret Dayhoff. The PAM model is an empirical one that scales probabilities of change from one amino acid to another in terms of a unit which is an expected 1% change between two amino acid sequences. The PAM 001 matrix is used to make a transition probability matrix which allows prediction of the probability of changing from any one amino acid to any other, and also predicts equilibrium amino acid composition. The program assumes that these probabilities are correct and bases its computations of distance on them. The distance that is computed is scaled in units of expected fraction of amino acids changed. This is a unit such that 1.0 is 100 PAM's.
(2) The Jones-Taylor-Thornton model. This is similar to the Dayhoff PAM model, except that it is based on a recounting of the number of observed changes in amino acids by Jones, Taylor, and Thornton (1992). They used a much larger sample of protein sequences than did Dayhoff. The distance is scaled in units of the expected fraction of amino acids changed (100 PAM's). Because its sample is so much larger this model is to be preferred over the original Dayhoff PAM model. It is the default model in this program.
(3) The PMB (Probability Matrix from Blocks) model. This is derived using the Blocks database of conserved protein motifs. It is described in a paper by Veerassamy, Smith and Tillier (2003). Elisabeth Tillier kindly made the matrices available for this model.
(4) Kimura's distance. This is a rough-and-ready distance formula for approximating PAM distance by simply measuring the fraction of amino acids, p, that differs between two sequences and computing the distance as (Kimura, 1983)
D = - loge ( 1 - p - 0.2 p2 ).
This is very quick to do but has some obvious limitations. It does not take into account which amino acids differ or to what amino acids they change, so some information is lost. The units of the distance measure are the fraction of amino acids differing, as also in the case of the PAM distance. If the fraction of amino acids differing gets larger than about 0.8541 the distance becomes infinite. Note that this can happen with bootstrapped sequences even when the original sequences are below this level of difference.
(5) The Categories distance. This is my own concoction. I imagined a nucleotide sequence changing according to Kimura's 2-parameter model, with the exception that some changes of amino acids are less likely than others. The amino acids are grouped into a series of categories. Any base change that does not change which category the amino acid is in is allowed, but if an amino acid changes category this is allowed only a certain fraction of the time. The fraction is called the "ease" and there is a parameter for it, which is 1.0 when all changes are allowed and near 0.0 when changes between categories are nearly impossible.
In this option I have allowed the user to select the Transition/Transversion ratio, which of several genetic codes to use, and which categorization of amino acids to use. There are three of them, a somewhat random sample:
Interestingly enough, all of them are consistent with the same linear ordering of amino acids, which they divide up in different ways. For the Categories model I have set as default the George/Hunt/Barker classification with the "ease" parameter set to 0.457 which is approximately the value implied by the empirical rates in the Dayhoff PAM matrix.
The method uses, as I have noted, Kimura's (1980) 2-parameter model of DNA change. The Kimura "2-parameter" model allows for a difference between transition and transversion rates. Its transition probability matrix for a short interval of time is:
To: A G C T --------------------------------- A | 1-a-2b a b b From: G | a 1-a-2b b b C | b b 1-a-2b a T | b b a 1-a-2b
where a is u dt, the product of the rate of transitions per unit time and dt is the length dt of the time interval, and b is v dt, the product of half the rate of transversions (i.e., the rate of a specific transversion) and the length dt of the time interval.
Each distance that is calculated is an estimate, from that particular pair of species, of the divergence time between those two species. The Kimura distance is straightforward to compute. The other two are considerably slower, and they look at all positions, and find that distance which makes the likelihood highest. This likelihood is in effect the length of the internal branch in a two-species tree that connects these two species. Its likelihood is just the product, under the model, of the probabilities of each position having the (one or) two amino acids that are actually found. This is fairly slow to compute.
The computation proceeds from an eigenanalysis (spectral decomposition) of the transition probability matrix. In the case of the PAM 001 matrix the eigenvalues and eigenvectors are precomputed and are hard-coded into the program in over 400 statements. In the case of the Categories model the program computes the eigenvalues and eigenvectors itself, which will add a delay. But the delay is independent of the number of species as the calculation is done only once, at the outset.
The actual algorithm for estimating the distance is in both cases a bisection algorithm which tries to find the point at which the derivative of the likelihood is zero. Some of the kinds of ambiguous amino acids like "glx" are correctly taken into account. However, gaps are treated as if they are unkown nucleotides, which means those positions get dropped from that particular comparison. However, they are not dropped from the whole analysis. You need not eliminate regions containing gaps, as long as you are reasonably sure of the alignment there.
Note that there is an assumption that we are looking at all positions, including those that have not changed at all. It is important not to restrict attention to some positions based on whether or not they have changed; doing that would bias the distances by making them too large, and that in turn would cause the distances to misinterpret the meaning of those positions that had changed.
The program can now correct distances for unequal rates of change at different amino acid positions. This correction, which was introduced for DNA sequences by Jin and Nei (1990), assumes that the distribution of rates of change among amino acid positions follows a Gamma distribution. The user is asked for the value of a parameter that determines the amount of variation of rates among amino acid positions. Instead of the more widely-known coefficient alpha, Protdist uses the coefficient of variation (ratio of the standard deviation to the mean) of rates among amino acid positions. So if there is 20% variation in rates, the CV is is 0.20. The square of the C.V. is also the reciprocal of the better-known "shape parameter", alpha, of the Gamma distribution, so in this case the shape parameter alpha = 1/(0.20*0.20) = 25. If you want to achieve a particular value of alpha, such as 10, you will want to use a CV of 1/sqrt(10) = 1/3.162 = 0.3162.
In addition to the five distance calculations, the program can also compute a table of similarities between amino acid sequences. These values are the fractions of amino acid positions identical between the sequences. The diagonal values are 1.0000. No attempt is made to count similarity of nonidentical amino acids, so that no credit is given for having (for example) different hydrophobic amino acids at the corresponding positions in the two sequences. This option has been requested by many users, who need it for descriptive purposes. It is not intended that the table be used for inferring the tree.
Input is fairly standard, with one addition. As usual the first line of the file gives the number of species and the number of sites. There follows the character W if the Weights option is being used.
Next come the species data. Each sequence starts on a new line, has a ten-character species name that must be blank-filled to be of that length, followed immediately by the species data in the one-letter code. The sequences must either be in the "interleaved" or "sequential" formats described in the Molecular Sequence Programs document. The I option selects between them. The sequences can have internal blanks in the sequence but there must be no extra blanks at the end of the terminated line. Note that a blank is not a valid symbol for a deletion.
After that are the lines (if any) containing the information for the W option, as described below.
The options are selected using an interactive menu. The menu looks like this:
Protein distance algorithm, version 3.69 Settings for this run: P Use JTT, PMB, PAM, Kimura, categories model? Jones-Taylor-Thornton matrix G Gamma distribution of rates among positions? No C One category of substitution rates? Yes W Use weights for positions? No M Analyze multiple data sets? No I Input sequences interleaved? Yes 0 Terminal type (IBM PC, ANSI)? ANSI 1 Print out the data at start of run No 2 Print indications of progress of run Yes Are these settings correct? (type Y or the letter for one to change) |
The user either types "Y" (followed, of course, by a carriage-return) if the settings shown are to be accepted, or the letter or digit corresponding to an option that is to be changed.
The P option selects one of the five distance methods, or the similarity table. It toggles among these six methods. The default method, if none is specified, is the Jones-Taylor-Thornton model. If the Categories distance is selected another menu option, T, will appear allowing the user to supply the Transition/Transversion ratio that should be assumed at the underlying DNA level, and another one, C, which allows the user to select among various nuclear and mitochondrial genetic codes. The transition/transversion ratio can be any number from 0.5 upwards.
The G option chooses Gamma distributed rates of evolution across amino acid psoitions. The program will prompt you for the Coefficient of Variation of rates. As is noted above, this is 1/sqrt(alpha) if alpha is the more familiar "shape coefficient" of the Gamma distribution. If the G option is not selected, the program defaults to having no variation of rates among sites.
The C option allows user-defined rate categories. The user is prompted for the number of user-defined rates, and for the rates themselves, which cannot be negative but can be zero. These numbers, which must be nonnegative (some could be 0), are defined relative to each other, so that if rates for three categories are set to 1 : 3 : 2.5 this would have the same meaning as setting them to 2 : 6 : 5. The assignment of rates to sites is then made by reading a file whose default name is "categories". It should contain a string of digits 1 through 9. A new line or a blank can occur after any character in this string. Thus the categories file might look like this:
122231111122411155<PHONE_NUMBER>444
If both user-assigned rate categories and Gamma-distributed rates are allowed, the program assumes that the actual rate at a site is the product of the user-assigned category rate and the Gamma-distributed rate. This allows you to specify that certain sites have higher or lower rates of change while also allowing the program to allow variation of rates in addition to that.
The M (multiple data sets) option will ask you whether you want to use multiple sets of weights (from the weights file) or multiple data sets from the input file. The ability to use a single data set with multiple weights means that much less disk space will be used for this input data. The bootstrapping and jackknifing tool Seqboot has the ability to create a weights file with multiple weights. Note also that when we use multiple weights for bootstrapping we can also then maintain different rate categories for different sites in a meaningful way. If you use the multiple data sets option rather than multiple weights, you should not at the same time use the user-defined rate categories option (option C), because the user-defined rate categories could then be associated with the wrong sites. This is not a concern when the M option is used by using multiple weights.
Option 0 is the usual one. It is described in the main documentation file of this package. Option I is the same as in other molecular sequence programs and is described in the documentation file for the sequence programs.
The W (Weights) option is invoked in the usual way, with only weights 0 and 1 allowed. It selects a set of sites to be analyzed, ignoring the others. The sites selected are those with weight 1. If the W option is not invoked, all sites are analyzed.
As the distances are computed, the program prints on your screen or terminal the names of the species in turn, followed by one dot (".") for each other species for which the distance to that species has been computed. Thus if there are ten species, the first species name is printed out, followed by one dot, then on the next line the next species name is printed out followed by two dots, then the next followed by three dots, and so on. The pattern of dots should form a triangle. When the distance matrix has been written out to the output file, the user is notified of that.
The output file contains on its first line the number of species. The distance matrix is then printed in standard form, with each species starting on a new line with the species name, followed by the distances to the species in order. These continue onto a new line after every nine distances. The distance matrix is square with zero distances on the diagonal. In general the format of the distance matrix is such that it can serve as input to any of the distance matrix programs.
If the similarity table is selected, the table that is produced is not in a format that can be used as input to the distance matrix programs. It has a heading, and the species names are also put at the tops of the columns of the table (or rather, the first 8 characters of each species name is there, the other two characters omitted to save space). There is not an option to put the table into a format that can be read by the distance matrix programs, nor is there one to make it into a table of fractions of difference by subtracting the similarity values from 1. This is done deliberately to make it more difficult to use these values to construct trees. The similarity values are not corrected for multiple changes, and their use to construct trees (even after converting them to fractions of difference) would be wrong, as it would lead to severe conflict between the distant pairs of sequences and the close pairs of sequences.
If the option to print out the data is selected, the output file will precede the data by more complete information on the input and the menu selections. The output file begins by giving the number of species and the number of characters, and the identity of the distance measure that is being used.
In the Categories model of substitution, the distances printed out are scaled in terms of expected numbers of substitutions, counting both transitions and transversions but not replacements of a base by itself, and scaled so that the average rate of change is set to 1.0. For the Dayhoff PAM and Kimura models the distance are scaled in terms of the expected numbers of amino acid substitutions per site. Of course, when a branch is twice as long this does not mean that there will be twice as much net change expected along it, since some of the changes may occur in the same site and overlie or even reverse each other. The branch lengths estimates here are in terms of the expected underlying numbers of changes. That means that a branch of length 0.26 is 26 times as long as one which would show a 1% difference between the protein (or nucleotide) sequences at the beginning and end of the branch. But we would not expect the sequences at the beginning and end of the branch to be 26% different, as there would be some overlaying of changes.
One problem that can arise is that two or more of the species can be so dissimilar that the distance between them would have to be infinite, as the likelihood rises indefinitely as the estimated divergence time increases. For example, with the Kimura model, if the two sequences differ in 85.41% or more of their positions then the estimate of divergence time would be infinite. Since there is no way to represent an infinite distance in the output file, the program regards this as an error, issues a warning message indicating which pair of species are causing the problem, and computes a distance of -1.0.
The constants that are available to be changed by the user at the beginning of the program include "namelength", the length of species names in characters, and "epsilon", a parameter which controls the accuracy of the results of the iterations which estimate the distances. Making "epsilon" smaller will increase run times but result in more decimal places of accuracy. This should not be necessary.
The program spends most of its time doing real arithmetic. Any software or hardware changes that speed up that arithmetic will speed it up by a nearly proportional amount.
(Note that although these may look like DNA sequences, they are being treated as protein sequences consisting entirely of alanine, cystine, glycine, and threonine).
5 13 Alpha AACGTGGCCACAT Beta AAGGTCGCCACAC Gamma CAGTTCGCCACAA Delta GAGATTTCCGCCT Epsilon GAGATCTCCGCCC |
(Note that when the numerical options are not on, the output file produced is in the correct format to be used as an input file in the distance matrix programs).
Jones-Taylor-Thornton model distance Name Sequences ---- --------- Alpha AACGTGGCCA CAT Beta ..G..C.... ..C Gamma C.GT.C.... ..A Delta G.GA.TT..G .C. Epsilon G.GA.CT..G .CC Alpha 0.000000 0.331834 0.628142 1.036660 1.365098 Beta 0.331834 0.000000 0.377406 1.102689 0.682218 Gamma 0.628142 0.377406 0.000000 0.979550 0.866781 Delta 1.036660 1.102689 0.979550 0.000000 0.227515 Epsilon 1.365098 0.682218 0.866781 0.227515 0.000000 |


Mach-O Browser - A Mac application for browsing the contents of Mach-O (Mach Object) files, including executables, shared libraries, and intermediate object files.
Email<EMAIL_ADDRESS>Developed by David Schweinsberg for Synchroma.
Mach-O Browser aims to provide similar functionality to the otool and nm command-line tools, but utilising the Aqua interface of Mac OS X.
Mac OS X 10.6 is required.
Mach-O Browser is Copyright © 2009-2010 Synchroma Pty Ltd. All Rights Reserved.
Aqua, Mac and Mac OS are trademarks of Apple Inc., registered in the U.S. and other countries.
The following load commands don't display any data:


Banner Rotator
360+ touch swipe slideshow effects
Image Gallery
Image gallery with thumbnail navigation
Carousel
Touch swipe, mobile device optimized
Themes
30+ professional themems + growing
Tab Slider
Tab slider with auto play options


--- layout: redirect_bookshelf title: Rakhim's bookshelf permalink: /bookshelf/ summary: The books I read and didn't forget about. cover_url: /images/book_covers/stockholm_library.jpg ---
I didn't really track books before 2015. Here is a short list of some books I really loved and remembered from that ancient past. Everything else is lost and forgotten forever.
{% for book in site.data.bookshelf_pre_2015 %} {% include bookshelf_book.html %} {% endfor %}


'Baby' by Four Tet can be purchased on Bandcamp
🧝♀⎔🤖🔵(≼⓪≽◟⋌⋚⋛⋋◞≼⓪≽)🧞♀❄🏵V̸̘̅̀̒̃̚V̴̠̼̩̘͈̦̥̉͋̐͗͌͠V̵̪̮̅̉̓↻( ꑡ᷉ˋ͈ˊ͈)ꑡ᷉༄🎷🔋̵̨̛̱̥͕́̎́̐͝/̸̠̜̅̐🖍
A locked in lockdown fantasy visual experience. Nowt to do with Four Tet. This is a thanks for all the tunes
The video clips are from various stock sites released free under permissible licences
The site is hosted on the distributed web (IPFS) where it will live forever
lockdownbaby uses the Ethereum Name Service (ENS)
This is a Progressive Web App (PWA) built using videojs-wavesurfer, wavesurfer.js && video.js


SWAT Division
Profile:
http://battlelog.battlefield.com/bf3/platoon/2832655241021966239/
Website:
http://www.swatdivision.enjin.com
Facebook:
https://www.facebook.com/swatdivisionsd
[SD] SWAT Division (SD) was founded on October 2011 to bring together mature, active and skilled players from around the globe. Over the past months, SD has become a very renowned platoon and major force in the clan scene for Battlefield 3.
Maturity
We’re a mature community with friendly and like-minded players.
Activity
SWAT Division consists of active players by having mandatory and optional practices. The purpose is to improve our teamwork and tactics. We strive for perfection and this can only be achieved by having practices on a regular basis.
High stats
SD currently counts 53 members with an average rank of 65 and 661 SPM. We've an overall K/D ratio of 1.74.
Competition
SD is a member of Fraggednation; a competitive gaming community which offers excellent ladders and tournaments. We play all game modes, but we’re Conquest based.
Awards
SD values each and every member. You’ll be awarded if you show great practice/scrim attendance, or show other qualities such as good conduct, dedication, leadership, teamwork, tactics and performance on and off the battlefield.
Recruitment
Requirements
1. Atleast rank 50
2. 350-400+ SPM
3. Mic to communicate
You have to meet option 1 & 2 & 3 to be accepted.
*Note: If you do not meet these reqs, you can still apply for SWAT Academy. SWAT Academy requires a minimum rank of 40 and 300 SPM.
We're currently recruiting skilled jet pilots, tank drivers and engineers.
Application
http://www.swatdivision.enjin.com/application
[swatdivision.enjin.com]


firefly instrument¶
This class handles instrumental properties that influence the FIREFLY fitting process.
Provides a set of functions to handle instrumental effects.
log_rebin()
has been pulled from
mangadap.contrib.ppxf_util.py
and modified.
- Source location:
- $MANGADAP_DIR/python/mangadap/util/instrument.py
Python2/3 compliance:
from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
import sys
if sys.version > '3':
long = int
Imports:
import warnings
import numpy
from scipy.interpolate import InterpolatedUnivariateSpline
import astropy.constants
- Revision history:
- 27 May 2015: Original implementation by K. Westfall (KBW) based on downgrader_MANGA.f provided by D. Thomas, O. Steele, D. Wilkinson, D. Goddard. 13 June 2015: D.Wilkinson edit to not calculate unimportant convolution terms -> runs 5x faster.
-
class
firefly_instrument.
convolution_integral_element
(y, sigma, ye=None)[source]¶ Support class for variable sigma convolution. See
convolution_variable_sigma()
.- Args:
y (np.ndarray): Vector to convolve sigma (np.ndarray): Coordinate-dependent standard deviation of the
Gaussian kernelye (np.ndarray): (Optional) Error in the vector to convolve
- Raises:
- Exception: Raised if y is not a 1D vector, or if the shape of
- y and sigma (and ye if provided) are different.
- Attributes:
x (np.ndarray): Pixel coordinate vector y (np.ndarray): Vector to convolve ye (np.ndarray): Error in the vector to convolve sigma (np.ndarray): Coordinate-dependent standard deviation of the
Gaussian kernel- norm (np.ndarray): Gaussian normalization; calculated once for
- efficiency
-
firefly_instrument.
convolution_variable_sigma
(y, sigma, ye=None)[source]¶ Convolve a discretely sampled function \(y(x)\) with a Gaussian kernel, \(g\), where the standard deviation of the kernel is a function of \(x\), \(\sigma(x)\). Nominal calculations can be performed to propagate the error in the result; these calculations do not include the covariance between the pixels, which will mean that the calculations likely have significant error!
The convolution is defined as:
\[\begin{split}(y\ast g)(x) &= \int_{-\infty}^{\infty} y(X)\ g(\sigma,x-X)\ dX \\ &= \int_{-\infty}^{\infty} \frac{y(X)}{\sqrt{2\pi}\ \sigma(X)}\ \exp\left(-\frac{(x-X)^2}{2\ \sigma(X)^2}\right) dX .\end{split}\]To minimize edge effects and account for the censoring of the data (finite range in \(x\)), the convolution is actually calculated as a definite integral and normalized as follows:
\[(y\ast g)(x) \sim\frac{ \int_{x-n_\sigma*\sigma(x)}^{x+n_\sigma*\sigma(x)} y(X)\ g(\sigma,x-X)\ dX}{ \int_{x-n_\sigma*\sigma(x)}^{x+n_\sigma*\sigma(x)} g(\sigma,x-X)\ dX} .\]The above is identical to getting the weighted mean of \(y\) at each position \(x\), where the weights are defined by a Gaussian kernel centered at \(x\) with a variable dispersion.
- Use of this function requires:
- y and sigma must be 1D vectors
- y and sigma must be uniformly sampled on the same grid
- sigma must be in pixel units.
- Args:
y (np.ndarray): A uniformly sampled function to convolve. sigma (np.ndarray): The standard deviation of the Gaussian
kernel sampled at the same positions as y. The units of sigma must be in pixels.- ye (np.ndarray): (Optional) Errors in the function
- \(y(x)\).
- Returns:
- np.ndarray: Arrays with the convolved function :math:`(yast
- g)(x)` sampled at the same positions as the input \(x\) vector and its error. The second array will be returned as None if the error vector is not provided.
- Raises:
- Exception: Raised if trying to calculate the errors because they haven’t been implemented yet.
-
firefly_instrument.
downgrade
(wave, flux, deltal_in, sigma_galaxy, wave_instrument, r_instrument)[source]¶ Adapted from the manga DAP downgrader from Kyle Westfall.
Downgrades an input spectrum to a given galaxy velocity dispersion using the input SEDs resolution and the resolution of the observation.
Returns flux of downgraded SED.
-
firefly_instrument.
log_rebin
(lamRange, spec, oversample=None, velscale=None, flux=False, log10=False, newRange=None, wave_in_ang=False, unobs=0.0)[source]¶ Note
Copyright (C) 2001-2014, Michele Cappellari E-mail: cappellari_at_astro.ox.ac.uk
This software is provided as is without any warranty whatsoever. Permission to use, for non-commercial purposes is granted. Permission to modify for personal or internal use is granted, provided this copyright and disclaimer are included unchanged at the beginning of the file. All other rights are reserved.
Logarithmically rebin a spectrum, while rigorously conserving the flux. Basically the photons in the spectrum are simply ridistributed according to a new grid of pixels, with non-uniform size in the spectral direction.
This routine makes the `standard’ zero-order assumption that the spectrum is constant within each pixels. It is possible to perform log-rebinning by assuming the spectrum is represented by a piece-wise polynomial of higer degree, while still obtaining a uniquely defined linear problem, but this reduces to a deconvolution and amplifies noise.
Warning
This assumption can be poor for sharp features in the spectrum. Beware if resampling spectra with strong, marginally sampled features!
This same routine can be used to compute approximate errors of the log-rebinned spectrum. To do this type the command
>>> err2New, logLam, velscale = log_rebin(lamRange, np.square(err))
and the desired errors will be given by np.sqrt(err2New).
Warning
This rebinning of the error-spectrum is very approximate as it does not consider the correlation introduced by the rebinning!
Args:
- lamRange (np.ndarray): two elements vector containing the
- central wavelength of the first and last pixels in the spectrum, which is assumed to have constant wavelength scale! E.g. from the values in the standard FITS keywords: LAMRANGE = CRVAL1 + [0,CDELT1*(NAXIS1-1)]. It must be LAMRANGE[0] < LAMRANGE[1].
spec (np.ndarray): Input spectrum. oversample (int): (Optional) Oversampling can be done, not to
loose spectral resolution, especally for extended wavelength ranges and to avoid aliasing. Default is to provide the same number of output pixels as input.- velscale (float): Velocity scale in km/s per pixels. If this
- variable is not defined, then it will contain in output the velocity scale. If this variable is defined by the user it will be used to set the output number of pixels and wavelength scale.
- flux (bool): (Optional) Set this keyword to preserve total flux.
In this case the log rebinning changes the pixels flux in proportion to their dLam so the following command will show large differences beween the spectral shape before and after
log_rebin()
:# Plot log-rebinned spectrum pyplot.plot(exp(logLam), specNew) pyplot.plot(np.arange(lamRange[0],lamRange[1],spec.size), spec, 'g') pyplot.show()
By default, when this keyword is not set, the above two lines produce two spectra that almost perfectly overlap each other.
- log10 (bool): (Optional) Flag that the spectrum should be binned
- in units of base-10 log wavelength, instead of natural log
- newRange (np.ndarray): (Optional) Force the spectrum to be
- sampled to a new spectral range (lamRange is the existing spectral range).
- wave_in_ang (bool): (Optional) Return the wavelength coordinates
- in angstroms, not log(angstroms)
- unobs (float): (Optional) Default value for unobserved spectral
- regions.
- Returns:
- np.ndarray, float : Returns three variables: logarithmically
- rebinned spectrum, the log of the wavelength at the geometric center of each pixel, and the velocity scale of each pixel in km/s.
- Raises:
- ValueError: Raised if the input spectrum is not a
- one-dimensional np.ndarray.
- Modification History:
- V1.0.0: Using interpolation. Michele Cappellari, Leiden, 22 October 2001V2.0.0: Analytic flux conservation. MC, Potsdam, 15 June 2003V2.1.0: Allow a velocity scale to be specified by the user. MC, Leiden, 2 August 2003V2.2.0: Output the optional logarithmically spaced wavelength at the geometric mean of the wavelength at the border of each pixel. Thanks to Jesus Falcon-Barroso. MC, Leiden, 5 November 2003V2.2.1: Verify that lamRange[0] < lamRange[1]. MC, Vicenza, 29 December 2004V2.2.2: Modified the documentation after feedback from James Price. MC, Oxford, 21 October 2010V2.3.0: By default now preserve the shape of the spectrum, not the total flux. This seems what most users expect from the procedure. Set the keyword /FLUX to preserve flux like in previous version. MC, Oxford, 30 November 2011V3.0.0: Translated from IDL into Python. MC, Santiago, 23 November 2013V3.1.0: Fully vectorized log_rebin. Typical speed up by two orders of magnitude. MC, Oxford, 4 March 201405 Jun 2015: (K. Westfall, KBW) Pulled from ppxf_util.py. Conform to mangadap documentation standard. Transcribe edits made to IDL version that provides for the log10 and newRange arguments. Add option to return wavelength in angstroms, not log(angstroms). Break out determination of input and output spectrum pixel coordinates to a new function,
log_rebin_pix()
. Added default value for unobserved pixels. Default behavior unchanged.
-
firefly_instrument.
log_rebin_pix
(lamRange, n, oversample=None, velscale=None, log10=False, newRange=None)[source]¶ Determine the number of new pixels and their coordinate step when rebinning a spectrum in geometrically stepped bins. The input spectrum must be sampled linearly in wavelength. This is primarily a support routine for
log_rebin()
.Although breaking this out from the main
log_rebin()
function leads to a few repeat calculations in that function, the use of this function is in determine a common wavelength range for a large number of spectra before resampling the spectra themselves. Seemangadap.TplLibrary
.- Args:
- lamRange (np.ndarray): two elements vector containing the
- central wavelength of the first and last pixels in the spectrum, which is assumed to have constant wavelength scale! E.g. from the values in the standard FITS keywords: LAMRANGE = CRVAL1 + [0,CDELT1*(NAXIS1-1)]. It must be LAMRANGE[0] < LAMRANGE[1].
n (int): Number of pixels in the original spectrum. oversample (int): (Optional) Oversampling can be done, not to
loose spectral resolution, especally for extended wavelength ranges and to avoid aliasing. Default is to provide the same number of output pixels as input.- velscale (float): Velocity scale in km/s per pixels. If this
- variable is not defined, then it will contain in output the velocity scale. If this variable is defined by the user it will be used to set the output number of pixels and wavelength scale.
- log10 (bool): (Optional) Flag that the spectrum should be binned
- in units of base-10 log wavelength, instead of natural log
- newRange (np.ndarray): (Optional) Force the spectrum to be
- sampled to a new spectral range (lamRange is the existing spectral range).
- Returns:
- float, int : Returns (1) the linear wavelength step of each
- pixel in the input spectrum, (2) the number of pixels for the rebinned spectrum, (3) the log-linear wavelength step for each pixel in the new spectrum, (4) the velocity step for each pixel in the new spectrum.
- Raises:
- ValueError: Raised if the input wavelength range (lamRange or
- newRange) does not have two elements or is not sorted.
-
firefly_instrument.
match_spectral_resolution
(wave, flux, sres, new_sres_wave, new_sres, ivar=None, mask=None, min_sig_pix=0.0, no_offset=True, variable_offset=False, log10=False, new_log10=False)[source]¶ Adjust the existing spectral resolution of to a lower resolution as best as possible. The primary functionality is in
spectral_resolution
, which determines the Gaussian kernel parameters needed to match the resolution, andconvolve_variable_sigma()
, which actually performs the convolution to match the resolution.In particular, see
spectral_resolution.GaussianKernelDifference()
for a description of how the kernel parameters are determined and how regions where the target resolution is higher than the existing resolution. In this case, one of the options is to adopt an offset of the resolution (in km/s) that could be corrected for in subsequent analysis. In this case, setting variable_offset to True allows the offset to be different for all input spectra. If one expects to combine the spectra, the default behavior should be used, forcing all the spectra to have a constant offset.- Args:
- wave (np.ndarray): A 1D or 2D (:math:`N_{rm spec}times
- N_{rm pix}`) array with the wavelength in angstroms for a set of spectra. The sampling may be either in linear steps of wavelength or \(\log_{10}\) steps, as set using log10.
- flux (np.ndarray): A 1D or 2D (:math:`N_{rm spec}times
- N_{rm pix}`) array with the flux sampled at the provided wavelengths.
- sres (np.ndarray): A 1D or 2D (:math:`N_{rm spec}times
- N_{rm pix}`) array with the spectral resolution, \(R\), at the provided wavelengths.
- new_sres_wave (np.ndarray): A 1D vector with the wavelength
- in angstroms at which the new resolution of the input spectra has been sampled. The sampling may be either in linear steps of wavelength or \(\log_{10}\) steps, as set using new_log10.
- new_sres (np.ndarray): A 1D vector with the new resolution
- for the input spectra.
- ivar (np.ndarray): (Optional) A 1D or 2D (:math:`N_{rm
- spec}times N_{rm pix}`) array with the inverse variance of the flux sampled at the provided wavelengths. Currently never used and, if provided, the output inverse variances are simply a carbon copy of this array.
- mask (np.ndarray): (Optional) A 1D or 2D (:math:`N_{rm
- spec}times N_{rm pix}`) array with a uint mask for the flux sampled at the provided wavelengths.
- no_offset (bool): (Optional) Force \(\sigma^2_{v,o} = 0\) by
- masking regions with \(\sigma_{p,d} <
-\epsilon_\sigma\); i.e., the value of this arguments selects
Option 1 (True) or Option 2 (False). See
spectral_resolution.GaussianKernelDifference()
. - min_sig_pix (float): (Optional) Minimum value of the standard
- deviation in pixels allowed before assuming the kernel is a Delta function.
- variable_offset (bool): (Optional) Flag to allow the offset
- applied to each spectrum (when the input contains more than one spectraum) to be tailored to each spectrum. Otherwise (variable_offset=False) the offset is forced to be the same for all spectra.
- log10 (bool): (Optional) Flag that the spectrum has been binned
- logarithmically (base 10) in wavelength
- new_log10 (bool): (Optional) Flag that the coordinates of the
- new spectral resolution are spectrum as been binned logarithmically (base 10) in wavelength.
Returns:
np.ndarray : Four or Five arrays are returned:
- A 1D or 2D (\(N_{\rm spec}\times N_{\rm pix}\)) array with the resolution-matched flux sampled at the input wavelengths.
- A 1D or 2D (\(N_{\rm spec}\times N_{\rm pix}\)) array with the spectral resolution, \(R\), of the resolution-matched spectra at the provided wavelengths.
- A 1D vector with any constant offset in resolution in
km/s between the targetted value and the result. See
spectral_resolution.GaussianKernelDifference()
. - A 1D or 2D (\(N_{\rm spec}\times N_{\rm pix}\)) array with a uint mask for the resolution-matched flux sampled at the input wavelengths. This is returned regardless of whether an input mask was provided. Any pixel that had a resolution that was lower than the target resolution (up to some tolerance defined by min_sig_pix) is returned as masked.
- (Optional) A 1D or 2D (\(N_{\rm spec}\times N_{\rm pix}\)) array with the inverse variance of the resolution-matched flux sampled at the input wavelengths. Only output if *ivar* is provided, and in that case this is just a carbon copy of the input array.
- Raises:
Exception: Raised if:
- the input wave array is 2D and the sres array is not; a 1D wavelength array is allowed for a 2D sres array but not vice versa
- the number of spectral pixels in wave, flux, and sres is not the same
- the shape of the flux, mask (if provided), and ivar (if provided) are not the same
- the shape of the new_sres_wave and new_sres arrays are not the same and/or not 1D
-
class
firefly_instrument.
spectral_resolution
(wave, sres, log10=False, interp_ext='extrapolate')[source]¶ Container class for the resolution, \(R = \lambda/\Delta\lambda\), of a spectrum. The primary functionality is to determine the parameters necessary to match the resolution of one spectrum to another. It can also be used as a function to interpolate the spectral resolution at a given wavelenth.
- Args:
- wave (np.ndarray): A 1D vector with the wavelength in
- angstroms. The sampling may be either in linear steps of wavelength or \(\log_{10}\) steps.
- sres (np.ndarray): A 1D vector with the spectral resolution,
- \(R\), sampled at the positions of the provided wavelength vector.
- log10 (bool): (Optional) Flag that the spectrum has been binned
- logarithmically (base 10) in wavelength
- interp_ext (int or str): (Optional) The value to pass as ext
- to the interpolator, which defines its behavior when attempting to sample the spectral resolution beyond where it is defined. See scipy.interpolate.InterpolatedUnivariateSpline. Default is to extrapolate.
- Raises:
- Exception: Raised if wave is not a 1D vector or if wave and
- sres do not have the same shape.
- Attributes:
- interpolator
- (scipy.interpolate.InterpolatedUnivariateSpline): An object used to interpolate the spectral resolution at any given wavelength. The interpolation is hard-wired to be linear and its extrapolation behavior is defined by interp_ext. The wavelength and resolution vectors are held by this object for later reference if needed.
- log10 (bool): Flag that the spectrum has been binned
- logarithmically (base 10) in wavelength
- cnst (
mangadap.util.constants
): Used to define the - conversion factor between a Gaussian sigma and FWHM
c (float): The speed of light; provided by astropy.constants. dv (float): The velocity step per pixel in km/s. Defined using
spectrum_velocity_scale()
iflog10
is True; otherwise set to None.- dw (float): The wavelength step per pixel in angstroms. Defined
- as the wavelength step between the first two pixels if
log10
is False; otherwise set to None. - min_sig (float): Minimum standard deviation allowed for the
- kernel used to match two spectral resolutions. See
GaussianKernelDifference()
. - sig_pd (np.ndarray): The standard deviation in pixels
- required to match the spectral resolution of this object to
the resolution defined by a different spectral_resolution
object. See
GaussianKernelDifference()
. - sig_mask (np.ndarray): A uint vector used to identify
- measurements of
sig_pd
that should not be used to match the spectral resolution of this object to the resolution defined by a different spectral_resolution object. SeeGaussianKernelDifference()
. - sig_vo (float): A constant offset of the kernal standard
- deviation in km/s that has been applied to
sig_pd
. SeeGaussianKernelDifference()
.
Warning
The default behavior of the interpolator is to extrapolate the input spectral resolution vector when trying to sample from regions beyond where it is sampled. Use interp_ext change this; see scipy.interpolate.InterpolatedUnivariateSpline.
-
GaussianKernelDifference
(new_sres, no_offset=True, min_sig_pix=0.0)[source]¶ Determine the parameters of a Gaussian kernel required to convert the resolution of this object to the resolution of a different the
spectral_resolution
object, new_sres.The spectral resolution is defined as \(R = \lambda/\Delta\lambda\), where \(\Delta\lambda\) is the FWHM of the spectral resolution element. The standard deviation of the resolution element in angstroms is then
\[\sigma_\lambda = \frac{\lambda}{f R}, \ \ {\rm where} \ \ f = \frac{{\rm FWHM_\lambda}}{\sigma_\lambda}.\]Assuming a Gaussian (in angstroms) line-spread function:
\[\sigma^2_{\lambda,2} = \sigma^2_{\lambda,1} + \sigma^2_{\lambda,d}\]such that
\[\sigma^2_{\lambda,d} = \left(\frac{\lambda}{f}\right)^2 (R^{-2}_2 - R^{-2}_1)\]is the defining parameter of the Gaussian kernel needed to take a spectrum of resolution \(R_1\) to one with a resolution of \(R_2\).
For input to
convolution_variable_sigma()
, the wavelength-dependent parameter of the Gaussian kernel is converted to pixels. This function allows for the input spectra to be linearly sampled in angstroms or log10(angstroms). For the former (log10=False),\[\sigma^2_{p,d} = \left(\frac{\lambda}{f\ \delta\lambda}\right)^2 (R^{-2}_2 - R^{-2}_1)\]where \(\delta\lambda\) is the size of the pixel in angstroms. If the units are log10(angstrom) (log10=True), we approximate the velocity width of each pixel to be \(\delta v = c \ln(10.0) (\log\lambda[1]-\log\lambda[0])\), such that
\[\begin{split}\sigma^2_{p,d} &= \left(\frac{c}{ \delta v \lambda}\right)^2 \sigma^2_{\lambda,d} \\ &= \left(\frac{c}{ f\ \delta v}\right)^2 (R^{-2}_2 - R^{-2}_1)\ ;\end{split}\]\(c\) is the speed of light in km/s.
The nominal use of this algorithm assumes \(R_1 \geq R_2\). However, in practice,
convolution_variable_sigma()
only uses a Gaussian kernel up to some minimum value of \(\epsilon_\sigma\); below this, the kernel is assumed to be a Delta function. Therefore, as long as\[\sigma_{p,d} \equiv \sigma^2_{p,d}/\sqrt{|\sigma^2_{p,d}|} \geq -\epsilon_\sigma\ ,\]the behavior of
convolution_variable_sigma()
should not be affected.Even so, there may be spectral regions that do not have \(\sigma_{p,d} \geq -\epsilon_\sigma\); for such spectral regions there are three choices:
(Option 1) trim the spectral range to only those spectral regions where the existing resolution is better than the target resolution,
(Option 2) match the existing resolution to the target resolution up to some constant offset that must be accounted for in subsequent analyses, or
(Option 3) allow for a wavelength dependent difference in the spectral resolution that must be accounted for in subsequent analyses.
The choice of either Option 1 or 2 is selected by setting no_offset to, respectively, True or False; Option 1 is the default behavior. Currently, Option 3 is not allowed.
For Option 1, pixels with \(\sigma_{p,d} < -\epsilon_\sigma\) are masked (sigma_mask = 1); however, the returned values of \(\sigma_{p,d}\) are left unchanged.
For Option 2, we define
\[\sigma^2_{v,o} = -{\rm min}(\sigma^2_{v,d}) - {\rm max}(\epsilon_\sigma \delta v)^2\]where \(\delta v\) is constant for the logarithmically binned spectrum and is wavelength dependent for the linearly binned spectra; in the latter case, the velocity step is determined for each pixel:
_wave = self.wave() dv = c * (2.0*(_wave[1:] - _wave[0:-1]) / (_wave[1:] + _wave[0:-1]))
If \(\sigma^2_{v,o} > 0.0\), it must be that \({\rm min}(\sigma^2_{v,d}) < -{\rm max}(\epsilon_\sigma \delta v)^2\), such that an offset should be applied. In that case, the returned kernel parameters are
\[\sigma^\prime_{v,d} = \sqrt{\sigma^2_{v,d} + \sigma^2_{v,o}}\ .\]with the units converted to pixels using the equations above, no pixels are masked, and \(\sqrt{\sigma^2_{v,o}}\) is returned for the offset. Otherwise, the offset is set to 0.
- Args:
- new_sres (
spectral_resolution
): Spectral resolution - to match to.
- no_offset (bool): (Optional) Force :math:`sigma^2_{v,o} =
- 0` by masking regions with \(\sigma_{p,d} < -\epsilon_\sigma\); i.e., the value of this arguments selects Option 1 (True) or Option 2 (False).
- min_sig_pix (float): (Optional) Minimum value of the
- standard deviation allowed before assuming the kernel is a Delta function.
- new_sres (
-
adjusted_resolution
(indx=None)[source]¶ Return the resolution that should result from applying
convolution_variable_sigma()
to the spectrum associated with this spectral resolution object usingsigma_pd
. I.e., calculate:\[R_2 = \left[ \left(\frac{f}{c}\right)^2 \sigma^2_{v,d} + R^{-2}_1\right]^{-1/2}\ . \]- Args:
- indx (tuple): (Optional) Selection tuple used to return a
- subset of the full resolution vector.
- Returns:
- np.ndarray: The (full or selected) vector with the
- adjusted resolution.
-
match
(new_sres, no_offset=True, min_sig_pix=0.0)[source]¶ Currently only an alias for
GaussianKernelDifference()
.
-
offset_GaussianKernelDifference
(offset)[source]¶ If the properties required to match the resolution of one spectrum to another has already been calculated (see
GaussianKernelDifference()
), this allows for one to apply an additional offset. The additional offset must be in km/s (not pixels).The offset is applied in quadrature; however, the offset can be negative such that one can reduce
sig_pd
. Once converted to km/s, the offset is applied by calculating:\[\sigma^{\prime\ 2}_{v,d} = \sigma^{2}_{v,d} + \sigma_{off}|\sigma_{off}|\ .\]sig_vo
is adjusted in the same way, and the change in \(\sigma^{\prime\ 2}_{v,d}\) is then propagated tosig_pd
andsig_mask
.- Args:
- offset (float): Value of the standard deviation in km/s to
- add in quadrature to a previously calculated
sig_pd
.
- Raises:
- Exception: Raised if the kernel properties have not yet been
- defined.
-
firefly_instrument.
spectrum_velocity_scale
(wave, log10=False)[source]¶ Determine the velocity sampling of an input wavelength coordinate vector. The wavelength vector is assumed to be logarithmically sampled, but its units are in angstroms.
- Args:
- wave (np.ndarray): Wavelength coordinates of each spectral
- channel in angstroms. It is expected that the spectrum has been sampled geometrically.
- log10 (bool): (Optional) Input spectrum has been sample
- geometrically using the base 10 logarithm, instead of the natural logarithm.
- Returns:
- float : Velocity scale of the spectrum in km/s.
-
firefly_instrument.
where_not
(indx, size)[source]¶ Return a tuple with the indices of a vector that were not selected by a call to `np.where`_. The function currently only works for 1D vectors.
- Args:
- indx (tuple): Tuple returned by a call to `np.where`_ for a
- 1D vector.
- size (int): Length of the original vector in the call to
- `np.where`_.
Warning
Performs no checks of the input.


A switch behaves like a checkbox - it can be on or off (i.e checked or unchecked) - and under the hood, that's exactly what it is. Whereas checkboxes are often used to allow multi-selection from a group of choices, switches are more often used in isolation or as a series of unrelated options.
REMEMBER: every switch requires a visible label! Please see the field module for details on labelling controls.


Houston.
Wordcount
(current)
Houston.
Wordcount
(current)
Put in the stuff man.
Enter code to count.
Minimum word length.
1
2
3
Submit


ipaddr.js is a small (1.9K minified and gzipped) library for manipulating IP addresses in JavaScript environments. It runs on both CommonJS runtimes (e.g. nodejs) and in a web browser.
ipaddr.js allows you to verify and parse string representation of an IP address, match it against a CIDR range or range list, determine if it falls into some reserved ranges (examples include loopback and private ranges), and convert between IPv4 and IPv4-mapped IPv6 addresses.
npm install ipaddr.js
or
bower install ipaddr.js
ipaddr.js defines one object in the global scope: ipaddr
. In CommonJS,
it is exported from the module:
var ipaddr = require('ipaddr.js');
The API consists of several global methods and two classes: ipaddr.IPv6 and ipaddr.IPv4.
There are three global methods defined: ipaddr.isValid
, ipaddr.parse
and
ipaddr.process
. All of them receive a string as a single parameter.
The ipaddr.isValid
method returns true
if the address is a valid IPv4 or
IPv6 address, and false
otherwise. It does not throw any exceptions.
The ipaddr.parse
method returns an object representing the IP address,
or throws an Error
if the passed string is not a valid representation of an
IP address.
The ipaddr.process
method works just like the ipaddr.parse
one, but it
automatically converts IPv4-mapped IPv6 addresses to their IPv4 couterparts
before returning. It is useful when you have a Node.js instance listening
on an IPv6 socket, and the net.ivp6.bindv6only
sysctl parameter (or its
equivalent on non-Linux OS) is set to 0. In this case, you can accept IPv4
connections on your IPv6-only socket, but the remote address will be mangled.
Use ipaddr.process
method to automatically demangle it.
Parsing methods return an object which descends from ipaddr.IPv6
or
ipaddr.IPv4
. These objects share some properties, but most of them differ.
One can determine the type of address by calling addr.kind()
. It will return
either "ipv6"
or "ipv4"
.
An address can be converted back to its string representation with addr.toString()
.
Note that this method:
A match(range, bits)
method can be used to check if the address falls into a
certain CIDR range.
Note that an address can be (obviously) matched only against an address of the same type.
For example:
var addr = ipaddr.parse("2001:db8:1234::1");
var range = ipaddr.parse("2001:db8::");
addr.match(range, 32); // => true
Alternatively, match
can also be called as match([range, bits])
. In this way,
it can be used together with the parseCIDR(string)
method, which parses an IP
address together with a CIDR range.
For example:
var addr = ipaddr.parse("2001:db8:1234::1");
addr.match(ipaddr.parseCIDR("2001:db8::/32")); // => true
A range()
method returns one of predefined names for several special ranges defined
by IP protocols. The exact names (and their respective CIDR ranges) can be looked up
in the source: IPv6 ranges and IPv4 ranges. Some common ones include "unicast"
(the default one) and "reserved"
.
You can match against your own range list by using
ipaddr.subnetMatch(address, rangeList, defaultName)
method. It can work with both
IPv6 and IPv4 addresses, and accepts a name-to-subnet map as the range list. For example:
var rangeList = {
documentationOnly: [ ipaddr.parse('2001:db8::'), 32 ],
tunnelProviders: [
[ ipaddr.parse('2001:470::'), 32 ], // he.net
[ ipaddr.parse('2001:5c0::'), 32 ] // freenet6
]
};
ipaddr.subnetMatch(ipaddr.parse('2001:470:8:66::1'), rangeList, 'unknown'); // => "he.net"
The addresses can be converted to their byte representation with toByteArray()
.
(Actually, JavaScript mostly does not know about byte buffers. They are emulated with
arrays of numbers, each in range of 0..255.)
var bytes = ipaddr.parse('2a00:1450:8007::68').toByteArray(); // ipv6.google.com
bytes // => [42, 0x00, 0x14, 0x50, 0x80, 0x07, 0x00, <zeroes...>, 0x00, 0x68 ]
The ipaddr.IPv4
and ipaddr.IPv6
objects have some methods defined, too. All of them
have the same interface for both protocols, and are similar to global methods.
ipaddr.IPvX.isValid(string)
can be used to check if the string is a valid address
for particular protocol, and ipaddr.IPvX.parse(string)
is the error-throwing parser.
Sometimes you will want to convert IPv6 not to a compact string representation (with
the ::
substitution); the toNormalizedString()
method will return an address where
all zeroes are explicit.
For example:
var addr = ipaddr.parse("2001:0db8::0001");
addr.toString(); // => "2001:db8::1"
addr.toNormalizedString(); // => "2001:db8:0:0:0:0:0:1"
The isIPv4MappedAddress()
method will return true
if this address is an IPv4-mapped
one, and toIPv4Address()
will return an IPv4 object address.
To access the underlying binary representation of the address, use addr.parts
.
var addr = ipaddr.parse("2001:db8:10::1234:DEAD");
addr.parts // => [0x2001, 0xdb8, 0x10, 0, 0, 0, 0x1234, 0xdead]
toIPv4MappedAddress()
will return a corresponding IPv4-mapped IPv6 address.
To access the underlying representation of the address, use addr.octets
.
var addr = ipaddr.parse("<IP_ADDRESS>");
addr.octets // => [192, 168, 1, 1]
prefixLengthFromSubnetMask()
will return a CIDR prefix length for a valid IPv4 netmask or
false if the netmask is not valid.
ipaddr.IPv4.parse('<IP_ADDRESS>').prefixLengthFromSubnetMask() == 28
ipaddr.IPv4.parse('<IP_ADDRESS>').prefixLengthFromSubnetMask() == null
IPv4 and IPv6 can be converted bidirectionally to and from network byte order (MSB) byte arrays.
The fromByteArray()
method will take an array and create an appropriate IPv4 or IPv6 object
if the input satisfies the requirements. For IPv4 it has to be an array of four 8-bit values,
while for IPv6 it has to be an array of sixteen 8-bit values.
For example:
var addr = ipaddr.fromByteArray([0x7f, 0, 0, 1]);
addr.toString(); // => "<IP_ADDRESS>"
or
var addr = ipaddr.fromByteArray([0x20, 1, 0xd, 0xb8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1])
addr.toString(); // => "2001:db8::1"
Both objects also offer a toByteArray()
method, which returns an array in network byte order (MSB).
For example:
var addr = ipaddr.parse("<IP_ADDRESS>");
addr.toByteArray(); // => [0x7f, 0, 0, 1]
or
var addr = ipaddr.parse("2001:db8::1");
addr.toByteArray(); // => [0x20, 1, 0xd, 0xb8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]


My name is Ahmad and I am from the nice city of Lahore in Pakistan. At the moment I am living in Germany. What I am doing here you ask? Well at the moment I am doing a Masters in Embedded Systems and almost finishing up my thesis which I am doing at Robert Bosch GmbH.
The topic of my thesis, in a broader sense, is related to software development practices for cloud native apps and service-oriented-architecture. For the thesis I am working towards developing a platform. The aim is that this platform can be used for inter-company software sharing, allowing different departments to share the tools and services with clients and colleagues, via simple API calls.
My interests range from software development and tinkering with technology just for the sake of it (I am an engineer so I can't help it). Painting is one of my favourite hobbies, in time I will try to add a section to the blog where I can share my "masterpieces", I already do it on Instagram but yeah I like showing them off ;). Apart from that I like playing a variety of sports, tennis and volleyball being at the top of the list, and I have been planning on learning to ski and swim but so far I have not gotten to that, fingers crossed for the future me learning these skills.
I always feel that describing yourself is one of the hard things that one could have to do in life. So in time I will update the section if something else comes to my mind ;) ciao for now!


FROM CATWALKS TO SIDEWALKS
SS18 photographed by
for
new york
Coach
Coach
photographed by
NEW YORK, 09.12.17
photographed by
NEW YORK, 09.12.17
GET INSPIRED
XXX
Latest and brighter
COMING SOON


No. 202 Along 503 road,
Sharada phase 2, Kano State. Nigeria.,
+2348098196780
+2347032200547
+2348034644860
+2348034964525
<EMAIL_ADDRESS><EMAIL_ADDRESS>sonvisage_ng@yahoo.com


|
PolyTycoon
1
UnityTransportTycoontypegame.
|
This controller handles the logic of a TransportVehicle. More...
Public Member Functions | |
| TransportVehicleController () | |
| ProductStorage | TransportStorage (ProductData productData) |
| The storage of a specified product More... | |
| IEnumerator | Load (TransportRouteElement transportRouteElement) |
| This function loads products from a IProductEmitter into the _transporterStorage. More... | |
| IEnumerator | Unload (TransportRouteElement transportRouteElement) |
| Product unloading logic - coroutine More... | |
Public Attributes | |
| List< ProductData > | LoadedProducts => new List<ProductData>(_transporterStorage.Keys) |
Properties | |
| string | VehicleName [get, set] |
| float | MaxSpeed = 2f [get, set] |
| int | CurrentCapacity = 0 [get] |
| int | MaxCapacity = 4 [get, set] |
| float | TransferTime = 1f [get, set] |
| int | TransferAmount = 1 [get, set] |
| Properties inherited from ITransport | |
| int | CurrentCapacity [get] |
| The current amount of products loaded More... | |
| int | MaxCapacity [get, set] |
| The maximum amount of products that can be loaded More... | |
| float | TransferTime [get, set] |
| Time it takes to transfer the TransferAmount of items More... | |
| int | TransferAmount [get, set] |
| Amount of items loaded in one timeslot More... | |
| List< ProductData > | LoadedProducts [get] |
| List of products that are currently in storage More... | |
This controller handles the logic of a TransportVehicle.
| TransportVehicleController.TransportVehicleController | ( | ) |
| IEnumerator TransportVehicleController.Load | ( | TransportRouteElement | transportRouteElement | ) |
This function loads products from a IProductEmitter into the _transporterStorage.
| transportRouteElement | The current TransportRouteElement that is used by the RouteMover. |
Implements ITransport.
| ProductStorage TransportVehicleController.TransportStorage | ( | ProductData | productData | ) |
The storage of a specified product
| productData | The specified product for getting the associated storage |
Implements ITransport.
| IEnumerator TransportVehicleController.Unload | ( | TransportRouteElement | transportRouteElement | ) |
Product unloading logic - coroutine
| transportRouteElement | The current element that contains the TransportRouteSetting. |
Implements ITransport.
| List<ProductData> TransportVehicleController.LoadedProducts => new List<ProductData>(_transporterStorage.Keys) |
|
get |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |


--- layout: post status: publish published: true title: I'm no longer defending Milton Bradley. author: display_name: Corey Fineran login: Corey email<EMAIL_ADDRESS>url: '' author_login: Corey author_email<EMAIL_ADDRESS>wordpress_id: 1490 wordpress_url: http://ivyenvy.com/?p=1490 date: '2009-09-20 18:04:10 +0000' date_gmt: '2009-09-21 00:04:10 +0000' categories: - Outfield - The Cubs - Cubs fans tags: - Cubs fans - Jim Hendry - Spring Training - Milton Bradley - New York - Philadelphia comments: - id: 842 author: Kurt author_email<EMAIL_ADDRESS>author_url: http:// date: '2009-09-20 18:37:14 +0000' date_gmt: '2009-09-21 00:37:14 +0000' content: 'This whole situation pisses me off and also makes me feel a little vindicated along with about 10 million other Cubs fans. Hendry made a huge mistake on this one. No hindsight needed... my mother could have seen this coming. 10 years, 7 teams.  Clearly they had the talent. This blog has often cited the fact that DeRosa is no longer a presence in the clubhouse as a detrimental factor to the team. Maybe Bradley is right. Maybe guys like Soriano with a "say die as soon as it gets tough" attitude have something to do with the fact that a team with such immense talent couldn''t come together and do something with a season in which there was very little competition in their division. Obviously Bradley has some issues, but you have to admit he gave it all on the field.' - id: 845 author: Kurt author_email<EMAIL_ADDRESS>author_url: http:// date: '2009-09-20 21:32:16 +0000' date_gmt: '2009-09-21 03:32:16 +0000' content: "There is an article on Cubs.com (http://chicago.cubs.mlb.com/news/article.jsp?ymd=20090920&content_id=7068578&vkey=news_chc&fext=.jsp&c_id=chc) that makes it pretty clear this suspension isn't just about Bradley's recent comments. Hendry has also shown in his statements that things have been happening all season and apparently been kept under wraps. Bradley's Chicago hatin' comments were the last straw. BTW, Derosa made $5.5 million this year and has 21 hr and 71 RBI all while adjusting to two new teams. Bradley, $10 million, 12 hr, 40 RBI and the Cubs still owe him $20 million.\r\n\r\nBaseball is all about paying for what could be. How about paying up for a guy who is a known entity and will do whatever you ask of him?\r\n\r\nOh, and why couldn't this happened on Friday so we had something to talk about on the podcast?" - id: 846 author: Andy author_email<EMAIL_ADDRESS>author_url: http://ivyenvy.com date: '2009-09-20 22:45:12 +0000' date_gmt: '2009-09-21 04:45:12 +0000' content: I was amazed at how none of the other players seem to have Bradley's back in that article you linked, Kurt. Well, not amazed, but I thought Bradley would at least have had one friend in the clubhouse. He was an island in there. That is crazy that he seemed to make no effort to make any friends. - id: 849 author: Tim author_email<EMAIL_ADDRESS>author_url: '' date: '2009-09-24 09:26:19 +0000' date_gmt: '2009-09-24 15:26:19 +0000' content: Ouch. Not sure what I did to deserve that quiet pot shot.. but I actually agree with everything you said, Corey.. I have tried hard to defend him all this year, but he's made it absolutely impossible.. ---
Ok, so I'm a little late to this party. I've defended him for the entire season for two reasons.
1. Milton Bradley has abilities. He's a good baseball player and he could contribute to the Cubs.
2.  We're talking exhibition while he was playing well.
The whole season, I was just thinking that if the fans could get off his back, Bradley would perform and feel at home. That's of course ignoring the elephant in the room. Bradley is a head-case and has, as far as I know, played in every city with a chip on his shoulder. This is no longer the "loveable losers". The days of "Yeah, they aren't that good and they have flaws, but gosh darnit, they're our guys and I'll stand by them" are over.
I can't defend him any longer. I can't defend a guy that criticizes an organization and fans that gave him a $30 million contract for being negative. This is not a principled stand against some evil corporation. This is a game. I can't defend a guy that claims this negativity is why the Cubs haven't won in 100 years. There are lots of fans of teams that are tough on their players. New York and Philadelphia come to mind. Last time I checked, they hadn't gone 100 years without winning. Maybe Tim could give us a Yankees fan's perspective.
 I'm done defending him. He crossed the line. There are rules, this isn't 'Nam. The Milton Bradley experiment has been a miserable failure and I would imagine we will eat a lot of that contract. And, we have mud on our faces.
This really is the perfect ending for this season. It's a fine example of the whole season. What a disaster! It sure feels like Hendry did more than "tinker" with last year's team, huh?


Ex-Twitter employee accused of spying for Saudi Arabia granted bond
SEATTLE: A U.S. judge on Friday said a former Twitter employee could be released on bond, with travel restrictions, while he awaits trial on U.S. charges of spying for Saudi Arabia.
Seattle Magistrate Judge Paula McCandlis said her decision to grant Ahmad Abouammo, 41, bond would go into effect at 4:30 p.m. (7:30 p.m. ET), unless federal prosecutors lodged an appeal.
If prosecutors appeal McCandlis' ruling, Abouammo will have to remain in detention until a district court judge considers her decision, defense lawyer Chris Black said.
Abouammo was indicted on spying charges along with Ali Alzabarah, 35, another former Twitter employer, and Ahmed Almutairi, 30, who worked for the Saudi royal family, according to a complaint filed against the three on Wednesday.
(Reporting by Eric Johnson; Writing by Andrew Hay; Editing by Sandra Maler)