Skip to content

Instantly share code, notes, and snippets.

# This function takes in
#
# $a0 as max_size
# $a1 as row
# $a2 as col
# $a3 as 1 or -1
# 1 is = A
# -1 is =B
# it returns v0 = 0 if validation failed , else it returns 1
Hawk:6500
Dove:6325
Hawk:6200
Hawk:6200
Hawk:6150
Dove:5925
Dove:5900
Dove:5875
Dove:5850
Dove:5825
#
# FILE: $File$
# AUTHOR: Phil White, RIT 2016
# CONTRIBUTORS:
# W. Carithers
# <<<YOUR NAME HERE>>>
#
# DESCRIPTION:
# This program is an implementation of merge sort in MIPS
# assembly
sort:
addi $sp,$sp,-40 # allocate space for the return address
sw $ra,4($sp)
sw $s0,8($sp)
sw $s1,12($sp)
sw $s2,16($sp)
sw $s3,20($sp)
sw $s4,24($sp)
sw $s5,28($sp)
sw $s6,32($sp)
__global__ void upSample_kernel(unsigned int * ann, unsigned int * ann_tmp,int * params, int aw_half,int ah_half) {
int ax = blockIdx.x*blockDim.x + threadIdx.x;
int ay = blockIdx.y*blockDim.y + threadIdx.y;
int ah = params[1];
int aw = params[2];
int bh = params[3];
int bw = params[4];
def calculate_distance(self,ax,ay,bx,by):
patch_a = self.get_patch_for_coords(self.a_padded,ax,ay)
patch_b = self.get_patch_for_coords(self.b_padded,bx,by)
diff = patch_a - patch_b
distances = np.linalg.norm(diff,axis=0,ord=2)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@payment_controller.route('/enable_tests', methods=['POST'])
def enable_tests():
json = request.get_json()
test_ids = json['test_ids']
user_id = json['user_id']
wallet_amount_used = json['wallet_amount_used']
user = db.session.query(User).filter_by(id=user_id).first()
if user.wallet is None:
user.wallet = 0
test_attempt_id,test_attempt_user_id,test_attempt_test_id,test_attempt_is_complete,test_attempt_date,test_attempt_score,question_attempt_1_section_attempt_id,question_attempt_1_question_id,question_attempt_1_choice_id,question_attempt_1_tita_choice,question_attempt_1_attempt_status,question_attempt_1_time_spent,section_attempt_1_id,section_attempt_1_section_id,section_attempt_1_test_attempt_id,section_attempt_1_time_left,section_attempt_1_is_complete
1085,2424,105,1,2017-07-21 17:32:45,0,,,,,,,2820,178,1085,1,0
1085,2424,105,1,2017-07-21 17:32:45,0,2821,3751,25352,,submitted,0,2821,179,1085,5,0
1085,2424,105,1,2017-07-21 17:32:45,0,2821,3752,25349,,submitted,0,2821,179,1085,5,0
1085,2424,105,1,2017-07-21 17:32:45,0,2821,3763,25409,,submitted,0,2821,179,1085,5,0
1085,2424,105,1,2017-07-21 17:32:45,0,2821,3764,25412,,submitted,0,2821,179,1085,5,0
1085,2424,105,1,2017-07-21 17:32:45,0,2822,3730,25465,,submitted,0,2822,180,1085,0,0
1176,2424,59,1,2017-07-23 11:33:52,0,3085,1029,9257,,submitted,2,3085,73,1176,1824
if request.method == 'POST':
json = request.get_json()
question = db.session.query(Question).filter_by(id=question_id).first()
if question.type == 'TITA':
question_attempt = QuestionAttempt(section_attempt_id=section_attempt_id,
question_id=question_id,
tita_choice=json['tita_choice'])
else: