Company profile - Canadian Company Capabilities
Third-Party Information Liability Disclaimer
Some of the information on this Web page has been provided by external sources. The Government of Canada is not responsible for the accuracy, reliability or currency of the information supplied by external sources. Users wishing to rely upon this information should consult directly with the source of the information. Content provided by external sources is not subject to official languages, privacy and accessibility requirements.
A & J Mixing Co. Inc.
Legal Name:
A & J Mixing Co. Inc.
Operating Name:
A & J Mixing Co.Inc.
Mailing Address:
8-2345 Wyecroft Rd.OAKVILLE, Ontario
L6L 6L4
Location Address:
8-2345 Wyecroft Rd.OAKVILLE, Ontario
L6L 6L4
Tel.:<PHONE_NUMBER>
Tel.:<PHONE_NUMBER>
Fax:<PHONE_NUMBER>
Company Profile
Patented AJSP Rotor & Patents Pending. Objective is appropriate
investment for mixing tasks such as coating of fish feed under
vacuum, batch dryers, development of color using low intensity
rotor and high shear Shearmakers such as in masonry cement.
Packages complete with weighing & controls.
Full profile
Full profile
Contact information
Company description
Product / Service / Licensing
in single our double drum machines. No heat and no shear unless
added. High shear is available. Typical uses powder paint,
detergents, chemical, plastics compounding.
double rotor mixers. Low heat. No degradation unless high
shear is added. Typical items: coffee beans, icing sugar,
ground coffee, cereals.
modular rotor (patented) in single or double units. No heat.
No shear unless added. Heating or cooling jackets can be added.
Typical mix times are 10 seconds to 1 minute to .5% standard
deviation.
applied under vacuum up to 27in. hg. or -920 milibars, and when
vacuum is released, the coating is driven inside the pellet.
Typical systems include coater, weighing, vacuum pump, controls
with volume of 10 tonnes per hour. We have the most economical
package, the only complete package, factory tested and on-site
start-up and service worldwide.
allows weighing in the mixer. Liquids, if applicable, would be
weighed separately. The mixing is done, the blower turned to
high, the burner to high and drying is monitored by time and
exhaust temperature. A very economical process solution for low
volumes, less than 10 tonnes/ hour. Package includes controls.
intensity Phlauer-Tech Shearmakers. Will develop most difficult
colors in masonry cement 3.5 tons in 3 minutes. Because of the
AJSP rotor, it is a lower investment with fewer Shearmakes than
competitor and 100 less h.p. Test mixer available.
The AJSP rotor in now patented and patents are pending.
Market profile
Alliances:
- Sales/Marketing
Strategic alliances:
We are looking for Manufacturer's Representatives in US/Canada,and manufacturers who want to license our technology in other
countries. We will provide marketing information and drawings
to
manufacture to our patented mixer design.
The mixer in the single drum design is unique in offering rapid
and accurate mixing. The double drum design is competitive in
performance and investment to other double drum designs.
See our equipment at ajmixing.com. and email us for a video.
Geographic markets:
Export experience:
- Brazil
- Chile
- China
- Japan
- Mexico
- Philippines
- United Kingdom
- United States
- Venezuela, Bolivarian Republic of
- California
- Florida
- Georgia
- Idaho
- Illinois
- Indiana
- Kansas
- Michigan
- Minnesota
- Missouri
- Nebraska
- New Jersey
- New York
- North Carolina
- Ohio
- Pennsylvania
- Texas
- Utah
- Washington
- Wisconsin
Actively pursuing:
- Algeria
- Austria
- Denmark
- Finland
- France
- Germany
- Iceland
- Ireland
- New Caledonia
- New Zealand
- Norway
- Puerto Rico
- Spain
- Sweden
- Switzerland
- Thailand
- Alabama
- Alaska
- Arizona
- Arkansas
- Colorado
- Connecticut
- Delaware
- District of Columbia
- Hawaii
- Iowa
- Kentucky
- Louisiana
- Maine
- Maryland
- Massachusetts
- Mississippi
- Montana
- Nevada
- New Hampshire
- New Mexico
- North Dakota
- Oklahoma
- Oregon
- Rhode Island
- South Carolina
- South Dakota
- Tennessee
- Vermont
- Virginia
- West Virginia
- Wyoming
Third-Party Information Liability Disclaimer
Some of the information on this Web page has been provided by external sources. The Government of Canada is not responsible for the accuracy, reliability or currency of the information supplied by external sources. Users wishing to rely upon this information should consult directly with the source of the information. Content provided by external sources is not subject to official languages, privacy and accessibility requirements.
Contacts
Contact information
Description
Company description
Products, services and licensing
Product / Service / Licensing
in single our double drum machines. No heat and no shear unless
added. High shear is available. Typical uses powder paint,
detergents, chemical, plastics compounding.
double rotor mixers. Low heat. No degradation unless high
shear is added. Typical items: coffee beans, icing sugar,
ground coffee, cereals.
modular rotor (patented) in single or double units. No heat.
No shear unless added. Heating or cooling jackets can be added.
Typical mix times are 10 seconds to 1 minute to .5% standard
deviation.
applied under vacuum up to 27in. hg. or -920 milibars, and when
vacuum is released, the coating is driven inside the pellet.
Typical systems include coater, weighing, vacuum pump, controls
with volume of 10 tonnes per hour. We have the most economical
package, the only complete package, factory tested and on-site
start-up and service worldwide.
allows weighing in the mixer. Liquids, if applicable, would be
weighed separately. The mixing is done, the blower turned to
high, the burner to high and drying is monitored by time and
exhaust temperature. A very economical process solution for low
volumes, less than 10 tonnes/ hour. Package includes controls.
intensity Phlauer-Tech Shearmakers. Will develop most difficult
colors in masonry cement 3.5 tons in 3 minutes. Because of the
AJSP rotor, it is a lower investment with fewer Shearmakes than
competitor and 100 less h.p. Test mixer available.
The AJSP rotor in now patented and patents are pending.
Market
Market profile
Alliances:
- Sales/Marketing
Strategic alliances:
We are looking for Manufacturer's Representatives in US/Canada,and manufacturers who want to license our technology in other
countries. We will provide marketing information and drawings
to
manufacture to our patented mixer design.
The mixer in the single drum design is unique in offering rapid
and accurate mixing. The double drum design is competitive in
performance and investment to other double drum designs.
See our equipment at ajmixing.com. and email us for a video.
Geographic markets:
Export experience:
- Brazil
- Chile
- China
- Japan
- Mexico
- Philippines
- United Kingdom
- United States
- Venezuela, Bolivarian Republic of
- California
- Florida
- Georgia
- Idaho
- Illinois
- Indiana
- Kansas
- Michigan
- Minnesota
- Missouri
- Nebraska
- New Jersey
- New York
- North Carolina
- Ohio
- Pennsylvania
- Texas
- Utah
- Washington
- Wisconsin
Actively pursuing:
- Algeria
- Austria
- Denmark
- Finland
- France
- Germany
- Iceland
- Ireland
- New Caledonia
- New Zealand
- Norway
- Puerto Rico
- Spain
- Sweden
- Switzerland
- Thailand
- Alabama
- Alaska
- Arizona
- Arkansas
- Colorado
- Connecticut
- Delaware
- District of Columbia
- Hawaii
- Iowa
- Kentucky
- Louisiana
- Maine
- Maryland
- Massachusetts
- Mississippi
- Montana
- Nevada
- New Hampshire
- New Mexico
- North Dakota
- Oklahoma
- Oregon
- Rhode Island
- South Carolina
- South Dakota
- Tennessee
- Vermont
- Virginia
- West Virginia
- Wyoming


Copyright © Josh Beam 20{{ site.time | date: '%y' }} (MIT License)
angular_init and ngi and the author, Joshua Beam, are not directly associated with AngularJS


link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
AMAZING PEOPLE ARE MAKING AMAZING DESIGNS IN A FUN ENVIRONMENT
When you work with us, you are a part of a team of committed collaborators. All aspects of our software development process are integrated, interactive
and agile.
Our approach unifies design, develoment and product management to create exceptional products.
We start each project by understanding your business goals, the user's needs and the product requirements
Then we help translate them into effective and elegant solutions.
Before we sign a contract or write a line of code our team will spend the necessary time needed to understand your productive vision
The outcome of this scoping session is a proposal or high-level statement of work.
Based on your requirements, we can provide a complete offering or just the pieces you need.
Black Tile
Ontario Security
Orange Pyramids
Jim Carrey
Good Day
Buttons
Burned
BAILEY


A computer is a device that can perform computations and make logical decisions phenomenally faster than human beings can. Many of today's personal computers can perform billions of calculations in one second—more than a human can perform in a lifetime. Supercomputers are already performing thousands of trillions (quadrillions) of instructions per second! To put that in perspective, a quadrillion-instruction-per-second computer can perform in one second more than 100,000 calculations for every person on the planet! And—these "upper limits" are growing quickly!
Computers process data under the control of sets of instructions called computer programs. These programs guide the computer through orderly sets of actions specified by people called computer programmers. The programs that run on a computer are referred to as software. In this book, you'll learn today's key programming methodology that's enhancing programmer productivity, thereby reducing software-development costs—object-oriented programming.
A computer consists of various devices referred to as hardware (e.g., the keyboard, screen, mouse, hard disks, memory, DVDs and processing units). Computing costs are dropping dramatically, owing to rapid developments in hardware and software technologies. Computers that might have filled large rooms and cost millions of dollars decades ago are now inscribed on silicon chips smaller than a fingernail, costing perhaps a few dollars each. Ironically, silicon is one of the most abundant materials—it's an ingredient in common sand. Silicon-chip technology has made computing so economical that more than a billion general-purpose computers are in use worldwide, and this is expected to double in the next few years.
Computer chips (microprocessors) control countless devices. These embedded systems include anti-lock brakes in cars, navigation systems, smart home appliances, home security systems, cell phones and smartphones, robots, intelligent traffic intersections, collision avoidance systems, video game controllers and more. The vast majority of the microprocessors produced each year are embedded in devices other than general- purpose computers.


LEADER ADVANCED FORMULA EYE DROPS - dextran 70, polyethylene glycol 400, povidone and tetrahydrozoline hydrochloride solution
HANLIM PHARM. CO., LTD.
Disclaimer: Most OTC drugs are not reviewed and approved by FDA, however they may be marketed if they comply with applicable regulations and policies. FDA has not evaluated whether this product complies.
Active ingredients Purpose
Dextran 70 0.1%.................................................................Lubricant
Polyethylene glycol 400 1%.................................................Lubricant
Povidone 1%......................................................................Lubricant
Tetrahydrozoline HCL 0.05%................................................Redness reliever
Uses
When using this product
Stop use and ask a doctor if
Keep out of the reach of children.
If swallowed, get medical help or contact a Poison Control Center right away.
Directions
Other information
some users may experience a brief tingling sensation
store at 15o to 25oC (59o to 77oF)
|
LEADER ADVANCED FORMULA EYE DROPS
dextran 70 solution | ||||||||||||||||||||
| ||||||||||||||||||||
| ||||||||||||||||||||
| ||||||||||||||||||||
| ||||||||||||||||||||
|
| Labeler - HANLIM PHARM. CO., LTD. (687986034) |


D1.1 Towards a comprehensive mapping of information on public procurement tendering and its actors across Europe
.
Download Map
Toggle View
Download Data


@* * Copyright 2021 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *@ @import views.html.templates.inputs.RadioGroup @import uk.gov.hmrc.play.views.html.helpers.FormWithCSRF @import forms.YesNoForm._ @import views.html.templates.errors.ErrorSummary @this(mainTemplate: MainTemplate, radioGroup: RadioGroup, errorSummary: ErrorSummary, formWithCSRF: FormWithCSRF) @(form: Form[YesNo])(implicit user: User[_], messages: Messages, appConfig: config.AppConfig) @questionContent = {


What is Hugo?
Hugo is an open-source static site generator.
How to install?
As mentioned here, there are few other package management tool that you can use to install Hugo on Windows. I found installing with binaries as the easiest way to install Hugo. Follow the instructions below to install Hugo using binary.
1. Download any desired release version
Visit github release page for Hugo and download binary release of your choice. For instance hugo_0.78.2_Windows-64bit.zip
2. Extract and add to PATH
After you’ve downloaded the binary, extract it in any folder you like. If you extracted inside a folder (hugo) in D:> so that the path to your extracted hugo.exe file is D:\hugo\hugo.exe then, add D:\hugo in your environment PATH variable.
3. Test the installation
Open a terminal window and type hugo new site first_site. If your installation was successful then you should see something like
Congratulations! Your new Hugo site is created in P:\first_site.
Just a few more steps and you're ready to go:
1. Download a theme into the same-named folder.
Choose a theme from https://themes.gohugo.io/ or
create your own with the "hugo new theme <THEMENAME>" command.
2. Perhaps you want to add some content. You can add single files
with "hugo new <SECTIONNAME>\<FILENAME>.<FORMAT>".
3. Start the built-in live server via "hugo server".
Visit https://gohugo.io/ for quickstart guide and full documentation.
If you get an error then make sure you’ve correctly executed step 2.


{% include header.html %}
mini2Dx is an open-source beginner-friendly, master-ready framework for rapidly prototyping and building 2D games in Java.
Code your game in Java and release it on Windows, Mac OS X, Linux, Android and iOS. With more platforms coming soon.
Quick-start tools, tutorials and examples to help beginners get started.
Powerful APIs and extensive documentation for experienced developers.
There's no fee for using mini2Dx. The source code is publicly available under the BSD 3 Clause License.
A easy rendering API combined with sprite animation, particle effect and screen transition features.
Powerful geometry classes, collision detection utilities and Tiled support with built-in collision mapping.
Classes for game programming patterns such as message queues, dependency injection and object pooling
Shared code and assets across platforms. The framework abstracts away platform-specific code and bindings so you can focus on your game's logic.
mini2Dx's responsive UI framework allows you to write your UI once and automatically change to suit the player's platform and input method.
Easily embed Groovy, Ruby, Python or Lua as a scripting language for your game. Script your game objects or even provide a modding API to your players.


Tic-Tac-Toe
{{#if loggingIn}}
Logging in ...
{{else}}
{{#if currentUser}}
{{> game}}
{{loginButtons}}
{{> games}}
{{else}}
{{loginButtons}}
{{/if}}
{{/if}}
{{#if loading_games}}
Games
Loading ...
{{else}}
Active Games
{{#each active_games}}
{{/each}}
Won Games
{{#each won_games}}
{{/each}}
Lost Games
{{#each lost_games}}
{{/each}}
{{/if}}
{{#if any_game_selected}}
{{#if loading_game}}
Loading...
{{else}}
{{> game_field}}
{{/if}}
{{/if}}
{{#each rows}}
{{#each cells}}
{{> cell_info}}
{{/each}}
{{/each}}
{{#if value}}
{{else}}
{{/if}}
|


My name is Loralie I'm an aspiring full-stack Web developer.
I currently reside in Sandy, UT. I am currently attending Lambda School studying Sull-Stack Web Development. My primary focus and inspiration is web development.
In my free time I'm always finding new music to listen to. I am both driven and self-motivated, and I am constantly experimenting with new technologies and techniques.
I am very passionate about Web Development, and strive to better myself as a developer.
Check out my epic Github!
I am Teddy Zenebe, Full Stack Web development student at Lambda School.
Very capable and interested in user friendly web development. I have about a year experience on building responsive web apps and creating REST full APIs.
On my free time I like to read books and travel to areas where I haven’t been before.
My Github is breathtaking. Please have a look!
My name is Samuel Kraus. I'm a one day-to-be full stack web developer in training!
Though I'm a German American dual national, I'm currently living in Southeast Texas. They say everything is bigger in Texas and I hope our work here reflects that!
I'm currently learning in Lambda School, starting from having absolutely no knowledge. I work full-time, raise 2 cats, and attempt to enjoy a bit of Warcraft in my downtime.
(Lok'Tar!)
I'm excited to keep creating amazing projects and look forward to seeing everyone in the future as a knowledgable developer!
It's dangerous to go alone. Take my Github!
I'm currently enrolled in Lambda School to accelerate my learning to become a Full Stack Web Developer.
When I'm not coding and trying to grasp new ideas and languages, I like to play music. Typically I jam on the guitar but I'll sometimes go on the keys and play a couple chords there but the guitar definitely has my heart.
I look forward to implementing new concepts and technologies that I learn.
Think you can handle this Github?
Hello, I'm Alyssa Jana Gutierrez, it's nice to meet you ! I am from San jose California.
I've always been interested in the designing part of website development.
I am currently a full stack web dev student at Lambda, and working on developing more skills as the class progresses.
My Github is a GREAThub!


Southern pulls away from Loyola New Orleans in 87-70 win
BATON ROUGE, La. (AP) - Ahsante Shivers scored 18 points and Southern defeated NAIA opponent Loyola New Orleans 87-70 in the Jaguars’ season opener on Wednesday night.
Shivers was 6 of 8 from the field and made four steals for the Jaguars. Darius Williams added 16 points on 6-of-6 shooting and Amel Kuljuhovic added 15 points and six rebounds. The Jaguars shot 50 percent and made 20 of 26 free throws.
There were 51 turnovers in the game, 30 by the Wolf Pack.
Andrew Fava had 17 points and six rebounds and Tensley Aldridge 14 points for Loyola.
For more AP college basketball coverage: https://apnews.com/Collegebasketball and http://twitter.com/AP_Top25
Sign up for Daily Newsletters
Copyright © 2019 The Washington Times, LLC.
Please read our comment policy before commenting.


magneticalc.Model.Model
class documentationmagneticalc.Model
(View In Hierarchy)
Model class. The model maintains a strict hierarchy of dependencies: parameters > metric > field > sampling volume > wire When a lower module's data changed, all higher modules are invalidated (i.e. have their calculation results reset).
| Method | __init__ | Initializes the model. |
| Instance Variable | gui | Undocumented |
| Instance Variable | wire | Undocumented |
| Instance Variable | sampling_volume | Undocumented |
| Instance Variable | field | Undocumented |
| Instance Variable | metric | Undocumented |
| Instance Variable | parameters | Undocumented |
| Method | __str__ | Returns the model state as a string; may be used for debugging. |
| Method | is_valid | Indicates valid data for display. |
| Method | invalidate | Invalidates multiple modules at once, in descending order of hierarchy. |
| Method | set_wire | Sets the wire. |
| Method | set_sampling_volume | Sets the sampling volume. |
| Method | set_field | Sets the field. |
| Method | set_metric | Sets the metric. |
| Method | set_parameters | Sets the parameters. |
| Method | calculate_wire | Calculates the wire. |
| Method | calculate_sampling_volume | Calculates the sampling volume. |
| Method | calculate_field | Calculates the field. |
| Method | calculate_metric | Calculates the metric. |
| Method | calculate_parameters | Calculates the parameters. |
| Method | on_wire_valid | Gets called when the wire was successfully calculated. |
| Method | on_sampling_volume_valid | Gets called when the sampling volume was successfully calculated. |
| Method | on_field_valid | Gets called when the field was successfully calculated. |
| Method | on_metric_valid | Gets called when the metric was successfully calculated. |
| Method | on_parameters_valid | Gets called when the parameters were successfully calculated. |
| Method | on_wire_invalid | Gets called when the wire was invalidated. |
| Method | on_sampling_volume_invalid | Gets called when the sampling volume was invalidated. |
| Method | on_field_invalid | Gets called when the field was invalidated. |
| Method | on_metric_invalid | Gets called when the metric was invalidated. |
| Method | on_parameters_invalid | Gets called when the parameters were invalidated. |
Indicates valid data for display.
| Returns | True if data is valid for display, False otherwise |
Invalidates multiple modules at once, in descending order of hierarchy.
| Parameters | do_wire | Enable to invalidate wire |
| do_sampling_volume | Enable to invalidate sampling volume | |
| do_field | Enable to invalidate field | |
| do_metric | Enable to invalidate metric | |
| do_parameters | Enable to invalidate parameters |
Sets the wire.
| Parameters | wire | Wire |
| invalidate_self | Enable to invalidate the old object before setting a new one |
Sets the sampling volume.
| Parameters | sampling_volume | Sampling volume |
| invalidate_self | Enable to invalidate the old object before setting a new one |
Sets the field.
| Parameters | field | Field |
| invalidate_self | Enable to invalidate the old object before setting a new one |
Sets the metric.
| Parameters | metric | Metric |
| invalidate_self | Enable to invalidate the old object before setting a new one |
Sets the parameters.
| Parameters | parameters | Parameters |
| invalidate_self | Enable to invalidate the old object before setting a new one |
Calculates the wire.
| Parameters | progress_callback | Progress callback |
| Returns | True if successful, False if interrupted |
Calculates the sampling volume.
| Parameters | label_resolution | Label resolution |
| progress_callback | Progress callback | |
| Returns | True if successful, False if interrupted |
Calculates the field.
| Parameters | progress_callback | Progress callback |
| num_cores | Number of CPU cores to use | |
| Returns | True if successful, False if interrupted |
Calculates the metric.
| Parameters | progress_callback | Progress callback |
| Returns | True (currently non-interruptable) |
Calculates the parameters.
| Parameters | progress_callback | Progress callback |
| Returns | True (currently non-interruptable) |


read MFnumber MTnumber "file_name" [offset]
DeCE can read cross section data from an external data file, and store the data into the specified MF,MT section. In the current version, the MF number should be 1 or 3, so that only cross section or average number of neutron data can be read. The file name must be quoted by the quotation marks.
The data in the external data file are in the table format, like
# Energy Total Capture 1.000000e-03 3.518258e+04 7.921335e+03 2.000000e-03 2.643521e+04 4.590701e+03 5.000000e-03 1.870179e+04 2.295811e+03 1.000000e-02 1.479458e+04 1.437977e+03 2.000000e-02 1.201587e+04 9.583236e+02 5.000000e-02 9.506811e+03 5.829248e+02 1.000000e-01 8.172826e+03 3.250598e+02 1.500000e-01 7.532394e+03 2.282769e+02 ...(snip)... 8.000000e-01 4.944550e+03 4.656816e+01 9.000000e-01 4.735559e+03 3.920111e+01 1.000000e+00 4.550877e+03 3.409828e+01
where the energies are in MeV, and the cross sections in milli-barns. When offset is not given, DeCE reads the first column as the energy, and the second column as the cross section. When offset=2 is specified, the third column data are copied.
The unit of the external data can be changed by the option ReadXdataConversion and ReadYdataConversion.
Often the energy range given in the file does not match the ENDF-6 file. For example, the lower region may overlap with the resonance range where the cross sections in MF=3 should be zero (or background cross sections are given). DeCE tries to adjust the energy boundary at the upper side of the resonance region.
read 3 102 "cross_section.dat" 2 extract 3 102
3.307500+4 7.427800+1 0 0 0 03325 3102 1 7.329602+6 7.329602+6 0 0 1<PHONE_NUMBER> 2 17 2 3325 3102 3 1.000000-5 0.000000+0 2.530000-2 0.000000+0 1.000000+5 0.000000+03325 3102 4 1.000000+5 3.250598-1 1.500000+5 2.282769-1 2.000000+5 1.837162-13325 3102 5 2.500000+5 1.579787-1 3.000000+5 1.379774-1 3.500000+5 1.251382-13325 3102 6 4.000000+5 1.150729-1 4.500000+5 1.024055-1 5.000000+5 9.270790-23325 3102 7 6.000000+5 7.293613-2 7.000000+5 5.763219-2 8.000000+5 4.656816-23325 3102 8 9.000000+5 3.920111-2 1.000000+6 3.409828-2 3325 3102 9 3325 3 099999
In this case, the resonance region goes up to 100 keV, and therefore the data below 100 keV are skipped. Ocassionally, though quite rare, DeCE cannot determine the correct resonance upper boundary. Users should be aware of this.
multiread MFnumber MTstart MTlast "file_name"
DeCE reads all MT numbers from MTstart to MTlast from the same data file "file_name". Since an offset is not given in this operation, DeCE assumes that the data file includes the reactions in the following column order - Energy, Total, Elastic, Non-elastic, Capture, Inelastic, and Fission. For the particle production cross section cases - Energy, (x,n), (x,p), (x,alpha), (x,d), (x,t), (x,h), (x,2n), (x,np), (x,n alpha), (x,nd), (x,nt), (x,nh), (x,2p), (x,p alpha), (x,pd), (x,2alpha), (x,d alpha), (x,3n), (x,2np), (x,2n alpha), (x,np alpha), (x,n2p), (x,4n), (x,5n). For the partial inelastic scattering - Energy, elastic, 1st level, 2nd level, 3rd level ... and the last 40th column is the continuum inelastic.
angdist MFnumber MTnumber "file_name"
DeCE creates scattering angular distribution data in MF=4, MT=2, 51, 52 ... The MF number should be 4 for the elastic scattering, while it can be 4 or 6 for the inelastic scattering. The charged particle angular distributions are in MF6. The data file may contain either the differential cross sections or the Legendre expansion coefficients, which is indicated by the keyword in the data file (Angdist or Legcoef).
The format for the differential angular distribution data is as follows.
# 1.00000e-06 Angdist 1.986060e-01 2.646580e-01 2.795430e-01 1.000000e+00 1.970282e+04 0.000000e+00 0.000000e+00 0.000000e+00 2.000000e+00 1.970282e+04 0.000000e+00 0.000000e+00 0.000000e+00 ... (snip) ... 1.790000e+02 1.970283e+04 0.000000e+00 0.000000e+00 0.000000e+00 1.800000e+02 1.970283e+04 0.000000e+00 0.000000e+00 0.000000e+00 # 1.00000e-05 Angdist 1.986060e-01 2.646580e-01 2.795430e-01 1.000000e+00 1.238493e+04 0.000000e+00 0.000000e+00 0.000000e+00 2.000000e+00 1.238493e+04 0.000000e+00 0.000000e+00 0.000000e+00 ... (snip) ...
In the first line, the neutron incident energy in MeV (default), the keyword of Angist , the first level excitation energy, the second level, etc, are given. The differential cross sections are given at 180 angular points at every 1 degree. These blocks are repeated for all incident energies. The unit of scattering cross section is arbitrary, since they will be normalized.
When Legendre coefficients are given, the keyword is Legcoef, and maximum of 50 expansion coefficients are given.
# 1.00000e-06 Legcoef 1.986060e-01 2.646580e-01 2.795430e-01 0 1.918427e+04 0.000000e+00 0.000000e+00 0.000000e+00 1 3.227445e-08 0.000000e+00 0.000000e+00 0.000000e+00 ... (snip) ... 49 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 # 2.00000e+00 Legcoef 1.986060e-01 2.646580e-01 2.795430e-01 0 1.428037e+01 3.152489e+00 5.780398e+00 8.986116e+00 1 4.024690e+00 4.341183e-01 1.150535e+00 7.207134e-01 2 8.009362e-01-4.895771e-03 1.493828e-01-3.589658e-02 ... (snip) ...
The angular data points and the maximum Legendre coefficients to be read by DeCE are defined in deceangdist.cpp
multiangdist MFnumber MTstart MTlast "file_name"
DeCE reads angular distribution data in the specified data file, ranging from MTstart to MTlast.
libread MFnumber MTnumber "file_name"
DeCE imports a specified MF/MT section from another ENDF-6 file, and replace by that, or creates a new section if it does not exist. The external file can be a full ENDF-6 file, or just a section.
When the ZA and AWR parameters in the external file are different from the current data, DeCE replace them by the current ones, but only in the HEAD part.
multilibread MFnumber MTstart MTlast "file_name"
Repeat libread for the range of MT numbers.


| MPI_FILE_GET_SIZE(fh, size) | |
| IN fh | file handle (handle) |
| OUT size | size of the file in bytes (integer) |
int MPI_File_get_size(MPI_File fh, MPI_Offset *size)
MPI_File_get_size(fh, size, ierror)
TYPE(MPI_File), INTENT(IN) :: fh
INTEGER(KIND=MPI_OFFSET_KIND), INTENT(OUT) :: size
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
MPI_FILE_GET_SIZE(FH, SIZE, IERROR)
INTEGER FH, IERROR
INTEGER(KIND=MPI_OFFSET_KIND) SIZE
MPI_FILE_GET_SIZE returns, in size, the current size in bytes of the file associated with the file handle fh. As far as consistency semantics are concerned, MPI_FILE_GET_SIZE is a data access operation (see Section File Consistency ).


Bite Size Bayes¶
Copyright 2020 Allen B. Downey
License: Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)
# Load utils.py
import os
if not os.path.exists('utils.py'):
!wget https://github.com/AllenDowney/BiteSizeBayes/raw/master/utils.py
# Load the data file
if not os.path.exists('gss_bayes.csv'):
!wget https://github.com/AllenDowney/BiteSizeBayes/raw/master/gss_bayes.csv
import pandas as pd
import numpy as np
from utils import values
Introduction¶
This notebook takes a computational approach to understanding probability. We’ll use data from the General Social Survey to compute the probability of propositions like:
If I choose a random survey respondent, what is the probability they are female?
If I choose a random survey respondent, what is the probability they work in banking?
From there, we will explore two related concepts:
Conjunction, which is the probability that two propositions are both true; for example, what is the probability of choosing a female banker?
Conditional probability, which is the probability that one proposition is true, given that another is true; for example, given than a respondent is female, what is the probability that she is a banker?
I chose these examples because they are related to a famous experiment by Tversky and Kahneman, who posed the following question:
Linda is 31 years old, single, outspoken, and very bright. She majored in philosophy. As a student, she was deeply concerned with issues of discrimination and social justice, and also participated in anti-nuclear demonstrations. Which is more probable?
Linda is a bank teller.
Linda is a bank teller and is active in the feminist movement.
Many people choose the second answer, presumably because it seems more consistent with the description. It seems unlikely that Linda would be just a bank teller; if she is a bank teller, it seems likely that she would also be a feminist.
But the second answer cannot be “more probable”, as the question asks. Suppose we find 1000 people who fit Linda’s description and 10 of them work as bank tellers. How many of them are also feminists? At most, all 10 of them are; in that case, the two options are equally likely. More likely, only some of them are; in that case the second option is less likely. But there can’t be more than 10 out of 10, so the second option cannot be more likely.
The error people make if they choose the second option is called the conjunction fallacy. It’s called a fallacy because it’s a logical error and “conjunction” because “bank teller AND feminist” is a logical conjunction.
If this example makes you uncomfortable, you are in good company. The biologist Stephen J. Gould wrote :
I am particularly fond of this example because I know that the [second] statement is least probable, yet a little homunculus in my head continues to jump up and down, shouting at me, “but she can’t just be a bank teller; read the description.”
If the little person in your head is still unhappy, maybe this notebook will help.
Probability¶
At this point I should define probability, but that turns out to be surprisingly difficult. To avoid getting bogged down before we get started, I’ll start with a simple definition: a probability is a fraction of a dataset.
For example, if we survey 1000 people, and 20 of them are bank tellers, the fraction that work as bank tellers is 0.02 or 2%. If we choose a person from this population at random, the probability that they are a bank teller is 2%.
(By “at random” I mean that every person in the dataset has the same chance of being chosen, and by “they” I mean the singular, gender-neutral pronoun, which is a correct and useful feature of English.)
With this definition and an appropriate dataset, we can compute probabilities by counting.
To demonstrate, I’ll use a data set from the General Social Survey or GSS. The following cell reads the data.
gss = pd.read_csv('gss_bayes.csv', index_col=0)
The results is a Pandas DataFrame with one row for each person surveyed and one column for each variable I selected.
Here are the number of rows and columns:
gss.shape
(49290, 6)
And here are the first few rows:
gss.head()
| year | age | sex | polviews | partyid | indus10 | |
|---|---|---|---|---|---|---|
| caseid | ||||||
| 1 | 1974 | 21.0 | 1 | 4.0 | 2.0 | 4970.0 |
| 2 | 1974 | 41.0 | 1 | 5.0 | 0.0 | 9160.0 |
| 5 | 1974 | 58.0 | 2 | 6.0 | 1.0 | 2670.0 |
| 6 | 1974 | 30.0 | 1 | 5.0 | 4.0 | 6870.0 |
| 7 | 1974 | 48.0 | 1 | 5.0 | 4.0 | 7860.0 |
The columns are
caseid
: Respondent id (which is the index of the table).year
: Year when the respondent was surveyed.age
: Respondent’s age when surveyed.sex
: Male or female.polviews
: Political views on a range from liberal to conservative.partyid
: Political party affiliation, Democrat, Independent, or Republican.indus10
: Code for the industry the respondent works in.
Let’s look at these variables in more detail, starting with indus10
.
Banking¶
The code for “Banking and related activities” is 6870, so we can select bankers like this:
banker = (gss['indus10'] == 6870)
The result is a Boolean series, which is a Pandas Series that contains the values True
and False
. Here are the first few entries:
banker.head()
caseid
1 False
2 False
5 False
6 True
7 False
Name: indus10, dtype: bool
We can use values
to see how many times each value appears.
values(banker)
| counts | |
|---|---|
| values | |
| False | 48562 |
| True | 728 |
In this dataset, there are 728 bankers.
If we use the sum
function on this Series, it treats True
as 1 and False
as 0, so the total is the number of bankers.
banker.sum()
728
To compute the fraction of bankers, we can divide by the number of people in the dataset:
banker.sum() / banker.size
0.014769730168391155
But we can also use the mean
function, which computes the fraction of True
values in the Series:
banker.mean()
0.014769730168391155
About 1.5% of the respondents work in banking.
That means if we choose a random person from the dataset, the probability they are a banker is about 1.5%.
Exercise: The values of the column sex
are encoded like this:
1 Male
2 Female
The following cell creates a Boolean series that is True
for female respondents and False
otherwise.
female = (gss['sex'] == 2)
Use
values
to display the number ofTrue
andFalse
values infemale
.Use
sum
to count the number of female respondents.Use
mean
to compute the fraction of female respondents.
# Solution
values(gss['sex'])
| counts | |
|---|---|
| values | |
| 1 | 22779 |
| 2 | 26511 |
# Solution
female.sum()
26511
# Solution
female.mean()
0.5378575776019476
The fraction of women in this dataset is higher than in the adult U.S. population because the GSS does not include people living in institutions, including prisons and military housing, and those populations are more likely to be male.
Exercise: The designers of the General Social Survey chose to represent sex as a binary variable. What alternatives might they have considered? What are the advantages and disadvantages of their choice?
For more on this topic, you might be interested in this article: Westbrook and Saperstein, New categories are not enough: rethinking the measurement of sex and gender in social surveys
Political views¶
The values of polviews
are on a seven-point scale:
1 Extremely liberal
2 Liberal
3 Slightly liberal
4 Moderate
5 Slightly conservative
6 Conservative
7 Extremely conservative
Here are the number of people who gave each response:
values(gss['polviews'])
| counts | |
|---|---|
| values | |
| 1.0 | 1442 |
| 2.0 | 5808 |
| 3.0 | 6243 |
| 4.0 | 18943 |
| 5.0 | 7940 |
| 6.0 | 7319 |
| 7.0 | 1595 |
I’ll define liberal
to be True
for anyone whose response is “Extremely liberal”, “Liberal”, or “Slightly liberal”.
liberal = (gss['polviews'] < 4)
Here are the number of True
and False
values:
values(liberal)
| counts | |
|---|---|
| values | |
| False | 35797 |
| True | 13493 |
And the fraction of respondents who are “liberal”.
liberal.mean()
0.27374721038750255
If we choose a random person in this dataset, the probability they are liberal is about 27%.
The probability function¶
To summarize what we have done so far:
To represent a logical proposition like “this respondent is liberal”, we are using a Boolean series, which contains the values
True
andFalse
.To compute the probability that a proposition is true, we are using the
mean
function, which computes the fraction ofTrue
values in a series.
To make this computation more explicit, I’ll define a function that takes a Boolean series and returns a probability:
def prob(A):
"""Computes the probability of a proposition, A.
A: Boolean series
returns: probability
"""
assert isinstance(A, pd.Series)
assert A.dtype == 'bool'
return A.mean()
The assert
statements check whether A
is a Boolean series. If not, they display an error message.
Using this function to compute probabilities makes the code more readable. Here are the probabilities for the propositions we have computed so far.
prob(banker)
0.014769730168391155
prob(female)
0.5378575776019476
prob(liberal)
0.27374721038750255
Exercise: The values of partyid
are encoded like this:
0 Strong democrat
1 Not str democrat
2 Ind,near dem
3 Independent
4 Ind,near rep
5 Not str republican
6 Strong republican
7 Other party
I’ll define democrat
to include respondents who chose “Strong democrat” or “Not str democrat”:
democrat = (gss['partyid'] <= 1)
Use
mean
to compute the fraction of Democrats in this dataset.Use
prob
to compute the same fraction, which we will think of as a probability.
# Solution
democrat.mean()
0.3662609048488537
# Solution
prob(democrat)
0.3662609048488537
Conjunction¶
Now that we have a definition of probability and a function that computes it, let’s move on to conjunction.
“Conjunction” is another name for the logical and
operation. If you have two propositions, A
and B
, the conjunction A and B
is True
if both A
and B
are True
, and False
otherwise.
I’ll demonstrate using two Boolean series constructed to enumerate every combination of True
and False
:
A = pd.Series((True, True, False, False))
A
0 True
1 True
2 False
3 False
dtype: bool
B = pd.Series((True, False, True, False))
B
0 True
1 False
2 True
3 False
dtype: bool
To compute the conjunction of A
and B
, we can use the &
operator, like this:
A & B
0 True
1 False
2 False
3 False
dtype: bool
The result is True
only when A
and B
are True
.
To show this operation more clearly, I’ll put the operands and the result in a DataFrame:
table = pd.DataFrame()
table['A'] = A
table['B'] = B
table['A & B'] = A & B
table
| A | B | A & B | |
|---|---|---|---|
| 0 | True | True | True |
| 1 | True | False | False |
| 2 | False | True | False |
| 3 | False | False | False |
This way of representing a logical operation is called a truth table.
In a previous section, we computed the probability that a random respondent is a banker:
prob(banker)
0.014769730168391155
And the probability that a respondent is a Democrat:
prob(democrat)
0.3662609048488537
Now we can compute the probability that a random respondent is a banker and a Democrat:
prob(banker & democrat)
0.004686548995739501
As we should expect, prob(banker & democrat)
is less than prob(banker)
, because not all bankers are Democrats.
Exercise: Use prob
and the &
operator to compute the following probabilities.
What is the probability that a random respondent is a banker and liberal?
What is the probability that a random respondent is female, a banker, and liberal?
What is the probability that a random respondent is female, a banker, and a liberal Democrat?
Notice that as we add more conjunctions, the probabilities get smaller.
# Solution
prob(banker & liberal)
0.003306958815175492
# Solution
prob(female & banker & liberal)
0.002556299452221546
# Solution
prob(female & banker & liberal & democrat)
0.0012375735443294787
Exercise: We expect conjunction to be commutative; that is, A & B
should be the same as B & A
.
To check, compute these two probabilies:
What is the probability that a random respondent is a banker and liberal?
What is the probability that a random respondent is liberal and a banker?
prob(banker & liberal)
0.003306958815175492
prob(liberal & banker)
0.003306958815175492
If they are not the same, something has gone very wrong!
Conditional probability¶
Conditional probability is a probability that depends on a condition, but that might not be the most helpful definition. Here are some examples:
What is the probability that a respondent is a Democrat, given that they are liberal?
What is the probability that a respondent is female, given that they are a banker?
What is the probability that a respondent is liberal, given that they are female?
Let’s start with the first one, which we can interpret like this: “Of all the respondents who are liberal, what fraction are Democrats?”
We can compute this probability in two steps:
Select all respondents who are liberal.
Compute the fraction of the selected respondents who are Democrats.
To select liberal respondents, we can use the bracket operator, []
, like this:
selected = democrat[liberal]
The result is a Boolean series that contains a subset of the values in democrat
. Specifically, it contains only the values where liberal
is True
.
To confirm that, let’s check the length of the result:
len(selected)
13493
If things have gone according to plan, that should be the same as the number of True
values in liberal
:
liberal.sum()
13493
Good.
selected
contains the value of democrat
for liberal respondents, so the mean of selected
is the fraction of liberals who are Democrats:
selected.mean()
0.5206403320240125
A little more than half of liberals are Democrats. If the result is lower than you expected, keep in mind:
We used a somewhat strict definition of “Democrat”, excluding Independents who “lean” democratic.
The dataset includes respondents as far back as 1974; in the early part of this interval, there was less alignment between political views and party affiliation, compared to the present.
Let’s try the second example, “What is the probability that a respondent is female, given that they are a banker?”
We can interpret that to mean, “Of all respondents who are bankers, what fraction are female?”
Again, we’ll use the bracket operator to select only the bankers:
selected = female[banker]
len(selected)
728
As we’ve seen, there are 728 bankers in the dataset.
Now we can use mean
to compute the conditional probability that a respondent is female, given that they are a banker:
selected.mean()
0.7706043956043956
About 77% of the bankers in this dataset are female.
We can get the same result using prob
:
prob(selected)
0.7706043956043956
Remember that we defined prob
to make the code easier to read. We can do the same thing with conditional probability.
I’ll define conditional
to take two Boolean series, A
and B
, and compute the conditional probability of A
given B
:
def conditional(A, B):
"""Conditional probability of A given B.
A: Boolean series
B: Boolean series
returns: probability
"""
return prob(A[B])
Now we can use it to compute the probability that a liberal is a Democrat:
conditional(democrat, liberal)
0.5206403320240125
And the probability that a banker is female:
conditional(female, banker)
0.7706043956043956
The results are the same as what we computed above.
Exercise: Use conditional
to compute the probability that a respondent is liberal given that they are female.
Hint: The answer should be less than 30%. If your answer is about 54%, you have made a mistake (see the next exercise).
# Solution
conditional(liberal, female)
0.27581004111500884
Exercise: In a previous exercise, we saw that conjunction is commutative; that is, prob(A & B)
is always equal to prob(B & A)
.
But conditional probability is NOT commutative; that is, conditional(A, B)
is not the same as conditional(B, A)
.
That should be clear if we look at an example. Previously, we computed the probability a respondent is female, given that they are banker.
conditional(female, banker)
0.7706043956043956
The result shows that the majority of bankers are female. That is not the same as the probability that a respondent is a banker, given that they are female:
conditional(banker, female)
0.02116102749801969
Only about 2% of female respondents are bankers.
Exercise: Use conditional
to compute the following probabilities:
What is the probability that a respondent is liberal, given that they are a Democrat?
What is the probability that a respondent is a Democrat, given that they are liberal?
Think carefully about the order of the series you pass to conditional
.
conditional(liberal, democrat)
0.3891320002215698
conditional(democrat, liberal)
0.5206403320240125
Conditions and conjunctions¶
We can combine conditional probability and conjunction. For example, here’s the probability a respondent is female, given that they are a liberal Democrat.
conditional(female, liberal & democrat)
0.576085409252669
Almost 57% of liberal Democrats are female.

Exercise: What fraction of female bankers are liberal Democrats?
Hint: If your answer is less than 1%, you have it backwards. Remember that conditional probability is not commutative.
# Solution
conditional(liberal & democrat, female & banker)
0.10873440285204991
Summary¶
At this point, you should understand the definition of probability, at least in the simple case where we have a finite dataset. Later we will consider cases where the definition of probability is more controversial.
And you should understand conjunction and conditional probability. In the next notebook, we will explore the relationship between conjunction and conditional probability, and use it to derive Bayes’s Theorem, which is the foundation of Bayesian statistics.


Module eu.daproject.evl
Package eu.daproject.evl
package eu.daproject.evl
The main package of the library.
-
ClassDescriptionClass defining an asymmetric method comparator using the lexicographic distance comparison to compare two multimethods.Class definition for declaring the existence of the class Cases.Class defining an invokable method for the EVL library as the extension of a
MethodHandle
with the caller object, the class tuple of "virtual" arguments and some additional data.Method1<ReturnType>Class defining a multimethod of dimension 1 where there is 1 "virtual" parameter.Method2<ReturnType>Class defining a multimethod of dimension 2 where there are 2 "virtual" parameters.Method3<ReturnType>Class defining a multimethod of dimension 3 where there are 3 "virtual" parameters.Method4<ReturnType>Class defining a multimethod of dimension 4 where there are 4 "virtual" parameters.Method5<ReturnType>Class defining a multimethod of dimension 5 where there are 5 "virtual" parameters.Method6<ReturnType>Class defining a multimethod of dimension 6 where there are 6 "virtual" parameters.Method7<ReturnType>Class defining a multimethod of dimension 7 where there are 7 "virtual" parameters.Class providing a base class for the method comparators.Class defining a method item used by the search algorithm of the matching method.MultiMethod<ReturnType>Main class of the EVL library providing an abstract multimethod with a dimension which represents the number of "virtual" parameters.Class defining a priority used for make non ambiguous calls.Class defining a switch multimethod.Class defining a symmetric method comparator using the product distance comparison to compare two multimethods.


Font(family, weight, size, italic=False, **options)
Font objects are returned by the font() command or can be created directly by calling the constructor with the same argument syntax as the font() command. Once you have a reference to a Font object, its properties provide information about character-styling, font metrics, and layout settings.
The object's "Family Properties" are aliases to the eponymous properties in the Family type and will allow you to examine the set of weights and variants supported by the current font's family.
Font objects support the Python with
statement and will set the canvas's global font, font-size, leading, etc. for the duration of an indented block of code. At the end of the block, the canvas's font-state will be restored to its prior value.
fnt.ascender
the distance (in points) from the baseline to the tallest ascender in the font
fnt.descender
the distance from the baseline to the bottom of the lowest descender in the font
fnt.xheight
the distance from the baseline to the tops of lower-case letters
fnt.capheight
the distance from the baseline to the tops of upper-case letters
fnt.size
the font's point size (a.k.a. "1 em") as a floating point number
fnt.leading
the distance from baseline to baseline (expressed in multiples of an em)
fnt.tracking
the amount of extra space to insert between characters (in thousandths of an em)
fnt.hyphenate
a number between 0 and 1 dictating how eagerly hyphens should be inserted to break lines
fnt.align
the text alignment (either LEFT
, RIGHT
, CENTER
, or JUSTIFY
)
fnt.family
name of the font's family (e.g., "Avenir Next" or "Adobe Jenson Pro")
fnt.weight
name of the font's current weight (e.g., "light", "semibold", "black")
fnt.width
name of the font's width (e.g., "condensed") or None
if only a single width is defined
fnt.variant
the "non-standard" portion of the font's name (if it eschews the more typical weight, width, and italicization naming scheme)
fnt.italic
a boolean flag indicating italicization or obliqueness
fnt.face
the "PostScript name" which uniquely identifies the font
fnt.features
a dictionary of OpenType "features" that have been enabled for the font
fnt.weights
a list of all the valid weight names in the given font's family
fnt.widths
a list of all the valid width names in the given font's family
fnt.variants
a (possibly empty) list of other variants in the given font's family
fnt.siblings
a dictionary of "PostScript names" and Font objects for the given font's family.
f = font('Palatino',110) pt = Point(10,120) with pen(2): line(pt-(0, f.ascender), stroke='steelblue', dx=250) line(pt-(0, f.capheight), stroke='orange', dx=250) line(pt-(0, f.xheight), stroke='red', dx=250) line(pt, dash=3, stroke='grey', dx=250) line(pt-(0, f.descender), stroke='green', dx=250) text(pt, str="Tulip")


WASD or cursor keys to move.
"Walking" is currently a proof of concept, "platforms", gravity and jumping coming soon.
There is a very ropey multi-player element now, which probably won't work. Expect ghosts and stuck other players.
Blogpost/About
Dev Blog for updates
Source code on GitHub
Twitter @revdancatt
* * *
Things WILL break, hitting reload will sometimes help.
Chrome YES, Firefox MAYBE,
Safari SLOW. IE??? Pfff.


I'm currently studying at Macalester College way up north in St. Paul, MN. My majors are geography and applied mathematics/statistics. The projects I work on are usually about the relationships between those two fields!
I think data is important for understanding the world, and I want everyone to know how to use it well! At a minimum it's important to know how to spot misused numbers. I'm a preceptor for Introduction to Data Science: Data Science for Social Good at Macalester and I have volunteered as a TA with Hear Me Code in DC. I also write tutorials for Twin Cities R Ladies and occasionally for DataScience4SocialGood (a student organization) at Macalester. During my time at Hola Cultura in DC, I wrote and taught my own series of lessons on ArcGIS Online web maps for my coworkers!
There isn't space in my schedule for every class I want to take, so I've started teaching myself new concepts and skills. Lately I've been trying to learn more web development so I've been making changes to a template for this webpage. I also built a blog using django! To learn some natural language processing I did a project on how women in tech talk about themselves on Twitter (I recently presented that at a conference!).


Considerations and Conclusions
with resource list
Reflections
- What worked well? What didn’t?
- Wha patterns did you see?
- Where there any issues or frustrations you commonly ran into?
Testing Principles
- Reliability: If your test is not reliable, then it is not giving you any useful information. It is dead weight.
- Isolation: Think of your test cases like mini science experiments. How do you run a science experiment? You limit your variables.
- Readability: When the test fails, do I know why?
- 1-to-1: A single test should test a single thing. Overloaded tests are often brittle and it’s difficult to get useful information out of them. There is a high cognitive load to sift through all the things being tested to find the one reason the test failed.
Common testing issues
- Brittleness
- Flakiness
- Single change requires updating a lot of tests
- Tests require a lot of setup/state
Brittleness
A test may be said to be brittle when you have to make a lot of updates or frequent updates even when making small changes to the code under test.
Brittleness can mean that you are not properly abstracting your tests or that you are testing too many implementation details.
Brittleness
For example, if you are testing a webpage, do you necessarily need to test that all the right CSS classses were added to an element? Or is it sufficient to test that the right DOM elements exist and are visible?
If you are testing a function, do you necessarily care which helper functions it calls, or is it sufficient that you get the right result or side-effect?
Maybe you do care about the details. But you should expect that this will result in a test suite that requires more care.
Test Story
I was once at a TX JS conference, during which a developer from Stripe discussed how they had componentized their UI styles. This was a major re-work, but it cut down their CSS definitions considerably. More importantly, it created a unified look-and-feel across their app and made it easier to override certain styles for white-labelling.
The way they tested new widgets was to check that those widgets used certain classes. Although this would generally be considered an approach to avoid, Stripe used it successfully to ensure that widgets were using the new, componentized style library.
Brittleness
Some testing approaches or frameworks have a certain degree of inherent brittleness in them. This is especially true for end-to-end tests or tests that have to touch multiple systems.
That does not mean that these tests should be avoided— many times they provide valuable information about the overall health of a system— but you should understand that they come at a price. You should be able to weigh the benefits and costs of these approaches and frameworks.
One of the other costs of end-to-end or multi-system tests is flakiness.

There is a whole set of best practices for Selenium that we won’t get into here, but one common and avoidable issue that crops up in Selenium test suites is improper abstraction.
Separating page objects that handle interactions with the actual DOM elements from the main test cases will go a long way to more maintainable Selenium suites.
(The other common issue is not waiting for elements to be visible, clickable, or interactable before trying to view, click, or interact with them. Remember: you’re in a browser, and it’s a jungle out there.)
Flakiness
A test may be said to be flakey when it fails randomly (rando-fails) or needs to be re-run another time or two for it to pass.
Flakey tests are a common reason developers dislike or distrust testing. This is especially true when the the test sometimes fails even though no remotely related code has been changed.
 Nip them in the bud.
Common reasons for flakiness
Left-over State
One test case leaves behind state that messes up other tests (or which other tests inadvertently rely on). One indicator: if a test passes when run by itself, but fails when run as part of the test file or suite (or vice-versa).
The Fix: Figure out which test is leaving behind state and update it to clean up what it created in the test.
Many testing libraries allow you to specify afterEach and afterAll functions, where you can do any kind of cleanup you need to do. These are also called tear down functions. This is the ideal place to do this cleanup because if a test fails or is interrupted, it may not clean its state.
Common reasons for flakiness
Relying on outside systems
Any time you have to call out to a system that is not part of the test suite (especially if it is over the wire), you are opening yourself up to a certain level of flakiness (depending on the system and your approach).
You have now coupled your test to that other system, and if it’s having issues or the internet is bad or the planets are misaligned, you will have a failing test and (probably) a failing build.
Common reasons for flakiness
Relying on outside systems
The first question you should ask yourself is if you even need the test you are writing.
For example, I once ran into a test that was checking if a service class could connect to AWS. Because the service class was using AWS’s library, they were essentially testing if the AWS client jar worked.
Common reasons for flakiness
Relying on outside systems
Otherwise, the most common approach is to mock the service or system that the code under test will be hitting. (And you may want to have both mocked and unmocked tests for a connected service.)
This means, of course, you will have to have written your code in a way that allows for this level of abstraction (e.g. a class takes in a connection as input to its constructor instead of building the connection itself); or you will need the ability to override the connection information at some level of the test suite.
The benefits:
- You have total control over what gets returned so you can be precise in your testing.
 High five!
Common reasons for flakiness
Relying on outside systems
Sometimes you want to (or have to) hit the real deal. One way to minimize the amount of flakiness is to have an instance of that system or service on the box that is running the tests (e.g. local instance or instance on a remote test box).
This avoids a whole class of connectivity issues.
This approach is common with tests that touch databases.
Another potential approach to databases is to use something like h2, which creates a database in memory to run the test suite against. Naturally, there are pros and cons to this approach. Test suites of this nature often take much longer to run and the test box will need to be beefier. It is also possible (probable?) that you will not catch database-specific bugs (oh, MySQL).
Common reasons for flakiness
Rounding / Deltas
There are occassions where a successful result is anything within a certain acceptable range (e.g. latitude and longitude coordinates, fuzzy numerical calculations, timestamps).
In these cases, you may will probably see random test failures
because the original test is looking for a specific value.
Some testing libraries have helper functions to check if a value exists in a given range (you can also grab helper libraries like Hamcrest). If you don’t have that out of the box, inbd: you can roll your own with greater than and less than checks.
Common reasons for flakiness
Rounding / Deltas: Example*
var actualCoordiates = mapMaker.giveMeCoordinates(testInput);
expect(actualCoordinates.latitude).toBeGreaterThanOrEqualTo(30.26629999);
expect(actualCoordinates.latitude).toBeLessThanOrEqualTo(30.26639999);
var actualCreatedTimestamp = shazzam.makeMeAnObject();
expect(actualCreatedTimestamp).toBeGreaterThanOrEqualTo(aMinuteAgo);
expect(actualCreatedTimestamp).toBeLessThanOrEqualTo(now);
* This is definitely pseudocode.
Some jargon
You may hear the term syntactic sugar.
If you’re like me and this phrase made no sense to you the first time you heard it: syntactic sugar refers to all the nice helper functionality that makes your tests easier to write and read.
E.g., Hamcrest is a library you can use to sprinkle some syntactic sugar on your JUnit tests.
Less common reasons for flakiness
When it is actually a race condition
Sometimes a flakey test is telling you something useful about the code under test. It is possible that it has a race condition in it.
You shouldn’t start with that assumption, but it’s a possibility.
These are nasty to track down and not always easy to fix, so if this ends up being your issue, we wish you the best of luck.
Less common reasons for flakiness
Non-determinism in tests
Any time you have randomness or non-determinism in your test suite, you are opening yourself up to flakiness.
For most purposes, a set of well-chosen test data will cover all necessary cases, and there is no need for random data.
Not-so-common reasons for flakiness
Non-determinism in code under test
There are very rare occassions where you are trying to test something that is inherently non-deterministic (e.g. a machine learning algorithm).
On these very rare occassions, you might consider other approaches to testing. For example: running the test multiple times, aggregating the results, and looking for a value in a certain range.
It is also very possible that these algorithms might need a human being to look at the results.
A single change requires a lot of test updates
This is usually a sign of poor test isolation or too many tests.
Ideally, each test should test one thing.
The best thing you can do in this case is to take an inventory of the test cases you have had to change and see if there are ways of paring them down.
In your everyday development cycle, when you are updating and especially if you are removing functionality, see if there are any test cases that no longer make sense given your changes. Regular test pruning is good for the overall health of your test suite.
A single change requires many updates to test setup
You might consider abstracting the setup out into a beforeEach or beforeAll call. These are also called setup functions.
This is common with creating objects that require many dependencies.
Example of using beforeEach
var myObj;
beforeEach(function() {
var dependency1 = theWayToGetDep1();
var dependency2 = theWayToGetDep2();
...
myObj = new MyClass(dependency1, dependency2, ...);
});
it('should do something', function() {
expect(myObj.whatever()).toBe(something);
});
* This is also definitely pseudocode.
Tests need a lot of setup
The other depressingly common reason why tests might need a lot of setup is that they were written in a way unfriendly to testing.
This can be indicative of other problems, but the best way to avoid this issue is to write the tests before the code.
For example, I once worked in an Angular code base where almost all of the business logic was embedded in the controllers. That meant that even if you wanted to test a small function, you needed to set up a full instance of the controller with all of its dependencies and requisite state. The task was so burdensome (and in some cases downright impossible) that 90% of that code base was never covered by automated tests.
Heavy controllers is an anti-pattern.
Best Practices
- Use descriptive test names
- Isolate state
- Use appropriate abstractions
- Use set up and tear down functions when appropriate.
- Ignore implementation details if you can
- Mock connected services when possible
- Write your tests first to ensure code testability


Function is a big topic in R programming. I’ll spend several blog posts talking about it. But before I dive into R functions with full force, I want to show you how nice it is to work with them. Consider the following code:
When we call f
, what will it return? Mathematically and intuitively, we’d expect
f
to return 2
because x has a value of 2 now (although it had a value of 1 before).
If x takes a different value later, we’d expect f
to return the new value when
called later. In other words, we expect f
, when called, to return the current
x value. This is exactly what f
does in R:
So R evaluation rules1, by and large, mimic mathematical or intuitive reasonings pretty well. As a result, we often don’t come across surprises when coding in R. Don’t take this for granted. Not every programming language behave this way. For example, if you try to do the same thing in SML, you’ll be surprised by what you get. See the following SML code with detailed comments:
val x = 1; (* Create an environment, and inside this environment, x is bound to 1.*)
fun f () = x; (* Define a function that when we call it later, it tells us what value x is bound to. *)
val x = 2; (* Create a different environment, and inside this new environment, x is bound to 2. *)
x; (* The later binding for x shadows the earlier one, so calling x returns 2. *)
f(); (* Calling f returns 1, NOT 2! This has to do with SML's evaluation rule. *)
In SML, how a binding is evaluated depends on (roughly) the values of the
preceding bindings. Prior to the function binding (i.e., when f
is defined),
x
was bound to 1, so evaluating the function binding (i.e., calling f
)
returns 1 not 2. In other words, in SML, f
always returns the last value x was
bound to before f
was defined.
Let’s all take a moment to appreciate the nice behavior of R functions.


types room availabe 1bhk, 2bhk
hi this is parthiban may i help you
what is oops
Display the meters
i dont want book any hotel


Generate links for use with HAL payloads
addHydrator(string $class, \Zend\Hydrator\HydratorInterface $hydrator) : \PhlyRestfully\Plugin\RestfulJsonRenderer
string
\Zend\Hydrator\HydratorInterface
\PhlyRestfully\Plugin\RestfulJsonRenderer
createCollection(\PhlyRestfully\HalCollection | array | object $collection, null | string $route) : \PhlyRestfully\HalCollection
null
string
createCollectionFromMetadata(object $object, \PhlyRestfully\Metadata $metadata) : \PhlyRestfully\HalCollection
createLink(string $route, null | false | int | string $id, null | mixed $resource) : string
Triggers the "createLink" event with the route, id, resource, and a set of params that will be passed to the route; listeners can alter any of the arguments, which will then be used by the method to generate the url.
string
null
false
int
string
null
mixed
string
createResource(\PhlyRestfully\HalResource | array | object $resource, string $route, string $identifierName) : \PhlyRestfully\HalResource
string
string
createResourceFromMetadata(object $object, \PhlyRestfully\Metadata $metadata) : \PhlyRestfully\HalResource | \PhlyRestfully\HalCollection
fromLinkCollection(\PhlyRestfully\LinkCollection $collection) : array
fromResource(\PhlyRestfully\LinkCollectionAwareInterface $resource) : array
getController() : \Zend\Stdlib\DispatchableInterface
\Zend\Stdlib\DispatchableInterface
getEventManager() : \Zend\EventManager\EventManagerInterface
Lazy-initializes one if none present.
\Zend\EventManager\EventManagerInterface
getHydratorForResource(object $resource) : \Zend\Hydrator\HydratorInterface | false
If the resource has a mapped hydrator, returns that hydrator. If not, and a default hydrator is present, the default hydrator is returned. Otherwise, a boolean false is returned.
object
\Zend\Hydrator\HydratorInterface
false
injectSelfLink(\PhlyRestfully\LinkCollectionAwareInterface $resource, string $route, string $identifier)
renderCollection(\PhlyRestfully\HalCollection $halCollection) : array | \PhlyRestfully\ApiProblem
Injects pagination links, if the composed collection is a Paginator, and then loops through the collection to create the data structure representing the collection.
For each resource in the collection, the event "renderCollection.resource" is triggered, with the following parameters:
This event can be useful particularly when you have multi-segment routes and wish to ensure that route parameters are injected, or if you want to inject query or fragment parameters.
Event parameters are aggregated in an ArrayObject, which allows you to directly manipulate them in your listeners:
$params = $e->getParams();
$params['routeOptions']['query'] = array('format' => 'json');
\PhlyRestfully\HalCollection
array
\PhlyRestfully\ApiProblem
Associative array representing the payload to render; returns ApiProblem if error in pagination occursrenderResource(\PhlyRestfully\HalResource $halResource) : array
Creates a hash representation of the HalResource. The resource is first converted to an array, and its associated links are injected as the "_links" member. If any members of the resource are themselves HalResource objects, they are extracted into an "_embedded" hash.
\PhlyRestfully\HalResource
array
setController(\Zend\Stdlib\DispatchableInterface $controller)
\Zend\Stdlib\DispatchableInterface
setDefaultHydrator(\Zend\Hydrator\HydratorInterface $hydrator) : \PhlyRestfully\Plugin\RestfulJsonRenderer
\Zend\Hydrator\HydratorInterface
\PhlyRestfully\Plugin\RestfulJsonRenderer
setEventManager(\Zend\EventManager\EventManagerInterface $events)
\Zend\EventManager\EventManagerInterface
setMetadataMap(\PhlyRestfully\MetadataMap $map) : \PhlyRestfully\Plugin\HalLinks
| fluent | This method is part of a fluent interface and will return the same instance |
|---|
setServerUrlHelper(\Zend\View\Helper\ServerUrl $helper)
\Zend\View\Helper\ServerUrl
setUrlHelper(\Zend\View\Helper\Url $helper)
\Zend\View\Helper\Url


The define method can be used in two ways. Firstly, you can use the method to define a single new style:
js
var styleId = T5.Style.define('new-style', {
fill: '#FF0000',
opacity: 0.8
});
Additionally, instead of passing through a single style definition you can pass through multiple definitions in a single hit:
```js T5.Style.define({ blueStyle: { fill: '#0000FF' }, greenStyle: { fill: '#00FF00' } });


class: center, middle, inverse, title-slide # Uncoast Unconf Day-Zero Workshop ## git and Github cornucopia ### Amelia McNamara (
AmeliaMN
) ### 2019-04-14 --- ## git git is a version-control tool, typically used at the commandline. It's almost like a programming language, except it only does one thing (track changes to work). It allows you to "commit" changes to work, and associate descriptive messages with those stages of your work. There are other version control systems (most notably svn) but we're talking about git here because it works well with... --- ## GitHub GitHub is a website where you can share code with people on the internet. It is closely coupled with git, but you can use git without GitHub, and vice versa.  --- ## Versions  via [Mine Cetinkaya-Rundel](www2.stat.duke.edu/courses/Spring18/Sta199/) --- ## Versions  via [Mine Cetinkaya-Rundel](www2.stat.duke.edu/courses/Spring18/Sta199/) --- ## What we're trying to avoid  [PhD comics](http://phdcomics.com/comics/archive.php?comicid=1531) --- ## What we're doing this morning A high-level overview (I'll get more specific in a minute) 1. Make sure everything is set up on your computer 2. Fork a GitHub repository (Jenny Bryan's [bingo R package](https://github.com/jennybc/bingo)) 3. Clone it to your computer 4. Build the package locally 5. Make changes 6. Ensure the package still builds 7. Commit changes 8. Push changes to your fork of the repo 9. Submit a pull request If we have time... 10. Filing effective issues 11. Recovering from Git(Hub) failure 12. .gitignore --- ## Making sure everything is set up In your RStudio, you should have a pane that has at least two tabs, one labeled Console and the other Terminal. The Console is just for `R` code, and the Terminal is more general, for commandline tools. We'll be trying to do everything in the Console, but the Terminal is our fallback for git code. Let's first make sure you have the `usethis` package. In your Console, type ```r library(usethis) ``` If you get an error, install the `usethis` package, ```r install.packages("usethis") ``` Then, let's check the situation report on your current git/Github status. ```{} git_siterep() ``` Make sure that the User section at least knows your `Name` and `Email`. If one or both of those things are missing, flag one of us, and/or follow [Ian's day zero prep instructions](https://uncoast-unconf.github.io/uu-2019-day-zero/00-preparation/03-usethis/). --- ## Fork and clone a repo **Forking** a GitHub repository is essentially making your own copy of the code as it stands right now.  via [Jenny Bryan and Happy git with R](https://happygitwithr.com/) --- ## Fork and clone a repo **Cloning** is getting the files onto your own computer  via [Jenny Bryan and Happy git with R](https://happygitwithr.com/) --- ## Fork and clone a repo Usually you do them together,  via [Jenny Bryan and Happy git with R](https://happygitwithr.com/) --- ## Fork and clone a repo There are several different ways to fork and clone a repo. We'll be following the `usethis` way, using the `create_from_github()` function. This does all the work for us! Run this code in your Console and watch what prints. ```r create_from_github("jennybc/bingo", protocol = "https") ``` --- ## The bingo package You should now have a new RStudio project open, containing the code from the `bingo` package.  --- ## The bingo package You can also go on GitHub to view Jenny Bryan's version of the code, at [https://github.com/jennybc/bingo](https://github.com/jennybc/bingo) and *your* version of the code, at `https://github.com/[whatever your GitHub username is]/bingo`. For example, mine is at [https://github.com/AmeliaMN/bingo](https://github.com/AmeliaMN/bingo). Right now, all these places look pretty much the same, but we're going to start contributing to the package. --- ## Build tab Notice that the RStudio project for `bingo` has a new tab, called Build. This is because our project is for a package.  --- ## Install and Restart Let's begin by installing the package locally and restarting our R. Click the "Install and Restart" button and watch what happens in the pane and in the Console. --- ## Play with the package This package doesn't do too terribly much, but you can try out some of the functions in the package, like ```r get_topics() ``` ``` ## [1] "bad-data" "Bingo_Flowers" "boring-meeting" ## [4] "conference-call" "csama" "football" ## [7] "july4th" "manuscript-review" "open-data" ## [10] "stat-ecology" "useR-conf" "WeeklyJump" ``` and then pick a topic to see the cards of, like ```r get_topic("bad-data") ``` ``` ## [1] "Blank/null values aren't explained" ## [2] "Data that \"must exist\" does not, in fact, exist" ## [3] "Data that \"cannot exist\" does, in fact, exist" ## [4] "Duplicate rows" ## [5] "Metric? Imperial?  ## [6] "65,535 or 2,147,483,647 or 4,294,967,295" ## [7] "555-3485 or 867-5309" ## [8] "1970-01-01\nT00:00:00Z or 1969-12-31\nT23:59:59Z" ## [9] "January 1st, 1900 or January 1st, 1904" ## [10] "Data is \"helpfully\" pre-aggregated" ## [11] "Aggregates and computed totals don't match" ## [12] "Line ending chaos ... \\n vs \\r\\n vs \\r" ## [13] "Yo, I hear you like metadata mixed with your data" ## [14] "Spreadsheet has exactly 65,536 rows" ## [15] "Missing data that passes for real data, eg 0 or 99" ## [16] "Leading zeroes stripped to convert text to numbers" ## [17] "Inexplicable outliers" ## [18] "Garbled text suggests encoding problems" ## [19] "Data disguised as formatting" ## [20] "Ambiguous American date formats, eg 03/04/16" ## [21] "\"Virgin Birth\", ie no provenance" ## [22] "Location of 0°N 0°E, ie \"Null Island\"" ## [23] "Spelling mistakes that reek of hand-typed data" ## [24] "US zip codes 12345 or 90210" ``` --- ## Pull request Our eventual goal is to create a "pull request," to request that the GitHub repo owner (Jenny Bryan) incorporates some changes we have made.  via [Jenny Bryan and Happy git with R](https://happygitwithr.com/) --- ## Getting ready -- branch Before we start making changes, we should prepare for eventually making a pull request (often abbreviated PR when people are writing about them). We'll use the `pr_init()` function to do this. It's best practice to use a separate "branch" when you make contributions. The main version of the code is hosted in the "master" branch (you can probably see that word in the top right of your git pane) and your contributions might not initially synch up with that version.  via [tinned-software](https://blog.tinned-software.net/create-and-merge-git-branches/) --- ## Getting ready -- branch We'll branch off from the master using `pr_init()`. You need to come up with a name for your branch, and that name can be anything you want. ```r pr_init("amelia") # this is kind of a bad branch name, you probably want to be more descriptive! ``` Run some `pr_init()` code in your Console and see what prints. What happened to the top right of your git pane? --- ## Making a change I'm not going to talk about all the pieces of a package-- we'll get to that later today! So for now, just navigate into `bingo/inst/topics` (a folder within a folder in your Files pane) and click on one of the `.R` files there. It's filled with topics for a bingo card. There are a couple ways you could contribute to the package: - make a whole new bingo card (at least 24 topics!)-- this one is probably best as a group - add some topics to an existing bingo card - ?? Let's take some time to make a change somewhere in the package. If you're making a new card, you'll need to start a new `.R` file, and if you're adding topics to an existing card, just edit that `.R` file. Make sure you save your changes! --- ## Notice where changes appear Now that you've saved a change, you should see at least one thing in your git pane.  --- ## Commit your change Now, it's time to "commit" your change. This checks your changes into the git version control system. It's essentially telling git you have done something worth keeping track of. But, don't feel like you have to save this for a big change! In fact, it's best to commit early and often!  via [Jenny Bryan](https://github.com/jennybc/wtf-2019-rsc) and [Martin Fowler](https://martinfowler.com/bliki/FrequencyReducesDifficulty.html) --- ## Commit your change Click the commit button to get a pane to pop up showing the changes you can potentially commit.  --- ## Commit your change Select whatever you are interested in committing using the checkboxes. Then, write a "commit message" (a short description of what you've done) in the box that asks for the message, and click Commit. You'll get a bit of a message that indicates you've successfully committed. You can close that message.  --- ## Push your changes Again, there are many ways to push changes to GitHub. We're going to use the `usethis` method. ```r pr_push() ``` --- ## Push your changes Running this code will push your changes to your GitHub repository and initialize a pull request on the main repo (in this case, Jenny Bryan's repo). A browser window will pop up and show you how your pull request looks. If it's good to go, click the green button.  --- ## Not quite ready? If your pull request isn't quite ready, it might be the case that you need to go back and make some more changes. You can go back to RStudio, make another change, save it, commit it, and `pr_push()` again. --- ## Error? If you get an error saying you can't push because you don't own the repo, your "remotes" are probably mis-configured. You can't push directly to Jenny Bryan's repository, you need to push to *your* GitHub repository. To fix this issue, try something along these lines: ```r use_git_remote(name = "origin", url="https://github.com/AmeliaMN/bingo.git", overwrite=TRUE) # substitute your github username for mine use_git_remote(name = "upstream", url ="https://github.com/jennybc/bingo.git", overwrite=TRUE) ``` Now, check to make sure this looks right with ```r git_remotes() ``` Should look vaguely like this: ``` $origin [1] "https://github.com/AmeliaMN/bingo.git" $upstream [1] "https://github.com/jennybc/bingo.git" ``` --- # If we have time... --- ## Filing effective issues Usually, GitHub issues are used to track, well... issues. For example, [fct_lump() does not respect asking for most common n - 1 values #184](https://github.com/tidyverse/forcats/issues/184)  --- ## Filing effective issues To [file an issue](https://www.tidyverse.org/contribute/#issues), you usually need to start with a [reprex](https://www.tidyverse.org/help/#reprex). --- ## Using (and abusing?) issues Because we have this handy way to have conversation online, we often use issues for use cases they were not designed for. For example, for the unconf we've been [discussing dress code](https://github.com/uncoast-unconf/uu-2019/issues/21), [introducing ourselves](https://github.com/uncoast-unconf/uu-2019-day-zero/issues/11), etc. We've also been using issues to [discuss ideas for projects to work on](https://github.com/uncoast-unconf/uu-2019/issues) for the unconf. Let's take some time and look through those issues. Feel free to comment on issues that interest you, and/or create new issues! --- ## Recovering from Git(Hub) failure Scenario: You try to push and cannot What's the problem? There are changes on GitHub that you don't have. Pull. If the gods smile upon you, merge works. Now push. via [Jenny Bryan](https://github.com/jennybc/wtf-2019-rsc) --- ## Recovering from Git(Hub) failure Let's create this situation. Make sure local Git pane is clear. Make sure local and remote are synced (push, pull). Edit & commit to file *A* locally. Edit & commit to file *B* remotely. Try to push. You will fail. via [Jenny Bryan](https://github.com/jennybc/wtf-2019-rsc) --- ## Recovering from Git(Hub) failure ``` jenny@2015-mbp bunny-scarf $ git push & To github.com:jennybc/bunny-scarf.git ! [rejected] master -> master (fetch first) error: failed to push some refs to 'git@github.com:jennybc/bunny-scarf.git' hint: Updates were rejected because the remote contains work that you do hint: not have locally. This is usually caused by another repository pushing hint: to the same ref. You may want to first integrate the remote changes hint: (e.g., 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details. ``` Remedy?  You will see a merge commit, where the local and remote changes were reconciled. This is best case scenario and is likely with good Git habits (lots of small frequent commits and merges, no binary files in repo). via [Jenny Bryan](https://github.com/jennybc/wtf-2019-rsc) --- ## Recovering from Git(Hub) failure Recovering from Git(Hub) failure Scenario: You pull and get a merge conflict. What's the problem? GitHub can't figure out how to reconcile diffs. Resolve the conflicts. Or abort ... and come back later. via [Jenny Bryan](https://github.com/jennybc/wtf-2019-rsc) --- ## Recovering from Git(Hub) failure Let's create this situation. Make sure local Git pane is clear. Make sure local and remote are synced (push, pull). Edit & commit to file *A* locally. Make conflicting edit & commit to file *A* remotely. Try to push. You will fail. Try to pull. You will fail. All is fail. via [Jenny Bryan](https://github.com/jennybc/wtf-2019-rsc) --- ## Recovering from Git(Hub) failure ``` From github.com:jennybc/bunny-scarf 958548f..3357952 master -> origin/master Auto-merging README.md CONFLICT (content): Merge conflict in README.md Automatic merge failed; fix conflicts and then commit the result. <<<<<<< HEAD Wingardium Leviosaaaaaaaa ======= Wing-GAR-dium Levi-O-sa >>>>>>> 33579525d88af071268b0a0c64c54f357712589a ``` via [Jenny Bryan](https://github.com/jennybc/wtf-2019-rsc) --- ## .gitignore If there are things you don't want to check in to git and/or send to GitHub, you can either - be careful not to check the boxes next to those files when you commit, - or (more robust) add things to your `.gitignore` file If you've `git_vaccinate()`-ed yourself, you already have a pretty good `.gitignore` file! For example, you'll ignore the [.DS_Store crap](https://yihui.name/en/2017/09/ds-store-crap/). If you have other things you want to ignore in git, like sensitive data, big files, etc., you can edit your `.gitignore`. As always, there are many ways to do this, but we'll use the `usethis` way! ```r edit_git_ignore(scope="user") edit_git_ignore(scope="project") ``` --- # Thanks!


England in New Zealand: Sam Curran stars on day two in Mount Maunganui
by Marc Higginson| First Test, Bay Oval, Mount Maunganui, day two of five: |
| England 353: Stokes 91, Denly 74, Southee 4-88 |
| New Zealand 144-4: Williamson 51, S Curran 2-28 |
| New Zealand trail by 209 runs |
| Scorecard |
England continued to scrap their way into the ascendency on a hard-fought second day of the first Test against New Zealand.
Having ground their way to a competitive, if not imposing, 353 all out with the bat, their bowlers maintained the pressure to leave the hosts 144-4 at the close, trailing by 209.
Sam Curran took the key wicket of New Zealand captain Kane Williamson in the final hour, having made the initial breakthrough to dislodge Tom Latham.
Jack Leach and Ben Stokes also took wickets on another attritional day of Test cricket in Mount Maunganui, leaving Henry Nicholls and BJ Watling to watchfully see off the final few overs.
England fail to capitalise with bat
The tourists will be disappointed not to have a more substantial lead, having fallen from 277-4 to 353 all out - at one stage losing four wickets for 18 runs.
Going into the two-match series England spoke of adopting a more measured approach to batting in order to tire out the opposition attack and make run scoring easier for their middle-order strokemakers.
Here, though, a disciplined approach from the likes of Rory Burns, Joe Denly and Stokes on day one was squandered, and the end result was all too familiar - England once again failing to post a match-controlling first-innings total.
The mini collapse began when Stokes, who had looked in complete command of the bowling on his way to 91, came down the wicket to Tim Southee and slashed hard to first slip, where Ross Taylor took an excellent catch.
Ollie Pope (29) will be similarly disappointed to perish chasing a wide one, while Curran (0) and Jofra Archer (4) fell cheaply as Southee took three of the four wickets to fall.
Jos Buttler, in his first Test as England's wicketkeeper since displacing Jonny Bairstow, intelligently shepherded the tail from there - putting on 52 with Leach for the ninth wicket before carving a simple catch to Mitchell Santner at deep cover.
Stuart Broad lasted just 10 balls, meaning England fell to 353 all out on a pitch where they might have expected 400-plus.
"England would have started the day saying they were on course for 430 or more, so they were restrained a little by New Zealand," said Test Match Special commentator Jeremy Coney.
Curran leads England's bowling attack
New Zealand, though, made similar mistakes while using the same tactics.
Jeet Raval and Taylor were particularly culpable as they played horrible shots to pick out fielders at mid-wicket and on the square leg boundary respectively.
Williamson played nicely for his 31st Test half-century, although England will be cheered by the half-chances they created with clever fields designed to nullify the opposition captain's strengths through gully and third man.
Twice Williamson escaped playing chipped cuts through that area before he was surprised by a lifting delivery from Curran that suggested the wicket will become two-paced the further this match goes on.
Opener Latham, who like Williamson is ranked among the world's top 10 Test batsmen, was also dismissed by Surrey all-rounder Curran.
He was out lbw to one that straightened, walking off without reviewing despite replays showing a thin nick before the ball hit the pad.
Slow left-armer Leach, too, will be pleased with his wicket. While it was gifted by a poor shot, he will know New Zealand is not a country that traditionally favours spin bowling.
None of the last 101 wickets taken by New Zealand in their home country have fallen to spin - the last one being when England last toured in early 2018.
The day ended with Archer delivering a hostile spell of short-pitched bowling including hitting Nicholls on the head.
'Root had a good day' - analysis & reaction
Former England batsman Mark Ramprakash on Test Match Special: "Joe Root has had a good day as captain. He's got a real vote of confidence from Ashley Giles (England's director of men's cricket) and they've talked about building a team for the next Ashes series down under.
"At times in the past you've felt he's been one step behind the game but he's rotated his bowlers really well today.
"He brought Sam Curran on when it wasn't working with the new ball and he struck early.
"He got Jack Leach into the attack early and that will give him confidence and make him think he's a wicket-taking option."
England's Jack Leach: "The ball from Sam Curran to get Kane Williamson misbehaved and that's a good sign when you've got runs on the board.
"We would have liked to have got more runs, we were aiming for at least 400. We wanted that big score and we wanted a century in there and that's something we're working hard to do. Hopefully that'll come in the second innings."
New Zealand's Tim Southee: "It would have been nice to be three down tonight but we've still got batting to come.
"I thought we bowled well yesterday and we got our rewards for that today. We would have taken 6-112 at the start of the day."


A majority of this work was completed while I was at Offshoot Design, in Chicago. I spearheaded the iPad digital development work, which included custom developed iPad apps for project portfolios and client presentations. Working primarily with architecture firms and product design companies, the tools we made allowed users to navigate through digital models, animate their design, rotate objects around in space, and pull buildings apart. These hyper-custom applications were specific to the project and something only a handful of companies were doing at the time.
All of the examples you see below have been built specifically for the iPad. The graphic assets were created in Photoshop, the 3d models were mostly created in 3ds Max and rendered with VRay. Once all the elements were built, the document was built in InDesign and uploaded to the Adobe Digital Publishing Suite. From there, anyone with a login can access the document and all the functionality that comes with it. The iPad is a great tool for these kinds of projects because of the touch interactivity and control the user has. We were able to integrate several traditional forms of media mixed with hyper-custom features to create a dynamic portfolio for clients. For many, this was going to be the tool that they used to sell their product, so we needed to make sure it was robust, yet flexible.


User documentation¶
- Build documentation
- Build and initialize the workspace client
- Workspace typed objects
- Developing typed object definitions
- Type checking error messages
- Workspaces
- Objects
- Subsetting objects
- Traversing object references
- Locking and publishing workspaces
- Shock integration with the workspace service
- Workspace limits
- FAQ
- Known user-facing bugs
- Workspace API documentation


Authenticating...
Renewing tokens...
Redirecting....
Please use Log In button to authenticate in the system!


Summary
Pulp Fiction is a 1994 American black comedy neo-noir crime film written and directed by Quentin
Tarantino, from a story by Tarantino and Roger Avary.[4] Directed in a highly stylized manner, Pulp
Fiction connects the intersecting storylines of Los Angeles mobsters, fringe players, small-time
criminals, and a mysterious briefcase. The film's title refers to the pulp magazines and hardboiled
crime novels popular during the mid-20th century, known for their graphic violence and punchy
dialogue.
The screenplay of Pulp Fiction was written in 1992 and 1993, and incorporated some scenes originally
written by Avary for True Romance. Its plot, as in many of Tarantino's other works, is presented out of
chronological order. The film is also self-referential from its opening moments, beginning with a title
card that gives two dictionary definitions of "pulp". Considerable screen time is devoted to monologues
and casual conversations with eclectic dialogue revealing each character's perspectives on several
subjects, and the film features an ironic combination of humor and strong violence. Its script was
reportedly turned down by Columbia TriStar as "too demented". Miramax co-chairman Harvey Weinstein was
instantly enthralled with it, however, and the film became the first that Miramax fully financed.
Pulp Fiction won the Palme d'Or at the 1994 Cannes Film Festival, and was a major critical and commercial
success upon its U.S. release. It was nominated for seven Oscars, including Best Picture; Tarantino and
Avary won for Best Original Screenplay. John Travolta, Samuel L. Jackson, and Uma Thurman, each received
Academy Award nominations for their roles and revitalized and/or elevated their careers. The nature of
its development, marketing, and distribution — and its consequent profitability — had a sweeping effect
on the field of independent cinema.


20 Years of success in Jerusalem
Roads is a driving school located in Jerusalem with more that 100 teachers and 10,000 students. We teach all kinds of Vehicles including cars, vans and motorcycle.
We promise to be help you until the final test and even after! Call us for more information +9725466632 or just click here to leave us an email


--- layout: post title: Using Ruby, require, include and Mixins tags: - Coding - Tutorial status: publish type: post published: true meta: aktt_notify_twitter: "no" _aktt_hash_meta: "" _edit_last: "1" _wp_old_slug: "" --- When I first discovered Rails all those years ago I had not really heard of ruby. I think rails introduced a lot of new people to ruby such as my self. Its great for ruby to have all these new users however this is a problem as well. The problem is that people such as myself jump right in to rails with out fully understanding ruby or in my case even partly understanding ruby.  This can lead to some problems later down the line. It can also make other peoples code hard to read. This is a weakness and something that I have been working on skilling up on. This weakness was exposed today when I was trying to write an acts_as_method. I am currently working on a rule based AI system and I wanted to separate the underlying code of the AI system from the rails models that provide the knowledge. Thats where the acts_as_method comes in. However it came in rather slowly. My first hurdle was looking at the require vs include. Both sound the same but do different things. Its important to understand this. The require opens reads and evaluates the code with in a ruby file. So for example say I have a file called Person.rb. In this file there was a class called "Person". With me so far? I am working out of a file next to Person.rb called test.rb. Test.rb needs to know about Person.rb so that the Person class can be used. To do this we simply use
require 'Person.rb'
Simple enough. Ruby also supports shortcuts and will auto append the .rb so
require 'Person'
will also work. Again simple enough however all of a sudden it looks like we are talking about a class or a module here. This is what threw me a bit at first but remember it is the file. Directories work as you would expect. Say our person.rb is now in a models directory. Just use
require 'models/person'
Again no .rb but remember it is the file we are talking about. That brings us to include. Include in c++ for example includes a file the the way require works as described above but this is not the case in ruby.
In ruby we have mixins that allow use to add a module full of methods to any class we like. This is great and very handy as ruby does not support multiple inheritance. But who cares. Mixins are simple to use and make more sense. So lets consider the following
class Person
def say_goodbye
"goodbye"
end
end
module PersonMethods
def say_hello
"hello"
end
end
Person.include(PersonMethods)
Here we have a person class. We have a module with a method and we are using the include method to add the module methods to the person class. Now the person class will have both the say hello and say goodbye methods. The include is working on the program level. Not the file level. Very different to #include in c++ for example. I think form memory PHP has something smilier.
Who cares? Why do I need to do this? Why not just put both methods in the person class. Well you could do that and in this case its fine. However think about developing a Rails application for example. You might have some logic that you want to use in a number of Rails applications. Cuting and pasting code from one model to another is one way to it but what about the following?
ActiveRecord::Base.send :include, PersonMethods
This is one of my favorite things about ruby. You can add in methods to classes that have already been declared else where. You can add them when you need and you can break up your methods in different ways and add them at different times. All of a sudden your writing extra features in to rails with out even touching the source. Well the rails models at least.
This does not just stop at rails. You can apply this to any class anywhere. You can even apply it to core ruby classes. You can change the way ruby works at runtime! Check out the ruby homepage for lots more info.