This file contains hidden or 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
const validator = require("email-validator"); | |
module.exports = function(context, callback) { | |
/* | |
* module to check email, context.data.input is a scaphold's CreateUserInput. | |
* email is must be valid email, using email-validator | |
*/ | |
const userInput = context.data.input; |
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 hidden or 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 feedparser | |
url = "your rss url" | |
parsed = feedparser.parse(url) | |
for item in parsed.entries: | |
print("title " + item.title) | |
print("description " + item.description) | |
print("guid " + item.guid) |
This file contains hidden or 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
# actually, i create it in one file :D | |
import mongoengine | |
mongoengine.connect("upwork", host="the host url that you got from mlab.com") | |
class Url(mongoengine.Document): | |
title = mongoengine.StringField() | |
url = mongoengine.StringField() | |
This file contains hidden or 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
""" | |
1. iterate over all urls | |
2. parse | |
3. if item not in database: create notification and save | |
4. else: pass | |
""" | |
for url in Url.objects: | |
parsed = feedparser.parse(url.url) # note that we need the url attribute not Url object in order to parsing rss | |
This file contains hidden or 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 telethon | |
# lets play first with telethon | |
# create client | |
app_id = '' | |
app_hash = '' # you got this two from my.telegram.org | |
client = telethon.TelegramClient('session-name', app_id, app_hash) | |
client.start() |
This file contains hidden or 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
#!/bin/bash | |
# pip install uncompyle6 | |
for item in $(tree --noreport -if -P '*.pyc'); do | |
if [[ -f $item ]]; then | |
folder=$(dirname $item) | |
uncompyle6 -o $folder $item | |
#statements | |
fi |
This file contains hidden or 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
// 1 | |
<script src="https://code.jquery.com/jquery-3.4.1.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" | |
crossorigin="anonymous"></script> | |
// 2 | |
<script src="https://www.google.com/recaptcha/api.js?render=reCAPTCHA_site_key"></script> | |
<script> | |
// 3 | |
grecaptcha.ready(function() { | |
// 4 |
This file contains hidden or 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
// 1 | |
<script src="https://code.jquery.com/jquery-3.4.1.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" | |
crossorigin="anonymous"></script> | |
// 2 | |
<script src="https://www.google.com/recaptcha/api.js?render=reCAPTCHA_site_key"></script> | |
<script> | |
// 3 | |
grecaptcha.ready(function() { | |
// 4 |
This file contains hidden or 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
RECAPTCHA_SITE_KEY = "your site key" | |
RECAPTCHA_SECRET_KEY = "your secret key" |