Skip to content

Instantly share code, notes, and snippets.

View gerardo's full-sized avatar
👁️

Gerardo Curiel gerardo

👁️
View GitHub Profile
version: "2.2"
services:
kubernetes:
image: bsycorp/kind:latest-1.14
privileged: true
kubectl:
image: bitnami/kubectl:1.14
depends_on: [kubernetes]
[2018-09-12 02:11:07,849] {base_task_runner.py:107} INFO - Job 1481{cli.py:464} ERROR - Section lineage Option backend does not exist in the config!
{cli.py:464} ERROR - Section atlas Option sasl_enabled does not exist in the config!
{cli.py:464} ERROR - Section atlas Option host does not exist in the config!
{cli.py:464} ERROR - Section atlas Option port does not exist in the config!
{cli.py:464} ERROR - Section atlas Option username does not exist in the config!
{cli.py:464} ERROR - Section atlas Option password does not exist in the config!
{cli.py:464} ERROR - Section hive Option default_hive_mapred_queue does not exist in the config!
{cli.py:464} ERROR - Section dask Option cluster_address does not exist in the config!
{cli.py:464} ERROR - Section dask Option tls_ca does not exist in the config!
{cli.py:464} ERROR - Section dask Option tls_cert does not exist in the config!
T := X ;
Y := T ;
X := Y ;
S = (format-line | (line date-line)) #"[\s\S]*"
format-line = #"##fileformat=VCFv[\s\S^(?:\r\n|\r|\n)]*(?:\r\n|\r|\n)"
date-line = #"##fileDate=[\s\S^(?:\r\n|\r|\n)]*(?:\r\n|\r|\n)"
line = #"[\s\S^(?:\r\n|\r|\n)]*(?:\r\n|\r|\n)"
@gerardo
gerardo / gist:5302466
Created April 3, 2013 15:53
fetch_resource method for xhtml2pdf
def fetch_resources(uri, rel):
"""
Callback to allow xhtml2pdf/reportlab to retrieve
Images,Stylesheets, etc.
`uri` is the href attribute from the html link element.
`rel` gives a relative path, but it's not used here.
"""
if uri.startswith(settings.MEDIA_URL):
path = os.path.join(settings.MEDIA_ROOT,
private void Action(object sender, RoutedEventArgs e)
{
int i;
string curDir=Directory.GetCurrentDirectory();
string fileName=curDir+@"\msft.csv";
List<string[]> parsedData = parseCSV(fileName);
int nCount = parsedData.Count;
double[] closingPricesArr = new double[nCount - 1];
for (i = 0; i < nCount - 1; i++)
closingPricesArr[i] = Convert.ToDouble(parsedData[i + 1][6]);
@gerardo
gerardo / field.html
Created October 15, 2012 15:22
Table-based formset rendering
{% load crispy_forms_field %}
{% if field.is_hidden %}
{{ field }}
{% else %}
{% crispy_field field %}
{% endif %}
def renewTorIdentity(passAuth):
try:
s = socket.socket()
s.connect(('localhost', 9051))
s.send('AUTHENTICATE "{0}"\r\n'.format(passAuth))
resp = s.recv(1024)
if resp.startswith('250'):
s.send("signal NEWNYM\r\n")
@gerardo
gerardo / devday-links.mkd
Created December 22, 2011 01:34
Links de la presentación "Vim Para Programadores"
@gerardo
gerardo / models.py
Created November 29, 2011 20:47
post_save hook and models
import sys, traceback
from django.db import models
import django_monitor
import xmlrpclib
class TVShow(models.Model):
active = models.BooleanField(default=False)
name = models.CharField(blank=False, max_length=20)
description = models.TextField(blank=False)
terms = models.CharField(blank=False, max_length=50)
@gerardo
gerardo / debug_mode.diff
Created September 15, 2011 02:13
Fix for django_compressor issue #120
--- a/compressor/templatetags/compress.py
+++ b/compressor/templatetags/compress.py
@@ -32,7 +32,9 @@ class CompressorNode(template.Node):
exception=ImproperlyConfigured)(*args, **kwargs)
def debug_mode(self, context):
- if settings.COMPRESS_DEBUG_TOGGLE:
+ if settings.DEBUG:
+ return True
+ elif settings.COMPRESS_DEBUG_TOGGLE: