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
'use strict'; | |
require('../common'); | |
const tmpdir = require('../common/tmpdir'); | |
const assert = require('node:assert'); | |
const fs = require('node:fs'); | |
const path = require('node:path'); | |
const { execSync } = require('child_process'); | |
tmpdir.refresh(); // Prepare a clean temporary directory |
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
[ | |
{ | |
"_id": "5f4011d1fadf274a8862865a", | |
"title": "ad labore tempor eiusmod et", | |
"description": "Minim enim deserunt id aliquip tempor elit amet culpa voluptate officia pariatur voluptate adipisicing. Enim ex anim enim voluptate minim esse. Dolore dolore ad nostrud sint. Adipisicing ex voluptate veniam in elit pariatur irure pariatur tempor irure ex amet quis. Proident incididunt non qui consequat duis Lorem in labore sunt Lorem adipisicing anim eiusmod. Nisi Lorem nostrud deserunt reprehenderit enim quis eu duis minim enim. Eiusmod anim voluptate dolore exercitation qui cupidatat nostrud pariatur.\r\nId laborum velit Lorem culpa. Ipsum velit laboris est laborum minim exercitation. Pariatur esse occaecat occaecat duis eiusmod reprehenderit labore commodo officia ea. Labore ut labore ad in. Elit consequat do fugiat sit. Ex eu dolor nulla quis ipsum. Adipisicing velit duis excepteur fugiat.\r\n", | |
"picture": "https://placehold.it/500x500", | |
"price": 37, | |
"stock": 7 | |
}, | |
{ |
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 React, { useState, useEffect } from 'react' | |
import { useHistory } from 'react-router-dom' | |
import Swal from "sweetalert2"; | |
const CreatePost = () => { | |
const history = useHistory() | |
const [title, setTitle] = useState("") | |
const [body, setBody] = useState("") |
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
#include <iostream> | |
#include <cmath> | |
using namespace std; | |
struct Data{ | |
double key; | |
double x; | |
double y; |
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
!apt-get install -y -qq software-properties-common module-init-tools | |
!add-apt-repository -y ppa:alessandro-strada/ppa 2>&1 > /dev/null | |
!apt-get update -qq 2>&1 > /dev/null | |
!apt-get -y install -qq google-drive-ocamlfuse fuse | |
from google.colab import auth | |
from oauth2client.client import GoogleCredentials |
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
homogeneous_point intersect(homogeneous_point p3,homogeneous_point p2, double z){ | |
homogeneous_point ans; | |
ans.w=1; | |
ans.z=z; | |
ans.x=p2.x + ((p3.x-p2.x)/(p3.z-p2.z))*(z-p2.z); | |
ans.y=p2.y + ((p3.y-p2.y)/(p3.z-p2.z))*(z-p2.z); | |
//ans.print(); | |
return ans; | |
} |
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
#include <iostream> | |
#include <fstream> | |
#include <cassert> | |
#include <iomanip> | |
#include <cmath> | |
#include <stack> | |
#include <queue> | |
#include "bitmap_image.hpp" | |
using namespace std; |
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
M = np.mean(train.T, axis=1) | |
C= M - train | |
V=np.cov(C.T) | |
eigenValues, eigenVectors =eig(V) | |
k=2 | |
idx = eigenValues.argsort()[-k:][::-1] | |
eigenValues = eigenValues[idx] | |
eigenVectors = eigenVectors[:,idx] |
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
for i in range(train.shape[0]): | |
v=[] | |
y=[] | |
inputNeuron = [train[i]] | |
v.append(inputNeuron) | |
y.append(inputNeuron) | |
for r in range(len(layerNeurons) -1): | |
w=weight[r] | |
matout=np.matmul(inputNeuron,w) |
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 AdaBoost(funcDcsn, sampleFrames, attList, \ | |
parentFrames,strtdepth, maxdepth,funcClassify,rootClass, K): | |
Y=sampleFrames.iloc[:,-1].values.tolist().copy() | |
#print(Y) | |
N=len(sampleFrames) | |
w= [1/N] * N | |
h= [] | |
z= [] | |
#print(w) |
NewerOlder