Skip to content

Instantly share code, notes, and snippets.

View mickeypash's full-sized avatar
🐢
slow and steady wins the race

Mickey Pashov mickeypash

🐢
slow and steady wins the race
View GitHub Profile
import requests
mickey_ch_id = 'UCyHQxCUs1ENbnj36FjesG7Q'
marc_ch_id = 'UCzhG6dIYhenVoRVgcdUexLQ'
stoyan_ch_id = 'stoyanjr'
base_url = 'https://www.googleapis.com/youtube/v3/'
path = 'subscriptions?part=id&channelId=UCyHQxCUs1ENbnj36FjesG7Q&fields=items%2Fid&key='
full_path = '{0}{1}{2}'.format(base_url, path, API_KEY)
@mickeypash
mickeypash / web-whatsapp.js
Created May 7, 2016 21:35
This is the javascript process running the web client for whatsapp
This file has been truncated, but you can view the full file.
/*! Copyright (c) 2015 WhatsApp Inc. All Rights Reserved. */
webpackJsonp([84], [, function(e, t, r) {
"use strict";
function n() {
return u[Math.round(Math.random() * (u.length - 1))]
}
function o() {
this.logs = [], this.localCursor = 0, this.pending = void 0, this.timer = new d(this, this.persistIdb)
@mickeypash
mickeypash / analysis.ipynb
Created August 29, 2015 17:43
Trying to create some of the suggested graphs.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mickeypash
mickeypash / treconomics.py
Created August 20, 2015 12:15
This problem occurs when participants attempt to view a document.
Environment:
Request Method: GET
Request URL: http://ede1a05.ngrok.com/treconomics/391485/
Django Version: 1.7
Python Version: 2.7.10
Installed Applications:
('django.contrib.auth',
@mickeypash
mickeypash / document2.html
Created August 9, 2015 16:05
document for the wildlife query
<p>
KITENGELA, Kenya _ On a clear day, Agnes Patita can see the
tourists in vans inching along dirt roads, searching the plains for
antelope, zebra, giraffe and, if they are lucky, an elusive pride
of lions.
</p><p>
But the majestic cats the tourists pay to see are dangerous
pests to Mrs. Patita. Lions have killed more than 20 cattle here in
the last two months. On a recent night, two lions broke into the
@mickeypash
mickeypash / pythonic.py
Created July 26, 2015 22:24
My solution is in the comments
def getQueryResultPerformance(results, topic_num):
i = 0
rels_found = 0
for r in results:
i += 1
if qrels.get_value(topic_num, r.docid) > 0:
rels_found += 1
# rels_found = sum(qrels.get_value(topic_num, r.docid) > 0 for r in results)
# return [rels_found, len(results)]
@mickeypash
mickeypash / search_book.py
Last active August 29, 2015 14:25
Scraping practice.
#!/usr/bin/env python
import requests
from bs4 import BeautifulSoup
def make_soup(url):
r = requests.get(url)
soup = BeautifulSoup(r.content, 'lxml')
return soup
@mickeypash
mickeypash / python_resources.md
Last active August 29, 2015 14:25 — forked from jookyboi/python_resources.md
Python-related modules and guides.

Packages

  • lxml - Pythonic binding for the C libraries libxml2 and libxslt.
  • boto - Python interface to Amazon Web Services
  • Django - Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
  • Fabric - Library and command-line tool for streamlining the use of SSH for application deployment or systems administration task.
  • PyMongo - Tools for working with MongoDB, and is the recommended way to work with MongoDB from Python.
  • Celery - Task queue to distribute work across threads or machines.
  • pytz - pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.4 or higher.

Guides

@mickeypash
mickeypash / 0_reuse_code.js
Last active August 29, 2015 14:25
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@mickeypash
mickeypash / phone-issues.md
Created May 16, 2015 14:57
Problems with my Samsung Galaxy S3