Portal logon (manage.windowsazure.com)
Websites are great, easy and quick for development/test sites; web roles give more options for production sites.
If you use both, you may run into problems with Microsoft.WindowsAzure.ServiceRuntime.dll which is part of the SDK (C:\Program Files\Microsoft SDKs\Azure\.NET SDK\v2.5\ref\) and NOT in NuGet. Just change the assembly reference to Copy Local.
Configuring with domain names for websites and for web roles. Use a CNAME to map http://mysite/ to http://mysite.cloudapp.net/. If you use A records (eg for wildcard domains) the IP address may change!
Storage Tips
DefaultConnectionLimit
Connections to a storage endpoint are throttled to default 2. This obviously affects concurrency and scaling! See Understanding MaxServicePointIdleTime and DefaultConnectionLimit
ServicePointManager.DefaultConnectionLimit = 10;
In config:
<system.net>
<connectionManagement>
<add address="*" maxconnection="10" />
</connectionManagement>
</system.net>
Disable Nagling
The default Nagling algorithm delays sending TCP requests until enough data is available. Conversely, this is bad for small POSTs (<1kb). Disable it:
ServicePointManager.UseNagleAlgorithm = false;
Expect: 100-continue
By default, the webclient talking to storage endpoints sends an HTTP header "Expect: 100-continue" first, to check the POST will be accepted (e.g. authentication etc.); the server responds with 100, then the POST payload is sent. This behaviour is a problem with some non-azure endpoints (eg Twitter).
For lots of small posts, this is means more roundtrips. Remove it:
ServicePointManager.Expect100Continue = false;


Home
Gallery
Contact
Reach us
Get in touch us with
Our offices are located in Hurlingham Plaza, Nairobi
0721 763 272
Contact us
First name:
Last name:
Enter your email:


Goals
{{ this.title }} shares the design philosophy of all {{ bag('site', 'name') }}, being:
- Requirements that are driven by simplicity
- Extensibility and customisation by design
- Metadata that is human-editable and machine-usable
- Reuse of existing standard formats for data
- Language-, technology- and infrastructure-agnostic


OpenReplica is the easiest way to coordinate your distributed system!
OpenReplica provides availability, reliability and fault-tolerance in distributed systems. It is designed to maintain long-lived, critical state (such as configuration information) and to synchronize distributed components. It works as follows: you define a Python object that encapsulates the state you want replicated, along with methods that can update it, and can synchronize threads that access it. You give it to OpenReplica, your object gets geographically distributed automatically, and you receive a proxy through which multiple clients can access the replicated object transparently. To the rest of your application, your replicated object appears as a regular Python object when you use the provided proxy.
OpenReplica ensures that new object replicas are dynamically created to compensate for any node or network failures involving your nodes. Our current implementation executes replicas on PlanetLab hosts distributed at academic sites around the globe, on failure independent hosts. You could also use the code behind OpenReplica to deploy on other hosts, and integrate with DNS and Amazon Route 53.
OpenReplica is similar to services such as Google's Chubby and Yahoo's ZooKeeper, except for a critical difference: OpenReplica provides an object-oriented interface to applications. Overall, OpenReplica differs from existing systems in the following ways:
- High Performance: Coupled with the concurrent Paxos protocol our implementation uses, the object-based API obviates the need for costly serialization and achieves much higher performance than other systems.
- Dynamic Implementation: OpenReplica enables any server to be replaced at run-time. There are no statically designated servers, or configuration files -- any and all servers can be changed on the fly.
- DNS Integration: Clients locate the up-to-date replicas through DNS. OpenReplica enables you to run your own authoritative DNS server, or to use a subdomain under openreplica.org, or to use Amazon's Route 53.
- Easy to use: Smoothly integrates into your existing Python program, no external interfaces needed. Even complex coordination functionality, such as implementing synchronization objects like semaphores, is straight-forward.
How does OpenReplica work?
OpenReplica is powered by ConCoord, a novel coordination service that provides replication and synchronization support for large-scale distributed systems. ConCoord employs an object-oriented approach, in which the system actively creates and maintains live replicas for user-provided objects. Through ConCoord, the clients are able to access these replicated objects transparently as if they are local objects. The ConCoord approach proposes using these replicated objects to implement coordination constructs in large-scale distributed systems, in effect establishing a transparent way of providing a coordination service.
To support complex distributed synchronization constructs, ConCoord presents a novel mechanism that enables the replicated objects to control the execution flow of their clients, in essence providing blocking and non-blocking method invocations on a replicated object. ConCoord employs Paxos as the underlying consensus protocol to tolerate crash failures of hosts and the underlying network. To facilitate deployments in dynamic cloud environments, the implementation supports view changes, which permit any number of servers to be replaced at runtime. Integration with DNS enables clients to easily locate the most current set of replicas.


|
Arduino A2DP
|
Keeps the audio data as is -> no volume control! More...
#include <VolumeControl.h>
Public Member Functions | |
| virtual void | update_audio_data (Frame *data, uint16_t frameCount, uint8_t volume, bool mono_downmix, bool ivolume_used) |
| virtual int32_t | get_volume_factor (uint8_t volume) |
| not used More... | |
| virtual int32_t | get_volume_factor_max () |
| not used More... | |
Keeps the audio data as is -> no volume control!
|
inlinevirtual |
not used
Implements VolumeControl.
|
inlinevirtual |
not used
Implements VolumeControl.
|
inlinevirtual |
Reimplemented from VolumeControl.


Calculating Phasor Quantities with HP 50g Calculator
(Spring - 2015)
Adding ->V2, RECT and CYLIN to soft menu
- We often need to convert between rectangular and polar form. Lets add these commands to the CUSTOM softmenu.
- V2 builds a two-dimensional vector using the first two stack values and builds in polar/rectangular depending on mode.
- RECT and CYLIN don't convert the first stack value as I thought they did, but instead set the coordinate mode.
- Source from HP Forum
- invoke: [white] [mode=>custom] # to open custom softmenu
- invoke: {->V2 RECT CYLIN} [enter] MENU [enter] # caps values can be fetched from the [CAT]alog
- In words, put the ->V2, RECT and CYLIN commands in curly brackets, then call the MENU command.
Entering complex values, the hard way
- Make sure complex mode is on
- For rectangular values, enter between round parenthesis with a space. ie 5+j3 would be (5 3)
- For polar values, enter between round parenthesis spaced with angle symbol ([alpha][red][6]). ie 5 at 30 degrees would be (5<30)
Entering complex values, better
- Make sure complex mode is on, otherwise ->V2 will just build a regular vector. With complex mode, it still looks just like a regular vector but the j is implied.
- As described above, setup a custom softmenu with the ->V2, RECT and CYLIN/POLAR functions.
- For rectangular values, switch to rectangular coordinate system, put your two components on the stack, and ->V2
- For polar values, switch to polar system, put r and angle on the stack, then ->V2
- To switch your answer between the two, you can just switch coordinate systems. All complex values are stored in rectangular form and displayed according to the chosen system.


Every time the script is executed it is always compiled into an assembly and after that the assembly is loaded to a particular AppDomain for further execution. Once assembly is loaded it cannot be unloaded any more. This is the limitation of CLR, which is important to remember when hosting the script engine.
In fact the script engine itself has to handle this problem as well (e.g. when executing the script from command prompt) . It does this by relying on the fact that it is possible to unload the entire AppDomain with all loaded assembles.
The script-assembly (compiled script) is never loaded into current AppDomain. Instead, the new temporary AppDomain is created and the assembly is loaded into it. After execution the temporary AppDomain is unloaded. Thus, it is possible for the script engine to clear (delete) the script assembly when not needed (which otherwise would be locked until the script process is completed). The only exclusion from this rule is when the script is executed with /c switch or CleanupShellCommand in configuration is set. In this case script-assembly is loaded into current AppDomain because there is no need to do any cleanup.
AsmHelper class, which assists with assembly loading and browsing, supports two assembly loading modes:
Local
AsmHelper instance has to be created with a constructor receiving the
already loaded assembly (e.g. to the current AppDomain) as a parameter.
It will use this assembly for further method invocations.
Remote
AsmHelper instance has to be created with a constructor receiving the
assembly file name as a parameter. It would create temporary AppDomain
and load the assembly file into it during the first call to the
assembly method. When AsmHelper instance is disposed the temporary
AppDomain is unloaded.
While the functionality of the AsmHelper class in the local mode
is very simple the remote mode is more interesting as it can be quite
useful for working with dynamic assemblies even outside of the script
related tasks.
The tutorial Text Processor shows how to use both Local and Remote script-assembly loading techniques.
Reference | Tutorial (Text Processor)


Course Number
Course Title
Semester Taken
For Credit
6.813
User Interface Design
Spring 2014
6.034
Artificial Intelligence
Fall 2013
6.066
Introdction to Algorthms
Fall 2013
Listener
6.867
Database systems
Fall 2013
6.830
Machine Learning
Fall 2012


This is a keyboard that reproduce sound when you press the keys of your keyboard, it goues from C with the key "º" to G# with the key "-"
This is a git excersice


Planning
Easily map out the processing tools and flow you'll use to accomplish your goals. Jot down the activity you're planning on each card. Erase or reorder — flexibility on demand.
60 processing tools for facilitation planning, responding to the needs of your group, and improvising when the unexpected happens. Funded on Kickstarter by 359 absolutely amazing facilitators.
Facilitator Cards are helpful throughout the entire facilitation process. From long before you get in the room, until you're packing up your supplies and giving hugs & high-fives on the way out.
Easily map out the processing tools and flow you'll use to accomplish your goals. Jot down the activity you're planning on each card. Erase or reorder — flexibility on demand.
When a new need presents itself during a facilitation, choose from your remaining cards to react accordingly. Give your group the power to help steer the ship.
Have an hour left that you weren't expecting? Did your ideation activity fall flat on its face? No worries! Shuffle the deck. Choose another card.
Sharing a common language and a comprehensive set of tools, you can seamlessly work alongside other facilitators. Whether it's your first time teaming up or the thousandth.
The deck is stacked with processing tools for evoking emotions & thoughts, brainstorming new ideas, clarifying a concept, and making decisions. Mix up how you're engaging a group toward those goals throughout a facilitation. Stop the broken record of "Why don't we just go around the circle and hear from everyone?"
Surfacing thoughts, feelings, reactions, and predispositions
Forming, generating, and brainstorming ideas and concepts
Distilling, pinpointing, getting to the bottom, finding common ground
Decision-making, planning, strategizing, directing
Every deck comes with facilitation guides, an e-book, files for printing, a set of facilitator icons, access to a community of facilitators — and more! As we make 'em, you get 'em.


Cart
These are all the products that you have in ordered.
No.
Product
Image
Vat (15%)
Price
There are no items in your cart.


Type [class][api.type.class] Library together.* Revision Current Public Version Keywords TogetherUserMessage Sample code github samples
The UserMessage class represents a message sent directly to a User's account.
The ID of the UserMessage.
The ID of the User that sent the UserMessage. If 0, the UserMessage should be treated as a system message.
The ID of the User the UserMessage was sent to.
The Name of the User that sent the UserMessage.
The Name of the User that the UserMessage was sent to.
A boolean indicating whether the UserMessage is not meant for a specific Game only.
The title of the UserMessage.
The textual (message) of the UserMessage.
A boolean indicating whether the UserMessage was read.
The number of seconds since the UserMessage was created.
The number of seconds since the UserMessage was last modified.
The number of seconds since the User the UserMessage was sent to has been active in a together Game.
The ID of the Client the User the UserMessage was sent to has last played a Game with.
The ID of the Game the User the UserMessage was sent to has last played.
The ID of the Platform of the last played Game for the User the UserMessage was sent to.
The number of seconds since the User that sent the UserMessage has been active in a together Game.
The ID of the Client the User that sent the UserMessage has last played a Game with.
The ID of the Game the User that sent the UserMessage has last played.
The ID of the Platform of the last played Game for the User that sent the UserMessage.
A property collection containing all custom properties for the UserMessage.


Chocolate Pizza
POSTED ON 15 DEC 2013 / DESSERTS
For the fig-swirl: Melt butter over medium heat in a saucepan. Add brown sugar and stir to dissolve. Halve all of the figs and toss in the saucepan with water and lemon juice. Cook over medium heat, stirring frequently, until you have a chunky-jammy mixture. Add salt with one or two stirs, set aside and let cool completely.
Ice cream: In a small pot over medium heat, combine milk, and granulated sugar until sugar is completely dissolved and the milk is just barely lukewarm. Whisk in the egg yolks. Set mixture in the fridge and wait until the fig mixture is cooled.
Using an ice cream machine, pour liquids into the frozen basin and process according to manufacturer instructions, i.e., let spin and thicken for 20 minutes before adding mascarpone, fig jam mixture, and the nuts. Continue to process for +/- 10 minutes. Pour semi-frozen mixture into a pyrex dish or glass tupperware. Freeze for at least two hours before serving.
Vanessa Stevenson |
Food enthusiat, photography fan. Add a pinch of raw foodism and that's pretty much who I am. |


'Great player' - Nottingham Forest fans issue transfer statement after Jack Colback development
Nottingham Forest transfer news | Jack Colback's Newcastle future looks decidedly bleak as the winter transfer window edges closer, and Reds fans have been having their say
by Mark WakefieldNottingham Forest fans have been reacting to the rumour that Jack Colback’s contract at Newcastle United could be terminated.
Colback had two loan spells at the City Ground, where he made 55 appearances for the Reds.
He returned to Newcastle in the summer, but was left out of Steve Bruce’s 25-man Premier League squad at St James’ Park.
It had been expected Colback would return to the City Ground, where he made himself a firm fans favourite, but following the arrival of Sabri Lamouchi the Reds opted against bringing the 28-year-old back to Nottingham.
Colback’s deal on Tyneside ends in the summer, and reports claim Newcastle could end his deal prematurely in a bid to free up valuable space on wage bill ahead of the transfer window opening.
After the rumour surfaced, Forest fans have been having their say on whether they would welcome back the Reds’ former loan star.
Here is a selection of what they had to say.
Nottingham Forest latest
This is your round up of all things Forest; the one-stop shop that will keep you updated on the latest goings on at the City Ground and beyond.
Transfers, injuries, match-days and managers, we’ve got you covered.
We’ll be bringing the very latest on the Reds throughout the week and around the clock.
Make sure you keep yourself updated with our handy daily catch up...
Must reads...
- Everton could cool Matty Cash 'interest'
- Boro dealt big blow ahead of Reds clash
- Future of ex-Forest loanee Jack Colback in doubt
- Newcastle slap 'ridiculous' price tag on Reds target
For all your latest NFFC news, opinion, analysis and transfer gossip, click here
You can follow our Reds reporter Sarah Clapson on Twitter, and her email address is<EMAIL_ADDRESS>Andy Draper: “Would welcome him back, great player.”
James Stringer: “He won’t be coming here, more likely to go back to Sunderland!”
Forestkev: “They say never go back. I think we have better now.”
Jamie Allen: “So? Don’t need him.”
Phil Jones: “Class act. 100%.”
Boanoite: “Why on earth should anyone want Colback back now? Bostock and Mir may well return to their parent clubs but Colback is NOT needed-a striker, a goal scoring wide player and a goal scoring creative midfielder are all required, none of which describes Colback.”
Mark Walden: “We don’t need him!”


Note: The once & asyncOnce deferred is only called once, where as the normal deferred is called each time the fork is called. With this in mind each resulting string for normal deferred is then different.


Welcome to the WineNot portal! Using this portal you can check the authenticity of your rare and collectible wines!
Image:
Note: Pinata requests are done locally via your browser. Your keys are not shared with any party except Pinata.
Check to Open Source


Researchers frequently need to explore the effects of certain data characteristics on their models. To help construct datasets exhibiting specific properties, such as autocorrelation or degree disparity, Proximity can generate synthetic data having one of several types of graph structure:
random graphs
independent and identically distributed (i.i.d.) connected components
lattice graphs having a ring structure
lattice graphs having a grid structure
forest fire graphs
cluster graphs with nodes arranged in separate clusters (cliques)
In all cases, the data generation process follows the same process:
Generate the empty graph structure.
Generate attribute values based on user-supplied prior probabilities.
Because the attribute values of one object may depend on the attribute values of related objects, the attribute generation process assigns values collectively.
Details for each of these steps are presented in the context of a script that generates i.i.d. data, shown below.
The i.i.d. graph generation process creates a set of independent
connected components
containing two object types:
S
and T. Each component contains a single
S object that is linked to a variable
number (
We typically consider the S objects to be the target objects to be classified, with the T objects used as peripheral objects during classification. Each S object is assigned a single, discrete attribute (s_class_label in this example) that can be used as a class label. In order to generate datasets with degree disparity, the assignment of class labels is conditioned on the degree of the object in the graph. The generation process can also add additional discrete attributes to the S and T objects, respectively.
The following script creates four connected components using two
different degree distributions. Both S and
T objects are given one additional
attribute each (s_attr0_label and
t_attr1_label, respectively).
These attribute values are conditioned by the models in
s-attr-rpt.xml
and
t-attr-rpt.xml
.


Battleship Antarctica
Battleship Antarctica is a 2D arcade-style shooter game written in Java. Players control battleships fighting amongst the icecaps of Antarctica, aiming to be the last one standing. Pickups are available to alter gameplay in various ways.
The game was developed as part of a team project in my second year of uni. It features a custom built rendering and physics engine, procedural terrain generation using Perlin noise, and supports singleplayer and multiplayer modes.
The game can be downloaded as a JAR file below.
Download


https://github.com/rapid7/meterpreter/blob/master/source/extensions/priv/server/elevate/namedpipe.c
/*
* Worker thread for named pipe impersonation. Creates a named pipe and impersonates
* the first client which connects to it.
*/
Creates a named pipe for the client service to connect to:
hServerPipe = CreateNamedPipe( cpServicePipe, PIPE_ACCESS_DUPLEX, PIPE_TYPE_MESSAGE|PIPE_WAIT, 2, 0, 0, 0, NULL );
Wait for the client to connect to the named pipe
Read the pipe
Impersonate the client
Set the merterpreters thread token to that of the system token so all subsequent meterpreter threads use it
/*
* Elevate from local admin to local system via Named Pipe Impersonation. We spawn a cmd.exe under local
* system which then connects to our named pipe and we impersonate this client. This can be done by an
* Administrator without the need for SeDebugPrivilege. Works on 2000, XP, 2003 and 2008 for all local
* administrators. On Vista and 7 it will only work if the host process has been elevated through UAC
* first. Does not work on NT4.
*/
Filter out Windows NT4 (not supported)
spawn cmd as SYSTEM
cmd.exe /c echo data to pipe
Start the elevator service
Impersonate SYSTEM


{% extends 'base.html' %} {% block title %}Parsifal{% endblock title %} {% block content %}
An email has been sent to the given address. To continue the password reset process please follow the instructions in this email.
If you have any problem with the password reset, please contact us at<EMAIL_ADDRESS>{% endblock content %}


Chile finance minister warns of job losses, rising fuel costs amid unrest: reports
SANTIAGO (Reuters) - Chile’s finance minister warned as many as 300,000 jobs could be lost as the impacts of weeks of rioting hammer one of Latin America’s strongest economies, according to a report in business journal Diario Financiero.
Newly appointed Finance Minister Ignacio Briones told a legislative committee it was “highly likely” unemployment would jump 3% in the coming months.
“It’s obvious to anyone that a country that is operating at half speed is also generating employment at half speed,” he said.
Ongoing rallies, looting and arson have killed more than 20 people, sent the peso spiraling downwards against the dollar and wrought billions of dollars in damages in recent weeks. Many businesses have been shuttered for nearly a month and vandals have hobbled public transportation in Santiago, a city of 6 million.
Center-right President Sebastian Pinera has presented a raft of social and economic reforms to quell the demands of protesters, including boosting the wages of the lowest earners.
But Briones said boosting the minimum wage would worsen the situation. “The worst thing you can do is to raise the minimum wage by 20%,” Briones said, according to the report.
The falling peso, which hit an historic low on Thursday, raised the specter of a hike in fuel costs, Briones said. Chile imports almost all of the fossil fuels it consumes.
“Fuel prices are going to rise, it can’t be any other way,” Briones told reporters on Thursday.
Briones also warned of a “technical recession” in 2020, according to the newspaper.
“We cannot discard that scenario,” he said. “The situation is dramatic.”


"I Like Skyrim"-Isaac Hall/2019
Making A Difference
Ocean Cleaning
Alex Schulze and Andrew Cooper are two surfers who founded 4Ocean when they were on a surfing trip and realized the amount of pollution that was washing up on beautful beaches around the US and Australia. They started collecting plastic from the ocean with fleats of ships around the world and sell wrist bands made out of the material.
Electric Cars
Well would it really be a project with me without a mention of Tesla? The company was setup in the early 2000's and was joined by Elon Musk shortly after its founding. Its aim was to build a fully electric car much better than the ones that were availible, they also wanted to make it commercially availible. To date Teslas are sold worldwide and help stop the spread of fossil fuels.
Activist Organization
Greenpeace is a non-governmental environmental organization with offices in over 39 countries and with an international coordinating body in Amsterdam, the Netherlands. Greenpeace was founded in 1971 by Irving Stowe and Dorothy Stowe, Canadian and US ex-pat environmental activists.
 Thank you!


I get to hear that a lot: that LOCK TABLES with MyISAM is some sort of replacement for transactions; some model we can work with which gives us 'transactional flavor'.
It isn't, and here's why.
When we speak of a transactional database/engine, we check out its ACID compliance. Let's break out the ACID and see what LOCK TABLES provides us with:
- A: Atomicity. MyISAM does not provide atomicity. If we have LOCK TABLES followed by two statements, then closed by UNLOCK TABLES, then it follows that a crash between the two statements will have the first one applied, the second one not not applied. No mechanism ensures an "all or nothing" behavior.
- C: Consistency. An error in a statement would roll back the entire transaction in a transactional database. This won't work on MyISAM: every statement is "committed" immediately.
- I: Isolation. Without LCOK TABLES, working with MyISAM resembles using the read uncommitted, or dirty read isolation level. With LOCK TABLES - it depends. If you were to use LOCK TABLES ... WRITE on all tables in all statements, you would get the serializable isolation level. Actually it would be more than serializable. It would be truely serial.
- D: Durability. Did the INSERT succeed? And did the power went down just after? MyISAM provides not guarantees that the data will be there.
So of all ACID properties, the only thing we could get is a serializable isolation level, and that, too, only if we used LOCK TABLES ... WRITE practically everywhere.
Where does the notion come from, then?
There's one thing which LOCK TABLES does help us with: race conditions. It effectively creates a mutex block. The same effect could be achieved when using GET_LOCK() and RELEASE_LOCK(). Perhaps this is the source of confusion.
comments powered by Disqus


✨ Welcome!
Before you can start viewing Dat sites with this extension you must first install
the companion desktop app
, if you haven't already.
Then once it's installed and running, click this
test dat site link
to see if it works.


--- layout: post title: IntelliJ IDEA 13 SBT support date: '2014-07-15T03:55:00.000-07:00' tags: - intellij - scala modified_time: '2014-07-16T02:17:32.962-07:00' blogger_id: tag:blogger.com,1999:blog-1529483519632285628.post-3118036763604934582 blogger_orig_url: http://dogtyped.blogspot.com/2014/07/intellij-idea-13-sbt-support.html ---
I was toying around with a multi project SBT file and the new IntelliJ 13 SBT support. It turns out that it has a lot of trouble with multi project setups. When adding projects and renaming them IntelliJ gets really confused and you end up with projects having the wrong name and some residual artifact projects in your project. I managed to get things to work again by closing IntelliJ and running the following in my project root:
{% highlight bash %} find . -name ".idea" -type d -exec rm -r {} + {% endhighlight %}


|
MRCEditor
1.0
This is a gui program used to viewing, marking and rendering mrc file.
|
This is a class used to view marks in a tree view, mark and mesh information. More...
#include <marktreeviewwidget.h>
Public Member Functions | |
| MarkManager (QWidget *parent=nullptr) | |
| Construct a mark manager widget. More... | |
| void | setMarkModel (MarkModel *model) |
| Set new model model to the widget. More... | |
This is a class used to view marks in a tree view, mark and mesh information.
| MarkManager::MarkManager | ( | QWidget * | parent = nullptr | ) |
Construct a mark manager widget.
| void MarkManager::setMarkModel | ( | MarkModel * | model | ) |
Set new model model to the widget.
If the old model is the same as the new one, nothing will be done.
| model |


|
Withering
|
Class for managing the game. More...
Public Member Functions | |
| void | SavePlayer () |
| Instructs the SaveSystem to save the player. More... | |
| void | LoadPlayer () |
| Load the player information into the player object. More... | |
| void | DestroyThis () |
| Destroys this Game object. More... | |
| void | EndGame () |
| Begins a different cutscene depending on the level. More... | |
| void | ReturnToTitleScreen () |
| Quit the game. More... | |
Static Public Member Functions | |
| static void | BeginNewGameFromForest () |
| Initiate the new game. More... | |
| static int | GetCurrentSceneIndex () |
| Gets the build index of the current scene the player is currently in. More... | |
| static void | ChangeScenes (string nextScene, Vector3 spawnPoint) |
| Changes the scene, warps the player to the spawnPoint and sets the cameras location accordingly. More... | |
Public Attributes | |
| bool | inGame = false |
| Check for if the player is in game (excluding title menu and cutscenes). More... | |
Static Public Attributes | |
| static GameManager | instance |
| Singleton instance of the GameManager. More... | |
| static Vector3 | lastSavedSpawnPoint |
| Stores the last location of the Player. More... | |
| static List< string > | nonMonsterAreas = new List<string> () |
| List of all areas that do not contain monsters. More... | |
Private Member Functions | |
| void | Awake () |
Class for managing the game.
Contains methods for saving and load the game and changing scenes.
|
private |
|
static |
Initiate the new game.
|
static |
Changes the scene, warps the player to the spawnPoint and sets the cameras location accordingly.
Battle arena changes depeding on what the nextScene is.
| nextScene | The name of the next scene to load. |
| spawnPoint | The Location for the player to spawn at. |
| void GameManager.DestroyThis | ( | ) |
Destroys this Game object.
| void GameManager.EndGame | ( | ) |
Begins a different cutscene depending on the level.
|
static |
Gets the build index of the current scene the player is currently in.
| void GameManager.LoadPlayer | ( | ) |
Load the player information into the player object.
| void GameManager.ReturnToTitleScreen | ( | ) |
Quit the game.
| void GameManager.SavePlayer | ( | ) |
Instructs the SaveSystem to save the player.
| bool GameManager.inGame = false |
Check for if the player is in game (excluding title menu and cutscenes).
|
static |
Singleton instance of the GameManager.
|
static |
Stores the last location of the Player.
|
static |
List of all areas that do not contain monsters.


ANSI Terminal words¶
These are a number of word used to manage interaction with ANSI terminals. Note that no other terminals are supported.
ansi-term
¶
The following words are in ansi-term
:
escape
¶
( – b )
The escape character.
(dec.)
¶
( n – )
Output a decimal number without any padding.
csi
¶
( – )
Output the CSI sequence.
show-cursor
¶
( – )
Show the cursor. Note that multiple show-cursor
and hide-cursor
pairs can be nested.
hide-cursor
¶
( – )
Show the cursor. Note that multiple show-cursor
and hide-cursor
pairs can be nested.
save-cursor
¶
( – )
Save the cursor position. Note that save-cursor
/ restore-cursor
pairs cannot be nested.
restore-cursor
¶
( – )
Restore the cursor position. Note that save-cursor
/ restore-cursor
pairs cannot be nested.
scroll-up
¶
( lines – )
Scroll up the screen by a given number of lines.
go-to-coord
¶
( row column – )
Go to the specified row and column (each starting from zero).
erase-end-of-line
¶
( – )
Erase from the cursor to the end of the current line.
erase-down
¶
( – )
Erase the lines below the current line.
query-cursor-position
¶
( – )
Output the sequence to query the cursor position. Note that this is used by get-cursor-position
and is not intended for use by the user.
execute-hide-cursor
¶
( xt – )
Hide the cursor, execute the given xt, then show the cursor. Note that calls to this can be nested. Also note that exceptions that occur within the xt will cause the cursor to be shown, if appropriate, again before the exceptions are re-raised.
clear-key
¶
( – )
Clear the saved input byte.
get-key
¶
( – b )
If there is a saved input byte, return it, clearing it in the process, otherwise get an input byte from the console.
set-key
¶
( b – )
Save an input byte, overwriting any which has already been saved.
wait-number
¶
( – n matches )
Attempt to read a number from the console, returning it and true if a parseable number is found, otherwise returning 0 and false.
wait-char
¶
( b – )
Wait for the given byte to be inputted from the console.
expect-char
¶
( b – flag )
Wait for a byte to be inputted from the console; if it is the given byte, drop it and return true, else save it and return false.
get-cursor-position
¶
( – row column )
Get the current cursor position.
execute-preserve-cursor
¶
( xt – )
Save the cursor position, execute the given xt, then restore the cursor position. Note that calls to this can be nested. Also note that exceptions that occur within the xt will cause the cursor position to be restored before the exceptions are re-raised.
get-terminal-size
¶
( – rows columns )
Get the terminal size in rows and columns.
reset-ansi-term
¶
Reset the state of the ANSI terminal. Note that if the cursor is currently hidden, it will not show it automatically.


| DOSE: |
|
oral |
Alcohol |
(liquid) |
| |
|
|
Various |
|
As a former alcohol abuser, I thought I'd do a short writeup on the varying effects of different psychedelics when combined with alcohol, along with some warnings and good combinations. Effects varied from great to horrible, generally relating to the order in which the two were ingested. I have quit drinking but this information may be useful to those who drink. I generally prefer the effects of these substances when taken alone but all of these have been tried at varying times. YMMV.
LSD + Alcohol - LSD tends to override the effects of even large amounts of alcohol almost completely, regardless of the order in which they are taken. This becomes a problem, because mass quantities can be consumed and the effects will not be noted until the LSD is wearing off and my head feels like its been beaten about by a crew of LA police officers for a good part of the evening. I found it very easy to drink more than necessary or more than I wanted to on this combo. Not recommended.
Psylocybin + Alcohol - Fine to mix in small amounts, better if the mushrooms are consumed first. Still easy to gauge the level of alcohol intoxication, sort of a synergy with the body buzz and mental is affected by the alcohol less than usual, but still noticeable. Ok with a beer or two, no need or real desire to drink more than that. GI problems usually noted.
2C-T-x + Alcohol - Unknown safety. Alcohol is felt but functions remain. Almost guaranteed vomiting if alcohol is consumed prior to ingestion of the 2C-T-x, some GI distress. These do not seem to mix very well at all. Drinking late in the trip (T+8h or so depending on the chemical) is ok, but not something I'd repeat. Drinking before can cause some seriously bad bodily feelings lasting hours into the trip, even with minor (1 beer) amounts of alcohol. 2C-T-2 never causes vomiting or nausea for me normally, did in the case of 1 beer beforehand. 2C-T-21 caused 6 hours of a horrible sick feeling and lack of energy / near catatonia when ingested after 3 drinks. Not recommended.
2C-I + Alcohol - Only tried late in the trip, not something I would repeat. Predict similar reaction as 2C-T-xs if drinking beforehand.
2C-E + Alcohol - Similar to 2C-T-21. Light drinking beforehand, severe nausea but no vomiting, hours of feeling very ill which evolved into an extreme paranoia and fear during the peak, recovered slowly afterwards. Low dose 2C-E with alcohol consumed afterwards (T+4) was ok, but not good.
Ketamine + Alcohol - Vaguely recall. Dizziness and vertigo, would not repeat. Similar stories from everyone else I've talked to.
MDMA + Alcohol - Good if low amounts of alcohol are consumed after the trip starts, especially as the peak starts wearing down as they can bring it back up for a short duration. Easy to drink too much and completely override the MDMA effects. MDMA 'hangover' is much worsened with small amounts, but this isn't a bad combo as long as one remembers to drink enough water. Could be dangerous otherwise.
Methylone + Alcohol - Even large amounts do not seem to affect the empathic push of this substance, but strange 'stuttering' of memory was noted although not that much alcohol had been consumed. Would be nice if it wasn't for this, might be better in a private environment, but is probably better alone. Same hydration advice applies, probably not too great on the body.
Salvia Divinorum + Alcohol - Anesthetic effect during peak is increased greatly enough to make this pointless. Ego reintegration is much more confusing, not recommended.
These are all that have been tried at some point. Generally the alcohol amounts are around 2-3 beers max, although noted exceptions are the Methylone (ingested 180mg Methylone after 2nd beer, continued drinking beer and water for remainder of the night with no decrease in effects but various short periods of memory loss), and LSD (drank heavily a few times on it and didn't realize it until the next morning). The general trend has been that the tryptamines tend to be ok, or even kind of good in the case of mushrooms with low amounts, phens just shouldn't be combined with alcohol at all, and the MDxxs are kind of iffy.
Be careful and keep your water intake on par with your alcohol intake, and watch for signs of dehydration. Alcohol and psychedelics are on the opposite ends of the good/evil spectrum in my opinion and probably shouldn't be mixed, but some like to drink, as I did, and you may find this useful.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


News from FSAE Italy:we are proud to announce that Race Up electric division has won in class 3 of Formula SAE Italy
These are just the first images from the Electric event … stay tuned for more!


Buttons can be created with one of several markup elements, although <button>
is most appropriate. Just add the ink-button
class to get the button layout and then use an utility class to give it a specific meaning.
| Class name | Description |
|---|---|
ink-button |
Buttons root class. |
blue green orange red black
|
Defines the button theme. |
button-group |
Defines a wrapper to build a button group. Used with a <div> element. |
button-toolbar |
Defines a wrapper to build a button toolbar. Used with a <div> element. |
Example


2 references to ResolvePath
System.Management.Automation (2)
help\SaveHelpCommand.cs (1)
249
foreach (string tempPath in
ResolvePath
(destPath, false, false))
help\UpdateHelpCommand.cs (1)
281
foreach (string tempPath in
ResolvePath
(sourcePath, _recurse, _isLiteralPath))


synth-kit
Synthesizers construction kit for Web Audio API
Work in progress
A collection of ready-to-use Web Audio instruments:
import { Kick } from 'synth-kit'
const ac = new AudioContext()
// create a Kick instrument and connect it to the audio context destination
const kick = Kick(ac).connect(true)
// trigger the kick
kick.trigger()
SynthKit
Percussion instruments
Melodic instruments
Effects
Components
Usage
Create instruments
Just call the function with an audio context. The connect
function is chainable and accepts true
to connect to the AudioContext's destination:
import { MonoSynth } from 'synth-kit'
const mono = MonoSynth(ac).connect(true)
// trigger signature for melodic instruments: (midi, time, duration)
mono.trigger(440, ac.currentTime, 0.5)
mono.trigger(62, ac.currentTime + 1, 0.5)
Trigger
Trigger the attack/release envelope of an instrument with the trigger
function:
import { Snare } from 'synth-kit'
const snare = Snare(ac).connect(true)
snare.trigger()
Perussion instruments accept time
as trigger
arguments:
snare.trigger(ac.currentTime + 1)
Melodic instruments accept frequency, time, duration
as trigger
arguments:
import { MonoSynth } from 'synth-kit'
const mono = MonoSynth(ac).connect(true)
mono.trigger(440, ac.currentTime, 0.5)
Re-triggerable
You can trigger an instrument any number of times:
mono.trigger(440, ac.currentTime, 0.5)
mono.trigger(880, ac.currentTime + 1, 0.5)
You can use Sample
to get a re-triggerable buffer source:
import { Sample } from 'synth-kit'
fetch("snare.wav").then(decodeAudioData).then(buffer => {
sample = Sample(ac, buffer)
sample.trigger()
sample.trigger(ac.currentTime + 1)
})
Attack/release
Using a melodic instrument, you can trigger the attack and release phases at different moments:
const triggerRelease = mono.trigger(440, ac.currentTime)
triggerRelease(ac.currentTime + 1)
Polyphony
All instruments are monophonic by default. You can create a polyphonic instrument with polyphonc
function:
import { DuoSynth, polyphonic } from 'synth-kit'
const synth = polyphonic(ac, 16, DuoSynth)
const freqs = [400, 500, 600, 700]
freqs.forEach((note, i) => synth.trigger(note, ac.currentTime + i))
Update parameters
All instruments have an update
function:
const duo = DuoSynth(ac)
duo.update({
filter: {
frequency: 800
},
amp: {
gain: 0.5
}
})
duo.trigger(440)
And an inspect
function:
console.log(duo.inspect())
// console.log output:
{
osc1: {
frequency: 440,
...
},
osc2: {
frequency: 880,
...
},
filter: {
...
},
amp: {
gain: 0.6
}
}
For fine-grained control, use the audio nodes directly:
const duo = DuoSynth(ac)
duo.filter.frequency.linearRampToValueAtTime(600, ac.currentTime + 1)
References
- Of course, the synth secrets tutorial was the beginning of all: https://github.com/micjamking/synth-secrets (that's a easy to read version). Thanks Gordon Reid (here it is an awesome PDF version)
- Vincent made some nice 808 drum synsthesis: https://github.com/vincentriemer/io-808
- Percussion synthesis tutorial: http://www.cim.mcgill.ca/~clark/nordmodularbook/nm_percussion.html
- Sound Design in Web Audio its an awesome two part blog post: http://nickwritesablog.com/sound-design-in-web-audio-neurofunk-bass-part-1/ and http://nickwritesablog.com/sound-design-in-web-audio-neurofunk-bass-part-2/
- There are a lot of resources about synthesis, here is a nice one: https://www.gearslutz.com/board/electronic-music-instruments-electronic-music-production/460283-how-do-you-synthesize-808-ish-drums.html
License
MIT License


The Adventures of Huckleberry Finn
by Mark Twain
“Chapter 30”
Additional Information
- Year Published: 1884
- Language: English
- Country of Origin: United States of America
- Source: Twain, M. (1884). The Adventures of Huckleberry Finn Charles L. Webster And Company.
-
Readability:
- Flesch–Kincaid Level: 10.2
- Word Count: 1,423
- Genre: Adventure
- Keywords: 19th century literature, american literature, mark twain, samuel clemens, southern authors
- ✎ Cite This
Downloads
WHEN they got aboard the king went for me, and shook me by the collar, and says:
“Tryin’ to give us the slip, was ye, you pup! Tired of our company, hey?”
I says:
“No, your majesty, we warn’t – PLEASE don’t, your majesty!”
“Quick, then, and tell us what WAS your idea, or I’ll shake the insides out o’ you!”
“Honest, I’ll tell you everything just as it happened, your majesty. The man that had a-holt of me was very good to me, and kept saying he had a boy about as big as me that died last year, and he was sorry to see a boy in such a dangerous fix; and when they was all took by surprise by finding the gold, and made a rush for the coffin, he lets go of me and whispers, ‘Heel it now, or they’ll hang ye, sure!’ and I lit out. It didn’t seem no good for ME to stay – I couldn’t do nothing, and I didn’t want to be hung if I could get away. So I never stopped running till I found the canoe; and when I got here I told Jim to hurry, or they’d catch me and hang me yet, and said I was afeard you and the duke wasn’t alive now, and I was awful sorry, and so was Jim, and was awful glad when we see you coming; you may ask Jim if I didn’t.”
Jim said it was so; and the king told him to shut up, and said, “Oh, yes, it’s MIGHTY likely!” and shook me up again, and said he reckoned he’d drownd me. But the duke says:
“Leggo the boy, you old idiot! Would YOU a done any different? Did you inquire around for HIM when you got loose? I don’t remember it.”
So the king let go of me, and begun to cuss that town and everybody in it. But the duke says:
“You better a blame’ sight give YOURSELF a good cussing, for you’re the one that’s entitled to it most. You hain’t done a thing from the start that had any sense in it, except coming out so cool and cheeky with that imaginary blue-arrow mark. That WAS bright – it was right down bully; and it was the thing that saved us. For if it hadn’t been for that they’d a jailed us till them Englishmen’s baggage come – and then – the penitentiary, you bet! But that trick took ‘em to the graveyard, and the gold done us a still bigger kindness; for if the excited fools hadn’t let go all holts and made that rush to get a look we’d a slept in our cravats to-night – cravats warranted to WEAR, too – longer than WE’D need ‘em.”
They was still a minute – thinking; then the king says, kind of absent-minded like:
“Mf!
That made me squirm!
“Yes,” says the duke, kinder slow and deliberate and sarcastic, “WE did.”
After about a half a minute the king drawls out:
“Leastways, I did.”
The duke says, the same way:
“On the contrary, I did.”
The king kind of ruffles up, and says:
“Looky here, Bilgewater, what’r you referrin’ to?”
The duke says, pretty brisk:
“When it comes to that, maybe you’ll let me ask, what was YOU referring to?”
“Shucks!” says the king, very sarcastic; “but I don’t know – maybe you was asleep, and didn’t know what you was about.”
 Don’t you reckon I know who hid that money in that coffin?”
“YES, sir! I know you DO know, because you done it yourself!”
“It’s a lie!” – and the duke went for him. The king sings out:
“Take y’r hands off! – leggo my throat! – I take it all back!”
The duke says:
“Well, you just own up, first, that you DID hide that money there, intending to give me the slip one of these days, and come back and dig it up, and have it all to yourself.”
“Wait jest a minute, duke – answer me this one question, honest and fair; if you didn’t put the money there, say it, and I’ll b’lieve you, and take back everything I said.”
“You old scoundrel, I didn’t, and you know I didn’t. There, now!”
“Well, then, I b’lieve you. But answer me only jest this one more – now DON’T git mad; didn’t you have it in your mind to hook the money and hide it?”
 But you not only had it in mind to do it, but you DONE it.”
“I wisht I never die if I done it, duke, and that’s honest. I won’t say I warn’t goin’ to do it, because I WAS; but you – I mean somebody – got in ahead o’ me.”
“It’s a lie!  – I OWN UP!”
I was very glad to hear him say that; it made me feel much more easier than what I was feeling before.  It’s WELL for you to set there and blubber like a baby – it’s fitten for you, after the way you’ve acted. I never see such an old ostrich for wanting to gobble everything – and I a-trusting you all the time, like you was my own father.   Cuss you, I can see now why you was so anxious to make up the deffisit – you wanted to get what money I’d got out of the Nonesuch and one thing or another, and scoop it ALL!”
The king says, timid, and still a-snuffling:
“Why, duke, it was you that said make up the deffisit; it warn’t me.”
“Dry up! I don’t want to hear no more out of you!” says the duke. “And NOW you see what you GOT by it. They’ve got all their own money back, and all of OURN but a shekel or two BESIDES.
So the king sneaked into the wigwam and took to his bottle for comfort, and before long the duke tackled HIS bottle; and so in about a half an hour they was as thick as thieves again, and the tighter they got the lovinger they got, and went off a-snoring in each other’s arms. They both got powerful mellow, but I noticed the king didn’t get mellow enough to forget to remember to not deny about hiding the money-bag again. That made me feel easy and satisfied. Of course when they got to snoring we had a long gabble, and I told Jim everything.


--- date: 2011-03-13T00:00:00Z published: true title: A few decent Redis links - found some good stuff here this weekend. url: /2011/03/13/a-few-decent-redis-links-found-some-good-stuff-here-this-weekend-/ ---
http://simonwillison.net/static/2010/redis-tutorial/
http://www.scribd.com/doc/33531219/Redis-Presentation
http://redis.io/topics/twitter-clone
http://masonoise.wordpress.com/2010/04/23/updated-redis-cheat-sheet/
http://rediscookbook.org/index.html
http://blog.mjrusso.com/2010/10/17/redis-from-the-ground-up.html


"
Part-of-speech: .
Lemma: "
Mary
Part-of-speech: NNP
Lemma: Mary
has
Part-of-speech: VBZ
Lemma: have
just
Part-of-speech: RB
Lemma: just
played
Part-of-speech: VBN
Lemma: play
a
Part-of-speech: DT
Lemma: a
great
Part-of-speech: JJ
Lemma: great
move
Part-of-speech: NN
Lemma: move
"
Part-of-speech: .
Lemma: "
,
Part-of-speech: .
Lemma: ,
said
Part-of-speech: VBD
Lemma: say
John
Part-of-speech: NNP
Lemma: John
.
Part-of-speech: .
Lemma: .


Chapter 15 Regression
Pirates like diamonds. Who doesn’t?! But as much as pirates love diamonds, they hate getting ripped off. For this reason, a pirate needs to know how to accurately assess the value of a diamond. For example, how much should a pirate pay for a diamond with a weight of 2.0 grams, a clarity value of 1.0, and a color gradient of 4 out of 10? To answer this, we’d like to know how the attributes of diamonds (e.g.; weight, clarity, color) relate to its value. We can get these values using linear regression.
15.1 The Linear Model
The linear model is easily the most famous and widely used model in all of statistics. Why? Because it can apply to so many interesting research questions where you are trying to predict a continuous variable of interest (the response or dependent variable) on the basis of one or more other variables (the predictor or independent variables).
The linear model takes the following form, where the x values represent the predictors, while the beta values represent weights.
\(y=\beta_{0}+\beta_{1}x_{1}+\beta_{2}x_{2}+...\beta_{n}x_{n}\)
For example, we could use a regression model to understand how the value of a diamond relates to two independent variables: its weight and clarity. In the model, we could define the value of a diamond as \(\beta_{weight} \times weight + \beta_{clarity} \times clarity\). Where \(\beta_{weight}\) indicates how much a diamond’s value changes as a function of its weight, and \(\beta_{clarity}\) defines how much a diamond’s value change as a function of its clarity.
15.2 Linear regression with lm()
| Argument | Description |
|---|---|
formula |
A formula in the form y ~ x1 + x2 + ... where y is the dependent variable, and x1, x2, … are the independent variables. If you want to include all columns (excluding y) as independent variables, just enter y ~ . |
data |
The dataframe containing the columns specified in the formula. |
To estimate the beta weights of a linear model in R, we use the lm()
function. The function has three key arguments: formula
, and data
15.2.1 Estimating the value of diamonds with lm()
We’ll start with a simple example using a dataset in the yarrr package called . The dataset includes data on 150 diamonds sold at an auction. Here are the first few rows of the dataset:
library(yarrr)
head(diamonds)
## weight clarity color value value.lm weight.c clarity.c value.g190
## 1 9.3 0.88 4 182 186 -0.55 -0.12 FALSE
## 2 11.1 1.05 5 191 193 1.20 0.05 TRUE
## 3 8.7 0.85 6 176 183 -1.25 -0.15 FALSE
## 4 10.4 1.15 5 195 194 0.53 0.15 TRUE
## 5 10.6 0.92 5 182 189 0.72 -0.08 FALSE
## 6 12.3 0.44 4 183 183 2.45 -0.56 FALSE
## pred.g190
## 1 0.163
## 2 0.821
## 3 0.030
## 4 0.846
## 5 0.445
## 6 0.087
Our goal is to come up with a linear model we can use to estimate the value of each diamond (DV = value
) as a linear combination of three independent variables: its weight, clarity, and color. The linear model will estimate each diamond’s value using the following equation:
\(\beta_{Int} + \beta_{weight} \times weight + \beta_{clarity} \times clarity + \beta_{color} \times color\)
where \(\beta_{weight}\) is the increase in value for each increase of 1 in weight, \(\beta_{clarity}\) is the increase in value for each increase of 1 in clarity (etc.). Finally, \(\beta_{Int}\) is the baseline value of a diamond with a value of 0 in all independent variables.
To estimate each of the 4 weights, we’ll use lm()
. Because value
is the dependent variable, we’ll specify the formula as formula = value ~ weight + clarity + color
. We’ll assign the result of the function to a new object called diamonds.lm
:
# Create a linear model of diamond values
# DV = value, IVs = weight, clarity, color
diamonds.lm <- lm(formula = value ~ weight + clarity + color,
data = diamonds)
To see the results of the regression analysis, including estimates for each of the beta values, we’ll use the summary()
function:
# Print summary statistics from diamond model
summary(diamonds.lm)
##
## Call:
## lm(formula = value ~ weight + clarity + color, data = diamonds)
##
## Residuals:
## Min 1Q Median 3Q Max
## -10.405 -3.547 -0.113 3.255 11.046
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 148.335 3.625 40.92 <2e-16 ***
## weight 2.189 0.200 10.95 <2e-16 ***
## clarity 21.692 2.143 10.12 <2e-16 ***
## color -0.455 0.365 -1.25 0.21
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.7 on 146 degrees of freedom
## Multiple R-squared: 0.637, Adjusted R-squared: 0.63
## F-statistic: 85.5 on 3 and 146 DF, p-value: <2e-16
Here, we can see from the summary table that the model estimated \(\beta_{Int}\) (the intercept), to be 148.34, \(\beta_{weight}\) to be 2.19, \(\beta_{clarity}\) to be 21.69, and , \(\beta_{color}\) to be -0.45. You can see the full linear model in Figure 15.2:
You can access lots of different aspects of the regression object. To see what’s inside, use names()
# Which components are in the regression object?
names(diamonds.lm)
## [1] "coefficients" "residuals" "effects" "rank"
## [5] "fitted.values" "assign" "qr" "df.residual"
## [9] "xlevels" "call" "terms" "model"
For example, to get the estimated coefficients from the model, just access the coefficients
attribute:
# The coefficients in the diamond model
diamonds.lm$coefficients
## (Intercept) weight clarity color
## 148.3354 2.1894 21.6922 -0.4549
If you want to access the entire statistical summary table of the coefficients, you just need to access them from the summary
object:
# Coefficient statistics in the diamond model
summary(diamonds.lm)$coefficients
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 148.3354 3.6253 40.917 7.009e-82
## weight 2.1894 0.2000 10.948 9.706e-21
## clarity 21.6922 2.1429 10.123 1.411e-18
## color -0.4549 0.3646 -1.248 2.141e-01
15.2.2 Getting model fits with fitted.values
To see the fitted values from a regression object (the values of the dependent variable predicted by the model), access the fitted.values
attribute from a regression object with $fitted.values
.
Here, I’ll add the fitted values from the diamond regression model as a new column in the diamonds dataframe:
# Add the fitted values as a new column in the dataframe
diamonds$value.lm <- diamonds.lm$fitted.values
# Show the result
head(diamonds)
## weight clarity color value value.lm weight.c clarity.c value.g190
## 1 9.35 0.88 4 182.5 186.1 -0.5511 -0.1196 FALSE
## 2 11.10 1.05 5 191.2 193.1 1.1989 0.0504 TRUE
## 3 8.65 0.85 6 175.7 183.0 -1.2511 -0.1496 FALSE
## 4 10.43 1.15 5 195.2 193.8 0.5289 0.1504 TRUE
## 5 10.62 0.92 5 181.6 189.3 0.7189 -0.0796 FALSE
## 6 12.35 0.44 4 182.9 183.1 2.4489 -0.5596 FALSE
## pred.g190
## 1 0.16252
## 2 0.82130
## 3 0.03008
## 4 0.84559
## 5 0.44455
## 6 0.08688
According to the model, the first diamond, with a weight of 9.35, a clarity of 0.88, and a color of 4 should have a value of 186.08. As we can see, this is not far off from the true value of 182.5.
You can use the fitted values from a regression object to plot the relationship between the true values and the model fits. If the model does a good job in fitting the data, the data should fall on a diagonal line:
# Plot the relationship between true diamond values
# and linear model fitted values
plot(x = diamonds$value, # True values on x-axis
y = diamonds.lm$fitted.values, # fitted values on y-axis
xlab = "True Values",
ylab = "Model Fitted Values",
main = "Regression fits of diamond values")
abline(b = 1, a = 0) # Values should fall around this line!
15.2.3 Using predict()
to predict new data from a model
Once you have created a regression model with lm()
, you can use it to easily predict results from new datasets using the predict()
function.
For example, let’s say I discovered 3 new diamonds with the following characteristics:
| weight | clarity | color |
|---|---|---|
| 20 | 1.5 | 5 |
| 10 | 0.2 | 2 |
| 15 | 5.0 | 3 |
I’ll use the predict()
function to predict the value of each of these diamonds using the regression model diamond.lm
that I created before. The two main arguments to predict()
are object
– the regression object we’ve already defined), and newdata
– the dataframe of new data. Warning! The dataframe that you use in the newdata
argument to predict()
must have column names equal to the names of the coefficients in the model. If the names are different, the predict()
function won’t know which column of data applies to which coefficient and will return an error.
# Create a dataframe of new diamond data
diamonds.new <- data.frame(weight = c(12, 6, 5),
clarity = c(1.3, 1, 1.5),
color = c(5, 2, 3))
# Predict the value of the new diamonds using
# the diamonds.lm regression model
predict(object = diamonds.lm, # The regression model
newdata = diamonds.new) # dataframe of new data
## 1 2 3
## 200.5 182.3 190.5
This result tells us the the new diamonds are expected to have values of 200.5, 182.3, and 190.5 respectively according to our regression model.
15.2.4 Including interactions in models: y ~ x1 * x2
To include interaction terms in a regression model, just put an asterix (*) between the independent variables. For example, to create a regression model on the diamonds data with an interaction term between weight
and clarity
, we’d use the formula formula = value ~ weight * clarity
:
# Create a regression model with interactions between
# IVS weight and clarity
diamonds.int.lm <- lm(formula = value ~ weight * clarity,
data = diamonds)
# Show summary statistics of model coefficients
summary(diamonds.int.lm)$coefficients
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 157.4721 10.569 14.8987 4.170e-31
## weight 0.9787 1.070 0.9149 3.617e-01
## clarity 9.9245 10.485 0.9465 3.454e-01
## weight:clarity 1.2447 1.055 1.1797 2.401e-01
15.2.5 Center variables before computing interactions!
Hey what happened? Why are all the variables now non-significant? Does this mean that there is really no relationship between weight and clarity on value after all? No. Recall from your second-year pirate statistics class that when you include interaction terms in a model, you should always center the independent variables first. Centering a variable means simply subtracting the mean of the variable from all observations.
In the following code, I’ll repeat the previous regression, but first I’ll create new centered variables weight.c
and clarity.c
, and then run the regression on the interaction between these centered variables:
# Create centered versions of weight and clarity
diamonds$weight.c <- diamonds$weight - mean(diamonds$weight)
diamonds$clarity.c <- diamonds$clarity - mean(diamonds$clarity)
# Create a regression model with interactions of centered variables
diamonds.int.lm <- lm(formula = value ~ weight.c * clarity.c,
data = diamonds)
# Print summary
summary(diamonds.int.lm)$coefficients
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 189.402 0.3831 494.39 2.908e-237
## weight.c 2.223 0.1988 11.18 2.322e-21
## clarity.c 22.248 2.1338 10.43 2.272e-19
## weight.c:clarity.c 1.245 1.0551 1.18 2.401e-01
Hey that looks much better! Now we see that the main effects are significant and the interaction is non-significant.
15.2.6 Getting an ANOVA from a regression model with aov()
Once you’ve created a regression object with lm()
or glm()
, you can summarize the results in an ANOVA table with aov()
:
# Create ANOVA object from regression
diamonds.aov <- aov(diamonds.lm)
# Print summary results
summary(diamonds.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## weight 1 3218 3218 147.40 <2e-16 ***
## clarity 1 2347 2347 107.53 <2e-16 ***
## color 1 34 34 1.56 0.21
## Residuals 146 3187 22
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
15.3 Comparing regression models with anova()
A good model not only needs to fit data well, it also needs to be parsimonious. That is, a good model should be only be as complex as necessary to describe a dataset. If you are choosing between a very simple model with 1 IV, and a very complex model with, say, 10 IVs, the very complex model needs to provide a much better fit to the data in order to justify its increased complexity. If it can’t, then the more simpler model should be preferred.
To compare the fits of two models, you can use the anova()
function with the regression objects as two separate arguments. The anova()
function will take the model objects as arguments, and return an ANOVA testing whether the more complex model is significantly better at capturing the data than the simpler model. If the resulting p-value is sufficiently low (usually less than 0.05), we conclude that the more complex model is significantly better than the simpler model, and thus favor the more complex model. If the p-value is not sufficiently low (usually greater than 0.05), we should favor the simpler model.
Let’s do an example with the diamonds dataset. I’ll create three regression models that each predict a diamond’s value. The models will differ in their complexity – that is, the number of independent variables they use. diamonds.mod1
will be the simplest model with just one IV (weight), diamonds.mod2
will include 2 IVs (weight and clarity) while diamonds.mod3
will include three IVs (weight, clarity, and color).
# model 1: 1 IV (only weight)
diamonds.mod1 <- lm(value ~ weight, data = diamonds)
# Model 2: 2 IVs (weight AND clarity)
diamonds.mod2 <- lm(value ~ weight + clarity, data = diamonds)
# Model 3: 3 IVs (weight AND clarity AND color)
diamonds.mod3 <- lm(value ~ weight + clarity + color, data = diamonds)
Now let’s use the anova()
function to compare these models and see which one provides the best parsimonious fit of the data. First, we’ll compare the two simplest models: model 1 with model 2. Because these models differ in the use of the clarity
IV (both models use weight
), this ANVOA will test whether or not including the clarity
IV leads to a significant improvement over using just the weight
IV:
# Compare model 1 to model 2
anova(diamonds.mod1, diamonds.mod2)
## Analysis of Variance Table
##
## Model 1: value ~ weight
## Model 2: value ~ weight + clarity
## Res.Df RSS Df Sum of Sq F Pr(>F)
## 1 148 5569
## 2 147 3221 1 2347 107 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
As you can see, the result shows a Df of 1 (indicating that the more complex model has one additional parameter), and a very small p-value (< .001). This means that adding the clarity
IV to the model did lead to a significantly improved fit over the model 1.
Next, let’s use anova()
to compare model 2 and model 3. This will tell us whether adding color
(on top of weight and clarity) further improves the model:
# Compare model 2 to model 3
anova(diamonds.mod2, diamonds.mod3)
## Analysis of Variance Table
##
## Model 1: value ~ weight + clarity
## Model 2: value ~ weight + clarity + color
## Res.Df RSS Df Sum of Sq F Pr(>F)
## 1 147 3221
## 2 146 3187 1 34 1.56 0.21
The result shows a non-significant result (p = 0.21). Thus, we should reject model 3 and stick with model 2 with only 2 IVs.
You don’t need to compare models that only differ in one IV – you can also compare models that differ in multiple DVs. For example, here is a comparison of model 1 (with 1 IV) to model 3 (with 3 IVs):
# Compare model 1 to model 3
anova(diamonds.mod1, diamonds.mod3)
## Analysis of Variance Table
##
## Model 1: value ~ weight
## Model 2: value ~ weight + clarity + color
## Res.Df RSS Df Sum of Sq F Pr(>F)
## 1 148 5569
## 2 146 3187 2 2381 54.5 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
The result shows that model 3 did indeed provide a significantly better fit to the data compared to model 1. However, as we know from our previous analysis, model 3 is not significantly better than model 2.
15.4 Regression on non-Normal data with glm()
| Argument | Description |
|---|---|
formula, data, subset |
The same arguments as in lm() |
family |
One of the following strings, indicating the link function for the general linear model |
| Family name | Description |
|---|---|
"binomial" |
Binary logistic regression, useful when the response is either 0 or 1. |
"gaussian" |
Standard linear regression. Using this family will give you the same result as lm() |
"Gamma" |
Gamma regression, useful for highly positively skewed data |
"inverse.gaussian" |
Inverse-Gaussian regression, useful when the dv is strictly positive and skewed to the right. |
"poisson" |
Poisson regression, useful for count data. For example, ``How many parrots has a pirate owned over his/her lifetime?“ |
We can use standard regression with lm()
when your dependent variable is Normally distributed (more or less). When your dependent variable does not follow a nice bell-shaped Normal distribution, you need to use the Generalized Linear Model (GLM). the GLM is a more general class of linear models that change the distribution of your dependent variable. In other words, it allows you to use the linear model even when your dependent variable isn’t a normal bell-shape. Here are 4 of the most common distributions you can can model with glm()
:
15.5 Logistic regression with glm(family = "binomial"
The most common non-normal regression analysis is logistic regression, where your dependent variable is just 0s and 1. To do a logistic regression analysis with glm()
, use the family = binomial
argument.
Let’s run a logistic regression on the diamonds dataset. First, I’ll create a binary variable called value.g190
indicating whether the value of a diamond is greater than 190 or not. Then, I’ll conduct a logistic regression with our new binary variable as the dependent variable. We’ll set family = "binomial"
to tell glm()
that the dependent variable is binary.
# Create a binary variable indicating whether or not
# a diamond's value is greater than 190
diamonds$value.g190 <- diamonds$value > 190
# Conduct a logistic regression on the new binary variable
diamond.glm <- glm(formula = value.g190 ~ weight + clarity + color,
data = diamonds,
family = binomial)
Here are the resulting coefficients:
# Print coefficients from logistic regression
summary(diamond.glm)$coefficients
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -18.8009 3.4634 -5.428 5.686e-08
## weight 1.1251 0.1968 5.716 1.088e-08
## clarity 9.2910 1.9629 4.733 2.209e-06
## color -0.3836 0.2481 -1.547 1.220e-01
Just like with regular regression with lm()
, we can get the fitted values from the model and put them back into our dataset to see how well the model fit the data:
# Add logistic fitted values back to dataframe as
# new column pred.g190
diamonds$pred.g190 <- diamond.glm$fitted.values
# Look at the first few rows (of the named columns)
head(diamonds[c("weight", "clarity", "color", "value", "pred.g190")])
## weight clarity color value pred.g190
## 1 9.35 0.88 4 182.5 0.16252
## 2 11.10 1.05 5 191.2 0.82130
## 3 8.65 0.85 6 175.7 0.03008
## 4 10.43 1.15 5 195.2 0.84559
## 5 10.62 0.92 5 181.6 0.44455
## 6 12.35 0.44 4 182.9 0.08688
Looking at the first few observations, it looks like the probabilities match the data pretty well. For example, the first diamond with a value of 182.5 had a fitted probability of just 0.16 of being valued greater than 190. In contrast, the second diamond, which had a value of 191.2 had a much higher fitted probability of 0.82.
Just like we did with regular regression, you can use the predict()
function along with the results of a glm()
object to predict new data. Let’s use the diamond.glm
object to predict the probability that the new diamonds will have a value greater than 190:
# Predict the 'probability' that the 3 new diamonds
# will have a value greater than 190
predict(object = diamond.glm,
newdata = diamonds.new)
## 1 2 3
## 4.8605 -3.5265 -0.3898
What the heck, these don’t look like probabilities! True, they’re not. They are logit-transformed probabilities. To turn them back into probabilities, we need to invert them by applying the inverse logit function:
# Get logit predictions of new diamonds
logit.predictions <- predict(object = diamond.glm,
newdata = diamonds.new
)
# Apply inverse logit to transform to probabilities
# (See Equation in the margin)
prob.predictions <- 1 / (1 + exp(-logit.predictions))
# Print final predictions!
prob.predictions
## 1 2 3
## 0.99231 0.02857 0.40376
So, the model predicts that the probability that the three new diamonds will be valued over 190 is 99.23%, 2.86%, and 40.38% respectively.
15.5.1 Adding a regression line to a plot
You can easily add a regression line to a scatterplot. To do this, just put the regression object you created with as the main argument to . For example, the following code will create the scatterplot on the right (Figure~) showing the relationship between a diamond’s weight and its value including a red regression line:
# Scatterplot of diamond weight and value
plot(x = diamonds$weight,
y = diamonds$value,
xlab = "Weight",
ylab = "Value",
main = "Adding a regression line with abline()"
)
# Calculate regression model
diamonds.lm <- lm(formula = value ~ weight,
data = diamonds)
# Add regression line
abline(diamonds.lm,
col = "red", lwd = 2)
15.5.2 Transforming skewed variables prior to standard regression
# The distribution of movie revenus is highly
# skewed.
hist(movies$revenue.all,
main = "Movie revenue\nBefore log-transformation")
If you have a highly skewed variable that you want to include in a regression analysis, you can do one of two things. Option 1 is to use the general linear model glm()
with an appropriate family (like family = "gamma"
). Option 2 is to do a standard regression analysis with lm()
, but before doing so, transforming the variable into something less skewed. For highly skewed data, the most common transformation is a log-transformation.
For example, look at the distribution of movie revenues in the movies dataset in the margin Figure 15.5:
As you can see, these data don’t look Normally distributed at all. There are a few movies (like Avatar) that just an obscene amount of money, and many movies that made much less. If we want to conduct a standard regression analysis on these data, we need to create a new log-transformed version of the variable. In the following code, I’ll create a new variable called revenue.all.log
defined as the logarithm of revenue.all
# Create a new log-transformed version of movie revenue
movies$revenue.all.log <- log(movies$revenue.all)
In Figure 15.6 you can see a histogram of the new log-transformed variable. It’s still skewed, but not nearly as badly as before, so I would be feel much better using this variable in a standard regression analysis with lm()
.
# Distribution of log-transformed
# revenue is much less skewed
hist(movies$revenue.all.log,
main = "Log-transformed Movie revenue")
15.6 Test your might! A ship auction
The following questions apply to the auction dataset in the yarrr package. This dataset contains information about 1,000 ships sold at a pirate auction. Here’s how the first few rows of the dataframe should look:
head(auction)
## cannons rooms age condition color style jbb price price.gt.3500
## 1 18 20 140 5 red classic 3976 3502 TRUE
## 2 21 21 93 5 red modern 3463 2955 FALSE
## 3 20 18 48 2 plum classic 3175 3281 FALSE
## 4 24 20 81 5 salmon classic 4463 4400 TRUE
## 5 20 21 93 2 red modern 2858 2177 FALSE
## 6 21 19 60 6 red classic 4420 3792 TRUE
The column jbb is the “Jack’s Blue Book” value of a ship. Create a regression object called
jbb.cannon.lm
predicting the JBB value of ships based on the number of cannons it has. Based on your result, how much value does each additional cannon bring to a ship?Repeat your previous regression, but do two separate regressions: one on modern ships and one on classic ships. Is there relationship between cannons and JBB the same for both types of ships?
Is there a significant interaction between a ship’s style and its age on its JBB value? If so, how do you interpret the interaction?
Create a regression object called
jbb.all.lm
predicting the JBB value of ships based on cannons, rooms, age, condition, color, and style. Which aspects of a ship significantly affect its JBB value?Create a regression object called
price.all.lm
predicting the actual selling value of ships based on cannons, rooms, age, condition, color, and style. Based on the results, does the JBB do a good job of capturing the effect of each variable on a ship’s selling price?Repeat your previous regression analysis, but instead of using the price as the dependent variable, use the binary variable price.gt.3500 indicating whether or not the ship had a selling price greater than 3500. Call the new regression object
price.all.blr
. Make sure to use the appropriate regression function!!Using
price.all.lm
, predict the selling price of the 3 new ships below
| cannons | rooms | age | condition | color | style |
|---|---|---|---|---|---|
| 12 | 34 | 43 | 7 | black | classic |
| 8 | 26 | 54 | 3 | black | modern |
| 32 | 65 | 100 | 5 | red | modern |
- Using
price.all.blr
, predict the probability that the three new ships will have a selling price greater than 3500.


bayesquad.priors module¶
Classes representing probability distributions, intended to be integrated against a likelihood.
-
class
bayesquad.priors.
Gaussian
(mean: numpy.ndarray, covariance: numpy.ndarray)[source]¶ Bases:
bayesquad.priors.Prior
A multivariate Gaussian prior.
Parameters: - mean – A 1D array of shape (num_dimensions).
- covariance – A 2D array of shape (num_dimensions, num_dimensions).
-
mean
¶ ndarray – A 1D array of shape (num_dimensions).
-
covariance
¶ ndarray – A 2D array of shape (num_dimensions, num_dimensions).
-
precision
¶ ndarray – The inverse of the covariance matrix.
-
gradient
(x: numpy.ndarray) → Tuple[numpy.ndarray, numpy.ndarray][source]¶ See
gradient()
-
class
bayesquad.priors.
Prior
[source]¶ Bases:
abc.ABC
A prior, providing methods for sampling, and for pointwise evaluation of the pdf and its derivatives.
-
gradient
(x: numpy.ndarray) → Tuple[numpy.ndarray, numpy.ndarray][source]¶ Compute the Jacobian and Hessian of the prior’s pdf at the given set of points.
Parameters: x – A 2D array of the points at which to evaluate the derivatives, with shape (num_points, num_dimensions). Returns: - jacobian – A 2D array of shape (num_points, num_dimensions), containing the value of the Jacobian at each point.
- hessian – A 3D array of shape (num_points, num_dimensions, num_dimensions), whose (i, j, k)-th element is the (j, k)-th mixed partial derivative of the pdf at the i-th point of x.
-


How to sign and verify a text message (simple usage)
Modify the text message 'aaa' to anything you want.
Choose hash algorithm for signing 'SHA1' or 'SHA256'.
Push 'Sign to this message' button in the left.
Push 'Copy' button in the middle to copy the message to be signed and the generated signature value to verification form in the right.
Push 'Verify this message' in the right.
Then you can see signature verification result in the top of right.
Note for signing in the left form.
See below when you want to specify message and private key to be signed.
In the 'PEM RSA Private Key' text area, you can specify
signer's private key. The format of the key should be
PKCS#1 PEM text formatted and unencrypted RSA private key.
Note for signature verification in the right form.
See below when you want to specify message,
signature value and public key certificate to be verified.
In the 'Verifying Signature' field, you can specify
any signature value to be verified.
Signature value should be hexa decimal encoded 'RSASSA-PKCS1-v1_5' signature.
Currently this supports 'SHA1withRSA' and 'SHA256withRSA' signature algorihtm.
RSA key length have been tested from 512bit to 2048bit for this program.
In the "Signer's Public Key Certificate" field,
you can specify signer's public key certificate to be verified.
The value should be PEM encoded X.509 certificate with RSA public key.
X.509v1 and X.509v3 is available however X.509v2 is not supported now.


The hostel events that are performed in NITK are:
- CRESCENDO, the intra-institute cultural festival organized by the NITK Hostellers. Its like a mini Incident which provides a nice platform to exhibit and showcased the innate social and cultural talents and gives many others a chance to try something new for the first time.
- PHOENIX, the annual sports meet organized at institute level. This adventuring sporting event organized by the hostellers
- BHARATH DARSHAN, the festival celebrating the cultural diversity of India has been conducted as regular features of the Annual Calendar of the Students Council. In this students exhibit the different cultural events of all the states of India thereby built an ultimate platform of social and cultural exchange.
- The National Institute of Technology Karnataka (NITK) was founded on the western shores of the Indian peninsula close to the city of Mangalore in the year 1960, and since then it has been galvanizing the countless curious minds that have passed through its gates. Since its inception its spreading the message of cultural heritage by means a vibrant cultural festival called as Cultural Week in the premises which attracted a huge response from the nearby districts of Dakshina Kannada. To its credit events like State Level Kannada Drama competition and many other cultural exchange programmes were also a part of it. It was the only institute at that time to invite talented students and to showcase their talents in and around the districts.
- Intra College Sports meet like freshers cup and inter department leaguges will be organized by Recreation Committee.


Although I haven't updated this blog in a while, I'm still learning! I recently completed a class in Java and am continuing to
utilize free-online classes in topics such as SQL and JavaScript. I probably won't be posting on this blog much as its main
purpose is to showcase what I've learned in its functionality more than its content.
August 2017
August 19, 2017:
Been quite busy lately. I've been working on UDemy Web Development
courses, learning C languages (C, C++, and C#), just started classes for my Cybersecurity degree, and I'm working
on a website for my parents' business.
July 2017
July 8, 2017:
Used DataTables, a great jQuery plug-in with a lot of customization
options, to vastly increase the usability of my course list table.
I also added links to the resources I'm using to learn and build my page below the table.
July 7, 2017:
Completed my first "project" today. Using JavaScript, I created a Bible verse generator that randomly chooses a verse from an array and displays it on the
page. It also has options to choose different backgrounds.
July 6, 2017:
Completed my first ticket at work today on the project for which I'm the primary tester. It was an easy HTML/CSS
addition, so I took a stab at it. Having my first merge request accepted one year and a day after starting
work here as the admin was pretty cool. Can I tape the word "developer" on my name plate now?
July 3, 2017:
Started learning JavaScript today.
Cue the Aladdin theme song!
June 2017
June 16, 2017:
Published my v2.0 of this site after re-writing the website with Bootstrap components. I also split the parts of my original one-page site into sub-pages
accessible by the navigation bar. Things are starting to look pretty good around here. I can't wait to learn
more!
June 6, 2017:
Completed the Learn HTML & CSS: Part 1 course (10 hours) from
codecademy. I love this site's courses. They're easy
to understand and extremely interactive. I went from knowing nothing to being able to make this site (homely
as it may be) in three days.
June 4, 2017:
Changed the RAM on my Mac Mini from 4GB to 8GB. My computer didn't begin to smoke or spontaneously combust, so
I'm calling this a win. Also, I can now use more than one program at a time, which is nice. Fun Fact: macOS
Sierra uses about 2.3GB of RAM just to exist. Watch the video below to see me in action.


| Class and Description |
|---|
| AABB
An Axis Aligned Bounding Box (AABB) used for collision detection.
|
| Camera
A class for storing camera position and rotation and adjusting it.
|
| Config
Simple storage class for storing information about a configuration
|
| ConfigCreatorSim
An extension of MainSimulation with some extra functionality used by the config creator
|
| ConfigSimulation
An extension of PhysicsSimulation that includes some extra functionality used in config editor.
|
| CustomObject
A custom format for objects.
|
| FPSSystem
An fps system for use with OpenGL applications.
|
| MainApp
The main application that is executed.
|
| MainSimulation
The class that starts the physics simulation and reads configs for it.
|
| Material
Used for storing information about the material of an object
|
| ObjectInit
A data structure for storing information needed to initialise objects
|
| PhysicsSimulation
A class for running a physics simulation on a set of objects given certain starting parameters.
|
| Position
Stores a position in 3d space.
|
| Renderer
Custom renderer for displaying objects of the type CustomObject to the screen in 3d using OpenGL.
|
| Rotation
Stores a rotation in 3d space, made up of an X, Y, and Z axis rotation
|
| TriangularFace
Stores information about a triangular face (3 vertices)
|
| Vertex
A class for representing a vertex and its associated normal.
|


About me
Week "Garment, Sublimation and UV Printing"
Week "Computer Controlled Cutting"
Week "3D Scanning and Printing"
Week 4
Week 5
Week 6
Week 7
Week 8
Week 9
Week 10
Week 11
Final Project


Police: 11-year-old shot and killed at party in Ohio
by EndPlayCLEVELAND (AP) - Police say an 11-year-old has been shot and killed while attending a birthday party at an apartment in Cleveland.
Cleveland police say the child identified by the Cuyahoga (ky-uh-HOH'-guh) County Medical Examiner's Office as Tyshaun Taylor was shot around 9:30 p.m. Saturday and two juveniles carried him to a corner to flag down help. Police say the child was taken to a hospital where he was pronounced dead.
A police statement says officers were told that a 16-year-old male had been hosting a birthday party at the apartment when the shooting occurred.
No other details of the shooting were immediately released, and no suspects were publicly identified.
Police say their investigation is continuing.


| spreadLevelPlot {car} | R Documentation |
Creates plots for examining the possible dependence of spread on level, or an extension of these plots to the studentized residuals from linear models.
spreadLevelPlot(x, ...) slp(...) ## S3 method for class 'formula' spreadLevelPlot(x, data=NULL, subset, na.action, main=paste("Spread-Level Plot for", varnames[response], "by", varnames[-response]), ...) ## Default S3 method: spreadLevelPlot(x, by, robust.line=TRUE, start=0, xlab="Median", ylab="Hinge-Spread", point.labels=TRUE, las=par("las"), main=paste("Spread-Level Plot for", deparse(substitute(x)), "by", deparse(substitute(by))), col=carPalette()[1], col.lines=carPalette()[2], pch=1, lwd=2, grid=TRUE, ...) ## S3 method for class 'lm' spreadLevelPlot(x, robust.line=TRUE, xlab="Fitted Values", ylab="Absolute Studentized Residuals", las=par("las"), main=paste("Spread-Level Plot for\n", deparse(substitute(x))), pch=1, col=carPalette()[1], col.lines=carPalette()[2:3], lwd=2, grid=TRUE, id=FALSE, smooth=TRUE, ...) ## S3 method for class 'spreadLevelPlot' print(x, ...)
x |
a formula of the form |
data |
an optional data frame containing the variables to be plotted.
By default the variables are taken from the environment from which
|
subset |
an optional vector specifying a subset of observations to be used. |
na.action |
a function that indicates what should happen when the data contain |
by |
a factor, numeric vector, or character vector defining groups. |
robust.line |
if |
start |
add the constant |
main |
title for the plot. |
xlab |
label for horizontal axis. |
ylab |
label for vertical axis. |
point.labels |
if |
las |
if |
col |
color for points; the default is the first entry
in the current car palette (see |
col.lines |
for the default method, the line color, defaulting to the second entry in the car color palette;
for the |
pch |
plotting character for points; default is |
lwd |
line width; default is |
grid |
If TRUE, the default, a light-gray background grid is put on the graph |
id |
controls point identification; if |
smooth |
specifies the smoother to be used along with its arguments; if |
... |
arguments passed to plotting functions. |
Except for linear models, computes the statistics for, and plots, a Tukey spread-level plot of log(hinge-spread) vs. log(median) for the groups; fits a line to the plot; and calculates a spread-stabilizing transformation from the slope of the line.
For linear models, plots log(abs(studentized residuals) vs. log(fitted values). Point labeling was added in November, 2016.
The function slp
is an abbreviation for spreadLevelPlot
.
An object of class spreadLevelPlot
containing:
Statistics |
a matrix with the lower-hinge, median, upper-hinge, and hinge-spread
for each group. (Not for an |
PowerTransformation |
spread-stabilizing power transformation, calculated as 1 - slope of the line fit to the plot. |
John Fox<EMAIL_ADDRESS>Fox, J. (2016) Applied Regression Analysis and Generalized Linear Models, Third Edition. Sage.
Fox, J. and Weisberg, S. (2019) An R Companion to Applied Regression, Third Edition, Sage.
Hoaglin, D. C., Mosteller, F. and Tukey, J. W. (Eds.) (1983) Understanding Robust and Exploratory Data Analysis. Wiley.
spreadLevelPlot(interlocks + 1 ~ nation, data=Ornstein) slp(lm(interlocks + 1 ~ assets + sector + nation, data=Ornstein))


{{ partial "header.html" . }}
Our guide to setting up an account and installing the Barricade Agent.
Get real-time security notifications for your team, on any device.
What is an Agent? What does Barricade check for? Find out.
Our changelog showcases the latest releases from our team.
We're here to answer any questions you may have.


708_h59guo.py
class Solution:
def eatenApples(self, apples: List[int], days: List[int]) -> int:
n = len(apples)
q = []
count = 0
for i in range(n):
while q and q[0][0] < i:
heapq.heappop(q)
if apples[i] > 0:
heapq.heappush(q, (i + days[i] - 1, apples[i]))
if q:
rot_day, num = heapq.heappop(q)
count += 1
if num > 1 and rot_day > i:
heapq.heappush(q, (rot_day, num-1))
i = n
while q:
while q and q[0][0] < i:
heapq.heappop(q)
if q:
rot_day, num = heapq.heappop(q)
count += 1
if num > 1 and rot_day > i:
heapq.heappush(q, (rot_day, num-1))
i += 1
return count


To insert the time and date in a document
Move the insertion point to where you want to add the time and date.
On the
Edit
menu, click
Time/Date
.


Welcome to Creo Worship's tech site!
Creo Worship | Tenth Kids | Tenth Rehearsals
Schedule
Setup
Cleanup
Inputs
FAQ
Links
Last updated Jan 2020


Quote #1: All of Humanity's Problems Stem from Man's Inability to Sit Quietly in a Room Alone
This is the first post of a new subsection on quotes which had a lot of impact on me and which, hopefully, might help you as well. I'm going to try to not only throw quotes on you but provide a context and other useful surrounding information that might be able to enforce even more the wisdom behind these pearls of human knowledge.
The first one is the extremely simple — some might say that the writer's job is to simply put the obvious in evidence... —:
All of humanity's problems stem from man's inability to sit quietly in a room alone.There are some highlights to this deceptively simple quote which need emphasizing so they don't go unnoticed:
- Already at least since the 1670's, humanity's inability to focus was patent, even when it comes to geniuses such as Blaise Pascal — he might not have had this problem actually, he might have been referring to his colleagues only, but I will assume he was human like us.
-
The same message is found in many other artists' works.  - In a recent study, psychologists have found that our difficulties with respect to dealing with our own thoughts are so prevalent that we would rather receive physical pain than endure them. As I've learned during some of my loneliest moments of my one-year engineering exchange in Europe: you can change your country, friends and colleagues, but you will never escape from yourself and your own thoughts.
- Personally, what I take from this quote — and hope you do as well — is a very important reassurance from an accomplished master: if I do put the effort of applying my ass to the seat, I will eventually, at some point — fingers crossed —, be able to solve my problems.


GeometryLoader
GeometryLoader loads data} from a BIMserver
Constructor Summary
| Public Constructor | ||
| public |
|
Member Summary
| Public Members | ||
| public |
bimServerApi: * |
|
| public |
|
|
| public |
|
|
| public |
dataToInfo: * |
|
| public |
|
|
| public |
geometryIds: * |
|
| public |
|
|
| public |
loaderId: * |
|
| public |
|
|
| public |
|
|
| public |
objectAddedListeners: *[] |
|
| public |
|
|
| public |
preparedBuffer: {} |
|
| public |
promise: * |
|
| public |
|
|
| public |
query: * |
|
| public |
renderLayer: * |
|
| public |
resolve: * |
|
| public |
roids: * |
|
| public |
settings: * |
|
| public |
state: {} |
|
| public |
stats: * |
|
| public |
topicId: * |
|
| public |
|
Method Summary
| Public Methods | ||
| public |
binaryDataListener(data: *) |
|
| public |
createObject(roid: *, oid: *, objectId: *, geometryIds: *, matrix: *, hasTransparency: *, type: *, aabb: *, inCompleteBuffer: *) |
|
| public |
geometryDataIdResolved(geometryDataId: *) |
|
| public |
getPromise(): * |
|
| public |
processMessage(stream: *): * |
|
| public |
processPreparedBuffer(stream: *, hasTransparancy: *) |
|
| public |
processPreparedBufferInit(stream: *, hasTransparancy: *) |
|
| public |
readColors(stream: *, type: *): * |
|
| public |
readEnd(data: *) |
|
| public |
readGeometry(stream: *, roid: *, croid: *, geometryId: *, geometryDataOid: *, hasTransparency: *, reused: *, type: *, useIntForIndices: *) |
|
| public |
readObject(stream: *, geometryType: *) |
|
| public |
|
|
| public |
start(): * |
Public Constructors
public constructor() source
Public Members
public bimServerApi: * source
public createdOpaqueObjects: * source
public createdTransparentObjects: * source
public dataToInfo: * source
public geometryCache: * source
public geometryIds: * source
public gpuBufferManager: * source
public loaderId: * source
public loaderSettings: * source
public multiplierToMm: * source
public objectAddedListeners: *[] source
public preparedBuffer: {} source
public promise: * source
public protocolVersion: * source
public query: * source
public renderLayer: * source
public resolve: * source
public roids: * source
public settings: * source
public state: {} source
public stats: * source
public topicId: * source
public vertexQuantizationMatrices: * source
Public Methods
public binaryDataListener(data: *) source
Params:
| Name | Type | Attribute | Description |
| data | * |
public createObject(roid: *, oid: *, objectId: *, geometryIds: *, matrix: *, hasTransparency: *, type: *, aabb: *, inCompleteBuffer: *) source
Params:
| Name | Type | Attribute | Description |
| roid | * | ||
| oid | * | ||
| objectId | * | ||
| geometryIds | * | ||
| matrix | * | ||
| hasTransparency | * | ||
| type | * | ||
| aabb | * | ||
| inCompleteBuffer | * |
public geometryDataIdResolved(geometryDataId: *) source
Params:
| Name | Type | Attribute | Description |
| geometryDataId | * |
public processPreparedBuffer(stream: *, hasTransparancy: *) source
Params:
| Name | Type | Attribute | Description |
| stream | * | ||
| hasTransparancy | * |
public processPreparedBufferInit(stream: *, hasTransparancy: *) source
Params:
| Name | Type | Attribute | Description |
| stream | * | ||
| hasTransparancy | * |
public readColors(stream: *, type: *): * source
Params:
| Name | Type | Attribute | Description |
| stream | * | ||
| type | * |
Return:
| * |
public readEnd(data: *) source
Params:
| Name | Type | Attribute | Description |
| data | * |
public readGeometry(stream: *, roid: *, croid: *, geometryId: *, geometryDataOid: *, hasTransparency: *, reused: *, type: *, useIntForIndices: *) source
Params:
| Name | Type | Attribute | Description |
| stream | * | ||
| roid | * | ||
| croid | * | ||
| geometryId | * | ||
| geometryDataOid | * | ||
| hasTransparency | * | ||
| reused | * | ||
| type | * | ||
| useIntForIndices | * |
public readObject(stream: *, geometryType: *) source
Params:
| Name | Type | Attribute | Description |
| stream | * | ||
| geometryType | * |


Fetch and Merge Changes
git fetch [alias]
git merge [branch]
git pull [remote]
Will synchronize your current branch with a remote repo pulling down any data you do not have locally. Either fetch then merge to help resolve conflicts or pull if no conflicts exist.
Set up Upstream
git remote add [name] [url]
If you want to share a locally created repo, or you want to take contributions from someone else's repo its best to add that repo as a remote. Works similarly to inheritance in classes.
Clone
git clone [url]
This command copies a git repository so that you can add to it easily.
Add and Commit
git status
git add [path]
git commit -m 'commit message'
git commit -am 'commit message'
Git status shows the changes that you have made to the flies in the current repo. The git add command stages the files to be committed. The add command is most commonly called as git add .
to add all files in the current directory. The git commit command updates the current branch to include all the changes. The -am flag on the commit adds and commits at the same time.
Checkout
git checkout -- [path]
git co -- [path]
git checkout [branch]
git co [branch]
Switch to a new branch or drop changes before staging
Branching
git branch [branch] => new branch
git branch -v => prints last commit on each branch
git branch -d [branch] => deletes branch
git branch => lists all branches
List, create, and manage different working branches.
Initialize
git init
Use this command to set up a new repository in the current directory. This adds a .git file to the current directory that tracks all changes and the repo is automatically named after the folder it is created in.


Welcome to DaltonTab! DaltonTab is your home base for all of your school work. During this setup, feel free to jump around between categories, and you dont have to fill them all in. We hope that you love DaltonTab!
Connect DaltonTab to schedules to add your schedule to your new tab page.
Connect DaltonTab to PlanHub to add your assignments and classes to your new tab page.
Sign in to CoursesConnect DaltonTab to PlanHub to add your assignments to your new tab page.
To get started, open a new tab.


Simple overlay instructions for your apps (with steps).
Chardin.js is a jQuery plugin that creates a simple overlay to display instructions on existent elements. It is inspired by the recent Gmail new composer tour which I loved.
Simple! Fork this repo or download chardinjs.css and chardinjs.min.js and add the following assets to your HTML:
```HTML
```
There’s a chardinjs-rails
gem.
If you choose to fork the repo you can build the assets running
rake compile
Add the instructions to your elements:
data-intro
: Text to show with the instructions
data-position
: (left
, top
, right
, bottom
), where to place the text with respect to the element
HTML
<img src="img/chardin.png" data-intro="An awesome 18th-century painter, who found beauty in everyday, common things." data-position="right" />
Once you have your elements ready you can show instructions running
Javascript
$('body').chardinJs('start')
If you would rather run ChardinJs confined to a particular container (instead of using the whole document) you can
change body
to some other selector.
Javascript
$('.container').chardinJs('start')
Start ChardinJs in the selector.
Toggle ChardinJs.
Make your best guess. That’s right! Stops ChardinJs in the selector.
Triggered when chardinJs is correctly started.
Triggered when chardinJs is stopped.
If you want to contribute, please:
Copyright 2013 Pablo Fernandez
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


extends dev/bot/parent.html ?> def head-child ?> undef ?> def config ?>
The various panels to display to your users.