#7 closing curly brackets
Explore tagged Tumblr posts
Note
Here have some }))({}{}]{{[]})({}}]}[[{{))
Yum Yum
#2 opening parentheses#5 closing parentheses#3 opening brackets#3 closing brackets#7 opening curly brackets#7 closing curly brackets#Nice numbers
57 notes
·
View notes
Text
I honestly didn't ever expect that I'd be in the position where I'd be using this blog not just to analyse what has come before in Homestuck, but to look toward the comic's future and do some real old-fashioned theorycrafting. but the time has come. so here goes; lime-bloods' Beyond Canon theories as of the July 6th 2024 update:
Vriska's Going to Hell
were all gonna help you! / whether you like it or not
a select few eagle-eyed readers already noticed that the sound used in last month's (Vriska: Figure shit out yourself.) is called "hell_tierwav". while it was easy to dismiss this as irrelevant composer shenanigans at the time, it's now become clear exactly what this was foreshadowing. whether it would be more apt to call this "Hell" or "Purrgatory" is probably up for debate - but whatever you call it, Vriska's been placed in a dimension seemingly tailored specifically for her personal torment.
while Vriska characteristically interprets the recreation of her childhood home as a symbol of how badass she was, the ghosts of her past - both literal, as the shades of the trolls she killed as Mindfang, and figurative, in the form of sprites wearing the faces of her dead friends - show us in no uncertain terms that Vriska's childhood home is the stage where traumas play out.
Erisolsprite puts it succinctly with his welcome to hell, but pay close attention to what exactly we're being welcomed to: this update ends on page 665. so as of this next update, we'll be starting on page 666.
Does Homestuck Have Hell?
the exact bubble of reality Vriska's currently found herself in seems to be an entirely new construction of the likes we've not yet seen in Homestuck - but that doesn't mean this kind of cosmic torment is without precedent. because while 666 is a number with Satanic connotations in the broader cultural context, it also has a very particular meaning of its own within the world of Homestuck. indeed, the latter half of the comic almost revolves around it, culminating in a climax in Act 6 Act 6 Act 6.
specifically, this repetition of a single digit is emblematic of recursive storytelling. to summarise what you can already read about in detail in my essay The World / The Wheel: when Caliborn is 'gifted' the Act 6 Act 6 supercartridge, which he is told is an "expansion" of Homestuck, it's a trick. there is no "expansion"; he's going to be trapped in a story that never ends because it keeps dividing into smaller and smaller versions of itself forever. the only way to truly beat the devil who trapped the heroes within a story is to trap him in his own story.
that's what Caliborn's "Hell" is, and that's also exactly what the Alternate Calliope achieved in Act 7 by creating the black hole which Vriska knocked Lord English into, ending Homestuck's story - something that Calliope even hints at in this very update, when she refers to the black hole as "containment"; not an accident, but a deliberately crafted prison. black holes are a symbol of recursion and regression; being sucked into one means being forced to live out your whole life over and over again, forever. so really, this is all we ever could have expected to happen when Vriska stepped into a black hole within a black hole! the presentation of the narrative even subtly hints at this; events in Beyond Canon that take place in the black hole are enclosed (in brackets), and now events that take place in a black hole-within-a-black-hole are contained within {curly brackets}, because you should always use a different kind of brackets to differentiate nested parenthesis from each other!
it is absolutely no coincidence that when Caliborn closes the curtains on his appearances in Homestuck, thinking he's won when really he's been condemned to a hell of his own making forever more, it's with a tribute to this exact same Sweet Bro and Hella Jeff strip.
IF YOU REMEMBER JUST ONE THING I SAY, OF SO MANY GREAT THINGS SAID BY ME, THEN PLEASE REMEMBER THIS.
I WANTED TO PLAY A GAME.
So What Does That Mean?
one of Beyond Canon's central missions is expanding upon Homestuck's exploration of the relationships between author, text, and audience. as discussed above, a large part of Homestuck's thesis is the evil of forcing characters to live the same lives and the same stories over and over without the chance to grow or move on, and Beyond Canon picks up on this by placing Dirk in the position of trying to keep Homestuck going forever purely to appease its fans, while the Alternate Calliope continues to oppose this ideology. and while the alpha Calliope outwardly seems not to have taken a hard position on where she stands in this cosmic battle, the question posed by her device seems to be an entirely new one: can it actually be a good thing to regress, to return to ground that the story has already covered? can this path lead to something new, rather than merely stagnation?
it's so relevant that Vriska is being confronted with the crimes of her past, not only in the form of all the trolls she was personally responsible for killing but also in the form of the exact same punishment she condemned Lord English to with her heroism - complete with the herd of horses that are always present at Caliborn's demise! but where being condemned to an eternal cycle was fitting punishment for Caliborn, someone who refuses to break free of cycles of abuse and instead chooses to enact that same abuse on the world around him... if Vriska is someone who can break free of these cycles, who can change and become a better person despite what happened to her, will this punishment have the same effect? or, as Davepeta seems to believe, is forcing Vriska to reckon with her own past and traumas exactly what will allow her to break free of that cycle?

DAVE: [...] ill just be over here in the hyper gravity chamber training to beat lord english
KARKAT: WE HAVE A HYPER GRAVITY CHAMBER???
it's hard not to be struck by the parallels in design and purpose between the Plot Point and Dragon Ball's Hyperbolic Time Chamber, and not just because of the Dragon Ball enthusiasts present on Beyond Canon's writing and art teams: albeit in typically Strider-bastardised form, the Time Chamber got a shoutout in Andrew Hussie's own Homestuck (see quote above), in a reference that was even picked up on by prolific theorist bladekindeyewear at the time. for the uninitiated: the Hyperbolic Time Chamber allowed its users to train for extended stretches of time, sometimes even spanning years, while a significantly smaller time period passed in the world outside - something that is actually true of real-life black holes! and with the Plot Point's own emphasis on time, represented by the hourglass included among its mechanisms, it seems to me that an essential part of making the 16-year-old Vriska ready for the trials ahead will be giving her the time to undergo the same growth her adult friends have experienced.
considering that Beyond Canon is already playing in the Ultimate Self space, where there are levels of power beyond merely the "god tiers", it also doesn't seem too farfetched to speculate that Vriska, forced to reckon with the fact that becoming a powerful Thief of Light isn't the be-all and end-all of personal growth, will take another leaf out of Dragon Ball's book here and ascend "beyond Super Saiyan". perhaps this is even the "hell tier" so cheekily alluded to in the Plot Point flash? certainly this kind of evolution would be the perfect way to challenge Dirk's belief that the Ultimate Self is the only logical final step for a character's development.
whatever the case, I believe we can take Davepeta at their word here. I don't think it's just a joke that by the end of this ordeal Vriska Serket is going to be fucking RIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIPPPPPPPPPED!
#homestuck#beyond canon#upd8#vriska#vriska serket#davepetasprite#caliborn#black holes#theory#< apparently ive used this tag before but i cant say what for. will have to check later
443 notes
·
View notes
Text
'BVLGARI. Tribute to Femininity, Magnificent Roman Jewels' at the Moscow Kremlin Museums
Brooches and earrings. BVLGARI, 1959-1969. Gold, platinum, rubies, sapphires, emeralds, diamonds, fancy yellow diamonds. Bulgari Heritage Collection.
For the first time in Russia, the Moscow Kremlin Museums will hold a retrospective exhibition, presenting pieces of high jewellery art by world-known Italian Maison BVLGARI, which history dates back more than a hundred and thirty years. Over four hundred unique pieces of high-end jewellery from the Bulgari Heritage Collection, as well as pieces from the private collections from around the globe, will be on display at two exhibition halls of the Kremlin museums — the Exhibition Hall of the Assumption Belfry and the Exhibition Hall of the Patriarch’s Palace.
The formation of such an original style of BVLGARI in all its variety will be represented by works created during many decades, beginning with the earliest silver items, accomplished in Neo-Grec tradition by the founder of the family business Sotirio Bulgari in the 1870s and 1890s, including luxury pieces of the 1950s and 1960s —La dolce vita epoch, as well as extraordinary works of the 1970s and 1990s.
The history of the brand is closely related to such legendary women as Anna Magnani, Elizabeth Taylor, Audrey Hepburn, Ingrid Bergman, Gina Lollobrigida, Monica Vitti and Sophia Loren, reflected in the display which includes a considerable quantity of jewellery that expressed charismatic image and inimitable character of each woman.
Susceptibility to experiments, creativity and inventiveness, which are identified with BVLGARI international name, will be shown in large complexes of works, demonstrating surprising originality and courage in interpreting familiar motifs and themes, as well as extraordinary richness in colour and plastic when working with different stones, including cabochons, their unexpected colour mix and combination of precious and semi-precious materials.
This refers to the collection of bracelet-watches SERPENTI, being developed by BVLGARI from the mid-1940s. It symbolizes ancient Roman roots of the brand and at the same time reflects esthetics of the 20th century as the construction of the items involves TUBOGAS technology (‘tubogas’ – gas tube) in which the flexible hollow band made of precious metal enlaces the wrist and ends up with the watch. In this respect, a variety of scaly decorations becomes countless: enamels, stones, dull and polished gold. A new life of an ancient tradition was embodied into another collection of the Maison BVLGARI that was being created from the mid-1960s—MONETE. It uses Greek, Roman and Persian coins of colossal historical value. Furthermore, inscriptions on the coins that go with images of the emperors inspired artists in 1975 to use the company’s logo as an element of watches design: first—BVLGARI ROMA, and then—BVLGARI BVLGARI, that turned out to be in high demand and of great interest among the admirers of the brand. Several original novelties became successful and innovative in the 1980s, viz combination of precious materials and silk laces in necklaces, as well as the formation of adornment compositions out of individual details— modules, made of metal, various stones and mounted like travertine of Rome paving, on the principle of the curly bracket— PARENTESI. These objects were produced in many combinations, beginning with diamonds and finishing with haematites and corals. In the 1990s, BVLGARI’s experiments on introducing new materials culminated in the creation of one more amazing collection which used white porcelain—CHANDRA, meaning ‘moon’ in Sanskrit.
Thus, the Moscow Kremlin Museums exhibition will demonstrate the evolution of the design of the renowned Italian Maison BVLGARI, which artistic heritage remains a vivid page in the history of world jewellery art of the 20th century.
7 September 2018 – 13 January 2019
0 notes
Photo
In response to “When were you born?” Civil War soldier Antonio Dardell answered, “Taken from China in childhood,” on this questionnaire, 4/16/1907.
Series: Case Files of Pension Applications Based on Service Completed in the Years 1817 to Approximately 1903, ca. 1935 - ca. 2002
Record Group 15: Records of the Department of Veterans Affairs, 1773 - 2007
Transcription:
3-447
East Division.
[illegible] Ex'r.
Inv orig No. 1,357,511
Antonio Dardell
Co. A, 27th Reg't Conn Inf
Department of the Interior,
BUREAU OF PENSIONS,
Washington, D.C., April 16, 1907
SIR: To aid this Bureau in preventing any one falsely personating you, or otherwise committing fraud in your name, or on account of your service, you are required to answer fully the questions enumerated below.
You will please return this circular under cover of the inclosed envelope which requires no postage.
Very respectfully,
V. Warner.
Commissioner
Antonio Dardell
292 George street
New Haven, Conn
1. When were you born? Answer. Taken from China in childhood
2. Where were you born? Answer. China
3. When did you enlist? Answer. 22th October 1862
4. Where did you enlist? Answer. City of New Haven Con
5. Where had you lived before you enlisted? Answer. Clinton Con
6. What was your post-office address at enlistment? Answer. Clinton Con
7. What was your occupation at enlistment? Answer. Tiner Aprentice
8. When were you discharged? Answer. 25th July 1863
9. Where were you discharged? Answer. City of New Haven
10. Where have you lived since discharge? Give dates, as nearly as possible, of any changes of residence. Clinton + remove to New Haven Con 1869
11. What is your present occupation? Answer. Tiner
12. What is your height? Answer. 5 feet 9 1/2 inches. Your weight? 127 The color of your eyes? Black The color of your hair? Was Black Your complexion? Dark Are there any permanent marks or scars on your person? If so, describe them.
13. What is your full name? Please write it on the line below, in ink, in the manner in which you are accustomed to sign it, in the presence of two witnesses who can write.
Antonio Dardell
[circular stamp]
PENSION
A
APR
27
1907
U.S.
OFFICE [end stamp]
WITNESSES: [curly bracket around 1 and 2]
1. Sherwood S Thompson
2. Rwl [?] S. Thompson
[square bracket] Witnesses who can write sign here. [close square bracket]
Date: April 26th, 1907
0-2
#archivesgov#April 16#1907#1900s#Civil War#U.S. Civil War#Chinese American history#Asian American history#Connecticut#military
59 notes
·
View notes
Text
[ ID: a head and torso drawing of a character on a pink, confetti covered background. the character has long, curly brown hair in a big ponytail, tan skin, and freckles. mew's wearing round pink glasses, a pink scrunchie, and a light pink shirt that exposes mew's shoulder, where a pink strap can be seen. mew's eyes are closed and mew's smiling wide, one hand raised in a wave. on top of mew's head is a golden crown that says 1. end ID. ]
thanks to everyone who voted for prolegomenon in the oc-verse poll. pretty exciting to have won the bracket proper, even if that 50-page update killed my hands!!
PROLEGOMENON updates every WEDNESDAY and SATURDAY at 7 PM EST.
3 notes
·
View notes
Text
Software development
PHP Introduction
PHP is an acronym for "PHP: Hypertext Preprocessor"
PHP is a widely-used, open source scripting language
PHP scripts are executed on the server
PHP is free to download and use
What Can PHP Do?
PHP can generate dynamic page content
PHP can create, open, read, write, delete, and close files on the server
PHP can collect form data
PHP can send and receive cookies
PHP can add, delete, modify data in your database
PHP can be used to control user-access
PHP can encrypt data
What's new in PHP 7
PHP 7 is much faster than the previous popular stable release (PHP 5.6)
PHP 7 has improved Error Handling
PHP 7 supports stricter Type Declarations for function arguments
To know more about PHP visit http://nextolive.com/
Python Introduction
Python is a popular programming language. It was created by Guido van Rossum, and released in 1991.
It is used for:
web development (server-side),
software development,
mathematics,
system scripting.
What can Python do?
Python can be used on a server to create web applications.
Python can be used alongside software to create workflows.
Python can connect to database systems. It can also read and modify files.
Python can be used to handle big data and perform complex mathematics.
Python can be used for rapid prototyping, or for production-ready software development.
Python Syntax compared to other programming languages
Python was designed for readability, and has some similarities to the English language with influence from mathematics.
Python uses new lines to complete a command, as opposed to other programming languages which often use semicolons or parentheses.
Python relies on indentation, using whitespace, to define scope; such as the scope of loops, functions and classes. Other programming languages often use curly-brackets for this purpose.
To know more about Python visit http://nextolive.com/
Comparison Chart BASIS FOR COMPARISON
PHP VS PYTHON
Popularity and availability .More prevalent and exist in many systems.Less popular as compared to PHP.
Readability PHP is not much maintainable as compared to python. The maintainability and change acquirement of Python is very good.
Security Offers fewer security features .More secure.
Functional features Functional programming is not provided. Functional programming techniques are possible.
To give suggestions/comments go to http://nextolive.com/
2 notes
·
View notes
Text
33 Usher Street chapter one script, First Draft
I’m planning to go back and do a major revision on this, but i wanted to share what i have for the time being! This was part of last years NaNoWriMo project, about Jewish (and otherwise) vampire hunters in an alternate history 1920s, including a transgender golem and an intersex dhampir as the joint protagonists.
What follows is an unfinished draft of a comic script intended for my own reference as the artist. Some art directions are absent, intended to be filled in later; or reflected a lack of a particular concern about how the panel looked.
Questions and comments are welcome! I’d love to get some other folks’ ideas about what needs changing. Please excuse any formatting issues! This didn’t copy-paste so well.
Italics outside of quotation marks indicate art directions and page layout.
[Square brackets] indicate sound effects (SFX), signage, captions, or other non-bubbled matters of lettering.
“Quotation marks�� indicate speech bubbles.
1. Three panel page.
1.1. Full-width view of a bus (reference 1920s buses) puttering along beneath and above autumn leaves.
[CAPTION: September 24, 1923]
1.2. A thick black full-width border. Repeated on the following pages at full-width size, same height, to be indicated as BORDER
[BORDER: SFX: Bus engine chugging]
1.3. Interior of bus. Driver, assorted passengers, and towards the rear, SOLOMON “SOL” SZOMBATHY. He is a slight young man in a jacket and oversized “Oxford bags”,. His hair is thick, black, and curly (3B type); his features Ashkenazic but on the darker side. He holds a plain-looking wooden cane. Behind him, occupying the last row of seats, is a long, coffin-like box or chest, sealed with rope or cord.
2. Six panels.
2.1. A close-up of Solomon. He seems lost in thought, leaning against the bus window.
2.2. [BORDER: SFX: THUMP!]
2.3. The bus bumps, Sol is jolted upwards.
2.4. Sol settles, squeans emanating.
2.5 Sol looks out the window.
2.6 Exterior, the wooded roadside. A sign reads: [WELCOME TO Jackson, Mass. EST. 1842]. Perhaps the bus is visible here, chugging past the sign.
3. Six panels.
3.1. The bus stop. Perhaps a sign indicating that’s what it is. The bus has stopped.
Driver: “JaaaAAACKson station!”
3.2. A tail extends from the speech bubble from the previous panel, to overlay the BORDER.
Driver: “Last stop!”
3.3. Passengers exiting the bus. Sol is lifting the box.
3.4. Same as 3.3, with more movement ahead of Sol. He is pulling the box, struggling.
3.5. Same as 3.3, the bus now empty of other passengers. The driver is standing, impatiently watching Sol. Sol is half-way down the aisle, perspiring with effort.
3.6. Same as 3.3, Sol finally exiting the bus, with his box.
Driver: “That everything?”
4. Two panels
4.1. Sol, wiping sweat with a kerchief.
SOL: “Yes, thank you. And—”
4.2. As in 3.2, a tail extends from the previous bubble into the BORDER, which fades from black to white.
SOL, stylized as the chapter title : “Can You Tell Me The Way To Usher Street?”
[Credits:
A 33 Usher Street story
Written and Illustrated by K.P.S. Roman
Religious Consultation by Quell Nessuno]
5. Six panels. Wide, double, double, border.
5.1. Sol, walking along a Jackson street, dragging the box behind him on wheels and hoisting his cane over his shoulder. The city is sparsely populated in spite of its size; apartment buildings and businesses line the streets, but there are few people visible. The buildings have the sagging, unsettled look of those built on swampland.
5.2. More of Sol, rounding a corner and excusing himself past some locals, including ADRIAEN TEN BOOM, a stogie between his lips.
Sol: “Pardon me!”
5.3. Sol, looking up at a street sign for the corner of [MARSH ST] and [WASHINGTON ST]. A car putters past. WILHEMINA FAWKES is in the driver’s seat.
5.4. Sol continues past some kids playing marbles. He’s starting to visibly sweat. An older black man [ALEISTER JONES] watches the game from a stoop, his gloved hand resting on his cheek.
5.5. Sol, stopping at another corner. A conspicuously incognito figure [CONSTANCE WRIGHT] watches from behind a newspaper. A sledgehammer leans against her side.
Sol: “Ah!”
5.6. BORDER, Sol’s speech bubble extends from 5.5.
Sol: “Here we are!”
6.
6.1. The sign for the corner of [WASHINGTON ST] and [USHER ST]
6.2. Sol moves a bit more speedily down the street, indicated by hites. PLUTON, a large black cat with only one eye watches.
6.3. Sol, pulling a piece of paper from his pocket, exhaling a panting puff. Pluton is visible following behind at a distance.
Sol: “Let’s see…”
6.4. Sol looks up at the numbers of the buildings. He passes the unremarkable numbers twenty-one and twenty-three. Pluton cocks his head.
6.5. BORDER. Sol’s speech bubble tails from 6.3.
Sol: “Number... Thirty-Three?”
6.6. Sol stops before a row of thorny bushes. The speech bubble trails from 6.5. Pluton is posed as if looking around the tail of the speech bubble, to see Sol.
Sol: “Oh!”
7.
7.1. Sol, standing before 33 Usher Street. The building is assembled from a mix of newer construction and old ruins with the masonry at diagonals to each other, as if someone happened upon the leaning remains of a graystone castle and chose to join it together in red brick. The 33 is quite large and visible on the exterior of the building, and a less-legible sign hangs beneath it.
7.2: BORDER, a caption (Sol): “There it is.”
8.
8.1. A close-up of the sign beneath the 33 from 7.1. It now more clearly reads: [USHER STREET HOUSE OF ANTIQUITIES AND CURIOS]
8.2. BORDER. A speech bubble trails down to 8.3.
Sol: “That wasn’t... so hard to find... after all.”
8.3. Sol walks up the path, while Pluton, indicated by tracing lines, bounds up into the building out of Sol’s view and onto a windowsill. He has set down the box.
9.
9.1. Pluton, pausing at an open window, looks out imperiously at the approaching Sol.
9.2. Interior of the room from 9.1. A view from the back of JAMES “JIM” CULLOCK III. The room is full of talismans, wards, and assorted scraps of paper framed upon the walls.
Jim: “Yes, that would be him.”
9.3. A hand [that of MARIE BOSLEY] sets a Victrola to play.
Marie: “I’ll leave the interview to you, then.”
9.4. A partial view. Pluton bounds down into the room. Enough of Marie is visible that she can be seen cranking the Victrola. Jim appears to be fussing at something invisible on his sleeve.
Jim: “If you’re certain.”
9.5. [BORDER: SFX: the opening lyrics of Marion Harris’s “After You’re Gone”]
9.6. Jim’s feet descending the stairs.
10.
10.1. Deliberate parallel to 9.6. Sol coming up to the front door. The lyrics of the music continue from 9.5, and there on until otherwise indicated.
10.2. Sol’s hand raised, to the door, there is a simple bronze door knocker.
10.3. [BORDER: SFX: KNOCK. KNOCK. KNOCK.]
10.4. Sol waits at the door.
10.5. Same framing as 10.4; Sol looks back at the box.
10.6. Sol looks back at the door, anxious, patting his head with his kerchief.
11.
11.1. The door swings open. Inside stands Jim. A tall, older white man with the slender yet solid look of a longtime dancer or a runner, clad in two parts of a mismatched three-piece suit: striped trousers under a diamond-patterned vest, with bow tie. His hair is close-cropped, styled fashionably, and streaked with gray.
Jim: “Good afternoon...”
11.2. BORDER. A trailing tail from Jim’s line in 11.1.
Jim: “...young man.”
11.3. Sol holds out a crumpled envelope.
Sol: “The Rev. Dr. Hammer sent me, sir?”
11.4. Jim takes the letter in his left hand.
11.5. Jim looks at the letter.
11.6. Jim tosses the letter over his shoulder, smiling.
Jim: “James Cullock III, son.”
12.
12.1. Jim, extending his right hand to shake.
Jim: “But, call me Jim.”
12.2. Sol, returning the handshake.
Sol: “Sir, my name’s Solomon.”
12.3. BORDER.
Jim: “Mr. Grundy, then?”
12.4. Sol looks tired of this joke already.
Sol: “No, sir. I was born on a Saturday.”
12.5. Jim laughs
Jim: “You’re the right one, alright!”
12.6. Jim motions Solomon in.
Jim: “Come in, Mr. Szombathy, and have a seat.”
13. Three panels, the top full-width but narrow, as is the border: the main action is 13.2.
13.1. The foyer of 33 Usher St. The room is set up for greeting visitors and entertaining, and Sol is already seated opposite Jim.
13.2. Full view of Solomon, seated and without his coat. He is wearing a tight-fitting sweater, giving him the silhouette of a paintbrush when paired with his trousers.
NOTE: Use the antiquated “Rumania” spelling whenever it appears on the page.
[CAPTION: Solomon “Sol” Szombathy
Age: 20
Born: 10/31/1903
Hometown: Pittsburgh, Vandalia
Background: Hungarian/Rumanian Jewish, First Generation American
Likes: Science Fiction & Fantasy Magazines, spicy foods, cooking.
Dislikes: Running, swimming, high noon.]
13.3. BORDER.
Jim: “So, Solomon Szombathy. I understand from my old friend Matteus—he wired me here before you arrived—that you have had quite a remarkable encounter, of late.”
14. Reversal of 13.
14.1. BORDER.
Sol: “Just so, sir. I am told it is within your area of expertise?”
14.2. Full view of James, seated and with his legs crossed.
[CAPTION: James “Jim” Cullock III
Age: 56
Born: 2/18/1867
Hometown: Roan Mountain, Nickajack.
Background: Scottish-American
Hobbies: Gardening, Morning Constitutionals
Profession: Antiques, Estate Management, ???]
Jim: “By which you mean…”
14.3. Pluton enters the room.
Pluton: “Miaou.”
15.
15.1. Sol watches as Pluton approaches.
Sol: “Vampires, sir. A vampire. Just the one.”
15.2. Pluton inspects Sol, who is now focused on Jim.
Jim: “You have no need to worry about being doubted on that subject here, Mr. Szombathy.”
15.3. BORDER.
Sol: “Ah, yes. Dr. Hammer told me that you are in the business of…?”
15.4.
Jim: “Formally, the Usher Street House of Antiques and Curios is in the business of the management of estates belonging to those who passed without clearly defined wills, or without leaving behind heirs to manage their estates.”
15.5. Pluton approaches Jim.
Jim: “Informally, better say genuinely, we are in the business of public health. To deal with the threat of vampires to the general public.”
16.
16.1. Pluton settles down at Jim’s feet.
Jim: “Tell me, what are your opinions on the morality and ethics of vampirism?”
16.2
Sol: “Well, in my father’s collection, there was a commentary on the Sefer Hasidim, which says that a person who must consume the blood of another human being… should be pitied, for it is in her nature and her needs to survive, and if she should make recompense to her victim, should be treated with compassion as a member of the community.”
16.3 BORDER
Sol: “But that’s regarding a living vampire, what some call an estrie, and the exceptions made for one who must violate kashrus for the sake of pikuach nefesh. And Eleazar Rokeach said that one should stop up the mouth of a deceased estrie, to prevent her from feasting on the living, after death.”
16.4
Sol: “From a strictly Halakhic standing, it is permissible for the living to eat as they must to remain living, but the deceased are deceased, and are forbidden to do so.”
16.5
Sol: “So, I think that, ultimately, it depends on the circumstances, case by case. It requires careful but decisive investigation.”
16.6. Jim, close-up, a scrutinizing gaze.
Jim: “But Mr. Szombathy, you are not solely the books you read.”
17.
17.1. BORDER.
Jim: “What was your experience with a vampire? How do you feel about the morals and ethics?”
17.2.
Sol: “I… my family lived in Pittsburgh, you see. Since I was born.”
17.3.
Sol: “My mother had been pregnant, just newly so, when they came here, from the old country.”
Jim: “Which…?”
Sol: “Transyvlania. In Rumania.”
17.4. Sol is in silhouette in the foreground. We see KÁLMAN SZOMBATHY, a Hungarian Jewish man nearing middle age.
Sol: “My father—he was always very learned. In many ways. And he had acquaintances, friends, contacts? Who knew….”
17.5. Sol, younger, looking out the window at his father, who is outside with a candle in hand at night.
Sol: “Strange things. Secrets. Mysticism.”
17.6. Sol, a bit older, looking at his father examining a book. A diagram of the sefirot is visible—ish-style, or yosher?
Sol: “I saw so much of it, growing up. I didn’t think it was strange.”
18.
18.1. Sol, almost his present age, sitting by the window with a book, while his father talks with some baalei shem.
Sol: “Just… another thing we didn’t talk about with go—gentiles.”
Jim: “Like this… golem?”
18.2. The golem, standing with toddler Sol. It looks more lumpy and vaguely defined than when we see it later.
Sol: “Yes. It was around before I was born. Like a caretaker or guardian. A nanny.”
18.3. Sol sitting, reading a book aloud. His narration is not bubbled, but bleeds into the scenery.
Sol: “I would talk to it. Just… talk to it. My parents, my father only told it what to do.”
18.4. Sol looking up at the golem.
Sol: “And you may think it silly, sir, but sometimes, I thought that it spoke back.”
18.5. The golem looking down at Sol.
Jim: “Golems are said to be mute, are they not?”
18.6.
Sol: “So I am told.”
19.
19.1. A bedridden person.
Sol: “This summer, people started taking ill. A doctor came to visit, every one. But people just got worse. Wasting away.”
19.2. A doctor at the door, tipping his hat. He looks flushed, and has a distant expression.
Sol: “My parents had boarders. Renting rooms. And the doctor, the physician, came to call on one.”
19.3. Kálman stopping the golem, which seems determined to approach the “doctor” and has an upset expression.
Sol: “The golem kept… my parents said it was menacing him.”
19.4. Sol’s mother, DOINA URS-SZOMBATHY, shooing the golem from a door. Doina is about the same age as Kálman, with darker features.
Sol: “And it happened, the same day, that the Reverend Doctor Hammer was visiting. Resting, from traveling. He knew my father, somehow. The golem had been bothering him, too. Trying to push him around.”
Jim: “Hm.”
19.5. Sol, looking down.
Sol: “Which I guess is why he didn’t notice the physician was actually undead.”
19.6. Sol’s parents, reclining on a couch, resting their heads against one another. The shadow of the vampire looms over them.
Sol: “Which was why my parents thought it safe to rest, as well.”
20.
20.1.
Sol: “My parents—they were in the other room, you see. They had left the golem with me. Because it kept bothering everyone. Getting in the way.”
20.2.
Sol: “I guess the vampire got greedy, though. It came into my room. I was reading.”
20.3. The vampire reaching for Sol, who looks shocked. It is an upiór type, with a sharp, barbed tongue instead of fangs.
Sol: “I only realized what it was, up close. Too late for my parents.”
20.4. The golem’s clay fist swings at the vampire, sending it sprawling.
Sol: “But not too late for me.”
20.5. The vampire is sent flying across the room, slamming into the wall.
20.6. The Rev. Dr. MATTEUS HAMMER, a wild-eyed trans man of mixed Scandanavian and indigenous heritage, with a shock of white hair, in his pajamas and brandishing a sword and pistol.
Sol: “The fight woke up Dr. Hammer.”
21.
21.1. Splash of Hammer shooting the vampire in the heart.
[CAPTION: THE REVEREND DOCTOR MATTEUS J. HAMMER
Age: Like, So Old
Born: A Man, In Spite Of What The Nurse Said
Hometown: Tarrytown, NY
Background: Finnish/Swedish-American and Lenape, He’s Pretty Sure
Fears: God And Nawt Else, Also Centipedes
Enjoys: Fresh-Baked Bread]
21.2. The golem stands between Hammer and Sol, protecting Sol.
22.
22.1. Hammer looking over Sol.
Sol: “The Reverend Doctor, he checked me over. Asked me a lot of questions about what happened. About me.”
22.2.
Sol: “Checked everyone else, too. Everyone who... survived.”
22.3.
Sol: “And he told me… all things considered, I should come here.”
22.4. Jim, pensive.
Jim: “To report on your experiences? I’m sorry for what you’ve gone through, your loss, but….”
22.5. Sol, surprised.
Sol: “No, sir. He sent me here for me to seek employment.”
22.6. BORDER.
Sol: “As stated in the letter you dropped upon the ground.”
23.
23.1. Jim, flushed, looks at the envelope.
23.2. Jim, bends over to pick up the letter.
23.3. He dusts it off.
23.4. He opens the envelope.
23.5. He begins to read.
23.6. BORDER
Hammer: “Dear Jim. Give the lad a job. Do something about the golem. Remember: that matter in Chattanooga. Or I will tell Marie. Sinc. The Rev. Dr. Matteus J. Hammer.”
24.
24.1.
Jim: “Well, then I suppose that this is an employment interview, although....”
24.2. Jim sighs through his nose.
24.3. BORDER.
Jim: “Chattanooga, eh?”
24.4.
Jim: “In that case, we had best find the best place for you.”
24.5.
Jim: “Let me explain a bit more about what we do here.”
24.6.
Jim: “Through a number of agents, contacts, and former customers, we are apprised of events that may require our attention. Our more ordinary business provides both cover and funding for this.”
25.
25.1. Jim, facing Sol, sidelong view.
Jim: “We employ both in-office experts, and traveling agents who visit locations where vampirism is believed to be at play.”
25.2. Sol, headlong view.
Jim: “What qualifies you to act in the field, rather than from behind a desk?”
25.3. BORDER. Sol’s speech trails to .4.
Sol: “Well, sir, as a dhampir,”
25.4. Jim, headlong view. Two ghosts are visible, framing him: RODERICK and MADELINE USHER. They are the spirits of two young WASPs nearly identical in appearance, with large eyes, wild fine hair, and aquiline noses, clad in shrouds.
Sol: “I can see the dead.”
26.1. Roderick and Madeline notice Sol is looking at them.
Jim: “...”
26.2. Roderick waves coyly at Sol. Madeline seems disinterested.
Jim: “You would be far from the first to claim that you are able to see the unseen. Do you have any proof?”
26.3.
Sol: “Outside of the word of Dr. Hammer…?”
Jim: “If you please.”
26.4. Jim, an eyebrow cocked.
Sol: “I don’t suppose you know that you have twin siblings hovering in the air around your study?”
26.5. Jim looks up at Roderick.
26.6. Jim looks up at Madeline.
27.1.
Jim: “You will, I trust, forgive my skepticism. Even in this trade, there is always room for incredulity.”
27.2. Jim lets out a puff of a sigh.
27.3.
Jim: “I myself have found that what one sees is not always what is.”
27.4. A view of Sol, from Jim’s perspective. Sol and the room are crawling with transparent insects of imaginative and unnatural anatomy. Take care to note that they are only visible on surfaces of a solid, continuous color.
27.5. BORDER.
Sol: “Do you find that very often?”
27.6. Jim, looking weary, dusts one ‘bug’ off the table.
Jim: “For many a year.”
28.
28.1.
Jim: “But, here, you said that you were a dhampir! How comes that to happen?”
28.2. Sol, obviously embarrassed.
Sol: “In the usual manner, sir.”
28.3. BORDER.
Jim: “Which is to say, one of your parents—your birth parents—was a vampire?”
28.4.
Sol: “My mother’s first husband. After his death. My father, I suppose, my stepfather, was his brother.”
28.5.
Jim: “My condolences.”
28.6. Sol, holding the cane tightly.
Sol: “I don’t think of it much. It wasn't his fault.”
29.
29.1. Jim stands up abruptly.
Jim: “Quite! Not his fault. Not his fault. The majority of vampires—people want someone to blame, you know?”
29.2. Jim begins to walk out the door, motioning ‘come here’ to Sol. Pluton perks up.
Jim: “But a vampire—follow after, won’t you?—is not really a someone. It’s a something.”
29.3. Jim walks outside towards the box, Sol and Pluton following.
Jim: “Are you familiar with the association of vampirism with cases of tubercular consumption in Connecticut?”
29.4. Jim has reached the box and is inspecting it, leaning over it.
Sol: “That there was some similarity, but that the word ‘vampire’ was not used?”
29.5. Jim circles the box.
Jim: “Well, the papers used it—here, how do we open this—though the locals did not.”
29.6. BORDER.
Sol: “Open it, sir?”
30.
30.1. Jim, gesturing at the box.
Jim: “This is the golem in here, is it not?”
30.2. Sol, hesitant. In the background, RANDOLPH CARTER appears in the doorway, startled. Reference HP Lovecraft, naturally.
Sol: “Yes, but—”
30.3. Carter rushes up, waving the letter from Hammer in his hand.
Randolph: “Mister Cullock! James! I can see what you mean to do and—this is folly of unfathomably cyclopean proportions!”
30.4. BORDER.
Randolph: “The letter from Matteus Hammer is entirely explicit in its brevity, this container is as an inscrutable Hebraic box of Pandora!”
30.5. Jim, gesturing bemusedly to Randolph.
Jim: “Ah, Mr. Szombathy. Allow me to introduce our Rare Books Expert, Mr. Randolph Carter.”
31.
31.1. Carter looks down at Sol.
[CAPTION: RANDOLPH CARTER
Age: Younger than he looks, really.
Born: 8/20/1874
Hometown: Some Nameless New England Town
Expertise: Ancient Tomes, Forgotten Lore, Adjectives
Hangups: Xenophobia, Icthyophobia, Anglophilia]
31.2. Carter nods at Sol in greeting, ignoring Sol’s offered handshake.
Randolph: “A pleasure to make your acquaintance, Mister Szombathy.”
31.3. Carter whips his head around (speed lines!) back to Jim.
Randolph: “I really must protest, James!”
31.4. BORDER
Randolph: “The golem acted without instruction, in a violent and destructive manner according to its inhuman whims!”
31.5. BORDER, again. The text is less contained within the bubble.
Randolph: “It is a lifeless husk animated by eldritch secrets, which has demonstrated a readiness to cause harm!”
31.6. BORDER, once more. The text is almost overtaking the space, no longer contained in a bubble.
Randolph: “It is every bit the arcane monstrosity that we are employed to eliminate, an idiot half-form!”
32. The thickest BORDER panel so far, over a three panel of one full width over two half-widths.
32.1. BORDER. A single, solid, centered speech bubble, trailing down.
Jim: “Enough.”
32.2. Jim, over the box, holding a pair of gardening shears to the ropes binding it.
32.3. The severed ropes falling, in view of Sol.
Jim: “Mr. Szombathy; I should like to employ you. But after hearing your story, I suspect that you are but one part of what the stores would call a ‘package deal’.”
32.4. Jim opening the box, viewed from as if within.
Jim: “Would you mind if I were to awaken it?”
33.
33.1. Sol, looking resolute, with Carter looking horrified behind.
33.2. Repeat of 33.1, but with Sol nodding, Carter faint with terror.
Sol: “Please do, Mr. Cullock.”
33.3. A full view from above of the golem in the box. It is squared and inanimate, eyes shut and form even more vague than in the flashback. Pluton bounds into panel.
33.4. BORDER, more gray than black, now.
Jim: “Please, call me Jim.”
34.
34.1. Jim reaches into his pocket and pulls out a strip of paper. Pluton appears in the corner.
Jim: “Matteus had sent this ahead, as well.”
34.2. He holds it up for Sol and Carter to see. An א is visible, but the rest is concealed by the curl of the paper.
Jim: “I take it this is the ‘sacred words under the tongue’ type of golem, rather than the ‘אמת’ variety?”
34.3. Sol, confused.
Sol: “Yes, s—Jim.”
34.4. Jim, looking contemplative and holding the strip absently.
Jim: “I wonder. Was the golem silent for fear of spitting out the paper?”
Sol: “Eh?”
34.5. BORDER. Still gray.
Jim: “I would keep mum, myself, if my continued animation depended upon something held under my tongue.”
34.6. Jim’s hand pressing a tiny hole into the clay. Pluton is looking over the edge of the box.
Jim: “Just like planting a seed, hm?”
35.
35.1. Jim’s hand swipes over the hole, sealing it by pushing clay back over.
Jim: “There, now—”
35.2. BORDER, but with the image of ‘eyes opening’, slightly, in white.
35.3. BORDER as 35.2, but wider. Jim, Sol, Pluton, and Carter coming into view.
35.4. BORDER as 35.3, wider. Jim, Sol, Pluton, and Carter in full view.
35.5. Same panel width as 35.2-4, but a full, unshaded panel of Jim, Sol, Pluton, and Carter.
36.
36.1. The golem sits up, form still vague, androgynous. Carter shocks, Jim smiles, Sol looks nervous, Pluton is deadpan and does not move from looking over the edge of the box.
Jim: “How is that?”
36.2. The golem looks at Jim. Everyone’s expressions are the same as 36.1.
Jim: “Can you try speaking, now?”
36.3. The golem, closeup, mouth open slightly.
36.4. Same as 36.3.
Golem: “C’n try… speaking.”
36.5. Now Sol is shocked, too.
36.6. Same as 36.5.
Sol: “He can talk?”
37.
37.1. The golem, frowning.
Golem: “...can.”
37.2. Sol and Carter, even more shocked.
Randolph: “M-mimicry?”
37.3. The golem gives a headshake.
Golem: “Nuh-uh.”
37.4. The golem’s gaze shifts in the direction of Sol.
Golem: “Why… c-call me….”
37.5. The golem, looking down.
Golem: “He?”
37.6. Sol looks as though he has realized; unlit lightbulb? Carter is fizzling smoke from his noggin.
38.
38.1. Repeat of 37.6. More smoke from Carter, lit lightbulb on Sol.
Sol: “You’re a girl!”
38.2. The golem nods.
38.3.
Sol: “I’m so sorry, I never realized—you looked like a boy, so?”
38.4. The golem, puzzled.
Golem: “...looked?”
38.5. The golem starts to push out of the box.
Sol: “Of course, I should know, appearances and all, but—”
39.
39.1. The golem starts to rise from the box, form changed towards a more definite shape.
39.2. Continuing from 39.1, more and more defined, more and more upright.
39.3. Fully upright, fully defined as feminine. Dotty as per concept art.
39.4. The golem, in full view, looking down at herself while Jim, Sol, Pluton, and Carter are gathered around.
Golem: “Be...tter?”
40. Four quarter-width panels, one full, two half-width.
40.1. Jim, smiling.
Jim: “Quite so.”
40.2. Sol, beaming.
Sol: “Amazing!”
40.3. Pluton, feline.
Pluton: “Miau.”
40.4. Carter, stunned.
Randolph: “Transmogrification!?”
40.5. The golem, smiling.
40.6. Jim, Sol, Pluton, Carter.
Jim: “And how should we call you, Miss…”
40.7. The golem, thinking.
Golem: “D…”
41.
41.1. The golem, DOROTHEEA “DOTTY” SZOMBATHY, smiling, her speech bubble forming the CAPTION:
[Dorotheea Szombathy
But you c’n call me Dotty!
Age: I dunno, like eight’r nine months older’n Sol?
Birthdate: I guess February of 1903? It was Tu B’shvat, I think.
I love helpin’ Sol, and all kinds of toys and games!
My clay came from Horezu, but I was born in Bran! That’s in Transylvania, you know? The one in Rumania, not Usonia]
41.2. A view from behind Dotty as she continues talking. Jim and Sol look dumbfounded, Carter is letting out smoke from both ears and his eyes have rolled all the way back in his head.
Dotty: “I was asleep on the boat to Usonia, but someday I wanna try riding it while I’m awake….”
Jim: “Oh, she certainly can talk.”
Sol: “יא”
42. END page of “Can You Tell Me The Way To Usher St?”
42.1. CAPTION:
[סוף.]
42.2. A bubble of Dotty.
Dotty: “Say, c’n I wear clothes now?”
14 notes
·
View notes
Text
EPISODE 5:
I'm so sad Regina got buried in the woods
these fucking comparison shots are amazing
someone just tried to text me and I low-key flipped out because I was like you need to leave me the fuck alone
What if he just took her jacket and was like this is mine bitch
Katharina looks so dope with glasses
I'm so into her being the rock of this family by the way which I was never surprised by because women have the strength of 6 million men but
we've literally never seen Charlotte and her dad interact (like for reals)
That's one of the problems of this show is that some relationships fell by the wayside and I'm not a fan of that
did Charlotte drop herself off on the stoop
That's Tannhaus baby is somewhere because they never found the body of that infant so that infant is somebody.
yeah I literally can't imagine finding something like this out I'd lose my fucking mind
"who am I?" "I don't know" wow that's a fuck of a thing
Wow Claudia from the other universe That's fucking me up
Also what if Claudia from the other universe is the fucking bitch who has been fucking with us this whole time AKA the white devil
Also when are we going to see Noah again because I need to see Elisabeth and Noah together falling in love because I stan
worried about her Please tell us what happened to her I'm concerned
This actress has to be at least partially deaf and or hard of hearing because number one her ASL is fluent and she even emotes some words right? Idk
I do not trust this other Claudia as far as I could fucking throw her
This show is like the debate between Democrats and Republicans every fucking party is trying to convince everybody else that they are the ones that's trying to save the world and both of them behind closed doors are like all right how do we fuck the people in the asshole
I can't help wondering if this wouldn't have happened if we understood the half-lives of radioactive materials
so is all of this coming back to 1986 Is that the the origin time
And then do what What are you going to do with fucking 250 radioactive barrels The fuck you talking about
The scratches on the other side of her face and I don't know why it's on the other side of her face but it's on the other side of her face and it's concerning me
does that mean something's going to go different like
Jonas is out here like why did the adults lie to me
Oh my God after three seasons he's finally realizing not to listen to other people good boy
Oh Peter and Charlotte bonded over having fucked up families
Peter's mom is dead and he didn't know who his father was
Also babies
Also the way that he embodies Peter is fucking insane
I'm so into Charlotte with this curly hair
Oh my God who is this
Elisabeth run baby girl. too late. we've gone this long without sexual assault if they touch this child I'm going to lose my damn mind
Peter is going to kill this man
Elizabeth kill him Peter kill him if Peter dies is the hands of this dude I'm going to lose my fucking mind get back from my baby get back from my fucking cinnamon roll I'm going to kill you Elizabeth stab him the back stab him the back Elizabeth your daddy has a knife at his neck NOOOO PETER NOOOOOOOOOO NOOOOO FUCK
I literally will never forgive them for killing Peter why are the dopplers the most important and most tragic family
he never did anything to anybody
Katharina please kill your abusive mother She deserves it
everybody on this show is super into bludgeoning nobody likes shoots anybody else everybody fucking bludgeons everybody
No can I watch this abusive fucking bitch is going to hit you No Don't let her kill you Don't let her kill you
Is Katharina dead why are they taking my favorite people
she doesn't even get justice for how her mom treats her it's not fair. and now Ulrich is still stuck inside the asylum
oh thank God Noah is here because I was so worried about my baby
Wait what is going on. Oh Jonas has never died before This is exciting
oh wait there's only one Jonas damnit
EPISODE 6:
Even though it's not working for everyone I do really love the 1888 look on Jonas
I did not expect that Aleksander was going to tell Bartosz about his real identity
This shit is so uncomfortable.
Ulrich needs a real stop telling the women that he's fucking to stop coming to his household
It's like the penny traveled through time GASPPPPPPP
Jonas What the fuck did you come from
all my fucking pussy friends are bothering me from finishing this show YALL GOT STUPID PROBLEMS STAND UP FOR YOURSELF AND THEN THIS WONT HAPPEN
I'm going to say this every single time he's on screen but this beard is too good
I think that bartosz may be the most scorned member of this entire group he never gets any pussy and it's so sad
I'm super over this really creepy really ugly fucking dude I want him to leave I also kind of don't believe that he's the child of Martha and Jonas
Oh I absolutely love love love them holding hands and then going back to a shot of them holding hands as kids
why are they such a good couple I really like them but I also always have
I'm not super sure I understand why they had to leave bartosz behind
I don't trust a single of these fucking adults I'm just any of them including themselves when they become adults
This is like a suicide squad. This is the weirdest collection of people What is this team. What are they doing. since when are these people are working together. omg
Oh shit a child born of both worlds takes both worlds energies to destroy it. But that's what causes the apocalypse
Well this is super fucked up
everything that's happening in this final montage sequence is bad news
all of it
why do I Stan Noah and Elisabeth so much
omg Hannah is giving birth is NOW the time
wow this is a lot
EPISODE 7:
our perspective is what makes definitive reality
I'm confused about the gravestone that says Charlotte on it
Also yes give me more Elizabeth and Noah please please please
This is absolutely crazier than any shit doc Brown ever did But he was also trying to build a time machine in the 1890s so that's fun
Oh is this how he gets all the fucking scars
My goodness what is happening What is going to happen I'm getting stressed.
There's only two episodes left I feel like they're not answering my questions I'm worried
What happened to wöller
What is silja doing here
This is bullshit she's like drawing him in
Oh that's a surprise so silja is a tiedemann
why is it always like I feel like I know what's happening and then around episode 6 or 7 I just completely lose the plot
oh wow Jonas almost straight up died but Noah saved him
‘you can't die’ points a gun at him
Oh my God you can't kill yourself because you've already grown
oop well after that birth happened I had to take about 5 minutes to pause my brain and factor that in
yo I knew Tannhaus was going to figure in fucking more than he did
Is he the one who builds the cage
does this seem like a good idea or does this seem like a bad idea
shooting yourself What do you think that feels like
everybody's on a different team there are too many teams It went from like a presidential race to a March madness bracket There's so many fucking people involved everybody's got their own goddamn plan
folks I just want to emphasize here that we have an episode and a half to tie all this up
Oh shit universe A Claudia infiltrated universe B Claudia
I love what they did with the place after the fire It looks really nice It's a different vibe but it's good
so Eve made the plans for the machine
Wait what She died.
I can't believe that Elizabeth and Charlotte have to be the ones to drop off Charlotte as an orphan
Oh noooooooooooo Jonas didn't do it!!!!
Oh my God don't make me feel sympathy for Hannah
he looks so fucked up
bye hannah we won't miss you
but also hate leaving a child without their parents
Tell us what's on the last page and tell us what happened to woller's eye
All right now we're seeing how everybody got to where they were like the first fucking time
I love this walk down memory lane it's literally just the stylized recap of the show right before the final episode which is 10/10
watch your face girl
too late
Omg what does this mean
THE FINALE:
This show is just Claudia Tiedemann Lurking: the TV show
Also the bullshit that he had to live through all of this in order to get to the end makes me really sad
yeah wait who's the fucking father of Regina
been way too sucked in
also. WE LOVE TO SEE A TIME TRAVEL TACKLE
WAS THIS THE MOST BEAUTIFUL DAY IN STUTTGART
How many times are going to burn this place down
how many versions of this fucking machine do they have they're always like oh God we don't have a way here or there FUCKING LIARS
I can't believe that the thesis of this show is teenage hormones cause the apocalypse
Adam and Eve are such fucking children it's so stupid.
reunion nnnnnnnnnnn
Oh shit he fucked up your plan huh
No I don't want it to end
I wish everybody didn't cry so much everybody so sad all the time
yup what in the actual fuck is happening
yo this is fucking wild
these baby Martha and Jonas are so cute
Not sure where we're going with this folks what's happening here wrap it up shit
I'm really obsessed with this golden snitch
It's just making me so sad
oh they're becoming stardust together
this is a weird cover but I'll take it
everything is going back to normal
but without Jonas and Martha and Claudia
if they don't tell us what happened to his eye I'm gonna flip out
I CAME HERE TO FIND OUT WHAT HAPPENED TO WOLLER’S EYE WHAT THE ACTUAL FUCK
Also what does this ending line mean its stressing me out
Well thats it. Three years of my life. Damn
8 notes
·
View notes
Text
Uno Reverse Card With Hearts
ASCII control characters non printable :

This is how you break UNO. Hey, I've recently started to upload again. Check out my channel and give this video a watch! Emoji Meaning The joker in a deck of cards, usually appearing like a court jester. Emoji Meaning A heart symbol emoji, which is used in card games for the hearts suit. Generally shown in red, despite the name. Not to be ️ Envelope. Emoji Meaning The back of an envelope, as used to send a letter or card.
ASCII code 00 = NULL ( Null character )
ASCII code 01 = SOH ( Start of Header )
ASCII code 02 = STX ( Start of Text )
ASCII code 03 = ETX ( End of Text, hearts card suit )
( HTML entity = ♥ )ASCII code 04 = EOT ( End of Transmission, diamonds card suit )
ASCII code 05 = ENQ ( Enquiry, clubs card suit )
ASCII code 06 = ACK ( Acknowledgement, spade card suit )
ASCII code 07 = BEL ( Bell )
ASCII code 08 = BS ( Backspace )
ASCII code 09 = HT ( Horizontal Tab )
ASCII code 10 = LF ( Line feed )
ASCII code 11 = VT ( Vertical Tab, male symbol, symbol for Mars )
ASCII code 12 = FF ( Form feed, female symbol, symbol for Venus )
ASCII code 13 = CR ( Carriage return )
ASCII code 14 = SO ( Shift Out )
ASCII code 15 = SI ( Shift In )
ASCII code 16 = DLE ( Data link escape )
ASCII code 17 = DC1 ( Device control 1 )
ASCII code 18 = DC2 ( Device control 2 )
ASCII code 19 = DC3 ( Device control 3 )
ASCII code 20 = DC4 ( Device control 4 )
ASCII code 21 = NAK ( NAK Negative-acknowledge )
ASCII code 22 = SYN ( Synchronous idle )
ASCII code 23 = ETB ( End of trans. block )
ASCII code 24 = CAN ( Cancel )
ASCII code 25 = EM ( End of medium )
ASCII code 26 = SUB ( Substitute )
ASCII code 27 = ESC ( Escape )
ASCII code 28 = FS ( File separator )
ASCII code 29 = GS ( Group separator )
ASCII code 30 = RS ( Record separator )
ASCII code 31 = US ( Unit separator )
ASCII code 127 = DEL ( Delete )
Printable ASCII characters :
( alphanumeric, symbols and signs )
How To Play Uno Hearts
ASCII code 32 = space ( Space )
ASCII code 33 = ! ( Exclamation mark )
ASCII code 34 = ' ( Double quotes ; Quotation mark ; speech marks )
ASCII code 35 = # ( Number sign )
ASCII code 36 = $ ( Dollar sign )
ASCII code 37 = % ( Percent sign )
ASCII code 38 = & ( Ampersand )
ASCII code 39 = ' ( Single quote or Apostrophe )
ASCII code 40 = ( ( round brackets or parentheses, opening round bracket )
ASCII code 41 = ) ( parentheses or round brackets, closing parentheses )
ASCII code 42 = * ( Asterisk )
ASCII code 43 = + ( Plus sign )
ASCII code 44 = , ( Comma )
ASCII code 45 = - ( Hyphen , minus sign )
ASCII code 46 = . ( Dot, full stop )
ASCII code 47 = / ( Slash , forward slash , fraction bar , division slash )
ASCII code 48 = 0 ( number zero )
ASCII code 49 = 1 ( number one )
ASCII code 50 = 2 ( number two )
ASCII code 51 = 3 ( number three )
ASCII code 52 = 4 ( number four )
ASCII code 53 = 5 ( number five )
ASCII code 54 = 6 ( number six )
ASCII code 55 = 7 ( number seven )
ASCII code 56 = 8 ( number eight )
ASCII code 57 = 9 ( number nine )
ASCII code 58 = : ( Colon )
ASCII code 59 = ; ( Semicolon )
ASCII code 60 = < ( Less-than sign )
ASCII code 61 = = ( Equals sign )
ASCII code 62 = > ( Greater-than sign ; Inequality )
ASCII code 63 = ? ( Question mark )
ASCII code 64 = @ ( At sign )
ASCII code 65 = A ( Capital letter A )
ASCII code 66 = B ( Capital letter B )
ASCII code 67 = C ( Capital letter C )
ASCII code 68 = D ( Capital letter D )
ASCII code 69 = E ( Capital letter E )
ASCII code 70 = F ( Capital letter F )
ASCII code 71 = G ( Capital letter G )
ASCII code 72 = H ( Capital letter H )
ASCII code 73 = I ( Capital letter I )
ASCII code 74 = J ( Capital letter J )
ASCII code 75 = K ( Capital letter K )
ASCII code 76 = L ( Capital letter L )
ASCII code 77 = M ( Capital letter M )
ASCII code 78 = N ( Capital letter N )
ASCII code 79 = O ( Capital letter O )
ASCII code 80 = P ( Capital letter P )
ASCII code 81 = Q ( Capital letter Q )
ASCII code 82 = R ( Capital letter R )
ASCII code 83 = S ( Capital letter S )
ASCII code 84 = T ( Capital letter T )
ASCII code 85 = U ( Capital letter U )
ASCII code 86 = V ( Capital letter V )
ASCII code 87 = W ( Capital letter W )
ASCII code 88 = X ( Capital letter X )
ASCII code 89 = Y ( Capital letter Y )
ASCII code 90 = Z ( Capital letter Z )
ASCII code 91 = [ ( square brackets or box brackets, opening bracket )
ASCII code 92 = ( Backslash , reverse slash )
ASCII code 93 = ] ( box brackets or square brackets, closing bracket )
ASCII code 94 = ^ ( Circumflex accent or Caret )
ASCII code 95 = _ ( underscore , understrike , underbar or low line )
ASCII code 96 = ` ( Grave accent )
ASCII code 97 = a ( Lowercase letter a , minuscule a )
ASCII code 98 = b ( Lowercase letter b , minuscule b )
ASCII code 99 = c ( Lowercase letter c , minuscule c )
ASCII code 100 = d ( Lowercase letter d , minuscule d )
ASCII code 101 = e ( Lowercase letter e , minuscule e )
ASCII code 102 = f ( Lowercase letter f , minuscule f )
ASCII code 103 = g ( Lowercase letter g , minuscule g )
ASCII code 104 = h ( Lowercase letter h , minuscule h )
ASCII code 105 = i ( Lowercase letter i , minuscule i )
ASCII code 106 = j ( Lowercase letter j , minuscule j )
ASCII code 107 = k ( Lowercase letter k , minuscule k )
ASCII code 108 = l ( Lowercase letter l , minuscule l )
ASCII code 109 = m ( Lowercase letter m , minuscule m )
ASCII code 110 = n ( Lowercase letter n , minuscule n )
ASCII code 111 = o ( Lowercase letter o , minuscule o )
ASCII code 112 = p ( Lowercase letter p , minuscule p )
ASCII code 113 = q ( Lowercase letter q , minuscule q )
ASCII code 114 = r ( Lowercase letter r , minuscule r )
ASCII code 115 = s ( Lowercase letter s , minuscule s )
ASCII code 116 = t ( Lowercase letter t , minuscule t )
ASCII code 117 = u ( Lowercase letter u , minuscule u )
ASCII code 118 = v ( Lowercase letter v , minuscule v )
ASCII code 119 = w ( Lowercase letter w , minuscule w )
ASCII code 120 = x ( Lowercase letter x , minuscule x )
ASCII code 121 = y ( Lowercase letter y , minuscule y )
ASCII code 122 = z ( Lowercase letter z , minuscule z )
ASCII code 123 = { ( braces or curly brackets, opening braces )
ASCII code 124 = | ( vertical-bar, vbar, vertical line or vertical slash )
ASCII code 125 = } ( curly brackets or braces, closing curly brackets )
ASCII code 126 = ~ ( Tilde ; swung dash )
1 note
·
View note
Text
What Is Document And Contract Redlining?
In the document management and collaboration process, redlining refers to marking text that has been edited. Typically, redlining is used when two or more people are working on a document together; each individual can redline the text that was added or edited. The red lined text will then appear in a special color (or as bold) so that others can see the changes that have been made.
The traditional redlining process typically takes two files as input, compares them to find the largest and nearest blocks of common text, and showing the rest as either added or deleted. The process works best for documents that are similar, for instance, versions of the same contract or offer. The output is a third file, with the added and deleted text highlighted per user’s request in a format. Typically, the added text might be shown bold, double-underline, surrounded by square brackets; deleted text might be shown strike-through, surrounded by curly brackets.
When is Document and Contract Redlining Required?
Document redlining is necessary when you are reviewing or negotiating with someone on a document, or when you are editing a document with markup for the counter party to allow them to see where you have made changes. Other times, you can use it when reviewing and editing the writings of your colleagues to whom you have delegated tasks such as drafting reports, meeting minutes, project plans and other documents for review. By using the redlining and track changes, you can easily see the changes and save time by not having to review the entire document again.
The Challenges With Traditional Ways Of Doing Document Change Tracking:
Difficult To Read: As the number of changes in the document grows, it becomes difficult to read the document and makes it harder to find spelling errors or spacing problems.
Leftover Document Metadata: Track changes and document comparison often leave behind a trail of metadata that could contain sensitive information. Hence all metadata must be removed before sending the document across. This requires additional steps and slows down the process.
Forgetting To Turn On Track Changes: People who are unfamiliar with the track changes function often forget to turn it on and hence any subsequent changes will not be tracked. This makes it harder for the next stage of review, forcing you to read the entire document to see what has changed.
Loss of Formatting: Accepting changes can cause loss of many types of formatting and may require significant effort to remediate these. Renumbering the document after track changes are accepted can be quite a difficult task. Many times, conversion from Word to any other systems break any special formatting (footnotes, special numbering schemes, etc.)
Desktop Only: Redline does not always appear on all devices. As a result, you need to wait until you are in front of your computer to see the documents and track changes.
Best Practices for Document Redlining
For transactional document redlining (read proposals, contracts, agreements), it is important to attempt to build a dialog with your counter party early on in the process. Try to understand the human element of the document negotiation process and determine what personality type you are dealing with.
You have to understand that in the end, it is your job and accountability to ensure that you don’t sign (or make your executives sign) on the dotted line unless you are completely sure that the document contains exactly the language you intended to sign on.
Set your priorities correctly. Most often we find that the following order of priorities will serve you the best:
Compliance first: Use the set of processes and tools that help you ensure that documents meet compliance criteria. Automated tracking of clauses and deviation from standards is a necessity.
Confidence: You must be confident about the full visibility and tractability of all of the changes that have been made to the document. There should be no unexplained variances.
Courtesy: Be courteous to your counter party by offering them the ability to see a red lined copy, clean copy and editable copy, so that they don’t have to repeat the arduous process of redlining and document comparison.
If you must use MS Word and email or any other software that does not allow multi-party automatic redlining, consider using the following best practices:
Turn on track changes but edit the document without showing markups. This way you can catch spelling or spacing issues and read the document much easier.
If you are sending a document via email, you want to ensure the recipient doesn’t turn off track changes.
Ensure that you or someone on your team scrubs and cleans the document metadata before sending it across to the counterparty.
Don’t forget to send the counterparty both a redline and a clean editable version of the revised document.
Why DocuCollab Is The Best Solution For Document Review And Redlining?
Top reasons why you should consider using DocuCollab, the best contract management software for your document review and negotiations:
1. Redlining at any time and on any device: DocuCollab has certain contract management software features that allow you and your counterparty to access and open the document for viewing and editing the documents with full redlining capability. You don’t have to wait until you get to a computer. You can review and approve documents from any mobile device.
2. No need to have three windows open: DocuCollab’s innovative approach eliminates the need to have 3 windows open for (1 each for redlined PDF, clean copy and editable copy).
3. Connected multiparty real-time redlining: There is no need to send documents and wait for another version to come back from your counterparty. All edits from internal or external parties can be seen as soon as they are made by any party.
4. Easy one-click toggle from “What happened” mode to “Who did what” mode. DocuCollab offers the ability to easily toggle from “Who did what” mode (where each reviewer’s edits are assigned a unique color) to “What happened in the document” (where all inserts are assigned a blue color and all deletes are assigned a red color).
5. One-click view into “Show me all changes since …”. DocuCollab offers a seamless view of tracking changes since any of the previous document milestones, thereby eliminating the need to have multiple redlines for future references.
6. No need to ask IT to install any software on your computer. All you need is a modern web browser and you have the full redlining and editing capabilities anytime, anywhere and on any device.
7. Get alerts. Be notified as soon as edits are made in a document by your counterparty and close the negotiation faster.
8. Support for offline editing and redlining. DocuCollab, the contract automation software allows you the flexibility to continue editing and redlining the document even when you are offline.
9. Integrated chat. The conversation channel inside the document allows you to discuss changes and resolve issues without having to wait for a phone call. This not only speeds up the negotiation but also provides powerful compliance capability in the event of a future audit.
10. The conversation channels and comments thread next to redline edits also offer valuable knowledge management capabilities for the organization.
Source: Contract Management Software - DocuCollab
#contract management software features#contract automation software#best contract management software
1 note
·
View note
Text
The Best Free SEO Tools
Ahrefs Backlink Checker(Free)
Ahrefs offers a free backlinks tool that lets you see your top 100 backlinks, including the referring page, a number of referring domains, estimated traffic, Ahref's own Domain Rating & URL Rating, and more.
This is a great tool to have in your back pocket as backlinks (a link your website gets from another website) is super valuable for SEO ranking. On top of that, they also increase your brand recognition and give you a steady stream of referral traffic from other reputable sites.
Features of Ahrefs:
Monitor your own backlinks to see how to optimize your site for more organic pickups or find new ways to partner with industry experts.
Review backlinks of your competitors or industry businesses you admire to understand their approach and build any learnings into your own strategies.
2. Keywordtool.io
I do not know if you are willing to invest in the keyword research tools it depends on your current online income level and your professional activity. It is not the same to be a blogger as to be an SEO or webmaster. But if you're tight on funds, I strongly recommend using this tool.
Features of Keywordtool.io:
It allows you to geolocate the searches, and it's also programmed to make reports of information much higher than other free SEO analysis tools.
It makes all the sense in the world if you think about it: Keyword Planner was a tool for advertisers, and KeywordTool.io is a tool for SEO (as defined by the creators themselves).
Another fantastic feature that I love about the tool is its "Questions" function.
3. GTMetrix
GTMetrix is the same as PageSpeed Insights but strengthened!!! The best thing is that by being able to register a free account, we can see the progression of our site over time. It tells us recommendations to improve our website.
Features of GTMetrix:
Managing the loading speed of pages on your site can have a significant impact on SEO, as well as on the UX.
GTMetrix allows you to review the loading speed of a page and diagnose improvement opportunities to see how you can refine your site.
Many other tools exist to measure the page loading speed. However, GTMetrix is one of our favorites with its YSlow, and targeted location speed tests feature.
Complete and very easy to use, you will not be disappointed.
4. Ubersuggest
Do you know when you're typing a search on Google and automatically come up with some search suggestions? No, Google is not yet psychic! These phrases or terms are based on favorite expressions that have already been typed by other users.
Features of Ubersuggest:
Get insights for new keywords
Map the main competitors
Identify the difficulty to rank with SEO and with ads.
5. Answer The Public
Answer the Public is an excellent SEO tool that aims at not only providing you with plenty of topics for a searched keyword but still it works to get you the most relevant topic which will fulfill your desire.
Features of Answer the Public:
Selecting a Related Topic: At first, it will choose appropriate topics from the sea of topics found from your inputted keyword.
Competition: After the first step above, this tool will now check the amount of competition present already for the relevant topic of your choice.
Niche Uncovering: This functionality aims at finding specific niche topics which have a considerable search volume, with this new set of topics you can write on it.
6. Google Search Console
Google Search Console is another one of Google's many free tools, and it might be their most valuable but underused tool. Simply enter any URL, and it'll give you a ton of data to diagnose ways you could be improving your site on Google.
Features of Google Search Console:
Links analysis: get a view of your top internal and external links, as well as top linking sites to see where your referral traffic is coming from.
Performance data: drill into specific keyword data by search type (web, image, video) and data range, to get average search volume plus clicks and impressions data, segmented by search query, pages visited, countries, and devices.
Index and crawl pages: submit any XML sitemaps to Google so they can crawl certain webpages and provide data on pages that need to be optimized e.g. 404 pages.
Mobile usability: their mobile diagnostics are a great way to see how mobile-friendly your website is and get actionable details on problematic pages. E.g. content wider than the screen, text too small to read, clickable elements too close together.
7. Rank Math
Rank Math is a brand new free plugin from MyThemeShop that promises to be a significant competitor in the fight of the Wordpress SEO plugin, a contest dominated by Yoast for years.
Features of RankMath:
The essentials are Link Counter, Rich Snippets and Sitemap.
Recommended: 404 Monitor, Redirections, Search Console and SEO Analysis.
According to the situation: AMP, Local SEO, Role Manager, and WooCommerce.
8. Soovle
Soovle makes up the best keyword research story for your SEO strategy. When you tumble up with large no of channels, and you wish to have different sets of keywords for each, then Soovle is the right Keyword research tool choice for you.
Features of Soovle:
The first thing you can observe about this keyword research tool is that once you are diverted to Soovle, you will see a search box surrounded by the famous search engines.
After the search is executed the first link that is being reverted is the Soovled link.
The currently active search engine appears inside the curly brackets.
One can move the search engines around by clicking the icon below the search box of the preferred search engine.
9. SEO Power Suite (Free Version)
Today SEO Powersuite is one of the best-known SEO tools on the SEO market. It is efficient, easy to use and very complete. It offers greater optimization in the search engines for websites.
Features of SEO Powersuite:
The SEO Powersuite software consists of four SEO products whose goal is to improve and bring more speed in the work of the optimizer at all stages of promoting your website.
Also, the implementation of these features, this tool ensures you understand, analyze and possibly modify the content of your website or its structure. This should enable you to better position your site in the search engines.
10. Yoast SEO
The WordPress SEO Plugin by Yoast is one of the most comprehensive plugins to control essential aspects of on-page optimization directly from the WordPress backend. The plugin has been downloaded over 7 million times and is also used on larger sites such as Mashable.
Features of Yoast:
With Yoast SEO, you can analyze your current post for an entered Focus keyword. You will also receive suggestions for improving your text to make the selected Focus keyword even more relevant within this page.
However, the keyword is not automatically set as Meta in the head of your website-this requires further action.
Note: If you need cheap rate SEO Tools To Click Here
1 note
·
View note
Text
Tutorial: How to add pages with buttons to your blog
I recently added some new pages to my main blog to help people find my stuff and had a request showing how to do it. Being the nice guy that I am, I will now explain how as rudimentary as possible.
Step 1: Open your blog’s theme page. This can be done by clicking the Profile button [1], then clicking on Edit appearance [2], and then Edit theme [3].
Step 2. After the theme page loads scroll down and click on + Add a page [1]. A new post-like editor will open. From here add a page url, you need to replace the grey text in the box [2], give your page a title [3], and then add content to the page as if you were writing a regular Tumblr post [4]. Once you are satisfied with the post click on Save [5]. Once the save button disappears then your new blog page is live. You can double check the way it looks by going to the full url that was typed in the url box [2].
Step 3: Close the editor by clicking on back [1], scroll back to the top of the page and then click on Edit HTML [2] (dont worry if yours doesnt say custom theme or whatever).
Step 4: The next step might look scary, but it really isnt. We are going to add the button to the blog’s main page. First and foremost: make a copy of your current blog’s code so if you make a mistake or it doesnt look right then you can undo everything. To do this right click in the main text window [1], click on Select All [2] then right click again and click on Copy [3]. Now open any text editor on your computer like notepad or word and paste the text in there and save it to your pc. If anything ever goes wrong just copy the text in this saved file, open this window, select all again, and paste over everything in this box and click on save.
Step 5: Depending on your blog’s theme we will now add a button roughly where all the other buttons to your blog is, notably your ask and submit buttons. First open the search options by pressing Cntrl + F, then type href=“/ask into the Search for box [1]
Step 6: You now need to highlight all the code around the href=“/ask” bit starting with <li class= and ending with </li>, then copy this code [1]. (in my screenshot below this is lines 256 to 258). Note: do not copy the {block:AskEnabled} and {/block:...} bits; you wont need this. Next you need to paste this code where your button to appear; for example I chose for my button to show up after my submit button. So I found the {/block:...} part where the Submissions end (after the curly boi }), added a new a line and pasted the code there [2]. From here click on Update Preview [3] and you should now see your blog has two ask buttons in the preview.
Step 7: We now want to edit our button to look and work correctly. First change “nav-item nav-item--ask“ to “nav-item nav-item--page” [1]. Now change “/ask” to whatever url you chose for your page back in step 2 (part 2), in my case this is now “/favourite” [2], you need the backslash ( / ). Next change "label {block:AskPage}current-page{/block:AskPage}" to “label external-page” [3]. Finally change {AskLabel} to whatever you want your button to say, in my case I chose My Fav Person [4], note: you need to get rid of the curly brackets here.
Step 8: Click on Update Preview and then Save (the save button only shows up after you update preview). You’re done! Go to your main blog url and try it out!
Bonus Step!: If you want to link to stuff outside your tumblr blog (like youtube or patreon or whatever) you can do this by adding in the full link in the href= part without the starting backslash. Example:
14 notes
·
View notes
Text
Pretty without the Poison
I have had my eye on the “Toxic-free” or “Clean Beauty” movement for a while, since I switched to sulfate free shampoo around 2013. As a small business owner, finding the balance between my realistic budget and the ideal products can be difficult. The struggle is fully real nowadays, as the industry is currently completely polarized. It was true before the pandemic and it is has only intensified as we compulsively sanitize everything we touch.
On one side we have the evil empire of giant corporations that is basically the embodiment of the boogey man: testing on animals, buying out small companies and destroying their formulas, weakening your immune system or causing cancer... On the other side we have the coven of luxury hippie companies that cost more because they make everything in small batches with handpicked pollen from the butts of free range bees and oh btw there’s no preservatives so you have to use this $70 cream by next week or it gets moldy...
Now, I lean towards the latter camp, I’d rather be woo-woo than toxic. But for everyday consumers it’s not a question of ideals, it’s a question of budget. The cheapest ingredients are synthetics and carcinogenic, the best ingredients are natural and expensive to process gently and efficiently. Meanwhile most of us are not in the 1% tax bracket. The money for “real shit” has to come from somewhere and it can be difficult to see your beauty routine as “real shit” when you’ve got rent and car payments due. I get it, I’m in the same boat.
The thing to be cautious of with Clean Beauty is, just because its “natural” doesn’t mean its automatically good for your hair. After all, lead is natural, arsenic is natural, cocaine is natural, opium is natural...
Start with making sure your products are toxic-free, but do further research. Be weary of alcohol, salt, and silicones.
I’m making a more detailed glossary of specific chemical ingredients but here is a basic understanding of the terms I use.
Surfectants: detergent, soap, the thing that makes the bubbles happen. Used to cut grease but at the price of stripping moisture. Think “dish pan hands” but your hair. I’m not a fan of surfectants because the more moisture you strip, the more you have to put back in, and your scalp usually produces more grease to compensate. When I was using shampoo I was also having to follow it with a deep conditioner mask every time. Now I don’t use either. (see my previous blog, what type of shampoo should I use?)
Endocrine disruptors: Such as parabens and pthylates. These may not affect your hair in a noticeable way, you may not have an allergic reaction or breakage. But there are so many in the products we use every day that the harmful affects easily accumulate over the years. It can contribute to hormone imbalances like PCOS or endometriosis.
Fragrance/Parfum/Perfume: Basically the get out of jail free card for chemicals. A company can put anything in a fragrance and does not have to disclose what it is, in the name of preventing corporate espionage. Every successful luxury brand product has a generic dupe and that dupe needs to smell as close to the original as it can. However, fragrances often include endocrine disruptors. Not to mention, for the number of people who are highly allergic to “fragrance” - It’s unfair that they don’t get to know what chemical they are actually allergic to.
Silicones: Think of them as plastic food wrapping... It coats the hair with “plastic” with shiny results but at the cost of preventing moisture from getting in. Clients who have used silicones for years have to go through several clarifying washes to get rid of all the buildup. Afterwards the hair is bound to feel rough from the combination of silicone damage and clarifying shampoo. It’s like having to sand a piece of furniture before re-varnishing, it feels rough at first but the hair is much better off after recovering.
Shea butter: This is one of those things that used to be good but is somewhat problematic now. It’s natural but the cheaply processed shea butter (what most people are using) is just as bad at coating the hair and blocking moisture as silicones. Cold-pressed high quality shea butter can be okay, so to determine if the product is “good” or “bad” requires deeper research on the specific brand.
Sodium Chloride: Table salt. A natural, non toxic ingredient that is still bad for your hair in large quantities. If you have ever been to the ocean with fresh haircolor, you know. I once spent a week in Tulum; as an experiment I started with fresh dark teal and lime green hair and I returned with pastel minty blue. Salt is powerful when it comes to stripping haircolor and moisture. I would avoid in shampoo, but with styling products like salt sprays? It really depends on the rest of the ingredients, imo. Generally, if the only product you use contains salt and your hair feels dry or the color is fading - stop using it and try something else. But if your scalp and hair feels okay, no harm no foul.
Charcoal: Everything with charcoal is so tempting because it’s my favorite color, so TRUST I get it. But think about this - if you take birth control or other important medication, they warn you not to eat or drink anything containing activated charcoal while those pills are in your stomach. It is so good at “detoxing” that it detoxes the medicine right out of you! Dentist’s have denounced charcoal toothpaste as too harsh for everyday use. It wears down the enamel in your teeth, which is much stronger than your hair. Charcoal is natural but powerful, use sparingly.
The thing I struggle with, the thing that prevents me from being fully on board with this movement, is I’ve tried expensive natural organic small batch small business brands and was also disappointed by the results.
Innersense Organic Beauty: A brand I had heard a lot of good things about. Mostly from people who use them but also from my co-worker who specializes in curls. My coworker has been following the Toxic-Free movement more closely due to her specialty being all ends of the curly hair spectrum. She explain to me that shea butter is becoming a big problem, but that the shea butter contained in Innersense was okay because it’s high quality and all of their ingredients are cold-pressed. I raised an eyebrow about the shea butter but the cold-pressed ingredients sounded promising, so I tried it anyway. I ordered an intro kit for $66, which is a lot of money to shell out on something that you may completely hate... and it turns out I did! I wasted no time putting Innersense’s “Color Awakening Hair Ceremony” to the test. As with most lines, the conditioner isn’t really problem, but the shampoo is a dealbreaker. Innersense Color Awakening Hairbath is natural and organic but instead of surfectants, the main cleansing ingredient is Sodium Chloride... common table salt! I used it a couple of times and immediately watched my neon green color come out of my hair and circle down the drain. I hadn’t used any type of shampoo since I started using New Wash last year, but Innersense faded my color just as much as my sulfate-shampoo days. Not only that but my scalp was so dry, I had more scratchy flakey scalp problems after shampooing with Innersense than I do after BLEACHING MY ROOTS. That’s insanity to me! Your scalp should not be more upset with your shampoo than it is with a chemical bleach solution that, if left unattended for hours, can melt your hair off.
Reverie: This is brand that I’ve seen all over instagram alongside brands I use already, and it looks like it’s a really good quality line, too good. I inquired about wholesale and trying it out. The line is so expensive that the sample kit of all 7 products is $157. If it’s too expensive for me to try right now can I really expect my clients to pay $52 for Ever hair oil or $72 for Cake scalp tonic? Furthermore, I fundamentally can’t get on board with brands that make you buy multiples of all the products in order to get wholesale pricing. It doesn’t work for my small space and if I only sell one product from that line, then I’m stuck with a bunch of expensive stuff that no one wants. I also am turned off when I want to see an ACTUAL ingredient list and they only list the luxury ingredients and the ingredients they don’t use.. but won’t provide the list itself. We need to normalize TRANSPARENCY about ingredients!
So this is where I find myself at a crossroads. Is it really too much to ask for something to be organic and natural AND color safe? I fundamentally believe it is chemically possible to do both, but then it is very difficult to find brands that people can realistically afford in a pandemic-induced recession...
Good News, Everyone!
Clean Beauty brands I’m using now
Cult+King: This line is so rad! I straight up swiped their “pretty without the poison” tagline for the title of this blog. It’s the first brand I’ve truly felt an ideological kinship with. They don’t gender their products (because that’s stupid), they prioritize people and planet over profits, and everything is so natural and nontoxic that you can use the hair Balm on your face. I love that they use beautiful glass bottles and offer refills in recyclable aluminum containers. I do have one little issue... Their only offering for shampoo is in bar form, which is cool, but it has charcoal in it and is not recommended for colored hair. Which would be 90% of my clientele. The shampoo bar smells AMAZING and I really want to use it, can we please get a charcoal-free option? I’ve been using Jelly on myself and my clients. Full disclosure, I was worried about it because it also contains salt, but it hasn’t faded my color and it actually feels more moisturizing than drying. I’m guessing it’s because the main ingredient is banana leaf juice, not the salt. I love their Tonik, it smells amazing and I use it to refresh my curls in the morning. It’s also a scalp tonic that can be used if you have any break outs or, in my case, ingrown hairs from shaving my mohawk myself - quarantine problems, amirite?
Hairstory: New Wash is what I have been using instead of shampoo for nearly 2 years. It was so nourishing that it helped me realize I actually have curly hair now! Plus my hair never fades, which is great for my clients but problematic for me when want to change it up. It’s a higher price point for New Wash, but actually $40 for a product that replaces shampoo + conditioner is no different to paying $20 for each one. You scrub your scalp (with their amazing scalp brush) and leave it in a few minutes to condition, so you’re using half the product. New Wash scents are all botanical, free from chemical fragrance. Their styling line is also very versatile, I use Dressed Up before diffusing to set my curls in place. They also have refillable aluminum containers which can be recycled (along with the scalp brush) and their refill packaging can be flat packed, creating much less waste. Plus they have an amazing subscription option so you can buy refills in bulk and get the best value for money.
Afterworld Organics: A promising line I found often tagged alongside these other two brands. I just started using them and I’m in loooove. They, like Hairstory, provide a combination of scalp brush and 2-in-1 soap free hair cleanser. Hair Glow comes in two fragrance-free scents, Royal Lavender and Amberwood, which is great because on rare occasions I’ve met people who hate lavender... they exist. Moisture Lock is my absolute favorite! It’s used like a gel and dries with extreme hold, but it leaves your hair insanely shiny and soft. Hair Healer is a heat protectant that also nourishes and smooths. Texture Mist is a gentle, buildable salt spray. Afterworld does a great job of explaining the use of salt in their Texture Mist “Atlantic sea salt and Polyquat 20 work together to increase texture and volume while hydrating the hair. Polyquat-a powdered extract made from plant cell fibers- binds moisture to the hair, acting as a barrier against the drying nature of the sea salt.” Overall, they do a great job of explaining the use their ingredients. Their About page contains a note on “alcohol ingredients” that talks about fatty alcohols being different from isopropyl alcohol.
All of these lines have something in common, they focus on glass, recyclable, and overall less wasteful packaging. They are concerned with the long term effects of their ingredients on the human body and the ecosystem. These lines also allow me to earn commission while offering products for sale online for your convenience. This is imperative for a small business like mine to stay afloat. With such little retail space and in the middle of a recession, small businesses need all the help we can get. No more overhead cost for me to gamble on selling products. You can order what you want and it comes right to your door without fear of breaking quarantine. This is especially valuable for those of you working from home and, due to being high-risk, still having zero contact with people outside of your household.
On principle, I use brands that assume your intelligence, not depend on your stupidity to sell their snake oil. The integrity of their ingredients can speak for itself.
Stay safe, stay clean, and...
Beware of false prophets.
#beauty philosophy#healing#freakflagbyiana#money#small business#FAQ#hair#haircare#health#haircolor care#hairdresser#shampoo#smash the patriarchy#beauty#alchemy
0 notes
Text
The Ultimate Python Beginner's Handbook
Python has become one of the fastest-growing programming languages over the past few years.
Not only it is widely used, it is also an awesome language to tackle if you want to get into the world of programming.
This Python Guide for Beginners allows you to learn the core of the language in a matter of hours instead of weeks.
Quick info: You can download a PDF version of this Python Guide for Beginners.
Ready to dive in?
Table of contents
Introduction to Python
Installing Python 3
Running Code
Syntax
Comments
Variables
Types
Typecasting
User Input
Operators
Conditionals
Lists
Tuples
Sets
Dictionaries
while Loops
for Loops
Functions
Scope
List Comprehensions
Lambda Functions
Modules
if name == 'main'
Files
Classes and Objects
Inheritance
Exceptions
Conclusion
Introduction to Python
Python was created in 1990 by Guido Van Rossum in Holland.
One of the objectives of the language was to be accessible to non-programmers.
Python was also designed to be a second language for programmers to learn due to its low learning curve and ease of use.
Python runs on Mac, Linux, Windows, and many other platforms.
Python is:
Interpreted: it can execute at runtime, and changes in a program are instantly perceptible. To be very technical, Python has a compiler. The difference when compared to Java or C++ is how transparent and automatic it is. With Python, we don't have to worry about the compilation step as it's done in real-time. The tradeoff is that interpreted languages are usually slower than compiled ones.
Semantically Dynamic: you don't have to specify types for variables and there is nothing that makes you do it.
Object-Oriented: everything in Python is an object. But you can choose to write code in an object-oriented, procedural, or even functional way.
High level: you don't have to deal with low-level machine details.
Python has been growing a lot recently partly because of its many uses in the following areas:
System scripting: it's a great tool to automate everyday repetitive tasks.
Data Analysis: it is a great language to experiment with and has tons of libraries and tools to handle data, create models, visualize results and even deploy solutions. This is used in areas like Finance, E-commerce, and Research.
Web Development: frameworks like Django and Flask allow the development of web applications, API's, and websites.
Machine Learning: Tensorflow and Pytorch are some of the libraries that allow scientists and the industry to develop and deploy Artificial Intelligence solutions in Image Recognition, Health, Self-driving cars, and many other fields.
You can easily organize your code in modules and reuse them or share them with others.
Finally, we have to keep in mind that Python had breaking changes between versions 2 and 3. And since Python 2 support ended in 2020, this article is solely based on Python 3.
So let's get started.
Installing Python 3
If you use a Mac or Linux you already have Python installed. But Windows doesn't come with Python installed by default.
You also might have Python 2, and we are going to use Python 3. So you should check to see if you have Python 3 first.
Type the following in your terminal.
python3 -V
Notice the uppercase V.
If your result is something similar to 'Python 3.x.y', for instance, Python 3.8.1, then you are ready to go.
If not, follow the next instructions according to your Operating System.
Installing Python 3 on Windows
Go to https://www.python.org/downloads/.
Download the latest version.
After the download, double-click the installer.
On the first screen, check the box indicating to "Add Python 3.x to PATH" and then click on "Install Now".
Wait for the installation process to finish until the next screen with the message "Setup was successful".
Click on "Close".
Installing Python 3 on Mac
Install XCode from the App Store.
Install the command line tools by running the following in your terminal.
xcode-select --install
I recommend using Homebrew. Go to https://brew.sh/ and follow the instructions on the first page to install it.
After installing Homebrew, run the following brew commands to install Python 3.
brew update brew install python3
Homebrew already adds Python 3 to the PATH, so you don't have to do anything else.
Installing Python 3 on Linux
To install using apt, available in Ubuntu and Debian, enter the following:
sudo apt install python3
To install using yum, available in RedHat and CentOS, enter the following:
sudo yum install python3
Running Code
You can run Python code directly in the terminal as commands or you can save the code in a file with the .py extension and run the Python file.
Terminal
Running commands directly in the terminal is recommended when you want to run something simple.
Open the command line and type python3
renan@mypc:~$ python3
You should see something like this in your terminal indicating the version (in my case, Python 3.6.9), the operating system (I'm using Linux), and some basic commands to help you.
The >>> tells us we are in the Python console.
Python 3.6.9 (default, Nov 7 2019, 10:44:02) [GCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>>
Let's test it by running our first program to perform basic math and add two numbers.
>>> 2 + 2
The output is:
4
To exit the Python console simply type exit().
>>> exit()
Running .py files
If you have a complex program, with many lines of code, the Python console isn't the best option.
The alternative is simply to open a text editor, type the code, and save the file with a .py extension.
Let's do that, create a file called second_program.py with the following content.
print('Second Program')
The print() function prints a message on the screen.
The message goes inside the parentheses with either single quotes or double quotes, both work the same.
To run the program, on your terminal do the following:
renan@mypc:~$ python3 second_program.py
The output is:
Second Program
Syntax
Python is known for its clean syntax.
The language avoids using unnecessary characters to indicate some specificity.
Semicolons
Python doesn't use semicolons to finish lines. A new line is enough to tell the interpreter that a new command is beginning.
The print() method will display something.
In this example, we have two commands that will display the messages inside the single quotes.
print('First command') print('Second command')
Output:
First command Second command
But the following is wrong due to the semicolons in the end:
print('First command'); print('Second command');
Indentation
Many languages use curly-brackets to define scope.
Python's interpreter uses only indentation to define when a scope ends and another one starts.
This means you have to be aware of white spaces at the beginning of each line -- they have meaning and might break your code if misplaced.
This definition of a function works:
def my_function(): print('First command')
This doesn't work because the indentation of the second line is missing and will throw an error:
def my_function(): print('First command')
Case sensitivity and variables
Python is case sensitive. So the variables name and Name are not the same thing and store different values.
name = 'Renan' Name = 'Moura'
As you can see, variables are easily created by just assigning values to them using the = symbol.
This means name stores 'Renan' and Name stores 'Moura'.
Finally, to comment something in your code, use the hash mark #.
The commented part does not influence the program flow.
# this function prints something def my_function(): print('First command')
This was just an overview. The details of each of these will become clearer in the next chapters with examples and broader explanations.
The purpose of comments is to explain what is happening in the code.
Comments are written along with your code but do not influence your program flow.
When you work by yourself, maybe comments don't feel like something you should write. After all, at the moment, you know the whys of every single line of code.
But what if new people come on board your project after a year and the project has 3 modules, each with 10,000 lines of code?
Think about people who don't know a thing about your app and who are suddenly having to maintain it, fix it, or add new features.
Remember, there is no single solution for a given problem. Your way of solving things is yours and yours only. If you ask 10 people to solve the same problem, they will come up with 10 different solutions.
If you want others to fully understand your reasoning, good code design is mandatory, but comments are an integral part of any codebase.
The syntax of comments in Python is rather easy: just use the hash mark # symbol in front of the text you want to be a comment.
#This is a comment and it won't influence my program flow
You can use a comment to explain what some piece of code does.
#calculates the sum of any given two numbers a + b
Maybe you want to comment on something very complex or describe how some process works in your code.
In these cases, you can use multiline comments.
To do that, just use a single hash mark # for each line.
#Everything after the hash mark # is a comment #This is a comment and it won't influence my program flow #Calculates the cost of the project given variables a and b #a is the time in months it will take until the project is finished #b is how much money it will cost per month a + b * 10
Variables
In any program, you need to store and manipulate data to create a flow or some specific logic.
That's what variables are for.
You can have a variable to store a name, another one to store the age of a person, or even use a more complex type to store all of this at once like a dictionary.
Creating, also known as Declaring
Declaring a variable is a basic and straightforward operation in Python
Just pick a name and attribute a value to it using the = symbol.
name='Bob' age=32
You can use the print() function to show the value of a variable.
print(name) print(age)
Bob 32
Notice that in Python there is no special word to declare a variable.
The moment you assign a value, the variable is created in memory.
Python also has dynamic typing, which means you don't have to tell it if your variable is a text or a number, for instance.
The interpreter infers the typing based on the value assigned.
If you need it, you can also re-declare a variable just by changing its value.
#declaring name as a string name='Bob' #re-declaring name as an int name = 32
Keep in my mind, though, that this is not recommended since variables must have meaning and context.
If I have a variable called name I don't expect it to have a number stored in it.
Naming Conventions
Let's continue from the last section when I talked about meaning and context.
Don't use random variable names like x or y.
Say you want to store the time of a party, just call it party_time.
Oh, did you notice the underscore _?
By convention, if you want to use a variable name that is composed of two or more words, you separate them by underscores. This is called Snake Case.
Another option would be using CamelCase as in partyTime. This is very common in other languages, but not the convention in Python as stated before.
Variables are case sensitive, so party_time and Party_time are not the same. Also, keep in mind that the convention tells us to always use lower case.
Remember, use names that you can recall inside your program easily. Bad naming can cost you a lot of time and cause annoying bugs.
In summary, variable names:
Are Case sensitive: time and TIME are not the same
Have to start with an underscore _ or a letter (DO NOT start with a number)
Are allowed to have only numbers, letters and underscores. No special characters like: #, $, &, @, etc.
This, for instance, is not allowed: party#time, 10partytime.
Types
To store data in Python you need to use a variable. And every variable has its type depending on the value of the data stored.
Python has dynamic typing, which means you don't have to explicitly declare the type of your variable -- but if you want to, you can.
Lists, Tuples, Sets, and Dictionaries are all data types and have dedicated sections later on with more details, but we'll look at them briefly here.
This way I can show you the most important aspects and operations of each one in their own section while keeping this section more concise and focused on giving you a broad view of the main data types in Python.
Determining the Type
First of all, let's learn how to determine the data type.
Just use the type() function and pass the variable of your choice as an argument, like the example below.
print(type(my_variable))
Boolean
The boolean type is one of the most basic types of programming.
A boolean type variable can only represent either True or False.
my_bool = True print(type(my_bool)) my_bool = bool(1024) print(type(my_bool))
<class 'bool'> <class 'bool'>
Numbers
There are three types of numeric types: int, float, and complex.
Integer
my_int = 32 print(type(my_int)) my_int = int(32) print(type(my_int))
<class 'int'> <class 'int'>
Float
my_float = 32.85 print(type(my_float)) my_float = float(32.85) print(type(my_float))
<class 'float'> <class 'float'>
Complex
my_complex_number = 32+4j print(type(my_complex_number)) my_complex_number = complex(32+4j) print(type(my_complex_number))
<class 'complex'> <class 'complex'>
String
The text type is one of the most commons types out there and is often called string or, in Python, just str.
my_city = "New York" print(type(my_city)) #Single quotes have exactly #the same use as double quotes my_city = 'New York' print(type(my_city)) #Setting the variable type explicitly my_city = str("New York") print(type(my_city))
<class 'str'> <class 'str'> <class 'str'>
You can use the + operator to concatenate strings.
Concatenation is when you have two or more strings and you want to join them into one.
word1 = 'New ' word2 = 'York' print(word1 + word2)
New York
The string type has many built-in methods that let us manipulate them. I will demonstrate how some of these methods work.
The len() function returns the length of a string.
print(len('New York'))
8
The replace() method replaces a part of the string with another. As an example, let's replace 'New' for 'Old'.
print('New York'.replace('New', 'Old'))
Old York
The upper() method will return all characters as uppercase.
print('New York'.upper())
NEW YORK
The lower() method does the opposite, and returns all characters as lowercase.
print('New York'.lower())
new york
Lists
A list has its items ordered and you can add the same item as many times as you want. An important detail is that lists are mutable.
Mutability means you can change a list after its creation by adding items, removing them, or even just changing their values. These operations will be demonstrated later in the section dedicated to Lists.
my_list = ["bmw", "ferrari", "maclaren"] print(type(my_list)) my_list = list(("bmw", "ferrari", "maclaren")) print(type(my_list))
<class 'list'> <class 'list'>
Tuples
A tuple is just like a list: ordered, and allows repetition of items.
There is just one difference: a tuple is immutable.
Immutability means you can't change a tuple after its creation. If you try to add an item or update one, for instance, the Python intepreter will show you an error. I will show that these errors occur later in the section dedicated to Tuples.
my_tuple = ("bmw", "ferrari", "maclaren") print(type(my_tuple)) my_tuple = tuple(("bmw", "ferrari", "maclaren")) print(type(my_tuple))
<class 'tuple'> <class 'tuple'>
Sets
Sets don't guarantee the order of the items and are not indexed.
A key point when using sets: they don't allow repetition of an item.
my_set = {"bmw", "ferrari", "maclaren"} print(type(my_set)) my_set = set(("bmw", "ferrari", "maclaren")) print(type(my_set))
<class 'set'> <class 'set'>
Dictionaries
A dictionary doesn't guarantee the order of the elements and is mutable.
One important characteristic in dictionaries is that you can set your own access keys for each element.
my_dict = {"country" : "France", "worldcups" : 2} print(type(my_dict)) my_dict = dict(country="France", worldcups=2) print(type(my_dict))
<class 'dict'> <class 'dict'>
Typecasting
Typecasting allows you to convert between different types.
This way you can have an int turned into a str, or a float turned into an int, for instance.
Explicit conversion
To cast a variable to a string just use the str() function.
# this is just a regular explicit intialization my_str = str('32') print(my_str) # int to str my_str = str(32) print(my_str) # float to str my_str = str(32.0) print(my_str)
32 32 32.0
To cast a variable to an integer just use the int() function.
# this is just a regular explicit intialization my_int = int(32) print(my_int) # float to int: rounds down to 3 my_int = int(3.2) print(my_int) # str to int my_int = int('32') print(my_int)
32 3 32
To cast a variable to a float just use the float() function.
# this is an explicit intialization my_float = float(3.2) print(my_float) # int to float my_float = float(32) print(my_float) # str to float my_float = float('32') print(my_float)
3.2 32.0 32.0
What I did above is called an explicit type conversion.
In some cases you don't need to do the conversion explicitly, since Python can do it by itself.
Implicit conversion
The example below shows implicit conversion when adding an int and a float.
Notice that my_sum is float. Python uses float to avoid data loss since the int type can not represent the decimal digits.
my_int = 32 my_float = 3.2 my_sum = my_int + my_float print(my_sum) print(type(my_sum))
35.2 <class 'float'>
On the other hand, in this example, when you add an int and a str, Python will not be able to make the implicit conversion, and the explicit type conversion is necessary.
my_int = 32 my_str = '32' # explicit conversion works my_sum = my_int + int(my_str) print(my_sum) #implicit conversion throws an error my_sum = my_int + my_str
64 Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: unsupported operand type(s) for +: 'int' and 'str'
The same error is thrown when trying to add float and str types without making an explicit conversion.
my_float = 3.2 my_str = '32' # explicit conversion works my_sum = my_float + float(my_str) print(my_sum) #implicit conversion throws an error my_sum = my_float + my_str
35.2 Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: unsupported operand type(s) for +: 'float' and 'str'
User Input
If you need to interact with a user when running your program in the command line (for example, to ask for a piece of information), you can use the input() function.
country = input("What is your country? ") #user enters 'Brazil' print(country)
Brazil
The captured value is always string. Just remember that you might need to convert it using typecasting.
age = input("How old are you? ") #user enters '29' print(age) print(type(age)) age = int(age) print(type(age))
The output for each print() is:
29 <class 'str'> <class 'int'>
Notice the age 29 is captured as string and then converted explicitly to int.
Operators
In a programming language, operators are special symbols that you can apply to your variables and values in order to perform operations such as arithmetic/mathematical and comparison.
Python has lots of operators that you can apply to your variables and I will demonstrate the most used ones.
Arithmetic Operators
Arithmetic operators are the most common type of operators and also the most recognizable ones.
They allow you to perform simple mathematical operations.
They are:
+: Addition
-: Subtraction
*: Multiplication
/: Division
**: Exponentiation
//: Floor Division, rounds down the result of a division
%: Modulus, gives you the remainder of a division
Let's see a program that shows how each of them is used.
print('Addition:', 5 + 2) print('Subtraction:', 5 - 2) print('Multiplication:', 5 * 2) print('Division:', 5 / 2) print('Floor Division:', 5 // 2) print('Exponentiation:', 5 ** 2) print('Modulus:', 5 % 2)
Addition: 7 Subtraction: 3 Multiplication: 10 Division: 2.5 Floor Division: 2 Exponentiation: 25 Modulus: 1
Concatenation
Concatenation is when you have two or more strings and you want to join them into one.
This useful when you have information in multiple variables and want to combine them.
For instance, in this next example I combine two variables that contain my first name and my last name respectively to have my full name.
The + operator is also used to concatenate.
first_name = 'Renan ' last_name = 'Moura' print(first_name + last_name)
Renan Moura
Since concatenation is applied to strings, to concatenate strings with other types, you have to do an explicit typecast using str().
I have to typecast the int value 30 to string with str() to concatenate it with the rest of the string.
age = 'I have ' + str(30) + ' years old' print(age)
I have 30 years old
Comparison Operators
Use comparison operators to compare two values.
These operators return either True or False.
They are:
==: Equal
!=: Not equal
>: Greater than
<: Less than
>=: Greater than or equal to
<=: Less than or equal to
Let's see a program that shows how each of them is used.
print('Equal:', 5 == 2) print('Not equal:', 5 != 2) print('Greater than:', 5 > 2) print('Less than:', 5 < 2) print('Greater than or equal to:', 5 >= 2) print('Less than or equal to:', 5 <= 2)
Equal: False Not equal: True Greater than: True Less than: False Greater than or equal to: True Less than or equal to: False
Assignment Operators
As the name implies, these operators are used to assign values to variables.
x = 7 in the first example is a direct assignment storing the number 7 in the variable x.
The assignment operation takes the value on the right and assigns it to the variable on the left.
The other operators are simple shorthands for the Arithmetic Operators.
In the second example x starts with 7 and x += 2 is just another way to write x = x + 2. This means the previous value of x is added by 2 and reassigned to x that is now equal to 9.
x = 7 print(x)
7
+=: addition and assignment
x = 7 x += 2 print(x)
9
-=: subtraction and assignment
x = 7 x -= 2 print(x)
5
*=: multiplication and assignment
x = 7 x *= 2 print(x)
14
/=: division and assignment
x = 7 x /= 2 print(x)
3.5
%=: modulus and assignment
x = 7 x %= 2 print(x)
1
//=: floor division and assignment
x = 7 x //= 2 print(x)
3
**=: exponentiation and assignment
x = 7 x **= 2 print(x)
49
Logical Operators
Logical operators are used to combine statements applying boolean algebra.
They are:
and: True only when both statements are true
or: False only when both x and y are false
not: The not operator simply inverts the input, True becomes False and vice versa.
Let's see a program that shows how each one is used.
x = 5 y = 2 print(x == 5 and y > 3) print(x == 5 or y > 3) print(not (x == 5))
False True False
Membership Operators
These operators provide an easy way to check if a certain object is present in a sequence: string, list, tuple, set, and dictionary.
They are:
in: returns True if the object is present
not in: returns True if the object is not present
Let's see a program that shows how each one is used.
number_list = [1, 2, 4, 5, 6] print( 1 in number_list) print( 5 not in number_list) print( 3 not in number_list)
True False True
Conditionals
Conditionals are one of the cornerstones of any programming language.
They allow you to control the program flow according to specific conditions you can check.
The if statement
The way you implement a conditional is through the if statement.
The general form of an if statement is:
if expression: statement
The expression contains some logic that returns a boolean, and the statement is executed only if the return is True.
A simple example:
bob_age = 32 sarah_age = 29 if bob_age > sarah_age: print('Bob is older than Sarah')
Bob is older than Sarah
We have two variables indicating the ages of Bob and Sarah. The condition in plain English says "if Bob's age is greater than Sarah's age, then print the phrase 'Bob is older than Sarah'".
Since the condition returns True, the phrase will be printed on the console.
The if else and elif statements
In our last example, the program only does something if the condition returns True.
But we also want it to do something if it returns False or even check a second or third condition if the first one wasn't met.
In this example, we swapped Bob's and Sarah's age. The first condition will return False since Sarah is older now, and then the program will print the phrase after the else instead.
bob_age = 29 sarah_age = 32 if bob_age > sarah_age: print('Bob is older than Sarah') else: print('Bob is younger than Sarah')
Bob is younger than Sarah
Now, consider the example below with the elif.
bob_age = 32 sarah_age = 32 if bob_age > sarah_age: print('Bob is older than Sarah') elif bob_age == sarah_age: print('Bob and Sarah have the same age') else: print('Bob is younger than Sarah')
Bob and Sarah have the same age
The purpose of the elif is to provide a new condition to be checked before the else is executed.
Once again we changed their ages and now both are 32 years old.
As such, the condition in the elif is met. Since both have the same age the program will print "Bob and Sarah have the same age".
Notice you can have as many elifs as you want, just put them in sequence.
bob_age = 32 sarah_age = 32 if bob_age > sarah_age: print('Bob is older than Sarah') elif bob_age < sarah_age: print('Bob is younger than Sarah') elif bob_age == sarah_age: print('Bob and Sarah have the same age') else: print('This one is never executed')
Bob and Sarah have the same age
In this example, the else is never executed because all the possibilities are covered in the previous conditions and thus could be removed.
Nested conditionals
You might need to check more than one conditional for something to happen.
In this case, you can nest your if statements.
For instance, the second phrase "Bob is the oldest" is printed only if both ifs pass.
bob_age = 32 sarah_age = 28 mary_age = 25 if bob_age > sarah_age: print('Bob is older than Sarah') if bob_age > mary_age: print('Bob is the oldest')
Bob is the oldest
Or, depending on the logic, make it simpler with Boolean Algebra.
This way, your code is smaller, more readable and easier to maintain.
bob_age = 32 sarah_age = 28 mary_age = 25 if bob_age > sarah_age and bob_age > mary_age: print('Bob is the oldest')
Bob is the oldest
Or even:
bob_age = 32 sarah_age = 28 mary_age = 25 if bob_age > sarah_age > mary_age: print('Bob is the oldest')
Bob is the oldest
Ternary Operators
The ternary operator is a one-line if statement.
It's very handy for simple conditions.
This is how it looks:
<expression> if <condition> else <expression>
Consider the following Python code:
a = 25 b = 50 x = 0 y = 1 result = x if a > b else y print(result)
1
Here we use four variables, a and b are for the condition, while x and y represent the expressions.
a and b are the values we are checking against each other to evaluate some condition. In this case, we are checking if a is greater than b.
If the expression holds true, i.e., a is greater than b, then the value of x will be attributed to result which will be equal to 0.
However, if a is less than b, then we have the value of y assigned to result, and result will hold the value 1.
Since a is less than b, 25 < 50, result will have 1 as final value from y.
The easy way to remember how the condition is evaluated is to read it in plain English.
Our example would read: result will be x if a is greater than b otherwise y.
Lists
As promised in the Types section, this section and the next three about Tuples, Sets, and Dictionaries will have more in depth explanations of each of them since they are very important and broadly used structures in Python to organize and deal with data.
A list has its items ordered and you can add the same item as many times as you want.
An important detail is that lists are mutable.
Mutability means you can change a list after its creation by adding items, removing them, or even just changing their values.
Initialization
Empty List
people = []
List with initial values
people = ['Bob', 'Mary']
Adding in a List
To add an item in the end of a list, use append().
people = ['Bob', 'Mary'] people.append('Sarah') print(people)
['Bob', 'Mary', 'Sarah']
To specify the position for the new item, use the insert() method.
people = ['Bob', 'Mary'] people.insert(0, 'Sarah') print(people)
['Sarah', 'Bob', 'Mary']
Updating in a List
Specify the position of the item to update and set the new value
people = ['Bob', 'Mary'] people[1] = 'Sarah' print(people)
['Bob', 'Sarah']
Deleting in a List
Use the remove() method to delete the item given as an argument.
people = ['Bob', 'Mary'] people.remove('Bob') print(people)
['Mary']
To delete everybody, use the clear() method:
people = ['Bob', 'Mary'] people.clear()
Retrieving in a List
Use the index to reference the item.
Remember that the index starts at 0.
So to access the second item use the index 1.
people = ['Bob', 'Mary'] print(people[1])
Mary
Check if a given item already exists in a List
people = ['Bob', 'Mary'] if 'Bob' in people: print('Bob exists!') else: print('There is no Bob!')
Tuples
A tuple is similar to a list: it's ordered, and allows repetition of items.
There is just one difference: a tuple is immutable.
Immutability, if you remember, means you can't change a tuple after its creation. If you try to add an item or update one, for instance, the Python interpreter will show you an error.
Initialization
Empty Tuple
people = ()
Tuple with initial values
people = ('Bob', 'Mary')
Adding in a Tuple
Tuples are immutable. This means that if you try to add an item, you will see an error.
people = ('Bob', 'Mary') people[2] = 'Sarah'
Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: 'tuple' object does not support item assignment
Updating in a Tuple
Updating an item will also return an error.
But there is a trick: you can convert into a list, change the item, and then convert it back to a tuple.
people = ('Bob', 'Mary') people_list = list(people) people_list[1] = 'Sarah' people = tuple(people_list) print(people)
('Bob', 'Sarah')
Deleting in a Tuple
For the same reason you can't add an item, you also can't delete an item, since they are immutable.
Retrieving in a Tuple
Use the index to reference the item.
people = ('Bob', 'Mary') print(people[1])
Mary
Check if a given item already exists in a Tuple
people = ('Bob', 'Mary') if 'Bob' in people: print('Bob exists!') else: print('There is no Bob!')
Sets
Sets don't guarantee the order of items and are not indexed.
A key point when using sets: they don't allow repetition of an item.
Initialization
Empty Set
people = set()
Set with initial values
people = {'Bob', 'Mary'}
Adding in a Set
Use the add() method to add one item.
people.add('Sarah')
Use the update() method to add multiple items at once.
people.update(['Carol', 'Susan'])
Remember, Sets do not allow repetition, so if you add 'Mary' again, nothing changes.
people = {'Bob', 'Mary'} people.add('Mary') print(people)
{'Bob', 'Mary'}
Updating in a Set
Items in a set are not mutable. You have to either add or delete an item.
Deleting in a Set
To remove Bob from the dictionary:
people = {'Bob', 'Mary'} people.remove('Bob') print(people)
{'Mary'}
To delete everybody:
people.clear()
Check if a given item already exists in a set
people = {'Bob', 'Mary'} if 'Bob' in people: print('Bob exists!') else: print('There is no Bob!')
Dictionaries
The dictionary doesn't guarantee the order of the elements and it is mutable.
One important characteristic of dictionaries is that you can set your customized access keys for each element.
Initialization of a Dictionary
Empty Dictionary
people = {}
Dictionary with initial values
people = {'Bob':30, 'Mary':25}
Adding in a Dictionary
If the key doesn't exist yet, it is appended to the dictionary.
people['Sarah']=32
Updating a Dictionary
If the key already exists, the value is just updated.
#Bob's age is 28 now people['Bob']=28
Notice that the code is pretty much the same.
Deleting in a Dictionary
To remove Bob from the dictionary:
people.pop('Bob')
To delete everybody:
people.clear()
Retrieving in a Dictionary
bob_age = people['Bob'] print(bob_age)
30
Check if a given key already exists in a Dictionary
if 'Bob' in people: print('Bob exists!') else: print('There is no Bob!')
while Loops
Loops are used when you need to repeat a block of code a certain number of times or apply the same logic over each item in a collection.
There are two types of loops: for and while.
You will learn about for loops in the next section.
Basic Syntax
The basic syntax of a while loop is as below.
while condition: statement
The loop will continue until the condition is True.
The square of a number is
The example below takes each value of number and calculates its squared value.
number = 1 while number <= 5: print(number, 'squared is', number**2) number = number + 1
1 squared is 1 2 squared is 4 3 squared is 9 4 squared is 16 5 squared is 25
You can use any variable name, but I chose number because it makes sense in the context. A common generic choice would be simply i.
The loop will go on until number (initialized with 1) is less than or equal to 5.
Notice that after the print() command, the variable number is incremented by 1 to take the next value.
If you don't do the incrementation you will have an infinite loop since number will never reach a value greater than 5. This is a very important detail!
else block
When the condition returns False, the else block will be called.
number = 1 while number <= 5: print(number, 'squared is', number**2) number = number + 1 else: print('No numbers left!')
1 squared is 1 2 squared is 4 3 squared is 9 4 squared is 16 5 squared is 25 No numbers left!
Notice the phrase 'No numbers left!' is printed after the loop ends, that is after the condition number <= 5 evaluates to False.
How to break out of a while loop in Python
Simply use the break keyword, and the loop will stop its execution.
number = 1 while number <= 5: print(number, 'squared is', number**2) number = number + 1 if number == 4: break
1 squared is 1 2 squared is 4 3 squared is 9
The loop runs normally, and when number reaches 4 the if statement evaluates to True and the break command is called. This finishes the loop before the squared value of the numbers 4 and 5 are calculated.
How to skip an item in a while loop
The continue will do that for you.
I had to invert the order of the if statement and the print() to show how it works properly.
number = 0 while number < 5: number = number + 1 if number == 4: continue print(number, 'squared is', number**2)
1 squared is 1 2 squared is 4 3 squared is 9 5 squared is 25
The program always checks if 4 is the current value of number. If it is, the square of 4 won't be calculated and the continue will skip to the next iteration when the value of number is 5.
for Loops
for loops are similar to while loops in the sense that they are used to repeat blocks of code.
The most important difference is that you can easily iterate over sequential types.
Basic Syntax
The basic syntax of a for loop is as below.
for item in collection: statement
Loop over a list
To loop over a list or any other collection, just proceed as shown in the example below.
cars = ['BMW', 'Ferrari', 'McLaren'] for car in cars: print(car)
BMW Ferrari McLaren
The list of cars contains three items. The for loop will iterate over the list and store each item in the car variable, and then execute a statement, in this case print(car), to print each car in the console.
range() function
The range function is widely used in for loops because it gives you a simple way to list numbers.
This code will loop through the numbers 0 to 5 and print each of them.
for number in range(5): print(number)
0 1 2 3 4
In contrast, without the range() function, we would do something like this.
numbers = [0, 1, 2, 3, 4] for number in numbers: print(number)
0 1 2 3 4
You can also define a start and stop using range().
Here we are starting in 5 and a stoping in 10. The number you set to stop is not included.
for number in range(5, 10): print(number)
5 6 7 8 9
Finally, it is also possible to set a step.
Here we starting in 10 and incrementing by 2 until 20, since 20 is the stop, it is not included.
for number in range(10, 20, 2): print(number)
10 12 14 16 18
else block
When the items in the list are over, the else block will be called.
cars = ['BMW', 'Ferrari', 'McLaren'] for car in cars: print(car) else: print('No cars left!')
BMW Ferrari McLaren No cars left!
How to break out of a for loop in Python
Simply use the break keyword, and the loop will stop its execution.
cars = ['BMW', 'Ferrari', 'McLaren'] for car in cars: print(car) if car == 'Ferrari': break
BMW Ferrari
The loop will iterate through the list and print each car.
In this case, after the loop reaches 'Ferrari', the break is called and 'McLaren' won't be printed.
How to skip an item in a for loop
In this section, we'll learn how continue can do this for you.
I had to invert the order of the if statement and the continue to show how it works properly.
Notice that I always check if 'Ferrari' is the current item. If it is, 'Ferrari' won't be printed, and the continue will skip to the next item 'McLaren'.
cars = ['BMW', 'Ferrari', 'McLaren'] for car in cars: if car == 'Ferrari': continue print(car)
BMW McLaren
Loop over a Loop: Nested Loops
Sometimes you have more complex collections, like a list of lists.
To iterate over these lists, you need nested for loops.
In this case, I have three lists: one of BMW models, another on Ferrari models, and finally one with McLaren models.
The first loop iterates over each brand's list, and the second will iterate over the models of each brand.
car_models = [ ['BMW I8', 'BMW X3', 'BMW X1'], ['Ferrari 812', 'Ferrari F8', 'Ferrari GTC4'], ['McLaren 570S', 'McLaren 570GT', 'McLaren 720S'] ] for brand in car_models: for model in brand: print(model)
BMW I8 BMW X3 BMW X1 Ferrari 812 Ferrari F8 Ferrari GTC4 McLaren 570S McLaren 570GT McLaren 720S
Loop over other Data Structures
The same logic that applies for loops over a list can be extended to the other data structures: tuple, set, and dictionary.
I will briefly demonstrate how to make a basic loop over each one of them.
Loop over a Tuple
people = ('Bob', 'Mary') for person in people: print(person)
Bob Mary
Loop over a Set
people = {'Bob', 'Mary'} for person in people: print(person)
Bob Mary
Loop over a Dictionary
To print the keys:
people = {'Bob':30, 'Mary':25} for person in people: print(person)
Bob Mary
To print the values:
people = {'Bob':30, 'Mary':25} for person in people: print(people[person])
30 25
Functions
As the code grows the complexity also grows. And functions help organize the code.
Functions are a handy way to create blocks of code that you can reuse.
Definition and Calling
In Python use the def keyword to define a function.
Give it a name and use parentheses to inform 0 or more arguments.
In the line after the declaration starts, remember to indent the block of code.
Here is an example of a function called print_first_function() that only prints a phrase 'My first function!'.
To call the function just use its name as defined.
def print_first_function(): print('My first function!') print_first_function()
My first function!
return a value
Use the return keyword to return a value from the function.
In this example the function second_function() returns the string 'My second function!'.
Notice that print() is a built-in function and our function is called from inside it.
The string returned by second_function() is passed as an argument to the print() function.
def second_function(): return 'My second function!' print(second_function())
My second function!
return multiple values
Functions can also return multiple values at once.
return_numbers() returns two values simultaneously.
def return_numbers(): return 10, 2 print(return_numbers())
(10, 2)
Arguments
You can define parameters between the parentheses.
When calling a function with parameters you have to pass arguments according to the parameters defined.
The past examples had no parameters, so there was no need for arguments. The parentheses remained empty when the functions were called.
One Argument
To specify one parameter, just define it inside the parentheses.
In this example, the function my_number expects one number as argument defined by the parameter num.
The value of the argument is then accessible inside the function to be used.
def my_number(num): return 'My number is: ' + str(num) print(my_number(10))
My number is: 10
Two or more Arguments
To define more parameters, just use a comma to separate them.
Here we have a function that adds two numbers called add. It expects two arguments defined by first_num and second_num.
The arguments are added by the + operator and the result is then returned by the return.
def add(first_num, second_num): return first_num + second_num print(add(10,2))
12
This example is very similar to the last one. The only difference is that we have 3 parameters instead of 2.
def add(first_num, second_num, third_num): return first_num + second_num + third_num print(add(10,2,3))
15
This logic of defining parameters and passing arguments is the same for any number of parameters.
It is important to point out that the arguments have to be passed in the same order that the parameters are defined.
Default value.
You can set a default value for a parameter if no argument is given using the = operator and a value of choice.
In this function, if no argument is given, the number 30 is assumed as the expected value by default.
def my_number(my_number = 30): return 'My number is: ' + str(my_number) print(my_number(10)) print(my_number())
My number is: 10 My number is: 30
Keyword or Named Arguments
When calling a function, the order of the arguments have to match the order of the parameters.
The alternative is if you use keyword or named arguments.
Set the arguments to their respective parameters directly using the name of the parameters and the = operators.
This example flips the arguments, but the function works as expected because I tell it which value goes to which parameter by name.
def my_numbers(first_number, second_number): return 'The numbers are: ' + str(first_number) + ' and ' + str(second_number) print(my_numbers(second_number=30, first_number=10))
The numbers are: 10 and 30
Any number of arguments: *args
If you don't want to specify the number of parameters, just use the * before the parameter name. Then the function will take as many arguments as necessary.
The parameter name could be anything like *numbers, but there is a convention in Python to use *args for this definition of a variable number of arguments.
def my_numbers(*args): for arg in args: print(number) my_numbers(10,2,3)
10 2 3
Any number of Keyword/Named arguments: **kwargs
Similar to *args, we can use **kwargs to pass as many keyword arguments as we want, as long as we use **.
Again, the name could be anything like **numbers, but **kwargs is a convention.
def my_numbers(**kwargs): for key, value in kwargs.items(): print(key) print(value) my_numbers(first_number=30, second_number=10)
first_number 30 second_number 10
Other types as arguments
The past examples used mainly numbers, but you can pass any type as argument and they will be treated as such inside the function.
This example takes strings as arguments.
def my_sport(sport): print('I like ' + sport) my_sport('football') my_sport('swimming')
I like football I like swimming
This function takes a list as argument.
def my_numbers(numbers): for number in numbers: print(number) my_numbers([30, 10, 64, 92, 105])
30 10 64 92 105
Scope
The place where a variable is created defines its availability to be accessed and manipulated by the rest of the code. This is known as scope.
There are two types of scope: local and global.
Global Scope
A global scope allows you to use the variable anywhere in your program.
If your variable is outside a function, it has global scope by default.
name = 'Bob' def print_name(): print('My name is ' + name) print_name()
My name is Bob
Notice that the function could use the variable name and print My name is Bob.
Local Scope
When you declare a variable inside a function, it only exists inside that function and can't be accessed from the outside.
def print_name(): name = "Bob" print('My name is ' + name) print_name()
My name is Bob
The variable name was declared inside the function, so the output is the same as before.
But this will throw an error:
def print_name(): name = 'Bob' print('My name is ' + name) print(name)
The output of the code above is:
Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'name' is not defined
I tried to print the variable name from outside the function, but the scope of the variable was local and could not be found in a global scope.
Mixing Scopes
If you use the same name for variables inside and outside a function, the function will use the one inside its scope.
So when you call print_name(), the name='Bob' is used to print the phrase.
On the other hand, when calling print() outside the function scope, name="Sarah" is used because of its global scope.
name = "Sarah" def print_name(): name = 'Bob' print('My name is ' + name) print_name() print(name)
The output of the code above is:
My name is Bob Sarah
List Comprehensions
Sometimes we want to perform some very simple operations over the items of a list.
List comprehensions give us a succinct way to work on lists as an alternative to other methods of iteration, such as for loops.
Basic syntax
To use a list comprehension to replace a regular for loop, we can make:
[expression for item in list]
Which is the same as doing:
for item in list: expression
If we want some conditional to apply the expression, we have:
[expression for item in list if conditional ]
Which is the same as doing:
for item in list: if conditional: expression
Example 1: calculating the cube of a number
Regular way
numbers = [1, 2, 3, 4, 5] new_list = [] for n in numbers: new_list.append(n**3) print(new_list)
[1, 8, 27, 64, 125]
Using list comprehensions
numbers = [1, 2, 3, 4, 5] new_list = [] new_list = [n**3 for n in numbers] print(new_list)
[1, 8, 27, 64, 125]
Example 2: calculating the cube of a number only if it is greater than 3
Using the conditional, we can filter only the values we want the expression to be applied to.
Regular way
numbers = [1, 2, 3, 4, 5] new_list = [] for n in numbers: if(n > 3): new_list.append(n**3) print(new_list)
[64, 125]
Using list comprehensions
numbers = [1, 2, 3, 4, 5] new_list = [] new_list = [n**3 for n in numbers if n > 3] print(new_list)
[64, 125]
Example 3: calling functions with list comprehensions
We can also call functions using the list comprehension syntax:
numbers = [1, 2, 3, 4, 5] new_list = [] def cube(number): return number**3 new_list = [cube(n) for n in numbers if n > 3] print(new_list)
[64, 125]
Lambda Functions
A Python lambda function can only have one expression and can't have multiple lines.
It is supposed to make it easier to create some small logic in one line instead of a whole function as is usually done.
Lambda functions are also anonymous, which means there is no need to name them.
Basic Syntax
The basic syntax is very simple: just use the lambda keyword, define the parameters needed, and use ":" to separate the parameters from the expression.
The general forms is:
lambda arguments : expression
One parameter example
Look at this example using only one parameter
cubic = lambda number : number**3 print(cubic(2))
8
Multiple parameter example
If you want, you can also have multiple parameters.
exponential = lambda multiplier, number, exponent : multiplier * number**exponent print(exponential(2, 2, 3))
16
Calling the Lambda Function directly
You don't need to use a variable as we did before. Instead you can make use of parenthesis around the lambda function and another pair of parenthesis around the arguments.
The declaration of the function and the execution will happen in the same line.
(lambda multiplier, number, exponent : multiplier * number**exponent)(2, 2, 3)
16
Examples using lambda functions with other built-in functions
Map
The Map function applies the expression to each item in a list.
Let's calculate the cubic of each number in the list.
numbers = [2, 5, 10] cubics = list(map(lambda number : number**3, numbers)) print(cubics)
[8, 125, 1000]
Filter
The Filter function will filter the list based on the expression.
Let's filter to have only the numbers greater than 5.
numbers = [2, 5, 10] filtered_list = list(filter(lambda number : number > 5, numbers)) print(filtered_list)
[10]
Modules
After some time your code starts to get more complex with lots of functions and variables.
To make it easier to organize the code we use Modules.
A well-designed Module also has the advantage of being reusable, so you write code once and reuse it everywhere.
You can write a module with all the mathematical operations and other people can use it.
And, if you need, you can use someone else's modules to simplify your code, speeding up your project.
In other programming languages, these are also referred to as libraries.
Using a Module
To use a module we use the import keyword.
As the name implies we have to tell our program what module to import.
After that, we can use any function available in that module.
Let's see an example using the math module.
First, let's see how to have access to a constant, Euler's number.
import math math.e
2.718281828459045
In this second example, we are going to use a function that calculates the square root of a number.
It is also possible to use the as keyword to create an alias.
import math as m m.sqrt(121) m.sqrt(729)
11 27
Finally, using the from keyword, we can specify exactly what to import instead of the whole module and use the function directly without the module's name.
This example uses the floor() function that returns the largest integer less than or equal to a given number.
from math import floor floor(9.8923)
9
Creating a Module
Now that we know how to use modules, let's see how to create one.
It is going to be a module with the basic math operations add, subtract, multiply, divide and it is gonna be called basic_operations.
Create the basic_operations.py file with the four functions.
def add(first_num, second_num): return first_num + second_num def subtract(first_num, second_num): return first_num - second_num def multiply(first_num, second_num): return first_num * second_num def divide(first_num, second_num): return first_num / second_num
Then, just import the basic_operations module and use the functions.
import basic_operations basic_operations.add(10,2) basic_operations.subtract(10,2) basic_operations.multiply(10,2) basic_operations.divide(10,2)
12 8 20 5.0
if __name__ == '__main__'
You are in the process of building a module with the basic math operations add, subtract, multiply, and divide called basic_operations saved in the basic_operations.py file.
To guarantee everything is fine, you can run some tests.
def add(first_num, second_num): return first_num + second_num def subtract(first_num, second_num): return first_num - second_num def multiply(first_num, second_num): return first_num * second_num def divide(first_num, second_num): return first_num / second_num print(add(10, 2)) print(subtract(10,2)) print(multiply(10,2)) print(divide(10,2))
After running the code:
renan@pro-home:~$ python3 basic_operations.py
The output is:
12 8 20 5.0
The output for those tests are what we expected.
Our code is right and ready to share.
Let's import the new module run it in the Python console.
Python 3.6.9 (default, Nov 7 2019, 10:44:02) [GCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import basic_operations 12 8 20 5.0 >>>
When the module is imported our tests are displayed on the screen even though we didn't do anything besides importing basic_operations.
To fix that we use if __name__ == '__main__' in the basic_operations.py file like this:
def add(first_num, second_num): return first_num + second_num def subtract(first_num, second_num): return first_num - second_num def multiply(first_num, second_num): return first_num * second_num def divide(first_num, second_num): return first_num / second_num if __name__ == '__main__': print(add(10, 2)) print(subtract(10,2)) print(multiply(10,2)) print(divide(10,2))
Running the code directly on the terminal will continue to display the tests. But when you import it like a module, the tests won't show and you can use the functions the way you intended.
Python 3.6.9 (default, Nov 7 2019, 10:44:02) [GCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import basic_operations >>> basic_operations.multiply(10,2) 20 >>>
Now that you know how to use the if __name__ == '__main__', let's understand how it works.
The condition tells when the interpreter is treating the code as a module or as a program itself being executed directly.
Python has this native variable called __name__.
This variable represents the name of the module which is the name of the .py file.
Create a file my_program.py with the following and execute it.
print(__name__)
The output will be:
__main__
This tells us that when a program is executed directly, the variable __name__ is defined as __main__.
But when it is imported as a module, the value of __name__ is the name of the module.
Python 3.6.9 (default, Nov 7 2019, 10:44:02) [GCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import my_program my_program >>>
This is how the Python interpreter differentiates the behavior of an imported module and a program executed directly on the terminal.
Files
Creating, deleting, reading, and many other functions applied to files are an integral part of many programs.
As such, it is very important to know how to organize and deal with files directly from your code.
Let's see how to handle files in Python.
File create
First things first, create!
We are going to use the open() function.
This function opens a file and returns its corresponding object.
The first argument is the name of the file we are handling, the second refers to the operation we are using.
The code below creates the file "people.txt", the x argument is used when we just want to create the file. If a file with the same name already exists, it will throw an exception.
people_file = open("people.txt", "x")
You can also use the w mode to create a file. Unlike the x mode, it will not throw an exception since this mode indicates the writing mode. We are opening a file to write data into it and, if the file doesn't exist, it is created.
people_file = open("people.txt", "w")
The last one is the a mode which stands for append. As the name implies, you can append more data to the file, while the w mode simply overwrites any existing data.
When appending, if the file doesn't exist, it also creates it.
people_file = open("people.txt", "a")
File write
To write data into a file, you simply open a file with the w mode.
Then, to add data, you use the object return by the open() function. In this case, the object is called people_file. Then you call the write() function passing the data as argument.
people_file = open("people.txt", "w") people_file.write("Bob\n") people_file.write("Mary\n") people_file.write("Sarah\n") people_file.close()
We use \n at the end to break the line, otherwise the content in the file will stay in the same line as "BobMarySarah".
One more detail is to close() the file. This is not only a good practice, but also ensures that your changes were applied to the file.
Remember that when using w mode, the data that already existed in the file will be overwritten by the new data. To add new data without losing what was already there, we have to use the append mode.
File append
The a mode appends new data to the file, keeping the existing one.
In this example, after the first writing with w mode, we are using the a mode to append. The result is that each name will appear twice in the file "people.txt".
#first write people_file = open("people.txt", "w") people_file.write("Bob\n") people_file.write("Mary\n") people_file.write("Sarah\n") people_file.close() #appending more data #keeping the existing data people_file = open("people.txt", "a") people_file.write("Bob\n") people_file.write("Mary\n") people_file.write("Sarah\n") people_file.close()
File read
Reading the file is also very straightforward: just use the r mode like so.
If you read the "people.txt" file created in the last example, you should see 6 names in your output.
people_file = open("people.txt", "r") print(people_file.read())
Bob Mary Sarah Bob Mary Sarah
The read() function reads the whole file at once. If you use the readline() function, you can read the file line by line.
people_file = open("people.txt", "r") print(people_file.readline()) print(people_file.readline()) print(people_file.readline())
Bob Mary Sarah
You can also loop to read the lines like the example below.
people_file = open("people.txt", "r") for person in people_file: print(person)
Bob Mary Sarah Bob Mary Sarah
Delete a File
To delete a file, you also need the os module.
Use the remove() method.
import os os.remove('my_file.txt')
Check if a File Exists
Use the os.path.exists() method to check the existence of a file.
import os if os.path.exists('my_file.txt'): os.remove('my_file.txt') else: print('There is no such file!')
Copy a File
For this one, I like to use the copyfile() method from the shutil module.
from shutil import copyfile copyfile('my_file.txt','another_file.txt')
There are a few options to copy a file, but copyfile() is the fastest one.
Rename and Move a File
If you need to move or rename a file you can use the move() method from the shutil module.
from shutil import move move('my_file.txt','another_file.txt')
Classes and Objects
Classes and Objects are the fundamental concepts of Object-Oriented Programming.
In Python, everything is an object!
A variable (object) is just an instance of its type (class).
That's why when you check the type of a variable you can see the class keyword right next to its type (class).
This code snippet shows that my_city is an object and it is an instance of the class str.
my_city = "New York" print(type(my_city))
<class 'str'>
Differentiate Class x Object
The class gives you a standard way to create objects. A class is like a base project.
Say you are an engineer working for Boeing.
Your new mission is to build the new product for the company, a new model called 747-Space. This aircraft flies higher altitudes than other commercial models.
Boeing needs to build dozens of those to sell to airlines all over the world, and the aircrafts have to be all the same.
To guarantee that the aircrafts (objects) follow the same standards, you need to have a project (class) that can be replicable.
The class is a project, a blueprint for an object.
This way you make the project once, and reuse it many times.
In our code example before, consider that every string has the same behavior and the same attributes. So it only makes sense for strings to have a class str to define them.
Attributes and Methods
Objects have some behavior which is is given by attributes and methods.
In simple terms, in the context of an object, attributes are variables and methods are functions attached to an object.
For example, a string has many built-in methods that we can use.
They work like functions, you just need to separate them from the objects using a ..
In this code snippet, I'm calling the replace() method from the string variable my_city which is an object, and an instance of the class str.
The replace() method replaces a part of the string for another and returns a new string with the change. The original string remains the same.
Let's replace 'New' for 'Old' in 'New York'.
my_city = 'New York' print(my_city.replace('New', 'Old')) print(my_city)
Old York New York
Creating a Class
We have used many objects (instances of classes) like strings, integers, lists, and dictionaries. All of them are instances of predefined classes in Python.
To create our own classes we use the class keyword.
By convention, the name of the class matches the name of the .py file and the module by consequence. It is also a good practice to organize the code.
Create a file vehicle.py with the following class Vehicle.
class Vehicle: def __init__(self, year, model, plate_number, current_speed = 0): self.year = year self.model = model self.plate_number = plate_number self.current_speed = current_speed def move(self): self.current_speed += 1 def accelerate(self, value): self.current_speed += value def stop(self): self.current_speed = 0 def vehicle_details(self): return self.model + ', ' + str(self.year) + ', ' + self.plate_number
Let's break down the class to explain it in parts.
The class keyword is used to specify the name of the class Vehicle.
The __init__ function is a built-in function that all classes have. It is called when an object is created and is often used to initialize the attributes, assigning values to them, similar to what is done to variables.
The first parameter self in the __init__ function is a reference to the object (instance) itself. We call it self by convention and it has to be the first parameter in every instance method, as you can see in the other method definitions def move(self), def accelerate(self, value), def stop(self), and def vehicle_details(self).
Vehicle has 5 attributes (including self): year, model, plate_number, and current_speed.
Inside the __init__, each one of them is initialized with the parameters given when the object is instantiated.
Notice that current_speed is initialized with 0 by default, meaning that if no value is given, current_speed will be equal to 0 when the object is first instantiated.
Finally, we have three methods to manipulate our vehicle regarding its speed: def move(self), def accelerate(self, value), and def stop(self).
And one method to give back information about the vehicle: def vehicle_details(self).
The implementation inside the methods work the same way as in functions. You can also have a return to give you back some value at the end of the method as demonstrated by def vehicle_details(self).
Using the Class
To use the class in your terminal, import the Vehicle class from the vehicle module.
Create an instance called my_car, initializing year with 2009, model with 'F8', plate_number with 'ABC1234', and current_speed with 100.
The self parameter is not taken into consideration when calling methods. The Python interpreter infers its value as being the current object/instance automatically, so we just have to pass the other arguments when instantiating and calling methods.
Now use the methods to move() the car which increases its current_speed by 1, accelerate(10) which increases its current_speed by the value given in the argument, and stop() which sets the current_speed to 0.
Remember to print the value of current_speed at every command to see the changes.
To finish the test, call vehicle_details() to print the information about our vehicle.
>>> from vehicle import Vehicle >>> >>> my_car = Vehicle(2009, 'F8', 'ABC1234', 100) >>> print(my_car.current_speed) 100 >>> my_car.move() >>> print(my_car.current_speed) 101 >>> my_car.accelerate(10) >>> print(my_car.current_speed) 111 >>> my_car.stop() >>> print(my_car.current_speed) 0 >>> print(my_car.vehicle_details()) F8, 2009, ABC1234
If we don't set the initial value for current_speed, it will be zero by default as stated before and demonstrated in the next example.
>>> from vehicle import Vehicle >>> >>> my_car = Vehicle(2009, 'F8', 'ABC1234') >>> print(my_car.current_speed) 0 >>> my_car.move() >>> print(my_car.current_speed) 1 >>> my_car.accelerate(10) >>> print(my_car.current_speed) 11 >>> my_car.stop() >>> print(my_car.current_speed) 0 >>> print(my_car.vehicle_details()) F8, 2009, ABC1234
Inheritance
Let's define a generic Vehicle class and save it inside the vehicle.py file.
class Vehicle: def __init__(self, year, model, plate_number, current_speed): self.year = year self.model = model self.plate_number = plate_number self.current_speed = current_speed def move(self): self.current_speed += 1 def accelerate(self, value): self.current_speed += value def stop(self): self.current_speed = 0 def vehicle_details(self): return self.model + ', ' + str(self.year) + ', ' + self.plate_number
A vehicle has attributes year, model, plate_number, and current_speed.
The definition of vehicle in the Vehicle is very generic and might not be suitable for trucks, for instance, because it should include a cargo attribute.
On the other hand, a cargo attribute does not make much sense for small vehicles like motorcycles.
To solve this we can use inheritance.
When a class (child) inherits another class (parent), all the attributes and methods from the parent class are inherited by the child class.
Parent and Child
In our case, we want a new Truck class to inherit everything from the Vehicle class. Then we want it to add its own specific attribute current_cargo to control the addition and removal of cargo from the truck.
The Truck class is called a child class that inherits from its parent class Vehicle.
A parent class is also called a superclass while a child class is also known as a subclass.
Create the class Truck and save it inside the truck.py file.
from vehicle import Vehicle class Truck(Vehicle): def __init__(self, year, model, plate_number, current_speed, current_cargo): super().__init__(year, model, plate_number, current_speed) self.current_cargo = current_cargo def add_cargo(self, cargo): self.current_cargo += cargo def remove_cargo(self, cargo): self.current_cargo -= cargo
Let's break down the class to explain it in parts.
The class Vehicle inside the parentheses when defining the class Truck indicates that the parent Vehicle is being inherited by its child Truck.
The __init__ method has self as its first parameter, as usual.
The parameters year, model, plate_number, and current_speed are there to match the ones in the Vehicle class.
We added a new parameter current_cargo suited for the Truck class.
In the first line of the __init__ method of the Truck class we have to call the __init__ method of the Vehicle class.
To do that we use super() to make a reference to the supperclass Vehicle, so when super().__init__(year, model, plate_number, current_speed) is called we avoid repetition of our code.
After that, we can assign the value of current_cargo normally.
Finally, we have two methods to deal with the current_cargo: def add_cargo(self, cargo):, and def remove_cargo(self, cargo):.
Remember that Truck inherits attributes and methods from Vehicle, so we also have an implicit access to the methods that manipulate the speed: def move(self), def accelerate(self, value), and def stop(self).
Using the Truck class
To use the class in your terminal, import the Truck class from the truck module.
Create an instance called my_truck, initializing year with 2015, model with 'V8', plate_number with 'XYZ1234', current_speed with 0, and current_cargo with 0.
Use add_cargo(10) to increase current_cargo by 10, remove_cargo(4), to decrease current_cargo by 4.
Remember to print the value of current_cargo at every command to see the changes.
By inheritance, we can use the methods from the Vehicle class to move() the truck which increases its current_speed by 1, accelerate(10) which increases its current_speed by the value given in the argument, and stop() which sets the current_speed to 0.
Remember to print the value of current_speed at every interaction to see the changes.
To finish the test, call vehicle_details() inherited from the Vehicle class to print the information about our truck.
>>> from truck import Truck >>> >>> my_truck = Truck(2015, 'V8', 'XYZ1234', 0, 0) >>> print(my_truck.current_cargo) 0 >>> my_truck.add_cargo(10) >>> print(my_truck.current_cargo) 10 >>> my_truck.remove_cargo(4) >>> print(my_truck.current_cargo) 6 >>> print(my_truck.current_speed) 0 >>> my_truck.accelerate(10) >>> print(my_truck.current_speed) 10 >>> my_truck.stop() >>> print(my_truck.current_speed) 0 >>> print(my_truck.vehicle_details()) V8, 2015, XYZ1234
Exceptions
Errors are a part of every programmer's life, and knowing how to deal with them is a skill on its own.
The way Python deals with errors is called 'Exception Handling'.
If some piece of code runs into an error, the Python interpreter will raise an exception.
Types of Exceptions
Let's try to raise some exceptions on purpose and see the errors they produce.
First, try to add a string and an integer
'I am a string' + 32
Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: must be str, not int
Now, try to access an index that doesn't exist in a list.
A common mistake is to forget that sequences are 0-indexed, meaning the first item has index 0, not 1.
In this example, the list car_brands ends at index 2.
car_brands = ['ford', 'ferrari', 'bmw'] print(car_brands[3])
Traceback (most recent call last): File "<stdin>", line 1, in <module> IndexError: list index out of range
If we try to print a variable that doesn't exist:
print(my_variable)
Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'my_variable' is not defined
Math doesn't allow division by zero, so trying to do so will raise an error, as expected.
32/0
Traceback (most recent call last): File "<stdin>", line 1, in <module> ZeroDivisionError: division by zero
This was just a sample of the kinds of exceptions you might see during your daily routine and what can cause each of them.
Exception Handling
Now we know how to cause errors that will crash our code and show us some message saying something is wrong.
To handle these exceptions just make use of the try/except statement.
try: 32/0 except: print('Dividing by zero!')
Dividing by zero!
The example above shows the use of the try statement.
Put the block of code that may cause an exception inside the try scope. If everything runs alright, the except block is not invoked. But if an exception is raised, the block of code inside the except is executed.
This way the program doesn't crash and if you have some code after the exception, it will keep running if you want it to.
Specific Exception Handling
In the last example the except block was generic, meaning it was catching anything.
Good practice it to specify the type of exception we are trying to catch, which helps a lot when debugging the code later.
If you know a block of code can throw an IndexError, specify it in the except:
try: car_brands = ['ford', 'ferrari', 'bmw'] print(car_brands[3]) except IndexError: print('There is no such index!')
There is no such index!
You can use a tuple to specify as many exception types as you want in a single except:
try: print('My code!') except(IndexError, ZeroDivisionError, TypeError): print('My Excepetion!')
else
It is possible to add an else command at the end of the try/except. It runs only if there are no exceptions.
my_variable = 'My variable' try: print(my_variable) except NameError: print('NameError caught!') else: print('No NameError')
My variable No NameError
Raising Exceptions
The raise command allows you to manually raise an exception.
This is particularly useful if you want to catch an exception and do something with it -- like logging the error in some personalized way like redirecting it to a log aggregator, or ending the execution of the code since the error should not allow the progress of the program.
try: raise IndexError('This index is not allowed') except: print('Doing something with the exception!') raise
Doing something with the exception! Traceback (most recent call last): File "<stdin>", line 2, in <module> IndexError: This index is not allowed
finally
The finally block is executed independently of exceptions being raised or not.
They are usually there to allow the program to clean up resources like files, memory, network connections, etc.
try: print(my_variable) except NameError: print('Except block') finally: print('Finally block')
Except block Finally block
Conclusion
That's it!
Congratulations on reaching the end.
I want to thank you for reading this article.
If you want to learn more, checkout my blog renanmf.com.
Remember to download a PDF version of this Python Guide for Beginners.
You can also find me on Twitter: @renanmouraf.
via freeCodeCamp.org https://ift.tt/2wM85mu
0 notes
Text
In Dreams 13
Chapter 1...Chapter 2…Chapter 3…Chapter 4…Chapter 5 …Chapter 6…Chapter 7…Chapter 8 …Chapter 9...Chapter10… Chapter 11...Chapter 12
The afternoon sun is warm on his face and the wet sand under his bare feet yields in a way that is very satisfying. She’s ahead of him, maybe by twenty feet, palming the top of a floppy straw hat so the ocean breeze doesn’t carry it away. He feels like he probably already chased it down once or twice. She’s got a thin piece of blue fabric tied around her waist in a makeshift skirt and a white bathing suit on. Her pale Irish skin has turned warm and new freckles dapple her shoulders and back.
A little warm hand squeezes his and jerks his arm. He looks down to find a little girl, no more than four-years-old, with shoulder length strawberry blonde locks, wispy and curly at the ends, like baby hair. She is hopping on one foot, and with great determination, her mouth set in a concentrated line. He loves her so much it makes his chest hurt.
“Whatcha doin’, Munchkin?” he asks.
“Making it look like I only have one foot,” she says, making another hop.
He looks back at their prints in the sand and sees that yes, it looks like she only has one foot.
“Or,” he says as he scoops her up and drops her onto his shoulders, her little legs bracketing his neck, “we can make it look like you spontaneously levitated!”
She shrieks with delight and pats his cheeks.
“Mama! “ she shouts with a giggle. “I lebitated!”
Scully turns around. Scully, not Dana, he reminds himself. She laughs, a delighted, surprised laugh and watches them as they catch up to her. He’s suddenly much faster without Gracie’s one-footed progression.
Gracie? He wonders to himself. Grace was my grandmother’s name.
He opens his eyes and is ready to squint against the sunshine. But it is dark, and instead, he is squinting to make out her sleeping form across from him. She’s on her side, back to him and snoring softly. His face still feels warm though. Maybe for other reasons.
When she said “stay awhile,” he thought maybe until she fell asleep. Or until the bleeding had stopped. Or perhaps until the next morning. But weeks later, he’s still climbing into bed with her every night, thankfully free of the hindrance of his casts. She was starting to get irritated with them snagging her something-thousand thread count sheets anyway.
Whether it’s because she’s come into the second trimester or the latest combination of meds, she seems to be feeling well enough to get irritated about things like that. That’s not to say every meal sticks. It doesn’t. But she’s able to keep down more than she has in the past several weeks and has even started gaining back a little of the weight she’s lost.
He reaches out and lays his hand in the curve where her waist meets her hip. She stirs, just a little, and settles in one breath.
They’ve abstained from anything besides sleeping, not because of any doctor’s restrictions, but because he doesn’t even know where to begin. He doesn’t really remember a time when they were together in that way, not clearly. But the fact that she can no longer button her trousers is evidence that they clearly were, at least once anyway.
But he is remembering, more and more everyday and it has nothing to do with the “gift” from Diana. It’s coming back to him in his sleep. He thinks so anyway, he seems to see things a little more clearly at the beginning of each day. But he often finds himself checking with her to define what was real and what was a dream. Because some of it doesn’t seem possible, even to him. Since neither of them has been cleared to return to work, they have more than enough time to talk.
“Your hair was longer when we met,” he muses as he watches her set a mug of tea on the table. She is wrapped in her white terrycloth robe, one bare foot tucked under her thigh. She smiles and nods.
“It was,” she affirms. “I cut it right after our first case together.”
“I saw you in your underwear on that case...real or dream?” he asks playfully.
She chuckles and blows on her mug. A quick blush dances across her cheeks and she nods, eyes closed, chin tucked to her chest.
“Real,” she says, her embarrassment evident.
“I didn’t think any less of you,” he says. He wants to reach out and tip her chin up so she’ll look at him. It’s one of those moments that they’ve been dancing around rather inelegantly lately. Whether because of his bad timing or her circumspect nature, the connection, or rather re-connection keeps getting missed. This time he’ll blame her ringing phone.
“Scully,” she answers with an air of authority he hasn’t heard from her in a while. She stands and begins to wander around the kitchen. A long pause, a knitted brow, a nibbled lower lip. “Uh-huh...interesting,” she says. “Okay, thanks.”
“What’s interesting?” he asks.
“The lab at Quantico finally finished the analysis of those pills,” she says, leaning on the edge of the counter.
“And?”
“Well, it’s similar to melatonin, but it also seems to have some additional synthetic chemicals that they haven’t been able to nail down.”
“They’ve had almost three weeks. Is it that hard?”
“Well, there’s always a backlog and it’s not like this is attached to a case. I called in a favor with Steve.”
“Steve?” he asks, a playful little accusation in his tone.
“Yeah,” she says. She’s clearly retreated into her own head and is chewing on whatever she’s just been told.
“Melatonin is like an over the counter sleep aid, right?”
“Yeah,” she confirms.
“It keeps coming back to sleeping pills, doesn’t it?” he asks as he crosses his arms.
“I wonder if the idea is to somehow ramp up your REM sleep.” She’s not even talking to him really. Just thinking out loud.
“To what end?”
She seems to come back to having the conversation with him rather than inside her own head.
“Who knows, Mulder?”
“Someone knows.”
OFFICE OF THE LONE GUNMEN
“Office” is a generous word for their location. It’s more like a den or a nest, feathered with wiring and surreptitiously gathered bits of technology. It is all haphazardly compiled, unidentifiable things scattered on industrial metal shelves. The only orderly portion is the corner the that houses the printing press and TLG archives. It is clearly Byers’ dominion.
There is a parcel of bedrooms at the back of the space where each of them have carved out their own oasis. It’s like a fraternity where no one ever graduates, Mulder muses.
“Who gave you this?” Byers asks as he looks at the computer screen with wonder. The blue light reflects off of Frohike’s glasses as he leans in to get a better look.
“Diana,” he says flatly.
“Mata Hari,” Frohike grimaces.
“She said it would help me get my memory back,” he says as he crosses his arms and leans against one of the long tables.
Byers jerks away from the screen incredulously and the motley crew pass each other wary glances.
“What is it, fellas?” Mulder asks.
“Are you familiar with Project Mnemosyne?” Byers asks.
“No, but I’m guessing I’m about to be,” he says with trepidation.
“There was a lot of work put into an effort to create perfect human memory storage by the DOD starting just after the Bay of Pigs,” Langly begins to explain.
“For what?”
“Next level spying, eliminating the need for photographs, cyphers,” Byers says.
“They were trying to create human cameras and find a way to download the data,” Frohike adds.
“But this started in the sixties, so the drugs were more advanced than the computers,” Byers continues.
“Some freaky shit came outta MK Ultra,” Langly says, continuing their round robin explanation.
“And it got rolled right into Mnemosyne,” Frohike punctuates by pointing at the screen.
“You’re saying this stuff is the real deal?” he says, eyes wide.
“It sure looks like it,” Byers answers.
“I could really get back my memories?” he asks the trio.
“Not just your recent memories, Mulder, everything,” Langly says, a warning in his voice.
“Including the things you’d like to forget,” Frohike adds. “Buried trauma, every mistake, every nightmare, all at the front of your mind and all at once.”
“Everything we got out of the declassified portions of the project files indicates that test subjects had an incredibly high mortality rate,” Byers says.
“Due to what?” Mulder asks.
“Suicide,” Frohike says grimly. “Diana is setting you up.”
“There are some things you don’t want to remember,” Byers punctuates.
GEORGETOWN
WASHINGTON, DC
If she is forced to feign another moment’s interest in her mother’s prattling, she may pass out. What started as an effort to purchase a few items of maternity clothing, became a day lost in the labyrinth of the local mall. Now, back at home, Maggie Scully is measuring the windows in her spare room for the curtains she plans on sewing.
“With the light in here, it may be better to go with a darker color,” she says as she teeters on a chair, arms stretched from end to end at the top of the window.
She leans on the door jamb and stifles a yawn with the back of her hand.
“Don’t you think, Dana?” she asks.
Of course, she hasn’t been paying attention, all she can think about is crawling into bed and waiting for Mulder to get back.
“Uh, yeah,” she fakes.
Maggie looks down from her perch and seems to deflate a little.
“Oh honey,” she sighs as she climbs down. “You look just exhausted.”
“I’m okay,” she says, keeping her voice light. She’s always been a terrible liar.
“I guess I just got carried away,” she says as she wraps her in a hug. “It seems like things have just now settled down a bit for you.”
“It’s okay, mom,” she assures her.
“Hello?” a voice calls as the front door opens.
Maggie kisses her cheek and smiles knowingly. “I’ll head home and let you get some rest,” she says, squeezing her shoulders.
Scully nods and closes her eyes a moment. God, it feels good. The burn of exhaustion blazes against her eyelids. It’s such a satisfying burn though. She could drift to sleep right there. She used to be able to run the obstacle course in the morning and go on to work a full day, maybe even burn a little midnight oil on her latest journal article or some such. Now, a half day shopping has her ready to call it a night at 4:30 in the afternoon.
The quiet exchange between Mulder and her mother registers and she drags her eyes back open.
“She needs to go lay down, Fox,” Maggie reports.
“It won’t be hard to convince her,” he says.
The front door closes with a snick and his hand are on her shoulders, kneading gently at her sore muscles.
“Wow,” he says.
“Hm?”
“You two cleaned a couple places out, huh?”
The spare room has no less than ten shopping bags scattered on the bed.
“Mom calls it retail therapy,” she says with a little smile.
“Better than Prozac, I hear,” he says, guiding her into the hall and towards the bedroom. “Why don’t you go lay down and I’ll order some dinner?”
“I may not make it to dinner,” she says, let him move her about like a Thanksgiving day balloon.
“Gotta try to eat,” he says, stopping in the doorway and watching her as she shuffles to the bed.
She nods, too tired to argue.
“Oh,” she says as she sits down. “I almost forgot. What did the guys say?” she asks.
He shifts his weight from one foot to the other and his hands flit about trying to find a place to land. He’s tap dancing before he even opens his mouth, she can tell.
“Nothing important,” he says crossing his arms.
“What did they think of the results we got from the lab?”
“They really didn’t know what to make of them. It wasn’t anything they’ve seen before.”
She slips out of her shoes and curls into a question mark on the bed.
“Hm,” she sighs to herself.
“Italian or thai?” he asks, quickly changing the subject.
“Surprise me,” she murmurs, sleep already dragging her under.
As he fiddles with the pill bottle in his pocket, he inwardly kicks himself, he should’ve told her the truth, he knows. It’s likely she knows he was lying. More than likely.
The “what if” of it all is nagging at him, like a forgotten shirt pin. Unlocking not just his forgotten recent memories, but the deeper ones, the ones with long black braids and big blue eyes, it is a deeply alluring notion. He glances back at her, already asleep, her features slack and relaxed. He chews his lip and pulls the bottle from his pocket, thinking it may be full of answers rather than questions.
Gracie is hard at work digging a very deep hole. Her little yellow shovel is flings wads of wet sand over her shoulder in a predictable repetition. He chuckles at her determination. She makes the same face Scully does when she’s concentrating. The setting sun is in her curls and catches the hints of red in her hair. Scully is next to him, sitting cross-legged and reading a book. Her hair, longer like it was when they met, ruffles against her shoulder blades in the light breeze.
“Mulder,” she whispers, not looking up from her book.
“What?” he answers, seeing the sun in her eyelashes.
She reaches out and rests her hand is on his hip, smiling, that sweet satisfied smile of hers that he still doesn’t see enough of.
“Mulder,” she whispers again, patting his hip gently.
He opens his eyes and finds her shadowed face in front of him. No sunkissed cheeks or fresh freckles.
“Hmm, yeah,” he mumbles, getting his wits about him.
Her warm little fingers wrap around his wrist and pull his hand to the firm mound of her belly, pressing his palm against it.
“Feel,” she whispers, a giggle in her voice.
He concentrates on the sensation of her soft skin under his hand when he feels movement, as subtle and gentle as a hummingbird fluttering about.
“Hey Munchkin,” he says softly. “Whatcha doin’?”
147 notes
·
View notes
Link
Java is one of the most highly sought after programming languages, not to mention one of the two official languages for Android development. In this Java beginner course, we’ll go over the basics to provide you with a solid foundation and understanding of how the language works and what you can do with it.
Prerequisites
This Java beginner course assumes that you have no prior background in programming. In order to follow along however, you will need to use an online compiler. This will provide a terminal where you can enter Java code and then test your projects.
A good example can be found here: Repl.it. Otherwise, you can also find a number of Java compilers in the Google Play Store and Apple App Store.
Chosen your editor? Great, let’s get started!
Java beginner course part 1: Hello world!
Traditionally, when learning any new programming language, the first thing a tutorial should demonstrate, is how to print “Hello World!” to the screen. Depending on your chosen programming language, this can be a simple or complex process! Unfortunately, Java leans a little more toward the latter camp.
To achieve this seemingly basic task, you will need to enter the following code:
class Main { public static void main(String[] args) { System.out.println("Hello world!"); } }
Chances are you won’t need to write any of this though, seeing as most Java editors will populate new files with something to this effect for you. So, what does all this mean?
First, we are creating a “class” called “main”. Classes are chunks of code that are primarily used to create “data objects.” Data objects are comprised of properties and functions. For example, you could use a class to create a “bad guy” object in a program, and that would consist of its properties (2 legs, green color, lazer gun) and functions (walking, shooting, exploding). In Java, blocks of code that perform functions are called “methods.”
Also read: Java tutorial for beginners: write a simple app with no experience
However, classes can also be used to house sequences of statements that are carried out sequentially to make up a program. To define a class as the “main” class, the one that loads first when you hit run, it must also contain a method called “main”.
In Java, you group lines of code together using curly brackets and indentations. So if we say:
class Main {
Everything following that first curly bracket will be part of the main class and should be indented. We do the same thing for our main method, which means everything that is contained within both the class and the method will be double-indented. The method in this code is the block of code that starts “public static void”. The name that follows is what we want to call our method.
The code block ends when we use the opposite curly bracket. It’s important to remember how many curly brackets we opened, to ensure that we use the same number of closing brackets!
Arguments and syntax
You’ll notice that the method title is followed by a number of words in brackets. These are called “arguments” and they allow us to pass values in and out of the function. You don’t need to worry about that right now, just know that there always must be a “main” method, and that the main method must include those arguments.
Finally, we can use the statement (command) that prints “Hello world!” to the screen. We end that line with a semi-colon, which is how you end every line that doesn’t end with a curly bracket in Java. If you want to learn more about Java syntax and why it is the way it is, you can do so here:
An introduction to Java syntax for Android development
Doing a thing: introducing variables
So, we’re 500 words into this Java beginner course and we’ve yet to write a line of code. Time to rectify that!
We’re just going to add two lines, and change one of the lines to say something new:
class Main { public static void main(String[] args) { String name; name = "Mr Pimples"; System.out.println("Hello " + name); } }
What we have done here, is to create a new “string” with the title “name” and the value “Mr Pimples”. A string is a type of variable, which is essentially a word that can represent a piece of data. Variables come in all shapes and sizes; including “integers” which are whole numbers, and “floats” which are numbers with decimal points.
You may remember variables from math, where:
“if a + 5 = 7, a = 2”
Here, “a” represents a value (2) and can thus stand-in for that value.
Why is this useful? Because it then allows us to change what our code does, simply by changing the value of the variable. For example:
import java.util.Scanner; class Main { public static void main(String[] args) { String name; System.out.println("What's yer name??"); Scanner reader = new Scanner(System.in); name = reader.next(); System.out.println("Hello " + name); } }
Scanner reader is an object that lets us get information from the user input. Here, we are asking the user to input their name then assigning the “name” string the text they enter. We can respond to the user using that name, rather than just displaying a generic message!
Notice that the variable sits outside of the quotation marks, showing that we want the value of that string, rather than the word “name”.
(Wondering what “import java.util.Scanner” does? We’ll get there in a moment, but well done for being observant!)
Using methods
Now you have an idea of what a variable is, it’s time this Java beginner course moved on to methods!
A method is essentially a block of code that performs one or more jobs. The usefulness of a method, comes from the fact it can be called from anywhere in your code. This means you can perform the same job multiple times, without needing to write the code repeatedly. That also means that you can more easily make changes to your program – as you only need to change that code once.
To see how this works, let’s write another variation of our “Hello World!” code:
class Main { public static void main(String[] args) { helloMethod(); } public static void helloMethod() { System.out.println("Hello World!"); } }
This version of the program does the exact same thing it did before. The only difference is that the actual act of saying “Hello World!” is carried out in a separate method. This means we can repeatedly show the message to the screen by doing this:
public static void main(String[] args) { helloMethod(); helloMethod(); helloMethod(); }
Sure saves time!
The other great thing about methods that you need to learn on this Java beginner course though, is that they can behave differently each time.
This is where “arguments” come in. Basically, an argument is a variable that you pass over to a method, which can then change the way the method acts. When you define the method, you simply create new variables and insert them in the brackets. As before, we do this by writing the type of variable (String) and then its name (userName).
Now, when we call the helloMethod method, we need to put a string inside those brackets. Now we can do this:
import java.util.Scanner; class Main { public static void main(String[] args) { String name; System.out.println("What's yer name??"); Scanner reader = new Scanner(System.in); name = reader.next(); helloMethod(name); } public static void helloMethod(String userName) { System.out.println("Hello " + userName); } }
Or this:
helloMethod("Mr Pimples"); helloMethod("Mrs Mumples"); helloMethod("Johnny");
Using classes
In the next part of this Java beginner course, we’re going to do something completely different: build a rabbit!
To do that, you’re going to create a new class outside of all the curly brackets so far:
class Rabbit { public String rabbitName; public String rabbitColor; public int rabbitWeight; public Rabbit(String name, String color, int weight) { rabbitName = name; rabbitColor = color; rabbitWeight = weight; } public void feed() { rabbitWeight = rabbitWeight + 10; } }
Whenever you create a new class other than your main class, you will need to use a Method called a “constructor.” This constructor is used to define the properties of the “object” you are going to create. Remember: classes exist predominantly to create data objects, and in this case, we are creating a rabbit.
We therefore need to define a bunch of different variables for our rabbit, which we do outside of the method. Then we need to assign values to those variables by using them as arguments in our constructor. What this allows us to do is determine what our rabbit will be like.
(Notice that integers use the lower-case “int” whereas “String” is in upper case – this is unique to the String variable).
Now, back in the Main class and main method, we’re going to do the following:
Rabbit bunny1 = new Rabbit("Barry", "Brown", 10); Rabbit bunny2 = new Rabbit("Jerry", "Black", 11); System.out.println(bunny1.rabitName);
Basically, we’re using the constructor to make two separate “data objects” of the type “Rabbit.” We do this in just the same way we created our variables earlier, except that we’re using the constructor to assign multiple values.
The great thing about creating objects using classes, is that you can build multiple objects from a single class. Here, the class works like a “blueprint.” So we can create two different rabbits with different names, different colors, and different weights!
Public methods
The other thing you may have noticed, is that we have a method in our Rabbit class called “feed.” Feed is a method that let’s us feed our rabbits, and all it does is add a pound in weight to our rabbitWeight variable.
Remember: objects have properties and functions. Or to put it another way: variables and methods!
So if we say:
System.out.println(bunny1.rabbitWeight); bunny1.feed(); System.out.println(bunny1.rabbitWeight);
We’ll see that our bunny is one heavier when it prints out the second line!
Now, making data rabbits is not all that useful of course. But what would be useful would be to make a score counter in a computer game, to make users in a contact management tool, or to make any number of other abstract constructs.
The power of Java
The reason I really wanted to explain classes and objects in this Java beginner course, is that it will help you to better understand the nuts and bolts of Java and many other programming languages.
Because whenever you look at a piece of Java code, you will likely see many statements that rely on methods and variables from other classes. Java has a bunch of classes “built-in” and it’s easy to add more as you need them.
For instance: when we print to the screen by using:
System.out.println(bunny1.rabbitName);
We are referring to a class called System and then using its print line method! We’re then passing the string we want to print as an argument. That’s why we need so many words and full stops to achieve something seemingly quite simple.
The reason that “String” is capitalized, is that this is actually an object, rather than a “primitive type.” Hence, we can do things like String.length in order to find out how long the string is! Classes are generally capitalized.
Additional libraries and classes
We can easily extend the capabilities of Java without writing lots of extra code, by “importing” additional classes. This is what we did in order to get the input from the user:
import java.util.Scanner;
The importance of classes and objects also explains a lot of the “boilerplate” code (code that you write over and over again). The reason we say “public” is that we are telling Java we want other classes to be able to access the method. The opposite is “private” which means that the method is confined to the class, usually because it is concerned with some inner-workings that shouldn’t be tampered with.
The phrase “static” meanwhile tells Java that a method acts on the program as a whole, rather than an “instance” of a particular object. Our “feed”
Don’t worry if this isn’t all clicking just yet. It can take quite a while before Java starts making sense! But hopefully this gives you at least some idea as to what you’re looking at when you read any page of Java code.
Returning values
So, what does “void” mean?
Void tells us that a method doesn’t return any kind of value. This is as compared with methods that return a variable.
For example: what happens if we want to talk to our rabbit? In that case, we might create a method that returns a string, where that string contains the message that the bunny wants to share:
public String rabbitSays() { String iSay = "Hi, my name is " + rabbitName; return iSay; }
When we define the method as a String, it’s important that it it uses the return statement as the last line in order to return that string.
Now, we can treat that method as though it were any other string:
System.out.println(bunny1.rabbitSays());
Flow control
Before we wrap up this Java beginner course, there’s one more concept that’s important to understand: flow control.
Flow control means that we can change the code that runs depending on the value of a variable. This allows us to respond to the interactions provided by the user, or to other factors such as the time of day, external files, or how long the program has been running.
For example, we might assume that our bunny is hungry if he’s below a certain weight. He would therefore want to tell us to feed him!
This is where an “if” statement comes in handy. If statements are code blocks that run only when certain conditions are met. These conditions are placed inside brackets. So:
String iSay; if (rabbitWeight < 11) { iSay = "I'm hungry! Feed me!"; }
Note that the symbol “<” means “less than.” Therefore, we only run the code in the code block if the rabbit’s weight is less than 11.
Another useful statement is “else” which we can use immediately after an “if” statement in order to define what happens when the conditions are not met:
String iSay; if (rabbitWeight < 11) { iSay = "I'm hungry! Feed me!"; } else { iSay = "Hi, my name is " + rabbitName; }
Now our rabbits will tell us they’re hungry until they get fed. Once they are over 10lbs, they’ll stop telling us to feed them and tell us their names instead.
Here’s the entire code:
class Main { public static void main(String[] args) { Rabbit bunny1 = new Rabbit("Barry", "Brown", 10); Rabbit bunny2 = new Rabbit("Jerry", "Black", 11); System.out.println(bunny1.rabbitSays()); bunny1.feed(); System.out.println(bunny1.rabbitSays()); } } class Rabbit { public String rabbitName; public String rabbitColor; public int rabbitWeight; public Rabbit(String name, String color, int weight) { rabbitName = name; rabbitColor = color; rabbitWeight = weight; } public void feed() { rabbitWeight = rabbitWeight + 1; } public String rabbitSays() { String iSay; if (rabbitWeight < 11) { iSay = "I'm hungry! Feed me!"; } else { iSay = "Hi, my name is " + rabbitName; } return iSay; } }
While this particular program is little more than a novelty, it’s easy to see how you might adapt this into a full “pet simulator” like a Tamagotchi. Except – and I’m just spitballing here – the challenge would be that we have multiple different rabbits to manage. Add a “poop” function to make them hungry again, let them procreate, and you have a fun little management game.
Add some graphics and you’re onto a winner! Not bad for a Java beginner course!
Wrapping up the Java beginner course
All that is a lot to take in in one go, so you shouldn’t worry if you’re struggling to get your head around it all. That said, these are the most important concepts in Java and, once you grasp them, you’re well on your way to creating more useful apps.
In fact, that’s the best way to learn: choose a good starter project and get stuck in. Research what you don’t know and add to your knowledge as you go! Hopefully, you’ll find that it all makes a little more sense thanks to this Java beginner course.
OR you could check out our list of the best free and paid Android app development courses. There, you’ll not only learn everything you need to know about Java, but also how to use the Android SDK that bridges the gap between Java and the Android platform!
source https://www.androidauthority.com/java-beginners-course-1146854/
0 notes