Skip to content

Instantly share code, notes, and snippets.

View josuebrunel's full-sized avatar

Josue Kouka josuebrunel

View GitHub Profile
<?xml version="1.0" ?>
<table https="false" securityLevel="any" xmlns="http://query.yahooapis.com/v1/schema/table.xsd">
<meta>
<author>Josue Kouka</author>
<apiKeyURL>http://josuebrunel.org/api</apiKeyURL>
<documentationURL>http://josuebrunel.org/doc.html</documentationURL>
<description/>
<sampleQuery>SELECT * FROM mytable</sampleQuery>
</meta>
<bindings>
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
#!/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
##Import
#2.x
from test import TestClass
#3.x
from .test import TestClass

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,

"""
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

Hi

$ pip install requests
$ python
>>> import json
>>> import requests
raise error("bad character range")
sre_constants.error: bad character range
#!/usr/bin/env ruby
require 'json'
def hasherize(keys, value)
new_section = {}
if keys.empty?
return value
else
@josuebrunel
josuebrunel / jQueryPhantomScrape.js
Last active November 6, 2015 15:10 — forked from crazy4groovy/jQueryPhantomScrape
Scrape the web using PhantomJS and jQuery
//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: