Skip to content

Instantly share code, notes, and snippets.

View ashim888's full-sized avatar

Ashim Lamichhane ashim888

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ashim888
ashim888 / captcha_solver.py
Created December 21, 2023 05:29 — forked from MrAch26/captcha_solver.py
Captcha Solver with python
from PIL import Image
from scipy.ndimage import gaussian_filter
import numpy
import pytesseract
from PIL import ImageFilter
def solve_captcha(filename):
# thresold1 on the first stage
th1 = 140
th2 = 140 # threshold after blurring
'automatical movement based on mathematical formulas.....
'(c) fbr@vizrt.com
dim target as container = Scene.FindContainer("Result")
sub OnInitParameters()
'create the GUI
RegisterParameterString("url", "URL:","http://cricket.yarsha.net", 50,255, "")
Verifying my Blockstack ID is secured with the address 12VR5CPymXjkW6hXqppZ59x334eHDCG9Bs https://explorer.blockstack.org/address/12VR5CPymXjkW6hXqppZ59x334eHDCG9Bs
@ashim888
ashim888 / cors.inc
Created April 13, 2018 09:00 — forked from antonbabenko/cors.inc
(nginx AND varnish) + CORS (working example)
more_set_headers "Access-Control-Allow-Origin: $http_origin";
more_set_headers "Access-Control-Allow-Credentials: true";
# OPTIONS indicates a CORS pre-flight request
if ($request_method = 'OPTIONS') {
more_set_headers "Access-Control-Max-Age: 1728000";
more_set_headers "Access-Control-Allow-Methods: GET, POST, PUT, DELETE, PATCH, OPTIONS";
more_set_headers "Access-Control-Allow-Headers: Authorization,Content-Type,Accept,Origin,User-Agent,DNT,Cache-Control,X-Mx-ReqToken,Keep-Alive,X-Requested-With,If-Modified-Since";
more_set_headers "Content-Length: 0";
@ashim888
ashim888 / sane-caching.nginx.conf
Created March 26, 2018 17:17 — forked from philipstanislaus/sane-caching.nginx.conf
Sample Nginx config with sane caching settings for modern web development
# Sample Nginx config with sane caching settings for modern web development
#
# Motivation:
# Modern web development often happens with developer tools open, e. g. the Chrome Dev Tools.
# These tools automatically deactivate all sorts of caching for you, so you always have a fresh
# and juicy version of your assets available.
# At some point, however, you want to show your work to testers, your boss or your client.
# After you implemented and deployed their feedback, they reload the testing page – and report
# the exact same issues as before! What happened? Of course, they did not have developer tools
# open, and of course, they did not empty their caches before navigating to your site.
@ashim888
ashim888 / get_image_digitalocean.txt
Last active August 28, 2016 11:02
Get digitalocean ID from a packer build
packer build packer-install-template.json | tee output.txt
tail -1 output.txt | head -1 | awk 'match($0, / [0-9]+/) { print substr($0, RSTART, RLENGTH) }'
@ashim888
ashim888 / safety.py
Last active July 6, 2016 11:05
Child Safety Detection
#!/usr/bin/python
# -*- coding: utf-8 -*-
from pymongo import MongoClient
import pprint
from nltk.corpus import stopwords
from nltk.tokenize import RegexpTokenizer
from microsofttranslator import Translator
import langid
porn_list=["anal","hentai","anus","arse","butt","arsehole","ass","fcuk","fuck","naked","xvideos","porn", "sex", "porno", "free porn", "porn tube", "porn videos", "streaming porn","Free porn", "sex videos","pussy","Porn hub", "xxx" "porn", "sex" ]
# coding=UTF-8
from __future__ import division
import re
# This is a naive text summarization algorithm
# Created by Shlomi Babluki
# April, 2013
class SummaryTool(object):