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
## to_b methods dependant on ossy string class | |
class Dex | |
def initialize | |
## create data folder if it doesnt exist | |
@data_path=HOMEDIR+"/app/dex/data" | |
if File.exist?(@data_path)==false | |
Dir.mkdir(HOMEDIR+"/app/dex/data") | |
end | |
@bankfile=0 | |
if File.exist?(@data_path+"/"[email protected]_s+".db")==false |
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
## | |
## Python | |
## | |
def exp(n): | |
c=2 | |
e=2 | |
rv=False | |
while c<=n: | |
e=2 |
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
# | |
# Python | |
# | |
def prime(num): | |
rv=True;c=1;l=num-1 | |
while c<l: | |
c=c+1 | |
if int(str(num/c).split('.')[-1])==0: | |
rv=False;c=num | |
return rv |
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
## all 256 ascii characters | |
CHARS = [] ; c = 0 ; 256.times{ CHARS << c.chr.to_s ; c += 1 } | |
## every 8 bit binary number in order | |
BINARY = [] ; c = 0 ; 256.times { b = c.to_s(2) ; until b.to_s.length == 8 ; b = "0" + b.to_s ; end ; BINARY << b ; c += 1 } | |
## every hexicdeimal number in order upto 256 ordinals | |
HEX = [] ; c = 0 ; 256.times { h = c.to_s(16) ; if h.length == 1 ; h = "0" + h.to_s ; end ; HEX << h ; c += 1 } | |
## a list of all 8 bit byte codes for the ascii characters | |
BYTES = [] ; HEX.each do |h| ; BYTES << "\\x" + h ; end | |
def only_letters? s ;s.upcase.delete("ABCDEFGHIJKLMNOPQRSTUVWXYZ").empty?;end |
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
# webcrawler 1.1 created 2021.05.04 last updated 2021.05.05 j.thomas | |
# starts with a basepage and grabs links as it finds them in each page while noting instances of search term appearences in pages and links | |
require 'uri';require 'open-uri' | |
class Web_Crawler | |
def initialize | |
@case_sensitivity=false ## wether caps is ignored when looking for search term | |
@counter=0 ##number of loops executed\pages crawled | |
@invalid_counter=0 ## number of invalid pages checked | |
@already_searched=[] ## links to not crawl again | |
@search_term='' |
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
# webcrawler 1.0 created 2021.05.04 ## follow the term across every connected link blindly | |
require 'uri';require 'open-uri' | |
class Web_Crawler | |
def initialize | |
@case_sensitivity=false | |
end | |
def crawl(base_page,term) | |
@counter=0 ##number of loops executed\pages crawled | |
@search_term=term.to_s ## a string to search pages for |
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
## Ossy Core - Version 1.4.0.0 | |
## OCT21-2017 - Thomas J. Slone | |
CORE_VERSION = "1.4.0.3" ; CORE_DATE = "2017.11.22.10.40.21" | |
CORE_AUTHOR = "Thomas J. Slone" ; CORE_MANUFACTURER = "Tomtech" | |
CORE_NAME = "Ossy" ; CORE_EDITION = " Another edition. " | |
CORE_INIT_TIME = Time.now ; CORE_BOOT_LOG = [] | |
MAIN = self | |
ADMIN = "admin" ; PASSWORD = "" |
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
require "open-uri" | |
require "net/http" | |
require "openssl" | |
@page = "unloaded" | |
@html = "unloaded" | |
uri = URI.parse(ARGV[0] || 'https://en.wikipedia.org/wiki/Hydrogen') | |
http = Net::HTTP.new(uri.host, uri.port) | |
if uri.scheme == "https" # enable SSL/TLS | |
http.use_ssl = true | |
http.verify_mode = OpenSSL::SSL::VERIFY_PEER |
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
["a", "aalar", "aaron", "aaronite", "aaronites", "aasbai", "abacuc", "abaddon", "abadias", "abagtha", "abana", "abanah", "abandon", "abandoned", "abandonment", "abaran", "abarim", "abaron", "abase", "abased", "abasement", "abases", "abaseth", "abashed", "abasing", "abate", "abated", "abatement", "abateth", "abba", "abda", "abdeel", "abdemelech", "abdenago", "abdi", "abdias", "abdiel", "abdon", "abed", "abel", "abela", "abelcheramim", "abeldomum", "abelmahula", "abelmaim", "abelmehula", "abelmeula", "abenboen", "abes", "abesalom", "abesan", "abessalom", "abez", "abgatha", "abhor", "abhorred", "abhorrence", "abhorrest", "abhorreth", "abhorring", "abi", "abia", "abiah", "abialbon", "abiam", "abiasaph", "abiathar", "abib", "abida", "abidah", "abidan", "abide", "abides", "abidest", "abideth", "abiding", "abiel", "abiezer", "abiezrite", "abiezrites", "abigabaon", "abigail", "abigal", "abihaiel", "abihail", "abihu", "abihud", "abijah", "abijam", "abilene", "abilina", "ability", "abimael", "abimelech", "abinadab", "a |
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
## Name: Rios Methods | |
## Version: 1.0.6 | |
## Release: 2017-1-5 | |
## Manufacturer: Thomas Tech | |
def splice(str,b,e) | |
res = [] | |
loop do | |
p = str[/#{b}(.*?)#{e}/m, 1].to_s | |
if p.to_s.length == 0 |