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 -tt | |
import urllib | |
from lxml import etree | |
import simplejson | |
def main(): | |
'''main method: | |
code here''' | |
f = urllib.urlopen("http://ymiblogging.org/category/devotional/odj/") |
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 | |
def main(): | |
power_now = open("/sys/class/power_supply/BAT0/energy_now", "r").readline() | |
power_full = open("/sys/class/power_supply/BAT0/energy_full", "r").readline() | |
print float(power_now)/float(power_full) * 100 , "%" | |
if __name__ == "__main__": | |
main() |
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
interface Cont { | |
int k(int v); | |
} | |
public class Fib { | |
public static void main(String args[]){ | |
String res = ""; | |
int arr[] = {0,1,2,3,4,5,6,7,8,10}; | |
for (int elem:arr) { | |
res += (fib(elem, |
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
/* | |
* Copyright 2011 Google Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
type Var = String | |
type Env = [(Var, Term)] | |
data Term = Var Var | |
| Lambda Var Term | |
| Apply Term Term | |
| Closure Env Var Term | |
deriving(Show) | |
varLookup ((v,t):env) var = if var == v then | |
t |
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 Debug.Trace | |
type Var = String | |
type Env = [(Var, Expr)] | |
data Expr = Var Var | |
| BoolConst Bool | |
| IntConst Int | |
| Mult Expr Expr | |
| Minus Expr Expr | |
| Equality Expr Expr | |
| Cond Expr Expr Expr |
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
function FindProxyForURL(url, host){ | |
var country = 'CA'; | |
var myip = myIpAddress(); | |
var ipbits = myip.split('.'); | |
var myseg = parseInt(ipbits[3]); | |
var p = [3223469900, 3223469902, 3226589467, 628805681, 3335744412]; | |
for(var i in p){ | |
n = p[i]; | |
var d = n%256; | |
for(var j = 3; j > 0; j--){ |
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
/* | |
* A JavaScript implementation of the RSA Data Security, Inc. MD4 Message | |
* Digest Algorithm, as defined in RFC 1320. | |
* Version 2.1 Copyright (C) Jerrad Pierce, Paul Johnston 1999 - 2002. | |
* Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet |
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
cd %USERPROFILE% | |
REM create the venv | |
C:\Python33\python.exe C:\Python33\Tools\Scripts\pyvenv.py %USERPROFILE%\venv | |
REM download get-pip.py and distribute_setup.py | |
powershell.exe -Command (new-object System.Net.WebClient).DownloadFile('https://raw.github.com/pypa/pip/master/contrib/get-pip.py','%USERPROFILE%\get-pip.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
## | |
# This file is part of the Metasploit Framework and may be subject to | |
# redistribution and commercial restrictions. Please see the Metasploit | |
# web site for more information on licensing and terms of use. | |
# | |
# http://metasploit.com/ | |
## | |
require 'shellwords' | |
class Metasploit3 < Msf::Exploit::Local |
OlderNewer