Who we are?
The company was promoted by a group of senior IT and Management professionals, with years of rich and diverse experience. We aspire to deliver complex services and solutions across industry sectors which include Corporate Houses, Small and Medium Enterprises and the Government Sector.With a team of highly experienced and honest professionals we believe in moving forward by making our customers Move Forward.
Clients today are understandably cautious in their investments and focused on tangible business outcomes. Avanzar provides its clients with cost effective IT Enabled Services and Application Management Solutions that clearly identify areas for improved business value, quantify the expected returns, and accelerate results.
We are driven by relationships based on our Core Values of Honesty, Transparency, Understanding, Excellence & Quality.
things we do
Implementation, Industry Solutions, Integration
Application Maintenance Support with Continuous Improvement
Framework for integrating information, people and processes across organizational boundaries, designed to aggregate and personalize information through application-specific content
Enable non-technical users to author, collaborate, and administor websites with little training and knowledge of Web Programming Languages
Enable Organizations to capture, preserve, deliver and dispose documents and knowledge artifacts with ease
What we do
Our consulting capabilities transform businesses to meet tomorrow's challenges today
Provide advanced technology solutions in a cost effective manner following agile methodology
Creating, deploying and operating an organization’s IT infrastructure, software and resources through the cloud
Deploy and engage high quality consultants with niche skills backed with continuous SME support
Organising, planning & managing projects to identify, manage and control the Risk, Quality, Integration & Changes
Methods to maintain and improve application systems focussing on creating value
Mobile enabled solutions to improve the quality of business intelligence in the organization and facilitate faster decision making.
Our Architecture Services brings you total transparency over your processes and enables you to make decisions based on your business needs rather than technology features
Are off-the-shelf solutions restricting your business operations? We provides end-to-end software development services that can be tailored based on your internal skills and requirements
Who do we work with?
Love to hear from you
39/3A Raj Krishna Chatterjee Road, Kolkata 700 042
+91<PHONE_NUMBER>
info@avanzarit.in


python_webex_bot
A python3 library meant to help you create a cisco webex teams bot and take advantage of some of the features available to these bots. Most of the python libraries setup for webex have been lacking in terms of connecting you to a webhook and this aims at solving that
Installation and setup
The following are items this documentation assumes you already have installed: - virtualenv - python3 - ngrok
Step 1: setup the virtual environment
to initialize the virtual environment, run the following command in your Command Line or Command Prompt
virtualenv venv
then we activate it:
Windows
venv\Scripts\activate
Linux
source venv/bin/activate
and there, you have your virtual environment setup and ready for action
Step 2: install python_webex_bot
while still in your activated virtual environment, run the following command to install python_webex_bot via pip:
pip install python_webex_bot
then download ngrok which will be used in the concurrent steps
Quickstart
Lets get a simple bot up, running and responsive on our local machine.
Step 1: Create the bot on Cisco Webex
If you haven't already, create your Webex account. Then head on to create your bot
You should be provided with an access token for the bot.
Take this access token and place it in your environment variable as auth_token.
this can be done via your Command prompt or Command Line as:
export auth_token=my_auth_token
If you're on Windows, run the following on the command prompt:
set auth_token=my_auth_token
replace my_auth_token with your bots access token
This is a crutial part of running your bot as the python_webex_bot library uses this to identify your bot
If you still have some questions on environment variables, why we need them and how to use them, this may be a good start
Step 2: setup ngrok
in a different terminal from the one used in steps 1 and 2, navigate to the folder where you have the ngrok placed.
Then run the following command:
ngrok http 5000
This should produce an output similar to the one shown below:
Session Status online
Session Expires 7 hours, 59 minutes
Update update available (version 2.3.25, Ctrl-U to update)
Version 2.3.18
Region United States (us)
Web Interface http://<IP_ADDRESS>:4040
Forwarding http://87a942a1.ngrok.io -> http://localhost:5000
Forwarding https://87a942a1.ngrok.io -> http://localhost:5000
Connections ttl opn rt1 rt5 p50 p90
0 0 0.00 0.00 0.00 0.00
Now you are ready for the quest
Step 3: create the python file and run it
Create a python file where you intend to run the bot. In my case, I will name my file run.py
copy and paste the following code:
from python_webex.v1.Bot import Bot
from python_webex import webhook
bot = Bot() # the program will automatically know the bot being referred to y the auth_token
# create a webhook to expose it to the internet
# rememer that url we got from step 2, this is where we use it. In my case it was http://87a942a1.ngrok.io.
# We will be creating a webhook that will be listening when messages are sent
bot.create_webhook(
name="quickstart_webhook", target_url="http://87a942a1.ngrok.io", resource="messages", event="created"
)
# we create a function that responds when someone says hi
# the room_id will automatically be filled with the webhook. Do not forget it
@bot.on_hears("hi")
def greet_back(room_id=None):
return bot.send_message(room_id=room_id, text="Hi, how are you doing?")
# We create a default response in case anyone types anything else that we have not set a response for
# this is done using * [ don't ask me what happend when someone sends '*' as the message, that's on my TODO]
@bot.on_hears("*")
def default_response(room_id=None):
return bot.send_message(room_id=room_id, text="Sorry, could not understand that")
# make the webhook know the bot to be listening for, and we are done
webhook.bot = bot
if __name__ == "__main__":
webhook.app.run(debug=True) # don't keep debug=True in production
Now, when we text our bot "hi", it will respond with "Hi, how are you doing?"
And when we text anything else, like "When can we meet up?" it will respond with "Sorry, I could not understand that"


vimesthesia
Copyright (c) 2017, mathpunk. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.


Web development refers to building, creating, and an maintaining websites. It includes aspects such as web design, web publishing, web programming, and database management.
While the terms "web developer" and "web designer" are often used synonymously, they do not mean the same thing. Technically, a web designer only designs website interfaces using HTML and CSS. A web developer may be involved in designing a website, but may also wri te web scripts in languages such as PHP and ASP. Additionally, a web developer may help maintain and update a database used by a dynamic website.
Web development includes many types of web content creation. Some examples include hand coding web pages in a text editor, building a website in a program like Dreamweaver, and updating a blog via a blogging website. In recent years, content management systems like WordPress, Drupal, and Joomla have also become popular means of web development. These tools make it easy for anyone to create and edit their own website using a web-based interface.
While there are several methods of creating websites, there is often a trade-off between simplicity and customization. Therefore, most large businesses do not use content management systems, but instead have a dedicated Web development team that designs and maintains the company's website(s). Small organizations and individuals are more likely to choose a solution like WordPress that provides a basic website template and simplified editing tools. NOTE: JavaScript programming is a type of web development that is generally not considered part of web design. However, a web designer may reference JavaScript libraries like jQuery to incorporate dynamic elements into a site's design.


Icon
Scrapped icon design for an upcoming company.
Scrapped icon design for an upcoming company.
Miscellaneous iOS Icons designed for personal use.
Minecraft Icon work-in progress. Coming soon.
Illustration practice in Adobe Fireworks.
Rethinking airport iconography. More coming soon.
A twitter client design mockup designed for personal use.
T-Shirt design created for the Hon. Kevin Rudd MP in his re-election campaign for Griffith.


| I l@ve RuBoard |
There's no denying it—applications are getting harder and harder to write. User interfaces in particular are becoming increasingly sophisticated. Twenty years ago, the average application would have a glass teletype interface (if it had an interface at all). Asynchronous terminals would typically provide a character interactive display, while pollable devices (such as the ubiquitous IBM 3270) would let you fill in an entire screen before hitting . Now, users expect graphical user interfaces, with context-sensitive help, cut and paste, drag and drop, OLE integration, and MDI or SDI. Users are looking for Web-browser integration and thin-client support.
All the time the applications themselves are getting more complex. Most developments now use a multitier model, possibly with some middleware layer or a transaction monitor. These programs are expected to be dynamic and flexible, and to interoperate with applications written by third parties.
Oh, and did we mention that we needed it all next week?
Developers are struggling to keep up. If we were using the same kind of tools that produced the basic dumb-terminal applications 20 years ago, we'd never get anything done.
So the tool makers and infrastructure vendors have come up with a magic bullet, the wizard. Wizards are great. Do you need an MDI application with OLE container support? Just click a single button, answer a couple of simple questions, and the wizard will automatically generate skeleton code for you. The Microsoft Visual C++ environment creates over 1,200 lines of code for this scenario, automatically. Wizards are hard at work in other contexts, too. You can use wizards to create server components, implement Java beans, and handle network interfaces— all complex areas where it's nice to have expert help.
But using a wizard designed by a guru does not automatically make Joe developer equally expert. Joe can feel pretty good—he's just produced a mass of code and a pretty spiffy-looking program. He just adds in the specific application functionality and it's ready to ship. But unless Joe actually understands the code that has been produced on his behalf, he's fooling himself. He's programming by coincidence. Wizards are a one-way street—they cut the code for you, and then move on. If the code they produce isn't quite right, or if circumstances change and you need to adapt the code, you're on your own.
We are not against wizards. On the contrary, we dedicate an entire section (Code Generators) to writing your own. But if you do use a wizard, and you don't understand all the code that it produces, you won't be in control of your own application. You won't be able to maintain it, and you'll be struggling when it conies time to debug.
Tip 50
Don't Use Wizard Code You Don't Understand
Some people feel that this is an extreme position. They say that developers routinely rely on things they don't fully understand—the quantum mechanics of integrated circuits, the interrupt structure of the processor, the algorithms used to schedule processes, the code in the supplied libraries, and so on. We agree. And we'd feel the same about wizards if they were simply a set of library calls or standard operating system services that developers could rely on. But they're not. Wizards generate code that becomes an integral part of Joe's application. The wizard code is not factored out behind a tidy interface—it is interwoven line by line with functionality that Joe writes.[4] Eventually, it stops being the wizard's code and starts being Joe's. And no one should be producing code they don't fully understand.
[4] However, there are other techniques that help manage complexity. We discuss two, beans and AOP, in Orthogonality.
If you have a GUI-building wizard available, use it to generate a skeleton application. Go through every line of code it produces. Do you understand it all? Could you have produced it yourself? Would you have produced it yourself, or is it doing things you don't need?
| I l@ve RuBoard |


A simple SDDL Parser which converts SDDL/Security descriptors/ACEs to a javascript object tree.
It's the SDDL equivolent of the awesome regex101
It allows you to decode SDDL strings on a whim, no more looking up the documentation and figuring out whats what.
If you want the source, or to submit fixes/improvements, just go here: https://github.com/mountainstorm/js.sddl


Presentations
I have included a list below of my previous presentations and any relevant links. This will be continually updated moving forward:
Presentation Slides
- Making MITRE ATT&CK Actionable (Behind paywall so unavailable)
- py-ews: A cross platform python package to interact with Exchange Web Services
- Hunting Phish Kits
- PowerShell vs Python: A side-by-side comparison
- Basics of Incident Handling
- Securing Windows with Group Policy
- atomic-operator: Atomic Red Team Python Execution Framework
Past Presentations
- Hunting PhishKits - 2022 CactusCon
- atomic-operator: Atomic Red Team Python Execution Framework - 2022 CactusCon
- Making MITRE ATT&CK Actonable - WWHF Weekly Showcase - 2022
- Securing Windows with Group Policy - 2021 CircleCityCon
- Hunting Phish Kits - 2021 BSidesKC
- Securing Windows with Group Policy - 2021 WildWest Hackin Fest Deadwood
- Making MITRE ATT&CK Actionable - 2020 Hacker Halted
- vOPCDE #3 - Search & Delete: eDiscovery using EWS & Graph APIs
- py-ews: A cross platform python package to interact with Exchange Web Services - 2019 BSidesSTL
- Hunting Phish Kits - 2019 DerbyCon
- PowerShell vs Python: A side-by-side comparison - 2019 BSides Springfield (Missouri) - No Video
- SECURING WINDOWS WITH (SOME) GROUP POLICY – 2018 SHOWMECON
- SECURING WINDOWS WITH (SOME) GROUP POLICY – 2018 BSIDESKC
- MOTIVATIONS & TACTICS OF PHISHING – 2017 MORENET ANNUAL CONFERENCE
- SECURING WINDOWS WITH GROUP POLICY – 2017 DERBYCON
- BASICS OF INCIDENT RESPONSE – 2017 BSIDESSTL
- (2) HALF DAY POWERSHELL TRAINING COURSE FOR 80+ - 2017 MU VET MED
- PPRT: POWERSHELL PHISHING RESPONSE TOOLKIT – 2016 SHOWMECON
- PPRT: POWERSHELL PHISHING RESPONSE TOOLKIT – 2016 CIRCLE CITY CON
- SECURING WINDOWS WITH GROUP POLICY – 2015 MORENET ANNUAL CONFERENCE


indices |
Array
|
<optional>
|
|
Array of indices of vertices of the n-dimensional graphical object.
Allows for vertices to be re-used across multiple segments.
Indices is divided to segments:
indices[0] is edges. Every edge is two indexes of the edge's vertices. Used in 1D objects and higher.
indices[1] is faces. Every face is three indexes of the edges from indices[0]. Used in 3D objects and higher.
indices[2] is bodies. Every bodie is four face indexes from indices[1]. Used in 4D objects and higher.
For example:
n = 1 line.
settings.object.geometry.position = [
[-0.5, 1],//0
[0.5]//1
]
settings.object.geometry.indices = [
[
0,//index of the settings.object.geometry.position[0] = [-0.5, 1]
1,//index of the settings.object.geometry.position[1] = [0.5]
]//0
]//0
n = 2 triangle
settings.object.geometry.position = [
[-0.7, 0.2],//0
[0.8, 0.6],//1
[0.1, -0.5]//2
],
//edges
settings.object.geometry.indices[0] = [
[0, 1],//0 index of the settings.object.geometry.positions [-0.7, 0.2] and [0.8, 0.6]
[0, 2],//1 index of the settings.object.geometry.positions [-0.7, 0.2] and [0.1, -0.5]
[1, 2] //2 index of the settings.object.geometry.positions [0.8, 0.6] and [0.1, -0.5]
]
n = 3 tetrahedron.
settings.object.geometry.position = [
[0.8, -0.6, 0.1],//0
[0.9, 0.7, 0.5],//1
[0.8, 0, -0.4],//2
[-0.6, 0.1, 0.1]//3
],
//edges
settings.object.geometry.indices[0] = [
[0, 1]//0 index of the settings.object.geometry.positions [0.8, -0.6, 0.1] and [0.9, 0.7, 0.5]
[0, 2]//1 index of the settings.object.geometry.positions [0.8, -0.6, 0.1] and [0.8, 0, -0.4]
[0, 3]//2 index of the settings.object.geometry.positions [0.8, -0.6, 0.1] and [-0.6, 0.1, 0.1]
[1, 2]//3 index of the settings.object.geometry.positions [0.9, 0.7, 0.5] and [0.8, 0, -0.4]
[1, 3]//4 index of the settings.object.geometry.positions [0.9, 0.7, 0.5] and [-0.6, 0.1, 0.1]
[2, 3]//5 index of the settings.object.geometry.positions [0.8, 0, -0.4] and [-0.6, 0.1, 0.1]
]
//faces. Indices of the edges settings.object.geometry.indices[0]
settings.object.geometry.indices[1] = [
[0, 1, 3]//tetrahedron's face 0
[0, 2, 4]//tetrahedron's face 1
[3, 4, 5]//tetrahedron's face 2
[1, 2, 5]//tetrahedron's face 3
]
n = 4 pentachoron 5-cell.
settings.object.geometry.position = [
[0.8, -0.6, 0.1, -0.85],//0
[0.9, 0.7, 0.5, -0.55],//1
[0.8, 0, -0.4, 0],//2
[-0.6, 0.1, -0.3, 0.55],//3
[-0.5, 0.2, 0.3, 0.85],//4
],
//edges
settings.object.geometry.indices[0] = [
[0, 1]//0 index of the settings.object.geometry.positions [0.8, -0.6, 0.1, -0.85] and [0.9, 0.7, 0.5, -0.55]
[0, 2]//1 index of the settings.object.geometry.positions [0.8, -0.6, 0.1, -0.85] and [0.8, 0, -0.4, 0]
[0, 3]//2 index of the settings.object.geometry.positions [0.8, -0.6, 0.1, -0.85] and [-0.6, 0.1, -0.3, 0.55]
[0, 4]//3 index of the settings.object.geometry.positions [0.8, -0.6, 0.1, -0.85] and [-0.5, 0.2, 0.3, 0.85]
[1, 2]//4 index of the settings.object.geometry.positions [0.9, 0.7, 0.5, -0.55] and [0.8, 0, -0.4, 0]
[1, 3]//5 index of the settings.object.geometry.positions [0.9, 0.7, 0.5, -0.55] and [-0.6, 0.1, -0.3, 0.55]
[1, 4]//6 index of the settings.object.geometry.positions [0.9, 0.7, 0.5, -0.55] and [-0.5, 0.2, 0.3, 0.85]
[2, 3]//7 index of the settings.object.geometry.positions [0.8, 0, -0.4, 0] and [-0.6, 0.1, -0.3, 0.55]
[2, 4]//8 index of the settings.object.geometry.positions [0.8, 0, -0.4, 0] and [-0.5, 0.2, 0.3, 0.85]
[3, 4]//9 index of the settings.object.geometry.positions [-0.6, 0.1, 0.1, 0.55] and [-0.5, 0.2, 0.3, 0.85]
]
//faces. Indices of the edges settings.object.geometry.indices[0]
settings.object.geometry.indices[1] = [
[7, 8, 9],//0 no 0, 1 vertices
[5, 6, 9],//1 no 0, 2 vertices
[4, 6, 8],//2 no 0, 3 vertices
[4, 5, 7],//3 no 0, 4 vertices
[2, 3, 9],//4 no 1, 2 vertices
[1, 3, 8],//5 no 1, 3 vertices
[1, 2, 7],//6 no 1, 4 vertices
[0, 3, 6],//7 no 2, 3 vertices
[0, 2, 5],//8 no 2, 4 vertices
[0, 1, 4],//9 no 3, 4 vertices
]
//bodies. Indices of the faces settings.object.geometry.indices[1]
settings.object.geometry.indices[2] = [
[2, 1, 3, 0],//0 no 0 vertice
[5, 6, 4, 0],//1 no 1 vertice
[8, 7, 1, 4],//2 no 2 vertice
[9, 7, 2, 5],//3 no 3 vertice
[9, 8, 3, 6],//4 no 4 vertice
]
|


Pronounced / ah-sim /
I love taking photos. Now, it's not my passion, but who says you need to be passionate about something you love to do? Some days i take photos, some days i don't. once in a while, people offer me money to take pictures of their weddings or bat mitzvahs, or other events. sometimes i do them, sometimes i don't. Hey, i'm a busy guy: i travel, i work, i... don't really know what else to tell you. how about this: if you would like me to photograph your event, send me an email and i'll get back to you.
asim . frames @ gmail


import Data.List (maximumBy)
import Data.Ord (comparing)
main = do putStrLn $ "Collatz sequence for 27: "
++ ((show.hailstone) 27)
++ "\n"
++ "The number "
++ (show longestChain)
++" has the longest hailstone sequence"
++" for any number less then 100000. "
++"The sequence has length "
++ (show.length.hailstone $ longestChain)
hailstone = takeWhile (/=1) . (iterate collatz)
where collatz n = if even n then n `div` 2 else 3*n+1
longestChain = fst $ maximumBy (comparing snd) $
map ((\x -> (x,(length.hailstone) x))) [1..100000]
(defun hailstone (n)
(cond ((= n 1) '(1))
((evenp n) (cons n (hailstone (/ n 2))))
(t (cons n (hailstone (+ (* 3 n) 1))))))
(defun longest (n)
(let ((k 0) (l 0))
(loop for i from 1 below n do
(let ((len (length (hailstone i))))
(when (> len l) (setq l len k i)))
finally (format t "Longest hailstone sequence under ~A for ~A, having length ~A." n k l))))
#load "nums.cma";;
open Num;;
(* generate Hailstone sequence *)
let hailstone n =
let one = Int 1
and two = Int 2
and three = Int 3 in
let rec g s x =
if x =/ one
then x::s
else g (x::s) (if mod_num x two =/ one
then three */ x +/ one
else x // two)
in
g [] (Int n)
;;
(* compute only sequence length *)
let haillen n =
let one = Int 1
and two = Int 2
and three = Int 3 in
let rec g s x =
if x =/ one
then s+1
else g (s+1) (if mod_num x two =/ one
then three */ x +/ one
else x // two)
in
g 0 (Int n)
;;
(* max length for starting values in 1..n *)
let hailmax =
let rec g idx len = function
| 0 -> (idx, len)
| i ->
let a = haillen i in
if a > len
then g i a (i-1)
else g idx len (i-1)
in
g 0 0
;;
hailmax 100000 ;;
(* - : int * int = (77031, 351) *)
List.rev_map string_of_num (hailstone 27) ;;
(* - : string list =
["27"; "82"; "41"; "124"; "62"; "31"; "94"; "47"; "142"; "71"; "214"; "107";
"322"; "161"; "484"; "242"; "121"; "364"; "182"; "91"; "274"; "137"; "412";
"206"; "103"; "310"; "155"; "466"; "233"; "700"; "350"; "175"; "526"; "263";
"790"; "395"; "1186"; "593"; "1780"; "890"; "445"; "1336"; "668"; "334";
"167"; "502"; "251"; "754"; "377"; "1132"; "566"; "283"; "850"; "425";
"1276"; "638"; "319"; "958"; "479"; "1438"; "719"; "2158"; "1079"; "3238";
"1619"; "4858"; "2429"; "7288"; "3644"; "1822"; "911"; "2734"; "1367";
"4102"; "2051"; "6154"; "3077"; "9232"; "4616"; "2308"; "1154"; "577";
"1732"; "866"; "433"; "1300"; "650"; "325"; "976"; "488"; "244"; "122";
"61"; "184"; "92"; "46"; "23"; "70"; "35"; "106"; "53"; "160"; "80"; "40";
"20"; "10"; "5"; "16"; "8"; "4"; "2"; "1"] *)
fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>
where Self: Sized, U: IntoIterator, F: FnMut(Self::Item) -> U,
{
FlatMap{iter: self, f: f, frontiter: None, backiter: None }
}
impl<'a, T: ?Sized, U: ?Sized> AsRef<U> for &'a T where T: AsRef<U> {
fn as_ref(&self) -> &U {
<T as AsRef<U>>::as_ref(*self)
}
}
Garbage Collected
Statically Typed ...
... strong type inference
Null-free
Rivals C in performance


Rhinelander City Hall secured during records search
RHINELANDER, Wis. - Rhinelander City Hall was secured while Oneida County sheriff's deputies and others executed search warrants for records pertaining to an investigation into public record tampering and misconduct in office.
Chief Deputy Dan Hess says two search warrants were executed Thursday with help from Vilas and Marathon County deputies and the digital forensic team at the Wisconsin Division of Criminal Investigation.
WSAW-TV reports the building was cleared as the searches were conducted. Authorities haven't said more about the details of the investigation and who is being targeted.


Generates distance matrices from shape files and represents spatially weighted multilevel analysis results (see 'spacom')
| Version: | 0.5-8 |
| Depends: | R (≥ 2.15-0), rgeos, classInt, sp, maptools, geosphere |
| Enhances: | spacom |
| Published: | 2015-06-24 |
| Author: | Davide Morselli [aut, cre], Mathieu Cossuta [aut], Till Junge [aut], Sandra Penic [aut], Guy Elcheroth [ctb], Stephanie Glaeser [ctb] |
| Maintainer: | Davide Morselli <davide.morselli at unil.ch> |
| License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
| NeedsCompilation: | no |
| Materials: | NEWS |
| In views: | Spatial |
| CRAN checks: | geospacom results |
| Reference manual: | geospacom.pdf |
| Package source: | geospacom_0.5-8.tar.gz |
| Windows binaries: | r-devel: geospacom_0.5-8.zip, r-release: geospacom_0.5-8.zip, r-oldrel: geospacom_0.5-8.zip |
| OS X binaries: | r-release: geospacom_0.5-8.tgz, r-oldrel: geospacom_0.5-8.tgz |
| Old sources: | geospacom archive |
Please use the canonical form https://CRAN.R-project.org/package=geospacom to link to this page.


ngModel: creating implist FormContorl name: adding ngModel with an attrbiute name=".." enable to distigush the directive from others. This all need to add to set template-driven approch for validation. require: a field indicate to angular that this field is require #firstName (change)="log(firstName)": adding a template variable just to log the value of ngModel When type name in the firstName input you can check the console about the ngModel FormControl object. The 'control' field is of type control. add valid validation
First Name is Require ..
 this render the div if !firstName.valid and the input is 'touched'. <form>
 First Name <input require ngModel name="firstName" #firstName (change)="log(firstName)" class="form-control" type="text" id="firstName">
First Name is Require ..

 Comment <textarea ngModel name="comment" id="" cols="30" rows="10" class="form-control"></textarea>
 <button class="btn btn-primary">Submit<button> </form>


Java | C/C++ | Javascript | HTML5/CSS3 | SQL | PHP
Android SDK/NDK | Spring | RabbitMQ | OpenCV | Linux/Mac | AWS | MyBatis
Git | MySQL | Servelt/Jsp | Design Patterns | Object-Oriented Programming | JNI | Logback | Maven
Developed Android Application And Server Program communicating over RESTful API
Designed and Implemented RESTful API
Designed webpage using HTML5/CSS3/Javascript.
Develped Android Locker Applicatoin
Implemented re-usable Image Editing Module
Researched Marker-less Based Feature Tracking Solution for Mobile AR
Researched based 3D Model Retrieval for Filtering System
Researched Monitoring System
Researched based 3D Model Retrieval for Filtering System
Project Manager
Application Tester
Power Supplier for Team
Team Communicator


The only thing surprising about "Saving Private Ryan" is how conventional it is. I fully expected a much more "noir" vision of WWII along the lines of Oliver Stone's "Platoon." What I saw was an updated version of such 1950s classics as "Walk in the Sun," written by Robert Rossen, the CP'er who named names.
"Walk in the Sun," also known as "Salerno Beachhead," just about defines this genre.  The enemy is faceless and evil. Our soldiers, by the same token, are good boys who are just trying to get home. The reason that CP'ers were so adept at turning out this sort of patriotic pap is that they had bought into the myth of FDR's "fight for freedom." So patriotic were the CP'ers that they also backed the decision to intern Japanese-Americans.
The buzz about Spielberg's movie is clearly related to his decision to make battle wounds much more graphic than ever before. This decision roughly parallels the breakthrough made by Bertolucci in "Last Tango in Paris" to depict sexuality openly and honestly. The question of what is more jarring--Brando in full-frontal nudity or a soldier's intestines spilling out of his midsection--I will leave to others.
A war movie ultimately relies on the same dramatic tensions as slasher or science-fiction movies. The audience is at the edge of its seat waiting for the next sniper's bullet to tear through the flesh of one of the "good guys." The suspense is similar to that which awaits us for the next moment when "Halloween's" Michael Myers will come barreling out of a closet with a kitchen knife in hand. Who will get slashed in the throat next? The most interesting variation on this theme is the film "Aliens" which blends monsters from outer space and "Walk in the Sun" war movie conventions. The acid-spitting monsters of this film are stand-ins for Nazis or Japs. All the soldiers want to do is complete "their job" successfully and return home, in this case planet Earth.
Since the aesthetic dimensions of "Saving Private Ryan" are so underwhelming, the more interesting question becomes one of Steven Spielberg's motivation in turning out such a retro movie. What would compel a director working in 1998 to recycle themes from the immediate post-WWII period?
It is not really too hard to figure out. When Spielberg is not turning out escapist fantasies like the lovely "ET" or "Close Encounters of the Third Kind," he is functioning as a latter-day Frank Capra spinning out morality tales to mold public opinion.
Movies like "Amistad," "Schindler's List" and "Saving Private Ryan" all basically put forward the same message, namely that the wealthy and the powerful are the ultimate guardians of what's decent and humane. In "Amistad," this role is assigned to John Quincy Adams who stands up for the slaves. In "Schindler's List," it is the industrialist who delivers the Jews.
General George Marshall, while a secondary character in "Saving Private Ryan," puts the dramatic narrative into motion through his decent and humane decision to remove Private James Ryan from the battlefield after his three brothers have been killed in action. Marshall tells his fellow officers that he didn't want to be in the same situation that faced Lincoln when he informed a mother that all of her sons had been killed in Civil War fighting.
Once this decision is reached, Captain Miller (Tom Hanks) and a group of soldiers are sent on their way to track down Private Ryan and send him back home. Their trek through hostile territory is familiar territory to anybody who has sat through the 1950s classics. Unfortunately, "Saving Private Ryan" does not even achieve the level of character development of a film like "Walk in the Sun." The stories about life back home are much more interesting in Rossen's screenplay. This should not come as any great surprise because the Hollywood Reds were some of the most accomplished writers ever to work in tinseltown.
Standing above this film like a canopy are a whole set of assumptions about American "decency." Not only is General George Marshall decent enough to rescue a single GI from the fighting, the GI's themselves are also more decent than the despicable Nazis. There is one plot device that drives this point home. Hank's men have captured a German soldier. They want to kill him but Hanks says that this would not be right and sends him off. In the climax of the film, this soldier turns up again and plunges a knife into one of the "good guys" in hand-to-hand combat. After he is captured once again, a GI shoots him in cold blood. The moral of the story is that it is forgivable to shoot Germans in this manner because they are embodiments of pure evil, just as they were in "Schindler's Tale,"
There is no doubt that Spielberg decided to make such a patriotic movie because he is concerned about the widespread erosion of confidence in elected officials in American society. Warren Beatty, another Hollywood mover-and-shaker, tackled the same job in "Bulworth." "Bulworth" attempts to restore people's belief in the system by holding up a "contrary" politician as an example. This politician decides to tell the truth no matter what. This, of course, is pure Capra territory.
The reason that WWII is so important to Spielberg is that this period was the last time when genuine national unity prevailed. People rallied around their President and were willing to lie down their lives. Good workers were like good soldiers. They went to work in the factories without demanding "excess" raises. Anybody who struck during WWII was a traitor. After WWII the "bad guys" changed identity. No longer was it the sneering blond beast of the Wehrmacht. Instead it was the fanatical Chinese soldier or Russian superspy.
In order to get people thinking in this mode once again, Spielberg can not churn out conventional narratives of the 1950s style. Instead they have to be gussied up with trendy camera work and a pulsating film score. It is also necessary to draft the most likable actor in Hollywood to play the lead. If there is one thing you can say about Tom Hanks, it is that the public finds him easy to like. Although speaking for myself I would have to say that after Hanks's recent gee-whiz promotion of Nazi party official Werner Von Braun's NASA and this lateest patriotic pap served up by Spielberg, it seems like he is angling to become the new John Wayne.
Louis Proyect
(http://www.panix.com/~lnp3/marxism.html)
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


{{ define "main" }} {{ partial "site/breadcrumbs.html" . }}
Global Governance Lab members are engaged in projects related to issues in international development. Ongoing and closed projects are listed on this page.
{{ $open := (where .Pages "Params.project.status" "==" "open") }} {{ $openCount := len $open }} {{ if gt $openCount 0 }}


Recipe 11.1. Showing a Progress Indicator on a Text Console
Credit: Larry Bates
Problem
Your program has
no GUI (i.e., your program just runs on a text console), and yet you
want your program to show to the user a "progress
indicator bar" during lengthy operations, to
communicate that work is progressing and the amount of the total work
that has been completed.
Solution
We can easily code a simple little class to handle this whole task:
import sys
class progressbar(object):
def _ _init_ _(self, finalcount, block_char='.'):
self.finalcount = finalcount
self.blockcount = 0
self.block = block_char
self.f = sys.stdout
if not self.finalcount: return
self.f.write('\n------------------ % Progress -------------------1\n')
self.f.write(' 1 2 3 4 5 6 7 8 9 0\n')
self.f.write('----0----0----0----0----0----0----0----0----0----0\n')
def progress(self, count):
count = min(count, self.finalcount)
if self.finalcount:
percentcomplete = int(round(100.0*count/self.finalcount))
if percentcomplete < 1: percentcomplete = 1
else:
percentcomplete=100
blockcount = int(percentcomplete//2)
if blockcount <= self.blockcount:
return
for i in range(self.blockcount, blockcount):
self.f.write(self.block)
self.f.flush( )
self.blockcount = blockcount
if percentcomplete == 100:
self.f.write("\n")
Discussion
Here is an
example of the use of this progressbar class,
presented, as usual, with a guard of if _ _name_ _ == '_
_main_ _'. We can make it part of the module containing the
class and have it run when the module is executed as a
"main script":
if _ _name_ _ == "_ _main_ _":
from time import sleep
pb = progressbar(8, "*")
for count in range(1, 9):
pb.progress(count)
sleep(0.2)
pb = progressbar(100)
pb.progress(20)
sleep(0.3)
pb.progress(47)
sleep(0.3)
pb.progress(90)
sleep(0.3)
pb.progress(100)
print "testing 1:"
pb = progressbar(1)
pb.progress(1)
Programs that run lengthy operations, such as FTP downloads and
database insertions, should normally give visual feedback to the user
regarding the progress of the task that is running. GUI toolkits
generally have such facilities included as
"widgets", but if your program does
not otherwise require a GUI, it's overkill to give
it one just to be able to display a progress bar. This
recipe's progress bar class provides an easy way of
showing the percentage of completion that is updated periodically by
the program.
The recipe operates on the basis of a totally arbitrary final count
that the ongoing task is supposed to reach at the end. This makes it
optimally easy for the application that makes use of the
progressbar class: the application can use any handy
unit of measure (such as amount of bytes downloaded for an FTP
download, number of records inserted for a database insertion, etc.)
to track the task's progress and completion. As long
as the same unit of measure applies to both the
"final count" and the
count argument that the application must
periodically pass to the progress method, the
progress bar's display will be accurate.
See Also
Documentation on text-mode console I/O in Python in a
Nutshell.
|


Home
Research
News
Gallery
About
Donate
For press inquiries, contact Morgan W. Grogan<EMAIL_ADDRESS>202-836-9890


WITNESS LIST Constitutional Revision, Select Committee March 1, 1999-1:00P 1876 Constitution On: May, Janice (Self) McKnight, Joseph (Self)


Sometimes I paint.
8x10, Acrylic, Jan 2017
5x7, Acrylic, Jan 2017
5x7, Acrylic, Sept 2016
8x10, Acrylic, Sept 2016
8x10, Acrylic, June 2016
5x7, Acrylic, June 2016
4x6, Watercolor, Aug 2015
5x7, Acrylic, Feb 2015
8x10, Acrylic, Apr 2014
14x14, Silk, Apr 2014
5x7, Arcylic, Apr 2014
Acrylic, 8x10, Jan 2017
Acrylic, 5x7, Jan 2017
Acrylic, 5x7, Sept 2016
Acrylic, 8x10, Sept 2016
Acrylic, 8x10, June 2016
Acrylic, 5x7, June 2016
Watercolor, 4x6, Aug 2015
Acrylic, 5x7, Feb 2015
Acrylic, 8x10, Apr 2014
Silk, 14x14, Apr 2014
Acrylic, 5x7, Apr 2014


The 3go portal is a portal created by a young web-developer , the narrator of MY FAMILY AND I to assist students and businessmen in their dailytransactions such as helping them in easy messaging to people
across the world and so on.
Some characteristics of 3go portal
It helps in easy messaging
It is very fast and reliable
It registration in less time consuming.
Some things a subscriber must no before proceeding to our registration portal include:
He/she must know the date of birth.
They must no their contact info.
Of course your first name , middle name and last name must also be there.
ETC.
OUR REGISTRATION PORTAL
after registration u can actualy log into ur account by clicking:


Nokia Black Friday Deals Knocks £50 off the 4.2
by Shabana ArifNokia's budget mini flagship is now just £99.99 for the duration of Black Friday.
In reality, that means Tuesday, December 3, which is around the date that everyone else's Black Friday deals are wrapping up. The smartphone usually retails for £149.99 so it's a pretty good deal.
Available in Black and Pink Sand, the Nokia 4.2 features a dual-rear camera, biometric face unlock, and houses a Qualcomm Snapdragon 439 octa-core chipset, and it's powered by Android Pie. Participating retailers include Carphone Warehouse, John Lewis, Argos, Amazon, Very, AO.com.
Nokia is also reducing the price of its 7.2 and 6.2 handsets until December 3, although the offer isn't quite as generous, with just a £20 discount. Before you commit to buying anything, check out our Black Friday deals hub to make sure you don't miss the perfect sale for you.


mart
Home
About us
page
shop
blog
Contact us
❯
❮
Affordable Paris tours
city tours / tour tickets / tour guides
New collection
add to cart
blue tshirt
$26
add to cart
woman shirt
$31
add to cart
yellow tshirt
$21
add to cart
cool lingerie
$56


# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""This module contains classes and functions to standardize access to
configuration files for Astropy and affiliated packages.
.. note::
The configuration system makes use of the 'configobj' package, which stores
configuration in a text format like that used in the standard library
`ConfigParser`. More information and documentation for configobj can be
found at http://www.voidspace.org.uk/python/configobj.html.
"""
from __future__ import division
import re
import textwrap
from contextlib import contextmanager
from ..extern.configobj import configobj, validate
__all__ = ['ConfigurationItem', 'InvalidConfigurationItemWarning',
'ConfigurationMissingWarning', 'get_config', 'save_config',
'reload_config']
[docs]class InvalidConfigurationItemWarning(Warning):
""" A Warning that is issued when the configuration value specified in the
astropy configuration file does not match the type expected for that
configuration value.
"""
[docs]class ConfigurationMissingWarning(Warning):
""" A Warning that is issued when the configuration directory cannot be
accessed (usually due to a permissions problem). If this warning appears,
configuration items will be set to their defaults rather than read from the
configuration file, and no configuration will persist across sessions.
"""
# these are not in __all__ because it's not intended that a user ever see them
class ConfigurationDefaultMissingError(ValueError):
""" An exception that is raised when the configuration defaults (which
should be generated at build-time) are missing.
"""
#this is used in astropy/__init__.py
class ConfigurationDefaultMissingWarning(Warning):
""" A warning that is issued when the configuration defaults (which
should be generated at build-time) are missing.
"""
[docs]class ConfigurationItem(object):
""" A setting and associated value stored in the astropy configuration
files.
These objects are typically defined at the top of astropy subpackages
or affiliated packages, and store values or option settings that can be
modified by the user to
Parameters
----------
name : str
The (case-sensitive) name of this parameter, as shown in the
configuration file.
defaultvalue
The default value for this item. If this is a list of strings, this
item will be interpreted as an 'options' value - this item must be one
of those values, and the first in the list will be taken as the default
value.
description : str or None
A description of this item (will be shown as a comment in the
configuration file)
cfgtype : str or None
A type specifier like those used as the *values* of a particular key in
a `configspec` file of `configobj`. If None, the type will be inferred
from the default value.
module : str or None
The full module name that this item is associated with. The first
element (e.g. 'astropy' if this is 'astropy.config.configuration')
will be used to determine the name of the configuration file, while
the remaining items determine the section. If None, the package will be
inferred from the package within whiich this object's initializer is
called.
Raises
------
RuntimeError
If `module` is None, but the module this item is created from cannot
be determined.
Examples
--------
The following example will create an item 'cfgoption = 42' in the
'[configuration]' section of astropy.cfg (located in the directory that
`astropy.config.paths.get_config_dir` returns), or if the option is already
set, it will take the value from the configuration file::
from astropy.config import ConfigurationItem
CFG_OPTION = ConfigurationItem('cfgoption',42,module='astropy.configuration')
If called as ``CFG_OPTION()``, this will return the value ``42``, or some
other integer if the ``astropy.cfg`` file specifies a different value.
If this were a file ``astropy/configuration/__init__.py``, the `module`
option would not be necessary, as it would automatically detect the correct
module.
"""
#this is used to make validation faster so a Validator object doesn't
#have to be created every time
_validator = validate.Validator()
def __init__(self, name, defaultvalue='', description=None, cfgtype=None,
module=None):
from warnings import warn
from ..utils import find_current_module
from ..utils import isiterable
if module is None:
module = find_current_module(2)
if module is None:
msg1 = 'Cannot automatically determine get_config module, '
msg2 = 'because it is not called from inside a valid module'
raise RuntimeError(msg1 + msg2)
else:
module = module.__name__
self.name = name
self.module = module
self.description = description
#now determine cfgtype if it is not given
if cfgtype is None:
if (isiterable(defaultvalue) and not
isinstance(defaultvalue, basestring)):
#it is an options list
dvstr = [str(v) for v in defaultvalue]
cfgtype = 'option(' + ', '.join(dvstr) + ')'
defaultvalue = dvstr[0]
elif isinstance(defaultvalue, bool):
cfgtype = 'boolean'
elif isinstance(defaultvalue, int):
cfgtype = 'integer'
elif isinstance(defaultvalue, float):
cfgtype = 'float'
else:
cfgtype = 'string'
defaultvalue = str(defaultvalue)
self.cfgtype = cfgtype
self._validate_val(defaultvalue)
self.defaultvalue = defaultvalue
#note that the actual value is stored in the ConfigObj file for this
#package
#this checks the current value to make sure it's valid for the type
#as well as updating the ConfigObj with the default value, if it's not
#actually in the ConfigObj
try:
self()
except TypeError as e:
# make sure it's a TypeError from __call__
if 'Configuration value not valid:' in e.args[0]:
warn(InvalidConfigurationItemWarning(*e.args))
else:
raise
[docs] def set(self, value):
""" Sets the current value of this `ConfigurationItem`.
This also updates the comments that give the description and type
information.
.. note::
This does *not* save the value of this `ConfigurationItem` to the
configuration file. To do that, use `ConfigurationItem.save` or
`save_config`.
Parameters
----------
value
The value this item should be set to.
Raises
------
TypeError
If the provided `value` is not valid for this `ConfigurationItem`.
"""
try:
value = self._validate_val(value)
except validate.ValidateError as e:
msg = 'Provided value for configuration item {0} not valid: {1}'
raise TypeError(msg.format(self.name, e.args[0]))
sec = get_config(self.module)
sec[self.name] = value
sec.comments[self.name] = self._generate_comments()
@contextmanager
[docs] def set_temp(self, value):
"""
Sets this item to a specified value only inside a while loop.
Use as::
ITEM = ConfigurationItem('ITEM', 'default', 'description')
with ITEM.set_temp('newval'):
... do something that wants ITEM's value to be 'newval' ...
# ITEM is now 'default' after the with block
Parameters
----------
value
The value to set this item to inside the with block.
"""
initval = self()
self.set(value)
yield
self.set(initval)
[docs] def save(self, value=None):
""" Writes a value for this `ConfigurationItem` to the relevant
configuration file.
This also writes updated versions of the comments that give the
description and type information.
.. note::
This only saves the value of this *particular* `ConfigurationItem`.
To save all configuration settings for this package at once, see
`save_config`.
Parameters
----------
value
Save this value to the configuration file. If None, the current
value of this `ConfigurationItem` will be saved.
Raises
------
TypeError
If the provided `value` is not valid for this `ConfigurationItem`.
"""
try:
value = self() if value is None else self._validate_val(value)
except validate.ValidateError as e:
msg = 'Provided value for configuration item {0} not valid: {1}'
raise TypeError(msg.format(self.name, e.args[0]))
#Now find the ConfigObj that this is based on
baseobj = get_config(self.module)
secname = baseobj.name
cobj = baseobj
#a ConfigObj's parent is itself, so we look for the parent with that
while cobj.parent is not cobj:
cobj = cobj.parent
#use the current on disk version, which will be modified with the
#given value and type/description
newobj = configobj.ConfigObj(cobj.filename, interpolation=False)
if secname is not None:
if secname not in newobj:
newobj[secname] = {}
newsec = newobj[secname]
newsec[self.name] = value
newsec.comments[self.name] = self._generate_comments()
newobj.write()
[docs] def reload(self):
""" Reloads the value of this `ConfigurationItem` from the relevant
configuration file.
Returns
-------
val
The new value loaded from the configuration file.
"""
baseobj = get_config(self.module)
secname = baseobj.name
cobj = baseobj
#a ConfigObj's parent is itself, so we look for the parent with that
while cobj.parent is not cobj:
cobj = cobj.parent
newobj = configobj.ConfigObj(cobj.filename, interpolation=False)
if secname is not None:
newobj = newobj[secname]
baseobj[self.name] = newobj[self.name]
def __repr__(self):
out = '<{0}: name={1!r} value={2!r} at 0x{3:x}>'.format(
self.__class__.__name__, self.name, self(), id(self))
return out
def __str__(self):
out = '\n'.join(('{0}: {1}',
' cfgtype={2!r}',
' defaultvalue={3!r}',
' description={4!r}',
' module={5}',
' value={6!r}'))
out = out.format(self.__class__.__name__, self.name, self.cfgtype,
self.defaultvalue, self.description, self.module,
self())
return out
def __call__(self):
""" Returns the value of this `ConfigurationItem`
Returns
-------
val
This item's value, with a type determined by the `cfgtype`
attribute.
Raises
------
TypeError
If the configuration value as stored is not this item's type.
"""
#get the value from the relevant `configobj.ConfigObj` object
sec = get_config(self.module)
if self.name not in sec:
self.set(self.defaultvalue)
val = sec[self.name]
try:
return self._validate_val(val)
except validate.ValidateError as e:
raise TypeError('Configuration value not valid:' + e.args[0])
def _validate_val(self, val):
""" Validates the provided value based on cfgtype and returns the
type-cast value
throws the underlying configobj exception if it fails
"""
#note that this will normally use the *class* attribute `_validator`,
#but if some arcane reason is needed for making a special one for an
#instance or sub-class, it will be used
return self._validator.check(self.cfgtype, val)
def _generate_comments(self):
comments = []
comments.append('') # adds a blank line before every entry
if self.description is not None:
for line in textwrap.wrap(self.description, width=76):
comments.append(line)
if self.cfgtype.startswith('option'):
comments.append("Options: " + self.cfgtype[7:-1])
return comments
# this dictionary stores the master copy of the ConfigObj's for each
# root package
_cfgobjs = {}
[docs]def get_config(packageormod=None, reload=False):
""" Gets the configuration object or section associated with a particular
package or module.
Parameters
-----------
packageormod : str or None
The package for which to retrieve the configuration object. If a
string, it must be a valid package name, or if None, the package from
which this function is called will be used.
Returns
-------
cfgobj : `configobj.ConfigObj` or `configobj.Section`
If the requested package is a base package, this will be the
`configobj.ConfigObj` for that package, or if it is a subpackage or
module, it will return the relevant `configobj.Section` object.
Raises
------
RuntimeError
If `package` is None, but the package this item is created from cannot
be determined.
"""
from os.path import join
from warnings import warn
from .paths import get_config_dir
from ..utils import find_current_module
if packageormod is None:
packageormod = find_current_module(2)
if packageormod is None:
msg1 = 'Cannot automatically determine get_config module, '
msg2 = 'because it is not called from inside a valid module'
raise RuntimeError(msg1 + msg2)
else:
packageormod = packageormod.__name__
packageormodspl = packageormod.split('.')
rootname = packageormodspl[0]
secname = '.'.join(packageormodspl[1:])
cobj = _cfgobjs.get(rootname, None)
if cobj is None:
if _ASTROPY_SETUP_:
# There's no reason to use anything but the default config
cobj = configobj.ConfigObj(interpolation=False)
else:
try:
cfgfn = join(get_config_dir(), rootname + '.cfg')
cobj = configobj.ConfigObj(cfgfn, interpolation=False)
except (IOError, OSError) as e:
msg = ('Configuration defaults will be used, and '
'configuration cannot be saved due to ')
errstr = '' if len(e.args) < 1 else (':' + str(e.args[0]))
msg += e.__class__.__name__ + errstr
warn(ConfigurationMissingWarning(msg))
# This caches the object, so if the file becomes accessible, this
# function won't see it unless the module is reloaded
cobj = configobj.ConfigObj(interpolation=False)
_cfgobjs[rootname] = cobj
if secname: # not the root package
if secname not in cobj:
cobj[secname] = {}
return cobj[secname]
else:
return cobj
[docs]def save_config(packageormod=None, filename=None):
""" Saves all configuration settings to the configuration file for the
root package of the requested package/module.
This overwrites any configuration items that have been changed in
`ConfigurationItem` objects that are based on the configuration file
determined by the *root* package of `packageormod` (e.g. 'astropy.cfg' for
the 'astropy.config.configuration' module).
.. note::
To save only a single item, use the `ConfigurationItem.save` method -
this will save all options in the current session that may have been
changed.
Parameters
----------
packageormod : str or None
The package or module name - see `get_config` for details.
filename : str, optional
Save the config to a given filename instead of to the default location.
"""
sec = get_config(packageormod)
#look for the section that is its own parent - that's the base object
while sec.parent is not sec:
sec = sec.parent
if filename is not None:
with open(filename, 'w') as f:
sec.write(outfile=f)
else:
sec.write()
[docs]def reload_config(packageormod=None):
""" Reloads configuration settings from a configuration file for the root
package of the requested package/module.
This overwrites any changes that may have been made in `ConfigurationItem`
objects. This applies for any items that are based on this file, which is
determined by the *root* package of `packageormod` (e.g. 'astropy.cfg' for
the 'astropy.config.configuration' module).
Parameters
----------
packageormod : str or None
The package or module name - see `get_config` for details.
"""
sec = get_config(packageormod)
#look for the section that is its own parent - that's the base object
while sec.parent is not sec:
sec = sec.parent
sec.reload()
def get_config_items(packageormod=None):
""" Returns the `ConfigurationItem` objects associated with a particular
module.
Parameters
----------
packageormod : str or None
The package or module name or None to get the current module's items.
Returns
-------
configitems : dict
A dictionary where the keys are the name of the items as the are named
in the module, and the values are the associated `ConfigurationItem`
objects.
"""
import sys
from inspect import ismodule
from ..utils import find_current_module
if packageormod is None:
packageormod = find_current_module(2)
if packageormod is None:
msg1 = 'Cannot automatically determine get_config module, '
msg2 = 'because it is not called from inside a valid module'
raise RuntimeError(msg1 + msg2)
elif isinstance(packageormod, basestring):
__import__(packageormod)
packageormod = sys.modules[packageormod]
elif ismodule(packageormod):
pass
else:
raise TypeError('packageormod in get_config_items is invalid')
configitems = {}
for n, obj in packageormod.__dict__.iteritems():
#if it's not a new-style object, it's certainly not a ConfigurationItem
if hasattr(obj, '__class__'):
fqn = obj.__class__.__module__ + '.' + obj.__class__.__name__
if fqn == 'astropy.config.configuration.ConfigurationItem':
configitems[n] = obj
return configitems
def _fix_section_blank_lines(sec, recurse=True, gotoroot=True):
"""
Adds a blank line to the comments of any sections in the requested sections,
recursing into subsections if `recurse` is True. If `gotoroot` is True,
this first goes to the root of the requested section, just like
`save_config` and `reload_config` - this does nothing if `sec` is a
configobj already.
"""
if not hasattr(sec, 'sections'):
sec = get_config(sec)
#look for the section that is its own parent - that's the base object
if gotoroot:
while sec.parent is not sec:
sec = sec.parent
for isec, snm in enumerate(sec.sections):
comm = sec.comments[snm]
if len(comm) == 0 or comm[-1] != '':
if sec.parent is sec and isec == 0:
pass # don't do it for first section
else:
comm.append('')
if recurse:
_fix_section_blank_lines(sec[snm], True, False)
_unsafe_import_regex = [r'astropy\.sphinx\.ext.*',
r'astropy\.utils\.compat\._gzip_32',
r'astropy\.utils\.compat\._fractions_27',
r'.*.setup_package',
r'astropy\.version_helpers',
r'astropy\.setup_helpers'
]
_unsafe_import_regex = [('(' + pat + ')') for pat in _unsafe_import_regex]
_unsafe_import_regex = re.compile('|'.join(_unsafe_import_regex))
def generate_all_config_items(pkgornm=None, reset_to_default=False,
filename=None):
""" Given a root package name or package, this function walks
through all the subpackages and modules, which should populate any
ConfigurationItem objects defined at the module level. If
`reset_to_default` is True, it also sets all of the items to their default
values, regardless of what the file's value currently is. It then saves the
`ConfigObj`.
Parameters
----------
pkgname : str, module, or None
The package for which to generate configuration items. If None,
the package of the function that calls this one will be used.
reset_to_default : bool
If True, the configuration items will all be set to their defaults.
filename : str, optional
Save the generated config items to the given filename instead of to
the default config file path.
Returns
-------
cfgfn : str
The filename of the generated configuration item.
"""
from os.path import split
from types import ModuleType
from pkgutil import get_loader, walk_packages
from ..utils import find_current_module
if pkgornm is None:
pkgornm = find_current_module(1).__name__.split('.')[0]
if isinstance(pkgornm, basestring):
package = get_loader(pkgornm).load_module(pkgornm)
elif isinstance(pkgornm, ModuleType) and '__init__' in pkgornm.__file__:
package = pkgornm
else:
msg = 'generate_all_config_items was not given a package/package name'
raise TypeError(msg)
if hasattr(package, '__path__'):
pkgpath = package.__path__
elif hasattr(package, '__file__'):
pkgpath = split(package.__file__)[0]
else:
raise AttributeError('package to generate config items for does not '
'have __file__ or __path__')
for imper, nm, ispkg in walk_packages(pkgpath, package.__name__ + '.'):
if not _unsafe_import_regex.match(nm):
imper.find_module(nm)
if reset_to_default:
for cfgitem in get_config_items(nm).itervalues():
cfgitem.set(cfgitem.defaultvalue)
_fix_section_blank_lines(package.__name__, True, True)
save_config(package.__name__, filename=filename)
if filename is None:
return get_config(package.__name__).filename
else:
return filename
# this is not in __all__ because it's not intended that a user uses it
def update_default_config(pkg, default_cfg_dir_or_fn):
"""
Checks if the configuration file for the specified package exists, and if
not, copy over the default configuration.
Parameters
----------
pkg : str
The package to be updated.
default_cfg_dir_or_fn : str
The filename or directory name where the default configuration file is.
If a directory name, `pkg`.cfg will be used in that directory.
Returns
-------
updated : bool
If the profile needed to be updated, True, otherwise False.
Raises
------
ConfigurationDefaultMissingError
If the default configuration could not be found.
"""
import os
cfgfn = get_config(pkg).filename
if os.path.exists(cfgfn):
with open(cfgfn) as f:
doupdate = f.read() == ''
else:
doupdate = True
if doupdate:
if os.path.isdir(default_cfg_dir_or_fn):
default_cfgfn = os.path.join(default_cfg_dir_or_fn, pkg + '.cfg')
else:
default_cfgfn = default_cfg_dir_or_fn
if not os.path.isfile(default_cfgfn):
raise ConfigurationDefaultMissingError('Requested default configuration file {0} is '
'not a file.'.format(default_cfgfn))
with open(cfgfn, 'w') as fw:
with open(default_cfgfn) as fr:
fw.write(fr.read())
return True
else:
return False


Developer Student Club powered by Google Developers is an initiative to grow their knowledge on developer technologies and more through peer to peer workshops and events, and gain relevant industry experience. A Developer Students Club is a globally recognized student body which helps students to have the opportunity to not only learn development skills, but it also acts as a medium to apply them to real life problems by finding solutions, and then showcasing their work within their communities.By developing solutions for local businesses/organizations, the talented college students can now help the local community and have a hands-on experience for building real world applications.
Developer Student Club AKGEC is inspired by the Google Developers' Family.
The motive is to create a local ecosystem of Developers in and around the Campus. And having fun doing it.


Class: Concurrent::Actor::Behaviour::Pausing
- Defined in:
- lib-edge/concurrent/actor/behaviour/pausing.rb
Overview
Note:
TODO missing example
Allows to pause actors on errors. When paused all arriving messages are collected and processed after the actor is resumed or reset. Resume will simply continue with next message. Reset also reinitialized context.
Instance Method Summary collapse
-
#initialize(core, subsequent, core_options) ⇒ Pausing
constructor
A new instance of Pausing.
- #on_envelope(envelope) ⇒ undocumented
- #on_event(public, event) ⇒ undocumented
- #pause!(error = nil) ⇒ undocumented
- #paused? ⇒ Boolean
- #reset! ⇒ undocumented
- #restart! ⇒ undocumented
- #resume! ⇒ undocumented
Constructor Details
#initialize(core, subsequent, core_options) ⇒ Pausing
Returns a new instance of Pausing
11 12 13 14 15 |
# File 'lib-edge/concurrent/actor/behaviour/pausing.rb', line 11 def initialize(core, subsequent, ) super core, subsequent, @paused = false @deferred = [] end |
Instance Method Details
#on_envelope(envelope) ⇒ undocumented
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib-edge/concurrent/actor/behaviour/pausing.rb', line 21 def on_envelope(envelope) case envelope. when :pause! pause! when :paused? paused? when :resume! resume! when :reset! reset! when :restart! restart! else if paused? @deferred << envelope MESSAGE_PROCESSED else pass envelope end end end |
#on_event(public, event) ⇒ undocumented
72 73 74 75 76 |
# File 'lib-edge/concurrent/actor/behaviour/pausing.rb', line 72 def on_event(public, event) event_name, _ = event reject_deferred if event_name == :terminated super public, event end |
#pause!(error = nil) ⇒ undocumented
43 44 45 46 47 |
# File 'lib-edge/concurrent/actor/behaviour/pausing.rb', line 43 def pause!(error = nil) do_pause broadcast true, error || :paused true end |
#paused? ⇒ Boolean
17 18 19 |
# File 'lib-edge/concurrent/actor/behaviour/pausing.rb', line 17 def paused? @paused end |
#reset! ⇒ undocumented
56 57 58 59 60 61 62 |
# File 'lib-edge/concurrent/actor/behaviour/pausing.rb', line 56 def reset! return false unless paused? broadcast(false, :resetting) do_reset broadcast(true, :reset) true end |
#restart! ⇒ undocumented
64 65 66 67 68 69 70 |
# File 'lib-edge/concurrent/actor/behaviour/pausing.rb', line 64 def restart! return false unless paused? broadcast(false, :restarting) do_restart broadcast(true, :restarted) true end |
#resume! ⇒ undocumented
49 50 51 52 53 54 |
# File 'lib-edge/concurrent/actor/behaviour/pausing.rb', line 49 def resume! return false unless paused? do_resume broadcast(true, :resumed) true end |


{% extends "layout_bsa.html" %} {% block page_title %} NHS Penalty Charge Notice {% endblock %} {% block content %} BETA This is a new service – your feedback will help us to improve it. Back Challenge a Penalty Charge Notice Were you claiming any of these benefits (or named on them) between 1 December and 31 December 2018? Income Support Income-related Employment Support Allowance Universal Credit Income-based Jobseeker's Allowance Your partner’s Pension Credit Guarantee Credit award or no, none of these Cancel {% endblock %}
BETA This is a new service – your feedback will help us to improve it.
Challenge a Penalty Charge Notice
or
Cancel


tune_grid()
computes a set of performance metrics (e.g. accuracy or RMSE)
for a pre-defined set of tuning parameters that correspond to a model or
recipe across one or more resamples of the data.
tune_grid(object, ...) # S3 method for model_spec tune_grid( object, preprocessor, resamples, ..., param_info = NULL, grid = 10, metrics = NULL, control = control_grid() ) # S3 method for workflow tune_grid( object, resamples, ..., param_info = NULL, grid = 10, metrics = NULL, control = control_grid() )
| object | A |
|---|---|
| ... | Not currently used. |
| preprocessor | A traditional model formula or a recipe created using
|
| resamples | An |
| param_info | A |
| grid | A data frame of tuning combinations or a positive integer. The data frame should have columns for each parameter being tuned and rows for tuning parameter candidates. An integer denotes the number of candidate parameter sets to be created automatically. |
| metrics | A |
| control | An object used to modify the tuning process. |
An updated version of resamples
with extra list columns for .metrics
and
.notes
(optional columns are .predictions
and .extracts
). .notes
contains warnings and errors that occur during execution.
Suppose there are m tuning parameter combinations. tune_grid()
may not
require all m model/recipe fits across each resample. For example:
In cases where a single model fit can be used to make predictions for different parameter values in the grid, only one fit is used. For example, for some boosted trees, if 100 iterations of boosting are requested, the model object for 100 iterations can be used to make predictions on iterations less than 100 (if all other parameters are equal).
When the model is being tuned in conjunction with pre-processing and/or post-processing parameters, the minimum number of fits are used. For example, if the number of PCA components in a recipe step are being tuned over three values (along with model tuning parameters), only three recipes are are trained. The alternative would be to re-train the same recipe multiple times for each model tuning parameter.
The foreach
package is used here. To execute the resampling iterations in
parallel, register a parallel backend function. See the documentation for
foreach::foreach()
for examples.
For the most part, warnings generated during training are shown as they occur
and are associated with a specific resample when control(verbose = TRUE)
.
They are (usually) not aggregated until the end of processing.
If no tuning grid is provided, a semi-random grid (via
dials::grid_latin_hypercube()
) is created with 10 candidate parameter
combinations.
When provided, the grid should have column names for each parameter and
these should be named by the parameter name or id
. For example, if a
parameter is marked for optimization using penalty = tune()
, there should
be a column names tune
. If the optional identifier is used, such as
penalty = tune(id = 'lambda')
, then the corresponding column name should
be lambda
.
In some cases, the tuning parameter values depend on the dimensions of the
data. For example, mtry
in random forest models depends on the number of
predictors. In this case, the default tuning parameter object requires an
upper range. dials::finalize()
can be used to derive the data-dependent
parameters. Otherwise, a parameter set can be created (via
dials::parameters()
and the dials
update()
function can be used to
change the values. This updated parameter set can be passed to the function
via the param_info
argument.
To use your own performance metrics, the yardstick::metric_set()
function
can be used to pick what should be measured for each model. If multiple
metrics are desired, they can be bundled. For example, to estimate the area
under the ROC curve as well as the sensitivity and specificity (under the
typical probability cutoff of 0.50), the metrics
argument could be given:
metrics = metric_set(roc_auc, sens, spec)
Each metric is calculated for each candidate model.
If no metric set is provided, one is created:
For regression models, the root mean squared error and coefficient of determination are computed.
For classification, the area under the ROC curve and overall accuracy are computed.
Note that the metrics also determine what type of predictions are estimated during tuning. For example, in a classification problem, if metrics are used that are all associated with hard class predictions, the classification probabilities are not created.
The out-of-sample estimates of these metrics are contained in a list column
called .metrics
. This tibble contains a row for each metric and columns
for the value, the estimator type, and so on.
collect_metrics()
can be used for these objects to collapse the results
over the resampled (to obtain the final resampling estimates per tuning
parameter combination).
When control(save_preds = TRUE)
, the output tibble contains a list column
called .predictions
that has the out-of-sample predictions for each
parameter combination in the grid and each fold (which can be very large).
The elements of the tibble are tibbles with columns for the tuning
parameters, the row number from the original data object (.row
), the
outcome data (with the same name(s) of the original data), and any columns
created by the predictions. For example, for simple regression problems, this
function generates a column called .pred
and so on. As noted above, the
prediction columns that are returned are determined by the type of metric(s)
requested.
This list column can be unnested
using tidyr::unnest()
or using the
convenience function collect_predictions()
.
The extract
control option will result in an additional function to be
returned called .extracts
. This is a list column that has tibbles
containing the results of the user's function for each tuning parameter
combination. This can enable returning each model and/or recipe object that
is created during resampling. Note that this could result in a large return
object, depending on what is returned.
The control function contains an option (extract
) that can be used to
retain any model or recipe that was created within the resamples. This
argument should be a function with a single argument. The value of the
argument that is given to the function in each resample is a workflow
object (see workflows::workflow()
for more information). There are two
helper functions that can be used to easily pull out the recipe (if any)
and/or the model: extract_recipe()
and extract_model()
.
As an example, if there is interest in getting each model back, one could use:
extract = function (x) extract_model(x)
Note that the function given to the extract
argument is evaluated on
every model that is fit (as opposed to every model that is evaluated).
As noted above, in some cases, model predictions can be derived for
sub-models so that, in these cases, not every row in the tuning parameter
grid has a separate R object associated with it.
control_grid()
, tune()
, fit_resamples()
,
autoplot.tune_results()
, show_best()
, select_best()
,
collect_predictions()
, collect_metrics()
# \donttest{ library(recipes) library(rsample) library(parsnip) library(ggplot2) # --------------------------------------------------------------------------- set.seed(6735) folds <- vfold_cv(mtcars, v = 5) # --------------------------------------------------------------------------- # tuning recipe parameters: spline_rec <- recipe(mpg ~ ., data = mtcars) %>% step_ns(disp, deg_free = tune("disp")) %>% step_ns(wt, deg_free = tune("wt")) lin_mod <- linear_reg() %>% set_engine("lm") # manually create a grid spline_grid <- expand.grid(disp = 2:5, wt = 2:5) # Warnings will occur from making spline terms on the holdout data that are # extrapolations. spline_res <- tune_grid(lin_mod, spline_rec, resamples = folds, grid = spline_grid) spline_res#> # Tuning results #> # 5-fold cross-validation #> # A tibble: 5 x 4 #> splits id .metrics .notes #> <list> <chr> <list> <list> #> 1 <split [25/7]> Fold1 <tibble [32 × 5]> <tibble [0 × 1]> #> 2 <split [25/7]> Fold2 <tibble [32 × 5]> <tibble [0 × 1]> #> 3 <split [26/6]> Fold3 <tibble [32 × 5]> <tibble [0 × 1]> #> 4 <split [26/6]> Fold4 <tibble [32 × 5]> <tibble [0 × 1]> #> 5 <split [26/6]> Fold5 <tibble [32 × 5]> <tibble [0 × 1]>#> # A tibble: 5 x 7 #> disp wt .metric .estimator mean n std_err #> <int> <int> <chr> <chr> <dbl> <int> <dbl> #> 1 3 2 rmse standard 2.54 5 0.207 #> 2 3 3 rmse standard 2.64 5 0.234 #> 3 4 3 rmse standard 2.82 5 0.456 #> 4 4 2 rmse standard 2.93 5 0.489 #> 5 4 4 rmse standard 3.01 5 0.475# --------------------------------------------------------------------------- # tune model parameters only (example requires the `kernlab` package) car_rec <- recipe(mpg ~ ., data = mtcars) %>% step_normalize(all_predictors()) svm_mod <- svm_rbf(cost = tune(), rbf_sigma = tune()) %>% set_engine("kernlab") %>% set_mode("regression") # Use a space-filling design with 7 points set.seed(3254) svm_res <- tune_grid(svm_mod, car_rec, resamples = folds, grid = 7) svm_res#> # Tuning results #> # 5-fold cross-validation #> # A tibble: 5 x 4 #> splits id .metrics .notes #> <list> <chr> <list> <list> #> 1 <split [25/7]> Fold1 <tibble [14 × 5]> <tibble [0 × 1]> #> 2 <split [25/7]> Fold2 <tibble [14 × 5]> <tibble [0 × 1]> #> 3 <split [26/6]> Fold3 <tibble [14 × 5]> <tibble [0 × 1]> #> 4 <split [26/6]> Fold4 <tibble [14 × 5]> <tibble [0 × 1]> #> 5 <split [26/6]> Fold5 <tibble [14 × 5]> <tibble [0 × 1]>#> # A tibble: 5 x 7 #> cost rbf_sigma .metric .estimator mean n std_err #> <dbl> <dbl> <chr> <chr> <dbl> <int> <dbl> #> 1 0.304 0.117 rmse standard 3.91 5 0.652 #> 2 4.53 0.000420 rmse standard 4.13 5 0.741 #> 3 0.00247 0.00931 rmse standard 5.94 5 0.966 #> 4 23.2 0.000000684 rmse standard 5.94 5 0.967 #> 5 0.0126 0.00000239 rmse standard 5.96 5 0.970#> Warning: NaNs produced#> Warning: Transformation introduced infinite values in continuous x-axis#> Warning: Removed 12 rows containing missing values (geom_point).# }


The 32-bit MIPS is the simplest "real" 32-bit processor for which development tools are readily available; furthermore, the MIPS architecture is already widely used for teaching in various contexts. This makes it a natural choice for System/161.
The specific dialect of MIPS processor found in System/161, which for a lack of a better term we'll refer to as MIPS-161, is partway between a MIPS-I (r2000/r3000) and a more modern MIPS32. We intentionally use the simpler MIPS-I MMU architecture; exception handling is MIPS-I style; but in the interests of sanity cache control, to the extent it's required at all, is MIPS32. There are also a few idiosyncratic features specific to the MIPS-161, owing to some things being unspecified or underspecified in publicly-available documentation.
There are two basic versions of the MIPS-161: the System/161 1.x version and the System/161 2.x version. The 2.x version is substantially more MIPS32ish and supports multiprocessor environemnts. Distinguishing these versions on the fly is discussed below.
Each MIPS-161 processor has only one core on the die. However, as noted elsewhere System/161 supports up to 32 processors on the mainboard. There is little software-visible difference between 32 single-core processors on one mainboard and 32 cores in one processor. Most of what effects do exist are cache-related; these are not currently modeled by System/161 at all.
In user mode, the MIPS-161 behaves the same as any other 32-bit MIPS. All user instructions are fully interlocked and there are no pipeline hazards. All MIPS-I instructions are supported. MIPS-II and higher instructions are not supported, except (in System/161 2.0 and up) for the LL and SC instructions used for multiprocessor synchronization, and the SYNC memory barrier instruction. Other later MIPS instructions may be added in the future. (However, the "branch likely" family of instructions will never be supported.) Please consult your favorite MIPS reference for further details.
The multiprocessor System/161 environment is cache-coherent. However, even with cache coherence, or when using uncached memory regions, processors that support out-of-execution may require so-called memory barrier instructions to ensure that memory accesses occur on the external bus (and become visible to other processors or devices) in the same order they are issued in machine code.
In the System/161 2.x processor, the MIPS-II SYNC instruction can be used to wait until all pending load and store operations are complete. This guarantees that all memory updates before the SYNC become visible before any memory updates after the SYNC. All SYNC instructions executed on all cores and processors within a system occur in a single well defined global order.
A MIPS processor can have up to four coprocessors, numbered 0-3. Coprocessor 0 contains the MMU and other control logic; coprocessor 1 is the FPU (or would be, if System/161 supported an FPU); and coprocessors 2 and 3 are normally unused.
Each coprocessor can have up to 8 banks of 32 registers each. The "select" number used with some instructions identifies the register bank. Most registers of most coprocessors are in "select" 0. Note that the System/161 1.x processor ignores the "select" field, so all banks will appear to mirror bank 0.
Coprocessor registers are accessed with the MFC0..3 and MTC0..3 family of instructions, to access coprocessors 0 through 3, as follows:
mfc0 $4, $12, 0loads the contents of coprocessor 0 (kernel) register 12 select 0 (STATUS) into general-purpose register 4 (a0), and
mtc0 $4, $12, 0does the reverse. When the select number is 0 (the common case) it may be omitted.
Coprocessors must be "enabled" before being used by setting a bit in the STATUS register (see below). Coprocessor 0 is always enabled when in kernel mode; otherwise, access to a disabled coprocessor causes a coprocessor unusable exception (see below). For the FPU this can be used by system software to support lazy FPU context switching.
In kernel mode, the MIPS-161 is best thought of as a cache-coherent MIPS-I with some extensions borrowed from later MIPS dialects, The following sections are intended to fully define the kernel mode interface -- anything unspecified here is not an implicit reference to MIPS-I behavior but a documentation bug.
The MIPS-161 has 11 kernel registers in coprocessor 0. These are:
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Bits | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| P | 0 | SLOT | 0 | INDEX | |||||||||||||||||||||||||||||
| 0 | SLOT | 0 | RANDOM | ||||||||||||||||||||||||||||||
| PPAGE | N | D | V | G | 0 | TLBLO | |||||||||||||||||||||||||||
| PTBASE | VSHIFT | 0 | CONTEXT | ||||||||||||||||||||||||||||||
| BADVADDR | BADVADDR | ||||||||||||||||||||||||||||||||
| VPAGE | ASID | 0 | TLBHI | ||||||||||||||||||||||||||||||
| c3 | c2 | c1 | c0 | P | F | R | M | 6 | B | T | S | N | C | W | I | H | H | H | H | H | H | F | F | 0 | KUo | IEo | KUp | IEp | KUc | IEc | STATUS | ||
| BD | 0 | CE | 0 | H | H | H | H | H | H | F | F | 0 | EXC | 0 | CAUSE | ||||||||||||||||||
| EPC | EPC | ||||||||||||||||||||||||||||||||
| PRID | PRID | ||||||||||||||||||||||||||||||||
| CFEAT | CFEAT | ||||||||||||||||||||||||||||||||
| IFEAT | IFEAT |
The k0 and k1 registers are general-purpose registers (not in coprocessor 0) that are reserved for use by the kernel during exception handling. They are not protected from access in user mode, so system software must not rely on them remaining unchanged during program execution; however, the kernel may clobber them freely and will ordinarily do so on entry to any exception handler.
The following instructions are available only in kernel mode:
The WAIT instruction has been borrowed from MIPS-II. This operation puts the processor into a low-power state and suspends execution until some external event occurs, such as an interrupt. Since the exact behavior of WAIT is not clearly specified anywhere I could find, the MIPS-161 behavior is as follows:
When an exception occurs, the following things happen:
The exception handler addresses are:
|
Handling an exception generally requires saving state somewhere; the k0 and k1 registers (as noted above) can be clobbered arbitrarily by exception handlers and can be used while finding the context needed to save state safely.
To return from an exception, one executes the following sequence:
jr k0 rfewhere the k0 register has been loaded with the desired exception return address, either the value previously retrieved from the EPC register or some other address chosen by software. The RFE instruction is not a jump; it occurs in the delay slot of a jump. It shifts the six bottom bits of the status register right by two, undoing the shift done at exception entry time. This returns the processor to whatever interrupt state and mode (user/kernel) it was in when the exception occurred.
Because there are three pairs of state bits, the processor can take two nested exceptions without losing state, if one is careful. This is to facilitate the fast-path TLB refill handler. See below.
The two soft interrupt lines can be activated by writing to the CAUSE register.
The exception codes:
The MMU is the MIPS-I MMU, with a 64-entry fully associative TLB where each entry maps one 4K virtual page to one 4K physical page. The paired pages setup of later MIPS processors is not present, and there is no support for superpages.
The processor's virtual address space is divided into four segments:
|
There are four MMU-related instructions:
The processor is built to support a fast-path TLB refill handler, which is invoked via the UTLB exception vector (see above). The idea is that the OS maintains page tables in virtual memory using the kseg2 region (see above) and loads the base address of the page table into the PTBASE field of the CONTEXT register. Each page table entry (PTE) is a 4-byte quantity suitable for loading directly into the TLBLO register; 1024 of these fit on a 4K page, so each page table page maps 4MB and it takes 512 pages, or 2MB of virtual space, to map the whole 2GB user address space. (Since these are placed in virtual memory, only the page table pages that are used need be materialized.) With this setup, the UTLB exception handler can then read the CONTEXT register and use the resulting value to load directly from the page table. If this fails because that section of the page table is not materialized, a second (non-UTLB) exception occurs. Careful register usage and the three-deep nesting of the bottom part of the STATUS register allows the general-purpose exception handler to recover from this condition and proceed as desired. On success, the UTLB handler can then unconditionally store the PTE it got into the TLBLO register and write it into the TLB with the TLBWR instruction. If the V (valid) bit is not set, on return from the UTLB handler another exception will occur; however, because a matching (though not valid) TLB entry exists, this will not be a UTLB exception, and the general exception handler will get control and can schedule pagein or whatever.
There are a number of possible other ways to use the UTLB handler, of course. One simple way is to just have it jump to the general-purpose exception handler.
As noted above, the V (valid) bit does not prevent a TLB entry from being "matching". A TLB entry is matching if both of the following are true:
One must never load the TLB in such a fashion that two (or more) entries can match the same virtual address. If this happens, the processor shuts down and is unrecoverable except by hard reset. Since there is no way to prevent entries from matching, one should clear the TLB by loading each entry with a distinct VPAGE, and use VPAGEs from the kseg0 or kseg1 regions that will never be presented to the MMU for translation. To reset the TLB at startup, since it is not cleared by processor reset, one should use a second, potentially larger, set of distinct VPAGEs and check that each is not already present before loading it.
There is no way to tell if a TLB entry has been used, or how recently it has been used. Nor is there a direct way to tell if a TLB entry has been used for writing. The D ("dirty") bit can be used for this purpose with software support, as follows:
The processor never changes the address space ID found in the ASID field of the TLBHI register. System software can switch among up to 64 address spaces by altering this value. (If more are needed, address space IDs can be reused by flushing TLB entries.) At the cost of performance, system software can also leave the ASID field set to a constant value and change address spaces by flushing the whole TLB.
The MMU exceptions are as follows:
The MIPS-I has a remarkably painful cache and cache control architecture. This is not supported. Attempting to set either the "swap caches" or "isolate cache" bits in the STATUS register, as one does with a MIPS-I, will trigger a machine check.
Currently, the MIPS-161 is fully cache-coherent (in fact, System/161 does not model the cache at all) and there is no need to flush, examine, or otherwise touch the cache subsystem. However, future releases may include more cache handling; caches are an important part of performance modeling and storing predecoded instructions in an instruction cache will likely make things run faster.
Since real MIPS processors have split instruction and data caches, flushing the instruction cache is required in certain contexts. As of this writing a MIPS32-compatible CONFIG1 register reporting the L1 cache configuration, and the matching CACHE instruction to flush and otherwise manipulate the caches, are implemented, but adequate documentation has not yet been written.
It is recommended that code written for System/161 include stubbed-out calls for flushing the instruction cache in the places needed; this will allow such code to run with caching enabled on future versions with minimal modification. It is similarly recommended that such code also include stubbed-out calls for flushing or invalidating the data cache if there are any places where this is necessary.
It is safe to assume that any future cache will be PIPT (physically indexed, physically tagged) -- because System/161 is an instructional tool, it attempts to avoid unnecessary student-facing complexity, and therefore VIPT (virtually indexed, physically tagged) or worse VIVT (virtually indexed, virtually tagged) caches are contraindicated. (Because it is an instructional tool, it might sometime include an optional VIPT or VIVT cache specifically for use teaching about the horrors; but if so this will be a configurable option, not the default mode.)
Any future cache will also be coherent between processors; multiprocessor architectures with non-coherent caches are horrible to try to program.
In this setup, the instruction cache need only be flushed when something modifies physical memory containing instructions. Assuming no self-modifying code, this normally arises only in the virtual memory system when swapping in and out pages that contain code, or (where separate) when first loading executable code into memory.
The data cache only needs to be flushed if hardware devices other than the CPU are accessing memory. In general, the cache must be flushed (in the sense of written back) before hardware reads memory the processor has written, and it must be flushed (in the sense of invalidated, to force a fresh read) before the processor reads memory the hardware has written. Since the hardware devices in System/161 do not support DMA (direct memory access) this will not normally arise. However, accessing the I/O buffers on LAMEbus devices with the cache enabled (through kseg0 instead of kseg1) will require flushing the data cache as just described.
On CPU reset execution begins from the Reset vector defined above. The processor starts out in an almost completely undefined state. The cache is in an undefined state (except on the MIPS-161 this does not matter...), the TLB is in an undefined state, and the contents of the general and kernel-mode registers are all undefined, except as follows:
In System/161, the boot ROM takes care of these issues and loads a kernel as described in the LAMEbus documentation. However, the state guaranteed by the boot ROM is only slightly more flexible: the boot ROM guarantees that the cache is in a workable state, and it provides a stack and an argument string in the a0 register. The TLB is still in an undefined state and the contents of other general and kernel-mode registers and register fields are still undefined.
Distinguishing the MIPS-161 from an arbitrarily chosen MIPS-I is likely to be problematic: according to the lore, the PRID register values for MIPS-I processors could not reliably be used to distinguish processor types even in real deployed hardware. The recommended method is to arrange to know that you have a MIPS-161 because you are running on System/161; then the scheme below can be used to identify which version you have. If this is not feasible, you're on your own. It might be possible to detect the MIPS-161 by enabling certain cache control bits and ascertaining that they have no effect.
The System/161 1.x processor can be distinguished from the System/161 2.x processor by fetching the value from the PRID register. The top half of the PRID register is 0 (because the MIPS-161 is not a MIPS32 or MIPS64, doesn't have an official vendor ID, and isn't likely to get one) and the bottom half gives the version:
The processors in pre-2.0 versions of System/161 prior to 1.99.07 also report 0x3ff in the PRID register. These can be detected by checking the LAMEbus mainboard version; if the multiprocessor mainboard is present, the processor supports LL/SC and the on-chip timer (not documented herein yet, alas) but are lacking SYNC, coprocessor register selects, the CFEAT/IFEAT registers, and any other features described above as 2.x-only. Other than this, no guarantees are made about mainboard versions and features vs. CPU versions and features. Mainboard and CPU properties can be selected independently in sys161.conf.
Some ancient prerelease versions of System/161 (0.95 and earlier) reported 0xbeef in the PRID register. These versions are now long gone and can be ignored. The documentation also for a long time described the PRID value for the System/161 1.x processor as 0xbeef; this was incorrect.
CPU features beyond those found by default in the System/161 2.x processor should be probed by checking the CFEAT and IFEAT registers, after confirming that a System/161 2.x processor is in fact present. See the descriptions of these feature bits above. (So far, there are none.)


Get Started
1
)
Fill In Personal Information
Follow the instructions on NYC's vaccine site to register for your vaccine.


"PHUT" Phut is placed between Egypt and Canaan in Genesis 10:6, and elsewhere we find the people of Phut described as mercenaries in the armies of Egypt and Tyre (Jeremiah 46:9; Ezekiel 30:5; 27:10). In a fragment of the annuals of Nebuchadrezzar which records his invasion of Egypt, reference is made to “Phut of the Ionians.”
"PHUT" Phut is placed between Egypt and Canaan in Genesis 10:6, and elsewhere we find the people of Phut described as mercenaries in the armies of Egypt and Tyre (Jeremiah 46:9; Ezekiel 30:5; 27:10). In a fragment of the annuals of Nebuchadrezzar which records his invasion of Egypt, reference is made to “Phut of the Ionians.”


Crouching Tiger, Hidden Dragon ***1/2
Rated on a 4-star scale Screening venue: Odeon (Manchester City Centre) Released in the UK by Columbia TriStar on January 5, 2001; certificate PG; 120 minutes; countries of origin China/Hong Kong/Taiwan/USA; aspect ratio 2.35:120
Directed by Ang Lee; produced by Li-Kong Hsu, William Kong, Ang Lee. Written by James Schamus, Kuo Jung Tsai, Hui-Ling Wang; based on the book by Du Lu Wang. Photographed by Peter Pau; edited by Tim Squyres.
CAST..... Chow Yun-Fat..... Li Mu Bai Michelle Yeoh..... Yu Shu Lien Ziyi Zhang..... Jen Yu Chen Chang..... Lo Sihung Lung..... Sir Te Pei-pei Chang..... Jade Fox Fazeng Li..... Governor Yu Xian Gao..... Bo
"Crouching Tiger, Hidden Dragon" is a movie made with such grace, beauty and passion that the effect is somewhat disorientating. The filmmaker, Ang Lee, has made serious comedies ("Wedding Banquet", "Sense and Sensibility"), thoughtful dramas ("The Ice Storm") and even a Civil War epic ("Ride With the Devil"). Now he gives us a martial arts picture.
There are familiar elements throughout. The male hero, played by Oriental action star Chow Yun-Fat, is a legendary warrior on a passionate quest, attempting to recover his stolen sword and avenge the death of his master. He and the female hero (Michaelle Yeoh) are both experts at fighting, and there is much respectful talk about their hallowed craft. There are old scores brought up, new double-crossings perpetrated, instances of witchcraft and malevolence, displays of nobility and bravery -- and there is fighting.
We're used to seeing this kind of thing depicted with strained faces, accompanied by ridiculously melodramatic drum sounds, while both heroes and villains let out shrieks, and speak through bad dubbing tracks. That's not the sort of thing we'd expect from Lee, nor do we get it. "Crouching Tiger, Hidden Dragon" is directed with a tender, dramatic touch; when the characters talk about their beliefs, the words come out with the same sincerity and intensity as they do in the films of Akira Kurosawa. This is chop-socky material elevated to art.
Because the movie feels so much like a drama, I felt at arms length for a great percentage of its running time -- what I was getting at in my opening comment is that the distinguished nature of the style leads us to expect that the story is going to coil and spring in some grand, unexpected way. It is not until late on in the piece, when the structure has become clear, that we realise Lee's aim is simply to approach familiar material in an unfamiliar way, and we can relax and let the story reach us. A second viewing might help me appreciate the picture more, as might have a little less pre-release hype.
What strikes us instantly and unmistakably are the scenes of action, beautifully choreographed by the same guy who trained the actors in "The Matrix", and none of them created through CGI. There is, for example, a breathtaking early moment in which the actors chase each other along rooftops, gliding over ceilings and skipping down walls in almost musical rhythm. And a hypnotic battle in which two opponents drift past each other while gripping onto tree branches as they sway in the breeze. Spectacular.
COPYRIGHT 2001 Ian Waldron-Mantgani
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Did you know that New York City has over 150k accidents on average every year. In fact, this number has not significantly decreased in the past 4 years. Each year, city planners and the local government have to make hard tradeoffs to determine where to spend their budget on improving and maintaining the safety of their roads. We believe that by exposing the right data to them, they will be better able to prioritize which intersections they should be focus on.
To explore the historical accident data, click on the dots at the bottom to switch between yearly/monthly/daily views of the data.
For our accident data, we collected and parsed over 1M collision records between 2013-2016, mapping each collision to the nearest intersection. These records were obtained from NYC OpenData.
To estimate traffic, we collected and parsed over 10M taxi pick-up and drop-off records in January 2016. These records were obtained from www.nyc.gov. We computed the shortest path between each of these pick-up and drop-off locations to approximate traffic. After computing all trips, we aggregated these trips to determine how many times each intersection was passed through to come up with a proxy for traffic flow.
After computing aggregate accident and traffic numbers for each intersection, we then computed a score using the following formula:
Formula: Accident / Traffic * 10000 = Score
This score represents accidents per 10,000 cars. Then, we computed a Bucketed Score based on the percentile the raw score is in. This allows us to compare how dangerous each intersection is relative to other intersections. The bucketed scores range from 1-10, with 10 being the most dangerous.
We've taken accident data, traffic data, and our computed intersection scores and plotted them on a map to easily identify areas that could benefit the most from improvement. There are 2 layering options: heat map (all zoom levels) and detailed markers (when zoomed in). In the heat map view, warmer colors represent more dangerous intersections. We've provided heat maps for 4 different years as well as all the years combined. The detailed markers view is only available when zoomed in to see 2016 data about individual intersections. We disabled detailed markers when zoomed out because there are too many intersections for this information to be useful. In the detailed view, the markers are colored similarly where red is the most dangerous and purple is the least dangerous. Click on any individual marker in the map to see more details about that intersection. Both the heatmap and detailed markers are based on bucketed scores, where 10 is the most dangerous.
To provide additional insight, we've created a data table that contains data about each intersection using accident data in 2016. This table is scorted by bucketed score by default, showing the most dangerous intersections first. However, you can sort by additional dimensions or search for interesting intersections.