• Sort options

# Keyvan Nayyerikeyvan

View gist:3694449
 using System; using System.Globalization; namespace WeekNumberCalculator { class Program { static void Main(string[] args) { Console.Title = "Find the Week of the Year";
View gist:2396135
 public class RenamedClass extends Iterator { protected Iterator iterator; protected Predicate[] predicates; protected Tuple currentTuple; public RenamedClass(Iterator iter, Predicate... preds) { this.schema = iter.schema; this.iterator = iter; this.predicates = preds; this.currentTuple = null;
View gist:2067682
 The below code is an efficient function to find if an integer number is a power of 2 in C without using any libraries. It would be good to think why it's efficient. int IsPowerOfTwo(int x) { while (((x % 2) == 0) && x > 1) /* While x is even and > 1 */ x /= 2; return (x == 1); }
View Nerd Dinner Fake Item Removal Script
 DECLARE @CurrentDate datetime SET @CurrentDate = getutcdate() DECLARE @Days int SET @Days = 180 DELETE [NerdDinner].[dbo].[RSVP] WHERE [DinnerID] in (SELECT [DinnerID] FROM [NerdDinner].[dbo].[Dinners]
View Waegis Development Conversation on Best Calculation Method
 Hello, I ran a preliminary training on the data that I had collected in a private Alpha version of Waegis three years ago which consists of 26991 items including 3780 ham and 23211 spam items. Using *** spam rules with an initial and logical configuration based on my experience, I got good results with an overall accuracy of 92.75% including 88.63% for false-positives and 93.42% for false-negatives. I stored the data in a database with a single table that I've comitted to a new repository on Git named ***. It consists of several columns including the contents of the comment, trackback/pingback, or forum post, as well as a SpamScore column that assigns the overall spam score calculated for each item by Waegis. It also has *** columns named ***, ..., and *** that represent the scores assigned to each item from each rule. One of the rules doesn't play a role here since it's designed to track the trends of incoming data online which doesn't happen here. One other rule also had a low effect (surprisingly) beca