Skip to content

Instantly share code, notes, and snippets.

View risingsunomi's full-sized avatar
🏠
Working from home

Vincent risingsunomi

🏠
Working from home
View GitHub Profile
@risingsunomi
risingsunomi / index.html
Last active August 29, 2015 14:12
Slide Form
<div class="container owlnav-container">
<div class="row">
<div class="controls-container col-md-8">
<div class="dropdown">
<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-expanded="true">
<i class="fa fa-cog"></i>
<span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Edit</a></li>
@risingsunomi
risingsunomi / ByQyXd.markdown
Last active August 29, 2015 14:12
CSV to jQuery DataTable [Bootstrap 3]
@risingsunomi
risingsunomi / gist:f553de04c96698d00ed4
Created March 14, 2015 20:04
Drag and Drop Owl Carousel
$.fn.outerHTML = function(s) {
return s
? this.before(s).remove()
: jQuery("<p>").append(this.eq(0).clone()).html();
};
$(function(){
$(".owl-carousel").owlCarousel({
mouseDrag: false,
touchDrag: false,
@risingsunomi
risingsunomi / gist:6ab6ae55b04f6d1f5cc8443cacc82953
Created July 18, 2016 23:27
Program.cs for Windows Service with debugging template
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using System.Reflection;
using System.Threading;
namespace SomeService
{
@risingsunomi
risingsunomi / above_average_subarrays.py
Created February 22, 2022 22:35
From a mock interview question
"""
Above-Average Subarrays
You are given an array A containing N integers. Your task is to find all subarrays whose average sum is greater
than the average sum of the remaining array elements. You must return the start and end index of each subarray in sorted order.
A subarray that starts at position L1 and ends at position R1 comes before a subarray that starts at L2 and ends at
R2 if L1 < L2, or if L1 = L2 and R1 ≤ R2. Note that we'll define the average sum of an empty array to be 0, and
we'll define the indicies of the array (for the purpose of output) to be 1 through N. A subarray that contains a
single element will have L1 = R1.
Signature
@risingsunomi
risingsunomi / get_fbi_wanted_images.py
Created May 17, 2022 06:33
Scrape offender images from FBI Wanted collection
#!/usr/bin/env python3
import re
import requests
from bs4 import BeautifulSoup
import uuid
from PIL import Image
from io import BytesIO
site = 'https://www.fbi.gov/feeds/wanted-collection'
@risingsunomi
risingsunomi / noggin_scrape.py
Last active May 13, 2024 21:53
Simple Noggin scraper
import requests
import os
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.chrome.options import Options
from fake_useragent import UserAgent as faUserAgent
import logging