Skip to content

Instantly share code, notes, and snippets.

View derrickmar's full-sized avatar

Derrick Mar derrickmar

View GitHub Profile
pp user.credit_events.pluck(:mode, :created_at, :reason)
D, [2022-08-31T06:00:25.840137 #4] DEBUG -- : (1.6ms) SELECT "credit_events"."mode", "credit_events"."created_at", "credit_events"."reason" FROM "credit_events" WHERE "credit_events"."user_id" = $1 [["user_id", 9669]]
[["increment",
Thu, 26 May 2022 17:02:54.515799000 UTC +00:00,
"meeting_created"],
["decrement",
Wed, 25 May 2022 12:07:22.363525000 UTC +00:00,
"meeting_created"],
["decrement",
Thu, 26 May 2022 13:36:50.153372000 UTC +00:00,
SELECT
SUM("Adv. Session Completed")/COUNT(*) AS "% Advising Sessions Completed"
FROM
(SELECT
"Lead_id"
,MAX("Completed Advising Session") AS "Adv. Session Completed"
FROM
(SELECT
"Sfdc Leads"."id" AS "Lead_id"
,CAST(CASE WHEN "Sfdc Leads"."advising_session_completed_c" = 'true' THEN 1 ELSE 0 END AS numeric (8,3)) AS "Completed Advising Session"
# If we want to use the Rails routing system and pass these routes to ReactRouter it woud look like this
import Routes from '../../../routes.js.erb';
// We'll still have to define fellow_page_health_uri_pattern
<Route exact path="#{Routes.fellow_page_health_uri_pattern}">
{fellow && <FellowTasks fellow={fellow} />}
{fellow && <NotesPopupQueue fellowId={fellow.id} />}
</Route>

Communication

  • I think you generally have a good communication style and get confirmation when necessary. But I think you oddly have a difficutly understanding the logical constraint of the star. More so than anyone else I've seen which is interesting

Problem Solving

  • I think there was some odd things like not realizing there is multuple stars

Coding

  • You logically got the high level but you struggled a lot with actually putting it down in code
  • You need a lot of hints to start to get things

Hackerrank Pair URL: _____ Problem Name: _____ Topic of Problem: _____ Estimated Difficulty: _____

Techncial Interview Rubric

Learn more about this evaluation rubric here.

Cultural Fit

The subjective aspects of the interview. Is this someone you can see yourself working with?

@derrickmar
derrickmar / alex_orr.md
Created January 7, 2020 03:13
Feedback Alex Orr
public List<String> topKFrequent(String[] words, int k) {
// calculate frequency of each word
Map<String, Integer> freqMap = new HashMap<>();
for(String word : words) {
freqMap.put(word, freqMap.getOrDefault(word, 0) + 1);
}
// build the buckets
TrieNode[] count = new TrieNode[words.length + 1];
for(String word : freqMap.keySet()) {
int freq = freqMap.get(word);
{"scenes":[{"nodes":[0]}],"nodes":[{"mesh":0}],"meshes":[{"primitives":[{"attributes":{"POSITION":0}}]}],"accessors":[{"byteOffset":0,"componentType":5126,"bufferView":0,"count":3,"type":"VEC3"},{"byteOffset":0,"componentType":5123,"bufferView":1,"count":3,"type":"SCALAR"}],"bufferViews":[{"byteOffset":0,"byteLength":36,"target":34962,"buffer":0},{"byteOffset":0,"byteLength":6,"target":34963,"buffer":1}],"buffers":[{"uri":"data:;base64,AAAAAAAAAAAAAAAAAACAPwAAAAAAAAAAAAAAAAAAgD8AAAAA","byteLength":36},{"uri":"data:;base64,AAABAAIA","byteLength":6}]}
class Order < ActiveRecord::Base
2 belongs_to :user
3 has_many :tickets
4 def calculate_tax
5 total = self.total_price()
6 tax_rate = (self.user.zipcode =~ /^941/ ? 0.095 : 0.085)
7 return total * tax_rate
8 end
9 end
10
@derrickmar
derrickmar / nginx_parser.py
Created October 16, 2016 00:46
Parser for nginx logs for datadog
"""
Custom parser for nginx log suitable for use by Datadog 'dogstreams'.
To use, add to datadog.conf as follows:
dogstreams: [path to ngnix log (e.g: "/var/log/nginx/access.log"]:[path to this python script (e.g "/usr/share/datadog/agent/dogstream/nginx.py")]:[name of parsing method of this file ("parse")]
so, an example line would be:
dogstreams: /var/log/nginx/access.log:/usr/share/datadog/agent/dogstream/nginx.py:parse
Log of nginx should be defined like that:
log_format time_log '$time_local "$request" S=$status $bytes_sent T=$request_time R=$http_x_forwarded_for';
when starting dd-agent, you can find the collector.log and check if the dogstream initialized successfully
"""