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 |
|---|---|---|---|---|---|---|---|---|
08dc9a174067158cfbc8ab4877dd60ff1ba9ff596bf1a84010bae53a8bacd9ff | #include "ScopedStream.h"
#include <Data/Buffer.h>
namespace IO
{
CScopedStream::CScopedStream(PStream Host, U64 Offset, U64 Size)
: HostStream(Host)
, ScopeOffset(Offset)
{
if (HostStream && HostStream->IsOpened())
{
const U64 RealSize = HostStream->GetSize();
ScopeSize = std::min(Size, RealSize - ScopeOffse... | C++ | DEM/Low/src/IO/Streams/ScopedStream.cpp | niello/deusexmachina | mit | 2,105 | 84 | codeparrot/github-code |
a7b66257c50b6ffc731af22c0a8795c5ec9aaa527db994b9e8e14e90aba71395 | /*
* Copyright (C) 2013-2015 Uncharted Software Inc.
*
* Property of Uncharted(TM), formerly Oculus Info Inc.
* http://uncharted.software/
*
* Released under the MIT License.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (... | JavaScript | influent-client/influent-clientjs/src/scripts/templates/helpers/formatDate.js | MjAbuz/influent | mit | 6,717 | 195 | codeparrot/github-code |
c660905ee59b2f5517b3ed5ff04632a971b036d9d77293ecbbd3f41da01976ce | #include <stdio.h>
#include <stdlib.h>
#ifdef _WIN32
#include <string.h>
static char buffer[2048];
//fake readline function
char* readline(char* prompt){
fputs(prompt, stdout);
fgets(buffer, 2048, stdin);
char *cpy = malloc(strlen(buffer)+1);
strcpy(cpy, buffer);
cpy[strlen(cpy)-1] = '\0';
return cpy
}
v... | C | repl.c | montselozanod/BuildYourOwnLisp-Tutorial | mit | 715 | 42 | codeparrot/github-code |
400e06347d47f29c3c9f92ecfafe93dd34be555fb87f04e9f06378f42ca4547b | module PositronicBrain
module Persistence
module Classifier
class Base < PositronicBrain::Persistence::Base
def feature_count(feature)
(@persistence[:features][feature] || 0.0).to_f
end
def category_count(category)
(@persistence[:categories][category] || 0.0).to_... | Ruby | lib/positronic_brain/persistence/classifier/base.rb | Expertte/positronic_brain | mit | 1,716 | 52 | codeparrot/github-code |
1fe56ffa9371723783c6fc6e31b76d57ba6033596e3c87634e0ad13d4486b06d | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>color: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" ... | HTML | clean/Linux-x86_64-4.12.1-2.0.8/released/8.13.0/color/1.7.0.html | coq-bench/coq-bench.github.io | mit | 9,356 | 238 | codeparrot/github-code |
19031c5c82f79d4a0fd79777da09ed73fa765d62fd0a455d340e7fa87aba8379 | package nona.gameengine2d.graphics;
import static org.lwjgl.opengl.GL11.*;
import static org.lwjgl.opengl.GL13.*;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.nio.ByteBuffer;
import javax.imageio.ImageIO;
import org.lwjgl.BufferUtils;
import org.lwjgl.opengl.GL12... | Java | src/nona/gameengine2d/graphics/Texture.java | LeonardVollmann/GameEngine2D | mit | 2,513 | 87 | codeparrot/github-code |
472c262bd2e9a080eb7ac9bbd2164087833d4f9cc230cb56f371a2400d298e30 | from __future__ import print_function
from .SceneClass import Scene
from ..backends.base_backend import DrawingData
class ScenesManager(object):
def __init__(self):
self._scenes = {}
self._models = None
self.sounds = None
self._engine = None
self.currentSceneID = ""
... | Python | e3d/scene_management/ScenesManagerClass.py | jr-garcia/Engendro3D | mit | 2,253 | 79 | codeparrot/github-code |
39ea0cb9e43d265c0bdd63a3fbfdefcee6be5acbd40e0a27f340e7f3b2466d83 | /**
*
*/
package org.nww.modules.preferences;
import org.nww.app.AbstractApplicationController;
import org.nww.modules.users.orm.User;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframewor... | Java | src/main/java/org/nww/modules/preferences/PreferencesController.java | NetzwerkWohnen/NWW | mit | 1,781 | 56 | codeparrot/github-code |
1a09a55716659f7cccac77fa1aee0925fae16ff3cfa08b23bdcc8250d70b037c | package com.voodoodyne.jackson.jsog;
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.Test;
import java.io.ByteArrayInputStream;
im... | Java | src/test/java/com/voodoodyne/jackson/jsog/PolymorphicTest2.java | mhlz/jsog-jackson | mit | 2,757 | 88 | codeparrot/github-code |
2cea4ab349b8c9ad546f357b991fa2d8630d9992c6bc0fdf60122bc27e01b140 | <?php
/*
* This file is part of the Black package.
*
* (c) Alexandre Balmes <alexandre@lablackroom.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Black\Component\User;
/**
* Class UserDomainEvents
*/
final class ... | PHP | src/Black/Component/User/UserDomainEvents.php | Axxon/user | mit | 913 | 35 | codeparrot/github-code |
972e17cc5e9523e10a6a690df43f84ddf3ea1107dc91a5dad1ee94e0733adbc8 | #include "GameWinLayer.h"
#include "cocostudio/CocoStudio.h"
#include "ui/CocosGUI.h"
using namespace cocos2d::ui;
GameWinLayer::GameWinLayer()
{
}
GameWinLayer::~GameWinLayer()
{
}
bool GameWinLayer::init()
{
if (!Layer::init())
{
return false;
}
Size visibleSize = Director::sharedDirec... | C++ | 21551148符晓洋/IOS大作业/IOSProject/Classes/Scene/GameWinLayer.cpp | blighli/iPhone2015 | mit | 692 | 37 | codeparrot/github-code |
443e4dba53cd4359c658a0c65576b8cc74406122dceb818b49204e5d91bbea5b | <?php
/**
* This file is part of the EcommitJavascriptBundle package.
*
* (c) E-commit <contact@e-commit.fr>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Ecommit\JavascriptBundle\Form\Type\Select2;
use Symfony\Compon... | PHP | Form/Type/Select2/Select2LocaleType.php | e-commit/EcommitJavascriptBundle | mit | 671 | 33 | codeparrot/github-code |
03ac1a18deaafdb88230e98a372b7bf179ef6f4f20e8939c985fc6d03ec70b5a | # coding: utf-8
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from __future__ import absolute_import
import logging
import os
import os.path
import re
from .command import exec_cmd
__author__ = 'Ingo Heimbach'
__email__ = 'i.heimbach@fz-juelich.de'
de... | Python | shallow_appify/plugins/util/libpatch.py | IngoHeimbach/shallow-appify | mit | 2,668 | 66 | codeparrot/github-code |
53c62233df6b055b1ef74f7c0b624a5f7f6eef084f6bd894d5b2c4533167327f | using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Net;
using System.Timers;
using System.Windows;
using System.Xml.Linq;
using Caliburn.Micro;
using ESRI.ArcGIS.Client;
using ESRI.ArcGIS.Client.Geometry;
using ESRI.ArcGIS.Client.Projection;
using ESRI.ArcGIS.Cl... | C# | framework/csCommonSense/MapContent/FlightTracker/FlightTrackerLayer.cs | TNOCS/csTouch | mit | 10,001 | 311 | codeparrot/github-code |
feb42d0d0756dab12c33ea1385350dbdaf02da93e5b5fb47d793f659ad30182f | // @ts-expect-error STRICTNESS_MIGRATION --- 🚨 Unsafe legacy code 🚨 Please delete this and fix any type errors if you have time 🙏
import { shallow } from "enzyme"
import React from "react"
import "react-native"
import { renderWithLayout } from "app/tests/renderWithLayout"
import { GlobalStoreProvider } from "app/s... | TypeScript | src/app/Scenes/Sales/index.tests.tsx | artsy/eigen | mit | 2,034 | 77 | codeparrot/github-code |
964764ead86e3d92be1aa42cb82f961338988f38965dffe7911247ed7cf2d2ed | import $ from 'jquery';
import ExportValues from './ExportValues';
export default class InputSelect {
constructor(id, defaultVal, callback, gui) {
this.id = id;
this.gui = gui;
this.input = $(`<input id="${id}_inp">`).on('change.jsorrery', callback);
this.display = $('<div class="display">');
this.list = $... | JavaScript | src/gui/InputSelect.js | mgvez/jsorrery | mit | 1,689 | 69 | codeparrot/github-code |
a9f56afa5ba650859b5983498f156dc2efc54af2e22cfd0d40abd881d64a31a8 | package List;
class ListInterweave
{
//create a test case
public static void main(String[] args)
{
MyList L = new MyList(1);
L.next = new MyList(2);
L.next.next = new MyList(3);
L.next.next.next = new MyList(4);
L.next.next.next.next = new MyList(5);
L.next.next.next.next.next = new MyList(6);
L.next.... | Java | src/List/ListInterweave.java | ethan-fang/algorithms | mit | 3,935 | 128 | codeparrot/github-code |
93ccd8ad11329b6c8de9543000b39bcfa490da7161093456bc6e4913700710ee | using System.Collections.Generic;
namespace Pioneer.Pagination
{
public class PaginatedMetaModel
{
public PaginatedMetaModel()
{
Pages = new List<Page>();
}
/// <summary>
/// Active page nodes
/// </summary>
public List<Page> Pages { get; se... | C# | src/Pioneer.Pagination/PaginatedMetaModel.cs | PioneerCode/pioneer-pagination | mit | 1,592 | 73 | codeparrot/github-code |
5b4eab731c2884ba6fee7235bb701e41573ea23318dec9658f9676598053793d | /*
* This file is part of Sponge, licensed under the MIT License (MIT).
*
* Copyright (c) SpongePowered <https://www.spongepowered.org>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Softwar... | Java | src/main/java/org/spongepowered/common/mixin/core/entity/item/MixinEntityMinecart.java | kamcio96/SpongeCommon | mit | 5,416 | 147 | codeparrot/github-code |
9bd9cc28f292f0081393e483ad3d18b0f59522bdea5ebda3361272981629b05c | package uk.joshiejack.settlements.network.town.people;
import io.netty.buffer.ByteBuf;
import uk.joshiejack.settlements.AdventureDataLoader;
import uk.joshiejack.settlements.world.town.Town;
import uk.joshiejack.settlements.world.town.people.Citizenship;
import uk.joshiejack.penguinlib.network.PenguinNetwork;
import u... | Java | src/main/java/uk/joshiejack/settlements/network/town/people/PacketRequestCitizenship.java | joshiejack/Harvest-Festival | mit | 1,713 | 48 | codeparrot/github-code |
d390b874261f50997d71f58ceea35c05cd7c77d4cd99089a47578f71d2956f88 | 'use strict';
/**
* Generates random strings
*
* @param {Object} [options] options
* @param {Number} [options.length=6] length of the string to produce
* @param {Boolean} [options.onlyDigits=false] make helper return string containing numbers only
* @param {Boolean} [options.withWhitespaces=false] make helper re... | JavaScript | random-string.js | divio/djangocms-casper-helpers | mit | 1,137 | 37 | codeparrot/github-code |
d80280cb4b793ff17d6276487c574885d70353068a8a8f762c53de04f851360e | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PathOfExileNetWorth
{
class League
{
public string id { get; set; }
public bool selected { get; set; }
}
class Stash
{
public int numTabs { get; s... | C# | PathOfExileNetWorth/GggData.cs | gucunja/PathOfExileNetWorth | mit | 7,201 | 231 | codeparrot/github-code |
9d94c930e92739d9afa3a6cbe77de743deedfeef15102e559b736236920d4553 | from fontTools.misc import transform
from fontParts.base import normalizers
from fontParts.base.errors import FontPartsError
from fontParts.base.base import (
BaseObject,
TransformationMixin,
InterpolationMixin,
PointPositionMixin,
SelectionMixin,
IdentifierMixin,
dynamicProperty,
refere... | Python | Lib/fontParts/base/component.py | robofab-developers/fontParts | mit | 11,222 | 405 | codeparrot/github-code |
ce721c5fe266e8504c16bf8d0a5ef9462e248d9c6ca5594df4fa07e7549f24a3 | namespace HeroicallyRecipes.Web.Models.Articles
{
using System;
using System.Collections.Generic;
using AutoMapper;
using HeroicallyRecipes.Data.Models;
using HeroicallyRecipes.Web.Infrastructure.Mappings;
using HeroicallyRecipes.Web.Models.Comments;
public class ArticleViewModel : IMapFr... | C# | Source/HeroicallyRecipes/Web/HeroicallyRecipes.Web.Models/Articles/ArticleViewModel.cs | MystFan/Heroically-Recipes | mit | 893 | 32 | codeparrot/github-code |
aae82e22b4a41b36b29c4b069a654beb90e355eab07944eee4f9c534c44c0db1 | using System;
using System.Collections.Generic;
using System.Linq;
using Trinity.Core;
using Trinity.Extensions;
using Trinity.Implementations.Blockchains.EntiyFramework.Model;
using Trinity.IO;
using Trinity.IO.Caching;
using Trinity.Wallets;
namespace Trinity.Implementations.Blockchains.EntiyFramework
{
public cla... | C# | src/trinity/Implementations/Blockchains/EntiyFramework/EntityFrameworkBlockchain.cs | detroitpro/trinity | mit | 7,934 | 280 | codeparrot/github-code |
4382e169c0f39d07b41be34cea5186d7e1497caa52991c5017b0a863c785d495 | len = fromIntegral . length
rnd n x = (fromIntegral (floor (x * t))) / t
where t = 10^n
put = putStrLn . show
mean xs = sum xs / (len xs)
stddev xs = sqrt $ var xs
var xs = (/(n-1)) $ sum [(x - m)^2 | x <- xs]
where m = mean xs
n = len xs
covar xs ys = (/(n - 1)) . sum $ zipWith (*) [x - xm | x ... | Haskell | correl.hs | wd0/-stats | mit | 903 | 39 | codeparrot/github-code |
f61703baaaf8699878639247a34d5852b079f801397ba8028c507c46130a541e | var helpers = require('../helpers'),
_ = require('underscore');
/**
* for
*/
module.exports = function (indent, parentBlock, parser) {
var thisArgs = _.clone(this.args),
operand1 = thisArgs[0],
operator = thisArgs[1],
operand2 = parser.parseVariable(thisArgs[2]),
out = '',
... | JavaScript | lib/tags/for.js | nickwah/swig | mit | 2,818 | 75 | codeparrot/github-code |
46a6a053089e0d894d40bfca1dbf6e7d172150b0b62fe3c11bc7f3aeca38fe54 | <?php
declare(strict_types = 1);
/**
* Writer Factory
*
* @package Writer
*/
namespace Evoke\Writer;
use DomainException;
use XMLWriter;
/**
* Writer Factory
*
* @author Paul Young <evoke@youngish.org>
* @copyright Copyright (c) 2015 Paul Young
* @license MIT
* @package Writer
*/
class Factory
{
... | PHP | src/Writer/Factory.php | Evoke-PHP/Evoke-PHP | mit | 1,265 | 55 | codeparrot/github-code |
ab1b45e2f624e3c39cfe494b1d86725fb61215a499f808e199327db41b8ab014 | interface Observer {
public void update(int state);
}
class ConcreteObserver1 implements Observer {
public void update(int state) {
System.out.println("ConcreteObserver1 know state had changed to " + state);
doSomething();
}
private void doSomething() {
System.out.println("ConcreteObserver1 do something!!!"... | Java | BehavioralPattern/Observer/example/Observer.java | happylindz/design-pattern-toturial | mit | 873 | 33 | codeparrot/github-code |
d29fcd874b17a0b52f783096c37c12dc309188b78647c188e58a40d4d0ba74d7 | <?php
/**
* Routing for Mail
*/
/*
* Config
*/
if (isset($config['mail'])) {
$default_config_mail = array();
$config['mail'] = array_merge($default_config_mail, $config['mail']);
}
/*
* Routing
*/
$app->post('/mail', function() use ($app, $config) {
$log = $app->getLog();
$log->debug("== POST /mail");
$log... | PHP | controller/mail.php | tsubo/Choco | mit | 1,935 | 82 | codeparrot/github-code |
dcf01bc1f90c23484df92a24428e1a710e2130df0f88148a35c005483b4c7d68 | /*global todomvc, angular */
'use strict';
/**
* The main controller for the app. The controller:
* - retrieves and persists the model via the todoStorage service
* - exposes the model to the template and provides event handlers
*/
todomvc.controller('TodoCtrl', function TodoCtrl($scope, $routeParams, todoStorage,... | JavaScript | architecture-examples/angularjs/js/controllers/todoCtrl.js | sedesigner2nd/AngularticsPinwheel | mit | 2,297 | 86 | codeparrot/github-code |
40fa63071a034bd8f2c55b568f1424edfc09931197143378e1d992d185c2c238 | <?php
namespace dash\utility;
/** Slugify: Converts a string to a slug. **/
class slugify
{
/**
* Slugify
* v2.4
* https://github.com/cocur/slugify
*
* @package org.cocur.slugify
* @author Florian Eckerstorfer <florian@eckerstorfer.co>
* @author Ivo Bathke <ivo.bathke@gmail.com>
* @author M... | PHP | lib/utility/slugify.php | Ermile/dash | mit | 19,819 | 1,014 | codeparrot/github-code |
327920098a7f47c60aa81b4ad630a32c4d9bf531afb01a190c91eaed9a0b667a | <?php
namespace kltk\Messaging;
use PhpAmqpLib\Connection\AMQPStreamConnection;
class AMQPClient
{
/** @var AMQPStreamConnection $connection */
private $connection;
private $host;
private $port;
private $user;
private $password;
private $vhost;
private $insist;
... | PHP | src/Messaging/AMQPClient.php | kennycoder/kltk | mit | 3,149 | 98 | codeparrot/github-code |
736d93533604eccdb9cff39704fd845d8b7dd6707c5119b74b50e73234d328a0 | /*
* The MIT License
*
* Copyright 2016 Juhani Laitakari.
*
* 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... | Java | service-venue/src/main/java/net/laivuri/venueapi/service/venues/fs/FsSearchParams.java | jiiz/venue-api | mit | 3,015 | 98 | codeparrot/github-code |
21ae2608300cb93921ead0fcdf20303357e18c9bc9038e4db8788dd6d7622b5f | // Copyright 2019 jem@seethis.link
// Licensed under the MIT license (http://opensource.org/licenses/MIT)
#include "event_mapper.h"
#include <string.h>
#include <libevdev/libevdev.h>
#include "event_codes.h"
#include "debug.h"
static struct kb_event_map m_devices[MAX_NUM_DEVICES];
int mapper_event_to_key_num(int ... | C | ports/linux/src/event_mapper.c | ahtn/keyplus | mit | 3,812 | 117 | codeparrot/github-code |
f4a41df6048b8bc769c86a764b8ed5fa3bfa372eed254592787ac6336052b9d7 | <?php
/**
* This file is part of graze/unicontroller-client.
*
* Copyright (c) 2016 Nature Delivered Ltd. <https://www.graze.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @license https://github.com/graze/unicontroller-cli... | PHP | src/Parser/Parser/ParserVarSerial.php | graze/unicontroller-client | mit | 1,160 | 46 | codeparrot/github-code |
38cab2f53f95a2f22f328b8ca39154ec51836e1a0d053f5fabe4a20fe1b946ef | using HashTag;
using Newtonsoft.Json;
using RemoteConfig.Common.Interfaces;
using RemoteConfig.Common.MEX;
using RemoteConfig.Common.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
namespace RemoteConf... | C# | src/RemoteConfig.Server.Services/SettingsService.cs | HashTagDotNet/Remote-Configuration | mit | 1,794 | 71 | codeparrot/github-code |
0f3bdfeee1a13daa66c1004d0b09f64aa2087926ecf3618d8fbdc1d585e02a2d | namespace Nancy.Serialization.JsonNet
{
using System;
using System.Collections;
using System.IO;
using System.Linq;
using System.Reflection;
using Nancy.Extensions;
using Nancy.ModelBinding;
using Newtonsoft.Json;
public class JsonNetBodyDeserializer : IBodyDeserializer
{
... | C# | H3Control/Serializer/JsonNetBodyDeserializer.cs | devizer/h3control | mit | 4,024 | 109 | codeparrot/github-code |
df093a67208a403be687846039fd12142a31a93b7ef07570b7cee67277746b12 | "use strict";
// NON PUBLIC METHODS BELOW
const defaultComparator = (x, y) => x - y;
const D = function(callback) {
callback.call(this);
};
const L = function(callback, orderName) {
if (this.left) this.left.depthFirst(callback, orderName);
};
const R = function(callback, orderName) {
if (this.right) this.right.... | JavaScript | index.js | scttdavs/bst | mit | 5,872 | 205 | codeparrot/github-code |
82e0538aecce97a91db6ce9e2989e3c60c02b8ed38112e9b65a7a12d1e4c4dc1 | 'use strict';
var GoogleStrategy = require('passport-google-oauth').OAuth2Strategy;
var _app = null;
function _configure() {
var User = _app.models.User;
var UserProvider = _app.models.UserProvider;
var passport = _app.passport;
var googleConfig = {
clientID : _app.config.get('auth.google.client... | JavaScript | core/passport/strategies/google.js | kevrom/node-boilerplate | mit | 1,587 | 64 | codeparrot/github-code |
b6723619fa8fac42cdc4cbf667cbb1dcacd56472c008787d8272424bbca5b751 | # coding: utf-8
# The mysh internal variables commands.
module Mysh
# The mysh internal variable commands.
class VarsCommand < Action
# The mysh variable parsing regex.
VAR_EXP = %r{(?<name> [a-z][a-z0-9_]*){0}
(?<equals> =){0}
(?<value> \S.*){0}
\$ (... | Ruby | lib/mysh/internal/vars.rb | PeterCamilleri/mysh | mit | 1,545 | 62 | codeparrot/github-code |
b7219175465630c635c8c163f51650973d6e627b7f85c17f276c4d91c956c5cc | <?php
namespace DericCain\Notify;
use Session;
class Notify
{
/**
* @param $message
* @param $type
* @param null $title
*
* @return $this
*/
public function create($message, $type, $title = null)
{
Session::flash('notify', [
'title' => $title,
... | PHP | src/Notify.php | dericcain/Notify | mit | 1,248 | 68 | codeparrot/github-code |
61202333fb405898ad9ffa06931c342a1a5723f7d8fdbb5063561870066482dc | var Taints = {};
var HOOKISH_TAG = "34758";
Taints.XHR_JSON_RESPONSE = HOOKISH_TAG + "_XHR_JSON_RES";
Taints.XHR_RESPONSE = HOOKISH_TAG + "_XHR_RES";
function getTaintName(tag) {
for (x in Taints) {
if (tag === Taints[x]) {
return x;
}
}
console.warn("Error finding Taint Name");
return "!! Error... | JavaScript | src/js/taintAnalyzer.js | skepticfx/hookish | mit | 1,944 | 76 | codeparrot/github-code |
8c9d9f83d0265f0d5cb6875aebe8ff65a45063b69873f241f98cf6faee23c97f | #pragma once
#include "utils/tag.h"
#include "utils/result.h"
#include "collections/array.h"
#define START_STATE "__start"
#define END_STATE "__end"
typedef struct warp_renderer warp_renderer_t;
namespace warp {
class world_t;
class entity_t;
class transition_i {
public:
virtual ~tr... | C | statemanager.h | mbelicki/warp | mit | 1,425 | 48 | codeparrot/github-code |
db7650eb80c468c4e0a6f120910810576f2102b2009287313b4346d5ecfa8369 | using System;
using Microsoft.Extensions.Options;
using Microsoft.Extensions.DependencyInjection;
using Orleans.Configuration;
using Orleans.ServiceBus.Providers;
using Orleans.Providers.Streams.Common;
using Orleans.ApplicationParts;
namespace Orleans.Streams
{
public interface IEventHubStreamConfigurator : IName... | C# | src/Azure/Orleans.Streaming.EventHubs/Providers/Streams/EventHub/EventHubStreamBuilder.cs | sergeybykov/orleans | mit | 4,499 | 89 | codeparrot/github-code |
2441daffc8ef19e0b5ae1cbd65559d5f928f1bb175c425186f95d99d7dee7921 | var DebugInventory = {
init: function() {
$.each(Data.getGame('categoryOrder'), function() {
DebugInventory.addCategory(this.toString());
});
$('#setButton').click(DebugInventory.setCurrency);
$('#currencyBox').val(GameState.getCharacter().getCurrency());
DebugSupport.addBackButton();
... | JavaScript | Mephidross/library/pages/debug/Inventory.js | maldrasen/archive | mit | 2,707 | 110 | codeparrot/github-code |
f8a2f1c3bd5b7ea5007ee41d62cea4e2899d9f0b9cd1fa1e085807bae6fa94d5 | 'use strict'
var config = require('../config')
var generateUrl = require('../lib/generate-url')
/*!
*
* Public
*
*/
function getPublicResponse (request, reply) {
var message = {
message: '(Nothing but) Flowers'
}
reply(message)
}
/*!
*
* EWS
*
*/
function resizeImage (src, type, size, callback) {... | JavaScript | handlers/index.js | telemark/ews-get-user-photo | mit | 1,562 | 79 | codeparrot/github-code |
66a204767845dee90d53bad5b55679c399bc3273669656f16295573b72d81472 | // Data from Overview API - in clear text for now
// var myUrl = window.location.href.split("documentSetId=")[1];
// var documentSetId = myUrl.split("&")[0];
// var token = myUrl.split("&apiToken=")[1];
// Fallback for iFrametesting
// var documentSetId = 1;
// var token = "bqm7pzbxdeg0zgjew5ogmcfga";
// For inside I... | JavaScript | static/js/domScript.js | jo-fu/TLC-OverviewPlugin | mit | 3,608 | 128 | codeparrot/github-code |
00f442f01376ae632f85d04ea0fb0fd76fb76ef2410772cead525d47bb38687a | /*
* MT_TrackerFrameBase.cpp
*
*/
#include "MT_TrackerFrameBase.h"
#include <wx/progdlg.h>
#include <wx/filename.h>
#include "MT/MT_GUI/support/wxSupport.h" // for MT_GetXMLPath
#include "MT/MT_Tracking/cv/MT_MakeBackgroundFrame.h"
#include "MT/MT_Tracking/dialogs/MT_CreateBackgroundDialog.h"
#include ... | C++ | MT/MT_Tracking/base/MT_TrackerFrameBase.cpp | leonard-lab/MADTraC | mit | 34,042 | 1,183 | codeparrot/github-code |
448a0f872d3d15ae455a3f15ba3cd334289bf3d9525e1e172bc7d6e54d90fcb3 | package com.wbillingsley.handy.reactivemongo
import reactivemongo.api._
import reactivemongo.bson._
import reactivemongo.core.commands.GetLastError
import com.wbillingsley.handy._
import com.wbillingsley.handyplay._
import Ref._
import Id._
import Ids._
import scala.concurrent.ExecutionContext
trait DAO {
type Da... | Scala | handy-reactivemongo/src/main/scala/com/wbillingsley/handy/reactivemongo/DAO.scala | wbillingsley/handy | mit | 5,587 | 192 | codeparrot/github-code |
06f301e3ebb2ac1badbf2ca2762bba9a4f8e1d5298363609223ec9eae6891fb0 | /*
* rt_zcfcn.c
*
* Code generation for model "CSE1_HIL_tau".
*
* Model version : 1.153
* Simulink Coder version : 8.6 (R2014a) 27-Dec-2013
* C source code generated on : Tue Apr 14 18:13:38 2015
*
* Target selection: NIVeriStand_VxWorks.tlc
* Note: GRT includes extra infrastructure and instrumen... | C | 02 simulink code/CSE1_HIL_tau_niVeriStand_VxWorks_rtw/rt_zcfcn.c | NTNU-MCS/CS_EnterpriseI | mit | 2,733 | 89 | codeparrot/github-code |
bd5597b12a7d7a6e5bbe60757e910e868da36ad4fe8c0f645096f0a839d61f5e |
// Copyright(c) 2005-2006. All Rights Reserved
// By Jean-René Bédard (https://github.com/jrbedard/3d-converter)
#ifndef __FBXOBJCONVERTER_H__
#define __FBXOBJCONVERTER_H__
#include "toObjConverter.h"
namespace FBXSDK_NAMESPACE
{
class KFbxNode;
class KFbxMesh;
class KFbxMatrix;
}
namespace Z... | C | fbxObjConverter.h | jrbedard/3d-converter | mit | 1,415 | 66 | codeparrot/github-code |
f76e6f3b4c8cec8e8a71a687e0a81fac61757e93a70d75bd8ea561af14431499 | <!DOCTYPE html><html><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Re: [問卦] 小時候的天才同學長大後都在做什麼? - 看板 Gossiping - 批踢踢實業坊</title>
<meta name="robots" content="all">
<meta name="keywords" content="Ptt BBS 批踢踢">
<meta name="description" content="
※ 引述《RAVANA (零的轉移)》之銘言:
: 天才 ... | HTML | result/M.1419083648.A.E57.html | iultimatez/PTTScraper | mit | 14,384 | 262 | codeparrot/github-code |
a640f8d4b8e37865a619e6198ba73f621569d5e6fd183d044617cdfdca8a96cf | #ifndef IF_STMT_HPP
#define IF_STMT_HPP
class ElseStmt;
class IfStmt : virtual public Stmt, virtual public ScopeCreator {
private:
std::unique_ptr<Expr> condition;
std::unique_ptr<Stmt> body;
std::unique_ptr<ElseStmt> elseStmt;
public:
IfStmt() = delete;
IfStmt(ScopeCreator* p) : Stmt(p), ScopeCreator(p) {... | C++ | src/ast/include/if_stmt.hpp | bfeip/Lain | mit | 930 | 33 | codeparrot/github-code |
a059f08ee0f94ad7fc2f86c744c2aa7defbc0191ab84091a29202e97d039cc05 | $(function () {
'use strict';
var accumulateCallTimes = require('../../../callgraph/accumulateCallTimes');
var collapseCallGraph = require('../../../callgraph/collapse');
var data = {};
var commander = {};
var templateSource = $('#template').remove().html().replace(/^\s*/, '').replace(/\s*$/, '');
var r... | JavaScript | lib/formatters/yprof/html/frontend.js | JoshuaGross/yprof | mit | 3,390 | 120 | codeparrot/github-code |
7337bc71f0a140bee00b79ae6685c5341640d49895b7e4b4d159ec9ee65a6683 | package org.jinstagram.exceptions;
import java.util.Map;
import org.junit.*;
import static org.junit.Assert.*;
import com.google.gson.internal.StringMap;
/**
* The class <code>InstagramBadRequestExceptionTest</code> contains tests for
* the class <code>{@link InstagramBadRequestException}</code>.
*/
public class I... | Java | src/test/java/org/jinstagram/exceptions/InstagramBadRequestExceptionTest.java | thesocialstation/jInstagram | mit | 3,314 | 108 | codeparrot/github-code |
f8ca3a5452149ea8d08eefebe2a68c7d740b25c4f18a792661d52f7260e2649f | <!DOCTYPE HTML>
<html>
<head>
<title>
Werner Family Recipes
</title>
<meta charset="utf-8"/>
<meta content="width=device-width, initial-scale=1" name="viewport"/>
<!--[if lte IE 8]><script src="../../assets/js/ie/html5shiv.js"></script><![endif]-->
<link href="../../assets/css/main.css" rel="stylesheet"... | HTML | website/allRecipes/Hotdish/ChickenTortillaHotdish.html | jmwerner/recipes | mit | 10,161 | 369 | codeparrot/github-code |
2028d1707303caf90847ff1c2254974025a1881af88aa43388b432c64a049571 |
#include "gtest/gtest.h"
#include "Timing.h"
#include "Log.h"
#include "Network.h"
#include "Socket.h"
#include "TcpServer.h"
#include "TcpClientFactory.h"
#include "TcpClient.h"
#define IP_FOR_TESTING "127.0.0.1"
#define PORT_FOR_TESTING "1703"
namespace {
class EchoClient : public TCP::Client {
public:
EchoC... | C++ | Lib/TcpServer/Src/TcpServerTester.cpp | Eelco81/server-test-project | mit | 4,328 | 153 | codeparrot/github-code |
33ba68d5699faf9f18fe4a82c6762e285fa758c0e3540a1c9d1b3038829b3c9a | // Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <boost/assign/list_of.hpp> // for 'map_list_of()'
#include <boost/foreach.hpp>
#include "checkpoints.h"
#include "t... | C++ | src/checkpoints.cpp | BEE-TEAM/beecoin | mit | 17,811 | 419 | codeparrot/github-code |
cd67f922049cd0a5d9f482d066c314e7129ea4f5ffda892cdedbf6c860216df1 | /*****
Reviews redux set will deal with single and multiple reviews.
Single review in state.reviews.selected.
Multiple reviews in state.reviews.list.
*****/
/* -------------------< ACTIONS >--------------------- */
const SET_REVIEWS_LIST = 'SET_REVIEWS_LIST';
const SET_CURRENT_REVIEW = 'SET_CURRENT_REVIEW';... | JavaScript | app/reducers/reviews.js | art-shopper/website | mit | 2,533 | 95 | codeparrot/github-code |
b5680baf37767756268609dac57e267230fc13f9c9aa828e3e6cb91e0a30a2e9 | namespace DynamicPowerShellApi.Configuration
{
using System.Configuration;
/// <summary>
/// The web method.
/// </summary>
public class WebMethod : ConfigurationElement
{
/// <summary>
/// Gets the name.
/// </summary>
[ConfigurationProperty("Name", IsKey = true)]
public string Name
{
get
{
... | C# | Configuration/WebMethod.cs | DimensionDataCBUSydney/PowerShell.REST.API | mit | 1,442 | 82 | codeparrot/github-code |
a2174c48973d120ef7c69be9bc25197e4a661b5e4d5dda16feca08fd30bd8191 | package jp.ac.u_ryukyu.ie.cr.jungle.util;
import java.util.Iterator;
public class IterableConverter<A,B> implements Iterable<A>
{
private final Iterable<B> iterable;
private final Converter<A,B> converter;
public IterableConverter(Iterable<B> _iterable,Converter<A,B> _converter)
{
iterable = _iterable;
conv... | Java | src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/util/IterableConverter.java | sister-clown/Jungle | mit | 1,062 | 57 | codeparrot/github-code |
d2d5ce441d4ed3c5d2908c5e2837350f556b9bf2dbd9e83b40266ba5ea441429 | module NubeFact::Validator
# Following methods solve the issue of having required fields inherits from a base class
def self.included(klass)
klass.extend ClassMethods
end
module ClassMethods
# When a class is inherited eg. Invoice, it sets the required fields from
# the base class eg. Document to... | Ruby | lib/util/validator.rb | neohunter/NubeFact | mit | 917 | 33 | codeparrot/github-code |
840fd300b7dd4671cbbf145acbac5a78c677cbc0e59c00677e131d6c05fd2bd8 | #include "scale-title-overlay.hpp"
#include <wayfire/opengl.hpp>
#include <wayfire/util/log.hpp>
#include <wayfire/plugins/common/cairo-util.hpp>
#include <wayfire/plugins/common/simple-texture.hpp>
/**
* Get the topmost parent of a view.
*/
static wayfire_view find_toplevel_parent(wayfire_view view)
{
while (v... | C++ | plugins/scale/scale-title-overlay.cpp | ammen99/wayfire | mit | 16,263 | 563 | codeparrot/github-code |
0560af4d431f339602b7f1166d96b05fd2f75814d8588810261a57ba5cfb95a6 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
import matplotlib.pyplot as plt
import scipy as sp
import random
from mla.base import add_intercept
class BasicRegression:
def __init__(self, method="sgd", eta=0.01, penalty='None', gamma=0.01,
tolerance=0.0001, max_iters=10000):
... | Python | mla/LinearModel.py | qianlv/MachineLearningAlgorithm | mit | 3,716 | 128 | codeparrot/github-code |
32aff9b2e7bd13b03142c91400dddc248d188c5c835d6fe4fd506b04d31b403e | package at.ebinterface.validation.validator;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.xml.sax.SAXException;
/**
* Factory providing XXE-save SAX-parser
*/
public class SAXParserFactory {
private ... | Java | ebinterface-web-core/src/main/java/at/ebinterface/validation/validator/SAXParserFactory.java | austriapro/ebinterface-web | mit | 1,334 | 51 | codeparrot/github-code |
520f3c02a995672ca61911a64127c598d162aeaef9dd99a8bdc80d5a14f8b252 | <?php
/*
Plugin Name: Dr. Register
Plugin URI: http://www.juzaam.com/dregister-wordpress-plugin/
Description: This plugins allows you a easy control of registration in your WP BLOG
Version: 1.3
Author: Ezio Lanza - Juzaam
Author URI: http://www.juzaam.com
*/
/* Copyright 2008 Ezio Lanza - Juzaam(email : eziolanza@gm... | PHP | wp-content/plugins/dregister/dregister.php | creative2020/aao | mit | 9,621 | 302 | codeparrot/github-code |
f847c05489d2923959c7b9fcf84b0008eb7fe4904ae276554bb0614d47995606 | package main
import (
"fmt"
"sync"
"github.com/k-sone/snmpgo"
)
func get(agent string, oids snmpgo.Oids) {
// create a SNMP Object for each the agent
snmp, err := snmpgo.NewSNMP(snmpgo.Arguments{
Version: snmpgo.V2c,
Address: agent,
Retries: 1,
Community: "public",
})
if err != nil {
fmt.Print... | GO | examples/multiget.go | runner-mei/snmpclient2 | mit | 1,236 | 70 | codeparrot/github-code |
fb48f336865fbe36aa995163d46e2b4b9ceddc662c5a723ff12e44b149422e1b | /* globals describe, expect, it, beforeEach, TASK_CONFIG, ENV */
var forEach = require("lodash/forEach");
var getEnabledTasks = require("../get-enabled-tasks");
var keys = require("lodash/keys");
describe("getEnabledTasks", function () {
describe("when env == development", function () {
beforeEach(function () {
... | JavaScript | gulpfile.js/lib/__tests__/getEnabledTasks.test.js | CosminAnca/fosterkit | mit | 4,433 | 156 | codeparrot/github-code |
76d8392ab94f1cc9f969ce0d516957d6ab28669c0c6d522fadf54a9c0a3d0323 | namespace CohesionAndCoupling
{
internal static class Utils
{
internal static double Width { get; set; }
internal static double Height { get; set; }
internal static double Depth { get; set; }
internal static double CalcVolume()
{
var volume = Width * Heigh... | C# | 07.High-Quality Code/07.High-Quality-Classes/03.CohesionAndCoupling/Utils.cs | b-slavov/Telerik-Software-Academy | mit | 1,090 | 46 | codeparrot/github-code |
2f3331f192d177304ac9fa3e6a6f539d29e85a87b97392c515fbdeadc61db36a | // Package dht implements a distributed hash table that satisfies the ipfs routing
// interface. This DHT is modeled after kademlia with Coral and S/Kademlia modifications.
package dht
import (
"bytes"
"errors"
"fmt"
"sync"
"time"
key "github.com/ipfs/go-ipfs/blocks/key"
routing "github.com/ipfs/go-ipfs/routin... | GO | routing/dht/dht.go | bconfais/go-ipfs | mit | 9,882 | 341 | codeparrot/github-code |
7eae5f5215ac05e06359205bd9f54c71e203f11631c47b2c5d6bed2ddf600a0e | module SUNDMAN
! Description:
! Contains the event functions for the regularized formulations when
! integrated with the XRA15 solver, and auxiliary routines.
!
! Author:
! Davide Amato
! Space Dynamics Group - Technical University of Madrid
! d.amato@upm.es
!
! ========================================... | FORTRAN | sundman.f90 | dkamato/NAPLES | mit | 6,552 | 289 | codeparrot/github-code |
b610e1e250fd375d180da13c7e0e343d3b1ba9e77f33d86d4693b87d70dff095 | GPUTracer = function ()
{
this.canvas = null;
this.context = null;
this.size = null;
this.traceShader = null;
this.renderShader = null;
this.texturePingPong = null;
this.camera = null;
this.iteration = null;
this.maxIteration = null;
this.callbacks = null;
this.previewMode = null;
this.previewTimeout = null... | JavaScript | include/gputracer.js | kovacsv/WebGLPathTrace | mit | 9,317 | 302 | codeparrot/github-code |
a48c2f2360c41ba323edf6fb7a46ebdbfc857c9d853d3305f575d7f5ca2d4b1a | 'use strict';
angular.module('myApp').factory('appGroupsApi', function($resource) {
return $resource('/api/scm.config/1.0/app_groups', {},
{
'query': {
method: 'GET',
isArray: true ,
responseType: 'json',
transformResponse: function (data) {
var wrapped = angular.fromJson... | JavaScript | app/views/appGroups/appGroups-service.js | marcerod/scmBrowser | mit | 909 | 37 | codeparrot/github-code |
ab7af02aaf92ce5f33d6ca75e47530057cd4c39b25ea43c8fccf72f619ce6cbf | /********************************************************
* TP Algorithmique - Maitrise d'Informatique *
* LECOQ Vincent - MITAINE Yohan *
* Bibliothèque de manipulation des graphes *
* *
* Fichier principal *
* *
*******************************************************/
#include <graphes_ol.h>... | C | libs/lib_graf/main.c | oktail/borealos | mit | 3,897 | 157 | codeparrot/github-code |
a93cb4264b1c249f56270f267894af2f08a21e08c2c701786902487d7269830a | import * as parseArgs from "minimist";
import * as winston from "winston";
import { greeter, Person } from "./greet";
let main = () => {
let user = new Person("some", "one's", "name");
logger.info(greeter(user));
logger.debug(greeter(user));
};
let test = () => {
logger.debug("tests successful");
};... | TypeScript | src/main.ts | tricklynch/ts_hello_world | mit | 1,056 | 50 | codeparrot/github-code |
1a17371a410ac95e3247222ad69f1d46c431a56b0a727189c0ef46a9899d2c8d | package com.aspose.cells.examples.articles;
import com.aspose.cells.Workbook;
import com.aspose.cells.Worksheet;
import com.aspose.cells.examples.Utils;
public class SaveEachWorksheettoDifferentPDF {
public static void main(String[] args) throws Exception {
// The path to the documents directory.
Stri... | Java | Examples/src/main/java/com/aspose/cells/examples/articles/SaveEachWorksheettoDifferentPDF.java | fahadadeel/Aspose.Cells-for-Java | mit | 1,251 | 37 | codeparrot/github-code |
340610eca78c1f60168e689768d781ba6962d678c73517f36ba6d30b5eddb1e0 | @ECHO OFF
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set BUILDDIR=_build
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
set I18NSPHINXOPTS=%SPHINXOPTS% .
if NOT "%PAPER%" == "" (
set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS... | Batchfile | doc/make.bat | solita/solita-cd | mit | 7,258 | 264 | codeparrot/github-code |
5a9e43c5bdef5ca1b508b9c06c18f62869c4bcc3e560f2c02883c994a97c0311 |
#include "socketcall.h"
#ifndef SYSCALL_PRINTER
int SCOPE
post_recv(int fd, uint32_t ubuf, uint32_t size,
uint32_t flags, int retval, const struct syscall_regs * regs)
{
/* if addr and addr_len error, retval < 0, but
* data will still be copied into buffer */
/* we save garbage data here */
write_mem(ubuf, siz... | C | oldcode/checkpoint/recv.c | pi3orama/Snitchaser | mit | 854 | 41 | codeparrot/github-code |
b4d3a0356f314ea681a2fe3b24b84179d01500d6b0030ee1ddefd4aab11e2934 | <?php
##############################################################
# Class dUnzip2 v2.662
#
# Author: Alexandre Tedeschi (d)
# E-Mail: alexandrebr at gmail dot com
# Londrina - PR / Brazil
#
#
##############################################################
class dUnzip2{
Function getVersion(){
return "2.662";
... | PHP | redaxo/include/addons/installer/classes/unzip.class.php | olien/RexBase15 | mit | 21,100 | 531 | codeparrot/github-code |
f7351b60c82de2c78162018dec194a63c8c06711868902262f6fd55b7811d977 | from inspect import currentframe, getfile
from itertools import product
from random import sample
import os
import math
import numpy as np
from stripstream.utils import flatten
from utils import set_base_conf, Pose, box_body, get_name, set_manipulator_conf, mirror_arm_config, open_gripper, close_gripper, top_grasps,... | Python | robotics/openrave/problems.py | caelan/stripstream | mit | 6,418 | 180 | codeparrot/github-code |
58d02b4895340bb4467e0737a77a571976907b322ab46325e0a1480fb24e3fe1 | import d3 from 'd3';
import {rebindAll} from '../../util/rebind';
import minimum from '../../util/minimum';
import {allWithCollisions, totalCollisionArea} from './collision';
import containerUtils from './container';
import {getAllPlacements} from './placement';
import {randomItem, randomIndex, cloneAndReplace} from '.... | JavaScript | src/layout/strategy/annealing.js | alisd23/d3fc-d3v4 | mit | 2,651 | 87 | codeparrot/github-code |
4541a5c030f18aef4fd62f1f0cc3be12a64903d34fb7012a0889447cc8c17120 | class ConfigError(Exception):
"""
Base class for all exceptions raised by *configmanager* that user may be able to recover from.
"""
pass
class NotFound(ConfigError):
"""
Section or item with the requested name or path is not found
in the section it is being requested from.
.. attribu... | Python | configmanager/exceptions.py | jbasko/configmanager | mit | 1,324 | 52 | codeparrot/github-code |
e83454f224fd285e47cc4134eb953f5e7e7e4bcc6674812be2250c593e6070d3 | var nodeGeocoder = require('node-geocoder');
var RateLimiter = require('limiter').RateLimiter;
var async = require('async');
module.exports = function(options) {
return new Geocoder(options);
};
function Geocoder(options) {
var self = this;
self._nodeGeocoder = nodeGeocoder(options || {});
// Google's standar... | JavaScript | geocoder.js | punkave/apostrophe-map | mit | 5,524 | 157 | codeparrot/github-code |
97e87eb847f1ecea75de8c46502ab2f35bd735b3f7c8adcb912d630175cb42fd | require 'droplet_ctl/api_endpoint'
require 'droplet_ctl/actions'
require 'droplet_ctl/image'
module DropletCtl
class Droplet < APIEndpoint
include Actions
def self.path
'droplets'
end
def networks(version = :v4)
if version != :v4 && version != :v6
fail ArgumentError, 'version mus... | Ruby | lib/droplet_ctl/droplet.rb | jreinert/droplet_ctl | mit | 1,081 | 51 | codeparrot/github-code |
7281863b90cca7f86c901d5c7ed66fa48819cdac822dd2b56c78528da57dbdbf | import { Component, ChangeDetectionStrategy } from '@angular/core';
import { NavController } from 'ionic-angular';
import { Store } from "@ngrx/store";
import { Observable } from "rxjs/Observable";
import { AppState } from '../../services/app-state';
@Component({
selector: 'page-home',
templateUrl: 'home.html',... | TypeScript | counter/src/pages/home/home.ts | rafasanmartinez/ngrx-ionic-2-examples | mit | 999 | 47 | codeparrot/github-code |
c0dbf57a57d97b5d4877bc95039b62a2afaf6cd6c0e8321f85ff1ed4604739d3 | package io.wildernesstp.hook;
import com.songoda.kingdoms.constants.land.SimpleChunkLocation;
import com.songoda.kingdoms.manager.game.GameManagement;
import io.wildernesstp.Main;
import org.bukkit.Location;
import org.bukkit.util.Vector;
/**
* MIT License
* <p>
* Copyright (c) 2019 Quintin VanBooven
* <p>
* Per... | Java | src/main/java/io/wildernesstp/hook/FabledKingdomsHook.java | Qballl/WildernessTp | mit | 2,552 | 66 | codeparrot/github-code |
3fdbb6d5d7c445cd9837508bb58be479954a751d4f3402b3f3524774b786e323 | /*
Theme Name: Template 1
Theme URI:
Description: A Dreamy Template Full of Floats
Author: Tharon Carlson
Author URI: http://tharoncarlson.com
Tags: Starter, HTML5, CSS3
License: MIT
License URI: http://opensource.org/licenses/mit-license.php
*/
/* global box-sizing */
*,
*:after,
*:before {-moz-box-sizing:... | CSS | style.css | Tharon-C/Fleenor | mit | 6,401 | 219 | codeparrot/github-code |
1bd1ccf07c6f2026deca9203535c518c548fb5d9bfb017f1a21586855f32f82c | // Import React
import React from 'react';
import Rx, { Observable } from 'rxjs';
import * as Recompose from 'recompose';
import Counter from '-!babel-loader!raw-loader!../assets/counter.js';
import Autocomplete from '../assets/autocomplete.js';
import DragDrop from '../assets/drag-drop.js';
import Console from '-!bab... | JavaScript | presentation/index.js | letsgojuno/rxjs-tech-talk | mit | 11,648 | 399 | codeparrot/github-code |
284354fd8172ea0e55f0e6b146cdbe7a674d8e5aa88f3a1a24ed461b5ed1fab6 | /*
* __ __ _ __ __ _ _ ____ ___
* \ \ / /__| |__ | \/ | __ _| |_ ___ / \ | _ \_ _|
* \ \ /\ / / _ \ '_ \| |\/| |/ _` | __/ _ \ / _ \ | |_) | |
* \ V V / __/ |_) | | | | (_| | || __/ / ___ \| __/| |
* \_/\_/ \___|_.__/|_| |_|\__,_|\__\___| /_/ \_\_| |... | JavaScript | source/data/js/requests.js | webmate-io/webmate-firefox-plugin | mit | 5,035 | 164 | codeparrot/github-code |
7e1fcea9e4655769d975ac333f62df9ddaf44aa9a4e2b5bbe36b588e73fde750 |
#ifndef OINI_SFML_WINDOW_H
#define OINI_SFML_WINDOW_H
#include "Globals.h"
#include "SfObject.h"
#include "SFML/Graphics.hpp"
OINI_NAMESPACE_BEGIN(Oini)
class SfWindow : public sf::RenderWindow, public SfObject
{
public:
SfWindow();
virtual ~SfWindow();
protected:
virtual void Create(uint width, uint height,... | C | Source/src/SfWindow.h | Xaklse/Open-Ini | mit | 541 | 34 | codeparrot/github-code |
ea991c34291b07ccd7b090ddf2c79b0f459827ddf56ff322ab1873ddab16d003 | package org.autodidactus.csvparser;
/**
* A ParseMachine builds an in-memory representation of a CSV file
* by ingesting one character at a time. This representation is stored in the context.
*
* A parse machine maintains the state and performs the transitions
* of the DFA which accepts the CSV language. While pe... | Java | src/org/autodidactus/csvparser/ParseMachine.java | shashir/csvparser | mit | 7,567 | 238 | codeparrot/github-code |
47b9715fb3accad879e6309f8f11e3034f714cb5cdc5a3f986305d5298ae492b | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-AU">
<head>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" />
<meta name="author" content="haran"... | HTML | doc/documentation/textureloadingsafe.html | bobvodka/GameTextureLoaderV1 | mit | 6,154 | 114 | codeparrot/github-code |
e208a76173cfe28ecdfced357b1355936088c9b396d309a1f69b472f9f3785b8 | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.ArrayDeque;
public class p5598 {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new ... | Java | Java/UVa/src/p5598.java | Emunt/contest_problems | mit | 1,563 | 66 | codeparrot/github-code |
f7cfc43184af570354764bd45e8ba4c598dbe5ca3b610c1fe397d59508f96fdf | <!DOCTYPE html>
<!--[if lt IE 7]> <html lang="en" ng-app="HydrantWiki" class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html lang="en" ng-app="HydrantWiki" class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html lang="en" ng-app="HydrantWiki" class="no-js lt-ie9"> <![endif]--... | HTML | app/index.html | hydrantwiki/hwAngular | mit | 2,715 | 60 | codeparrot/github-code |
beb6a065132616ae4c594fbdfa28acfe89b251c16b5c61dc1a3849df48185863 | package engine
import (
"github.com/quilt/quilt/cluster"
"github.com/quilt/quilt/db"
"github.com/quilt/quilt/join"
"github.com/quilt/quilt/stitch"
"github.com/quilt/quilt/util"
log "github.com/Sirupsen/logrus"
)
var myIP = util.MyIP
var defaultDiskSize = 32
// Run updates the database in response to stitch ch... | GO | engine/engine.go | tejasmanohar/quilt | mit | 5,396 | 212 | codeparrot/github-code |
e8efe8f03c046fcf8149e5263d66ed1b5835d31ca040efcf21c8cbf01fe8dd1f | import { NgModule, ModuleWithProviders } from '@angular/core';
import { CommonModule } from '@angular/common';
import { Configuration } from './src/util/configuration';
import { WeightedScreenComponent } from './src/weighted-screen.component';
import { WeightedScreenService } from './src/weighted-screen.service';
exp... | TypeScript | index.ts | grow-design/weighted-screen | mit | 895 | 35 | codeparrot/github-code |
d260707fea98fdcd6dc25c89af66d78a0b5c8e8619788987e46ea0235590f849 | /*
* Copyright (c) 2011-2016, Peter Abeles. All Rights Reserved.
*
* This file is part of BoofCV (http://boofcv.org).
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www... | Java | example_apps/AndroidStudioMinnie/sapphire/src/main/java/boofcv/alg/feature/dense/DescribeDenseHogAlg.java | bladestery/Sapphire | mit | 13,299 | 341 | codeparrot/github-code |
bb995d2ad5ad4d6de0e3c3d7289d7d0040ff94b9650e0747a432ee512773e835 | class intSet(object):
"""An intSet is a set of integers
The value is represented by a list of ints, self.vals.
Each integer in the set occurs in self.vals exactly once."""
def __init__(self):
"""Create an empty set of integers"""
self.vals = []
def __str__(self):
"""Returns... | Python | computationAndProgrammingUsingPython/src/classesAndObjects/week6_L11_part05.py | pparacch/PlayingWithPython | mit | 1,393 | 65 | codeparrot/github-code |
d5e000211608b77e571a1c07e0c9d14a3b85911c0d8c6014258b8641da63535a | /* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.javascript;
... | Java | android-js-rhino/src/main/java/org/mozilla/javascript/EvaluatorException.java | bsorrentino/android-js | mit | 2,750 | 92 | codeparrot/github-code |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.