Skip to content

Instantly share code, notes, and snippets.

self._convert(From('builtins', [('*', None)], None))
cecy@cecy-Inspiron-N4020:~/Downloads/Pyastra-0.0.4.1/doc/examples$ pyastra -S binary_clock.py
cecy@cecy-Inspiron-N4020:~/Downloads/Pyastra-0.0.4.1/doc/examples$ pyastra -plist
cecy@cecy-Inspiron-N4020:~$ sudo apt-get install gputils
cecy@cecy-Inspiron-N4020:~/Downloads/Pyastra-0.0.4.1/doc/examples$ gpasm binary_clock.asm
#include <stdio.h>
int main(int argc, char** args){
int i;
long a, b, c;
a = 1;
b = 0;
for(i = 0; i <= 50; i++){
c = a + b;
printf("%ld\n", c);
.file "fibo.c"
.section .rodata
.LC0:
.string "%ld\n"
.text
.globl main
.type main, @function
main:
.LFB0:
.cfi_startproc
cecy@cecy-Inspiron-N4020:~$ gcc -S fibo.c
#include <stdio.h> //librerioa
int main(int argc, char** args){
int i; // para el for
long a, b, c;
//a tiene el numero mas antiguo
//b tiene el numero inmediato anterior
//c es el valor que se imprime, el actual
a = 1; //declaro a a 1
b = 0; //declaro b a 0
function contGeom(p, filename)
p = p/10 #aporte para continua
q = 1 - p;
output = fopen(filename, "w");
prob = 1;
k = 1;
while (prob > 0.0)
prob = q**(k-1) * p;
k = k + 0.1 # aporte para continua
fprintf(output, "%d %f\n", k, prob);