This file contains hidden or 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
from sklearn.metrics import accuracy_score | |
from sklearn.metrics import cohen_kappa_score | |
from sklearn.metrics import precision_recall_fscore_support | |
def validation_prediction(dataloader,model,loss_fn): | |
model.eval() | |
total = 0 | |
correct = 0 | |
running_loss = 0 | |
actual_label_list = [] |
This file contains hidden or 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
import math | |
from functools import reduce | |
def primeFactor(num): | |
pFactorList = [] | |
factor = 2 | |
while factor <= math.sqrt(num): |
This file contains hidden or 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
import math | |
from functools import reduce | |
def primeFactor(num): | |
pFactorList = [] | |
factor = 2 | |
while factor <= math.sqrt(num): |
This file contains hidden or 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
import math | |
from functools import reduce | |
def primeFactor(num): | |
pFactorList = [] | |
factor = 2 | |
while factor <= math.sqrt(num): |
This file contains hidden or 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
def maxF(L): | |
maxlength = 0 | |
for k, v in L.items(): | |
l = len(v) | |
if l > maxlength: | |
maxlength = l | |
return maxlength | |
a = [1546, 89, 989, 1131, 289, 565, 10, 2, 54791] | |
L = {i:str(a[i]) for i in range(len(a))} |
This file contains hidden or 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
def maxF(L): | |
maxlength = 0 | |
for k, v in L.items(): | |
l = len(v) | |
if l > maxlength: | |
maxlength = l | |
return maxlength | |
a = [1546, 89, 989, 1131, 289, 565, 10, 2] | |
L = {i:str(a[i]) for i in range(len(a))} |
This file contains hidden or 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
CS50::query("INSERT INTO places (country_code, postal_code, place_name, admin_name1, admin_code1, admin_name2, admin_code2, admin_name3, admin_code3, latitude, longitude, accuracy) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", $data[0],$data[1],$data[2],$data[3],$data[4],$data[5],$data[6],$data[7],$data[8],$data[9],$data[10],$data[11]); |
This file contains hidden or 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
import { Component } from '@angular/core'; | |
export class Hero { | |
id: number; | |
name: string; | |
} | |
@Component({ | |
template:` | |
<h1>{{title}}</h1> |
This file contains hidden or 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
let g:ycm_global_ycm_extra_conf = "~/.vim/.ycm_extra_conf.py" |
This file contains hidden or 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
import os | |
import ycm_core | |
# These are the compilation flags that will be used in case there's no | |
# compilation database set (by default, one is not set). | |
# CHANGE THIS LIST OF FLAGS. YES, THIS IS THE DROID YOU HAVE BEEN LOOKING FOR. | |
flags = [ | |
'-Wall', | |
'-Wextra', | |
'-Werror', |
NewerOlder