This file contains hidden or 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/env python | |
#-*- coding: utf-8 -*- | |
from ctypes import Structure, windll, c_uint, sizeof, byref | |
from threading import Thread | |
import time, win32api, win32con | |
class LastInputInfo(Structure): | |
_fields_ = [ |
This file contains hidden or 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/env python | |
# -*- coding: utf-8 -*- | |
import unittest | |
def naive_fibonacci(n): | |
'''Simplest recursive implementation''' | |
if n == 0: | |
return 0 |
This file contains hidden or 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/env python | |
import time | |
import hmac | |
import hashlib | |
import base64 | |
import urllib | |
secret_key = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" |
This file contains hidden or 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
request = container.REQUEST | |
response = request.RESPONSE | |
my_file = context.my_content | |
response.setHeader('Pragma', 'no-cache') | |
response.setHeader('Cache-Control', 'max-age=-1,s-maxage=-1, no-cache') | |
response.setHeader('Content-Type', my_file.content_type) | |
return my_file.data |
This file contains hidden or 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 transaction | |
from AccessControl.SecurityManagement import newSecurityManager | |
from DateTime import DateTime | |
from Testing.makerequest import makerequest | |
app = makerequest(app) | |
newSecurityManager(None, app.acl_users.getUserById('admin')) | |
site = app.plone |
This file contains hidden or 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/env python | |
# -*- encoding: utf-8 -*- | |
import unittest | |
import requests | |
import json | |
class Distance(object): | |
def __init__(self): |
This file contains hidden or 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
/*************************************************** | |
Universidade Federal da Paraiba | |
Centro de Ciencias Exatas e da Natureza | |
Disciplina: Calculo Numerico | |
Thiago Curvelo dos Anjos - Matr.: 010211026 | |
**************************************************** | |
Sistemas Lineares: Metodo de Eliminacao de Gauss | |
***************************************************/ | |
#include <stdio.h> |
This file contains hidden or 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> | |
#define INFINITO 32766 | |
#define TRUE 1 | |
#define FALSE 0 | |
#define NN 150 | |
typedef unsigned char BOOL; | |
/* Dijkstra */ |
This file contains hidden or 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> | |
#define INFINITO 32766 | |
#define TRUE 1 | |
#define FALSE 0 | |
#define NN 150 | |
typedef unsigned char BOOL; | |
This file contains hidden or 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
document.getElementById('numbersonly').addEventListener( | |
'keypress', | |
function() { | |
var allowed_keys = { | |
48: true, // 0 | |
49: true, // 1 | |
50: true, // 2 | |
51: true, // 3 | |
52: true, // 4 | |
53: true, // 5 |
OlderNewer