{% extends "base.html" %} {% block title %} SQPub Easter Eggs - REST API {% endblock %} {% block content %}
POST /api/catch_create/
Sample request and response:
curl -X POST \ -F "player_id=75" \ -F "egg_code=453361b74ccf47fcb9e05ea60c56746b" \ "http://sqpub.ch/api/catch_create/" { "catch": { "date": "2017-04-05T08:34:41.250Z", "player": { "number_of_eggs": 22, "score": 1280, "id": 68, "name": "nst021" }, "egg": { "number_of_catches": 37, "points": 30, "image_url": "http://sqpub.ch/media/egg/None/SAM_2964.JPG", "name": "EggBob", "description": "" } }, "is_new_catch": false }
Sample errors:
HTTP 400 {"error_message":"player_id POST param is missing"} HTTP 400 {"error_message":"egg_code POST param is missing"} HTTP 404 {"error_message":"player with id 123 not found"} HTTP 404 {"error_message":"egg with code 123 not found"}
GET /api/players/name/:PLAYER_NAME/
Sample request and response:
curl "http://sqpub.ch/api/players/name/SQKaf/" [{"eggs": 3, "score": 130, "id": 75, "name": "SQKaf"}]
GET /api/players/
Sample request and response:
curl "http://sqpub.ch/api/players/" [ { "score": 15, "number_of_eggs": 1, "id": 1, "name": "myself" }, { "score": 50, "number_of_eggs": 4, "id": 2, "name": "asd" } ]
GET /api/player/:ID/
Sample request and response:
curl "http://sqpub.ch/api/player/75/" { "score": 130, "number_of_eggs": 3, "id": 75, "name": "SQKaf" }
Sample error:
HTTP 404 {"error_message":"player with id 123 not found"}
GET /api/eggs/
Sample request and response:
curl "http://sqpub.ch/api/eggs/" [ { "description": "", "number_of_catches": 1, "points": 10, "image_url": "http://sqpub.ch/media/egg/x/test.png", "id": 4, "name": "test" }, { "description": "bla bla bla", "number_of_catches": 1, "points": 10, "image_url": null, "id": 5, "name": "miaou" } ]
GET /api/egg/:ID/
Sample request and response:
curl "http://sqpub.ch/api/egg/57/" { "description": "", "number_of_catches": 35, "points": 50, "image_url": "http://sqpub.ch/media/egg/None/egg_mr__burns__eggcellent_by_cpsnewestproxy-d8ghdql.jpg", "id": 57, "name": "Eggcellent" }
Sample error:
HTTP 404 {"error_message":"egg with id 123 not found"}
GET /api/egg/:CODE/
Sample request and response:
curl "http://sqpub.ch/api/egg/39295ba0f55548258dfffcbbd54acafd/" { "description": "", "number_of_catches": 35, "points": 50, "image_url": "http://sqpub.ch/media/egg/None/egg_mr__burns__eggcellent_by_cpsnewestproxy-d8ghdql.jpg", "id": 57, "name": "Eggcellent" }
Sample error:
HTTP 404 {"error_message":"egg with code 39295ba0f55548258dfffcbbd54acafd not found"}
GET /api/catches/
Sample request and response:
curl "http://sqpub.ch/api/catches/" [ { "id": 1, "player_id": 7, "date": "2017-04-07T19:28:52.855Z", "egg_id": 3 }, { "id": 2, "player_id": 4, "date": "2017-03-27T18:32:59.706Z", "egg_id": 5 } ]
GET /api/catches/player/:ID/catches/
Sample request and response:
curl "http://sqpub.ch/api/player/2/catches/" [ { "id": 1, "player_id": 2, "date": "2017-04-07T19:28:52.855Z", "egg_id": 3 }, { "id": 2, "player_id": 2, "date": "2017-03-27T18:32:59.706Z", "egg_id": 5 } ]
GET /api/player/:ID/eurochicken/
Sample request and response when EuroChicken has not started:
curl "http://sqpub.ch/api/player/12/eurochicken/" { "proposed_egg": null, "proposed_egg_catch_url": null, "next_eurochicken_start": "2017-04-13T12:59:02Z" }
Sample request and response when EuroChicken has started:
curl "http://sqpub.ch/api/player/12/eurochicken/" { "proposed_egg": { "description": "", "number_of_catches": 5, "points": 15, "image_url": null, "id": 2, "name": "Eggcellent" }, "proposed_egg_catch_code": "b315e70fe0bc458597870c05c3fe71fa", "next_eurochicken_start": "2017-04-13T10:55:02Z" }
Sample error:
HTTP 404 {"error_message":"player with id 12 not found"}
GET /api/player/:ID/eurochicken/:CODE/
Sample request and response when EuroChicken is available:
curl "http://sqpub.ch/api/player/12/eurochicken/127e5c3962d04e05a62d65b47734a126/" { "catch": { "date": "2017-04-12T23:25:57.905Z", "player": { "score": 50, "number_of_eggs": 4, "id": 12, "name": "yxc" }, "egg": { "description": "", "number_of_catches": 5, "points": 15, "image_url": null, "id": 2, "name": "Eggcellent" }, "id": 21 }, "is_new_catch": false }
Sample errors:
HTTP 404 {"error_message": "player with id 12 not found"} HTTP 400 {"error_message": "player cannot use eurochicken code 127e5c3962d04e05a62d65b47734a126"}{% endblock %}


--- layout: newsstory title: OF COURSE WE'RE NOT DEPRESSED match: Cambridge 2 Yeltz 0 ---
After all, what is there to be depressed about? We have got one point in the last four games. Clean sheets count for nothing, so who cares that we haven't had one this season?
The game at Cambridge followed the usual trend of us looking reasonable without actually creating anything and then letting in a couple of pretty average goals with some pretty average defending. To be fair, the injury crisis meant that Rob Elmes had to play up front for what I can only assume was for the first time ever, and their keeper did make one good save.


coronavirus
Covid-dashboard
coronavirus
chevron_left
category_name
chevron_right
Last updated:
Global Recovered
Global Deaths
today
All Time
supervisor_account
All Cases
Country
Cases
Death
Recover
search
clear
chevron_left
category_name
chevron_right
chevron_left
category_name
chevron_right


Rent Forecasting
{{ prediction_text }}
Predict Rent
Borough:
-- select a borough --
Brooklyn
Manhattan
Queens
Bedrooms:
Bathrooms:
Square Footage:
Minutes to Subway:
Building Age:
Floor:
No Fee:
-- select Yes/No --
Yes
No
Has Roofdeck:
-- select Yes/No --
Yes
No
Has Patio:
-- select Yes/No --
Yes
No
Has Gym:
-- select Yes/No --
Yes
No
Has Washer/Dryer:
-- select Yes/No --
Yes
No
Has Doorman:
-- select Yes/No --
Yes
No
Has Elevator:
-- select Yes/No --
Yes
No
Has Dishwasher:
-- select Yes/No --
Yes
No


Emergency crews on scene of rollover crash in Dayton
by Breaking News StaffDAYTON — Emergency crews are on the scene of a crash near the intersection of Hoover Avenue and Brooklyn Avenue in Dayton that left an SUV overturned off the road.
We are working to learn more and will update this story with any new information.


As part of the SmartESB we have the ability to freeze different versions of flows. This is very useful for for a number of reasons, the main one being it allows us to set in stone what flows we will release. So if we froze the current flows in the Skeleton Bundle, they would be at version 0, and the “real” flows would be at version 1. This means that for our production environments we can point to (in parameters.yml) version 0 of the flows because we know they have been tested, but on our development we can point to version 1 and take advantage of new flows that were added since the freeze point. This can work quite well with most development life cycles.
So, now to the part on how to freeze the flows, this is done using a Symfony Command in the class FreezeFlowsCommand.php in the Camel Config Bundle. We run the following and it will take care of the rest.
php app/console smartesb:flows:freeze
Depending on your configuration and where you have set the location of “frozen_flows_directory” in config.yml, you can go to that directory and now you will see a new folder for your frozen flows. The version of the new frozen flows will be the current version plus one.
To change between version you can modify “flows.version: “ in parameters.yml to point to the version of the flows you want. If you set the number to a flow version that does not exist it will default to the “real” flows.


This is my second professional act, with the past decade plus being in sales, account management, and leadership.
My focus is currently on react.js-based applications with some integrations into SQL and NoSQL databases. Please enjoy the projects showcased in the "portfolio" section, and feel free to connect with me on one of my profiles below.


WITNESS LIST
Education
March 21, 2017 9:00 AM
FOR:
Adams, Dollie Parent (Self), Houston, TX
Armke, Sharon Retired Texas Public School Teacher (Self), Dripping Springs, TX
Ayala, Caryl Teacher (Self), Austin, TX
Bejar, Rafa Policy Advisor (Texas Public Policy Foundation), San Antonio, TX
Bodenger, Melissa (Self), Austin, TX
Buelter, Daphne Goliad County Treasurer (Self), Goliad, TX
Buelter, Kenneth W. Goliad Republican Chairman (also providing written testimony)
(Homeschool/parents), Goliad, TX
Butcher, Jonathan Education Director (Goldwater Institute), Phoenix, AZ
Carey, Callie (also providing written testimony) (Self), Houston, TX
Castaneda, Gina (N/A), San Antonio, TX
Castaneda, Robert (Self), San Antonio, TX
Castillo, Ezzard Executive Director (River City Christian School), San Antonio, TX
Culotta, Stanley President Emiritus (also providing written testimony) (Self; Holy Cross
of San Antonio), San Antonio, TX
DeAngelis, Corey A. Distinguished Doctoral Fellow (also providing written testimony)
(University of Arkansas), Fayetteville, AR
Dippel, Colleen Executive Director (Families Empowered), Houston, TX
Duerstine, Russ Senior Field Director (also providing written testimony) (Concerned
Veterans For America), San Angelo, TX
Dupre, Arthur State Director (ACE Scholarships), Metairie, LA
Feigenbaum, Rabbi Aryeh Rabbi (Congregation of Ohr Hatorah & Agudath Israel of
America), Dallas, TX
Fincher, David President (also providing written testimony) (Self; National Child Care
Coalition), Mesquite, TX
Finger, Jack M. Citizen (Self), San Antonio, TX
Flowers, Charles E. Sr. Pastor, Faith Outreach Center, Int'l. (San Antonio in Black, White,
and Brown), San Antonio, TX
Frederichson, Chris Headmaster (Upward Hope Academy), Galveston, TX
Frederickson, Cathy Executive Director (Upward Hope Academy), Galveston, TX
Gore, Deb Mrs. (Self), Austin, TX
Greener, Jerome (also providing written testimony) (N/A), Dallas, TX
Greener, Patrick (also providing written testimony) (Self), San Antonio, TX
Hettinger, Ann Public Policy Director (also providing written testimony) (Center for the
Preservation of American Ideals (CPAI)), Rockwall, TX
Hock, Stacy (Self), Austin, TX
Hoffman, Adam Chairman (also providing written testimony) (High School Republicans
of Texas), Houston, TX
Hucker, Rebecca (Self), Cedar Park, TX
Jaquez, Jorge (ACE Scholarships), Thornton, CO
Jensen, Scott Senior Advisor (American Federation for Children), Brookfield, WI
Katz, Rabbi Yisroel Director of Development (Torah Day School of Dallas), Dallas, TX
WITNESS LIST
Education
March 21, 2017 9:00 AM
Kisner, Helen (Self), Austin, TX
Lambert, Tim President (also providing written testimony) (TX Home School Coalition),
Lubbock, TX
Lennon, Robin President & Co-Founder (Kingwood TEA Party, Inc.), Kingwood, TX
Lima, Jorge Executive Director (also providing written testimony) (The LIBRE Initiative),
Arlington, VA
Long, Matt (Self; Fredericksburg Tea Party), Fredericksburg, TX
Mandell, Noelle Citizen (also providing written testimony) (Self), Houston, TX
Martin, Melissa C. ECS/CTE Public Teacher (Self), Deer Park, TX
McDonald, Dana Parent (Self), Houston, TX
Mendez, Ruben Pastor of Islesia Cornerstone (also providing written testimony) (Self),
San Antonio, TX
Mendoza, Roy Citizen-USA-Texas (also providing written testimony) (Self), San
Antonio, TX
Middleton, Mayes Middleton Oil Company, President (Self), Wallisville, TX
Moore, Jason (Rural Texans for School Choice), Uvalde, TX
Morris, Lalla V. Director of Finance & Operations (also providing written testimony)
(Families Empowered), Houston, TX
Morris, Mack Mr. (also providing written testimony) (Self), Dallas, TX
Newman, Jeremy Policy Director (Texas Home School Coalition), Lubbock, TX
Oropeza, Favianna (ACE Scholarships), Denver, CO
Panju, Arif Attorney (Institute for Justice), Austin, TX
Parker Jr., Allan E. President (also providing written testimony) (The Justice Foundation),
San Antonio, TX
Rainey, Norton President (ACE Scholarships), Parker, CO
Rollins, Brooke President & CEO (Texas Public Policy Foundation), Fort Worth, TX
Sass, Emily (Self), Austin, TX
Schoolfield, Robert Director of Texas for Parent Choice in Education (Organization),
Austin, TX
Servalde, Daniel Economics Educator (Self), Plano, TX
Sheetz, Samuel Policy Director (also providing written testimony) (Americans for
Prosperity-Texas), Austin, TX
Singleton, James Peace Officer/Homeschool Dad (Self), Houston, TX
Smith, Angela M. (Self; Fredericksburg Tea Party), Fredericksburg, TX
Spano, Matt (Self), Fort Worth, TX
Stivers, Allison Mother (Self), Houston, TX
Tatum Jr., Rev. Kyev P. President (Fort Worth SCLC), Fort Worth, TX
Venable, Peggy (Self), Austin, TX
Williams, Ruben Pastor of Islesia Cornerstone (also providing written testimony) (Self),
San Antonio, TX
Wise, Summer Parent (also providing written testimony) (Self), Austin, TX
Yancy, Justin President (Texas Business Leadership Council), Austin, TX
AGAINST:
Allison, Abigail (Self; Family), Conroe, TX
WITNESS LIST
Education
March 21, 2017 9:00 AM
Allison, Leah (Self), Conroe, TX
Banks, Yannis (Texas NAACP), Austin, TX
Blackburn, Angela Constituent (also providing written testimony) (Children and family),
Huffman, TX
Bussey, Faith (Texans for Homeschool Freedom), Arlington, TX
Candelaria, Noel President (Texas State Teachers Association), Austin, TX
Carazos-Rayna, C LeRoy VP Government Affairs (also providing written testimony) (San
Antonio Hispanic Chamber of Commerce), San Antonio, TX
Clarke, Debby Parent (also providing written testimony) (Self), Austin, TX
Corbin, Donna President (also providing written testimony) (Texas Classroom Teachers
Association (TCTA)), Lubbock, TX
Duron, Dr. Jodi Superintendent (also providing written testimony) (Self; TASA; Bastrop
County School Districts (Elgin ISD, Bastrop ISD, McDapple ISD, Smithville ISD)), Elgin,
TX
Exter, Monty Lobbyist (ATPE), Austin, TX
Flores, Lisa (Self; Member of Autism Society of Texas), Austin, TX
Frandsen, Barbara (also providing written testimony) (League Women Voters), Austin, TX
Gonzalez, Zechariah (Self), Austin, TX
Greene, Erin (also providing written testimony) (Self), Kingwood, TX
Holbrook, Lisa Texas PTA President (also providing written testimony) (Texas PTA),
Houston, TX
Hooks, Traci (Self), Haslet, TX
Keeling, Tami Trustee Victoria ISD (also providing written testimony) (TASB and
Victoria ISD), Victoria, TX
King, Geren (Self), Denton, TX
King, Read (Self), Denton, TX
Lilly, Janna Director of Govt. Relations (TCASE), Austin, TX
Litzinger, Amy Policy Specialist (Self), Austin, TX
Litzinger, Linda Advocate and Caregiver (also providing written testimony) (Self;
Family), Austin, TX
Luke, Charles Coordinator (Coalition for Public Schools), Weatherford, TX
Malfaro, Louis President Texas AFT (Texas American Federation of Teachers), Austin, TX
Moreno, Celino Attorney (also providing written testimony) (Mexican American Legal
Defense and Educational Fund), San Antonio, TX
Myers, Terry Superintendent Crockett ISD (Crockett ISD), Crockett, TX
Patterson, Anne-Charlotte Creative Director/Southern Combustion Creative (Self), Austin,
TX
Prior, Andy Spokesperson (Self; Texans for Homeschool Freedom), Arlington, TX
Puente, Jaime N/A (also providing written testimony) (Self), Houston, TX
Reyes, Dr. Gus Director, Christian Life Commission (also providing written testimony)
(Texas Baptists Christian Life Commission), Austin, TX
Reyes, Lico Immigration Chair (LULAC TX), Arlington, TX
Russell, Ginger Director Texans For Home School Freedom (also providing written
testimony) (Texans For Homeschool Freedom), Magnolia, TX
WITNESS LIST
Education
March 21, 2017 9:00 AM
Smisko, Ann Depurty Director (also providing written testimony) (Raise Your Hands
Texas), Austin, TX
Stevenson, Sara O'Henry Middle School Librarian (also providing written testimony)
(Self; All 5 million TX public school children), Austin, TX
Suter, Maggie Parent (Self), Austin, TX
Wells, Kathleen Bd. Member (Texas Impact), Austin, TX
Ybarra, Velma Grandparent, State Education Chair (also providing written testimony)
(LULAC; HOPE Hispanics Organization for Public Ed.), San Antonio, TX
York, Ruth (Self), Cisco, TX
Young, Audrey President, Board of Trusteed Apple Springs ISD (Apple Springs ISD),
Lufkin, TX
ON:
Burke, Lindsey Director, Education Policy (The Heritage Foundation), Washington, DC
Feltscher, Inez Director (American Legislative Exchange Council), Washington, DC
Henricksen, Aaron Analyst (Legislative Budget Board), Austin, TX
Hinojosa, David Nat'l Director of Policy (also providing written testimony) (IDRA), SA,
TX
Ladner, Matthew Senior Research Fellow (Charles Koch Institute), Phoenix, AZ
Lubienski, Christopher Professor (also providing written testimony) (Self; Raise Your
Hand Texas), Urbana, TX
MacLaurin, Andy Manager, Public Education Team (Legislative Budget Board), Austin,
TX
Peshek, Adam Director (Foundation for Excellence in Education), Tallahassee, FL
Smith, Aaron Policy Analyst (Reason Foundation), Houston, TX
Swanson, Steve (also providing written testimony) (Self; Retired Bus. Exec. 20 yr
volunteer in TX Education), Austin, TX
Valenzuela, Angela Professor (also providing written testimony) (Texas Center for
Education Policy-UT Austin), Austin, TX
Worthington, Greg Research Assistant, Doctoral Student (also providing written
testimony) (Texas Center for Education Policy, UT-Austin), Austin, TX
Registering, but not testifying:
FOR:
Aberra Castro, Maria-Jose Student (Self), Cedar Park, TX
Ahrens, Paul Owner (Kids R Kids Learning Agency), Katy, TX
Amtson, Kurt Owner (Kids R Kids East Allen-Preschool), Allen, TX
Carroll, John Owner (Kids R Kids Learning Agency), Sugar Land, TX
Ciano, Lawrence A Pres. Kendall Co. TX Tea Party (Self; KCTTP), Boerne, TX
Cloutier, Matthew Owner Childcare Facility (Kids 'R' Kids), Frisco, TX
Corser, Meagan (Self), Argyle, TX
Covo, Amanda (Self), Austin, TX
Delgado, Bertha ETLNA President (St. Mary's Catholic School), Austin, TX
Dorazio, Mark Legislative Comm. (State Republican Executive Committee SREC), SA,
TX
Flores, Robert (Texas Citizens Austin Network), Austin, TX
WITNESS LIST
Education
March 21, 2017 9:00 AM
Frederick, Wendy Owner (Private Child Care), Cypress, TX
Frederick III, Darold (Self), Cypress, TX
Gambini, Christopher (Self), Carrollton, TX
Gilbert, Mercedes Owner (Private Child Care), Georgetown, TX
Goldman, Michael R. Policy Education & Outreach (Texas Conservative Coalition),
Austin, TX
Gutierrez, John J. Class President GC (Self), San Antonio, TX
Hastings, Paul Self (Self), Lago Vista, TX
Hodge, Glenna Attorney (Self), Spicewood, TX
Howsley, Stephen Public Policy Analyst (Self; Texas Home School Coalition), Dallas, TX
Hudgens, Nicole Policy Analyst (Texas Values), Austin, TX
Hutson, Lonnie (Self), Sugarland, TX
Little, Anna Legislative Analyst (Self; Texas Home School Coalition), Tyler, TX
Little, Emma Legislative Anaylst (Self; Texas Home School Coalition), Tyler, TX
Long, Buddy (Self), Austin, TX
Lyons, Robert (Self), Spring Branch, TX
Moffat, Patrick E. Retired Senior Vice President (Holy Cross High School San Antonio
TX), New Braunsfels, TX
Moore, Audra (Rural Texans for School Choice), Uvalde, TX
Murphy, Joseph W. (Self), Fredericksburg, TX
Perry, Sharon Owner (Kids R Kids), Katy, TX
Poe, Kurt Owner (Kids R Kids), Georgetown, TX
Roberts, Dr. Kevin Executive Vice President (Texas Public Policy Foundation), Austin, TX
Saenz, Jonathan President (Texas Values), Austin, TX
Spraggins, Doris (Self), Fredericksburg, TX
Steinhauser, Randan Texas Advisor (Ed Choice), Austin, TX
Wilson, Columba P. (Self), San Antonio, TX
Wood, Cecilia M. Attorney (Self; Texas Homeschool Coalition; Center for the
Preservation of American Ideals), Austin, TX
AGAINST:
Adams, Blake Special Education (SLC) Teacher Houston ISD (Self), Houston, TX
Albert, Dr. David Vice President Adjunct Faculty (ACC AFT), Austin, TX
Anderson, Cindy Austin ISD Trustee AA-Large Place 8 (Austin ISD), Austin, TX
Barhydt, Fred Trustee, Georgetown ISD (Georgetown ISD), Georgetown, TX
Beck, Nancy (Self), New Braunfels, TX
Bingham, Gary School Board Member (Mesquite ISD), Mesquite, TX
Bokros, Kathleen (Self), Georgetown, TX
Bostic, Robert Superintendent of Schools (Stafford Municipal School District), Stafford,
TX
Camarillo, Lydia Vice President (Southwest Voter Registration Education Project), San
Antonio, TX
Campbell, Amy U.S. Citizen/Parent of children in TX public school (Self), Austin, TX
Chadwell, Charles Trustee-RRISD (RRISD School Board), Round Rock, TX
WITNESS LIST
Education
March 21, 2017 9:00 AM
Chapman, Bill Superintendent (Jarrell ISD), Jarrell, TX
Claiborne, Tommy CEO Bastrop Care Clinic (Self; Bluebonnet Counseling Assc.),
Bastrop, TX
Cornell, Victor Statewide Advocacy Manager (American Civil Liberties Union of Texas
(ACLU-TX)), Austin, TX
Cowan, Julie Austin ISD Trustee (AISD), Austin, TX
Craft, Renee Mom (My autistic son, Autism Society), Austin, TX
David, Suzi Trustee (Round Rock ISD School Board), Round Rock, TX
Davidson, Nita (N/A), Georgetown, TX
Davies, Will Reading Specialist, Manor ISD (Self), Austin, TX
De Leon, Marty (Texas Urban Council), Austin, TX
De Los Santos, Renato Director (LULAC National Education Service Centers, INC.),
Dallas, TX
Doyle, Cynthia President Elect (Texas Counseling Association), Krum, TX
Elenz, Amber Austin ISD Trustee (Austin ISD and its 84,000 students/12,000 employees),
Austin, TX
Enriquez, Christopher District Director (LULAC (League of United Latin American
Citizens)), Dallas, TX
Espey, Jennifer Parent-SBISD, Parents For Full & Fair Funding of Texas Public Schools
(Parents For Full & Fair Funding), Houston, TX
Fernandez, Vanessa Student (LULAC), Hidalgo, TX
Fletcher, Carol Pflugerville ISD Board of Trustees (Pflugerville ISD), Pflugerville, TX
Flores, Juan H. (Self), San Antonio, TX
Foster Johnson, Charles Pastor (Bread Fellowship of Fort Worth), Fort Worth, TX
Fox, Kim (Texas Counseling Association), San Antonio, TX
Frandsen, Dana C. Retired (Self), Austin, TX
Galvan, Lourdes National LULAC VP for Women (LULAC), San Antonio, TX
Garcia, Angela Pres. United Democrat Sen. #26 (LULAC Council #649 - District 15), San
Antonio, TX
Garcia, Cristina (Self), Frisco, TX
Garcia, Natalie (Texas Counseling Association), Denton, TX
Garrett, James Business Manager (Jarrell ISD/Texas Taxpayers), Waco, TX
Gauwain, Megan Students/TX State University (Texas Counseling Association), San
Marcos, TX
Gonzalez, Mario J. LULAC Civil Rights Co. Chair State LULAC (LULAC), San Marcos,
TX
Gonzalez, Patricia Vice President (William C. Velasquez Institute), San Antonio, TX
Gower, Allison Parent (Parents For Full and Fair Funding of Texas Public Schools),
Houston, TX
Gregg, Brock (Self), Austin, TX
Haenisch, Barry Executive Director (Texas Association of Community Schools), Austin,
TX
Harrison, Emily Behavior Analyst (Self), Austin, TX
Harrison, Valerie T. Teacher (Self), Houston, TX
WITNESS LIST
Education
March 21, 2017 9:00 AM
Hernandez, Linda Community Leader (LULAC Austin), Austin, TX
Howe, Savannah Graduate Student (Self), San Antonio, TX
Jarl McCombs, Jennifer (Self), Austin, TX
Jimenez, Jasmine Student (LULAC), Houston, TX
Lara, Rene Legislative Director (Texas AFL-CIO), Austin, TX
Lofland, K. Sue Jarrell ISD Board of Trustees (Jarrell ISD), Georgetown, TX
Maldonado, Emma Teacher (Self), Houston, TX
Manuel, Carlos Member (LULAC (League of United Latin American Citizens)), Dallas,
TX
Martinez, Israel N/A (Self), Austin, TX
Martinez, Louann (Fort Worth ISD; El Paso ISD; Dallas ISD;), Austin, TX
Mathias, Dr. Jayme Trustee (Austin ISD), Austin, TX
Maynard, Beth (Self), Rising Star, TX
McCampbell, Andrea (Self), San Marcos, TX
McLain, Robert Superintendent (Channing ISD), Channing, TX
Meed, Alex A. (N/A), Round Rock, TX
Miller, Kathy Executive Director (Texas Freedom Network), Austin, TX
Mineo, Sharon (Self), Austin, TX
Moore LPC-S, Kathleen Licensed Professional Counselor (Self), Bastrop, TX
Moreno, Mozelle Intern (MALDEF), San Antonio, TX
Morrison, Kristi Licensed Professional Counselor (Texas Counseling Association),
Houston, TX
Moses, Mason Trustee (Round Rock ISD School Board), Round Rock, TX
Moses Bolton, Henrietta Registered Nurse-School Nurse (Self), Houston, TX
Motheral, Mike Executive Director (Small Rural School Finance Coalition), Lubbock, TX
Mott, Vernagene Pflugerville ISD Board of Trustees President (Texas Association of
School Boards Director), Pflugerville, TX
Munoz, Manuel Alejandro President (Austin LULAC Young Adult Council #22318),
Austin, TX
Nichols, Colby Attorney (Texas Rural Education Association; Instructional Material
Coordinating Assoc. of Texas), Austin, TX
Noble, Shannon Government Affairs Counsel (Texas Industrial Vocational Assoc.), Austin,
TX
O'Mahoney, Rachel Licensed Professional Counselor (Texas Counseling Association),
Elgin, TX
Ogletree Jr., John D. Pastor (First Metropolitan Church), Houston, TX
Oliver, Matt (Self), Austin, TX
Palacios Cruces, Jasmine A/ College Student (LULAC), Manor, TX
Piccola, Kyle Government Relations Officer (The Arc of Texas), Austin, TX
Polanco, Allison QMHP-CS (Self), Austin, TX
Pounds, Brandy (TX Counseling Assoc.), Aubrey, TX
Proctor, Carrie Certified School Counselor (Self), Round Rock, TX
Pulte, Gregory Parent (Self), Austin, TX
WITNESS LIST
Education
March 21, 2017 9:00 AM
Richards, Joanne (Self), Austin, TX
Roberson, Deborah Licensed Professional Counselor (Roberson Counseling Center, PLLC
dba Thriveworks), Pflugerville, TX
Rodriguez, Edith District III Deputy For Youth LULAC (LULAC), Dallas, TX
Rogers, Don (Self), Buda, TX
Rome, Christy Executive Director (Texas School Coalition), Austin, TX
Romero, Jesse (Texas Association for Bilingual Education), San Antonio, TX
Rumancik, Beth Self (Self), Austin, TX
Rumancik, Robin Marketing Coordinator (Self), Austin, TX
Russell, Calvin Parent (Self), Magnolia, TX
Ryan, Michelle (Self), Elgin, TX
Saldana Harmon, Belinda TACHE President (Texas Latino Education Coalition), San
Antonio, TX
Sandoval, Isabel Teacher (Self), Houston, TX
Sesaz, Omar LPC (Self), Missouri City, TX
Sharpe, Mary H. Steering Committee contact (Friends For Civil Action), Austin, TX
Sheffield, Heather (Self; Eanes Advocates), Austin, TX
Sikes, Chloe Graduate Student in Ed. Policy (TLEC-Texas Latino Education Coalition),
Austin, TX
Spence, Nancy Certified School Counselor (Self), Austin, TX
Subrin Yeager, Laura Individual taxpayer (Self; 3 children), Austin, TX
Teich, Ann Trustee, Austin ISD (Self), Austin, TX
Terry, Mark Deputy Executive Director (Self; Texas Elementary Principals and
Supervisors Association), Grapevine, TX
Torres, Lupe State Director (Texas LULAC), San Antonio, TX
Tower, Sarah (Self; Zilker PTA), Austin, TX
Valadez, Cynthia Texas LULAC District VII Deputy Director for Elderly (Organization),
Austin, TX
Vasquez, Daniel Chair (Harris Co. Tejano Democrats), Houston, TX
Waggoner, Pam Sch Bd Trustee, Leander (Self), Austin, TX
Welden, Sabrina Parent (Self; MISD), Balch Springs, TX
Willis, Jolie Dir of Communications/Claycomb Assoicates (Self), Austin, TX
Zapote, Abigail (Self), Denton, TX
Zendejas, Alejandra UT Student/UT LULAC President (Self), Dallas, TX
Zollo, Margarita Student (LULAC), Houston, TX
ON:
Belew, Kara Dep. Commissioner of Finance (Texas Education Agency), Austin, TX
Davis, Lisa Tax Analyst (Texas Comptroller of Public Accounts), Austin, TX
Dittmar, Chris Revenue Estimating Division (Comptroller), Austin, TX
Fernandez, Linda Director of Educational Opportunities (Texas Comptroller of Public
Accounts), Austin, TX
Jones, Christopher Attorney (Texas Education Agency), Austin, TX
Lopez, Leo Chief School Finance Officer (TEA), Austin, TX
WITNESS LIST
Education
March 21, 2017 9:00 AM
Providing written testimony:
FOR:
Adams, Cassandra (Self), Dripping Springs, TX
Ginn, PhD, Vance Economist (Texas Public Policy Foundation), Austin, TX
Goodsheller, Miranda Governmental Affairs Manager (Texas Association of Business),
Austin, TX
Prewett, Matt Founder (Texas Parents Union), Cedar Park, TX
Sevilla, Philip President (Texas Leadership Institute), San Antonio, TX
Thompson Lyons, Tempie (Self), Spring Branch, TX
Wong, Stephen Director of Asian Engagement (Republican Party of Texas (RPT)), Austin,
TX
AGAINST:
Anderson, David Consultants to Arlington ISD Board of Trustees (Arlington ISD Board of
Trustees), Austin, TX
Blakely, Carla (Self), Bastrop, TX
Carney, Dee Associate w/ Moak, Casey & Associates (Texas School Alliance), Austin, TX
Filipelli, Laurie Educator, writing coach (Self; Literacy Women in Action), Austin, TX
Graves, Ashlea Director, Goverment Relations (Houston ISD (HISD)), Houston, TX
Griffith, Vive Writer & Educator/Professor (Self), Austin, TX
Love, Julia Teacher (ret'd) (Self), Mico, TX
Miyakawa, Felicia (Self), Round Rock, TX
Pinchero, Renee Professor for Rhetoric and Composition (Self; Literary Women in
Austin), Austin, TX
Sansom, Elizabeth Conference Logistics Manager (Self), Austin, TX
Smith, Michelle Consultant (Texas Association of School Business Officials), Austin, TX


@* * This template is called from the `index` template. This template * handles the rendering of the page header and body tags. It takes * two arguments, a `String` for the title of the page and an `Html` * object to insert into the body of the page. *@ @(title: String)(content: Html)(implicit flash: Flash, messages: Messages)
@* Here's where we render the page title `String`. *@


.equals()
being called to compare two java.math.BigDecimal
numbers. This is normally
a mistake, as two java.math.BigDecimal
s are only equal if
they are equal in both value and scale.
Example: if (new BigDecimal("2.0").equals(new BigDecimal("2.00"))) {}
After the quick-fix is applied, the result looks like this:
if (new BigDecimal("2.0").compareTo(new BigDecimal("2.00")) == 0) {}


| amputil (version 1.3) | index /home/meurer/ACS/Pipeline/Apsis/apsis-4.2.4/python/utils/amputil.py |
License
=======
Copyright (c) 2009, The Johns Hopkins University
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer. Redistributions in binary
form must reproduce the above copyright notice, this list of conditions and
the following disclaimer in the documentation and/or other materials provided
with the distribution. Neither the name of the Johns Hopkins University nor
the names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.

(This license is based on the BSD license
http://www.opensource.org/licenses/bsd-license.html)
| Modules | ||||||
|
| Functions | ||
|
| Data | ||
| __author__ = 'J. Blakeslee<EMAIL_ADDRESS>__version__ = '1.3' __version_date__ = '2006/07/21 20:17:22' less_equal = <ufunc 'less_equal'> |
| Author | ||
| J. Blakeslee<EMAIL_ADDRESS>|


Everything You Need. To try out a new Recipe
You have a Recipe in mind? Create your own through our App!
Cook with new recipe with step by step guidelines.
Follow and save the Recipes you like!
Our app Meister Koch is available on Apple Store & Google Play Store. Download it now!
The sleek user experience from Sign up to your step step guide to trying out a new Recipe.
The App is very fast as it is developed and maintained by industry standards.
The sleek and asthetic design of the app gives it the attractive look.
APP
DOWNLOADS
Happy
Clients
ACTIVE
ACCOUNTS
TOTAL
APP RATES
iOS Guy
Android Guy


Obadiah 1:21
And saviours shall come up on mount Zion to judge the mount of Esau; and the kingdom shall be the LORD's.


Fishing Guild Member:
Which area's monsters in the Gludio territory would you like to see?
Windmill Hill
Langk Lizardmen Dwellings
Wasteland
Windy Hill
The Ant Nest
The Ant Incubator
Windawood Manor


THERE ARE NO COMPANIES IN THE CORPORATE DATABASE AT THIS TIME.
YOU HAVE NO COMPANIES BOOKMARKED.
"{{ corporate.company.slogan }}"
{{ corporate.company.majorsList }}
{{ corporate.company.industryList }}
{{ corporate.company.overview }}
{{ corporate.company.mission }}
{{ corporate.company.goals }}
{{ corporate.company.model }}


3
Arithmetic Battle is a game to test and improve your arithmetic skills and fast thinking.
The number inside the answer box is randomly generated at the beginning of the game and when you make a correct statement.
Main Objects are divided into two categories. The Operators and The Operands. The Operators consists of addition , subtraction , multiplication and division. The Operands are the Objects that contains numbers
Main Objects has Three States.Which are Normal state, Disabled State and Highlighted state
If the Background Color of the object is white. this means that the Object is at Normal State, meaning you can tap the object to use it to your statement of equation.
When the Object is disabled you cannot tap or use it. At the Beginning of the game all operators are disabled until you tap an operand. After you tap an operand all operands will now be disabled and all of operators will go to normal state and vice versa.
If an object is highlighted it means that you are using it on your current equation which can be seen at the equation bar. You cannot use the object on your equation if it is already highlighted
This button lets you add 1 to the current number in the answer box, but as a consequence it will cause for an additional drop of object.
This button lets you deduct 1 to the current number in the answer box, but as a consequence it will cause for an additional drop of object.
This serves as a guide to what you had tap in sequence.
If you tap an object by mistake or you realized you tap the wrong object You can use this button to delete it to the equation bar and then tap the correct object.
Submit the statement or equation in the equation bar. If the answer to your submitted equation is equal to the number inside the Answer Box. You will get a score and the Highlighted objects will be removed from the canvas.
High priority Division and Multiplication
Low priority Addition and Subtraction
From Left to right it will compute all of Division and Multiplication first and if there are none left, Again from left to right it will now compute the remaining equation which are Addition and Subtraction. See Below Examples
2 * 3 /2 +10 /2 = 8
6 / 2 + 10 / 2 = 8
3 + 10 / 2 = 8
3 + 5 = 8
2 / 3 *2 + 10/2 = 5
0 * 2 + 10 / 2 = 5
0 + 10 /2 = 5
0 + 5 = 5
If your dividend is lower than the divisor the answer will always be 0
5 / 6 = 0
2 / 3 = 0
If the quotient has remainder disregard the remainder
3 / 2 = 1
9 / 5 = 1


Toggle navigation
HOME
ABOUT US
PRODUCTS
Sportswear
Soccer
Basketball
Tennis
Swimwear
Rugby
Golf
Clothing
T-Shirts / Top
Polo
Hoodies
Pullover/Jumper
Bermuda
Trousers
Dress Shirt
Jackets
Rain Jacket
Active Wear
Fitness / Gym / Yoga
Running
Work Wear
Uniform
Industrial / Engineering Work
Hospital
Restaurant
Bags
Sports Bag
Back Pack
Gym Sack
Travel Bag
Trolley Bag
Duffel Bag
Tote Bag
Pouch
GALLERY
Production Tour
CONTACTS
Bags
Gym Sack
Gym Sack
`
Gym Sack
Product Quick Overview
Art No : HOA-05-03-01-103
Description
Sizes
Available in all sizes
BACK TO PRODUCTS
Sportswear
We Manufacture all sportswear like Soccer Wears, Basketball Wears, Swimwear, Rugby Wears and Tennis Wear
Clothing
We are Manufacturing Professional Products like T Shirts, Hoodies, Sweat Shirts, Apparels, etc.
Active Wear
We are Manufacturing Professional Products like Swimming Suits, Running Suits, Yoga Wears, Outer Wears etc.
Work Wear
We are Manufacturing for your Hand and Body Protection During any work like Industrial Work, Gardening work etc.
Bags
We are Manufacturing Bags like Traveling, Sports etc.
HOME
ABOUT HOME OF APPAREL
PRODUCTS
GALLERY
CONTACT


Upcoming events in {{ group.name }}
{% content_objects group "dregni.Event" as events %}
{% with events|upcomingevents|qslimit:20 as events %}
{% if events %}
{% for event in events %}
{% include "dregni/event_summary.html" %}
{% endfor %}
{% else %}
No upcoming events.
{% endif %}
{% endwith %}


Click or touch a stick to view its details. 1|2|3 fingers to rotate|zoom|pan. Click title to reset view.
View statistics


When user types in input it should scroll the page to make input on top. Only scrolls on small screens.


[gecode-users] Space and variables cloning
Guido Tack
tack at ps.uni-sb.de
Tue Mar 28 21:03:28 CEST 2006
Hi.
> OK. I saw this copy method, however I thought it existed only
> for internal purposes. If I understand well, I only need to
> write :
>
> qs2 = static_cast<QSpace> (qs->clone(false))
>
> Am I right on this point ? (I tested it and it seems to work
> so far, but I prefer asking for confirmation...)
I guess it might have to be static_cast<QSpace *> (qs->clone(false)), but
apart from that that's exactly how it works. You may want to call
clone(true) (or just clone()) - the argument "false" means that shareable
datastructures are not shared, which is mainly needed in a multi-threaded
environment.
Cheers,
Guido
--
Guido Tack
http://www.ps.uni-sb.de/~tack
More information about the gecode-users
mailing list


Winning a Trip to The Googleplex
I just won a free trip to the Google Headquarters. How did I do it?
For the last three years, Google has run an international programming competition, Google Code-In, for pre-university students between the ages of 13 and 17. There are ten open-source software organizations that take part and create sets of programming tasks, usually requiring the student to write a small amount of code. After completing one task, students earn a certificate that will be mailed to them. After completing three tasks, students win a Google t-shirt.
What’s most interesting, however, is the grand prize. Each of the ten organizations name two students as grand prize winners, making a total of twenty winners. A winner receives a four-night all-expenses-paid trip to Google’s headquarters (a.k.a. The Googleplex) in Mountain View, California. The winners get to speak with Google engineers, tour Google, visit San Francisco, and receive additional prizes (swag); last year’s winners each received a Galaxy Nexus smart phone!
When I discovered this competition on December 1st — a few days after it began — I thought “well this would be a fun way to win a free t-shirt!” And so I began contributing code to a game called Hedgewars, completing tasks. Within a few days, I earned my shirt, but I didn’t feel like stopping. I didn’t even have the grand prize in mind; I was making significant contributions to the game and its main developers were loving my work. It was too rewarding to stop.
24 hours before the contest ended, I decided to re-read the rules of the competition. In doing so, I discovered that only the top-five students within each organization are considered for the grand prize — of which two will win.
I was in 6th place.
The most intense all-nighter of my life happened on the morning of January 14th, 2013. Yep, that’s a Monday. I may have called in sick to school. Adrenaline flowing, I completed more tasks in the last 24 hours of the competition than I have in the first seven weeks. Arc Riley, the head of the organization, took notice.
I made 5th place, and felt fantastic. Perhaps partly due to the residual adrenaline. I was satisfied that I made it as a finalist, because otherwise I would have automatically lost any chance of winning the grand prize, and all of my work would have been for nothing. Well, not nothing, but you know what I mean.
I participated in this competition just to win a t-shirt, and ended up a finalist, which by itself is good enough for me. But then I won.


{% if not cookies.beacon %}
By use of this Beacon Service, I agree to forego any attempt to re-identify individuals represented in Beacon Service Replies, except where expressly authorized by law or by a written prior permission from the respective DAC.
We use cookies to enhance your experience on this website.
{# More information #}


Buffalo Plains [ap70], plain, in Imperia, peasants: 10000
Last updated Turn #148
Buffalo Plains [ap70], plain, in Imperia, peasants: 10000
------------------------------------------------------------------------
0: Garrison [ah4e], garrison, Imperial Empire, with ten peasants guards
0: Buffalo Plains [ap70].
9: Swampboy [b1u], Imperial Empire, with two peasants, 40 nazgul, arrived
9: from the west.
30: Overcrowding causes zero peasant deaths.
Province controlled by Castle Thorbardin [v46], castle, in Thorbardin
Mountains [ao69]
Ruled by The Bard [s2a], duke
Border closed.
Entrance fees:
Routes leaving Buffalo Plains:
North, mountain, to Imperial Mountains [ao70], 10 days
East, plain, to Buffalo Plains [ap71], 7 days
Garrison [fq1h], garrison, Imperial Empire, with two peasants
Border closed.
South, forest, to Imperial Forest [aq70], 8 days
Garrison [in5v], garrison, Imperial Empire, with ten peasants
Border closed.
West, plain, to Buffalo Plains [ap69], 7 days
Garrison [ek0o], garrison, Imperial Empire, with six soldiers
Border closed.
Inner locations:
Rylla [ad8h], city, 1 day
Seen here:
Garrison [ah4e], garrison, Imperial Empire, with ten peasants
* Swampboy [b1u], Imperial Empire, with two peasants, 40 nazgul


Virtual movie room
Galaxy
Video coin
Leap demo 1
Leap demo 3
UML diagram
Object picking
Sparks on contact
Glow example using simple shader
Shader based glow changing color with time
Perlin noise applied to a sphere;s shape
Rotating concert ticket
Topology Viewer


<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier<EMAIL_ADDRESS>* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */
namespace Symfony\Component\Console\CommandLoader; use Symfony\Component\Console\Exception\CommandNotFoundException;
/** * A simple command loader using factories to instantiate commands lazily. * * @author Maxime Steinhausser<EMAIL_ADDRESS>*/ class FactoryCommandLoader implements CommandLoaderInterface { private $factories; /** * @param callable[] $factories Indexed by command names */ public function __construct(array $factories) { $this->factories = $factories; } /** * {@inheritdoc} */ public function has(string $name) { return isset($this->factories[$name]); } /** * {@inheritdoc} */ public function get(string $name) { if (!isset($this->factories[$name])) { throw new CommandNotFoundException(sprintf('Command "%s" does not exist.', $name)); } $factory = $this->factories[$name]; return $factory(); } /** * {@inheritdoc} */ public function getNames() { return array_keys($this->factories); } }


--- layout: post title: Linux for the ungodly? tags: - Linux - Personal Opinion status: publish type: post published: true meta: {} --- Linux for Christians | Ichthux
Ichthux is an operating system aimed at Christian usersAnd so the though comes to mind, "What would Linux for atheists look like?". Answers on a post card please....
powered by performancing firefox


Command Line Options
Usage: pub [options] [dir]
Specifying dir will direct pub to a different working directory.
-h, --help
Output usage information on the command line.
-A, --no-open
Disable auto-open in browser (mac only).
-p, --port {port}
Override the default server port [3001].
-t, --theme {name}
Override the default theme with different module-name or dir, repeatable.
-o, --output-path {dir}
Override the default output directory [.].
-O, --output-only
Generate a set of output html together with static files into the output directory, and exit.
-G, --html-only
Output only generated html files and exit.
-r, --root <prefix>
Prefix urls with a static root, "." means path relative.
-s, --static {dir}
Override default static directory [.].
Also supports {dir},{route}. E.g. pub -s ./static/img,./images
.
-S, --static-only {dir}
Serve only static files from {dir}. May use output options from pub-config.
-C, --config
Show the current configuration on the command line and exit.
-I, --ignore-config
Ignore the pub-config file in the current directory. This is useful when previewing a README in a directory which is being used for a site or theme with a pub-config.
-P, --pages
Show a list of pages and templates on the command line and exit.
-w, --watch-pkgs
Also watch inside packages, useful during package development.
-W, --no-watch
Disable the watcher, E.g. to prevent watching network directories.
-K, --no-sockets
Disable websockets, E.g. to reduce noise while debugging.
-E, --no-editor
Serve the rendered HTML only, no built-in editor.
-m, --minify
Minify browser scripts to reduce their download size (implicit with -O)
-d, --dbg
Serve scriptmaps with browser scripts, and send DEBUG to the client-side.
-D, --debug
Start node with --debug for server-side debugging (also implies -d)
-B, --debug-brk
Start node with --debug-brk (also implies -d)


The EvalAI project is fully open source, and is maintained by a large community of volunteers on
Github. We are in need of coders and designers so if you would like to help out, please drop us a line! The best way to get started is to write us at
<EMAIL_ADDRESS>or ping us on our
Gitter Channel.


bptool module
This module provides routines for computing the winning probabilities for various candidates, given audit sample data, using a Bayesian model, in a ballot-polling audit of a plurality election. The election may be single-jurisdiction or multi-jurisdiction. In this module we call a jurisdiction a "county" for convenience, although it may be a precinct or a state or something else, as long as you can sample from its collection of paper ballots.
The Bayesian model uses a prior pseudocount of "+1" for each candidate.
If this module is imported, rather than used stand-alone, then the procedure compute_win_probs can compute the desired probability of each candidate winning a full recount, given sample tallies for each county.
For command-line usage, there are really two modes:
(1) For single-county usage, give a command like: python bptool.py 10000 60 50 30 where 10000 is the total number of votes cast in the county 60 50 30 are the votes seen for each candidate in the auditing so far
(2) For multiple-county usage, give a command like python bptool.py --path_to_csv test.csv where test.csv is a file like: county name, total votes, Alice, Bob 1, 1000, 30, 15 2, 2000, 40, 50 with one header line, then one line per county. The field names "county name" and "total votes" are required; the candidate names are the candidate names for the contest being audited.
There are optional parameters as well, to see the documentation of them, do python bptool.py --h
More description of Bayesian auditing methods can be found in:
A Bayesian Method for Auditing Elections
by Ronald L. Rivest and Emily Shen
EVN/WOTE'12 Proceedings
http://people.csail.mit.edu/rivest/pubs.html#RS12z
Bayesian Tabulation Audits: Explained and Extended
by Ronald L. Rivest
2018
http://people.csail.mit.edu/rivest/pubs.html#Riv18a
Bayesian Election Audits in One Page
by Ronald L. Rivest
2018
http://people.csail.mit.edu/rivest/pubs.html#Riv18b
# bptool.py
# Authors: Ronald L. Rivest, Mayuri Sridhar, Zara A Perumal
# April 22, 2018
# python3
"""
This module provides routines for computing the winning probabilities
for various candidates, given audit sample data, using a Bayesian
model, in a ballot-polling audit of a plurality election. The
election may be single-jurisdiction or multi-jurisdiction. In this
module we call a jurisdiction a "county" for convenience, although it
may be a precinct or a state or something else, as long as you can
sample from its collection of paper ballots.
The Bayesian model uses a prior pseudocount of "+1" for each candidate.
If this module is imported, rather than used stand-alone, then the procedure
compute_win_probs
can compute the desired probability of each candidate winning a full recount,
given sample tallies for each county.
For command-line usage, there are really two modes:
(1) For single-county usage, give a command like:
python bptool.py 10000 60 50 30
where
10000 is the total number of votes cast in the county
60 50 30 are the votes seen for each candidate in the auditing so far
(2) For multiple-county usage, give a command like
python bptool.py --path_to_csv test.csv
where test.csv is a file like:
county name, total votes, Alice, Bob
1, 1000, 30, 15
2, 2000, 40, 50
with one header line, then one line per county. The field names
"county name" and "total votes" are required; the candidate names are
the candidate names for the contest being audited.
There are optional parameters as well, to see the documentation of them, do
python bptool.py --h
More description of Bayesian auditing methods can be found in:
A Bayesian Method for Auditing Elections
by Ronald L. Rivest and Emily Shen
EVN/WOTE'12 Proceedings
http://people.csail.mit.edu/rivest/pubs.html#RS12z
Bayesian Tabulation Audits: Explained and Extended
by Ronald L. Rivest
2018
http://people.csail.mit.edu/rivest/pubs.html#Riv18a
Bayesian Election Audits in One Page
by Ronald L. Rivest
2018
http://people.csail.mit.edu/rivest/pubs.html#Riv18b
"""
import argparse
from copy import deepcopy
import csv
import sys
import numpy as np
##############################################################################
## Random number generation
##############################################################################
# This function is taken from audit-lab directly.
def convert_int_to_32_bit_numpy_array(v):
"""
Convert value v, which should be an arbitrarily large python integer
(or convertible to one) to a numpy array of 32-bit values,
since this format is needed to initialize a numpy.random.RandomState
object. More precisely, the result is a numpy array of type int64,
but each value is between 0 and 2**32-1, inclusive.
Example: input 2**64 + 5 yields np.array([5, 0, 1], dtype=int)
Input Parameters:
-v is an integer, representing the audit seed that's being
passed in. We expect v to be non-negative.
Returns:
-numpy array created deterministically from v that will
be used to initialize the Numpy RandomState.
"""
v = int(v)
if v < 0:
raise ValueError(("convert_int_to_32_bit_numpy_array: "
"{} is not a nonnegative integer, "
"or convertible to one.").format(v))
v_parts = []
radix = 2 ** 32
while v > 0:
v_parts.append(v % radix)
v = v // radix
# note: v_parts will be empty list if v==0, that is OK
return np.array(v_parts, dtype=int)
def create_rs(seed):
"""
Create and return a Numpy RandomState object for a given seed.
The input seed should be a python integer, arbitrarily large.
The purpose of this routine is to make all the audit actions reproducible.
Input Parameters:
-seed is an integer or None. Assuming that it isn't None, we
convert it into a Numpy Array.
Returns:
-a Numpy RandomState object, based on the seed, or the clock
time if the seed is None.
"""
if seed is not None:
seed = convert_int_to_32_bit_numpy_array(seed)
return np.random.RandomState(seed)
##############################################################################
## Main computational routines
##############################################################################
def dirichlet_multinomial(sample_tally, total_num_votes, rs):
"""
Return a sample according to the Dirichlet multinomial distribution,
given a sample tally, the number of votes in the election,
and a random state. There is an additional pseudocount of
one vote per candidate in this simulation.
Input Parameters:
-sample_tally is a list of integers, where the i'th index
in sample_tally corresponds to the number of votes that candidate
i received in the sample.
-total_num_votes is an integer representing the number of
ballots that were cast in this election within the county.
-rs is a Numpy RandomState object that is used for any
random functions in the simulation of the remaining votes. In particular,
the gamma functions are made deterministic using this state.
Returns:
-multinomial_sample is a list of integers, which sums up
to the total_num_votes - sample_size. The i'th index represents the
simulated number of votes for candidate i in the remaining, unsampled
votes.
"""
sample_size = sum(sample_tally)
if sample_size > total_num_votes:
raise ValueError("total_num_votes {} less than sample_size {}."
.format(total_num_votes, sample_size))
nonsample_size = total_num_votes - sample_size
pseudocount_for_prior = 1
sample_with_prior = deepcopy(sample_tally)
sample_with_prior = [k + pseudocount_for_prior
for k in sample_with_prior]
gamma_sample = [rs.gamma(k) for k in sample_with_prior]
gamma_sample_sum = float(sum(gamma_sample))
gamma_sample = [k / gamma_sample_sum for k in gamma_sample]
multinomial_sample = rs.multinomial(nonsample_size, gamma_sample)
return multinomial_sample
def generate_nonsample_tally(sample_tally, total_num_votes, seed):
"""
Given a sample_tally, the total number of votes in an election, and a seed,
generate the nonsample tally in the election using the Dirichlet multinomial
distribution.
Input Parameters:
-sample_tally is a list of integers, where the i'th index
in sample_tally corresponds to the number of votes that candidate
i received in the sample.
-total_num_votes is an integer representing the number of
ballots that were cast in this election within the county.
-seed is an integer or None. Assuming that it isn't None, we
use it to seed the random state for the audit.
Returns:
-nonsample_tally is list of integers, which sums up
to the total_num_votes - sample_size. The i'th index represents the
simulated number of votes for candidate i in the remaining, unsampled
votes.
"""
rs = create_rs(seed)
nonsample_tally = dirichlet_multinomial(sample_tally, total_num_votes, rs)
return nonsample_tally
def compute_winner(sample_tallies, total_num_votes, vote_for_n,
seed, pretty_print=False):
"""
Given a list of sample tallies (one sample tally per county)
a list giving the total number of votes cast in each county,
and a random seed (an integer)
compute the winner in a single simulation.
For each county, we use the Dirichlet-Multinomial distribution to generate
a nonsample tally. Then, we sum over all the counties to produce our
final tally and calculate the predicted winner over all the counties in
the election.
Input Parameters:
-sample_tallies is a list of lists. Each list represents the sample tally
for a given county. So, sample_tallies[i] represents the tally for county
i. Then, sample_tallies[i][j] represents the number of votes candidate
j receives in county i.
-total_num_votes is a list of integers. Each integer represents the total
number of votes cast in a given county. So, total_num_votes[i] represents
the total votes for county i. The sum of all total_num_votes[i] is the
total number of votes in the entire election.
-seed is an integer or None. Assuming that it isn't None, we
use it to seed the random state for the audit.
-vote_for_n is an integer, parsed from the command-line args. Its default
value is 1, which means we only calculate a single winner for the election.
For other values n, we simulate the unnsampled votes and define a win
for candidate i as any time they are in the top n candidates in the final
tally.
-pretty_print is a Boolean, which defaults to False. When it's set to
True, we print the winning candidate, the number of votes they have
received and the final vote tally for all the candidates.
Returns:
-winners is a list of integers, representing the indices of the candidate
who won the election. It's size equals the vote_for_n parameter, which
defaults to 1.
"""
final_tallies = None
for i, sample_tally in enumerate(sample_tallies): # loop over counties
nonsample_tally = generate_nonsample_tally(
sample_tally, total_num_votes[i], seed)
final_county_tally = [sum(k)
for k in zip(sample_tally, nonsample_tally)]
if final_tallies is None:
final_tallies = final_county_tally
else:
final_tallies = [sum(k)
for k in zip(final_tallies, final_county_tally)]
final_tallies = [(k, final_tallies[k]) for k in range(len(final_tallies))]
final_tallies.sort(key = lambda x: x[1])
winners_with_tallies = final_tallies[-vote_for_n:]
winners = [winner_tally[0] for winner_tally in winners_with_tallies]
if pretty_print:
results_str = ''
for i in range(len(winners)):
results_str += (
"Candidate {} is a winner with {} votes. ".format(
winners[i], final_tallies[winners[i]][1]))
results_str += (
"The final vote tally for all the candidates "
"was {}".format(
[final_tally[1] for final_tally in final_tallies]))
print(results_str)
return winners
def compute_win_probs(sample_tallies,
total_num_votes,
seed,
num_trials,
candidate_names,
vote_for_n):
"""
Runs num_trials simulations of the Bayesian audit to estimate
the probability that each candidate would win a full recount.
In particular, we run a single iteration of a Bayesian audit
(extend each county's sample to simulate all the votes in the
county and calculate the overall winner across counties)
num_trials times.
Input Parameters:
-sample_tallies is a list of lists. Each list represents the sample tally
for a given county. So, sample_tallies[i] represents the tally for county
i. Then, sample_tallies[i][j] represents the number of votes candidate
j receives in county i.
-total_num_votes is a list of integers representing the number of
ballots that were cast in this election. Each integer represents the total
number of votes cast in a given county. So, total_num_votes[i] represents
the total votes for county i. The sum of all total_num_votes[i] is the
total number of votes in the entire election.
-seed is an integer or None. Assuming that it isn't None, we
use it to seed the random state for the audit.
-num_trials is an integer which represents how many simulations
of the Bayesian audit we run, to estimate the win probabilities
of the candidates.
-candidate_names is an ordered list of strings, containing the name of
every candidate in the contest we are auditing.
-vote_for_n is an integer, parsed from the command-line args. Its default
value is 1, which means we only calculate a single winner for the election.
For other values n, we simulate the unnsampled votes and define a win
for candidate i as any time they are in the top n candidates in the final
tally.
Returns:
-win_probs is a list of pairs (i, p) where p is the fractional
representation of the number of trials that candidate i has won
out of the num_trials simulations.
"""
num_candidates = len(candidate_names)
win_count = [0]*(1+num_candidates)
for i in range(num_trials):
# We want a different seed per trial.
# Adding i to seed caused correlations, as numpy apparently
# adds one per trial, so we multiply i by 314...
seed_i = seed + i*314159265
winners = compute_winner(sample_tallies,
total_num_votes,
vote_for_n,
seed_i)
for winner in winners:
win_count[winner+1] += 1
win_probs = [(i, win_count[i]/float(num_trials))
for i in range(1, len(win_count))]
return win_probs
##############################################################################
## Routines for command-line interface and file (csv) input
##############################################################################
def print_results(candidate_names, win_probs, vote_for_n):
"""
Given list of candidate_names and win_probs pairs, print summary
of the Bayesian audit simulations.
Input Parameters:
-candidate_names is an ordered list of strings, containing the name of
every candidate in the contest we are auditing.
-win_probs is a list of pairs (i, p) where p is the fractional
representation of the number of trials that candidate i has won
out of the num_trials simulations.
-vote_for_n is an integer, parsed from the command-line args. Its default
value is 1, which means we only calculate a single winner for the election.
For other values n, we simulate the unnsampled votes and define a win
for candidate i as any time they are in the top n candidates in the final
tally.
Returns:
-None, but prints a summary of how often each candidate has won in
the simulations.
"""
print("BPTOOL (Bayesian ballot-polling tool version 0.8)")
want_sorted_results = True
if want_sorted_results:
sorted_win_probs = sorted(
win_probs, key=lambda tup: tup[1], reverse=True)
else:
sorted_win_probs = win_probs
if vote_for_n == 1:
print("{:<24s} \t {:= 0
sample_tally.append(count)
sample_tallies.append(sample_tally)
for i, sample_tally in enumerate(sample_tallies):
assert 0 <= sum(sample_tally) <= total_num_votes[i]
return sample_tallies, total_num_votes, candidate_names
def main():
"""
Parse command-line arguments, compute and print answers.
"""
parser = argparse.ArgumentParser(description=\
'Bayesian Audit Process For'
'A Single Contest '
'Across One or More Counties')
parser.add_argument("total_num_votes",
nargs="?",
help="(Optional: for single-county audits:)"
"The total number of votes"
"(including the already audited ones) "
"that were cast in the election.")
parser.add_argument("single_county_tally",
help="(Optional: for single-county audits:)"
" the tally given as space separated numbers,"
"e.g. 5 30 25",
nargs="*",
default=[],
type=int)
parser.add_argument("--path_to_csv",
help="If the election spans multiple counties, "
"the sample tallies should be given in a csv file."
"Give here the csv file pathname as an argument. "
"In the header row, one of the column names "
"of the csv file must be Total Votes and another "
"can be County Name. Other columns are the names "
"or identifiers for candidates.")
parser.add_argument("--audit_seed",
help="For reproducibility, we provide the option to "
"seed the randomness in the audit. If the same "
"seed is provided, the audit will return the "
"same results.",
type=int,
default=1)
parser.add_argument("--num_trials",
help="Bayesian audits work by simulating the data "
"which hasn't been sampled to estimate the "
"chance that each candidate would win a full "
"hand recount. This argument specifies how "
"many trials are done to compute these "
"estimates.",
type=int,
default=10000)
parser.add_argument("--vote_for_n",
help="If we want to simulate voting for multiple "
"candidates at a time, we can use this parameter "
"to specify how many candidates a single voter "
"can vote for. The simulations will then count a candidate"
"as a winner, each time they appear in the top N "
"of the candidates, in the simulated elections.",
type=int,
default=1)
args = parser.parse_args()
if args.path_to_csv is None and args.total_num_votes is None:
parser.print_help()
sys.exit()
if args.path_to_csv:
# if sample tallies are in CSV file read that
sample_tallies, total_num_votes, candidate_names = \
preprocess_csv(args.path_to_csv)
else:
# otherwise extract desired data from command line
total_num_votes = [int(args.total_num_votes)]
sample_tallies = [args.single_county_tally]
candidate_names = list(range(1, len(sample_tallies[0]) + 1))
vote_for_n = args.vote_for_n
win_probs = compute_win_probs(\
sample_tallies,
total_num_votes,
args.audit_seed,
args.num_trials,
candidate_names,
vote_for_n)
print_results(candidate_names, win_probs, vote_for_n)
if __name__ == '__main__':
main()
Functions
def compute_win_probs(
sample_tallies, total_num_votes, seed, num_trials, candidate_names, vote_for_n)
Runs num_trials simulations of the Bayesian audit to estimate the probability that each candidate would win a full recount.
In particular, we run a single iteration of a Bayesian audit (extend each county's sample to simulate all the votes in the county and calculate the overall winner across counties) num_trials times.
Input Parameters:
-sample_tallies is a list of lists. Each list represents the sample tally for a given county. So, sample_tallies[i] represents the tally for county i. Then, sample_tallies[i][j] represents the number of votes candidate j receives in county i.
-total_num_votes is a list of integers representing the number of ballots that were cast in this election. Each integer represents the total number of votes cast in a given county. So, total_num_votes[i] represents the total votes for county i. The sum of all total_num_votes[i] is the total number of votes in the entire election.
-seed is an integer or None. Assuming that it isn't None, we use it to seed the random state for the audit.
-num_trials is an integer which represents how many simulations of the Bayesian audit we run, to estimate the win probabilities of the candidates.
-candidate_names is an ordered list of strings, containing the name of every candidate in the contest we are auditing.
-vote_for_n is an integer, parsed from the command-line args. Its default value is 1, which means we only calculate a single winner for the election. For other values n, we simulate the unnsampled votes and define a win for candidate i as any time they are in the top n candidates in the final tally.
Returns:
-win_probs is a list of pairs (i, p) where p is the fractional representation of the number of trials that candidate i has won out of the num_trials simulations.
def compute_win_probs(sample_tallies,
total_num_votes,
seed,
num_trials,
candidate_names,
vote_for_n):
"""
Runs num_trials simulations of the Bayesian audit to estimate
the probability that each candidate would win a full recount.
In particular, we run a single iteration of a Bayesian audit
(extend each county's sample to simulate all the votes in the
county and calculate the overall winner across counties)
num_trials times.
Input Parameters:
-sample_tallies is a list of lists. Each list represents the sample tally
for a given county. So, sample_tallies[i] represents the tally for county
i. Then, sample_tallies[i][j] represents the number of votes candidate
j receives in county i.
-total_num_votes is a list of integers representing the number of
ballots that were cast in this election. Each integer represents the total
number of votes cast in a given county. So, total_num_votes[i] represents
the total votes for county i. The sum of all total_num_votes[i] is the
total number of votes in the entire election.
-seed is an integer or None. Assuming that it isn't None, we
use it to seed the random state for the audit.
-num_trials is an integer which represents how many simulations
of the Bayesian audit we run, to estimate the win probabilities
of the candidates.
-candidate_names is an ordered list of strings, containing the name of
every candidate in the contest we are auditing.
-vote_for_n is an integer, parsed from the command-line args. Its default
value is 1, which means we only calculate a single winner for the election.
For other values n, we simulate the unnsampled votes and define a win
for candidate i as any time they are in the top n candidates in the final
tally.
Returns:
-win_probs is a list of pairs (i, p) where p is the fractional
representation of the number of trials that candidate i has won
out of the num_trials simulations.
"""
num_candidates = len(candidate_names)
win_count = [0]*(1+num_candidates)
for i in range(num_trials):
# We want a different seed per trial.
# Adding i to seed caused correlations, as numpy apparently
# adds one per trial, so we multiply i by 314...
seed_i = seed + i*314159265
winners = compute_winner(sample_tallies,
total_num_votes,
vote_for_n,
seed_i)
for winner in winners:
win_count[winner+1] += 1
win_probs = [(i, win_count[i]/float(num_trials))
for i in range(1, len(win_count))]
return win_probs
def compute_winner(
sample_tallies, total_num_votes, vote_for_n, seed, pretty_print=False)
Given a list of sample tallies (one sample tally per county) a list giving the total number of votes cast in each county, and a random seed (an integer) compute the winner in a single simulation. For each county, we use the Dirichlet-Multinomial distribution to generate a nonsample tally. Then, we sum over all the counties to produce our final tally and calculate the predicted winner over all the counties in the election.
Input Parameters:
-sample_tallies is a list of lists. Each list represents the sample tally for a given county. So, sample_tallies[i] represents the tally for county i. Then, sample_tallies[i][j] represents the number of votes candidate j receives in county i.
-total_num_votes is a list of integers. Each integer represents the total number of votes cast in a given county. So, total_num_votes[i] represents the total votes for county i. The sum of all total_num_votes[i] is the total number of votes in the entire election.
-seed is an integer or None. Assuming that it isn't None, we use it to seed the random state for the audit.
-vote_for_n is an integer, parsed from the command-line args. Its default value is 1, which means we only calculate a single winner for the election. For other values n, we simulate the unnsampled votes and define a win for candidate i as any time they are in the top n candidates in the final tally.
-pretty_print is a Boolean, which defaults to False. When it's set to True, we print the winning candidate, the number of votes they have received and the final vote tally for all the candidates.
Returns:
-winners is a list of integers, representing the indices of the candidate who won the election. It's size equals the vote_for_n parameter, which defaults to 1.
def compute_winner(sample_tallies, total_num_votes, vote_for_n,
seed, pretty_print=False):
"""
Given a list of sample tallies (one sample tally per county)
a list giving the total number of votes cast in each county,
and a random seed (an integer)
compute the winner in a single simulation.
For each county, we use the Dirichlet-Multinomial distribution to generate
a nonsample tally. Then, we sum over all the counties to produce our
final tally and calculate the predicted winner over all the counties in
the election.
Input Parameters:
-sample_tallies is a list of lists. Each list represents the sample tally
for a given county. So, sample_tallies[i] represents the tally for county
i. Then, sample_tallies[i][j] represents the number of votes candidate
j receives in county i.
-total_num_votes is a list of integers. Each integer represents the total
number of votes cast in a given county. So, total_num_votes[i] represents
the total votes for county i. The sum of all total_num_votes[i] is the
total number of votes in the entire election.
-seed is an integer or None. Assuming that it isn't None, we
use it to seed the random state for the audit.
-vote_for_n is an integer, parsed from the command-line args. Its default
value is 1, which means we only calculate a single winner for the election.
For other values n, we simulate the unnsampled votes and define a win
for candidate i as any time they are in the top n candidates in the final
tally.
-pretty_print is a Boolean, which defaults to False. When it's set to
True, we print the winning candidate, the number of votes they have
received and the final vote tally for all the candidates.
Returns:
-winners is a list of integers, representing the indices of the candidate
who won the election. It's size equals the vote_for_n parameter, which
defaults to 1.
"""
final_tallies = None
for i, sample_tally in enumerate(sample_tallies): # loop over counties
nonsample_tally = generate_nonsample_tally(
sample_tally, total_num_votes[i], seed)
final_county_tally = [sum(k)
for k in zip(sample_tally, nonsample_tally)]
if final_tallies is None:
final_tallies = final_county_tally
else:
final_tallies = [sum(k)
for k in zip(final_tallies, final_county_tally)]
final_tallies = [(k, final_tallies[k]) for k in range(len(final_tallies))]
final_tallies.sort(key = lambda x: x[1])
winners_with_tallies = final_tallies[-vote_for_n:]
winners = [winner_tally[0] for winner_tally in winners_with_tallies]
if pretty_print:
results_str = ''
for i in range(len(winners)):
results_str += (
"Candidate {} is a winner with {} votes. ".format(
winners[i], final_tallies[winners[i]][1]))
results_str += (
"The final vote tally for all the candidates "
"was {}".format(
[final_tally[1] for final_tally in final_tallies]))
print(results_str)
return winners
def convert_int_to_32_bit_numpy_array(
v)
Convert value v, which should be an arbitrarily large python integer (or convertible to one) to a numpy array of 32-bit values, since this format is needed to initialize a numpy.random.RandomState object. More precisely, the result is a numpy array of type int64, but each value is between 0 and 2**32-1, inclusive.
Example: input 2**64 + 5 yields np.array([5, 0, 1], dtype=int)
Input Parameters:
-v is an integer, representing the audit seed that's being passed in. We expect v to be non-negative.
Returns:
-numpy array created deterministically from v that will be used to initialize the Numpy RandomState.
def convert_int_to_32_bit_numpy_array(v):
"""
Convert value v, which should be an arbitrarily large python integer
(or convertible to one) to a numpy array of 32-bit values,
since this format is needed to initialize a numpy.random.RandomState
object. More precisely, the result is a numpy array of type int64,
but each value is between 0 and 2**32-1, inclusive.
Example: input 2**64 + 5 yields np.array([5, 0, 1], dtype=int)
Input Parameters:
-v is an integer, representing the audit seed that's being
passed in. We expect v to be non-negative.
Returns:
-numpy array created deterministically from v that will
be used to initialize the Numpy RandomState.
"""
v = int(v)
if v < 0:
raise ValueError(("convert_int_to_32_bit_numpy_array: "
"{} is not a nonnegative integer, "
"or convertible to one.").format(v))
v_parts = []
radix = 2 ** 32
while v > 0:
v_parts.append(v % radix)
v = v // radix
# note: v_parts will be empty list if v==0, that is OK
return np.array(v_parts, dtype=int)
def create_rs(
seed)
Create and return a Numpy RandomState object for a given seed. The input seed should be a python integer, arbitrarily large. The purpose of this routine is to make all the audit actions reproducible.
Input Parameters:
-seed is an integer or None. Assuming that it isn't None, we convert it into a Numpy Array.
Returns:
-a Numpy RandomState object, based on the seed, or the clock time if the seed is None.
def create_rs(seed):
"""
Create and return a Numpy RandomState object for a given seed.
The input seed should be a python integer, arbitrarily large.
The purpose of this routine is to make all the audit actions reproducible.
Input Parameters:
-seed is an integer or None. Assuming that it isn't None, we
convert it into a Numpy Array.
Returns:
-a Numpy RandomState object, based on the seed, or the clock
time if the seed is None.
"""
if seed is not None:
seed = convert_int_to_32_bit_numpy_array(seed)
return np.random.RandomState(seed)
def dirichlet_multinomial(
sample_tally, total_num_votes, rs)
Return a sample according to the Dirichlet multinomial distribution, given a sample tally, the number of votes in the election, and a random state. There is an additional pseudocount of one vote per candidate in this simulation.
Input Parameters:
-sample_tally is a list of integers, where the i'th index in sample_tally corresponds to the number of votes that candidate i received in the sample.
-total_num_votes is an integer representing the number of ballots that were cast in this election within the county.
-rs is a Numpy RandomState object that is used for any random functions in the simulation of the remaining votes. In particular, the gamma functions are made deterministic using this state.
Returns:
-multinomial_sample is a list of integers, which sums up to the total_num_votes - sample_size. The i'th index represents the simulated number of votes for candidate i in the remaining, unsampled votes.
def dirichlet_multinomial(sample_tally, total_num_votes, rs):
"""
Return a sample according to the Dirichlet multinomial distribution,
given a sample tally, the number of votes in the election,
and a random state. There is an additional pseudocount of
one vote per candidate in this simulation.
Input Parameters:
-sample_tally is a list of integers, where the i'th index
in sample_tally corresponds to the number of votes that candidate
i received in the sample.
-total_num_votes is an integer representing the number of
ballots that were cast in this election within the county.
-rs is a Numpy RandomState object that is used for any
random functions in the simulation of the remaining votes. In particular,
the gamma functions are made deterministic using this state.
Returns:
-multinomial_sample is a list of integers, which sums up
to the total_num_votes - sample_size. The i'th index represents the
simulated number of votes for candidate i in the remaining, unsampled
votes.
"""
sample_size = sum(sample_tally)
if sample_size > total_num_votes:
raise ValueError("total_num_votes {} less than sample_size {}."
.format(total_num_votes, sample_size))
nonsample_size = total_num_votes - sample_size
pseudocount_for_prior = 1
sample_with_prior = deepcopy(sample_tally)
sample_with_prior = [k + pseudocount_for_prior
for k in sample_with_prior]
gamma_sample = [rs.gamma(k) for k in sample_with_prior]
gamma_sample_sum = float(sum(gamma_sample))
gamma_sample = [k / gamma_sample_sum for k in gamma_sample]
multinomial_sample = rs.multinomial(nonsample_size, gamma_sample)
return multinomial_sample
def generate_nonsample_tally(
sample_tally, total_num_votes, seed)
Given a sample_tally, the total number of votes in an election, and a seed, generate the nonsample tally in the election using the Dirichlet multinomial distribution.
Input Parameters:
-sample_tally is a list of integers, where the i'th index in sample_tally corresponds to the number of votes that candidate i received in the sample.
-total_num_votes is an integer representing the number of ballots that were cast in this election within the county.
-seed is an integer or None. Assuming that it isn't None, we use it to seed the random state for the audit.
Returns:
-nonsample_tally is list of integers, which sums up to the total_num_votes - sample_size. The i'th index represents the simulated number of votes for candidate i in the remaining, unsampled votes.
def generate_nonsample_tally(sample_tally, total_num_votes, seed):
"""
Given a sample_tally, the total number of votes in an election, and a seed,
generate the nonsample tally in the election using the Dirichlet multinomial
distribution.
Input Parameters:
-sample_tally is a list of integers, where the i'th index
in sample_tally corresponds to the number of votes that candidate
i received in the sample.
-total_num_votes is an integer representing the number of
ballots that were cast in this election within the county.
-seed is an integer or None. Assuming that it isn't None, we
use it to seed the random state for the audit.
Returns:
-nonsample_tally is list of integers, which sums up
to the total_num_votes - sample_size. The i'th index represents the
simulated number of votes for candidate i in the remaining, unsampled
votes.
"""
rs = create_rs(seed)
nonsample_tally = dirichlet_multinomial(sample_tally, total_num_votes, rs)
return nonsample_tally
def main(
)
Parse command-line arguments, compute and print answers.
def main():
"""
Parse command-line arguments, compute and print answers.
"""
parser = argparse.ArgumentParser(description=\
'Bayesian Audit Process For'
'A Single Contest '
'Across One or More Counties')
parser.add_argument("total_num_votes",
nargs="?",
help="(Optional: for single-county audits:)"
"The total number of votes"
"(including the already audited ones) "
"that were cast in the election.")
parser.add_argument("single_county_tally",
help="(Optional: for single-county audits:)"
" the tally given as space separated numbers,"
"e.g. 5 30 25",
nargs="*",
default=[],
type=int)
parser.add_argument("--path_to_csv",
help="If the election spans multiple counties, "
"the sample tallies should be given in a csv file."
"Give here the csv file pathname as an argument. "
"In the header row, one of the column names "
"of the csv file must be Total Votes and another "
"can be County Name. Other columns are the names "
"or identifiers for candidates.")
parser.add_argument("--audit_seed",
help="For reproducibility, we provide the option to "
"seed the randomness in the audit. If the same "
"seed is provided, the audit will return the "
"same results.",
type=int,
default=1)
parser.add_argument("--num_trials",
help="Bayesian audits work by simulating the data "
"which hasn't been sampled to estimate the "
"chance that each candidate would win a full "
"hand recount. This argument specifies how "
"many trials are done to compute these "
"estimates.",
type=int,
default=10000)
parser.add_argument("--vote_for_n",
help="If we want to simulate voting for multiple "
"candidates at a time, we can use this parameter "
"to specify how many candidates a single voter "
"can vote for. The simulations will then count a candidate"
"as a winner, each time they appear in the top N "
"of the candidates, in the simulated elections.",
type=int,
default=1)
args = parser.parse_args()
if args.path_to_csv is None and args.total_num_votes is None:
parser.print_help()
sys.exit()
if args.path_to_csv:
# if sample tallies are in CSV file read that
sample_tallies, total_num_votes, candidate_names = \
preprocess_csv(args.path_to_csv)
else:
# otherwise extract desired data from command line
total_num_votes = [int(args.total_num_votes)]
sample_tallies = [args.single_county_tally]
candidate_names = list(range(1, len(sample_tallies[0]) + 1))
vote_for_n = args.vote_for_n
win_probs = compute_win_probs(\
sample_tallies,
total_num_votes,
args.audit_seed,
args.num_trials,
candidate_names,
vote_for_n)
print_results(candidate_names, win_probs, vote_for_n)
def preprocess_csv(
path_to_csv)
Preprocess a CSV file into the correct format for our sample tallies. In particular, we ignore the county name column and summarize the relevant information about the sample tallies in each county, the total number of votes in each county, and the candidate names.
Input Parameters:
-path_to_csv is a string, representing the full path to the CSV file, containing sample tallies.
Returns:
-sample_tallies is a list of lists. Each list represents the sample tally for a given county. So, sample_tallies[i] represents the tally for county i. Then, sample_tallies[i][j] represents the number of votes candidate j receives in county i.
-total_num_votes is a list of integers representing the number of ballots that were cast in this election. Each integer represents the total number of votes cast in a given county. So, total_num_votes[i] represents the total votes for county i.
-candidate_names is an ordered list of strings, containing the name of every candidate in the contest we are auditing.
def preprocess_csv(path_to_csv):
"""
Preprocess a CSV file into the correct format for our
sample tallies. In particular, we ignore the county name column
and summarize the relevant information about the sample tallies
in each county, the total number of votes in each county, and
the candidate names.
Input Parameters:
-path_to_csv is a string, representing the full path to the CSV
file, containing sample tallies.
Returns:
-sample_tallies is a list of lists. Each list represents the sample tally
for a given county. So, sample_tallies[i] represents the tally for county
i. Then, sample_tallies[i][j] represents the number of votes candidate
j receives in county i.
-total_num_votes is a list of integers representing the number of
ballots that were cast in this election. Each integer represents the total
number of votes cast in a given county. So, total_num_votes[i] represents
the total votes for county i.
-candidate_names is an ordered list of strings, containing the name of
every candidate in the contest we are auditing.
"""
with open(path_to_csv) as csvfile:
sample_tallies = []
total_num_votes = []
reader = csv.DictReader(csvfile)
candidate_names = [col for col in reader.fieldnames
if col.strip().lower() not in
["county name", "total votes"]]
for row in reader:
sample_tally = []
for key in row:
if key.strip().lower() == "county name":
continue
if key.strip().lower() == "total votes":
total_num_votes.append(int(row[key]))
else:
count = int(row[key].strip())
assert count >= 0
sample_tally.append(count)
sample_tallies.append(sample_tally)
for i, sample_tally in enumerate(sample_tallies):
assert 0 <= sum(sample_tally) <= total_num_votes[i]
return sample_tallies, total_num_votes, candidate_names
def print_results(
candidate_names, win_probs, vote_for_n)
Given list of candidate_names and win_probs pairs, print summary of the Bayesian audit simulations.
Input Parameters:
-candidate_names is an ordered list of strings, containing the name of every candidate in the contest we are auditing.
-win_probs is a list of pairs (i, p) where p is the fractional representation of the number of trials that candidate i has won out of the num_trials simulations.
-vote_for_n is an integer, parsed from the command-line args. Its default value is 1, which means we only calculate a single winner for the election. For other values n, we simulate the unnsampled votes and define a win for candidate i as any time they are in the top n candidates in the final tally.
Returns:
-None, but prints a summary of how often each candidate has won in the simulations.
def print_results(candidate_names, win_probs, vote_for_n):
"""
Given list of candidate_names and win_probs pairs, print summary
of the Bayesian audit simulations.
Input Parameters:
-candidate_names is an ordered list of strings, containing the name of
every candidate in the contest we are auditing.
-win_probs is a list of pairs (i, p) where p is the fractional
representation of the number of trials that candidate i has won
out of the num_trials simulations.
-vote_for_n is an integer, parsed from the command-line args. Its default
value is 1, which means we only calculate a single winner for the election.
For other values n, we simulate the unnsampled votes and define a win
for candidate i as any time they are in the top n candidates in the final
tally.
Returns:
-None, but prints a summary of how often each candidate has won in
the simulations.
"""
print("BPTOOL (Bayesian ballot-polling tool version 0.8)")
want_sorted_results = True
if want_sorted_results:
sorted_win_probs = sorted(
win_probs, key=lambda tup: tup[1], reverse=True)
else:
sorted_win_probs = win_probs
if vote_for_n == 1:
print("{:<24s} \t {:


|
Auxiliary Servo Library
v0.9
Servo motor control library for educational and hobby applications
|
If you need to control more than the 14 servos the servo library covers, add this library to your project to control up to 14 more for a total of 28 servos. Control the first 14 with servo_set, servo_speed, servo_angle, and other servo_ function calls. Control servos 15 and up with the same function calls, but starting with servoAux_ instead of servo_.
Currently supports LMM and CMM memory models.
servo library launches a single cog for controlling 1st to 14th servos
servoAux library launches an additional cog for controlling the 15th through 28th servos.
More...
#include "simpletools.h"
Go to the source code of this file.
Functions | |
| int | servoAux_angle (int pin, int degreeTenths) |
| Set Parallax Standard Servo to angle from 0 to 180 in tenths of a degree. | |
| int | servoAux_speed (int pin, int speed) |
| Set Parallax Continuous Rotation servo speed. | |
| int | servoAux_setRamp (int pin, int stepSize) |
| Set the maximum change in control signal a servo will change in a given 20 ms time period. | |
| int | servoAux_set (int pin, int time) |
| Sets servo control signal to servo connected to a given pin for microsecond pulse durations. | |
| int | servoAux_get (int pin) |
| Reports the number of microseconds of the pulse most recently sent to a given servo. | |
| void | servoAux_stop (void) |
| Stops the servo process and frees a cog. | |
| int | servoAux_start (void) |
| Starts the servo process and takes over a cog. |
If you need to control more than the 14 servos the servo library covers, add this library to your project to control up to 14 more for a total of 28 servos. Control the first 14 with servo_set, servo_speed, servo_angle, and other servo_ function calls. Control servos 15 and up with the same function calls, but starting with servoAux_ instead of servo_.
Currently supports LMM and CMM memory models.
servo library launches a single cog for controlling 1st to 14th servos
servoAux library launches an additional cog for controlling the 15th through 28th servos.
This library automatically delivers control pulses to the servos every 20 ms, all you have to do is use the set method to pick the pin the servo is connected to and the duration of the control pulses.
Parallax standard servos have a position range from approximately 0 to 180 degrees.
Please submit bug reports, suggestions, and improvements to this code to edito. r@pa ralla x.co m
| int servoAux_angle | ( | int | pin, |
| int | degreeTenths | ||
| ) |
Set Parallax Standard Servo to angle from 0 to 180 in tenths of a degree.
Examples:
0 to 1800 corresponds to control pulses ranging from 500 to 2300 with 1400 at center (90 degrees), which is slightly different from the 1500 center convention, but it places the Parallax Standard Servo's range of motion neatly between its mechanical limits.
| pin | Number of the I/O pin connected to servo |
| degreeTenths | Tenths of a degree from 0 to 1800 |
| int servoAux_get | ( | int | pin | ) |
Reports the number of microseconds of the pulse most recently sent to a given servo.
| pin | Number of the I/O pin the servo is connected to |
| int servoAux_set | ( | int | pin, |
| int | time | ||
| ) |
Sets servo control signal to servo connected to a given pin for microsecond pulse durations.
This function directly controls the number of microseconds servo control pulses last.
Examples for Parallax Standard Servo:
500, 1400, and 2300 are the number of microseconds (us) the control pulses stay high. More generally, a microsecond above 500 corresponds to 1/10 of a degree counterclockwise of 0 degrees. So, for a given degree position, use:
degree position = 500 + (number of 10ths of a degree)
For setting Parallax Continuous Rotation Servo speed, use:
Values in the 1400 to 1600 range are (roughly) proportional to speed for a Parallax Continuous Rotation Servo, but it's not nearly as precise as position control. Setting full speeds at 1300 and 1700 is a common practice to make sure both servos are going as fast as they possibly can.
| pin | Number of the I/O pin that sends signals to the servo. |
| time | Microsecond servo pulse time. |
| int servoAux_setRamp | ( | int | pin, |
| int | stepSize | ||
| ) |
Set the maximum change in control signal a servo will change in a given 20 ms time period.
This function allows you to make a Parallax Continuous Rotation servo ramp up to and down from whatever speed or position it was previously set to. It also allows you to set the rate at which a Parallax Standard servo turns from its previous position to a new position.
| pin | Number of the I/O pin the servo is connected to |
| stepSize | The number of microseconds per 20 ms of time that the servo's control signal is allowed to change. This equates to the number of tenths of a degree a Parallax Standard servo is allowed to change, or the number of 100ths of full speed the a Parallax Continuous Rotation servo is allowed to change per 20 ms. |
| int servoAux_speed | ( | int | pin, |
| int | speed | ||
| ) |
Set Parallax Continuous Rotation servo speed.
Examples:
100 to -100 corresponds to the linear speed control range. For example, servoAux_speed(pin, 75) will set the speed to roughly 75% of full speed counterclockwise. This is a very rough approximation.
| pin | Number of the I/O pin connected to servo |
| speed | from -100 to 100 |
| int servoAux_start | ( | void | ) |
Starts the servo process and takes over a cog.
You do not need to call this function from your code because the servoAux_set function calls it if it detects that the servo cog has not been started.


Send your homework as a single ZIP archive with your files, or send a link to your GitHub repo. Try to keep line lengths below 80 characters.
Create 3D vectors as a Python class.
class Vector: def __init__(self, x, y, z): self.x = x self.y = y self.z = z def __repr__(self): pass # return string "Vector(x, y, z)" def __eq__(self, other): pass # v == w def __ne__(self, other): # v != w return not self == other def __add__(self, other): pass # v + w # Hint: return Vector(...) def __sub__(self, other): pass # v - w def __mul__(self, other): pass # return the dot product (number) def cross(self, other): pass # return the cross product (Vector) def length(self): pass # the length of the vector def __hash__(self): # we assume that vectors are immutable return hash((self.x, self.y, self.z)) # recommended # Exemplary tests. Change values in your tests. import math v = Vector(1, 2, 3) w = Vector(2, -3, 2) assert v != w assert v + w == Vector(3, -1, 5) assert v - w == Vector(-1, 5, 1) assert v * w == 2 assert v.cross(w) == Vector(13, 4, -7) assert v.length() == math.sqrt(14) S = set([v, v, w]) assert len(S) == 2 print("Tests passed")
# two vectors are given (a vector is a 3-tuple in this reminder) # a = (a1, a2, a3) # b = (b1, b2, b3) # the dot product (the result is a number) # a · b = a1 * b1 + a2 * b2 + a3 * b3 # the cross product (the result is a vector) # a × b = (a2 * b3 - a3 * b2, a3 * b1 - a1 * b3, a1 * b2 - a2 * b1)


django-contentrelations 1.1 documentation
This class provides an abstraction for unifying access to different resources under a common interface. If a resource doesn’t have a FOO attribute, the subclass should defined a get_FOO method that returns the appropriate value.
str Default: ''
The value returned when all methods of retrieving it has failed. Only used if BaseResource.raise_error_on_missing is False
bool Default: False
An AttributeError should be raised when all methods of retrieving it has failed.
object
Set during instantiation, this is the instance used to resolve all attribute requests.
This is the get_FOO method used when attempting to resolve the resource_type attribute. By default it returns the verbose_name of the instance.
This is the get_FOO method used when attempting to resolve the url attribute. by default it returns the value from instance.get_absolute_url()
This class provides the registry of models to their sub-classed BaseResource models. It is instantiated for use in resource_list.
Returns a Q object used for limiting ContentType objects for selection to only those registered.
| Parameters: | instance – An instance of a Model |
|---|
Returns the registered resource for the passed instance instantiated with that instance.
| Parameters: |
|
|---|
from contentrelations import resource_list
The instantiated ResourceList used for registering Models with their BaseResource sub-classes.


Just getting started? Start creating objectives
This key result will become a lower level objective.
Set Target Value for the OKR %.
Weight is used to increase or decrease importance of a single Key Result when calculating Objective completion %.


| Created: | 6/26/2020 3:16:12 PM |
| Modified: | 6/26/2020 3:16:12 PM |
| Project: | |
| Advanced: |
| Attribute |
|
Public bigint spa_number_id |
|
Details:
|
|
Public varchar(255) spa_number_spa_number |
|
Details:
|
|
Public varchar(255) created_by |
|
Details:
|
|
Public varchar(255) updated_by |
|
Details:
|
|
Public timestamp with time zone(0) created_at |
|
Details:
|
|
Public timestamp with time zone(0) updated_at |
|
Details:
|
|
Public timestamp with time zone(0) start_date |
|
Details:
|
|
Public timestamp with time zone(0) end_date |
|
Details:
|
|
Public bigserial id |
|
Details:
|
|
Public jsonb ods_meta |
|
Details:
|
|
Public integer ods_version |
|
Details:
|
|
Public varchar(255) ods_created_by |
|
Details:
|
|
Public timestamp with time zone(0) ods_created_at |
|
Details:
|
| Operation | ||
|
Public spa_numbers_pkey( id: bigserial, |
||
|
Details:
<<PK>>
|
| Tag | Value |
| Owner | public |
|
Details:
|
| Property | Value |
| isFinalSpecialization: | 0 |
| Object | Type | Connection | Direction | Notes |
| «view» current_spa_numbers_view | View | Dependency | From | |
| «view» current_spa_numbers_view | View | Dependency | From |


Save to:
INVALID DIRECTORY
Submit
Reset
View Data
AUTO
AUTO Low Boiler
-
+
AUTO High Boiler
-
+
AUTO Gear Delivery
-
+
AUTO Gear Position
N/A
Left
Center
Right
TELEOP
Low Boiler
-
+
High Boiler Scores
-
+
High Boiler Misses
-
+
Gears Delivered
-
+
Climbed?
No
Attempted
Yes
Gear Pickup Type?
None
Passive/drop
Floor
FUEL
COLLECTION
Field?
Hopper?
Human?


Magnetic structure for x = 1.0 at T = 2 K: Arrows indicate the direction of the Ni (blue sphere) and Re (orange sphere) moments. The La/Ca, and O atoms are not shown for clarity. The average value of the ordered magnetic moment is estimated as ~1.0 μ B /f.u.


Using dist/jdenticon.min.js. Delete or rename dist folder to use source files.
Using src/jdenticon.js. Run gulp build to use dist/jdenticon.min.js.
Using src/jdenticon.js over the file:// protocol will probably not work. Open browser-test.html through a web server or run gulp build to use dist/jdenticon.min.js.


The registration of domains (such as martin-thoma.com
,
wikipedia.org
, understand.ai
, unicode.party
, …) is kind of broken.
There are people who register domains just because somebody might want them
sometime. Then they sell it to them. They do not intend to put content there.
This is called "domain parking". I guess it is similar to people who put their
car on a parking spot which they actually don't need. Then they put a sign
in there "if you want to park here, pay 20 Euro and call XYZ".
Why is this a problem (though not a too serious one)?
For physical goods people who buy stuff just because they think in future other people might need it provides value. It smoothes the price over time, allows the producers of that good to continue producing it while somebody else takes care of storing it.
However, for rights it is different. There is only one domain like comment.it
.
There will never be another one. There is no smoothing of the price over time
(as it can only be bought once). If it is not registered, there is no cost in
holding it available. In contrast, it is much more complicated to buy a domain
which is already registered by somebody else than registering it yourself.
Whois Lookup
With sites like whois.domaintools.com
or tools like whois
you can look up who owns a domain:
$ whois martin-thoma.com
Domain Name: MARTIN-THOMA.COM
Registry Domain ID:<PHONE_NUMBER>_DOMAIN_COM-VRSN
Registrar WHOIS Server: whois.namecheap.com
Registrar URL: http://www.namecheap.com
Updated Date: 2018-01-25T12:13:13Z
Creation Date: 2011-09-21T08:11:13Z
Registry Expiry Date: 2024-09-21T08:11:13Z
Registrar: NameCheap, Inc.
Registrar IANA ID: 1068
Registrar Abuse Contact Email<EMAIL_ADDRESS>Registrar Abuse Contact Phone: +1.6613102107
Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited
Name Server: AMY.NS.CLOUDFLARE.COM
Name Server: KAI.NS.CLOUDFLARE.COM
DNSSEC: unsigned
URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/
>>> Last update of whois database: 2019-02-07T21:00:04Z <<<
Examples
Here is a list of interesting domains which are just held for the purpose of selling it too expensive to somebody else:
- comment.it (whois): Registered by Valerio Morfino in 2001
- admin.ai (whois): Registered by SenseiHub in 2010
- face.it: Registered by Gianfranco Zanella in 2003
- detect.it: Registered by Macrosten LTD in 2011
- ocr.ai: Registered by DMS AI (at least in 2017)
- digitalize.it: Registered by Vito Longo in 2015
- scan.it: Registered by Luca Sambucci in 1999
- data.science: Registered by Alpnames Limited in 2014
And a couple of examples where I'm not too sure:
- ai.data: This is strange. I get an Apache2 default page, but I can't find a WHOIS record
- comment.ai (whois): Registered by Benjamin Milde in 2001
Misc
I came across some interesting examples:
- stalk.com: I guess this can be used for training a model to find the geolocation just by image data?
- personal.id