This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
# Shopify App Block Loader | |
# This script renders block liquid files to HTML, allowing you to load them | |
# up and view them locally in isolation. This allows you to load them up for | |
# testing and to see how they operate. For example we have a complex javascript | |
# that runs and we need to see how it interacts with a complete page. This is | |
# a rough approximation of what is necessary for shopify. Does not include out | |
# of block scope elements but does include the wrapping block div. Note this | |
# does not render an entire product page. It only renders the block itself. | |
## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from scrapingbee import ScrapingBeeClient | |
import time | |
import logging | |
import json | |
SCRAPING_BEE_API_KEY = "RBUHWF4Y0ORC8RGXVRG07VNCBNFN3AH3083P3CHJKEF00HIFGQD2Z0BIMXD4C7AHF14S361H85NZ5TYF" # replace with your API key | |
class ScrappingBeeClientWrapper: | |
def __init__(self, client, client_config): | |
self.client = client |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Adapted from https://www.osrsbox.com/blog/2019/03/18/watercooler-scraping-an-entire-subreddit-2007scape/ | |
import requests | |
import json | |
import re | |
import time | |
import os | |
SUBREDDIT = "movies" | |
PUSHSHIFT_REDDIT_URL = "http://api.pushshift.io/reddit" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# score.py | |
import os | |
import settings | |
from tqdm import tqdm | |
from skimage.io import imread | |
import numpy as np | |
import metrics | |
from keras.models import Model, load_model | |
from skimage.morphology import label | |
from skimage.transform import resize |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<configuration> | |
<configSections> | |
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" /> | |
</configSections> | |
<startup> | |
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> | |
</startup> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
namespace MD5 | |
{ | |
/// <summary> | |
/// RFC for MD5 https://tools.ietf.org/html/rfc1321 | |
/// Based on the pseudo code from Wikipedia: https://en.wikipedia.org/wiki/MD5 | |
/// </summary> | |
public class MD5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def missing_number(s_final): | |
for starting_length in range(1, (len(s_final)/2) + 1): | |
s = s_final[:] # copy | |
skipped = -1 | |
starting_number = int(s[:starting_length]) | |
plus_one = starting_number + 1 # the two valid options | |
plus_two = starting_number + 2 | |
s = s[starting_length:] | |
round_passed = True | |
while s and round_passed: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tempfile, uuid, pyscreenshot | |
from twilio.rest import TwilioRestClient | |
from azure.storage import BlobService | |
# Your Account Sid and Auth Token from twilio.com/user/account | |
twilio_account_sid = "" | |
twilio_auth_token = "" | |
client = TwilioRestClient(twilio_account_sid, twilio_auth_token) | |
# Screencap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def rotate(n, i): | |
j = 0 | |
s = str(n) | |
while(j < i): | |
s = s[-1] + s[:-1] | |
j += 1 | |
return int(s) | |
def rn(n, m): | |
count = 0 |
NewerOlder