Skip to content

Instantly share code, notes, and snippets.

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

Rafeh Qazi CleverProgrammer

🏠
Working from home
View GitHub Profile
@Phoenix-Effect
Phoenix-Effect / main.py
Last active February 11, 2022 22:00
Scrape videos data from youtube and push to airtable. By default reads from videos.txt but can defined with an argument.
import pafy
import os
import glob
import re
from airtable import Airtable
from airtable.auth import AirtableAuth
import requests
from pathlib import Path
from webvtt import WebVTT
@quangnd
quangnd / reduceExamples.js
Last active November 24, 2023 19:57
Some examples about reduce() in Javascript
//Example 1 - Calculate average value of an array (transform array into a single number)
var scores = [89, 76, 47, 95]
var initialValue = 0
var reducer = function (accumulator, item) {
return accumulator + item
}
var total = scores.reduce(reducer, initialValue)
var average = total / scores.length
/*Explain about function
@thewheat
thewheat / intercom-teachable.com.rb
Last active July 8, 2020 09:57
Integrating Intercom with Teachable.com Power Editor > Templates > Layouts > partials > footer
{% endcache %}
<script>
// TODO: change the instances of APP_ID to your specific app_id value
{% if current_user == null %}
window.intercomSettings = {
app_id: "APP_ID"
};
@lorinma
lorinma / c9.sh
Created December 27, 2015 19:33
running ipython notebook on cloud9
ipython notebook --ip=0.0.0.0 --port=8080 --no-browser
@CleverProgrammer
CleverProgrammer / anagrams.py
Last active November 26, 2015 22:55
Return a sorted list with all non-anagrams omitted.
"""
Author: Rafeh Qazi.
Program: Anagram finder.
Description: Return a sorted list with all non-anagrams omitted.
Constraints: No imports.
input: anagram_finder(['star', 'rats', 'cats', 'tacs', 'dog'])
output: ['cats', 'rats', 'star', 'tacs']
"""
import graphviz as gv
g1 = gv.Graph(format='svg')
g1.node('A')
g1.node('B')
g1.edge('A', 'B')
print(g1.source)
@jedschneider
jedschneider / gh-pages-tips.md
Created June 7, 2012 17:59
github pages tips for jekyll wiki

Working With Github Pages

The FAQ maintained by Github covers most stumbling blocks, some other tips and tricks supplied here.

Gitignore

Add _site to .gitignore. The generated site should not be uploaded to Github since its gets generated by github.

Working With Code Partials

@bradmontgomery
bradmontgomery / ShortIntroToScraping.rst
Created February 21, 2012 02:00
Really short intro to scraping with Beautiful Soup and Requests
@daveray
daveray / seesaw-repl-tutorial.clj
Created December 7, 2011 04:55
Seesaw REPL Tutorial
; A REPL-based, annotated Seesaw tutorial
; Please visit https://github.com/daveray/seesaw for more info
;
; This is a very basic intro to Seesaw, a Clojure UI toolkit. It covers
; Seesaw's basic features and philosophy, but only scratches the surface
; of what's available. It only assumes knowledge of Clojure. No Swing or
; Java experience is needed.
;
; This material was first presented in a talk at @CraftsmanGuild in
; Ann Arbor, MI.