id stringlengths 64 64 | content stringlengths 500 100k | language stringclasses 29
values | path stringlengths 4 333 | repo stringlengths 5 116 | license stringclasses 15
values | size int64 500 100k | lines int64 26 8.06k | source stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|
d0b064d956021d5cbdfd9235c402d1a2af863dd72f6737bd72cbb2b7155cc32a | #!/usr/bin/env python
# coding: utf-8
import os,sys
import ctypes
import numpy as np
from .hmatrix import _C_HMatrix, HMatrix
class _C_MultiHMatrix(ctypes.Structure):
"""Holder for the raw data from the C++ code."""
pass
class AbstractMultiHMatrix:
"""Common code for the two actual MultiHMatrix classes... | Python | interface/htool/multihmatrix.py | PierreMarchand20/htool | mit | 10,354 | 268 | codeparrot/github-code |
c5814c17bb038f966ee1192bc653e0532214e88192c4b7b8b1a3b92079a1369c | public class Grid {
public Tile array[][] = new Tile[10][8];
public Grid() {
//
for(int y = 0; y < getHeight(); y++) {
for(int x = 0; x < getWidth(); x++) {
array[x][y] = new Tile();
}
}
}
public int getWidth() { return 9; }
public int getHeight() { return 7; }
p... | Java | Grid.java | Caaz/danmaku-class-project | mit | 1,391 | 51 | codeparrot/github-code |
7eb0f2994c818ca5bbad640822070acd83dc422a380eceda028e843f9bae7e5c | import {normalize, resolve} from "path";
import {existsSync, readFileSync} from "fs";
import {sys, ScriptSnapshot, resolveModuleName, getDefaultLibFilePath} from "typescript";
export function createServiceHost(options, filenames, cwd) {
const normalizePath = (path) => resolve(normalize(path));
const moduleResoluti... | JavaScript | src/servicehost.js | tsne/rollup-plugin-tsc | mit | 2,558 | 106 | codeparrot/github-code |
bdfbbabde05b4f17a640448e39aadb13e87ef9438f90eb9c224204aec3201fa7 | package main
import (
"fmt"
"log"
)
type ListCommand struct {
All bool `short:"a" long:"available" description:"also prints all available version for installation"`
}
type InitCommand struct{}
type InstallCommand struct {
Use bool `short:"u" long:"use" description:"force use of this new version after installati... | GO | commands.go | biorob/webots-manager | mit | 5,064 | 239 | codeparrot/github-code |
5495d1485c3cebb7d911554b4a366457160933b3fb126aad102cb34fdc9f00aa |
<!DOCTYPE html>
<html xmlns:msxsl="urn:schemas-microsoft-com:xslt">
<head>
<meta content="en-us" http-equiv="Content-Language" />
<meta content="text/html; charset=utf-16" http-equiv="Content-Type" />
<title _locid="PortabilityAnalysis0">.NET Portability Report</title>
<style>
... | HTML | Reports/wo/woodstox.4.1.4/iso-relax-net.html | kuhlenh/port-to-core | mit | 12,502 | 303 | codeparrot/github-code |
798bba01f26cfdb66552f1743daee46779ab95aa1406e6c17d3eee3bc11ff21c | <?php
/*
Unsafe sample
input : get the field userData from the variable $_GET via an object
Uses a special_chars_filter via filter_var function
construction : use of sprintf via a %s with simple quote
*/
/*Copyright 2015 Bertrand STIVALET
Permission is hereby granted, without written agreement or royalty fee, to
... | PHP | Injection/CWE_78/unsafe/CWE_78__object-classicGet__func_FILTER-CLEANING-special_chars_filter__cat-sprintf_%s_simple_quote.php | stivalet/PHP-Vulnerability-test-suite | mit | 1,514 | 69 | codeparrot/github-code |
0c37723650c922dd91593cce1cbbb1bc96cac67057bb5675c562157d75e5c90b | import primes as py
def lcm(a, b):
return a * b / gcd(a, b)
def gcd(a, b):
while b != 0:
(a, b) = (b, a % b)
return a
# Returns two integers x, y such that gcd(a, b) = ax + by
def egcd(a, b):
if a == 0:
return (0, 1)
else:
y, x = egcd(b % a, a)
return (x - (b ... | Python | numty/congruences.py | ioguntol/NumTy | mit | 3,551 | 104 | codeparrot/github-code |
3c468c89b6b54a4b87b102c52d41800f9fcf8bcd40610c2c2c0e2e090e56e1a6 | using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Data.SqlTypes;
using Microsoft.SqlServer.Server;
using PowerLib.System;
using PowerLib.System.Collections;
using PowerLib.System.IO;
using PowerLib.System.IO.Streamed.Typed;
using PowerLib.System.Numerics;
using PowerLib.S... | C# | PowerLib.System.Data.SqlTypes/Collections/SqlGradAngleCollection.cs | vaseug/PowerLib | mit | 7,126 | 242 | codeparrot/github-code |
9b73ae60a420157349927fe8cc81a31034b89ff33eb22a3abfba9704e4ad7564 | define(['js/util'], function (util) {
"use strict";
var sf2 = {};
sf2.createFromArrayBuffer = function(ab) {
var that = {
riffHeader: null,
sfbk: {}
};
var ar = util.ArrayReader(ab);
var sfGenerator = [
"startAddrsOf... | JavaScript | js/sf2.js | ruly-rudel/tipsound | mit | 16,386 | 457 | codeparrot/github-code |
98ec9480482b8018aea8b7b9e0263e85f3635341e3584d4c11731a6cb6617296 | =begin
<recording pid=""
cookie=""
stamp=""
agent="">
<record id=""
stamp=""
status=""
method=""
url=""
request-time="">
<header name="" value=""/>
<body><![CDATA[HTML OR WHATEVER HERE]]></body>
... | Ruby | lib/deja-vu/model/recording.rb | kuccello/deja-vu | mit | 982 | 56 | codeparrot/github-code |
2640d0a0eb96234c624fc41996988b388cb22a66ad093c6d6a48adf8da93c8ae | import static org.junit.Assert.*;
import java.util.List;
import org.junit.Test;
public class IdParserTest {
@Test
public void testListParser() {
String testMedList = "{1;3;9}";
List<Integer> ids = IdParser.parse(testMedList);
assertEquals(3, ids.size());
assertEquals(new Integer(1), ids.get... | Java | PatientRecordsKata/IdParserTest.java | UMM-CSci/Coding-dojos | mit | 807 | 35 | codeparrot/github-code |
0cf898901f99e0e7ccf119ce5155c890224daee3606f911e41e1cd6346993777 | package org.softlang.service.company;
import java.io.Serializable;
import java.util.LinkedList;
import java.util.List;
/**
* A department has a name, a manager, employees, and subdepartments.
*/
public class Department implements Serializable {
private static final long serialVersionUID = -2008895922177165250L;
... | Java | 101repo/contributions/javawsServer/OneOhOneCompanies/src/org/softlang/service/company/Department.java | amritbhat786/DocIT | mit | 1,240 | 61 | codeparrot/github-code |
ddd690c36c60b8a87400c37e9e19a0a4c69214bbe1831c4c29947d727d0ea4ac | #include "PerformanceSpriteTest.h"
enum {
kMaxNodes = 50000,
kNodesIncrease = 250,
TEST_COUNT = 7,
};
enum {
kTagInfoLayer = 1,
kTagMainLayer = 2,
kTagMenuLayer = (kMaxNodes + 1000),
};
static int s_nSpriteCurCase = 0;
///////////////////////////////////////////////////////... | C++ | Sample/ClientSource/samples/Cpp/TestCpp/Classes/PerformanceTest/PerformanceSpriteTest.cpp | wenhulove333/ScutServer | mit | 17,742 | 617 | codeparrot/github-code |
65d5273b8fe35570d5e1d5792a4f6006e9d7f0d7cfca9bdaf39821c50641035d | module PrintSquare
class CommandRunner
class << self
def run(args)
validate_args(args)
print_square(args[0].to_i)
end
def print_square(number)
size = Math.sqrt(number).to_i
n = number
x = PrintSquare::Vector.new size.even? ? 1 : -1, size, size.even? ? 1 :... | Ruby | lib/print_square/command_runner.rb | AktionLab/print_square | mit | 2,057 | 84 | codeparrot/github-code |
d1ef37b0e15d42d39a6b0b6da78d360e904623944b23dfa30ad22a329fdc37eb | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>qarith: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css"... | HTML | clean/Linux-x86_64-4.03.0-2.0.5/released/8.5.0/qarith/8.9.0.html | coq-bench/coq-bench.github.io | mit | 7,054 | 177 | codeparrot/github-code |
38e4e5f805491493a4393a23b159afca1d1253a4cece78e6f73e2a6bd7941b66 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>mathcomp-finmap: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap... | HTML | clean/Linux-x86_64-4.10.2-2.0.6/extra-dev/dev/mathcomp-finmap/1.3.1.html | coq-bench/coq-bench.github.io | mit | 7,486 | 169 | codeparrot/github-code |
eb6946d106837894cf45d78800f7ace937be9f3826677c75505d96a694dca396 | /**
* @file
* @author Mamadou Babaei <info@babaei.net>
* @version 0.1.0
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2016 - 2021 Mamadou Babaei
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Softwa... | C++ | CoreLib/Compression.hpp | NuLL3rr0r/blog-subscription-service | mit | 2,563 | 79 | codeparrot/github-code |
6e5b13af121915507583b1eb7ca84fe5adf736c762ba05ec7bfc08bc890fb2bc | import asyncio
import email.utils
import json
import sys
from cgi import parse_header
from collections import namedtuple
from http.cookies import SimpleCookie
from urllib.parse import parse_qs, unquote, urlunparse
from httptools import parse_url
from sanic.exceptions import InvalidUsage
from sanic.log import error_l... | Python | sanic/request.py | lixxu/sanic | mit | 11,420 | 396 | codeparrot/github-code |
fc1576276c2f1b8970524a0bd8e02e77356ad51a54eb45273acc6405aa7c58a6 | require 'stringio'
require 'highline/import'
module RailsZen
class ChosenAttr
attr_accessor :name, :type, :validator, :type_based_validators, :scope_attr
def initialize(name, type)
@name = name
@type = type
@scope_attr = []
end
def get_user_inputs
get_presence_req
get_t... | Ruby | lib/rails_zen/chosen_attr.rb | vysakh0/rails_zen | mit | 2,712 | 90 | codeparrot/github-code |
32dd588b4d394233f2e56016fe43501fb6b69ff27aa259f9a5b17be38d8f0816 | from .tile import Split, Stack, TileStack
class Tile(Split):
class left(Stack):
weight = 3
priority = 0
limit = 1
class right(TileStack):
pass
class Max(Split):
class main(Stack):
tile = False
class InstantMsg(Split):
class left(TileStack): # or maybe no... | Python | tilenol/layout/examples.py | tailhook/tilenol | mit | 657 | 44 | codeparrot/github-code |
b1710fb1e5617fbeb2c8d541f9e2a3b5c8f6d7a0206e9bd2771fbd1b97cd839c | /*
* ***** BEGIN LICENSE BLOCK *****
* Zimbra Collaboration Suite Web Client
* Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Zimbra, Inc.
*
* The contents of this file are subject to the Zimbra Public License
* Version 1.3 ("License"); you may not use this file except in
* compliance with the License. You m... | JavaScript | ZimbraWebClient/WebRoot/js/zimbraMail/share/view/dialog/ZmFolderPropsDialog.js | nico01f/z-pec | mit | 14,081 | 445 | codeparrot/github-code |
efdc2dd7e59527eb2f2e8d1630099fbabbf380bbad8c9f7979f89d58402c8f3a | /*
* ***** BEGIN LICENSE BLOCK *****
* Zimbra Collaboration Suite Server
* Copyright (C) 2006, 2007, 2008, 2009, 2010 Zimbra, Inc.
*
* The contents of this file are subject to the Zimbra Public License
* Version 1.3 ("License"); you may not use this file except in
* compliance with the License. You may obtain a... | Java | ZimbraServer/src/java/com/zimbra/cs/util/SpamExtract.java | nico01f/z-pec | mit | 21,891 | 530 | codeparrot/github-code |
75f2c1cc1c4f8054c867e6f23d8e48f290dee5633154ce37b8accd881c0bcd6d | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace BookReviews.UI.Saga
{
public class OrderDetailsRequestSaga :
SagaStateMachine<OrderDetailsRequestSaga>, ISaga
{
static OrderDetailsRequestSaga()
{
Define(Saga);
}
private static vo... | C# | BookReviews.UI/Saga/OrderDetailsRequestSaga.cs | bob2000/BookReviews | mit | 3,005 | 91 | codeparrot/github-code |
bd235cd70bfd44d4a767d880ad56e4313d2b4ec2d535ed6aa1972f34574b784a | var coords;
var directionsDisplay;
var map;
var travelMode;
var travelModeElement = $('#mode_travel');
// Order of operations for the trip planner (each function will have detailed notes):
// 1) Calculate a user's route, with directions.
// 2) Run a query using the route's max and min bounds to narrow potential result... | JavaScript | app/static/js/trip_planner.js | codeforsanjose/CycleSafe | mit | 9,596 | 229 | codeparrot/github-code |
105c0b6311c7f8767699135b7e2deaeec515dc434c3292df70d8a5a3dbf9f539 | import { InvalidArgumentError } from '../errors/InvalidArgumentError';
import { NotImplementedError } from '../errors/NotImplementedError';
import mustache from 'mustache';
import '../utils/Function';
// The base class for a control
export class Control {
// The constructor of a control
// id: The id of the control
... | JavaScript | lib/Control/index.js | kmati/affront | mit | 3,736 | 104 | codeparrot/github-code |
87527bffba5e4b562b29a8177a050eccd96cc2b0b63640fd7d32f077b35b26c5 | //
// MultibandBank.c
// FxDSP
//
// Created by Hamilton Kibbe on 11/24/13.
// Copyright (c) 2013 Hamilton Kibbe. All rights reserved.
//
#include "MultibandBank.h"
#include "LinkwitzRileyFilter.h"
#include "RBJFilter.h"
#include "FilterTypes.h"
#include <stdlib.h>
// Sqrt(2)/2
#define FILT_Q (0.70... | C | FxDSP/src/MultibandBank.c | hamiltonkibbe/FxDSP | mit | 8,273 | 274 | codeparrot/github-code |
94a4849b5c56f72e7918482681204d2f387b61b420cb21eaeba294c218783dce | /*
* Copyright (c) 2015 Cryptonomex, Inc., and contributors.
*
* The MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the... | C++ | libraries/chain/market_evaluator.cpp | bitsuperlab/cpp-play2 | mit | 11,139 | 282 | codeparrot/github-code |
3dc34f7a426d1bb96e7e5839da9ad5bad23e5624d12e05e9078d0382fda15b1c | require "fog"
module RedmineObjectStorage
module AttachmentPatch
def self.included(base) # :nodoc:
base.extend(ClassMethods)
base.send(:include, InstanceMethods)
base.class_eval do
unloadable
cattr_accessor :context_obj, :objectstorage_bucket_instance, :__objectst... | Ruby | lib/redmine_objectstorage/attachment_patch.rb | nttcom/redmine_objectstorage | mit | 3,467 | 107 | codeparrot/github-code |
f852c9c726b4724fb5c3e5d180d6444f9401897cc83caac1ebdf864e872d2226 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Reactive.Linq;
using System.Threading.Tasks;
using Chromamboo.Contracts;
using Newtonsoft.Json.Linq;
namespace Chromamboo.Providers.Notification
{
public class AtlassianCiSuiteBuildStatusNotificationProvider : INotificationProvider<... | C# | src/Chromamboo/Providers/Notification/AtlassianCiSuiteBuildStatusNotificationProvider.cs | duvaneljulien/chromamboo | mit | 4,567 | 106 | codeparrot/github-code |
1596da4289ef80e88f6e7768903cc3fdd56157471e1b02ef9072cba8e0f7bf9c | import { Injectable } from '@angular/core';
import { SyncResult } from 'app/model/syncResult'
import { Log } from 'app/model/log'
import { LogItem } from 'app/model/logItem'
@Injectable()
export class SyncResultService
{
syncResultService : any;
constructor()
{
this.syncResultService = (window as ... | TypeScript | parrot-manager-frontend/src/app/service/syncResult.service.ts | limpygnome/parrot-manager | mit | 2,422 | 96 | codeparrot/github-code |
3b788d09df933fd2d48b9efc24f8826cdf5b60ae0e659c900e29be90839e9dd8 | /**
* Most of this code is adapated from https://github.com/qimingweng/react-modal-dialog
*/
import React from 'react';
import ReactDOM from 'react-dom';
import EventStack from './EventStack';
import PropTypes from 'prop-types';
const ESCAPE = 27;
/**
* Get the keycode from an event
* @param {Event} event The bro... | JavaScript | src/components/Modal/Components.js | LIQIDTechnology/liqid-react-components | mit | 8,192 | 251 | codeparrot/github-code |
22856dc2e4e6f116b25ec1e56bc00128a41a66b450b27fcbf8558e080919e218 | #include "pch.h"
#include "ActalogicApp.h"
TCHAR ActalogicApp::m_szWindowClass[] = _T("Actalogic");
TCHAR ActalogicApp::m_szTitle[] = _T("Actalogic");
ActalogicApp::ActalogicApp():
m_hWnd(NULL),
m_hInstance(NULL),
m_d2d1Manager(),
m_entityFPS(),
m_entityDebugInfoLayer(),
m_entitySceneContainer(this),
m_inputHelper()
... | C++ | Actalogic/Actalogic/ActalogicApp.cpp | iwa-yuki/Actalogic | mit | 6,115 | 278 | codeparrot/github-code |
36531451d30debf66e3c374ca48b70f6a3f68b80d5ad109beadff2c29a1723b6 | import * as React from 'react';
import * as ReactDom from 'react-dom';
import * as strings from 'BarChartDemoWebPartStrings';
import { Version } from '@microsoft/sp-core-library';
import {
BaseClientSideWebPart,
IPropertyPaneConfiguration,
} from '@microsoft/sp-webpart-base';
import { PropertyPaneWebPartInformation... | TypeScript | samples/react-chartcontrol/src/webparts/barChartDemo/BarChartDemoWebPart.ts | rgarita/sp-dev-fx-webparts | mit | 1,881 | 64 | codeparrot/github-code |
26df20a6c38192c3b42c88ce04496c326f79bab49d9ed2b6d04ca660b0266c35 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Login Page - Photon Admin Panel Theme</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
<link rel="shortcut icon" href="ht... | HTML | lib/assets/css/css_compiled/@{photonImagePath}plugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/raphael.2.1.0.min.js.html | user-tony/photon-rails | mit | 16,656 | 197 | codeparrot/github-code |
ac82766354b54472e68ca2dba79f20bc0d8cf4e34608957ea3e14e9800f83b2e | var GoogleStrategy = require('passport-google-oauth').OAuth2Strategy;
var util = require('util');
var session = require('express-session');
var passport = require('passport');
module.exports = (app, url, appEnv, User) => {
app.use(session({
secret: process.env.SESSION_SECRET,
name: 'freelancalot',... | JavaScript | auth.js | lorentzlasson/node-angular-starter | mit | 2,087 | 70 | codeparrot/github-code |
197f4f8966c3e3a3255f31454b4a944a9bf50c920b2afff313fee244bfae269c | const path = require('path');
const express = require('express');
const bodyParser = require('body-parser');
const auth = require('http-auth');
// const basicAuth = require('basic-auth-connect');
const apiHandler = require('./api-handler')
/**
* Installs routes that serve production-bundled client-side assets.
* It i... | JavaScript | server/node-app-server.js | codycoggins/angular2-starter-cody | mit | 1,845 | 58 | codeparrot/github-code |
a9d8a3dc452edda2bafab0e1ff2e4b36027123f1faf9c1eba7ddaf001be1f98d | from djblets.cache.backend import cache_memoize
class BugTracker(object):
"""An interface to a bug tracker.
BugTracker subclasses are used to enable interaction with different
bug trackers.
"""
def get_bug_info(self, repository, bug_id):
"""Get the information for the specified bug.
... | Python | reviewboard/hostingsvcs/bugtracker.py | reviewboard/reviewboard | mit | 1,633 | 42 | codeparrot/github-code |
20edff6206f78b02df81776d5c7b32ecc570d8fc3182f0dae63e8460482a16a9 | using System;
using System.Linq;
namespace TypeScriptDefinitionsGenerator.Common.Extensions
{
public static class StringExtensions
{
public static string ToCamelCase(this string value)
{
return value.Substring(0, 1).ToLower() + value.Substring(1);
}
public static s... | C# | src/TypeScriptDefinitionsGenerator.Common/Extensions/StringExtensions.cs | slovely/TypeScriptDefinitionsGenerator | mit | 1,659 | 48 | codeparrot/github-code |
55473be14ed26b36ac494ea7500ab93f063a0d1c71950bebfd07f4131c4de9a1 | package net.zer0bandwidth.android.lib.content.querybuilder;
import android.content.ContentResolver;
import android.support.test.runner.AndroidJUnit4;
import android.test.ProviderTestCase2;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import static junit.framework.Assert.assertNull... | Java | libZeroAndroid/src/androidTest/java/net/zer0bandwidth/android/lib/content/querybuilder/DeletionBuilderTest.java | zerobandwidth-net/android | mit | 1,665 | 61 | codeparrot/github-code |
63894ca9cfc7241ebbc8ee8a8d59444da2d9839661834f4a913203ee2ad6b0f4 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 4.2.0">
<link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.... | HTML | archives/2019/04/index.html | yue-litam/yue-litam.github.io | mit | 10,889 | 401 | codeparrot/github-code |
0586c7edfca70794413c9f6592b650d984feffad2c6959f86de5dd70778c6306 | import sys
from stack import Stack
def parse_expression_into_parts(expression):
"""
Parse expression into list of parts
:rtype : list
:param expression: str # i.e. "2 * 3 + ( 2 - 3 )"
"""
raise NotImplementedError("complete me!")
def evaluate_expression(a, b, op):
raise NotImplementedErr... | Python | postfix.py | tylerprete/evaluate-math | mit | 792 | 31 | codeparrot/github-code |
4af0f751f0ff8a5b9dc397ca208ac0cfc13bef007fad96a1ad58f3c9e6715e88 | // Preprocessor Directives
#define STB_IMAGE_IMPLEMENTATION
// Local Headers
#include "glitter.hpp"
#include "shader.h"
#include "camera.h"
// Console Color
#include "consoleColor.hpp"
// System Headers
#include <glad/glad.h>
#include <GLFW/glfw3.h>
#include <glm/gtc/matrix_transform.hpp>
// Standard Headers
//#inc... | C++ | other/renderDoc reverse engineering/main.cpp | THISISAGOODNAME/learnopengl-glitter | mit | 88,752 | 3,272 | codeparrot/github-code |
6572b65da77493d8661b38498ae829b1a8f2207c394f706c2821affa065ab6b9 | package ca.uwo.eng.sel.cepsim.placement
import java.util.{List => JavaList, Set => JavaSet}
import ca.uwo.eng.sel.cepsim.query._
import scala.collection.JavaConversions._
import scala.collection.mutable
/** Companion Placement object */
object Placement {
// ----------------------- for java usage
def apply(vert... | Scala | cepsim-core/src/main/scala/ca/uwo/eng/sel/cepsim/placement/Placement.scala | virsox/cepsim | mit | 6,424 | 187 | codeparrot/github-code |
93de25a153b10d516e4628ffd655d7e8f1dac8e2431acb6dc851e358dc385e51 | "use strict";
const util = require("util");
const colors = require("colors");
const consoleLog = console.log;
const consoleWarn = console.warn;
const consoleError = console.error;
const EError = require("../eerror");
function padd(str, length = process.stdout.columns) {
return str + " ".repeat(length - str.length... | JavaScript | src/terminal-utils/formatter.js | archfz/drup | mit | 5,003 | 202 | codeparrot/github-code |
849e71faae9666cb2e822d4ca6d76ea736db5ecdb26be363fd44448c2018db29 | var express = require('express');
var bodyParser = require('body-parser');
var path = require('path');
var url = require('url');
var log4js = require('log4js');
var stashBoxConfig = require('./lib/config');
var pkg = require('./package.json');
var proxy = require('express-http-proxy');
var fileDriver = require('./d... | JavaScript | app.js | SynchroLabs/StashBox | mit | 7,225 | 264 | codeparrot/github-code |
cb262262eac4ec4ea782ac5ec4c9a6cc40628d2eda2138ad58f7939bdf2c7216 | /**
*
*/
package me.dayler.ai.ami.conn;
import javax.net.SocketFactory;
import javax.net.ssl.SSLSocketFactory;
import java.io.*;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.util.NoSuchElementException;
import java.util.Scanner;
import java.util.regex.Pattern;
... | Java | src/me/dayler/ai/ami/conn/SocketConnectionFacadeImpl.java | dayler/AsteriskInterface | mit | 4,154 | 136 | codeparrot/github-code |
9af14e18ee5fe44d817a4c508625479bd267accc46986c634cf8b641345c81ca | // test/main.js
var Parser = require('../src/markdown-parser');
var parser = new Parser();
var parserOptions = new Parser();
var assert = require("assert");
describe('tests', function() {
describe('parsing', function() {
it('bold', function(done) {
parser.parse("**b** __b__", function(err, result) { ... | JavaScript | test/main.js | darul75/markdown-parser | mit | 3,107 | 82 | codeparrot/github-code |
6447aa7ae26ac6b88268089d4483384b0ebe91c4fb2f71fe41eb91e46e180292 | #include<stdio.h>
#include<unistd.h>
#include<stdlib.h>
#include<string.h>
int main(){
int pid1,pid2,pid3,pid4;
int p1[2],p2[2];
char bufr[30],rev[30];
int countL=0,countU=0,i=-1,j=0,countV=0,len;
pipe(p1);
pipe(p2);
if(pid1=fork()==0){
if(pid2=fork()==0){
read(p2[0],bufr,sizeof(bu... | C | csb/extras/a-b-c-d-pipe.c | CSE-SOE-CUSAT/NOSLab | mit | 1,716 | 62 | codeparrot/github-code |
193a0fc3dd7a35075833849b09ac6859d45eca1140b25353af1fea02b7b94955 | #region License
// Copyright (c) 2009 Sander van Rossen
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, m... | C# | Tools/HyperGraph/NodeConnector.cs | xlgames-inc/XLE | mit | 3,297 | 98 | codeparrot/github-code |
6e97fae5052d1c125a1bc34a79dacc9443569da693fb1cc7ef7b0f049094aade | function browserSupportsHtml5HistoryApi() {
return !! (history && history.replaceState && history.pushState);
}
$(document).ready(function() {
//_gaq.push(['_trackEvent', 'Citizen-Format-Smartanswer', 'Load']);
if(browserSupportsHtml5HistoryApi()) {
var formSelector = ".current form";
initializeHistory(... | JavaScript | app/assets/javascripts/smart-answers.js | ministryofjustice/smart-answers | mit | 4,962 | 168 | codeparrot/github-code |
dd7c0ee2d6be6eb3abda4d003e9a61ee5ae2adc4d1ad3839bedde2bcbacf483d | // Copyright (c) 2018 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_SPAN_H
#define BITCOIN_SPAN_H
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <cstdint>
#incl... | C | src/span.h | Bitcoin-ABC/bitcoin-abc | mit | 11,773 | 317 | codeparrot/github-code |
27dd78678981bf7519902ed6d19e0e8d8e32b8cca747bba4094d387d792a5687 | <!DOCTYPE html>
<html lang="en-gb" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>List component - UIkit documentation</title>
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon">
<link... | HTML | docs/list.html | larsito030/elternfreund | mit | 17,974 | 336 | codeparrot/github-code |
16311c954cb1d1bf59b6f17502248e2015e32160c86a83f2115b4f1890054886 |
// get params
function getParams()
{
var params = {
initial_amount: parseInt($('#initial_amount').val(), 10) || 0,
interest_rate_per_annum: parseFloat($('#interest_rate_per_annum').val()) / 100 || 0,
monthly_amount: parseFloat($('#monthly_amount').val()),
num_months: parseInt($('#num_months').val(), 10)
};
... | JavaScript | js/main.js | timotheeg/html_loan_calculator | mit | 2,663 | 101 | codeparrot/github-code |
ec320164389cc8d500209f2a0cbe7c04cc86f66f9ff58a820429a8114357b4f7 | define([
"dojo/_base/declare",
"dojo/_base/fx",
"dojo/_base/lang",
"dojo/dom-style",
"dojo/mouse",
"dojo/on",
"dijit/_WidgetBase",
"dijit/_TemplatedMixin",
"dojo/text!./templates/TGPrdItem.html",
"dijit/_OnDijitClickMixin",
"dijit/_WidgetsInTemplateMixin",
"dijit/form/Button"
], function(declar... | JavaScript | contactsList/widgets/TGPrdWidget/TGPrdWidget.js | MingXingTeam/dojo-mobile-test | mit | 2,245 | 73 | codeparrot/github-code |
7c091963c4459ca9a2a13e2eced1b9a0c96b0cbcbc2378f65421e8697427dc43 | const { ipcRenderer, remote } = require('electron');
const mainProcess = remote.require('./main');
const currentWindow = remote.getCurrentWindow();
const $name = $('.name-input');
const $servings = $('.servings-input');
const $time = $('.time-input');
const $ingredients = $('.ingredients-input');
const $directions = $... | JavaScript | app/renderer.js | mjvalade/electron-recipes | mit | 1,232 | 44 | codeparrot/github-code |
6d0e576a8c9cfabacb5c249069091345ad3e66719f500ae2d155463373465441 | /*
* Store drawing on server
*/
function saveDrawing() {
var drawing = $('#imagePaint').wPaint('image');
var imageid = $('#imageTarget').data('imageid');
var creatormail = $('input[name=creatorMail]').val();
//Add spinning wheel
var spin = $(document.createElement('div'));
spin.addClass('spin');
$(... | JavaScript | static/js/main.js | lukpueh/Mach-die-strasse-bunt | mit | 6,068 | 179 | codeparrot/github-code |
55904ae9fcbfb60e308dde8cde3cd1b9a16a198d4beb80051d9d0c69825277d5 | 'use strict'
//Globals will be the stage which is the parrent of all graphics, canvas object for resizing and the renderer which is pixi.js framebuffer.
var stage = new PIXI.Container();
var canvas = document.getElementById("game");;
var renderer = PIXI.autoDetectRenderer(1024, 570, {view:document.getElementById("game... | JavaScript | bin/init.js | Sanguinary/Poolhopper | mit | 4,385 | 135 | codeparrot/github-code |
d64fdd6ac8b1b0d0456534b7bfda60ad007ccf0f118bf6e19c33edafd2b436bd | import React, {Component} from 'react';
import {connect} from 'react-redux';
class MapFull extends Component {
constructor() {
super();
this.state = {
htmlContent: null
};
}
componentDidMount() {
this.getMapHtml();
}
componentDidUpdate(prevProps, prevState) {
if (!this.props.map... | JavaScript | websrc/cacti-user/src/components/MapFull.js | howardjones/network-weathermap | mit | 1,270 | 59 | codeparrot/github-code |
f62741e3f6ba7f5df7abfb2928e54a633ebe5ea0049677f99d1bc507eed56862 | #-*- coding: utf-8 -*-
from flask import current_app, flash, url_for, request
from flask_admin import expose, BaseView
from logpot.admin.base import AuthenticateView, flash_errors
from logpot.admin.forms import SettingForm
from logpot.utils import ImageUtil, getDirectoryPath, loadSiteConfig, saveSiteConfig
import os... | Python | logpot/admin/setting.py | moremorefor/Logpot | mit | 2,802 | 66 | codeparrot/github-code |
eb62c7bf08fb296f0da7244f5aba7b9640699160376f422f5c0807d3f7c040ec | <?php defined('BASEPATH') OR exit('No direct script access allowed');
class Queues extends CI_Controller {
public function __construct()
{
parent::__construct();
date_default_timezone_set('Asia/Kolkata');
$this->is_logged_in();
}
public function index()
{
$data['pag... | PHP | application/controllers/Queues_old.php | dazal/dazlive | mit | 3,814 | 157 | codeparrot/github-code |
c2cd56d136dd3dc464a0bcce36ae571eb5fe683b538488d4d33a78860b704b60 | use std::ops::{Add, Mul};
use std::iter::Sum;
#[derive(Copy, Clone, Serialize, Deserialize)]
pub struct Color(pub f64, pub f64, pub f64);
pub const RED: Color = Color(1.0, 0.0, 0.0);
pub const GREEN: Color = Color(0.0, 1.0, 0.0);
pub const BLUE: Color = Color(0.0, 0.0, 1.0);
pub const WHITE: Color = Color(1.0, 1.0, 1... | Rust | src/color.rs | Vzaa/craycray | mit | 1,432 | 65 | codeparrot/github-code |
e9a2ed4f64741173a3ae9bccafda001dd40318b608b983cfb2bc7540ff96d229 | <?php namespace Todohelpist\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Foundation\Inspiring;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
class Inspire extends Command {
/**
* The console command name.
*
* @var string
*/
protected... | PHP | app/Console/Commands/Inspire.php | Swader/todohelpist | mit | 619 | 35 | codeparrot/github-code |
e23946f539975f8df6108d4aacefac56536d3c7b73628865529b3cb8a50c4941 | var f = require('fs');
var _ = require('underscore');
var r = {};
var cr = require('../config.json').resources;
var k = require('../config.json').plugins;
var b = require('../config.json').APIVARS.PLUGINS;
var n = __dirname.replace('/autoform', b.DIR);
var w = ['tokens', 'settings'];
var s = ['actions', 'login', 'recov... | JavaScript | autoform/_wizard.js | obandox/JS-Xmas-Store-App-CodingClubVP | mit | 1,313 | 72 | codeparrot/github-code |
62966a973a9a5ccddd33610daa9371d1cde2c14e139d3f0fe1f8be11b2f3aeab | // Copyright © 2014-2016 Ryan Leckey, All Rights Reserved.
// Distributed under the MIT License
// See accompanying file LICENSE
#ifndef ARROW_PASS_H
#define ARROW_PASS_H
#include <memory>
#include <string>
#include "arrow/generator.hpp"
namespace arrow {
class Pass {
public:
explicit Pass(GContext& ctx) : _ct... | C++ | include/arrow/pass.hpp | arrow-lang/arrow | mit | 571 | 33 | codeparrot/github-code |
799191c82013e72f70433d3444dfe52f373b2f8c727bcb5c7ee510c3671b0145 | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
require_once("Auth.php");
class GameQuestion extends Auth {
public function __construct(){
parent::__construct();
$this->load->model("game_md");
$this->load->model("question_md");
}
public function index($game_id)
{
$data = arra... | PHP | application/controllers/GameQuestion.php | premkamon746/quizgame | mit | 2,279 | 75 | codeparrot/github-code |
168ef91e017208368df18ec02c407744c7d662e06da564d9e8e8c1dcc492d0fd | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* get_next_line.c :+: :+: :+: ... | C | src/get_next_line.c | gmange/RT | mit | 4,184 | 170 | codeparrot/github-code |
aac833199605e92f78347792c79dbac0adb29bfb661142a69863ac1e0e568b80 | /* ===========================================================
* bootstrap-modal.js v2.1
* ===========================================================
* Copyright 2012 Jordan Schroter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the Lice... | JavaScript | src/Landmarx/UtilityBundle/Resources/public/js/bootstrap-modal.js | ner0tic/landmarxApp | mit | 9,265 | 375 | codeparrot/github-code |
80e1519ce6597630e88c7079382be50af650d0cbb0719248e5cbfc767a941698 | using System.Collections.Generic;
using System.Data.Common;
using System.Linq;
namespace Affixx.Core.Database.Generator
{
internal class SqlServerSchemaReader : SchemaReader
{
private DbConnection _connection;
public override Tables ReadSchema(DbConnection connection)
{
var result = new Tables();
_c... | C# | Affixx.Core/Database/Generator/SqlServerSchemaReader.cs | Affixx/affixx | mit | 4,938 | 192 | codeparrot/github-code |
98eeca4bde732130d0f0abae220c90acc8f4d82fca1a6b49bd5aaf2700d63609 | <p><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="bc.css">
<script src="run_prettify.js" type="text/javascript"></script>
<!---
<script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js" type="text/javascript"></script>
-... | HTML | a/1410_delete_print_setup.html | jeremytammik/tbc | mit | 15,927 | 245 | codeparrot/github-code |
1ae70e4fadf10038be37c09d532f1b1ac630341fd6784a0461fbb0a226896b79 | var AWS = require('aws-sdk');
var Policy = require("./s3post").Policy;
var helpers = require("./helpers");
var POLICY_FILE = "policy.json";
var schedule = require('node-schedule');
var Worker = function(sqsCommnad, s3Object, simpleData){
var queue = sqsCommnad;
var s3 = s3Object;
var simpleDataAuth = simpleData;... | JavaScript | worker.js | GlowackiHolak/awsWorker | mit | 1,975 | 91 | codeparrot/github-code |
b7fe7df52f2be76400ce17c5078bbe24258faa26377b3d706fdd1639927b63e4 | # TODO When raising an exception pass a lambda function, the function being the module/path/name thing
ERROR = {'default': "Unknown engine error ({0})",
400: "Bad request sent to search API ({0})",
401: "Incorrect API Key ({0})",
403: "Correct API but request refused ({0})",
404: "B... | Python | ifind/search/exceptions.py | leifos/ifind | mit | 2,524 | 106 | codeparrot/github-code |
0b5c0304e21d25847d33f9f043b6c70116d15fa636ffa84b8c24b489ba61378d | import React, { Component } from 'react'
import { Form, Grid, Image, Transition } from 'shengnian-ui-react'
const transitions = [
'scale',
'fade', 'fade up', 'fade down', 'fade left', 'fade right',
'horizontal flip', 'vertical flip',
'drop',
'fly left', 'fly right', 'fly up', 'fly down',
'swing left', 'swi... | JavaScript | docs/app/Examples/modules/Transition/Explorers/TransitionExampleGroupExplorer.js | shengnian/shengnian-ui-react | mit | 1,810 | 58 | codeparrot/github-code |
8479f90ab6409fd0299a0660d01eb554e7148cfe5f63308c28ec420ce3caeb74 | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Dosen extends MY_Controller {
public $data = array(
'breadcrumb' => 'Dosen',
'pesan' => '',
'subtitle' => '',
'main_view' => 'viewDosen',
);
public function __construct(){
parent::__construct();
$this->load->model('Dosen_mod... | PHP | application/controllers/Dosen.php | dhena201/tadev | mit | 3,127 | 115 | codeparrot/github-code |
586e4517d9c9f7afd357c2100dae2997b264cbacbe98157db3b20f50af542480 | #!/usr/bin/python
import os
import re
from lxml import etree as et
import pcbmode.config as config
from . import messages as msg
# pcbmode modules
from . import utils
from .point import Point
def makeExcellon(manufacturer='default'):
"""
"""
ns = {'pcbmode':config.cfg['ns']['pcbmode'],
'svg... | Python | pcbmode/utils/excellon.py | ddm/pcbmode | mit | 4,661 | 171 | codeparrot/github-code |
f09d84802f63e2b689e9477a899f022dd062c17b3bd148915dca9db99f2e9cc4 | 'use strict';
import _ from 'lodash';
import bluebird from 'bluebird';
import fs from 'fs';
import requireDir from 'require-dir';
import Logger from '../../logger';
bluebird.promisifyAll(fs);
function main() {
const imports = _.chain(requireDir('./importers'))
.map('default')
.map((importer) => importer.ru... | JavaScript | server/src/server/base/data/imports/imports.js | mehmetbajin/gt-course-surveys | mit | 635 | 31 | codeparrot/github-code |
ae4380a73ffee1ab2bc170534db9bf94a9b17bb92cd84068afe1c367687b8377 | // FriendlyNameAttribute.cs created with MonoDevelop
// User: ben at 1:31 P 19/03/2008
//
// To change standard headers go to Edit->Preferences->Coding->Standard Headers
//
using System;
namespace EmergeTk.Model
{
public class FriendlyNameAttribute : Attribute
{
string name;
public string Name {
get {
... | C# | server/Model/FriendlyNameAttribute.cs | bennidhamma/EmergeTk | mit | 735 | 49 | codeparrot/github-code |
9f491a0105ab804a837764633607a3fc71dfc02b2b4ec9463c969b874dc4c93f | using System;
using static LanguageExt.Prelude;
namespace LanguageExt.UnitsOfMeasure
{
/// <summary>
/// Numeric VelocitySquared value
/// Handles unit conversions automatically
/// </summary>
public struct VelocitySq :
IComparable<VelocitySq>,
IEquatable<VelocitySq>
{
... | C# | src/Slant/DataTypes/UnitsOfMeasure/VelocitySq.cs | slantstack/Slant | mit | 3,289 | 109 | codeparrot/github-code |
88029db46b1f54011b3ae0f2201710661d1a900f16addcdf3cb4eda21452a53b | //
// Lexer.cpp
// lut-lang
//
// Created by Mehdi Kitane on 13/03/2015.
// Copyright (c) 2015 H4314. All rights reserved.
//
#include "Lexer.h"
#include <string>
#include <regex>
#include <iostream>
#include "TokenType.h"
#include "ErrorHandler.h"
using std::cout;
using std::endl;
using std::smatch;
using std::st... | C++ | src/Lexer.cpp | hexa2/lut-lang | mit | 4,860 | 184 | codeparrot/github-code |
24a741edbbfcbb263f8d1915654f8eb51d07eafae7441f9fe83d21946a5a3357 |
<!DOCTYPE html>
<html xmlns:msxsl="urn:schemas-microsoft-com:xslt">
<head>
<meta content="en-us" http-equiv="Content-Language" />
<meta content="text/html; charset=utf-16" http-equiv="Content-Type" />
<title _locid="PortabilityAnalysis0">.NET Portability Report</title>
<style>
... | HTML | Reports/ha/hazzik.owin.security.trademe.1.0.0/Hazzik.Owin.Security.TradeMe-net45.html | kuhlenh/port-to-core | mit | 27,782 | 633 | codeparrot/github-code |
42c094d4b72e6956cd9e4261144ba44fde651c97238bc21e91627b7a8ae7d5d2 | <?php
namespace XeroPHP\Reports;
class AgedReceivablesByContact
{
/**
* @var string[]
*/
private $headers;
/**
* @var mixed[]
*/
private $rows;
/**
* @param string[] $headers
* @param mixed[] $rows
*/
public function __construct(array $headers, array $rows =... | PHP | src/XeroPHP/Reports/AgedReceivablesByContact.php | cosmic-beacon/xero-php | mit | 630 | 42 | codeparrot/github-code |
368045ecf6c92b40f2cf21b9cc8fda48995945e0c699447f32473516508415be | const moment = require('moment')
const expect = require('chai').expect
const sinon = require('sinon')
const proxyquire = require('proxyquire')
const breadcrumbHelper = require('../../helpers/breadcrumb-helper')
const orgUnitConstant = require('../../../app/constants/organisation-unit.js')
const activeStartDate = mome... | JavaScript | test/unit/services/test-get-reduction-export.js | ministryofjustice/wmt-web | mit | 2,361 | 57 | codeparrot/github-code |
27fba96b02ca7f2d82944bac2808dfac8e698b4b3c0d669e09b288061be2ba8b | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ProjectData;
using Tools;
using ProjectBLL;
using System.Data;
using Approve.RuleCenter;
using System.Text;
using System.Collections;
using Approve.RuleApp;
public partial cl... | C# | SurveyDesign/JSDW/DesignDoc/Report.aspx.cs | coojee2012/pm3 | mit | 7,141 | 203 | codeparrot/github-code |
7112202bdaf35bfc8dce9d697a3b0c8658ef84032eccc453f4d703dc13f9f4ba | /**
* Conversion:
* All dynamic tweaked dom id or class names are prefixed with 't-'.
*/
/**
* Config
*/
var PRIVATE_TOKEN = 'xYDh7cpVX8BS2unon1hp';
/**
* Globals.
*/
var autocompleteOpts,
projectOpts,
currentProjectID,
currentProjectPath;
$(function () {
initGlobals();
handleAll();
mapUrlHandle... | JavaScript | public/tweak.js | inetfuture/gitlab-tweak | mit | 7,663 | 314 | codeparrot/github-code |
4f654ec41a50ba28c013ad8ad56dc4a682c5a9ae31673535f9c2c2f68fb7d816 | import axios from 'axios'
import pipelineApi from './api'
import { addMessage } from '../../../client/utils/flash-messages'
import { transformValueForAPI } from '../../../client/utils/date'
function transformValuesForApi(values, oldValues = {}) {
const data = {
name: values.name,
status: values.category,
}... | JavaScript | src/apps/my-pipeline/client/tasks.js | uktrade/data-hub-fe-beta2 | mit | 2,963 | 110 | codeparrot/github-code |
3ae5e92b5be228c794fbe88945fbf455bf3949ef3661c802cb52199836e22365 | var global = require('../../global');
module.exports = function (data, offset) {
var items = data.items.map(invoiceNote => {
var invoiceItem = invoiceNote.items.map(dataItem => {
var _items = dataItem.items.map(item => {
dueDate = new Date(dataItem.deliveryOrderSupplierDoDate);... | JavaScript | src/pdf/definitions/garment-intern-note.js | indriHutabalian/dl-module | mit | 21,593 | 597 | codeparrot/github-code |
82258600744171f6bc8976a57d78b97aa0269ab9489c90d9aab5b7d929239ed4 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>coqffi: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css"... | HTML | clean/Linux-x86_64-4.03.0-2.0.5/released/8.8.1/coqffi/1.0.0~beta7.html | coq-bench/coq-bench.github.io | mit | 7,331 | 180 | codeparrot/github-code |
40ad716a1fe126521f989f988b7b1cb3e5817e53b8ce5f5bf38fcb66e84e0abd | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>bignums: 3 m 34 s 🏆</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel=... | HTML | clean/Linux-x86_64-4.09.1-2.0.6/released/8.7.1+2/bignums/8.7.0.html | coq-bench/coq-bench.github.io | mit | 15,787 | 250 | codeparrot/github-code |
d1f8fe139c6330e5ed442e560a7b0adc9e2c1a0e8caaa2d8df845aaed8146c22 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>persistent-union-find: Not compatible</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootst... | HTML | clean/Linux-x86_64-4.11.1-2.0.7/released/8.11.1/persistent-union-find/8.10.0.html | coq-bench/coq-bench.github.io | mit | 6,974 | 171 | codeparrot/github-code |
0863c059670c5e44cf69ef1c42c789776ad71fed46168c40698435c5452ba54b | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.azure.resourcemanager.network;
import com.azure.core.http.rest.PagedIterable;
import com.azure.resourcemanager.network.models.DdosProtectionPlan;
import com.azure.resourcemanager.test.utils.TestUtilities;
import... | Java | sdk/resourcemanagerhybrid/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/DdosProtectionPlanTests.java | Azure/azure-sdk-for-java | mit | 1,570 | 39 | codeparrot/github-code |
511bf160620acca7c6864a30288075d2453d007f6ac77b4cab81e50b72308b5a | window._skel_config = {
prefix: 'css/style',
preloadStyleSheets: true,
resetCSS: true,
boxModel: 'border',
grid: { gutters: 30 },
breakpoints: {
wide: { range: '1200-', containers: 1140, grid: { gutters: 50 } },
narrow: { range: '481-1199', containers: 960 },
mobile: { r... | JavaScript | js/sk1.js | akabob/ARIA_CA2_Code | mit | 3,077 | 112 | codeparrot/github-code |
e65f5a4557166924168cb2fa32c061d3edea4c1b4a54f1c1c2d3faac0f0f6e77 | using MortgageCalc.Models;
using System;
using System.Collections.Generic;
namespace MortgageCalc.Calculators
{
public class InterestOnlyScheduleBuilder
{
private RateCalc _calc = new RateCalc(6); // initialize with 6 decimal places
private decimal _monthlyPayment;
private decimal _pri... | C# | Calculators/InterestOnlyScheduleBuilder.cs | shanegray/mortgage-calc | mit | 945 | 34 | codeparrot/github-code |
0bcbe829793a8e028e575402bb50dfb23d5a3c915c9c42cc0eaa0a19b21579a1 | ////////////////////////////////////////////////////////////////////////////////
//worldgenerator.cs
//Created on: 2015-8-21, 18:18
//
//Project VoxelEngine
//Copyright C bajsko 2015. All rights Reserved.
////////////////////////////////////////////////////////////////////////////////
using Microsoft.Xna.Framework;
u... | C# | Game/WorldGenerator.cs | bajsko/VoxelEngine | mit | 5,362 | 152 | codeparrot/github-code |
5736ebd61d7acb10406ab790b6bf55a5c6de93ce1ed2c62939a5e554fe729e7b | "use strict"
var express = require('express');
var app = express();
var elasticsearch = require('elasticsearch');
var client = new elasticsearch.Client({
host: 'localhost:9200',
log: 'trace'
});
var router = express.Router();
router.get('/accidents', function(req, res) {
var query = {
index: 'wildmap',
type: ... | JavaScript | backend/index.js | Jugendhackt/wildmap | mit | 1,488 | 76 | codeparrot/github-code |
a41185fdea1cc7a126519703cea64943ff74e8b0d0ab5c49f1807567fbb583c4 |
var generatetask = require('../source/ajgenesis/tasks/generate'),
createtask = require('../create'),
path = require('path'),
fs = require('fs'),
ajgenesis = require('ajgenesis');
exports['generate'] = function (test) {
test.async();
var cwd = process.cwd();
process.ch... | JavaScript | test/generate.js | ajlopez/AjGenesisNode-Sinatra | mit | 9,507 | 232 | codeparrot/github-code |
d04770c0a8d126c3fdce7497b2b5962e9d48f4aea6c8a375c54aff7a112c3f1f | #include <math.h>
#include <stdio.h>
#include <pthread.h>
#include <stdlib.h>
#define THREAD_COUNT 4
typedef struct {
int start;
int end;
} range_t;
void *calculate_range(void* range) {
range_t* curr_range = (range_t*)range;
void* result = (void*)1;
for (int i = curr_range->start; i < curr_range... | C | 2015-2016/operating-systems/threads_homework/main.c | arnaudoff/elsys | mit | 1,476 | 66 | codeparrot/github-code |
d7cf5074aee742276b0e71614334fad3ea243f19c44f553661607ca01f51f320 | package com.virtualfactory.screen.layer.components;
import de.lessvoid.nifty.Nifty;
import de.lessvoid.nifty.NiftyEventSubscriber;
import de.lessvoid.nifty.controls.ButtonClickedEvent;
import de.lessvoid.nifty.controls.Controller;
import de.lessvoid.nifty.controls.window.WindowControl;
import de.lessvoid.nifty.element... | Java | src/com/virtualfactory/screen/layer/components/FlowChartScreenController.java | uprm-gaming/virtual-factory | mit | 4,455 | 117 | codeparrot/github-code |
06287f5a6bc3de225e042ffc77a97c9500477325a5a72fd7082d86b13d0c082b | ---
layout: post
title: "Problem 2_0"
modified:
categories: /AcceleratedC++/ch2
excerpt:
tags: []
image:
feature:
date: 2015-09-25T00:37:18-07:00
---
[Github Source](https://github.com/patricknyu/AcceleratedCPlusPlus/tree/master/ch2/Question2_0)
###Q:
Compile and run the program presented in this chapter.
###A:
`... | Markdown | _posts/AcceleratedC++/ch2/2015-09-25-problem-2_0.markdown | patricknyu/patricknyu.github.io | mit | 1,557 | 79 | codeparrot/github-code |
8556211d4ad7feaa36015064874dbf75f9eaea21cfeee5c32fee145545e680a9 | package Digivolver;
public class Digivolution{
private Digimon digimon;
private int minDp = 0;
private int maxDp = 0;
public boolean isWithinDp(int minDp, int maxDp){
return this.minDp<=maxDp && this.maxDp>=minDp;
}
public Digivolution(Digimon digimon, int minDp, int maxDp) {
this.digimon = digimon;
thi... | Java | src/Digivolver/Digivolution.java | mp-pinheiro/DW2Digivolver | mit | 580 | 32 | codeparrot/github-code |
aa6d29f5dc7be267eff36f830256ea532258737d89c88cfd1177a329a4c47207 | import re
import hashlib
FNAME_MATCH = re.compile(r'/([^/]+)$') # From the last slash to the end of the string
PREFIX = re.compile(r'([^:]+://)(/)?(.+)') # Check for a prefix like data://
def getParentAndBase(path):
match = PREFIX.match(path)
if match is None:
if path.endswith('/'):
st... | Python | Algorithmia/util.py | algorithmiaio/algorithmia-python | mit | 1,473 | 50 | codeparrot/github-code |
99f3a344fd9d91585a1a0e08e45283fc8964916cff8852e4cd688ee56f2c9473 | #ifndef VECTOR4_H
#define VECTOR4_H
#include "gamemath_internal.h"
GAMEMATH_NAMESPACE_BEGIN
GAMEMATH_ALIGNEDTYPE_PRE class GAMEMATH_ALIGNEDTYPE_MID Vector4 : public AlignedAllocation
{
friend class Matrix4;
friend GAMEMATH_INLINE Vector4 operator +(const Vector4 &a, const Vector4 &b);
friend GAMEMATH_INLINE Vector4 ... | C | include/vector4.h | GrognardsFromHell/EvilTemple-GameMath | mit | 5,340 | 228 | codeparrot/github-code |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.