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
... | |
extern int | |
__vfprintf (FILE *fp, const char *format, va_list ap) | |
{ | |
return __vfprintf_internal (fp, format, ap, 0); | |
} | |
// source: https://github.com/bminor/glibc/blob/master/stdio-common/vfprintf.c | |
... |
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
... | |
int | |
__printf (const char *format, ...) | |
{ | |
va_list arg; | |
int done; | |
va_start (arg, format); | |
done = __vfprintf_internal (stdout, format, arg, 0); | |
va_end (arg); |
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 pandas as pd | |
import numpy as np | |
from scipy.optimize import curve_fit | |
import matplotlib.pyplot as plt | |
import sympy as sp | |
from pandas.plotting import table | |
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 cv2 | |
# Replace 1 with whatever camera you want | |
cap = cv2.VideoCapture(1) | |
if not cap.isOpened(): | |
print("Error: Could not open camera.") | |
exit() | |
cap.set(cv2.CAP_PROP_FRAME_WIDTH, 640) |
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 cv2 | |
def get_available_cameras(): | |
available_cameras = [] | |
# Check for 5 cameras | |
for i in range(5): | |
cap = cv2.VideoCapture(i) | |
if cap.isOpened(): | |
available_cameras.append(i) | |
cap.release() |
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
//Imagine these variables are publicly accessible or getters exist and I'm using those | |
public Fruit(String name, String color, String taste, boolean healthy, int size, float calories) { | |
this.name = name; | |
this.color = color; | |
this.taste = taste; | |
this.healthy = healthy; | |
this.size = size; | |
this.calories = calories; | |
} |
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
//imports | |
var express = require("express"), | |
app = express(), | |
mongoose = require("mongoose"), | |
port = 8000, | |
url ="mongodb://localhost:27017/api"; | |
//sets the view engine to html, need to change if want to use ejs | |
mongoose.connect(url, { | |
useNewUrlParser: true, | |
useUnifiedTopology: true |
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 java.io.*; | |
import java.net.*; | |
import java.util.Scanner; | |
public class Client { | |
public static void main(String[] args) throws UnknownHostException, IOException, ClassNotFoundException { | |
Scanner scan = new Scanner(System.in); | |