This file contains 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
#aca van los coeficientes de la cuadratica | |
a = 2 | |
b = 0 | |
c = -3 | |
#aca van las cotas del intervalo | |
ax = -3 | |
bx = 3 | |
delta = 1 |
This file contains 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
#aca van los coeficientes de la cuadratica | |
a = 1 | |
b = 0 | |
c = -1 | |
#aca van las cotas del intervalo | |
ax = -3 | |
bx = 3 | |
#estes es el error de la raiz en el cual cortar |
This file contains 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
#include <stdio.h> | |
#include <complex> | |
#include <iostream> | |
int main() | |
{ | |
double a1,b1,c1; | |
printf("ingrese valor de a,b,c\n"); | |
scanf("%lf" "%lf" "%lf", &a1, &b1, &c1); |
This file contains 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
def slice(objects, prop): | |
""" | |
slice objects in sublists sharing a common propery | |
""" | |
if not objects: | |
return [] | |
def get_prop(obj, prop): | |
if not isinstance(objects[0], dict): | |
return obj.__dict__[prop] |
This file contains 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 sys | |
sys.path.append('../api2/include') | |
from helpers.database import DataBase | |
from config import config | |
class WarehousesFinder(object): | |
def __init__(self): |
This file contains 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 os | |
# By default assume it's local environment | |
env = os.environ.get("ENV", "LOCAL") | |
# PROD/DEV/LOCAL are values the environment variable ENV can have. | |
# Example for production server: ~$ export ENV=PROD | |
settings_files = { | |
"PROD": "production_settings", | |
"DEV": "development_settings", |
This file contains 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
from fabric.api import run, env | |
def staging(): | |
env.hosts = ['root@crawley-cloud.com'] | |
def prod(): | |
env.hosts = ['root@crawley-cloud.com'] |
This file contains 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
virtualenv env | |
source env/bin/activate | |
pip install django==1.4.10 #Replace this for the django version you want | |
pip install django-shopify | |
start_shopify_app testing |
This file contains 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
from django.views.generic import TemplateView | |
class MyView(TemplateView): | |
url = "myurl/view1" | |
template_name = "index/template.html" | |
def get(self, *args, **kwargs): | |
context = {} |
This file contains 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
<?php | |
/** | |
* Proxy Dispatcher using php call_user_func_array (http://us2.php.net/manual/en/function.call-user-func-array.php) | |
* */ | |
class Foo { | |
function bar1($arg, $arg2, $arg3, $arg4) { | |
return "arg: $arg, arg2: $arg2, arg3: $arg3, arg4: $arg4\n"; |