Skip to content

Instantly share code, notes, and snippets.

View gsasikiran's full-sized avatar
🔭

Sasi Kiran Gaddipati gsasikiran

🔭
View GitHub Profile
@gsasikiran
gsasikiran / chaosGame.java
Last active December 9, 2020 13:27
Chaos Game inspired from https://www.youtube.com/watch?v=kbKtFN71Lfs&t=1s. It generates Sierpiński triangle, when points = 3 and moving by half the length to each point with same probability. Try to tune different number of points and change the amount of length you can move from 1/2 to 1/3 (in lines 57 and 58) for different patterns.
/**
* Generates various fractals of geometries using chaos game as
* mentioned in https://www.youtube.com/watch?v=kbKtFN71Lfs&t=1s
*/
import java.awt.*;
import javax.swing.*;
import java.util.*;
import java.lang.Math;
@gsasikiran
gsasikiran / synonym_search.py
Last active February 2, 2021 16:16
Find all the synonyms for a given word in a text corpus
import argparse
import regex as re
from nltk.corpus import wordnet
class SynonymSearch:
def __init__(self):
pass
@gsasikiran
gsasikiran / image_composite.py
Created March 19, 2019 18:55 — forked from njanirudh/image_composite.py
Creates a composite image
import cv2
import glob
import os
import random
def create_composite_image(_fg_image , _bg_image):
"""
Creates composite images from a given set of foreground and background images
:param _fg_image: path to foreground images folder
:param _bg_image: path to background images folder