View WTF!
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
int LibBLABLABLA_HayPeticionApagado( void ) | |
{ | |
int Respuesta; | |
if( VGTPeticionApagado == true ) | |
{ | |
Respuesta = true; | |
} | |
else | |
{ |
View writeString
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
public void writeString(BinaryWriter w, string s) | |
{ | |
byte[] utf8Bytes = System.Text.Encoding.UTF8.GetBytes(s); | |
w.Write((UInt32) utf8Bytes.Length); | |
if(utf8Bytes.Length > 0) | |
w.Write(utf8Bytes); | |
} |
View python-daemon example
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
#!/usr/bin/python | |
# -*- encoding: utf-8 -*- | |
# | |
# author: javi santana | |
import os | |
import logging | |
from daemon.runner import DaemonRunner | |
import myapp |
View problem_django.py
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
### models.py | |
class UserKarma(models.Model): | |
DEFAULT_KARMA = 10.0 | |
user = models.OneToOneField(User, primary_key=True, related_name='karma') | |
value = models.FloatField(default=DEFAULT_KARMA) | |
def change(self, qty, reason='no reason'): | |
v = self.value + qty |
View fetch_test.py
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
#!/usr/bin/python | |
# coding: utf-8 | |
import urllib | |
import urllib2 | |
from multiprocessing import Pool | |
import Queue, threading | |
reg_nos = [16738, 17288, 18162, 18776, 18868, 19116, 19223, 19505]; | |
pdf_url = 'http://www.mapa.es/agricultura/pags/fitos/registro/sustancias/pdf/%s.pdf' |
View fetch_test_basic.py
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
#!/usr/bin/python | |
# coding: utf-8 | |
import urllib | |
import urllib2 | |
reg_nos = [16738, 17288, 18162, 18776, 18868, 19116, 19223, 19505]; | |
pdf_url = 'http://www.mapa.es/agricultura/pags/fitos/registro/sustancias/pdf/%s.pdf' | |
def fetch_url(url): |
View denuncia.py
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
#!/usr/bin/python | |
# -*- encoding: utf-8 -*- | |
# | |
# author: javi santana | |
import urllib2 | |
from BeautifulSoup import BeautifulStoneSoup, BeautifulSoup |
View gps.java
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
package hardware; | |
import java.util.ArrayList; | |
import android.app.Activity; | |
import android.content.Context; | |
import android.location.Location; | |
import android.location.LocationListener; | |
import android.location.LocationManager; | |
import android.location.LocationProvider; |
View wsgi_simple.py
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 application(environ, start_response): | |
status = '200 OK' | |
response_headers = [('Content-type', 'text/plain')] | |
start_response(status, response_headers) | |
return ['rambo'] |
View gol.html
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
<body bgcolor=0><canvas id=R width=64 height=64 style=width:2in;height:2in;background:#fff><script>K=R.getContext('2d');c=q2=(q=256)*q;t=[];t2=[];while(c--)t2[c]=t[c]=Math.random()<.1?1:0;ar=[[0,1],[-1,1],[-1,0],[-1,-1],[0,-1],[1,-1],[1,0],[1, 1]];setInterval("for(s=0,I=K.getImageData(0,0,q,q),c=q2;c--;tt=t2,t2=t,t=tt){for(s=0,a=8;a--;s+=(u=t[c+(x=ar[a])[0]+q*x[1]])==undefined?0:u);I.data[(p=4*c)+1]=q*(t2[c]=((t[c]&&(s>1&&s<4))||s==3)?1:0); I.data[p+3]=q;K.putImageData(I,0,0);}",q);</script></body> |
OlderNewer