Skip to content

Instantly share code, notes, and snippets.

@xecgr
xecgr / [DEUTCH] Javascript ISO country code to country name mapping
Last active August 8, 2020 15:05
ISO 3166-1 alpha-2 country code to country name conversion with a simple Javascript implementation, an array and a function. It completes the English version from https://gist.github.com/maephisto/9228207
//initially crawled from https://de.wikipedia.org/wiki/ISO-3166-1-Kodierliste
//2020-03-23, reviewed by @luwe1204
isoCountries = {
"AD": "Andorra",
"AE": "Vereinigte Arabische Emirate",
"AF": "Afghanistan",
"AG": "Antigua und Barbuda",
"AI": "Anguilla",
"AL": "Albanien",
"AM": "Armenien",
@xecgr
xecgr / [FRANÇAIS] Javascript ISO country code to country name mapping
Created October 18, 2015 06:49
ISO 3166-1 alpha-2 country code to country name conversion with a simple Javascript implementation, an array and a function. It completes the English version from https://gist.github.com/maephisto/9228207
//crawled from https://fr.wikipedia.org/wiki/ISO_3166-1
isoCountries = {
"AD": "Andorre",
"AE": "\u00c9mirats Arabes Unis",
"AF": "Afghanistan",
"AG": "Antigua-Et-Barbuda",
"AI": "Anguilla",
"AL": "Albanie",
"AM": "Arm\u00e9nie",
"AO": "Angola",
@xecgr
xecgr / [ESPAÑOL] Javascript ISO country code to country name mapping
Created October 18, 2015 06:50
ISO 3166-1 alpha-2 country code to country name conversion with a simple Javascript implementation, an array and a function. It completes the English version from https://gist.github.com/maephisto/9228207
//crawled from https://es.wikipedia.org/wiki/ISO_3166-1
isoCountries = {
"AD": "Andorra",
"AE": "Emiratos \u00c1rabes Unidos (los)",
"AF": "Afganist\u00e1n",
"AG": "Antigua y Barbuda",
"AI": "Anguila",
"AL": "Albania",
"AM": "Armenia",
"AO": "Angola",
import requests
device_id = 'betabeers'
lang = 'es'
choice = ''
page_size = 20
while not choice:
choice = raw_input("Hola mestre, quin hashtag vols hackejar?: ")
more = ''
loops = 0
import requests, urllib, json, urllib3
urllib3.disable_warnings()
default_words = ['hola', 'adios']
default_lang = 'es'
trans_langs = ['en', 'fr', 'it']
key = "AIzaSyBtfSp9TSlUDCNJ0jTwFc-PelOc24-LuzM"
result = {
default_lang : default_words
import requests,urllib3
urllib3.disable_warnings()
choice = ''
while not choice:
choice = raw_input("Hola mestre, quin hashtag vols hackejar?: ")
headers = {
'host': 'i.instagram.com',
'Connection': 'keep-alive',
@xecgr
xecgr / json
Created June 14, 2016 14:16
[ISO 3166] Country regions relationship
{
"BD": [
"BD-A",
"BD-B",
"BD-C",
"BD-D",
"BD-E",
"BD-F",
"BD-G"
],
@xecgr
xecgr / upwork_advanced_filters.py
Last active February 13, 2017 10:00
For those that want to filter some advanced fields in upwork jobs (rising talent, minimun avg hourly rate, etc)
import feedparser,requests,bs4
from datetime import datetime,timedelta
import sys,os,re
from time import mktime
from smtplib import SMTP_SSL as SMTP # this invokes the secure SMTP protocol (port 465, uses SSL)
# from smtplib import SMTP # use this for standard SMTP protocol (port 25, no encryption)
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
##mail config
9aa1c8fa4968466bb9cf43adc7d106f9,4590a240
3384a24df53c4fbea9e0b7840ecd251d,4590985e
c4b9bde26a604c77ae0c84276188bcaf,45907505
9153db6a3ce24d8aa34b5fb674aeff25,45908870
8d7e514d6df949a8ad05630fd0debba2,4590950f
0a48ad109367404ea161be09e7d18d47,4590bee3
9edf29f0b7eb454698759695256baaee,4590a89e
60aad4e5bcbd41cfb07912fc1091c90d,45908ecf
91b59a53d3c6458881194a546fe5a369,459091e3
432ba8e54cd549be9e63a37616066646,459069ee