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
from selenium import webdriver | |
from selenium.common.exceptions import TimeoutException | |
import selenium.webdriver.support.wait | |
selenium.webdriver.support.wait.POLL_FREQUENCY = 0.05 | |
import re | |
import random | |
import collections | |
class AdwordsAutomater(object): |
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
Red/System [ | |
Title: "Mersenne Twister Random Function" | |
Author: "XieQ" | |
Tabs: 4 | |
Purpose: { | |
Generates a random number using the Mersenne Twister algorithm. | |
Reference http://code.google.com/p/c-standard-library/source/browse/src/internal/_rand.c | |
} | |
] |
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
#include <stdio.h> | |
/* Mersenne Twister magic numbers */ | |
#define _RAND_N 624 | |
#define _RAND_M 397 | |
#define _RAND_U 0x80000000L | |
#define _RAND_L 0x7fffffffL | |
/* Mersenne Twister state and seed storage */ | |
static int rand_state[_RAND_N]; |
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
1. C Benchmark | |
program: https://gist.github.com/qtxie/5835613 | |
- No optimizition | |
compiling: cl random.c | |
run in windows powershell: | |
PS > Measure-Command {Start-Process .\random.exe -Wait} |
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
Dim strCommand | |
Dim strFilename | |
Dim strOutput | |
Dim strLog | |
strFilename = App.ActiveDoc.PathName | |
strLog = strFilename & ".result" | |
strCommand = "cmd /c E:\red-043.exe {0} > {1} 2>&1" | |
strCommand = Replace(strCommand, "{0}", strFilename) | |
strCommand = Replace(strCommand, "{1}", strLog) |
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
Red/System [ | |
Title: "Red/System Mac OSX Window" | |
Author: "Qingtian Xie" | |
File: %rs-mac-window.reds | |
Type: 'library | |
Tabs: 4 | |
Rights: "Copyright (C) 2014 Qingtian Xie. All rights reserved." | |
Compiling: "rebview.exe -qs red.r -t Darwin rs-mac-window.reds" | |
Reference: { | |
https://github.com/CodaFi/C-Macs |
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
// clang -fobjc-arc -framework Foundation runtime-class.m | |
#import <Foundation/Foundation.h> | |
#import <objc/runtime.h> | |
@interface Person : NSObject | |
- (id)initWithFirstName: (NSString *)firstName lastName: (NSString *)lastName age: (NSUInteger)age; |
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
Red [ | |
Title: "Sparks demo" | |
Author: "Qingtian Xie" | |
File: %sparks.red | |
Tabs: 4 | |
Needs: View | |
] | |
system/view/auto-sync?: no |
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
Red [ | |
Title: "Calculator" | |
File: %calculator.r | |
Version: 0.0.1 | |
;Date: 18-Jun-2016 | |
Author: [ | |
REBOL version ["Jeff Kreis" "Allen Kamp" "Carl Sassenrath"] | |
Red port "Gregg Irwin" | |
] | |
Purpose: "Simple numeric calculator." |
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 is specific fix for a problem with the windows SDK headers when */ | |
/* using MSVC with an x86 compilation target. On x64 the SDK would enable */ | |
/* MSVC's _InterlockedSomething compiler intrinsics and use #define to make */ | |
/* sure those are used instead of InterlockedSomething library calls. On */ | |
/* x32 it doesn't even though MSVC does support many of those intrinsics. */ | |
/* Including this header fixes that. */ | |
#ifndef _MSVC_INTRINSICS_H | |
#define _MSVC_INTRINSICS_H |
OlderNewer