Lecture 1: Introduction to Research — [📝Lecture Notebooks] [
Lecture 2: Introduction to Python — [📝Lecture Notebooks] [
Lecture 3: Introduction to NumPy — [📝Lecture Notebooks] [
Lecture 4: Introduction to pandas — [📝Lecture Notebooks] [
Lecture 5: Plotting Data — [📝Lecture Notebooks] [[
| /** | |
| *Submitted for verification at Etherscan.io on 2020-09-16 | |
| */ | |
| // SPDX-License-Identifier: UNLICENSED | |
| pragma solidity =0.6.11; | |
| /** | |
| * @dev Interface of the ERC20 standard as defined in the EIP. | |
| */ |
| ruby '2.7.1' | |
| gem 'rails', github: 'rails/rails' | |
| gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data | |
| # Action Text | |
| gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra' | |
| gem 'okra', github: 'basecamp/okra' | |
| # Drivers |
This is just some code I recently used in my development application in order to add token-based authentication for my api-only rails app. The api-client was to be consumed by a mobile application, so I needed an authentication solution that would keep the user logged in indefinetly and the only way to do this was either using refresh tokens or sliding sessions.
I also needed a way to both blacklist and whitelist tokens based on a unique identifier (jti)
Before trying it out DIY, I considered using:
| #### evals the schema into the current process | |
| class SqliteTestDbLoader | |
| # assumes your schema is generated for MySQL | |
| # tweak for Postgres! | |
| MYSQL_REPLACEMENTS = { | |
| /ENGINE=InnoDB DEFAULT CHARSET=[a-z0-9]*/ => '', | |
| /, collation: "[^"]*"/ => '' | |
| } |
require 'dry-validation'
require 'dry-struct'
require 'active_model/errors'
require_relative '../create_study'
module MyApp
module Types
include Dry::Types.module| function CaptureNetWorth() { | |
| var USD_NW_COLUMN = 2; | |
| var destinationSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Daily NW'); | |
| // Get index of the last row in column A that doesn't have content | |
| var Avals = destinationSheet.getRange("A1:A").getValues(); | |
| var lastRowIndex = Avals.filter(String).length; | |
| var newRowIndex = lastRowIndex + 1; | |
| package main | |
| import ( | |
| "fmt" | |
| "reflect" | |
| ) | |
| type G interface{} | |
| type S G |
From time to time, Musk will send out an e-mail to the entire company to enforce a new policy or let them know about something that's bothering him. One of the more famous e-mails arrived in May 2010 with the subject line: Acronyms Seriously Suck:
There is a creeping tendency to use made up acronyms at SpaceX. Excessive use of made up acronyms is a significant impediment to communication and keeping communication good as we grow is incredibly important. Individually, a few acronyms here and there may not seem so bad, but if a thousand people are making these up, over time the result will be a huge glossary that we have to issue to new employees. No one can actually remember all these acronyms and people don't want to seem dumb in a meeting, so they just sit there in ignorance. This is particularly tough on new employees.
That needs to stop immediately or I will take drastic action - I have given enough warning over the years. Unless an acronym is approved by me, it should not enter the SpaceX glossary.
| #!/bin/bash -e | |
| app=rssbox | |
| dev=http://rssbox.dev | |
| heroku logs -t -s heroku -d router -a $app | { | |
| while IFS= read -r line | |
| do | |
| path=$(echo $line | grep -oE 'path="([^"]+)"' | cut -d'"' -f2) | |
| code=$(curl -s -o /dev/null -w "%{http_code}" "$dev$path") |