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 cv2 | |
| import numpy as np | |
| import speech_recognition as sr | |
| import pyttsx3 | |
| from threading import Thread | |
| def load_face_data(): | |
| face_data = [] |
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
| 10-07 15:22:16.010 16074 16074 D FirebaseCrashlytics: Crashlytics is handling uncaught exception "java.lang.RuntimeException: Test Crash" from thread main | |
| 10-07 15:22:16.033 16074 16113 D FirebaseCrashlytics: Persisting fatal event for session 615EC2DC00E900013ECA16BE46E42973 | |
| 10-07 15:22:16.230 16074 16113 D FirebaseCrashlytics: No log data to include with this event. | |
| 10-07 15:22:16.353 16074 16113 D FirebaseCrashlytics: Finalizing report for session 615EC2DC00E900013ECA16BE46E42973 | |
| 10-07 15:22:16.481 16074 16113 D FirebaseCrashlytics: Opening a new session with ID 615EC35001E100023ECA16BE46E42973 | |
| 10-07 15:22:16.487 16074 16113 D FirebaseCrashlytics: Crashlytics automatic data collection ENABLED by API. | |
| 10-07 15:22:16.493 16074 16214 D FirebaseCrashlytics: Logging Crashlytics event to Firebase | |
| 10-07 15:22:16.497 16074 16214 D FirebaseCrashlytics: Awaiting app exception callback from FA... | |
| 10-07 15:22:16.730 16074 16113 D FirebaseCrashlytics: Crashlytics report could not be enqueued to DataTransport | |
| 10-07 15:2 |
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 android.view.LayoutInflater | |
| import android.view.ViewGroup | |
| import androidx.recyclerview.widget.DiffUtil | |
| import androidx.recyclerview.widget.ListAdapter | |
| import androidx.recyclerview.widget.RecyclerView | |
| class $CLASS_NAME$() : ListAdapter<$MODEL_CLASS$, $VIEW_HOLDER$>($DIFF_UTIL_CLASS$()) { | |
| override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): $VIEW_HOLDER$ { | |
| return $VIEW_HOLDER$( |
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
| public class Helpers { | |
| final protected static char[] hexArray = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'}; | |
| public static String bytesToHex(byte[] bytes) { | |
| char[] hexChars = new char[bytes.length * 2]; | |
| int v; | |
| for (int j = 0; j < bytes.length; j++) { | |
| v = bytes[j] & 0xFF; | |
| hexChars[j * 2] = hexArray[v >>> 4]; | |
| hexChars[j * 2 + 1] = hexArray[v & 0x0F]; |
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.text.SimpleDateFormat; | |
| import java.util.Date; | |
| import java.util.Locale; | |
| public class EasyLogger { | |
| private static StringBuilder sb; | |
| /** | |
| * A way to log all around application |
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" | |
| xmlns:app="http://schemas.android.com/apk/res-auto" | |
| xmlns:tools="http://schemas.android.com/tools" | |
| android:layout_width="match_parent" | |
| android:layout_height="match_parent" | |
| app:cardCornerRadius="20dp"> | |
| <androidx.constraintlayout.widget.ConstraintLayout | |
| android:id="@+id/linearLayout" |
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
| //var express = require('express'); | |
| //var app = express(); | |
| app.use((req, res, next) => { | |
| res.header('Access-Control-Allow-Origin', '*'); | |
| res.header('Access-Control-Allow-Headers', "Origin, X-Requested-With, Content-Type, Accept, Authorization"); | |
| if (req.method === 'OPTIONS') { | |
| res.header('Access-Control-Allow-Method', 'PUT, POST, PATCH, DELETE, GET'); | |
| return res.status(200).json({}); |
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
| //Install firebase admin | |
| //npm install firebase-admin --save | |
| //Get generated key and place it in the working directory | |
| //Replace line 7 file name with yours | |
| var firebase = require("firebase-admin"); | |
| var serviceAccount = require("./service_accountKey.json"); |
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
| public static int convertDip2Pixels(Context context, int dip) { | |
| return (int)TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dip, context.getResources().getDisplayMetrics()); | |
| } |
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
| AnimatorSet animatorSet = new AnimatorSet(); | |
| animatorSet.playTogether( | |
| ObjectAnimator.ofFloat(image,"translationY",-1000,0), | |
| ObjectAnimator.ofFloat(image,"alpha",0,1), | |
| ObjectAnimator.ofFloat(text,"translationX",-200,0) | |
| ); | |
| animatorSet.setInterpolator(new DescelerateInterpolator()); | |
| animatorSet.setDuration(2000); | |
| animatorSet.addListener(new AnimatorListenerAdapter(){ | |
| @Override public void onAnimationEnd(Animator animation) { |
NewerOlder