This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"python.condaPath": "C:\\Users\\antho\\anaconda3\\Scripts\\conda-script.py", | |
"python.defaultInterpreterPath": "C:\\Users\\antho\\anaconda3\\python.exe", | |
"python.pythonPath": "C:\\Users\\antho\\anaconda3\\python.exe", | |
"python.terminal.activateEnvironment": true, | |
"terminal.integrated.defaultLocation": "editor", | |
"python.linting.flake8Enabled": true, | |
"vim.normalModeKeyBindings": [ | |
// Open the settings JSON file. | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'ruby_http_client' | |
class Http < SendGrid::Client | |
end | |
bearer_token = 'my token' | |
survey_monkey = Http.new(host: 'https://api.surveymonkey.com/v3', request_headers: {'Authorization' => "Bearer #{bearer_token}", "Content-Type" => "application/json"}) | |
survey_monkey.users.me.get.parsed_body |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DATABASE_URL=$(heroku config:get DATABASE_URL -a ednetwork) SECRET_KEY_BASE=$(heroku config:get SECRET_KEY_BASE -a ednetwork) LANG=$(heroku config:get LANG -a ednetwork) DISABLE_SPRING=1 RAILS_ENV=production RACK_ENV=production rails runner "puts School.first.inspect" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DATABASE_URL=$(heroku config:get DATABASE_URL -a ednetwork) MONGOHQ_URL=$(heroku config:get MONGOHQ_URL -a ednetwork) irb scripts/migrate_members.rb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).on 'ready page:load', -> | |
$('.select2').on 'select2:select', (e) -> | |
console.log(e.params.data.email) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('mongo') | |
def client | |
@client ||= Mongo::Client.new([ '127.0.0.1:27017' ], :database => 'network-dev') | |
end | |
def participants | |
client[:participants] | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('mongo') | |
def client | |
@client ||= Mongo::Client.new([ '127.0.0.1:27017' ], :database => 'network-dev') | |
end | |
def actions | |
client[:actions] | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
###################################################################### | |
# Task: Describe a two-tape Turing machine that decides the | |
# language {x#y | x is a substring of y and x,y in {0,1}^* } | |
###################################################################### | |
# Enter values below for | |
# q_0 : the initial state (an int) | |
# q_a : the accept state (an int) | |
# q_r : the reject state (an int) | |
# delta : the transition function expressed as a dictionary | |
# with keys (state, symbol, symbol) and |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
###################################################################### | |
# Describe a Turing Machine that decides the language | |
# {w | w has an equal number of 0s and 1} | |
###################################################################### | |
# Enter values below for | |
# q_0 : the initial state (an int) | |
# q_a : the accept state (an int) | |
# q_r : the reject state (an int) | |
# delta : the transition function expressed as a dictionary | |
# with keys (state, symbol) and values (state, symbol, 'L' or 'R') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
###################################################################### | |
# Task: Describe a Turing machine that shifts the input string one | |
# space to the right and places the symbol ($) in the first location | |
# on the tape. | |
###################################################################### | |
# Enter values below for | |
# q_0 : the initial state (an int) | |
# q_a : the accept state (an int) | |
# q_r : the reject state (an int) | |
# delta : the transition function expressed as a dictionary |
NewerOlder