Skip to content

Instantly share code, notes, and snippets.

View selenamarie's full-sized avatar

Selena Deckelmann selenamarie

View GitHub Profile
#!/usr/bin/env python
from decimal import Decimal, getcontext
from math import factorial
#a = float(500000) # total traffic offered
#n = 10 # number of servers
# 500000 per day
@selenamarie
selenamarie / new_product_version_test_plan.md
Last active January 4, 2016 17:49
Testing a new/custom product version in Socorro

important assumption: Ensure that the buildid includes the start date for the data you're backfilling. There are some restrictions based on "build date", which is extracted from the buildid, deep in the stored procedures. If your buildid resolves to a date that is prior to the date you're testing, none of the matviews will yield results.

  1. Add a fake row to releases_raw
INSERT into releases_raw (product_name, version, platform, build_id, build_type, beta_number, repository, update_channel) VALUES('firefox', '27.0', 'win32', '20140136130000', 'beta', 99, 'mozilla-beta', 'beta');

 product_name | version | platform |    build_id    | build_type | beta_number |  repository  | update_channel | version_build 
--------------+---------+----------+----------------+------------+-------------+--------------+----------------+---------------
@selenamarie
selenamarie / prod_postgres.md
Last active March 15, 2019 05:12
An Ideal Postgres Environment

Ideal Postgres environment

Documentation

  • Documented replication topology
  • Documented network topology
  • Documented interface topology - including users, passwords, connection estimates, load balancers, connection proxies
  • Documented procedure, schedule for failover and testing
  • Documented procedure, schedule for disaster recovery and testing
-- we should probably add an index on product_versions.sunset_date
-- addons
WITH crash AS (
SELECT json_array_elements(processed_crash->'addons') AS addons,
product_version_id,
signature_id,
reports_clean.date_processed::date,
reports_clean.os_name
FROM processed_crashes
-- this output is interesting :)
SELECT json_object_field_text(ucm.rewrite, 'rewrite_to') as release_channel,
json_array_elements(ucm.rewrite->'BuildID') as buildid, -- yeah this is not good here :D
product_versions.product_version_id,
trim(both '"' from (ucm.rewrite->'Version')::text) as version_string,
product_versions.version_string
FROM
product_productid_map ppm
JOIN update_channel_map ucm USING (productid)
JOIN product_versions ON ppm.product_name = product_versions.product_name

Keybase proof

I hereby claim:

  • I am selenamarie on github.
  • I am selenamarie (https://keybase.io/selenamarie) on keybase.
  • I have a public key whose fingerprint is 27DF C0BB 7DD6 5ED2 EA12 E223 C34E 5747 E23D D677

To claim this, I am signing this object:

During the PyLadies lunch here at PyCon, I heard 5 people stand up and say that they would not have given a talk if an individual (in many cases Jessica McKellar) hadn't pestered them repeatedly to give a talk. I saw later that someone else had heard this from 10+ people at the lunch.

Increasing speaker diversity is both about sending emails "to the right mailing lists" but it is also largely dependent on individuals reaching out to new (and veteran) speakers to get them to submit talks.

So - a lot of this work has to happen on multiple fronts at the same time - the CFPs need to go out to lots of lists, and individuals need to reach out to lots of individuals.

The only way I have seen this be consistently successful is if many people on the conference committee are all making individual requests to speakers, and the people making the requests are trusted by the talk submitters. It's a systemic issue involving visibility, trust, mentorship in general, talk submission mentoring, and mentorship of talk c

@selenamarie
selenamarie / rvlvvr_notes.md
Last active August 29, 2015 14:08
Poking around rvlvvr.net client code
@selenamarie
selenamarie / gist:fec696bf042164ea123e
Last active August 29, 2015 14:09
testing the dataservice_app.py
# start dataservice_app.py
socorro/dataservice/dataservice_app.py
# insert these into postgresql:
insert into bugs values (1, 'done', 'good', 'stuff');
insert into bug_associations values (1, 'a signature');
# test POST
@selenamarie
selenamarie / gist:ad413cc50c453e2a5925
Last active August 29, 2015 14:09
infecting django with configman notes
* how would you write a pure restful service in django from scratch?
https://gist.github.com/peterbe/4337d96d0afd53505cbb
from django import http
def meaningoflife(request):
return http.HttpResponse(json.dump({'number': 42}}, mimetype="application/json")
* where in config/setup do you put this information