Saving Grace
Don't you love those cute British comedies that come out every year? They always have a quaint charm and tell a rather unusual story in a breezy, lighthearted matter. As a critic it's difficult to review these films because they're just so good overall you can't really narrow it down to the specifics that made it work so well. "Saving Grace" is a good example of what I'm talking about. Its story is approached with all the delicacy of a children's tale, but at the core it's a smart, mature black comedy Americans don't usually have the patience for.
If I were to break to story down to the basics you might think it was about poor people living in the ghettos of New York or Los Angeles, etc.   There's also an out-of-wedlock pregnancy, a police officer who looks the other way, a big drug deal at the end and many funny scenes of people getting high.
But consider the circumstances of the film: it's set in present-day England; the protagonist is a very nice white woman in her 50s who has never really worked and is only good at gardening, making tea and playing cards with the other ladies. The pot-smokers and drinkers are her young housekeeper, his dedicated girlfriend and their friend who happens to be a medical doctor. The cop is a man who should probably have retired a long time ago, but then again this is the English countryside - not too much chance he's going to get into a shootout or a car chase with criminals.
As for the scenes of people getting high, well, that's what the film is all about - the last people you'd expect or even want to see smoking marijuana not only are but are also growing it!  But it's not like there's scenes of huge bong hits and blacklite posters and roundtable discussions of stoned philosophy. It's funny in that fish-out-water way only because this is the kind of situation in which that formula works very well.
This all comes about because the main character ,Grace (Brenda Bleythen), needs to raise at least £300,000 fast and can't think of a better way to do so than to put her gardening techniques towards growing a product that's worth a lot more than tea leaves and roses. She's a master gardner and the progress she makes with her crop is pretty amazing. I know nothing about the growing and cultivation of marijuana but what she does with it is really amazing (did I mention the funny scenes of people being stoned?).
Of course there's also a story going on throughout this whole thing. It's not "Cheech and Chong Go to England" - it's really not. What it is is a clever black comedy that approaches committing a felony as if it were nothing. If you believe marijuana is bad and should be illegal that's fine, but the story is presented in such a manner than you know Grace and her gang aren't hurting anyone. You're also hoping she can somehow pull off this scam of a lifetime and get away with it. You'll probably be surprised by what actually happens, especially at the end.
What it all comes down to is "Saving Grace" is a funny, enjoyable film with a smart story and despite its risque subject matter doesn't come off as preachy. That's an accomplishment we don't usually get with most of our Hollywood flicks.
GRADE: B
Chad'z Movie Page is back after heavy renovation. Reviews of nearly all mainstream movies playing today! Get my reviews of everything playing at your local cineplex so you can better make an informed decision on what to see. Don't forget to vote on my poll and sign the guestbook!
Get paid to surf the web! More than $25,000,000 Already Paid to Members -- Join AllAdvantage today!
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


Bei Ru is a Los Angeles-based multi-genre music producer/composer known for his unconventional use of Middle Eastern melodies and rhythms blended with electronics and live instrumentation. He released his debut album, ‘Little Armenia (L.A.)’ in late 2010 to much critical acclaim, and recently released his sophomore album, ‘Saturday Night At The Magic Lamp’.Bei Ru scored music for the film A Girl Walks Home Alone At Night, an Iranian vampire western produced by Elijah Wood and distributed by Vice Films, as well as for the film I Smile Back, starring Sarah Silverman. Bei Ru is currently touring and is working on his 3rd album, set for release in 2016.


Home
Gallery
Characters
About
Tickets
Contact
Select city
London
Liverpool
Manchester
Select cinema
Odeon
Genesis
Shortwave
Select day
Monday
Wednesday
Saturday
Select time
10:00 am
15:00 pm
19:00 pm
Buy Ticket
Ticket prices
1 Adult: £10.00
1 underage: £5.00
2 Adult: £15.00
2 Underage: £7.50
1 Adult 1 Underage: £12.00
1 Adult 2 Underage: £15.00
2 Adult 1 Underage: £20.00
2 Adult 2 Underage: £25.00
1 Student: £6.50
Home
Gallery
Characters
About
Tickets
Contact


Archive
- 2018
- 2017
- December
- November
- October
- Thrashing Code Metal Monday for Week of October 30th 2017
- Thrashing Code Metal Monday for Week of October 23rd 2017
- Build a Kubernetes Cluster on Google Cloud Platform with Terraform
- Thrashing Code Metal Monday for Week of October 16th 2017
- Thrashing Code Metal Monday for Week of October 9th 2017
- The Three States of Roadways
- Thrashing Code Metal Monday for Week of October 2nd 2017
- September
- The Developer Advocates - Observations on Microsoft's New Competence
- State for Terraform with Google Cloud Storage (GCS)
- Thrashing Code Metal Monday for Week of September 25th 2017
- Quick Start Connections With Terraform and Kubernetes
- Thrashing Code Metal Monday for Week of September 18th 2017
- Technology Talks & Upcoming Projects
- June
- May
- April
- March
- February
- Golang Execution on OS-X vs. Linux
- Thrashing Code Metal Monday for Week of February 20th, 2017
- Industry Introspection
- Thrashing Code Metal Monday for Week of February 13th, 2017
- Setting up a GCP Container Cluster - Part II
- Thrashing Code Metal Monday for Week of February 6th, 2017
- Data Diluvium Design Ideas
- January
- Setting up a GCP Container Cluster - Part I
- Talking Through Managed or Baked In House Continuous Integration (CI) and Delivery (CD)
- Introduction to Drone.io
- The Data Diluvium, Getting Started
- Autodidact Learning, For the Hacker at Heart
- Buying a Leopard!
- Microsoft's Scorched Earth History and The Current Crossroads
- 2016
- November
- October
- I Want a Go Service
- I Want a Go CLI
- Marketing Obliviousness of DevOps, WTF is Site Reliability
- Enterprise Open Source Anti-patterns
- Enterprise Open Source Cultural Characteristics
- Let's Talk Tactical Tools for Enterprise Open Source
- Holy Shit Watch Out for That Enterprise Open Source!
- The Curse of Windows Server & Windows Server 2016 Salvation
- September
- Home Depot Wrap Up and Job Talk
- HashiConf Trip Day 4 - Conference Day 2 - A Short Summary
- Autopilot Pattern Application Organization
- HashiConf Trip Day 3 - Conference Day 1 - Presentation Time
- HashiConf Trip Day 2 - Part II - Reception and Speakers Dinner
- HashiConf Trip Day 2 - A Bus Ride, Napa Valley City Center, Italian, Coffee, and Terraform Notes
- HashiConf Trip Day 1 - Coast Starlight and Terraform
- August
- July
- NGinx Notes from URL Redirect Project on Google Cloud with Terraform & Packer - Part 2
- Speaking Trips, Tech, and Treks
- Portland Biketown Launches - Check out the API
- NGinx Notes from URL Redirect Project on Google Cloud with Terraform & Packer - Part 1
- .NET Fringe and Node PDX Conference Retrospective
- Day 2 Multi-thinking-threads Smeared Around the Brainstorming at .NET Fringe
- .NET Fringe Bike Ride
- June
- Node PDX 2016 Photos
- Node PDX 2016 Bike Ride, Photos, and More
- A Channel 9 Video on .NET Fringe 2016
- Node.js Patterns - From Callbacks to Observer by Azat Mardan
- Working With Google Compute Engine (GCE) using Terraform (With a load of Bash Scripts too)
- Startup Things - How Ya Linux Series - 0000
- The Short Story of Node PDX, and Node PDX 2016
- How to Build a Bike Shed by David Manning & Adam Ulvi
- Get JavaScript Running on a $2 WiFi-Enabled Device by Andrew Chalkley
- How to Electron by Blaine Schmeisser
- Demystifying TypeScript Decorators by James Churchill
- Modern Javascript Frameworks - Introduction to Ember.JS and Ember-CLI by Suchita Doshi
- The SAM Pattern - a distributed system view of Front-End architectures by Jean-Jacques Dubray
- MMOWAM - Build Server-less Games with a DSN by Josh Marinacci
- WebSockets Bring Light at the End of the Tunnel by Joel Lord
- The Web Platform is the Universal Instrument by Ben Michel
- I Play the JavaScript by Matt McKegg
- Code First Docs How we Threw Out The Book & Put Code First With Twilio Documentation by Jarod Reyes
- The House Is Not On Fire - Building a home automation robot with Arduino, Raspberry Pi and Node.js by Artur Paikin
- May
- Ops for Devs by Adam Ulvi
- Speakers and More For Node PDX 2016
- A Foolish Quest Creating Knitting Patterns Using JavaScript by Liz Abinante
- Isomorphic Business Logic (Or How to convince even the most die-hard C#/Java/Rails-on-the-Backend boss that you need to run a node server) Jonny Oropeza
- From Software to Hardware How Do I Track My Cat with JavaScript Tomomi Imura
- Dropping the Ball, GSD, and Staying Productive
- April
- March
- February
- January
- 2015
- December
- November
- October
- September
- July
- April
- 2014
- November
- October
- February
- 2011


DevOps?
http://www.slideshare.net/madgreek65/no-you-are-not-a-dev-ops-engineer-revisted
DevOps?
https://memegenerator.net/instance/61788966
DevOps?
http://www.slideshare.net/SaltStack/justin-carmony-mentoring-devs-into-dev-ops-saltconf
DevOps?
https://devops.com/devops-dirty-little-secrets/
DevOps
http://www.slideshare.net/KrisBuytaert/looking-back-at-7-years-of-devopsdays/15?src=clipshare
History
2009 "10 deploys per day - dev & ops co-operation and Flickr" - John Allspaw, Paul Hammond
2009 DevOpsDays Ghent - Patrick Debois
2009 DevOpsDays Hamburg
2010 Sydney, Mountain View, Hamburg, Sao Paoulo
2011 Boston, Mountain View, Goteborg
.....
State of Devops
State of Devops 2015 - High performers vs low performers
30x more frequent deployments
60x the change success rate
2x more likely to exceed profitability, market share & productivity goals
State of Devops 2015 - High performers vs low performers
200x faster lead times
168x faster mean time to recover
50% higher market capitalization growth over 3 years
Devops
Faster, Higher Quality, More effective
Faster, Higher Quality, Cheaper
CLAMS
Culture
Lean
Automation
Measurement
Sharing
Culture
Empathy
https://dzone.com/articles/how-express-empathy-%E2%80%93-avoid
Lean
Automation
https://memegenerator.net/instance/37097963
Measurement
http://grafana.org/features/
Sharing
http://langwitches.org/blog/2010/12/07/what-do-you-have-to-lose/
Three ways of Devops
First way: The Principles of Flow
Second way: The Principles of Feedback
Thirdh way: The Principles of Continual Experimentation and Learning
The Principles of Flow
http://itrevolution.com/the-three-ways-principles-underpinning-devops/
The Principles of Feedback
http://itrevolution.com/the-three-ways-principles-underpinning-devops/
The Principles of Continual Experimentation and Learning
http://itrevolution.com/the-three-ways-principles-underpinning-devops/
One way to enable Devops
Organization structure that stays out of the way
Build everything through a Software Defined Lifecycle (SDLC)
Make the work visible
Immutable Infrastructure Delivery
Microservices
Respect for People
Organization structure that stays out of the way
http://www.slideshare.net/botchagalupe/does16-london-better-faster-cheaper-how
Organization structure that stays out of the way
http://www.slideshare.net/botchagalupe/does16-london-better-faster-cheaper-how
Build everything through a Software Defined Lifecycle (SDLC)
http://www.slideshare.net/botchagalupe/does16-london-better-faster-cheaper-how
Make the work visible
http://flylib.com/books/en/4.318.1.31/1/
Make the work visible
http://leansoftwareengineering.com/2009/07/01/a-swimlane-for-ad-hoc-workflow/
Immutable Infrastructure Delivery
Microservices
Small autonomous services that work together - Sam Newman
Loosely coupled service oriented architecture with
bounded contexts
- Adrian Cockroft
http://www.slideshare.net/BruceWong3/the-case-for-chaos
Respect for People
High performers care for their people like strategic assets
It's not just humane, it's a business advantage
Diversity, Empathy
Areas of Worklife: Workload, Control, Reward, Community, Fairness, Values
Not only for Startups
High performing DevOps elephant
Thank you
For more information, see videos from DevOpsDays and Devops Enterprise Summit


ic960 is a driver program that manages invocation of the preprocessor, compiler proper, assembler and linker. The invocation syntax is:
ic960 { - | / } [ -option ] ... file ...
Each invocation option must be preceded by a - character. (In Windows*, you can also use a / character.) Click on option for information on compiler driver options. All options that take an argument allow optional white space between the option and the argument. When conflicting options are given, the last one specified is used. The compiler driver passes the following linker options and their arguments to the linker: gcdm, L, l, m, r, s, T, u and x.
The compilation system determines each input file's type by its filename extension:
The compilation system passes any other filename to the linker, which determines whether the file is an object file, library or configuration file by its contents.
Other invocation command elements are taken to be either linker options or object modules, typically produced by an earlier ic960 invocation, or perhaps libraries of compatible routines. These modules, together with the result of any compilations specified, are linked (in the order given) to produce an executable program.
When generating COFF modules, the default output filename is a.out. When generating ELF/DWARF modules, the default filename is e.out.
Each option requires an option delimiter (- or /). All options that take an argument allow optional white space between the option and argument. When conflicting options are given, the last one specified is used. For information about an option, click on the option name (underlined).
The ic960 driver also accepts certain linker options.
A { SA | SB | KA | KB | CA | CF | JA | JF | JD | HA | HD | HT | RP }
(Architecture)
Compile code for a particular model of the i960 processor. If the environment variable I960ARCH is set and non-empty, its value is the default architecture. Otherwise the default is KB. See also the -Gcore0, -Gcore1, -Gcore2, and -Gcore3 options that let you generate code that is compatible with multiple i960 processor types.
a
(ANSI)
Flag non-standard (that is, non-ANSI) constructs. Using a
disables inline assembly language statements and can override the w
(Diagnostic) option. This option causes the preprocessor macros __STRICT_ANSI__
and __STRICT_ANSI
to be defined.
b
size (Limit Optimizations)
Limit global optimizations for functions exceeding size
instructions. size
is a positive decimal integer.
C
(Keep Comments)
Keep comments in preprocessor output. Works only with E
or P.
Dsymbol[=value]
(Define)
Define a macro with a given value. If =value
is omitted, symbol
is defined to be 1.
Fcoff
| Felf (OMF)
Generate COFF or ELF objects. Fcoff
is the default.
F
arg[,arg]...
(Fine-Tune Optimization)
Enable or disable selected optimizations. arg
is one of:
fdb
(Program Database)
All modules subject to program-wide optimization must be initially
compiled with the fdb
option. This option causes the insertion of program database information
in the object modules, and it implies a minimum module-local optimization
level of O1
(although higher module-local optimization levels are allowed).
This option does not otherwise change the code or data generated for the object modules in any way; it simply makes available to the global decision making and optimization process information collected during initial compilation of the modules.
Before using the fdb option, you should read Chapter 4, Program-Wide Analysis and Optimization, and Chapter 6, gcdm Decision Maker Option, in the i960 Processor Compiler User's Guide.
If you intend to use execution profiles when optimizing your application, you should read Chapter 5, Profile Data Merging and Data Format, in the i960 Processor Compiler User's Guide.
fprof
(Instrument)
This option inserts execution profile instrumentation code into the
module(s) during compilation, so that when the linked program is executed,
a profile can be collected.
It also implies fdb, which causes the insertion of program database information in the object modules, and it implies a minimum module-local optimization level of O1.
When you compile with the fprof option, a special profiling library required for profile collection (libqf) is linked automatically. If your target environment does not support file I/O, you must explicitly link an alternate profiling library (libq). The profiling libraries provided are identified in Chapter 2 of the i960 Processor Library Supplement.
Note that when the fprof compiler option is used in this manner (as distinct from the corresponding +fprof gcdm Decision Maker option) the generated object module contains code that is unsuitable for linking into programs which are not supposed to collect profile information. To solve this problem, and avoid having inappropriate instrumentation in widely used libraries, for example, use +fprof with the gcdm,subst option. (The gcdm option is described in the gcdm Decision Maker Option section of this hypertext.)
Before using the fprof option, you should read Chapter 4, Program-Wide Analysis and Optimization, and Chapter 5, Profile Data Merging and Data Format, in the i960 Processor Compiler User's Guide.
f[no-]arg (Enable/Disable Optimization)
Enable/disable optimization. arg is one of:
G
arg[,arg]... (Generate)
Specifies a code generation option. arg
is one of:
g
[level]
(Debug)
Put symbolic debug information into the object module. level
is:
gcdm,arg[,arg]... (Decision Maker)
Invoke gcdm960 decision maker to perform optimization or related tasks. Click gcdm option for information on this option.
h
(Help)
Print a summary of ic960 driver options and exit without processing
any files.
I
dir (Searchinclude)
Add the directory dir
to the search list for #include
files.
i
filename (Preinclude)
Include the specified source file as if a #include
of that file existed at line zero of each primary source file.
Jarg[,arg]...
(Miscellaneous)
Use the J
(Miscellaneous) option to specify miscellaneous controls. Two such controls
are gd
(issue gcc960-style diagnostics) and nogd
(issue ic960-style diagnostics).
jnum
(Errata)
Use the j
(Errata) option to cause the compilation system to generate code with workarounds
for specified processor errata. A num
argument of 1 generates code to work around the Cx processors' DMA errata.
M
(Mix)
Mix C source text as comments in the assembly language output. Works
only with S.
n
| Q | P | E | S | c
(Stop-After)
Stop after the specified compilation phase. These options are used
as follows:
O
level (Optimize)
Specify the optimization level to be used. Supported levels
are 0, 1 and 2.
o
filename (Output)
Names the output file, which can be either preprocessing output, assembly
code, an object module, or linker output.
 By default, no symbols are undefined.
V
(Version)
Display a version message and other information. By default, the compiler
does not display version information.
v960
(Version, terminate)
Display version and terminate.
v (Verbose)
Display the driver's invocation command, and the preprocessor, compiler,
assembler, and linker phase invocations. By default, the driver does not
display individual phase invocations.
w
level (Diagnostic Level)
Control the level of diagnostics produced by the compiler. Choose one
of the following for level:
use 0 to enable remark, warning and error messages; use 1 to enable warning
and error messages and suppress remark messages; and use 2 to enable error
messages and suppress remark and warning messages. The default level is
1.
W phase,arg[,arg]...
(Pass)
Pass arguments to the preprocessor, compiler, assembler or linker.
For phase,
p
indicates the preprocessor, c
indicates the compiler, a
indicates the assembler and l
indicates the linker. arg
is an argument to be passed. If the argument contains spaces, you must
enclose the argument in quotation characters ("
").
W
[no-]arg (Warnings)
Enables/disables warnings. With no arg,
this option prints extra warning messages for certain events, including:
arg can be:
aggregate-return
Warn if any functions return structs or unions.
all
Enable several useful warnings, as indicated in
the list below. Has no Wno-all
form.
cast-align
Warn if a pointer cast may not have required alignment.
cast-qual
Warn if a pointer cast removes a type qualifier.
char-subscripts
Warn if an array subscript has type char.
Enabled by Wall.
comment
Warn whenever /* occurs within a comment.
Enabled by Wall.
conversion
Warn if a prototyped parameter causes a different
conversion than if not prototyped.
error
Treat all warnings as errors.
format
Check types of printf
family arguments at compile time. Enabled by Wall.
id-clash-n
Warn if two identifiers match in the first n
characters. Has no Wno-all
form.
implicit
Warn if a function is used before being declared.
Enabled by Wall.
missing-braces
Warn if an aggregate initializer is not fully braced.
missing-prototypes
Warn if a function is defined before it is prototyped.
Enabled by Wall.
nested-externs
Warn if an extern declaration is seen within a function.
parentheses
Warn if parentheses are suggested around an expression.
Enabled by Wall.
pointer-arith
Warn if the size of a function type or type void
is used.
redundant-decls
Warn if an object is declared twice in the same
scope.
return-type
Warn if any function implicitly returns int,
and if a non-void function does not return a value. Enabled by Wall.
shadow
Warn if a local variable shadows another local variable.
strict-prototypes
Warn if a function is declared without a prototype.
switch
Warn if a switch statement on an enumeration type
does not have a case for each enumerator. Enabled by Wall.
traditional
Warn about constructs that behave differently under
traditional C and ANSI C.
trigraphs
Warn if any trigraphs are encountered. Enabled by
Wall.
uninitialized
Warn if use of an uninitialized local variable is
detected. Enabled by Wall.
unused
Warn about objects that are never used. Enabled
by Wall.
write-strings
Warn if string constants are used in a writable
context.
Yd,dir
(Specify PDB)
Specifies the name of a program database directory.
Z filename
(Listname)
Directs the listing to the named file. This option implies the z
(List) option and s
argument.
z
arg... (List)
Create a listing file with the suffix .L
for each C source file. arg
is a string containing one or more of the following letters:
L dir
Add the directory dir
to the linker's search list for libraries.
l lib
Add the library lib
to the linker's list of input libraries.
m
Create a linker map file.
r
Retain relocation information in the object file
produced by the linker.
s
Strip line number and symbol table entries from
the object file produced by the linker.
T target
Select a configuration file that names a startup
routine, system call library, and linker directive file for a specific
run-time environment.
u symbol
Introduce an undefined symbol to the linker.
x
Remove local symbols from the symbol table in the
linker's output.


An alternative Form for Mozilla's JSON Schema Form library with async validation
In the example below we have both the classical client-side validation (required fields, checking for even numbers) and an asynchronous ones.
Async validation is promise based, so can be whatever you want (common use-case: a POST/PUT REST request to a server API).


Revision: <%= revision %>.
New Version is available!
Refresh
Download PDF file
or the
ZIP file
It appears you don't have Adobe Reader or PDF support in this web browser.
Click here to download the PDF


{% load staticfiles %} {% block title %} {{ request.user.first_name }}-Invoice {% endblock %} {% block content %} {% include "super/messages.html" %}
Review your order from
Thank you for ordering with Diwali palace We would love to hear your opinion on the quality of the order and the delivery. This is not only helpful for us, but also for customers who are thinking of ordering with this restaurant!


Edited By I...Samphus on 03/06/06 23:14
Quote: Posted 03/06/06 16:57:31 (GMT) -- NelosNasidar
Unless your going for RDD, I think Sorc is a waste of time. If your going to be a mage, you need the strongest spells at your finger tips, and Wizard provides them. Wizard and Pale Master are pretty good combination, because the Palemaster makes you immuned to those pesky crit. attacks. Though, I would be hesitant to add a single Paladin class to it. What is the point of that anyway?
~Nelos


Countdown to Christmas in East Kilbride has begun with weekend of festive fun
A weekend of celebrations saw the Village sparkle with festive spirit while EK, East Kilbride launched their season of goodwill with a visit from the big man himself.
by Fraser N Wilson, https://www.dailyrecord.co.uk/authors/fraser-n-wilson/The countdown to Christmas has officially started in East Kilbride after a weekend of celebrations.
EK, East Kilbride launched their festivities on Saturday with a very special visit from the main man.
Father Christmas hosted one of a number of Santa’s Grotto days, with Rudolph and the magical elves helping to create a winter wonderland.
Then, on Sunday, the Village was awash with fun, activity, well-wishes and anticipation as the East Kilbride lights were turned on.
And it was down to depute provost, Collette Stevenson to flick the switch, illuminating the skyline with colour.
Clyde 1’s Gina McKie hosted the festivities, with ocal dance and theatre groups regaling with song and dance.
Band ‘Ernest’ rocked the crowds with some classic festive hits, and Olaf and Kristoff from Frozen, along with some Minions helped spread festive cheer.


All Items
User Orders
Order History
Hello, Admin
Profile
Edit Profile
LogOut
Product Name
*
Description
*
Product Image
*
Product Price
*
Product Category
*
Is Available
*


#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
"""A source for reading from VCF files (version 4.x).
The 4.2 spec is available at https://samtools.github.io/hts-specs/VCFv4.2.pdf.
"""
from __future__ import absolute_import
import logging
import traceback
from collections import namedtuple
import vcf
from apache_beam.coders import coders
from apache_beam.io import filebasedsource
from apache_beam.io.filesystem import CompressionTypes
from apache_beam.io.iobase import Read
from apache_beam.io.textio import _TextSource as TextSource
from apache_beam.transforms import PTransform
__all__ = ['ReadFromVcf', 'Variant', 'VariantCall', 'VariantInfo',
'MalformedVcfRecord']
# Stores data about variant INFO fields. The type of 'data' is specified in the
# VCF headers. 'field_count' is a string that specifies the number of fields
# that the data type contains. Its value can either be a number representing a
# constant number of fields, `None` indicating that the value is not set
# (equivalent to '.' in the VCF file) or one of:
# - 'A': one value per alternate allele.
# - 'G': one value for each possible genotype.
# - 'R': one value for each possible allele (including the reference).
VariantInfo = namedtuple('VariantInfo', ['data', 'field_count'])
# Stores data about failed VCF record reads. `line` is the text line that
# caused the failed read and `file_name` is the name of the file that the read
# failed in.
MalformedVcfRecord = namedtuple('MalformedVcfRecord', ['file_name', 'line'])
MISSING_FIELD_VALUE = '.' # Indicates field is missing in VCF record.
PASS_FILTER = 'PASS' # Indicates that all filters have been passed.
END_INFO_KEY = 'END' # The info key that explicitly specifies end of a record.
GENOTYPE_FORMAT_KEY = 'GT' # The genotype format key in a call.
PHASESET_FORMAT_KEY = 'PS' # The phaseset format key.
DEFAULT_PHASESET_VALUE = '*' # Default phaseset value if call is phased, but
# no 'PS' is present.
MISSING_GENOTYPE_VALUE = -1 # Genotype to use when '.' is used in GT field.
[docs]class Variant(object):
"""A class to store info about a genomic variant.
Each object corresponds to a single record in a VCF file.
"""
def __init__(self,
reference_name=None,
start=None,
end=None,
reference_bases=None,
alternate_bases=None,
names=None,
quality=None,
filters=None,
info=None,
calls=None):
"""Initialize the :class:`Variant` object.
Args:
reference_name (str): The reference on which this variant occurs
(such as `chr20` or `X`). .
start (int): The position at which this variant occurs (0-based).
Corresponds to the first base of the string of reference bases.
end (int): The end position (0-based) of this variant. Corresponds to the
first base after the last base in the reference allele.
reference_bases (str): The reference bases for this variant.
alternate_bases (List[str]): The bases that appear instead of the
reference bases.
names (List[str]): Names for the variant, for example a RefSNP ID.
quality (float): Phred-scaled quality score (-10log10 prob(call is wrong))
Higher values imply better quality.
filters (List[str]): A list of filters (normally quality filters) this
variant has failed. `PASS` indicates this variant has passed all
filters.
info (dict): A map of additional variant information. The key is specified
in the VCF record and the value is of type ``VariantInfo``.
calls (list of :class:`VariantCall`): The variant calls for this variant.
Each one represents the determination of genotype with respect to this
variant.
"""
self.reference_name = reference_name
self.start = start
self.end = end
self.reference_bases = reference_bases
self.alternate_bases = alternate_bases or []
self.names = names or []
self.quality = quality
self.filters = filters or []
self.info = info or {}
self.calls = calls or []
def __eq__(self, other):
return (isinstance(other, Variant) and
vars(self) == vars(other))
def __repr__(self):
return ', '.join(
[str(s) for s in [self.reference_name,
self.start,
self.end,
self.reference_bases,
self.alternate_bases,
self.names,
self.quality,
self.filters,
self.info,
self.calls]])
def __lt__(self, other):
if not isinstance(other, Variant):
return NotImplemented
# Elements should first be sorted by reference_name, start, end.
# Ordering of other members is not important, but must be
# deterministic.
if self.reference_name != other.reference_name:
return self.reference_name < other.reference_name
elif self.start != other.start:
return self.start < other.start
elif self.end != other.end:
return self.end < other.end
self_vars = vars(self)
other_vars = vars(other)
for key in sorted(self_vars):
if self_vars[key] != other_vars[key]:
return self_vars[key] < other_vars[key]
return False
def __le__(self, other):
if not isinstance(other, Variant):
return NotImplemented
return self < other or self == other
def __ne__(self, other):
return not self == other
def __gt__(self, other):
if not isinstance(other, Variant):
return NotImplemented
return other < self
def __ge__(self, other):
if not isinstance(other, Variant):
return NotImplemented
return other <= self
[docs]class VariantCall(object):
"""A class to store info about a variant call.
A call represents the determination of genotype with respect to a particular
variant. It may include associated information such as quality and phasing.
"""
def __init__(self, name=None, genotype=None, phaseset=None, info=None):
"""Initialize the :class:`VariantCall` object.
Args:
name (str): The name of the call.
genotype (List[int]): The genotype of this variant call as specified by
the VCF schema. The values are either `0` representing the reference,
or a 1-based index into alternate bases. Ordering is only important if
`phaseset` is present. If a genotype is not called (that is, a `.` is
present in the GT string), -1 is used
phaseset (str): If this field is present, this variant call's genotype
ordering implies the phase of the bases and is consistent with any other
variant calls in the same reference sequence which have the same
phaseset value. If the genotype data was phased but no phase set was
specified, this field will be set to `*`.
info (dict): A map of additional variant call information. The key is
specified in the VCF record and the type of the value is specified by
the VCF header FORMAT.
"""
self.name = name
self.genotype = genotype or []
self.phaseset = phaseset
self.info = info or {}
def __eq__(self, other):
return ((self.name, self.genotype, self.phaseset, self.info) ==
(other.name, other.genotype, other.phaseset, other.info))
def __repr__(self):
return ', '.join(
[str(s) for s in [self.name, self.genotype, self.phaseset, self.info]])
class _VcfSource(filebasedsource.FileBasedSource):
"""A source for reading VCF files.
Parses VCF files (version 4) using PyVCF library. If file_pattern specifies
multiple files, then the header from each file is used separately to parse
the content. However, the output will be a uniform PCollection of
:class:`Variant` objects.
"""
DEFAULT_VCF_READ_BUFFER_SIZE = 65536 # 64kB
def __init__(self,
file_pattern,
compression_type=CompressionTypes.AUTO,
buffer_size=DEFAULT_VCF_READ_BUFFER_SIZE,
validate=True,
allow_malformed_records=False):
super(_VcfSource, self).__init__(file_pattern,
compression_type=compression_type,
validate=validate)
self._header_lines_per_file = {}
self._compression_type = compression_type
self._buffer_size = buffer_size
self._allow_malformed_records = allow_malformed_records
def read_records(self, file_name, range_tracker):
record_iterator = _VcfSource._VcfRecordIterator(
file_name,
range_tracker,
self._pattern,
self._compression_type,
self._allow_malformed_records,
buffer_size=self._buffer_size,
skip_header_lines=0)
# Convert iterator to generator to abstract behavior
for line in record_iterator:
yield line
class _VcfRecordIterator(object):
"""An Iterator for processing a single VCF file."""
def __init__(self,
file_name,
range_tracker,
file_pattern,
compression_type,
allow_malformed_records,
**kwargs):
self._header_lines = []
self._last_record = None
self._file_name = file_name
self._allow_malformed_records = allow_malformed_records
text_source = TextSource(
file_pattern,
0, # min_bundle_size
compression_type,
True, # strip_trailing_newlines
coders.StrUtf8Coder(), # coder
validate=False,
header_processor_fns=(lambda x: x.startswith('#'),
self._store_header_lines),
**kwargs)
self._text_lines = text_source.read_records(self._file_name,
range_tracker)
try:
self._vcf_reader = vcf.Reader(fsock=self._create_generator())
except SyntaxError as e:
# Throw the exception inside the generator to ensure file is properly
# closed (it's opened inside TextSource.read_records).
self._text_lines.throw(
ValueError('An exception was raised when reading header from VCF '
'file %s: %s' % (self._file_name,
traceback.format_exc(e))))
def _store_header_lines(self, header_lines):
self._header_lines = header_lines
def _create_generator(self):
header_processed = False
for text_line in self._text_lines:
if not header_processed and self._header_lines:
for header in self._header_lines:
self._last_record = header
yield self._last_record
header_processed = True
# PyVCF has explicit str() calls when parsing INFO fields, which fails
# with UTF-8 decoded strings. Encode the line back to UTF-8.
self._last_record = text_line.encode('utf-8')
yield self._last_record
def __iter__(self):
return self
def next(self):
try:
record = next(self._vcf_reader)
return self._convert_to_variant_record(record, self._vcf_reader.infos,
self._vcf_reader.formats)
except (LookupError, ValueError) as e:
if self._allow_malformed_records:
logging.warning(
'An exception was raised when reading record from VCF file '
'%s. Invalid record was %s: %s',
self._file_name, self._last_record, traceback.format_exc(e))
return MalformedVcfRecord(self._file_name, self._last_record)
# Throw the exception inside the generator to ensure file is properly
# closed (it's opened inside TextSource.read_records).
self._text_lines.throw(
ValueError('An exception was raised when reading record from VCF '
'file %s. Invalid record was %s: %s' % (
self._file_name,
self._last_record,
traceback.format_exc(e))))
def _convert_to_variant_record(self, record, infos, formats):
"""Converts the PyVCF record to a :class:`Variant` object.
Args:
record (:class:`~vcf.model._Record`): An object containing info about a
variant.
infos (dict): The PyVCF dict storing INFO extracted from the VCF header.
The key is the info key and the value is :class:`~vcf.parser._Info`.
formats (dict): The PyVCF dict storing FORMAT extracted from the VCF
header. The key is the FORMAT key and the value is
:class:`~vcf.parser._Format`.
Returns:
A :class:`Variant` object from the given record.
"""
variant = Variant()
variant.reference_name = record.CHROM
variant.start = record.start
variant.end = record.end
variant.reference_bases = (
record.REF if record.REF != MISSING_FIELD_VALUE else None)
# ALT fields are classes in PyVCF (e.g. Substitution), so need convert
# them to their string representations.
variant.alternate_bases.extend(
[str(r) for r in record.ALT if r] if record.ALT else [])
variant.names.extend(record.ID.split(';') if record.ID else [])
variant.quality = record.QUAL
# PyVCF uses None for '.' and an empty list for 'PASS'.
if record.FILTER is not None:
variant.filters.extend(
record.FILTER if record.FILTER else [PASS_FILTER])
for k, v in record.INFO.iteritems():
# Special case: END info value specifies end of the record, so adjust
# variant.end and do not include it as part of variant.info.
if k == END_INFO_KEY:
variant.end = v
continue
field_count = None
if k in infos:
field_count = self._get_field_count_as_string(infos[k].num)
variant.info[k] = VariantInfo(data=v, field_count=field_count)
for sample in record.samples:
call = VariantCall()
call.name = sample.sample
for allele in sample.gt_alleles or [MISSING_GENOTYPE_VALUE]:
if allele is None:
allele = MISSING_GENOTYPE_VALUE
call.genotype.append(int(allele))
phaseset_from_format = (getattr(sample.data, PHASESET_FORMAT_KEY)
if PHASESET_FORMAT_KEY in sample.data._fields
else None)
# Note: Call is considered phased if it contains the 'PS' key regardless
# of whether it uses '|'.
if phaseset_from_format or sample.phased:
call.phaseset = (str(phaseset_from_format) if phaseset_from_format
else DEFAULT_PHASESET_VALUE)
for field in sample.data._fields:
# Genotype and phaseset (if present) are already included.
if field in (GENOTYPE_FORMAT_KEY, PHASESET_FORMAT_KEY):
continue
data = getattr(sample.data, field)
# Convert single values to a list for cases where the number of fields
# is unknown. This is to ensure consistent types across all records.
# Note: this is already done for INFO fields in PyVCF.
if (field in formats and
formats[field].num is None and
isinstance(data, (int, float, long, basestring, bool))):
data = [data]
call.info[field] = data
variant.calls.append(call)
return variant
def _get_field_count_as_string(self, field_count):
"""Returns the string representation of field_count from PyVCF.
PyVCF converts field counts to an integer with some predefined constants
as specified in the vcf.parser.field_counts dict (e.g. 'A' is -1). This
method converts them back to their string representation to avoid having
direct dependency on the arbitrary PyVCF constants.
Args:
field_count (int): An integer representing the number of fields in INFO
as specified by PyVCF.
Returns:
A string representation of field_count (e.g. '-1' becomes 'A').
Raises:
ValueError: if the field_count is not valid.
"""
if field_count is None:
return None
elif field_count >= 0:
return str(field_count)
field_count_to_string = {v: k for k, v in vcf.parser.field_counts.items()}
if field_count in field_count_to_string:
return field_count_to_string[field_count]
else:
raise ValueError('Invalid value for field_count: %d' % field_count)
[docs]class ReadFromVcf(PTransform):
"""A :class:`~apache_beam.transforms.ptransform.PTransform` for reading VCF
files.
Parses VCF files (version 4) using PyVCF library. If file_pattern specifies
multiple files, then the header from each file is used separately to parse
the content. However, the output will be a PCollection of
:class:`Variant` (or :class:`MalformedVcfRecord` for failed reads) objects.
"""
def __init__(
self,
file_pattern=None,
compression_type=CompressionTypes.AUTO,
validate=True,
allow_malformed_records=False,
**kwargs):
"""Initialize the :class:`ReadFromVcf` transform.
Args:
file_pattern (str): The file path to read from either as a single file or
a glob pattern.
compression_type (str): Used to handle compressed input files.
Typical value is :attr:`CompressionTypes.AUTO
<apache_beam.io.filesystem.CompressionTypes.AUTO>`, in which case the
underlying file_path's extension will be used to detect the compression.
validate (bool): flag to verify that the files exist during the pipeline
creation time.
allow_malformed_records (bool): determines if failed VCF
record reads will be tolerated. Failed record reads will result in a
:class:`MalformedVcfRecord` being returned from the read of the record
rather than a :class:`Variant`.
"""
super(ReadFromVcf, self).__init__(**kwargs)
self._source = _VcfSource(
file_pattern,
compression_type,
validate=validate,
allow_malformed_records=allow_malformed_records)
[docs] def expand(self, pvalue):
return pvalue.pipeline | Read(self._source)


HKDF (EverCrypt_HKDF.h
)¶
This API is:
agile
multiplexing: portable C (all); SHAEXT (SHA2-256)
NOT stateful
Possible values for the agility argument (Hacl_Spec.h
) :
#define Spec_Hash_Definitions_SHA2_224 0
#define Spec_Hash_Definitions_SHA2_256 1
#define Spec_Hash_Definitions_SHA2_384 2
#define Spec_Hash_Definitions_SHA2_512 3
#define Spec_Hash_Definitions_SHA1 4
#define Spec_Hash_Definitions_MD5 5
Supported values for the agility argument: SHA1; SHA2_256; SHA2_384; SHA2_512.
Note
As always, the source is authoritative and you should check is_supported_alg
in EverCrypt.HMAC.fsti
.
Agile API¶
The expand
and extract
functions are agile and multiplexing:
void
EverCrypt_HKDF_extract(
Spec_Hash_Definitions_hash_alg a,
uint8_t *prk,
uint8_t *salt,
uint32_t saltlen,
uint8_t *ikm,
uint32_t ikmlen
);
prk
is the output parameterikm
means “input key material”if
saltlen
approaches 4GB then you need to make sure it satisfieskeysized
inSpec.Agile.HMAC.fsti
if
ikmlen
approaches 4GB then you need to check the preconditions fromextract_st
, inEverCrypt.HKDF.fsti
.
void
EverCrypt_HKDF_expand_sha1(
uint8_t *okm,
uint8_t *prk,
uint32_t prklen,
uint8_t *info,
uint32_t infolen,
uint32_t len
);
okm
(“output key material”) is the output parameterif
prklen
approaches 4GB then you need to make sure it satisfieskeysized
inSpec.Agile.HMAC.fsti
if
infolen
approaches 4GB then you need to check the precondition oninfolen
inexpand_st
, inEverCrypt.HKDF.fsti
.
These functions dynamically dispatch onto one of the specialized, non-agile versions below. As such, the cost of agility is one test.
Non-agile API¶
The expand_*
and extract_*
functions are non-agile and multiplexing:
void
EverCrypt_HKDF_expand_sha2_512(
uint8_t *okm,
uint8_t *prk,
uint32_t prklen,
uint8_t *info,
uint32_t infolen,
uint32_t len
);
void
EverCrypt_HKDF_extract_sha2_512(
uint8_t *prk,
uint8_t *salt,
uint32_t saltlen,
uint8_t *ikm,
uint32_t ikmlen
);
A non-agile, non-multiplexing copy of this API exists in Hacl_HKDF.h
.


Website Launched
Techshaw podcast is burmese podcast about tech interviews, trends and news.
Take a ride through a burmese tech scene by Burmese, for Burmese.
Techshaw podcast is hosted by
Aung Kyaw Paing, Min Phone Nyut Win & Lin Min Phyo
If you have any suggestion about our podcast, please reach out to us<EMAIL_ADDRESS>Aug 22, 2019 Next
#01 - The beginning of our technology career »
#01 - The beginning of our technology career »


Note: If you're viewing this page, the "next" and "previous" Glyphicon buttons on the left and right might not load/display properly due to web browser security rules.
Linux Kernel
Linux, a new world.
One more for good language.
Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus.


Home
Dashboard
Logout
Monday - Breakfast
Select dietary requirements
Gluten Free
Ketogenic
Vegetarian
Lacto-Vegetarian
Ovo-Vegetarian
Vegan
Pescetarian
Paleo
Primal
Whole30
Any intolerances?
Dairy
Egg
Gluten
Grain
Peanut
Seafood
Sesame
Shellfish
Soy
Sulfite
Tree
Wheat
Search
Results
Roasted red peppers and tomatoes salad
Ready in: 45 minutes
Servings: 2
View
Add
Roasted red peppers and tomatoes salad
Ready in: 45 minutes
Servings: 2
View
Add
Roasted red peppers and tomatoes salad
Ready in: 45 minutes
Servings: 2
View
Add


 If you are interested in donating any of the below, please email info at seattleattic dot com. Thanks!
- Couch
- Bar fridge
- Microwave
- Work tables
- Chairs - we have enough office chairs, now looking for comfy loungey chairs
- Power strips
- Computers
- Shelving
- Yarn swift / ball winder
- Drum carder
- Button maker
- Plates,bowls, and glasses
- Cutlery and dishes
- 3D Printer (hey, we can dream, right?)


| Package | Description |
|---|---|
| org.opensaml.xmlsec.encryption |
XMLObject interfaces and helper classes for representing encrypted content and encrypting/decrypting content.
|
| org.opensaml.xmlsec.encryption.support |
Functional support for XML Encryption.
|
| org.opensaml.xmlsec.signature |
XMLObject interfaces and helper classes for representing digitally signed content and signing/validating content.
|
| Class and Description |
|---|
| AlgorithmIdentifierType
XMLObject representing XML Encryption, version 1.1, AlgorithmIdentifierType complex type.
|
| CarriedKeyName
XMLObject representing XML Encryption, version 20021210, CarriedKeyName element.
|
| CipherData
XMLObject representing XML Encryption, version 20021210, CipherData element.
|
| CipherReference
XMLObject representing XML Encryption, version 20021210, CipherReference element.
|
| CipherValue
XMLObject representing XML Encryption, version 20021210, CipherValue element.
|
| DataReference
XMLObject representing XML Encryption, version 20021210, DataReference element.
|
| EncryptedType
XMLObject representing XML Encryption, version 20021210, EncryptedType type.
|
| EncryptionMethod
XMLObject representing XML Encryption, version 20021210, EncryptionMethod element.
|
| EncryptionProperties
XMLObject representing XML Encryption, version 20021210, EncryptionProperties element.
|
| EncryptionProperty
XMLObject representing XML Encryption, version 20021210, EncryptionProperty element.
|
| Generator
XMLObject representing XML Encryption, version 20021210, Generator element.
|
| KANonce
XMLObject representing XML Encryption, version 20021210, KA-Nonce element.
|
| KeyReference
XMLObject representing XML Encryption, version 20021210, KeyReference element.
|
| KeySize
XMLObject representing XML Encryption, version 20021210, KeySize element.
|
| OAEPparams
XMLObject representing XML Encryption, version 20021210, OAEPparams element.
|
| OriginatorKeyInfo
XMLObject representing XML Encryption, version 20021210, OriginatorKeyInfo element.
|
| P
XMLObject representing XML Encryption, version 20021210, P element.
|
| PgenCounter
XMLObject representing XML Encryption, version 20021210, pgenCounter element.
|
| Public
XMLObject representing XML Encryption, version 20021210, Public element.
|
| Q
XMLObject representing XML Encryption, version 20021210, Q element.
|
| RecipientKeyInfo
XMLObject representing XML Encryption, version 20021210, RecipientKeyInfo element.
|
| ReferenceList
XMLObject representing XML Encryption, version 20021210, ReferenceList element.
|
| ReferenceType
XMLObject representing XML Encryption, version 20021210, ReferenceType type.
|
| Seed
XMLObject representing XML Digital Signature, version 20020212, seed element.
|
| Transforms
XMLObject representing XML Encryption, version 20021210, Transforms element.
|
| Class and Description |
|---|
| EncryptedData
XMLObject representing XML Encryption, version 20021210, EncryptedData element.
|
| EncryptedKey
XMLObject representing XML Encryption, version 20021210, EncryptedKey element.
|
| EncryptedType
XMLObject representing XML Encryption, version 20021210, EncryptedType type.
|
| Class and Description |
|---|
| AgreementMethod
XMLObject representing XML Encryption, version 20021210, AgreementMethod element.
|
| EncryptedKey
XMLObject representing XML Encryption, version 20021210, EncryptedKey element.
|
Copyright © 1999–2016 Shibboleth Consortium. All rights reserved.


Millions of people are on Dine24 looking for businesses like yours. Show them why they should choose you. Join the community and start telling your story your way: Upload photos, respond to reviews, update your business info, and more.
 Add photos to showcase the best of your business
Turn page visitors into customers. Let them get quotes, make appointments, or ask questions right from your business page.
Stay on top of feedback and respond to reviews as soon as they come in. Engage with your customers and keep them coming back.
See what’s happening on your page in real time. Track clicks, calls, page visits - and learn more about your potential customers.


Khanjan Vaidya
My name is khanjan Vaidya and I am a computer enthusiast. Also I have keen interest in ML and developing projects for making world a sustainable place to live. I am working on two projects which well reduce problems of common man. I have also applied for Student Start-up program and Also I am learning IOT which is the future of world.
A represenation of my proficency in each skill.
Developed By Khanjan
© Copyright Khanjan Vaidya 2019


Lolipop.php - Edited By KingDefacer - []
|
Lolipop BETA ( Powered By KingDefacer )
|
Site: Server name: Software: Version : 5.6.30 Uname -a: Windows NT DESKTOP-3HA12UD 10.0 build 15063 (Windows 10) i586 Path: C:\Users\yaoleo\Desktop\webshellSample-master\webshellSample-master\PHP\dama/ Safemode: OFF Disable Functions: None Page: 124e3a5da9aa150c415d084d07fc1d4f.php Your IP: Server IP: |
|
Lolipop.php
Edited By KingDefacer
|
|


Matrix Factorization
Scott Clayton 2018
Original Matrix
Go
Decomposed Matrix
Error Matrix
RMSE:
Iterations:


Check policy compliance - Check that the introduced open source libraries conform with organization policies.
The plugin will check each new library against the organizational policies.
If any library should be automatically rejected by some policy the build will fail. Otherwise your account will be updated.
Check only new libraries - Check that the newly introduced open source libraries conform with organization policies.
Force check all libraries - Check that all introduced open source libraries conform with organization policies.
Disable - Disable policies check when updating WhiteSource.


Back at home,cody tries to get to the bottom of what happened to him at the meet,one thing he notices is that when he comes in contact with water he grows gills "what is happening to me?" Thought cody
"Hey cody i heard about what happened at your surf meet" said cody's uncle jesse Well he wasn't really his uncle,he was actually his legal guardian,cody just called him "uncle for the pleasure of it
"it was a miracle that"uncle jesse stopped to see a worried look on his "nephew's" face "Oh cody i know how badly you wanted to win this year but it's not the last meet of your life there's always next year" "It's not the meet uncle j"said cody "it's that"
Cody tells his guardian he thinks something is wrong with him


Link: haiku.jillmunson.com
no longer hosted on google app engine, currently migrating to AWS so stay tuned :)
Github: haiku.py
A work in progress JSON API haiku-as-a-service. Built with Flask on top of the provided sample application from CP:100, deployed on google app engine
v.01 - Counting syllables with nltk and CMU pronouncing dictionary
This all started as a demo app for google app engine that I was tweaking as part of CP:100, an introduction to Google Cloud Platform that was organized by GDG-NYC (side note: they are awesome and run some really awesome meetups so if you are in the area, go!).
At my day job, we use Hipchat for internal communications. My original end goal was to build an API that would produce haikus from a user's chat history. Since I don't have an API key for Hipchat access, I thought I would start on the whole counting syllables and making haikus that didn't totally suck thing.
Accurate syllable counting is hard. In theory, I could have started by limiting the dictionary and hard-coding text inputs with syllable counts and part-of-speech tags but that sounded tedious and the whole goal of this project was to entertain myself so creating shit work would kind of defeat the purpose, although it's been done.
Enter nltk. Nltk is a natural language toolkit for Python that has lots of awesome modules and a companion book with examples to get you started.
Unfortuantely, nltk does not have a syllable dictionary. However, I found this nifty code snippet from the nltk-users mailing list which was cited in this writeup which is something closer to what I ended up using:
from curses.ascii import isdigit
from nltk.corpus import cmudict
d = cmudict.dict() # get the CMU Pronouncing Dict
def nsyl(word):
"""return the max syllable count in the case of multiple pronunciations"""
return max([len([y for y in x if isdigit(y[-1])]) for x in d[word.lower()]])
What this list comprehension is doing is taking the entry in the CMU pronuncing dictionary and counting the number of pronunciation entries for a given word (using max to always return greatest number of syllables in cases of multiple correct yet discrete pronunciations).
so the first version of the app literally just returned estimated syllable counts for a given input:
import string
import nltk
from nltk.corpus import cmudict
class Haiku:
def __init__(self):
self.cmudict = cmudict.dict()
def countSyllables(self, query='hello'):
result = {}
words = query.strip().split(',')
for word in words:
try:
result[word] = max([len([y for y in x if y[-1] in string.digits]) for x in self.cmudict[word.lower()]])
except:
result[word] = 'Error - ' + word + ' is not a recognized word'
return result
v.02 - Grammar tagging with Penn Treebank part of speech tags and nltk word tokenizer
So once I had a syllable counter, it would be trivially easy to find random words to construct a haiku that satisfies the 5-7-5 syllable structure. I didn't want to settle – I wanted haikus that, while maybe not semantically sensical, at least followed some semblance of grammatically correct English.
In order to be able to do this, I needed to be able to tag every word in the CMU dictionary with its part of speech. The nltk textbook has a whole chapter dedicated to word tagging and tokenization.
For my purposes, I wanted to preserve the generated syllable count and the part of speech. In order to do that, I needed to create a new dictionary. Generating this dictionary on application load was insanely expensive, so I made a smaller script just to generate the dictionary and instead would load a pickle.
To test the dictionary, I created a new endpoint that would accept a word as input and return a list of other words that have the same part of speech and syllable count.
import random
import string
import nltk
import pickle
from nltk.corpus import cmudict
from nltk import word_tokenize
class Haiku:
def __init__(self):
self.cmudict = cmudict.dict()
self.words = self.cmudict.keys()
self.tagged_words = pickle.load(open('tagged_words_syl.p', "rb"))
def _syllableHelper(self, query='hello'):
return max([len([y for y in x if y[-1] in string.digits]) for x in self.cmudict[query.lower()]])
Using this pattern I generated haikus like:
def getSimilarWords(self, word="hello"):
wordData = nltk.pos_tag(word_tokenize(word))
category = wordData[0][1]
syllable = self._syllableHelper(word)
similarWords = [x for x in self.tagged_words if x[1] == category and x[2] == syllable]
return {
word: similarWords,
'category': category
}
v.03 - Building pattern-based haikus
So once I had syllable counts and parts of speech, I needed to create a pattern for the haikus. The pattern would contain three arrays, each containing either:
- A (part of speech, syllable) tuple or
- A list of connecting phrases, modifiers, etc.
The pattern I came up with after some trial and error was:
So to use this to generate haikus, I would iterate over the pattern and either replace a tuple with a similar word or choose a random entry given a list of words. I thought this might break down if I start accepting user-provided patterns, but I wasn't there yet and honestly was just curious what kind of output I would get.
import random
import string
import nltk
import pickle
from nltk.corpus import cmudict
from nltk import word_tokenize
class Haiku:
def __init__(self):
self.cmudict = cmudict.dict()
self.words = self.cmudict.keys()
self.tagged_words = pickle.load(open('tagged_words_syl.p', "rb"))
self.pattern = [[
("NNS", 2),
("VBG", 3)
],[
("VBG", 3),
["in the", "with some", "like some", "without my", "like the", "of the"],
("NNS", 2)
],[
("VBG", 2),
("RB", 3)
]
]
self.grammar = [
"CC",
"CD",
"DT",
"EX",
"FW",
"IN",
"JJ",
"JJR",
"JJS",
"LS",
"MD",
"NN",
"NNS",
"NNP",
"NNPS",
"PDT",
"POS",
"PRP",
"PRP$",
"RB",
"RBR",
"RBS",
"RP",
"SYM",
"TO",
"UH",
"VB",
"VBD",
"VBG",
"VBN",
"VBP",
"VBZ",
"WDT",
"WP",
"WP$",
]
def _syllableHelper(self, query='hello'):
return max([len([y for y in x if y[-1] in string.digits]) for x in self.cmudict[query.lower()]])
def getSimilarWords(self, word="hello"):
wordData = nltk.pos_tag(word_tokenize(word))
category = wordData[0][1]
syllable = self._syllableHelper(word)
similarWords = [x for x in self.tagged_words if x[1] == category and x[2] == syllable]
return {
word: similarWords,
'category': category
}
def makeHaiku(self):
haiku = {}
for line in xrange(len(self.pattern)):
haiku[line] = []
for i in xrange(len(self.pattern[line])):
if not (len(self.pattern[line][i]) > 2):
currentPattern = self.pattern[line][i]
category = currentPattern[0]
syllable = currentPattern[1]
similarWords = [x for x in self.tagged_words if x[1] == category and x[2] == syllable]
haiku[line].append(random.choice(similarWords)[0])
else:
haiku[line].append(random.choice(self.pattern[line][i]))
return {
'haiku': haiku
}
Using this pattern I generated haikus like:
and
In general, the output reads like a silly but legit haiku.


Spider-man was created by Stan Lee and Steve Ditko and debuted in Amazing Fantasy #15 in August of 1962.
Spider-Man has spider-like abilities including superhuman strength and the ability to cling to most surfaces. He is also extremely agile and has amazing reflexes. Spider-Man also has a “spider sense,” that warns him of impending danger.


Living Arts
Home
(current)
Murals
Animations
Paintings
{{ each.title }}
{{ each.text1 }}
{{ each.text2 }}
SEE THE {{ each.view }}...


--- pagination: data: collections size: 1 alias: tag filter: - all - nav - post - posts - tagList addAllPagesToCollections: true layout: layouts/home.html eleventyComputed: title: Tagged “{{ tag }}” permalink: /tags/{{ tag | slug }}/ ---
See all tags.


The Ghanaian culture cannot be considered a uniform one. Rather, it consists of hundreds of different ethnic influences and tribes who speak their own dialects and their own languages, having different cultural backgrounds. However, the different Ghanaian ethnic groups largely share one common belief: the naming of their children.
The tradition goes back to the Akan tribe: to name their children by the day of their birth. However, Ghanaian names have an even deeper meaning. We take you into this culture and show you as well your Ghanaian name!
Below are Akan names and their corresponding days of the week:
| Day | Male Names | Female Names |
|---|---|---|
| Sunday | Kwasi | Akosua |
| Monday | Kwadwo | Adwoa |
| Tuesday | Kwabena | Abenaa |
| Wednesday | Kwaku | Akua |
| Thursday | Yaw | Yaa |
| Friday | Kofi | Afua |
| Saturday | Kwame | Ama |


CHARLES N. MAILU
E-PORTFOLIO
HOME
Hello!
click here
to read about
Charles N. Mailu
More stuff
links to my moringa school week one projects


This sample demonstrates how to use Node.js Stream to read image from Cloud Storage, generate a thumbnail image using Sharp and upload it back to Cloud Storage. This is a alternative approach for using ImageMagick, see generate-thumbnail.
See file functions/index.js for the thumbnail generation code.
The thumbnail generation is performed using Sharp. Download, resize input/output and upload uses Node.js Stream
The dependencies are listed in functions/package.json.
The function triggers on upload of any file to your Firebase project’s default Cloud Storage bucket.
To deploy and test the sample:
git clone https://github.com/firebase/functions-samples
cd functions-samples/image-sharp
npm install -g firebase-tools
firebase use --add
and select your Firebase project
firebase deploy
thumb_
prefix will be created in the same folder (make sure
you refresh the UI to see the new file).
We’d love that you contribute to the project. Before doing so please read our Contributor guide.
© Google, 2016. Licensed under an Apache-2 license.


tecla tecla
NAME
tecla, teclarc - The user interface provided by the Tecla library.
DESCRIPTION
This man page describes the command-line editing features that are
available to users of programs that read keyboard input via the Tecla
library. Users of the tcsh shell will find the default key-bindings
very familiar. Users of the bash shell will also find it quite famil-
iar, but with a few minor differences, most notably in how forward and
backward searches through the list of historical commands are per-
formed. There are two major editing modes, one with emacs-like key-
bindings and another with vi-like key-bindings. By default emacs mode
is enabled, but vi mode can alternatively be selected via the user's
configuration file. This file can also be used to change the bindings
of individual keys to suit the user's preferences. By default, tab com-
pletion is provided. If the application hasn't reconfigured this to
complete other types of symbols, then tab completion completes file-
names.
KEY SEQUENCE NOTATION
In the rest of this man page, and also in all Tecla configuration
files, key-sequences are expressed as follows.
^A or C-a
This is a control-A, entered by pressing the control key at
the same time as the A key.
\E or M-
In key-sequences, both of these notations can be entered
either by pressing the escape key, then the following key, or by
pressing the Meta key at the same time as the following key. Thus
the key sequence M-p can be typed in two ways, by pressing
the escape key, followed by pressing p, or by pressing the
Meta key at the same time as p.
up
This refers to the up-arrow key.
down
This refers to the down-arrow key.
left
This refers to the left-arrow key.
right
This refers to the right-arrow key.
a
This is just a normal A key.
THE TECLA CONFIGURATION FILE
By default, Tecla looks for a file called .teclarc in your home direc-
tory (ie. ~/.teclarc). If it finds this file, it reads it, interpret-
ing each line as defining a new key binding or an editing configuration
option. Since the emacs keybindings are installed by default, if you
want to use the non-default vi editing mode, the most important item to
go in this file is the following line:
edit-mode vi
This will re-configure the default bindings for vi-mode. The complete
set of arguments that this command accepts are:
vi - Install key-bindings like those of the vi
editor.
emacs - Install key-bindings like those of the emacs
editor. This is the default.
none - Use just the native line editing facilities
provided by the terminal driver.
To prevent the terminal bell from being rung, such as when an unrecog-
nized control-sequence is typed, place the following line in the con-
figuration file:
nobeep
An example of a key binding line in the configuration file is the fol-
lowing.
bind M-[2~ insert-mode
On many keyboards, the above key sequence is generated when one presses
the insert key, so with this keybinding, one can toggle between the
emacs-mode insert and overwrite modes by hitting one key. One could
also do it by typing out the above sequence of characters one by one.
As explained above, the M- part of this sequence can be typed either by
pressing the escape key before the following key, or by pressing the
Meta key at the same time as the following key. Thus if you had set the
above key binding, and the insert key on your keyboard didn't generate
the above key sequence, you could still type it in either of the fol-
lowing 2 ways.
1. Hit the escape key momentarily, then press '[', then '2', then
finally '~'.
2. Press the meta key at the same time as pressing the '[' key,
then press '2', then '~'.
If you set a keybinding for a key-sequence that is already bound to a
function, the new binding overrides the old one. If in the new binding
you omit the name of the new function to bind to the key-sequence, the
original binding becomes undefined.
Starting with versions of libtecla later than 1.3.3 it is now possible
to bind keysequences that begin with a printable character. Previously
key-sequences were required to start with a control or meta character.
Note that the special keywords "up", "down", "left" and "right" refer
to the arrow keys, and are thus not treated as keysequences. So, for
example, to rebind the up and down arrow keys to use the history search
mechanism instead of the simple history recall method, you could place
the following in your configuration file:
bind up history-search-backwards
bind down history-search-backwards
To unbind an existing binding, you can do this with the bind command by
omitting to name any action to rebind the key sequence to. For exam-
ple, by not specifying an action function, the following command
unbinds the default beginning-of-line action from the ^A key sequence:
bind ^A
If you create a ~/.teclarc configuration file, but it appears to have
no effect on the program, check the documentation of the program to see
if the author chose a different name for this file.
FILENAME AND TILDE COMPLETION
With the default key bindings, pressing the TAB key (aka. ^I) results
in Tecla attempting to complete the incomplete filename that precedes
the cursor. Tecla searches backwards from the cursor, looking for the
start of the filename, stopping when it hits either a space or the
start of the line. If more than one file has the specified prefix, then
Tecla completes the filename up to the point at which the ambiguous
matches start to differ, then lists the possible matches.
In addition to literally written filenames, Tecla can complete files
that start with ~/ and ~user/ expressions and that contain $envvar
expressions. In particular, if you hit TAB within an incomplete ~user,
expression, Tecla will attempt to complete the username, listing any
ambiguous matches.
The completion binding is implemented using the cpl_word_completions()
function, which is also available separately to users of this library.
See the cpl_word_completions(@LIBR_MANEXT@) man page for more details.
FILENAME EXPANSION
With the default key bindings, pressing ^X* causes Tecla to expand the
filename that precedes the cursor, replacing ~/ and ~user/ expressions
with the corresponding home directories, and replacing $envvar expres-
sions with the value of the specified environment variable, then if
there are any wildcards, replacing the so far expanded filename with a
space-separated list of the files which match the wild cards.
The expansion binding is implemented using the ef_expand_file() func-
tion. See the ef_expand_file man page for more details.
RECALLING PREVIOUSLY TYPED LINES
Every time that a new line is entered by the user, it is appended to a
list of historical input lines maintained within the GetLine resource
object. You can traverse up and down this list using the up and down
arrow keys. Alternatively, you can do the same with the ^P, and ^N
keys, and in vi command mode you can alternatively use the k and j
characters. Thus pressing up-arrow once, replaces the current input
line with the previously entered line. Pressing up-arrow again,
replaces this with the line that was entered before it, etc.. Having
gone back one or more lines into the history list, one can return to
newer lines by pressing down-arrow one or more times. If you do this
sufficient times, you will return to the original line that you were
entering when you first hit up-arrow.
Note that in vi mode, all of the history recall functions switch the
library into command mode.
In emacs mode the M-p and M-n keys work just like the ^P and ^N keys,
except that they skip all but those historical lines which share the
prefix that precedes the cursor. In vi command mode the upper case K
and J characters do the same thing, except that the string that they
search for includes the character under the cursor as well as what pre-
cedes it.
Thus for example, suppose that you were in emacs mode, and you had just
entered the following list of commands in the order shown:
ls ~/tecla/
cd ~/tecla
ls -l getline.c
emacs ~/tecla/getline.c
If you next typed:
ls
and then hit M-p, then rather than returning the previously typed emacs
line, which doesn't start with "ls", Tecla would recall the "ls -l get-
line.c" line. Pressing M-p again would recall the "ls ~/tecla/" line.
Note that if the string that you are searching for, contains any of the
special characters, *, ?, or '[', then it is interpretted as a pattern
to be matched. Thus, cotinuing with the above example, after typing in
the list of commands shown, if you then typed:
*tecla*
and hit M-p, then the "emacs ~/tecla/getline.c" line would be recalled
first, since it contains the word tecla somewhere in the line, Simi-
larly, hitting M-p again, would recall the "ls ~/tecla/" line, and hit-
ting it once more would recall the "ls ~/tecla/" line. The pattern syn-
tax is the same as that described for filename expansion, in the
ef_expand_file(@LIBR_MANEXT@ man page.
HISTORY FILES
Authors of programs that use the Tecla library have the option of sav-
ing historical command-lines in a file before exiting, and subsequently
reading them back in from this file when the program is next started.
There is no standard name for this file, since it makes sense for each
application to use its own history file, so that commands from differ-
ent applications don't get mixed up.
INTERNATIONAL CHARACTER SETS
Since libtecla version 1.4.0, Tecla has been 8-bit clean. This means
that all 8-bit characters that are printable in the user's current
locale are now displayed verbatim and included in the returned input
line. Assuming that the calling program correctly contains a call like
the following,
setlocale(LC_CTYPE, "");
then the current locale is determined by the first of the environment
variables LC_CTYPE, LC_ALL, and LANG, that is found to contain a valid
locale name. If none of these variables are defined, or the program
neglects to call setlocale, then the default C locale is used, which is
US 7-bit ASCII. On most unix-like platforms, you can get a list of
valid locales by typing the command:
locale -a
at the shell prompt.
Meta keys and locales
Beware that in most locales other than the default C locale, meta char-
acters become printable, and they are then no longer considered to
match M-c style key bindings. This allows international characters to
be entered with the compose key without unexpectedly triggering meta
key bindings. You can still invoke meta bindings, since there are actu-
ally two ways to do this. For example the binding M-c can also be
invoked by pressing the escape key momentarily, then pressing the c
key, and this will work regardless of locale. Moreover, many modern
terminal emulators, such as gnome's gnome-terminal's and KDE's konsole
terminals, already generate escape pairs like this when you use the
meta key, rather than a real meta character, and other emulators usu-
ally have a way to request this behavior, so you can continue to use
the meta key on most systems.
For example, although xterm terminal emulators generate real 8-bit meta
characters by default when you use the meta key, they can be configured
to output the equivalent escape pair by setting their EightBitInput X
resource to False. You can either do this by placing a line like the
following in your ~/.Xdefaults file,
XTerm*EightBitInput: False
or by starting an xterm with an -xrm '*EightBitInput: False' command-
line argument. In recent versions of xterm you can toggle this feature
on and off with the "Meta Sends Escape" option in the menu that is dis-
played when you press the left mouse button and the control key within
an xterm window. In CDE, dtterms can be similarly coerced to generate
escape pairs in place of meta characters, by setting the Dtterm*KshMode
resource to True.
Entering international characters
If you don't have a keyboard that generates all of the international
characters that you need, there is usually a compose key that will
allow you to enter special characters, or a way to create one. For
example, under X windows on unix-like systems, if your keyboard doesn't
have a compose key, you can designate a redundant key to serve this
purpose with the xmodmap command. For example, on many PC keyboards
there is a microsoft-windows key, which is otherwise useless under
Linux. On my laptop the xev program reports that pressing this key gen-
erates keycode 115, so to turn this key into a compose key, I do the
following:
xmodmap -e 'keycode 115 = Multi_key'
I can then enter an i with a umlaut over it by typing this key, fol-
lowed by ", followed by i.
THE AVAILABLE KEY BINDING FUNCTIONS
The following is a list of the editing functions provided by the Tecla
library. The names in the leftmost column of the list can be used in
configuration files to specify which function a given key or combina-
tion of keys should invoke. They are also used in the next two sections
to list the default key-bindings in emacs and vi modes.
user-interrupt - Send a SIGINT signal to the
parent process.
abort - Send a SIGABRT signal to the
parent process.
suspend - Suspend the parent process.
stop-output - Pause terminal output.
start-output - Resume paused terminal output.
literal-next - Arrange for the next character
to be treated as a normal
character. This allows control
characters to be entered.
cursor-right - Move the cursor one character
right.
cursor-left - Move the cursor one character
left.
insert-mode - Toggle between insert mode and
overwrite mode.
beginning-of-line - Move the cursor to the
beginning of the line.
end-of-line - Move the cursor to the end of
the line.
delete-line - Delete the contents of the
current line.
kill-line - Delete everything that follows
the cursor.
backward-kill-line - Delete all characters between
the cursor and the start of the
line.
forward-word - Move to the end of the word
which follows the cursor.
forward-to-word - Move the cursor to the start of
the word that follows the
cursor.
backward-word - Move to the start of the word
which precedes the cursor.
goto-column - Move the cursor to the
1-relative column in the line
specified by any preceding
digit-argument sequences (see
ENTERING REPEAT COUNTS below).
find-parenthesis - If the cursor is currently
over a parenthesis character,
move it to the matching
parenthesis character. If not
over a parenthesis character
move right to the next close
parenthesis.
forward-delete-char - Delete the character under the
cursor.
backward-delete-char - Delete the character which
precedes the cursor.
list-or-eof - This is intended for binding
to ^D. When invoked when the
cursor is within the line it
displays all possible
completions then redisplays
the line unchanged. When
invoked on an empty line, it
signals end-of-input (EOF) to
the caller of gl_get_line().
del-char-or-list-or-eof - This is intended for binding
to ^D. When invoked when the
cursor is within the line it
invokes forward-delete-char.
When invoked at the end of the
line it displays all possible
completions then redisplays
the line unchanged. When
invoked on an empty line, it
signals end-of-input (EOF) to
the caller of gl_get_line().
forward-delete-word - Delete the word which follows
the cursor.
backward-delete-word - Delete the word which precedes
the cursor.
upcase-word - Convert all of the characters
of the word which follows the
cursor, to upper case.
downcase-word - Convert all of the characters
of the word which follows the
cursor, to lower case.
capitalize-word - Capitalize the word which
follows the cursor.
change-case - If the next character is upper
case, toggle it to lower case
and vice versa.
redisplay - Redisplay the line.
clear-screen - Clear the terminal, then
redisplay the current line.
transpose-chars - Swap the character under the
cursor with the character just
before the cursor.
set-mark - Set a mark at the position of
the cursor.
exchange-point-and-mark - Move the cursor to the last
mark that was set, and move
the mark to where the cursor
used to be.
kill-region - Delete the characters that lie
between the last mark that was
set, and the cursor.
copy-region-as-kill - Copy the text between the mark
and the cursor to the cut
buffer, without deleting the
original text.
yank - Insert the text that was last
deleted, just before the
current position of the cursor.
append-yank - Paste the current contents of
the cut buffer, after the
cursor.
up-history - Recall the next oldest line
that was entered. Note that
in vi mode you are left in
command mode.
down-history - Recall the next most recent
line that was entered. If no
history recall session is
currently active, the next
line from a previous recall
session is recalled. Note that
in vi mode you are left in
command mode.
history-search-backward - Recall the next oldest line
who's prefix matches the string
which currently precedes the
cursor (in vi command-mode the
character under the cursor is
also included in the search
string). Note that in vi mode
you are left in command mode.
history-search-forward - Recall the next newest line
who's prefix matches the string
which currently precedes the
cursor (in vi command-mode the
character under the cursor is
also included in the search
string). Note that in vi mode
you are left in command mode.
history-re-search-backward -Recall the next oldest line
who's prefix matches that
established by the last
invocation of either
history-search-forward or
history-search-backward.
history-re-search-forward - Recall the next newest line
who's prefix matches that
established by the last
invocation of either
history-search-forward or
history-search-backward.
complete-word - Attempt to complete the
incomplete word which
precedes the cursor. Unless
the host program has customized
word completion, filename
completion is attempted. In vi
commmand mode the character
under the cursor is also
included in the word being
completed, and you are left in
vi insert mode.
expand-filename - Within the command line, expand
wild cards, tilde expressions
and dollar expressions in the
filename which immediately
precedes the cursor. In vi
commmand mode the character
under the cursor is also
included in the filename being
expanded, and you are left in
vi insert mode.
list-glob - List any filenames which match
the wild-card, tilde and dollar
expressions in the filename
which immediately precedes the
cursor, then redraw the input
line unchanged.
list-history - Display the contents of the
history list for the current
history group. If a repeat
count of > 1 is specified,
only that many of the most
recent lines are displayed.
See the "ENTERING REPEAT
COUNTS" section.
read-from-file - Temporarily switch to reading
input from the file who's
name precedes the cursor.
read-init-files - Re-read teclarc configuration
files.
beginning-of-history - Move to the oldest line in the
history list. Note that in vi
mode you are left in command
mode.
end-of-history - Move to the newest line in the
history list (ie. the current
line). Note that in vi mode
this leaves you in command
mode.
digit-argument - Enter a repeat count for the
next key-binding function.
For details, see the ENTERING
REPEAT COUNTS section.
newline - Terminate and return the
current contents of the
line, after appending a
newline character. The newline
character is normally '\n',
but will be the first
character of the key-sequence
that invoked the newline
action, if this happens to be
a printable character. If the
action was invoked by the
'\n' newline character or the
'\r' carriage return
character, the line is
appended to the history
buffer.
repeat-history - Return the line that is being
edited, then arrange for the
next most recent entry in the
history buffer to be recalled
when Tecla is next called.
Repeatedly invoking this
action causes successive
historical input lines to be
re-executed. Note that this
action is equivalent to the
'Operate' action in ksh.
ring-bell - Ring the terminal bell, unless
the bell has been silenced via
the nobeep configuration
option (see the THE TECLA
CONFIGURATION FILE section).
forward-copy-char - Copy the next character into
the cut buffer (NB. use repeat
counts to copy more than one).
backward-copy-char - Copy the previous character
into the cut buffer.
forward-copy-word - Copy the next word into the cut
buffer.
backward-copy-word - Copy the previous word into the
cut buffer.
forward-find-char - Move the cursor to the next
occurrence of the next
character that you type.
backward-find-char - Move the cursor to the last
occurrence of the next
character that you type.
forward-to-char - Move the cursor to the
character just before the next
occurrence of the next
character that the user types.
backward-to-char - Move the cursor to the
character just after the last
occurrence before the cursor
of the next character that the
user types.
repeat-find-char - Repeat the last
backward-find-char,
forward-find-char,
backward-to-char or
forward-to-char.
invert-refind-char - Repeat the last
backward-find-char,
forward-find-char,
backward-to-char, or
forward-to-char in the
opposite direction.
delete-to-column - Delete the characters from the
cursor up to the column that
is specified by the repeat
count.
delete-to-parenthesis - Delete the characters from the
cursor up to and including
the matching parenthesis, or
next close parenthesis.
forward-delete-find - Delete the characters from the
cursor up to and including the
following occurence of the
next character typed.
backward-delete-find - Delete the characters from the
cursor up to and including the
preceding occurence of the
next character typed.
forward-delete-to - Delete the characters from the
cursor up to, but not
including, the following
occurence of the next
character typed.
backward-delete-to - Delete the characters from the
cursor up to, but not
including, the preceding
occurence of the next
character typed.
delete-refind - Repeat the last *-delete-find
or *-delete-to action.
delete-invert-refind - Repeat the last *-delete-find
or *-delete-to action, in the
opposite direction.
copy-to-column - Copy the characters from the
cursor up to the column that
is specified by the repeat
count, into the cut buffer.
copy-to-parenthesis - Copy the characters from the
cursor up to and including
the matching parenthesis, or
next close parenthesis, into
the cut buffer.
forward-copy-find - Copy the characters from the
cursor up to and including the
following occurence of the
next character typed, into the
cut buffer.
backward-copy-find - Copy the characters from the
cursor up to and including the
preceding occurence of the
next character typed, into the
cut buffer.
forward-copy-to - Copy the characters from the
cursor up to, but not
including, the following
occurence of the next
character typed, into the cut
buffer.
backward-copy-to - Copy the characters from the
cursor up to, but not
including, the preceding
occurence of the next
character typed, into the cut
buffer.
copy-refind - Repeat the last *-copy-find
or *-copy-to action.
copy-invert-refind - Repeat the last *-copy-find
or *-copy-to action, in the
opposite direction.
vi-mode - Switch to vi mode from emacs
mode.
emacs-mode - Switch to emacs mode from vi
mode.
vi-insert - From vi command mode, switch to
insert mode.
vi-overwrite - From vi command mode, switch to
overwrite mode.
vi-insert-at-bol - From vi command mode, move the
cursor to the start of the line
and switch to insert mode.
vi-append-at-eol - From vi command mode, move the
cursor to the end of the line
and switch to append mode.
vi-append - From vi command mode, move the
cursor one position right, and
switch to insert mode.
vi-replace-char - From vi command mode, replace
the character under the cursor
with the the next character
entered.
vi-forward-change-char - From vi command mode, delete
the next character then enter
insert mode.
vi-backward-change-char - From vi command mode, delete
the preceding character then
enter insert mode.
vi-forward-change-word - From vi command mode, delete
the next word then enter
insert mode.
vi-backward-change-word - From vi command mode, delete
the preceding word then
enter insert mode.
vi-change-rest-of-line - From vi command mode, delete
from the cursor to the end of
the line, then enter insert
mode.
vi-change-line - From vi command mode, delete
the current line, then enter
insert mode.
vi-change-to-bol - From vi command mode, delete
all characters between the
cursor and the beginning of
the line, then enter insert
mode.
vi-change-to-column - From vi command mode, delete
the characters from the cursor
up to the column that is
specified by the repeat count,
then enter insert mode.
vi-change-to-parenthesis - Delete the characters from the
cursor up to and including
the matching parenthesis, or
next close parenthesis, then
enter vi insert mode.
vi-forward-change-find - From vi command mode, delete
the characters from the
cursor up to and including the
following occurence of the
next character typed, then
enter insert mode.
vi-backward-change-find - From vi command mode, delete
the characters from the
cursor up to and including the
preceding occurence of the
next character typed, then
enter insert mode.
vi-forward-change-to - From vi command mode, delete
the characters from the
cursor up to, but not
including, the following
occurence of the next
character typed, then enter
insert mode.
vi-backward-change-to - From vi command mode, delete
the characters from the
cursor up to, but not
including, the preceding
occurence of the next
character typed, then enter
insert mode.
vi-change-refind - Repeat the last
vi-*-change-find or
vi-*-change-to action.
vi-change-invert-refind - Repeat the last
vi-*-change-find or
vi-*-change-to action, in the
opposite direction.
vi-undo - In vi mode, undo the last
editing operation.
vi-repeat-change - In vi command mode, repeat the
last command that modified the
line.
DEFAULT KEY BINDINGS IN EMACS MODE
The following default key bindings, which can be overriden by the Tecla
configuration file, are designed to mimic most of the bindings of the
unix tcsh shell, when it is in emacs editing mode.
This is the default editing mode of the Tecla library.
Under UNIX the terminal driver sets a number of special keys for cer-
tain functions. The tecla library attempts to use the same keybindings
to maintain consistency. The key sequences shown for the following 6
bindings are thus just examples of what they will probably be set to.
If you have used the stty command to change these keys, then the
default bindings should match.
^C -> user-interrupt
^\ -> abort
^Z -> suspend
^Q -> start-output
^S -> stop-output
^V -> literal-next
The cursor keys are refered to by name, as follows. This is necessary
because different types of terminals generate different key sequences
when their cursor keys are pressed.
right -> cursor-right
left -> cursor-left
up -> up-history
down -> down-history
The remaining bindings don't depend on the terminal setttings.
^F -> cursor-right
^B -> cursor-left
M-i -> insert-mode
^A -> beginning-of-line
^E -> end-of-line
^U -> delete-line
^K -> kill-line
M-f -> forward-word
M-b -> backward-word
^D -> del-char-or-list-or-eof
^H -> backward-delete-char
^? -> backward-delete-char
M-d -> forward-delete-word
M-^H -> backward-delete-word
M-^? -> backward-delete-word
M-u -> upcase-word
M-l -> downcase-word
M-c -> capitalize-word
^R -> redisplay
^L -> clear-screen
^T -> transpose-chars
^@ -> set-mark
^X^X -> exchange-point-and-mark
^W -> kill-region
M-w -> copy-region-as-kill
^Y -> yank
^P -> up-history
^N -> down-history
M-p -> history-search-backward
M-n -> history-search-forward
^I -> complete-word
^X* -> expand-filename
^X^F -> read-from-file
^X^R -> read-init-files
^Xg -> list-glob
^Xh -> list-history
M-< -> beginning-of-history
M-> -> end-of-history
\n -> newline
\r -> newline
M-o -> repeat-history
M-^V -> vi-mode
M-0, M-1, ... M-9 -> digit-argument (see below)
Note that ^I is what the TAB key generates, and that ^@ can be gener-
ated not only by pressing the control key and the @ key simultaneously,
but also by pressing the control key and the space bar at the same
time.
DEFAULT KEY BINDINGS IN VI MODE
The following default key bindings are designed to mimic the vi style
of editing as closely as possible. This means that very few editing
functions are provided in the initial character input mode, editing
functions instead being provided by the vi command mode. Vi command
mode is entered whenever the escape character is pressed, or whenever a
key-sequence that starts with a meta character is entered. In addition
to mimicing vi, libtecla provides bindings for tab completion, wild-
card expansion of file names, and historical line recall.
To learn how to tell the Tecla library to use vi mode instead of the
default emacs editing mode, see the earlier section entitled THE TECLA
CONFIGURATION FILE.
Under UNIX the terminal driver sets a number of special keys for cer-
tain functions. The Tecla library attempts to use the same keybindings
to maintain consistency, binding them both in input mode and in command
mode. The key sequences shown for the following 6 bindings are thus
just examples of what they will probably be set to. If you have used
the stty command to change these keys, then the default bindings should
match.
^C -> user-interrupt
^\ -> abort
^Z -> suspend
^Q -> start-output
^S -> stop-output
^V -> literal-next
M-^C -> user-interrupt
M-^\ -> abort
M-^Z -> suspend
M-^Q -> start-output
M-^S -> stop-output
Note that above, most of the bindings are defined twice, once as a raw
control code like ^C and then a second time as a meta character like
M-^C. The former is the binding for vi input mode, whereas the latter
is the binding for vi command mode. Once in command mode all key-
sequences that the user types that they don't explicitly start with an
escape or a meta key, have their first key secretly converted to a meta
character before the key sequence is looked up in the key binding ta-
ble. Thus, once in command mode, when you type the letter i, for exam-
ple, the Tecla library actually looks up the binding for M-i.
The cursor keys are refered to by name, as follows. This is necessary
because different types of terminals generate different key sequences
when their cursor keys are pressed.
right -> cursor-right
left -> cursor-left
up -> up-history
down -> down-history
The cursor keys normally generate a keysequence that start with an
escape character, so beware that using the arrow keys will put you into
command mode (if you aren't already in command mode).
The following are the terminal-independent key bindings for vi input
mode.
^D -> list-or-eof
^G -> list-glob
^H -> backward-delete-char
^I -> complete-word
\r -> newline
\n -> newline
^L -> clear-screen
^N -> down-history
^P -> up-history
^R -> redisplay
^U -> backward-kill-line
^W -> backward-delete-word
^X* -> expand-filename
^X^F -> read-from-file
^X^R -> read-init-files
^? -> backward-delete-char
The following are the key bindings that are defined in vi command mode,
this being specified by them all starting with a meta character. As
mentioned above, once in command mode the initial meta character is
optional. For example, you might enter command mode by typing Esc, and
then press h twice to move the cursor two positions to the left. Both h
characters get quietly converted to M-h before being compared to the
key-binding table, the first one because Escape followed by a character
is always converted to the equivalent meta character, and the second
because command mode was already active.
M-\ -> cursor-right (Meta-space)
M-$ -> end-of-line
M-* -> expand-filename
M-+ -> down-history
M-- -> up-history
M-< -> beginning-of-history
M-> -> end-of-history
M-^ -> beginning-of-line
M-; -> repeat-find-char
M-, -> invert-refind-char
M-| -> goto-column
M-~ -> change-case
M-. -> vi-repeat-change
M-% -> find-parenthesis
M-a -> vi-append
M-A -> vi-append-at-eol
M-b -> backward-word
M-B -> backward-word
M-C -> vi-change-rest-of-line
M-cb -> vi-backward-change-word
M-cB -> vi-backward-change-word
M-cc -> vi-change-line
M-ce -> vi-forward-change-word
M-cE -> vi-forward-change-word
M-cw -> vi-forward-change-word
M-cW -> vi-forward-change-word
M-cF -> vi-backward-change-find
M-cf -> vi-forward-change-find
M-cT -> vi-backward-change-to
M-ct -> vi-forward-change-to
M-c; -> vi-change-refind
M-c, -> vi-change-invert-refind
M-ch -> vi-backward-change-char
M-c^H -> vi-backward-change-char
M-c^? -> vi-backward-change-char
M-cl -> vi-forward-change-char
M-c\ -> vi-forward-change-char (Meta-c-space)
M-c^ -> vi-change-to-bol
M-c0 -> vi-change-to-bol
M-c$ -> vi-change-rest-of-line
M-c| -> vi-change-to-column
M-c% -> vi-change-to-parenthesis
M-dh -> backward-delete-char
M-d^H -> backward-delete-char
M-d^? -> backward-delete-char
M-dl -> forward-delete-char
M-d -> forward-delete-char (Meta-d-space)
M-dd -> delete-line
M-db -> backward-delete-word
M-dB -> backward-delete-word
M-de -> forward-delete-word
M-dE -> forward-delete-word
M-dw -> forward-delete-word
M-dW -> forward-delete-word
M-dF -> backward-delete-find
M-df -> forward-delete-find
M-dT -> backward-delete-to
M-dt -> forward-delete-to
M-d; -> delete-refind
M-d, -> delete-invert-refind
M-d^ -> backward-kill-line
M-d0 -> backward-kill-line
M-d$ -> kill-line
M-D -> kill-line
M-d| -> delete-to-column
M-d% -> delete-to-parenthesis
M-e -> forward-word
M-E -> forward-word
M-f -> forward-find-char
M-F -> backward-find-char
M-- -> up-history
M-h -> cursor-left
M-H -> beginning-of-history
M-i -> vi-insert
M-I -> vi-insert-at-bol
M-j -> down-history
M-J -> history-search-forward
M-k -> up-history
M-K -> history-search-backward
M-l -> cursor-right
M-L -> end-of-history
M-n -> history-re-search-forward
M-N -> history-re-search-backward
M-p -> append-yank
M-P -> yank
M-r -> vi-replace-char
M-R -> vi-overwrite
M-s -> vi-forward-change-char
M-S -> vi-change-line
M-t -> forward-to-char
M-T -> backward-to-char
M-u -> vi-undo
M-w -> forward-to-word
M-W -> forward-to-word
M-x -> forward-delete-char
M-X -> backward-delete-char
M-yh -> backward-copy-char
M-y^H -> backward-copy-char
M-y^? -> backward-copy-char
M-yl -> forward-copy-char
M-y\ -> forward-copy-char (Meta-y-space)
M-ye -> forward-copy-word
M-yE -> forward-copy-word
M-yw -> forward-copy-word
M-yW -> forward-copy-word
M-yb -> backward-copy-word
M-yB -> backward-copy-word
M-yf -> forward-copy-find
M-yF -> backward-copy-find
M-yt -> forward-copy-to
M-yT -> backward-copy-to
M-y; -> copy-refind
M-y, -> copy-invert-refind
M-y^ -> copy-to-bol
M-y0 -> copy-to-bol
M-y$ -> copy-rest-of-line
M-yy -> copy-line
M-Y -> copy-line
M-y| -> copy-to-column
M-y% -> copy-to-parenthesis
M-^E -> emacs-mode
M-^H -> cursor-left
M-^? -> cursor-left
M-^L -> clear-screen
M-^N -> down-history
M-^P -> up-history
M-^R -> redisplay
M-^D -> list-or-eof
M-^I -> complete-word
M-\r -> newline
M-\n -> newline
M-^X^R -> read-init-files
M-^Xh -> list-history
M-0, M-1, ... M-9 -> digit-argument (see below)
Note that ^I is what the TAB key generates.
ENTERING REPEAT COUNTS
Many of the key binding functions described previously, take an
optional count, typed in before the target keysequence. This is inter-
preted as a repeat count by most bindings. A notable exception is the
goto-column binding, which interprets the count as a column number.
By default you can specify this count argument by pressing the meta key
while typing in the numeric count. This relies on the digit-argument
action being bound to Meta-0, Meta-1 etc. Once any one of these bind-
ings has been activated, you can optionally take your finger off the
meta key to type in the rest of the number, since every numeric digit
thereafter is treated as part of the number, unless it is preceded by
the literal-next binding. As soon as a non-digit, or literal digit key
is pressed the repeat count is terminated and either causes the just
typed character to be added to the line that many times, or causes the
next key-binding function to be given that argument.
For example, in emacs mode, typing:
M-12a
causes the letter 'a' to be added to the line 12 times, whereas
M-4M-c
Capitalizes the next 4 words.
In vi command mode the Meta modifier is automatically added to all
characters typed in, so to enter a count in vi command-mode, just
involves typing in the number, just as it does in the vi editor itself.
So for example, in vi command mode, typing:
4w2x
moves the cursor four words to the right, then deletes two characters.
You can also bind digit-argument to other key sequences. If these end
in a numeric digit, that digit gets appended to the current repeat
count. If it doesn't end in a numeric digit, a new repeat count is
started with a value of zero, and can be completed by typing in the
number, after letting go of the key which triggered the digit-argument
action.
FILES
libtecla.a - The Tecla library
libtecla.h - The Tecla header file.
~/.teclarc - The personal Tecla customization file.
SEE ALSO
libtecla, gl_get_line, gl_io_mode, ef_expand_file,
cpl_complete_word, pca_lookup_file
AUTHOR
Martin Shepherd<EMAIL_ADDRESS>tecla


spring-boot websocket
Seems your browser doesn't support Javascript! Websocket relies on Javascript being enabled. Please enable Javascript and reload this page!
Connect
Disconnect
What is your name?
Send