Skip to content

Instantly share code, notes, and snippets.

View mirsahib's full-sized avatar
🎯
Focusing

Mir Habib Ul Latif 🇧🇩 🇵🇸 mirsahib

🎯
Focusing
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BrokenProcessPool Traceback (most recent call last)
<ipython-input-34-460d6f5fb3a7> in <module>
1 if __name__ == '__main__':
2 with concurrent.futures.ProcessPoolExecutor() as executor:
----> 3 for result in zip(fileName,executor.map(run_svm, fileName)):
4 print(result)
C:\ProgramData\Anaconda3\lib\concurrent\futures\process.py in _chain_from_iterable_of_lists(iterable)
481 careful not to keep references to yielded objects.
482 """
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 19 10:55:10 2020
@author: Mir Sahib
"""
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
const mongoose = require("mongoose");
const userSchema = mongoose.Schema({
Year: { type: Number, required: true },
Semester: { type: String, required: true },
School: { type: String, required: true },
Department: { type: String, required: true },
Major: { type: String, required: true },
Students: { type: Number, require: true }
});
router.get("/semester", async (req, res) => {
var data = req.query;
console.log(data.str + " " + data.end);
var str = data.str;
var end = data.end;
var query = [
{
$match: {
Year: {
$gte: "$$str",
@mirsahib
mirsahib / Read_Write.java
Created August 31, 2019 12:44
writing a file in android device(external storage)
package com.example.read_write;
import android.Manifest;
import android.content.pm.PackageManager;
import android.os.Environment;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
@mirsahib
mirsahib / route.js
Created August 21, 2019 04:02 — forked from beshur/route.js
Javascript Node.js Express Login route with ajax responses
app.post('/login', function(req, res) {
console.log(res);
passport.authenticate('local', function(err, user, params) {
if (req.xhr) {
//thanks @jkevinburton
if (err) { return res.json({ error: err.message }); }
// e.g. in auth.js:
// if (!user.emailVerified) { return done(null, false, { message: 'Email is not verified. Please check your email for the link.' }); }
if (!user && params) { return res.json({error : params.error}); }
//database setting
var db_url =
"mongodb+srv://mirsahib24:[email protected]/rotten-pumpkin?retryWrites=true&w=majority";
mongoose.connect(db_url, { useNewUrlParser: true });
mongoose.connection.on("error", function(err) {
console.log(err);
console.log("Could not connect to mongodb");
});
$(document).ready(function() {
loadApiData(function showApiData() {
//display the localstorage data
nowPlaying = JSON.parse(localStorage.getItem("now_playing"));
upComming = JSON.parse(localStorage.getItem("upcomming"));
popular = JSON.parse(localStorage.getItem("popular"));
console.log(nowPlaying);
console.log(upComming);
console.log(popular);
-64 -56 -61 -66 -71 -82 -81 1
-68 -57 -61 -65 -71 -85 -85 1
-63 -60 -60 -67 -76 -85 -84 1
-61 -60 -68 -62 -77 -90 -80 1
-63 -65 -60 -63 -77 -81 -87 1
-64 -55 -63 -66 -76 -88 -83 1
-65 -61 -65 -67 -69 -87 -84 1
-61 -63 -58 -66 -74 -87 -82 1
-65 -60 -59 -63 -76 -86 -82 1
-62 -60 -66 -68 -80 -86 -91 1