Skip to content

Instantly share code, notes, and snippets.

View Toyz's full-sized avatar

Helba Toyz

View GitHub Profile
@Toyz
Toyz / Distance in python
Last active August 29, 2015 14:10
Distance in python
def formula(s, t):
return s * t
def main():
speed = raw_input("Enter Speed Traveled At: ")
time = raw_input("Enter Time Traveled for: ")
output = formula(int(speed), int(time))
print "Distance: " + str(output)
@Toyz
Toyz / I was bored...
Created February 24, 2015 05:40
Just a Simple Script Engine implation to use IronPython
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using BDScript.Overrides;
using IronPython.Hosting;
namespace BDScript
{
from BDCore import *
from Newtonsoft.Json import *
import clr
clr.AddReference("System.Drawing")
clr.AddReference("System.Windows.Forms")
from System.Drawing import Point, Color
from System.Windows.Forms import *
class HelloWorldForm(Form):
@Toyz
Toyz / file1.cs
Last active August 29, 2015 14:22
using System;
using System.Security.Cryptography;
///<summary>
/// Represents a pseudo-random number generator, a device that produces random data.
///</summary>
classCryptoRandom : RandomNumberGenerator
{
privatestaticRandomNumberGenerator r;
///<summary>
/// Creates an instance of the default implementation of a cryptographic random number generator that can be used to generate random data.
using System;
using System.Management;
using System.Windows.Forms;
namespace WMISample
{
public class CallWMIMethod
{
public static void Main()
{
@Toyz
Toyz / c.cs
Created August 15, 2015 18:12
using HelperLibrary;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using W10_Logon_BG_Changer___Command_Line.Tools;
using Color = System.Drawing.Color;
using Path = System.IO.Path;
using Rectangle = System.Drawing.Rectangle;
@Toyz
Toyz / c.cpp
Last active August 29, 2015 14:27
// list::sort
#include <iostream>
#include <list>
#include <string>
#include <cctype>
// comparison, not case sensitive.
bool compare_nocase (const std::string& first, const std::string& second)
{
unsigned int i=0;
<?php
namespace Controllers;
class StaticFileHandler {
private $basePath;
private $loadedFiles;
function __construct($basePath)
<?php
namespace Controllers\EventEngine;
class EventHandler
{
private static $EventPool = [];
public static function CreatePool($poolName){
if(array_key_exists($poolName, self::$EventPool))
<?php
class YoutubeEmbed extends JBBCode\CodeDefinition {
public function __construct()
{
parent::__construct();
$this->setTagName("youtubeEmbed");
}