Skip to content

Instantly share code, notes, and snippets.

View rgajrawala's full-sized avatar
🖥️
Coding...

Ronak Gajrawala rgajrawala

🖥️
Coding...
View GitHub Profile
@rgajrawala
rgajrawala / generate.js
Created August 10, 2023 04:37
AssettoServer Entry List Random Traffic Generator
const path = require('path');
const fs = require('fs');
// CONSTANTS //
const STARTING_ENTRY = 40;
const ENDING_ENTRY = 89;
const CARS = [
['traffic_audi_a4_jp'],
['traffic_isuzu_flatbed'],
['traffic_isuzu_hauler'],
@rgajrawala
rgajrawala / __init__.py
Created February 22, 2022 04:31
ThreeJS Blender Converter Plugin
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@rgajrawala
rgajrawala / anyCodableHack.swift
Last active March 19, 2021 18:14
Hack for "AnyCodable" for encoding an array of generic structs.
// https://stackoverflow.com/a/66697096/2006429
import Foundation
enum ChangeOp: String, Encodable {
case replace
case append
}
enum ChangePath: String, Encodable {
@rgajrawala
rgajrawala / main.py
Created June 6, 2019 05:21
Twitter Bot that responds to mentions with human faces in the media. Takes the face, runs emotion detection, and edits it into a corresponding photo of a flower.
import os
import time
import pickle
import urllib3 as urllib
import numpy as np
import cv2 as cv
from keras.models import load_model
from keras.applications import VGG16
import tweepy
require('express')()
.get('/', (req, res) => res.send('Hello World!'))
.listen(3000, () => console.log(`Example app listening on port ${3000}!`));
@rgajrawala
rgajrawala / config.js
Last active March 18, 2019 02:57
IRC Javascript Runner
var config = {
server: 'irc.freenode.net', /**< Server address */
userName: 'jsrunner', /**< Display name */
realName: 'Javascript/Typescript/Coffeescript Runner', /**< Real name */
password: undefined, /**< Password (plaintext string) */
port: 6667, /**< Server port */
debug: false,
showErrors: false,
autoRejoin: false,
autoConnect: false,