Skip to content

Instantly share code, notes, and snippets.

View RayyanNafees's full-sized avatar
🤘
Innovative than ever

Rayyan Nafees RayyanNafees

🤘
Innovative than ever
View GitHub Profile
from string import printable
def file_to_int(path: str) -> int:
with open(path, 'rb') as file:
bytez = file.read()
return int.from_bytes(bytez, 'big')
async function getImages(query) {
const url = `https://www.google.com/search?q=${query}&tbm=isch`;
const html = await fetch(url).then((r) => r.text());
const parser = new DOMParser();
const doc = parser.parseFromString(html, "text/html");
const images = [...doc.getElementsByClassName("rg_i Q4LuWd")]; // all search results are of the class "rg_i Q4LuWd"
const links = images.map((i) => i.src);
return links;
}
import React, { Component } from 'react';
import { StyleSheet, View,Text, Image, Animated, Dimensions } from 'react-native';
import Interactable from 'react-native-interactable';
const widthFactor = Dimensions.get('window').width / 375;
const heightFactor = (Dimensions.get('window').height - 75) / 667;
const showSecondFace = true;
const showThirdFace = true;
const showFourthFace = true;
@RayyanNafees
RayyanNafees / Tasks.md
Created January 16, 2022 15:53
The Forum project by prosper uche (StackOverflow + Quora)

Qwack!

Task 1:

Create a forum like stack overflow with:

  • CRUD
  • votes
  • comments
  • menthions
  • OAuth login.
@RayyanNafees
RayyanNafees / vid_split.js
Created February 4, 2022 09:42
Video splittings applications in py or nodeJS for splitting 30 secs videos
var ffmpeg = require('fluent-ffmpeg');
var command1 = ffmpeg()
.input('./small.mp4')
.seekInput('00:00:02')
.withDuration(1)
.output('./temp1.mp4')
.run();
var command2 = ffmpeg()

7 Things That You Need To Avoid When You Are With Your Crush

Believe it or not, you may often end up doing weird things when you are around your crush. No matter how hard you try, your actions seem to be beyond your control. The nervousness and the excitement to be around your crush may make you do such weird things. It is obvious that you will try your best to not buy yourself tons of embarrassment. To help you with this, we have brought a list of things that you need to avoid doing around your crush.

Taken from the blog

1. Never Change Yourself To Impress Your Crush

You might be doing the lamest thing ever if you think that changing yourself will make your crush fall for you. Let your crush accept you the way you are. You don't have to force yourself to eat what he/she likes the most. You don't have to pretend to be a bilingual only to impress your crush. As far as t

TuneGenerator();
function TuneGenerator() {
const notesGenerator = new NotesGenerator();
setInterval(function () {
notesGenerator.playNote(3);
}, 800);
setInterval(function () {
@RayyanNafees
RayyanNafees / suite.html
Created May 2, 2022 07:08
A firebase hosted index.json for redirecting to the ugly suite url
<html>
<head>
<title> CodeCube Suite </title>
<meta name="description" content="A project management suite for codecube" />
<script>
location.href='http://crm.mycsnl.com/';
</script>
</head>
@RayyanNafees
RayyanNafees / pyqt_example.py
Created May 10, 2022 19:38
A fiddle example for PyQt4
#!/bin/env python
# coding: utf-8
from PyQt4.QtCore import *
from PyQt4.QtGui import *
import sys
class MainWindow(QMainWindow):
def __init__(self, parent=None):
super(MainWindow, self).__init__(parent)
<!DOCTYPE HTML>
<html>
<head>
<title></title>
</head>
<body>
<button>
Google
</button>
<button>