Hi
$ pip install requests
$ python
>>> import json
>>> import requests
{"cookies": [], "address": "https://google.com"} |
//This is an example of how to scrape the web using PhantomJS and jQuery: | |
//source: http://snippets.aktagon.com/snippets/534-How-to-scrape-web-pages-with-PhantomJS-and-jQuery | |
//http://phantomjs.org/ | |
var page = new WebPage(), | |
url = 'http://localhost/a-search-form', | |
stepIndex = 0; | |
/** | |
* From PhantomJS documentation: |
#!/usr/bin/env ruby | |
require 'json' | |
def hasherize(keys, value) | |
new_section = {} | |
if keys.empty? | |
return value | |
else |
raise error("bad character range") | |
sre_constants.error: bad character range |
Hi
$ pip install requests
$ python
>>> import json
>>> import requests
""" | |
BaseOAuth is inspired from Darren Kempiners YahooAPI https://github.com/dkempiners/python-yahooapi/blob/master/yahooapi.py | |
""" | |
from __future__ import absolute_import | |
try: | |
input = raw_input | |
except NameError: | |
pass |
Title: How to import projects from another gitlab instance Slug: how-to-import-projects-from-another-gitlab-instance Date: 2015-05-27 Tags: shell, bash, git, gitlab Category: Linux Author: Josue Kouka Lang: en Summary: Import gitlab projects from another server
Hi,
##Import | |
#2.x | |
from test import TestClass | |
#3.x | |
from .test import TestClass |
#!/usr/bin/python | |
import os, glob, logging | |
from xml.etree import cElementTree as etree | |
import pdb | |
def get_content(f): | |
xml_data = etree.parse(f).getroot() | |
return xml_data |
from functools import wraps | |
def myretry(n=1): | |
def my_real_retry(func): | |
@wraps(func) | |
def wrapper(*args, **kwargs): | |
for i in xrange(n): | |
result = func(*args, **kwargs) | |
return result | |
return wrapper |