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
abdd9d2e2d0f7227272c610cefa12ef7b0c91175b3652260d082a83faad84cc9
function checkHeadersSent(res, cb) { return (err, results) => { if (res.headersSent) { if (err) { return cb(err) } return null } cb(err, results) } } exports.finish = function finish(req, res, next) { const check = checkHeadersSent.bind(null, res) if (req.method === 'GET')...
JavaScript
server/webUtil/routing.js
cannoneyed/tmm-glare
mit
1,653
74
codeparrot/github-code
66b21b4b01442c152f7a2b0600faead44de59d072a45312dd0be4feb16383918
import math import re from collections import defaultdict def matches(t1, t2): t1r = "".join([t[-1] for t in t1]) t2r = "".join([t[-1] for t in t2]) t1l = "".join([t[0] for t in t1]) t2l = "".join([t[0] for t in t2]) t1_edges = [t1[0], t1[-1], t1r, t1l] t2_edges = [t2[0], t2[-1], t2[0][::-1],...
Python
2020/20-jurassic_jigsaw/code.py
BrendanLeber/adventofcode
mit
5,544
218
codeparrot/github-code
0d4d8eaac5da2c66cd3d33e2d40ed5220f33b1cf783309c2f9d46efca9abb359
import isEqual from '../util/isEqual'; import Delta from '../delta/Delta'; import Op from '../delta/Op'; import Line, { LineRanges, LineIds } from './Line'; import LineOp from './LineOp'; import AttributeMap from '../delta/AttributeMap'; import { EditorRange, normalizeRange } from './EditorRange'; import TextChange fro...
TypeScript
src/doc/TextDocument.ts
jacwright/typewriter
mit
11,631
336
codeparrot/github-code
7d454cee2dfedff77effad709bbe1a449efc5b99d3441c4d869b31d98dcfd66c
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Reflection; using System.Reflection.Emit; namespace EasyEmit.Creator { public class ConstructorCreator : Metadata.MenberData { private MethodAttributes methodAttributes; private ...
C#
EasyEmit/EasyEmit/Creator/ConstructorCreator.cs
TheKeyblader/EasyEmit
mit
7,514
185
codeparrot/github-code
e211ab7ca97648e6f4fc9360ed24493fc5eb9ac7e0f1f32f605d5bdcdb233471
const createImmutableEqualsSelector = require('./customSelectorCreator'); const compare = require('../util/compare'); const exampleReducers = require('../reducers/exampleReducers'); /** * Get state function */ const getSortingState = exampleReducers.getSortingState; const getPaginationState = exampleReducers.getPagi...
JavaScript
src/selector/exampleSelector.js
ysaaron/reselect-demo
mit
1,908
56
codeparrot/github-code
1d3bd00ebd33a2b8e6ea28f0b91f9371a3d996118744d5ccab24b4cb135a45b3
import argparse from PGEnv import PGEnvironment from PGAgent import PGAgent if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('--gym_environment', type=str, default='Pong-v0', help='OpenAI Gym Environment to be used (default to Pong-v0)') parser.add_...
Python
PG/main.py
YuMao1993/DRL
mit
2,270
41
codeparrot/github-code
4aa480cf8c47004f559ecb216528540f09b7ad144b2fce7b3b7ca1507c1a56fe
package example.naoki.ble_myo; import java.util.ArrayList; import java.util.StringTokenizer; /** * Created by naoki on 15/04/09. * */ public class EmgData { private ArrayList<Double> emgData = new ArrayList<>(); public EmgData() { } public EmgData(EmgCharacteristicData characteristicData) { ...
Java
BLE_myo/app/src/main/java/example/naoki/ble_myo/EmgData.java
meleap/myo_AndoridEMG
mit
2,341
86
codeparrot/github-code
463a49ad77cf4223140b3fcc4973bb69d13d25f37a5a83e5d688c32dfc17f647
var stream = require('readable-stream') var util = require('util') var fifo = require('fifo') var toStreams2 = function(s) { if (s._readableState) return s var wrap = new stream.Readable().wrap(s) if (s.destroy) wrap.destroy = s.destroy.bind(s) return wrap } var Parallel = function(streams, opts) { if (...
JavaScript
index.js
mafintosh/parallel-multistream
mit
2,398
106
codeparrot/github-code
c3722943235345cb322e081bd6b5bdb2bf5bfb6555455bd007b4cc474cc006f9
// Copyright (c) 2012 Pieter Wuille // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef _ELECTRA_ADDRMAN #define _ELECTRA_ADDRMAN 1 #include "netbase.h" #include "protocol.h" #include "util.h" #include "sync.h" #includ...
C
src/addrman.h
electra01/Electra
mit
16,778
504
codeparrot/github-code
21e4cc33199bfd0873bd602235aac020246307147bf4f983e8f89c47e1e968a1
<?php /* AdminBundle::layoutSUP.html.twig */ class __TwigTemplate_66433e67719e263cb349ed4744109ccf2266f78b6012a7d47e226769c3932f4d extends Twig_Template { public function __construct(Twig_Environment $env) { parent::__construct($env); $this->parent = false; $this->blocks = array( ...
PHP
app/cache/prod/twig/6/6/66433e67719e263cb349ed4744109ccf2266f78b6012a7d47e226769c3932f4d.php
AliBrahem/AfrikIsol
mit
28,165
548
codeparrot/github-code
edc5f98a2646df27ee8442569b31d157e9d483bb777d3b922b0c2a2ed9f6fdf4
from feature import * from pymongo import MongoClient from bson.binary import Binary as BsonBinary import pickle import os from operator import itemgetter import time import sys imagelocation = "" #Input Image path indir = "" #Directory Path client = MongoClient('mongodb://localhost:27017') db = client.coil #Inser...
Python
optimized.py
devashishp/Content-Based-Image-Retrieval
mit
3,209
110
codeparrot/github-code
bb35d36dd78614ca1295fb91dd0609a7d287127b8c79ddc687e3b5ceb56053d6
<?php /* * This file is part of the Elcodi package. * * Copyright (c) 2014-2015 Elcodi.com * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * * Feel free to edit as you please, and have fun. * * @author Marc Morera <yuhu@mmoreram.c...
PHP
src/Elcodi/Admin/PluginBundle/Controller/PluginController.php
deliberryeng/bamboo
mit
5,157
212
codeparrot/github-code
20989b02cf2c81177a67027d400399fafac425efa1c7c3c2c27a4f9e6468150f
/* *********************************************************************************************************************** * * Copyright (c) 2017-2022 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associ...
C
src/core/hw/gfxip/gfx9/gfx10DmaCmdBuffer.h
GPUOpen-Drivers/pal
mit
9,540
231
codeparrot/github-code
a9317bda37365ba92475ea384c2b41f45c0b7b26b8eb4cf0c6095f6b56b1924e
require 'digest/sha1' require 'yaml' module SimpleCov # # A simplecov code coverage result, initialized from the Hash Ruby 1.9's built-in coverage # library generates (Coverage.result). # class Result # Returns the original Coverage.result used for this instance of SimpleCov::Result attr_reader :orig...
Ruby
lib/simplecov/result.rb
bborn/simplecov
mit
3,418
108
codeparrot/github-code
98970f6f40e792a71b860e616387379aa21d8fbe4861467fddad03ed03bba170
'use strict'; import Application from '../../core/Application.js'; import Action from '../../core/Action.js'; describe('Action', () => { var app; var action; class ChildAction extends Action { get name() { return 'ChildAction'; } } beforeEach(() => { app = new...
JavaScript
__tests__/core/Action-test.js
m4n3z40/fluxone
mit
1,021
39
codeparrot/github-code
092d681848f61ee6931ee003e184b7017be90b5d0aa083ba2c72a9f3e2dce346
const { app, BrowserWindow } = require('electron'); const {ipcMain} = require('electron'); // shared to-do list data global.sharedData = { itemList: [ { id: 0, text: "First meet up with David Lau on 5th July", isCompleted: true }, { id: 1, ...
JavaScript
main.js
davidlau325/bh-todo-list
mit
1,183
49
codeparrot/github-code
c49ab4a59a691ba867e1769cbaaf581f14d4ef4e5f7245402d24e654a90c6fa1
function generalAttack(attacker, receiver, weaponBonus){ //Weapon bonus of one means attacker gets bonus, 0 = neutral, and -1 = penalty if(attacker.attack > receiver.defense){ if(weaponBonus == 1){ receiver.health = receiver.health - ((attacker.attack + 2) - receiver.defense); }else if(weaponBonus == -1){ r...
JavaScript
js/pathFunctions.js
YSUatKHE14/zeroPlayerGame
mit
7,261
250
codeparrot/github-code
81197b590a5f047ecebc16d9293d3a6cd0f88088969a6d4d562f509a8e03e48e
package com.ernieyu.feedparser; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import java.io.InputStream; import java.net.URL; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; import org.junit.After;...
Java
src/test/java/com/ernieyu/feedparser/LiveFeedTestSuite.java
ernieyu/simple-feed-parser
mit
4,870
142
codeparrot/github-code
a63a56b8a9778e1c0ec633bc41a5199b112fe9e91b5d59e2726151454aaa7002
<!DOCTYPE html> <!--[if lt IE 7]> <html lang="en" ng-app="lovevApp" ng-strict-di class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> <!--[if IE 7]> <html lang="en" ng-app="lovevApp" ng-strict-di class="no-js lt-ie9 lt-ie8"> <![endif]--> <!--[if IE 8]> <html lang="en" ng-app="lovevApp" ng-strict-di class="no-js lt-ie9"> <!...
HTML
app/index.html
lovev/lovev
mit
2,366
66
codeparrot/github-code
77687ef72e0f356c85ccff8b8b74b8dc3a329be089feb195f892170d17e80e37
#!/bin/bash THIS_SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" source "${THIS_SCRIPTDIR}/_bash_utils/utils.sh" source "${THIS_SCRIPTDIR}/_bash_utils/formatted_output.sh" source "${THIS_SCRIPTDIR}/_setup.sh" # init / cleanup the formatted output echo "" > "${formatted_output_file_path}" if [ -z "${BI...
Shell
step.sh
orta/steps-cocoapods-and-repository-validator
mit
2,960
74
codeparrot/github-code
6b9649b79e3b8c0fa543cca51c6001a690ae6a1a23acb5788df6b7c6cf8c3435
# encoding: utf-8 # xreq_xrep_poll.rb # # It illustrates the use of xs_poll(), as wrapped by the Ruby library, # for detecting and responding to read and write events recorded on sockets. # It also shows how to use XS::NO_BLOCK/XS::DONTWAIT for non-blocking send # and receive. require File.join(File.dirname(__FILE__)...
Ruby
examples/xreq_xrep_poll.rb
celldee/ffi-rxs
mit
2,621
102
codeparrot/github-code
94138aa4509a86481c87cee989401489693ca975ca19bf443aed3526f80681b7
var draw = SVG('mainPage'); var energyBar = draw.rect(0,5).move(0,598) .fill({ color: '#cc0', opacity: '1' }) .stroke({ color: '#fff', width: '1', opacity: '0.6'}); var port = 25550; var images = "http://"+document.location.hostname+":"+port+"/game/images/"; var localPlayers = new Array(); var localBullets = new A...
JavaScript
game/scripts/events.js
wardensfx/E-Tron
mit
7,348
265
codeparrot/github-code
294d40418cdba24fef097e7c53b6a43d39be1c442d767b7dba104b8690b9586f
goog.provide('gmf.DisplayquerygridController'); goog.provide('gmf.displayquerygridDirective'); goog.require('gmf'); goog.require('ngeo.CsvDownload'); goog.require('ngeo.GridConfig'); /** @suppress {extraRequire} */ goog.require('ngeo.gridDirective'); goog.require('ngeo.FeatureOverlay'); goog.require('ngeo.FeatureOverl...
JavaScript
contribs/gmf/src/directives/displayquerygrid.js
kalbermattenm/ngeo
mit
23,829
846
codeparrot/github-code
e0645986c39f34b88ccbdfc39cbe24b0de9b1e4c585cdc476509cb25fc05bb75
// external imports import axios from 'axios' import { Base64 } from 'js-base64' import path from 'path' import fm from 'front-matter' // local imports import zipObject from '../zipObject' import decrypt from '../decrypt' /** 从github调用并在本地缓存期刊内容,返回Promise。主要函数: * getContent: 调取特定期刊特定内容。如获取第1期“心智”子栏目中第2篇文章正文:getConten...
JavaScript
src/store/actions/utils/magazineStorage/index.js
Perspicere/PerspicereMagazine
mit
7,340
265
codeparrot/github-code
785262226b4ce185f73dc076b22843dcb3164a71f1d6b66e13923abe8ca32731
package ncbiutils import ( "bufio" "bytes" "io" "os" "path/filepath" "strings" ) var GCTABLES map[string]*GeneticCode type Taxa struct { Id string // node id in GenBank taxonomy database Name string // the unique variant of names Parent string // parent ...
GO
taxa.go
mingzhi/ncbiutils
mit
5,076
225
codeparrot/github-code
2c89966247765dbffef4bfc97304bef9772901385aae32e87083d50104e274c9
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>scripts/SuccessiveMelodicIntervals.js</title> <link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/build/cssgrids/cssgrids-min.css"> <link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css"> <link rel="style...
HTML
out/files/scripts_SuccessiveMelodicIntervals.js.html
kbarber-ups/Capstone
mit
9,168
305
codeparrot/github-code
78a2449a2583ece7aa625237e8c03d10fb1cdd48530de6e7e900d667b6edd28a
#include <algorithm> #include <cassert> #include <cmath> #include <iostream> #include <set> #include <sstream> #include <vector> using namespace std; int main() { while (true) { int N, M; cin >> N; if (!cin) break; multiset<int> prices; for (int i = 0; i < N; ++i) { int p; c...
C++
2014-Battle_of_the_Bits/kwortman-solutions/11057.cpp
acm-csuf/icpc
mit
977
58
codeparrot/github-code
6f7fe39f8f14feee7acb579601d005615581080e5be4c03c0db21c40b4bf0246
/* @flow */ import assert from 'assert'; import { CONVERSION_TABLE } from './06-export'; import type { Unit, UnitValue } from './06-export'; // We didn't cover any edge cases yet, so let's do this now export function convertUnit(from: Unit, to: Unit, value: number): ?number { if (from === to) { return value; ...
JavaScript
tutorial/00-basics/08-maybe-and-optionals.js
runtastic/flow-guide
mit
1,406
52
codeparrot/github-code
2d460c6e80930f9d14b00deaa7d59f48e599c2d4a12ec4d6a7c0f6c8eb8cd80f
package main // Temporary file import ( "golang.org/x/net/context" "github.com/bearded-web/bearded/pkg/script" "github.com/davecgh/go-spew/spew" "github.com/bearded-web/bearded/pkg/transport/mango" "github.com/bearded-web/wappalyzer-script/wappalyzer" ) func run(addr string) { ctx, cancel := context.WithCance...
GO
main.go
bearded-web/wappalyzer-script
mit
960
53
codeparrot/github-code
96d926a427094406ee8cffbc4e6fef360b9b4536be9e48882789c7b8321666e6
<?php namespace Application\Controller; use Zend\Mvc\Controller\AbstractActionController; use Zend\View\Model\ViewModel; use Application\Form\ContactCreateForm; use Application\Service\ContactService; use Application\Service\PersonService; /** * * Controller responsible for creation and destruction of contacts. ...
PHP
module/Application/src/Application/Controller/ContactController.php
Wbondar/Buddies
mit
2,817
96
codeparrot/github-code
7981cf2522f7749871bb4cdec53d08526e75b6846c22d99e512dca27afb92a0e
/* * testRandomNumber.h * * Created on: Apr 20, 2012 * Author: jchen */ #ifndef TESTRANDOMNUMBER_H_ #define TESTRANDOMNUMBER_H_ #include <cxxtest/TestSuite.h> #include <vector> #include "patNBParameters.h" #include "patDisplay.h" #include "patError.h" #include "patRandomNumber.h" #include <boost/random.hp...
C
src/test/testRandomNumber.h
godosou/smaroute
mit
1,785
69
codeparrot/github-code
fa47c8e219594f0fde3e0726d6bec17241d1ba4435cf7ab1b7d5600c0aa78a3e
import React, { Component } from 'react'; export default React.createClass({ getInitialState: function () { return { title: '', body: '' }; }, handleChangeTitle: function (e) { this.setState({ title: e.target.value }); }, handleChangeBody: function (e) { this.setState({ body: e.target.value });...
JavaScript
client/components/FormPost.js
JayMc/react-crud-example
mit
988
45
codeparrot/github-code
7a55099e01501e4c479e15c52ad3dcf107e9178d0d69777522403f943268fddf
package org.frutilla.examples; import org.frutilla.annotations.Frutilla; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.assertTrue; /** * Examples using Frutilla with annotations. */ @RunWith(value = org.frutilla.FrutillaTestRunner.class) public class FrutillaExamplesWithAnn...
Java
java/src/test/java/org/frutilla/examples/FrutillaExamplesWithAnnotationTest.java
ignaciotcrespo/frutilla
mit
1,278
52
codeparrot/github-code
ea2d2daab280b2706fade3868a0e0c73bb8da89f337f05679be19cb7f8ec1ff2
/** Copyright (c) 2007 Bill Orcutt (http://lilyapp.org, http://publicbeta.cx) 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,...
JavaScript
lily/lily/chrome/content/externals/color.js
billorcutt/lily
mit
3,506
120
codeparrot/github-code
a295d92cecc94488818464415fa7b97ce125e37f4ae9fe03ba5c793a401864a2
Ext.provide('Phlexible.users.UserWindow'); Ext.require('Ext.ux.TabPanel'); Phlexible.users.UserWindow = Ext.extend(Ext.Window, { title: Phlexible.users.Strings.user, strings: Phlexible.users.Strings, plain: true, iconCls: 'p-user-user-icon', width: 530, minWidth: 530, height: 400, minH...
JavaScript
src/Phlexible/Bundle/UserBundle/Resources/scripts/window/UserWindow.js
phlexible/phlexible
mit
3,587
139
codeparrot/github-code
dc37cf76a3dc592508f8483a6b5ae0c45f59157386aebc1d8f3711ed66c6ff3c
package com.cccrps.gui; import java.awt.AWTException; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Frame; import java.awt.HeadlessException; import java.awt.Image; import java.awt.MenuItem; import java.awt.PopupMenu; import java.awt.SystemColor; import java.awt.SystemTray; import java.awt.Toolki...
Java
Server/src/com/cccrps/gui/GuiManager.java
FloThinksPi/Catalyst-PresetSwitcher
mit
11,468
357
codeparrot/github-code
57f06f8330f3706cfddb883f7bf6f9ea513906abfea0e74d9ba39422274e6f6b
#PROJECT from outcome import Outcome from odds import Odds class Bin: def __init__( self, *outcomes ): self.outcomes = set([outcome for outcome in outcomes]) def add_outcome( self, outcome ): self.outcomes.add(outcome) def __str__(self): re...
Python
bin.py
ddenhartog/itmaybeahack-roulette
mit
4,662
169
codeparrot/github-code
1a79a62fc5eb13ac2776ce8c320e76d524e6072826d44ce73f956b8efdebb63f
#pragma once #include <SDL.h> #include <string.h> #include "../Core/C_Vec2.h" ///Forward declaration of StateManager for the pointer to the StateManager. class S_StateManager; /** @brief Contains State functions and data to be inherited by all other states. @author Jamie Slowgrove */ class S_State { public: /** @b...
C
SkyZoneOmegaPC/States/S_State.h
JSlowgrove/Sky-Zone-Omega-PC
mit
1,268
54
codeparrot/github-code
1ba83d429b99af6d4cd6d1f7084df81624dbf76b2e69fa4ef1acf4897f2f47b5
<?php //connect to da database include('functions.php'); include('../secure/database.php'); $conn = pg_connect(HOST." ".DBNAME." ".USERNAME." ".PASSWORD) or die('Could not connect:' . pg_last_error()); HTTPSCheck(); session_start(); //Once the button is pressed... if(isset($_POST['submit'])){ ...
PHP
main/register.php
robertastic/Dantes-Adventures
mit
2,867
115
codeparrot/github-code
cd8d32316d0eebe5e3488e1577b595d27785a553e962c35ee4b07498febbc20f
/* Copyright (C) <2012> <Kieren 'Razish' McDevitt> 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, modify, merge, publis...
C
src/game/game.c
Razish/solitaire
mit
23,543
813
codeparrot/github-code
734e7905ff89f35ad2b7a5391606f900df1d969404bbdf72c162a654a2b7c7f9
#!/usr/bin/env python # -*- coding: utf8 -*- """The Tornado web framework. 核心模块, 参考示例使用代码: - 重要模块: - tornado.web - tornado.ioloop # 根据示例,可知入口在此.参看: ioloop.py - tornado.httpserver The Tornado web framework looks a bit like web.py (http://webpy.org/) or Google's webapp (http://cod...
Python
src/tornado-1.0.0/tornado/web.py
hhstore/tornado-annotated
mit
63,996
1,784
codeparrot/github-code
f33772d38b141fdfbd2edd67367c3c204a365807e7d40547f387dce1c23f0a40
<!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/el/eleven41.extensions.1.2.0/Eleven41.Extensions-net35-client.html
kuhlenh/port-to-core
mit
9,653
240
codeparrot/github-code
1ab4eea12a2c672158b9ec7ae726104f46300cc10b3d29c816a13aca5c2e7aeb
package finalir; public class CoreLabel{ String word; String lemma; int position; public CoreLabel setWord(String s){ word = s; return this; } public String word(){ return word; } public CoreLabel setBeginPosition(int t){ posit...
Java
src/finalir/DataStructure/CoreLabel.java
bhlshrf/IR
mit
726
39
codeparrot/github-code
5599a1627743933d95bb979910c1790d3400b7cbea1c668ad9cec8a02c69f12e
<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); /** * CSVReader Class * * Allows to retrieve a CSV file content as a two dimensional array. * Optionally, the first text line may contains the column names to * be used to retrieve fields values (default). */ class CSVReader { var $fie...
PHP
application/libraries/CSVReader.php
HugoMontes/si_maestras
mit
1,876
64
codeparrot/github-code
11ae9c9fb92bc61e70759ef8fc046dae883301063379570f8c7ba830cea2c3d4
""" This script exposes a class used to read the Shapefile Index format used in conjunction with a shapefile. The Index file gives the record number and content length for every record stored in the main shapefile. This is useful if you need to extract specific features from a shapefile without reading the entire file....
Python
ShapefileIndexReader.py
taylorhutchison/ShapefileReaderPy
mit
1,778
50
codeparrot/github-code
01c693e5708cd493ad992af3c90bacce2c481676815519e8a5805ccb4565bd04
import external from '../../../externalModules.js'; import getNumberValues from './getNumberValues.js'; import parseImageId from '../parseImageId.js'; import dataSetCacheManager from '../dataSetCacheManager.js'; import getImagePixelModule from './getImagePixelModule.js'; import getOverlayPlaneModule from './getOverlayP...
JavaScript
src/imageLoader/wadouri/metaData/metaDataProvider.js
chafey/cornerstoneWADOImageLoader
mit
4,492
155
codeparrot/github-code
8e213f1f3452d1f10e85111a39870e90a605c71199719e145cf2c873dcdd8a1a
\input{../../common/exo_begin.tex}% %\firstpassagedo{\refstepcounter{cxtd}\refstepcounter{cxtd}} \input{../python_td_minute/description_cours.tex} \begin{xtd}{Recherche dichotomique minutée}{dicho_minute_cor}\label{dicho_minute_label} \partietdVU{variables, opérations, boucles, tests}{recherche dichotomique} Au c...
TeX
_todo/recherche_dichotomique_minute.tex
sdpython/ensae_teaching_cs
mit
10,358
228
codeparrot/github-code
3ff9e381820a3b3dc58908bd0389a282471156f550a79a6bf93b0b276c09882d
<?php namespace NRtworks\BusinessDimensionBundle\Model; use Doctrine\ORM\EntityManager; use NRtworks\GlobalUtilsFunctionsBundle\Services\arrayFunctions; use NRtworks\GlobalUtilsFunctionsBundle\Services\APIGetData; class setUpForDimension extends \Symfony\Component\DependencyInjection\ContainerAware{ protect...
PHP
src/NRtworks/BusinessDimensionBundle/Model/setUpForDimension.php
Morgorth/ICORECON
mit
21,059
528
codeparrot/github-code
1b0cb77a4129db701c738ae65ec80e483beb37b1e637a1e258d8f717f497ca96
/** * Copyright (C) 2017 Cristian Gomez Open Source Project * * 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.apache.org/licenses/LICENSE-2.0 * * Unless required by appl...
Java
app/src/main/java/co/iyubinest/bonzai/App.java
iyubinest/Bonzai
mit
1,212
42
codeparrot/github-code
52fbeee939de240744bfa70e2069bb19bcd1a02937b5fb87619eae64b6eb3823
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.InteropServices.WindowsRuntime; using Windows.ApplicationModel; using Windows.ApplicationModel.Activation; using Windows.Foundation; using Windows.Foundation.Collections; using Windows.UI.Xaml; using Windows.UI.Xam...
C#
samples/XForms.Utils.Samples/XForms.Utils.Samples.UWP/App.xaml.cs
wcoder/XForms.Utils
mit
3,500
108
codeparrot/github-code
eae4615442829bd533d00febdae5148d17b02b497c2b957edec59385a8d57960
#! /usr/bin/env python3 import asyncio import subprocess import numpy as np import time comm = None class Camera: def __init__(self, notify): self._process = None self._now_pos = np.array([0., 0., 0.]) self._running = False self._notify = notify @asyncio.coroutine def con...
Python
camera3.py
AlphaLambdaMuPi/CamDrone
mit
937
38
codeparrot/github-code
565d6fa8368f38cdecf31bcace13dfbadf7897c3d725df786d60dc4b34eb354c
# -*- coding: utf-8 -*- from __future__ import unicode_literals from abc import ABCMeta, abstractmethod from django.core.files import File from six import with_metaclass from django.utils.module_loading import import_string from rest_framework_tus import signals from .settings import TUS_SAVE_HANDLER_CLASS class ...
Python
rest_framework_tus/storage.py
dirkmoors/drf-tus
mit
1,346
54
codeparrot/github-code
5dbd36ec75ed6ad3146868f9b117abcb8abb1bac6db2ab0909a2545413bce68d
<?php class PagedData implements IteratorAggregate { private $page = 1; private $perPage = 10; private $pageCount = 0; private $items = array(); public function __construct($page, $perPage = 10) { $this->page = $page < 1 ? 1 : (int)$page; $this->perPage = (int)$perPage; } public function isEmpty() { ...
PHP
_lib_/PagedData.php
morkai/envis.walkner.pl
mit
3,082
144
codeparrot/github-code
60e89389b6e79f98e5aa958debacc3c215f9fd7fa30847667672420aecebe6b0
#![allow(dead_code)] #![allow(unused_imports)] extern crate libc; extern crate sysctl; // Import the trait use sysctl::Sysctl; #[cfg(target_os = "freebsd")] const CTLNAME: &str = "net.inet.ip.forwarding"; #[cfg(target_os = "macos")] const CTLNAME: &str = "net.inet.ip.forwarding"; #[cfg(any(target_os = "linux", tar...
Rust
examples/set_value.rs
johalun/sysctl-rs
mit
1,432
51
codeparrot/github-code
d21f959f09f107bcbc5726368a13c179bc50325f93d9178ba285bb976c3cdc1e
/****************************************************************************//** \file memAt25dd041a.c \brief Some commands for at25df041a implementation. \author Atmel Corporation: http://www.atmel.com \n Support email: avr@atmel.com Copyright (c) 2008-2011, Atmel Corporation. All rights r...
C
Eagle_Files/FemtoBeacon_r2.0.0/Atmel_files/AT02430/Embedded_Bootloader_src/application/common/src/memAt25df041a.c
femtoio/femto-beacon
mit
3,007
84
codeparrot/github-code
c33d934b9c5ec93edb00a55fe3245f80ed8ba727f215369c7a2aeeabb731f4d2
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /** * ZENBU THIRD-PARTY FIELDTYPE SUPPORT * ============================================ * Grid field * @author EllisLab * ============================================ * File grid.php * */ class Zenbu_grid_ft extends Grid_ft { var $dropdown_t...
PHP
core/expressionengine/third_party/zenbu/fieldtypes/grid.php
noslouch/pa
mit
13,907
398
codeparrot/github-code
6b56561b4bf8a14e9844097262281d6e97a55368b9d4c4668034a6ec0a08cafb
#include "GeneralProcessor.h" namespace engine { ////==--------------------------------------------------------------------====// // ECKERT PROCESSOR / ADD // [ description ] // ADD function for 2 complex numbers // (a + ib) + (c + id) = (a + c) + i(b + d) // [ Update ] // Jan 25, 2016 //====-------------------------...
C++
src/calc/engine/proc/GeneralProcessorComplexArithmetic.cpp
yuishin-kikuchi/eckert
mit
7,196
277
codeparrot/github-code
9d5da18df39aa57f16a5fbc27771133d5165d388de37fb4ad3692cf32686e9c6
import Data.List import Data.Text hiding (intercalate, map) import System.Hclip import Text.ParserCombinators.Parsec -- | Strip, with Strings instead of Text for arguments trim :: String -> String trim = unpack . strip . pack -- | A single cell of a matrix b...
Haskell
MatrixDetex.hs
mystor/matrix-detex
mit
1,604
56
codeparrot/github-code
4ea951b3c0f4132c98c4968f4cab72e42a0f6c7210ad32cb564fe173ea358c7c
package main import ( "flag" "image/color" "image/png" "log" "os" "github.com/lethal-guitar/go_tracer/tracing" "github.com/lethal-guitar/go_tracer/scene" "github.com/lethal-guitar/go_tracer/vecmath" ) func main() { tileSize := flag.Int("tileSize", 64, "Size of a render tile") f...
GO
main.go
lethal-guitar/go_tracer
mit
4,360
147
codeparrot/github-code
efa583d1bb7fde4032f5105d3d030f3bd1d6601ac2b57813c628bc0b61ec5d77
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>ComponentManger | Demo</title> <link href='https://fonts.googleapis.com/css?family=Crimson+Text' rel='stylesheet' type='text/css'> <style type="text/css"> * { font-family: 'Crimson Text', serif; } ...
HTML
demo_simple.html
jonathanweiss/component-manager
mit
2,952
90
codeparrot/github-code
d2f11199fecefa1dcdecbd0c5c5ed83d1731e1d8e0847b1a0e3a8aaeeb19a983
using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.IO; using System.Linq; using System.Net.Http; using System.Net.Http.Formatting; using System.Net.Http.Headers; using System.W...
C#
BattleHQ/Areas/HelpPage/SampleGeneration/HelpPageSampleGenerator.cs
otac0n/BattleHQ
mit
17,214
372
codeparrot/github-code
09a43f172f81fae0610e8f6822a041c54361d72ae8f354e14255b66c45206d7e
<!DOCTYPE html > <html> <head> <title>InterpolationTag - threesixty.data.tags.InterpolationTag</title> <meta name="description" content="InterpolationTag - threesixty.data.tags.InterpolationTag" /> <meta name="keywords" content="InterpolationTag threesixty.data.tags.InterpolationTa...
HTML
doc/threesixty/data/tags/InterpolationTag.html
elordin/threesixty
mit
25,602
489
codeparrot/github-code
96ce63e5ebb7bf69c31ffbb284984ff4c594b90455622e7b7b1134e1ac83fca5
using System; using System.Collections.Generic; using System.Globalization; using System.Text.RegularExpressions; using JetBrains.Annotations; using static JetBrains.Annotations.AssertionConditionType; namespace Ccr.Core.Extensions { public static class StringExtensions { public static bool IsNullOrWhiteSpace( ...
C#
Ccr.Core/Core/Extensions/StringExtensions.cs
vreniose95/Ccr
mit
7,783
285
codeparrot/github-code
36ad82cbbeb8607ad81b912794cf8b2c687fb2f08e25cb701f23612c06225e65
import { NgModule, ApplicationRef } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { FormsModule } from '@angular/forms'; import { HttpModule } from '@angular/http'; import { RouterModule, PreloadAllModules } from '@angular/router'; import { removeNgStyles, createNewHosts, creat...
TypeScript
src/browser/app/app.module.ts
errogien/cockpit-seed
mit
3,239
109
codeparrot/github-code
0cada4809dd0f2297d4de9da3548eef7014b1f5b4e210d83b4448af20286c424
package postgresql import ( "bytes" "fmt" "github.com/spf13/viper" "io" "strconv" ) func readInt32(c *PGConn) uint32 { var ret uint32 = uint32(c.buf[c.idx+0]) ret <<= 8 ret += uint32(c.buf[c.idx+1]) ret <<= 8 ret += uint32(c.buf[c.idx+2]) ret <<= 8 ret += uint32(c.buf[c.idx+3]) c.idx += 4 return ret } ...
GO
postgresql/parse.go
maczniak/backstage
mit
5,552
242
codeparrot/github-code
66d1f5dfeb1ea0e19174e7aeda390575665c1174b1c9462810bd9514dc73313a
/** * Vector */ (function() { var global = this, nspace = global.Util, Exception = global.Exception, math = global.mathjs(); /** * * @type Vector * @param {Array} basis The basis vectors, ordered correctly, orthonormal and complete */ var Vector = nspace.Vector = function(basis...
JavaScript
lib/util/Vector.js
bjester/quantum-probability
mit
5,940
271
codeparrot/github-code
23938f63f43f0711b09614dbcc95df64c720a907032c72808328cc4359e116cc
module BWAPI class Client # Ping module for ping endpoints module Ping # Get ping checking access and available HTTP verbs # # @return [Hashie::Mash] User id and name def get_ping get "ping" end # Post ping checking access and available HTTP verbs # # ...
Ruby
lib/bwapi/client/ping.rb
benSlaughter/bwapi
mit
937
43
codeparrot/github-code
01a0a50ac93c0f3f04341dbb3d8fe8f97b27d9e4199e5bd4b560fac59956550b
Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. The same repeated number may be chosen from C unlimited number of times. Note: All numbers (including target) will be positive integers. Elements in a combination (a1, a2, … , ak) mus...
Python
Array/combination_sum1.py
UmassJin/Leetcode
mit
1,928
58
codeparrot/github-code
cd1474bd4c901e91af69be951651d3a0aac91c448c97d27917ccd6eb71fb6b17
<?php include_once ROOT. '/cabinet/site/models/Login.php'; class LoginController{ //Загрузка страницы авторизации public function actionLogin(){ if(isset($_SESSION['id_user'])){ SRC::redirect('/panel'); } SRC::template('site', 'login', 'login'); return true; } /...
PHP
cabinet/site/controllers/LoginController.php
stas383/newagro
mit
2,000
60
codeparrot/github-code
b9252b8cc63fe711fc828d6781f0620ba9b74316e8ea2c93c40b1a3f821fb7da
package com.syynth.libcfg; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.xml.sax.SAXException; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; i...
Java
src/com/syynth/libcfg/Config.java
Syynth/libcfg
mit
4,160
147
codeparrot/github-code
97e5a7774e636780790512b3f61e8f6977a2b7f4297db1220204ad0a0255a20a
package cn.org.rapid_framework.page.impl; import java.util.List; import cn.org.rapid_framework.page.Page; import cn.org.rapid_framework.page.PageRequest; /** * 处理List的分页 * @author badqiu * @see BasePage */ @Deprecated public class ListPage extends Page { /** * 构建ListPage对象,完成List数据的分页处理 * * @...
Java
java_core_src/src/cn/org/rapid_framework/page/impl/ListPage.java
neolfdev/dlscxx
mit
964
36
codeparrot/github-code
f9723b5487498c0a900b92564c8b9f710d275d4f6575202b549c1d6e58856a26
/* jshint node: true */ module.exports = function(environment) { var ENV = { modulePrefix: 'firehon', environment: environment, contentSecurityPolicy: { 'connect-src': "'self' wss://*.firebaseio.com" }, firebase: 'https://firehon.firebaseio.com/', baseURL: '/', locationType: 'auto', Ember...
JavaScript
config/environment.js
nihey/firehon
mit
1,201
50
codeparrot/github-code
512db0ca8c359b72affd73907129988558755603c26ac9a0c6acfb73c891413d
var path = require('path') var webpack = require('webpack') // Phaser webpack config var phaserModule = path.join(__dirname, '/node_modules/phaser-ce/') var phaser = path.join(phaserModule, 'build/custom/phaser-split.js') var pixi = path.join(phaserModule, 'build/custom/pixi.js') var p2 = path.join(phaserModule, 'buil...
JavaScript
webpack.production.config.js
jtak93/phaser-practice
mit
1,817
67
codeparrot/github-code
80b0fcb835c3c0ae249d98ca1f47db93a116ab3bdb2489dc8880df364c7070d6
class User < ActiveRecord::Base rolify #default_scope :order => 'users.created_at DESC' # added these 2 lines to add the Gravatar in the app include Gravtastic gravtastic :secure => true, :filetype => :gif, :size => 30 enum locale: [:en, :es, :it, :tl] # NO EMAIL IN DEV ...
Ruby
app/models/user.rb
kepasa-project/kepasa-feeds-aggregator
mit
3,229
105
codeparrot/github-code
cda97be6c8b5b793c46013a6ef776ca5290c06c975066d5300d056215688d7bb
export function pluralize(count, word) { return count === 1 ? word : word + 's'; } export function classNames(...args) { // based on https://github.com/JedWatson/classnames let classes = ''; args.forEach(arg => { if (arg) { const argType = typeof arg; if (argType === 'string' || argType === '...
JavaScript
example/client/utils.js
bicyclejs/bicycle
mit
981
45
codeparrot/github-code
7ff9a0927327e463764b8dc81699bc73c334f327c9d09f2e0e6db90b976f765e
/** <slate_header> author: Kishore Reddy url: https://github.com/kishorereddy/scala-slate copyright: 2015 Kishore Reddy license: https://github.com/kishorereddy/scala-slate/blob/master/LICENSE.md desc: a scala micro-framework usage: Please refer to license on github for more info. </slate_header> */ pack...
Scala
src/main/scala/slate/http/HttpUtils.scala
kishorereddy/akka-http
mit
1,106
44
codeparrot/github-code
4993aca3d8d53baf4b76f0f228052ebd059895af0a0a1f5d4de8c9512c4c0aaa
/** * @file routing.hpp * @brief this file implements the application routing. * @author nocotan * @date 2016/11/4 */ #ifndef ROUTING_HPP #define ROUTING_HPP #include <functional> #include <string> namespace ots { /** * @struct header * @brief header */ struct header { const std:...
C++
include/otus/routing.hpp
nocotan/otus
mit
912
51
codeparrot/github-code
22e5eeedf890594389220086054cb5ec82496a647d83d15bfd4b9e91719eff93
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width" /> <link rel="shortcut icon" type="image/x-icon" href="../../../../...
HTML
google-play-services_lib/docs/reference/com/google/android/gms/common/data/DataBuffer.html
CMPUT301W15T05/TrackerExpress
mit
55,766
1,804
codeparrot/github-code
7769de273f4de7aaae9ed4bd2565157c61d33a2a2fb1cae7bb653dbf20a74d51
'use babel'; //showSearch import FoldNavigatorView from './fold-navigator-view'; import fuzzaldrinPlus from 'fuzzaldrin-plus'; import _ from 'lodash'; import { CompositeDisposable } from 'atom'; export default { config: { autofold: { title: 'Autofold on open', description: 'Au...
JavaScript
lib/fold-navigator.js
turigeza/fold-navigator
mit
41,379
1,286
codeparrot/github-code
0898e1b418dcdeb7b0134b66746c3d229a52012671eba13805c8dbde5341d3a7
local t = Def.ActorFrame{ InitCommand = function(self) self:delayedFadeIn(6) end, OffCommand = function(self) self:sleep(0.05) self:smooth(0.2) self:diffusealpha(0) end } local frameX = SCREEN_CENTER_X/2 local frameY = SCREEN_CENTER_Y+100 local maxMeter = 30 local frameWidth = capWideScale(get43size(390)...
Lua
BGAnimations/ScreenSelectMusic overlay/profilecard.lua
ca25nada/spawncamping-wallhack
mit
24,793
868
codeparrot/github-code
570558ec8af01640581e238bfff25dd018c772ba18f32db7c6758921253d3d00
/** * Copyright 2012 multibit.org * * Licensed under the MIT license (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://opensource.org/licenses/mit-license.php * * Unless required by applicable law or agreed to in writing,...
Java
src/test/java/org/multibit/store/ReplayableBlockStoreTest.java
rebroad/multibit
mit
5,156
119
codeparrot/github-code
c35054144f910346e8ffed6554e25e093a8030f3e71588391f22e4b73469cdd7
package com.tek271.funj; import com.google.common.annotations.Beta; import java.util.List; import static com.google.common.collect.Lists.newArrayList; @Beta public class Transformer { private List<StepFunction> steps = newArrayList(); public static Transformer create() { return new Transformer(); } public T...
Java
src/main/java/com/tek271/funj/Transformer.java
ahabra/funj
mit
653
35
codeparrot/github-code
03e81705a525e7894e4612fd55c435a86f21901f2173a58d029cb93ce7990846
"use strict"; import React from 'react' import Course from '../partials/Course.js' import Modal from '../partials/Modal.js' import MetricModal from '../partials/MetricModal.js' export default class Courses extends React.Component { constructor(props) { super(props); this.state = { course: props.cours...
JavaScript
components/pages/Courses.js
freyconner24/Quizzly
mit
8,389
293
codeparrot/github-code
5a3b1b8f64c89758e573e773be107fa7650357e25ee9f60f51fa5f44943676fb
import numpy as np import keras as ks import matplotlib.pyplot as plt from keras.datasets import boston_housing from keras import models from keras import layers from keras.utils.np_utils import to_categorical (train_data, train_targets), (test_data, test_targets) = boston_housing.load_data() mean = train_data.mean(...
Python
dlp/ch3_3_boston_housing.py
FiveEye/ml-notebook
mit
1,900
58
codeparrot/github-code
8fa7364956d129e50fd7c6a7a6321d75aa71e8a5493d3f7d9f5d595c5bbb7ced
package net.techcable.srglib.mappings; import java.util.Map; import java.util.Set; import java.util.function.BiConsumer; import java.util.function.UnaryOperator; import javax.annotation.Nullable; import com.google.common.base.MoreObjects; import com.google.common.collect.ImmutableBiMap; import net.techcable.srglib.F...
Java
src/main/java/net/techcable/srglib/mappings/ImmutableMappings.java
ProjectTestificate/SrgLib
mit
7,965
221
codeparrot/github-code
10fe241eaea6cdf91b8edddf3e15744f2e8ae4f2c27aeb5ec40d6ec9b6d0eac7
/* * * RayTrace Software Package, release 1.0.3, July 2003. * * Author: Samuel R. Buss * * Software accompanying the book * 3D Computer Graphics: A Mathematical Introduction with OpenGL, * by S. Buss, Cambridge University Press, 2003. * * Software is "as-is" and carries no warranty. It may be used without...
C++
Volume_10/Number_3/Buss2005/RgbImage.cpp
erich666/jgt-code
mit
10,314
351
codeparrot/github-code
01eca8bface5065c82fd617e3cfc6b3fc2c2d0ed44ba48a42824507f00e50686
package eu.sii.pl; import javax.swing.*; import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentListener; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; /** * */ public class SiiFrame extends JFrame { private JLabel loginLabel; private JTextFie...
Java
workshop/src/eu/sii/pl/SiiFrame.java
p-ja/javabeginner2017
mit
4,015
150
codeparrot/github-code
121def023615af7efac8cbae38636e7b36a591423933dab55aeba2401ab86fdf
{-# LANGUAGE PatternSynonyms #-} -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module JSDOM.Generated.SQLTransactionErrorCallback (newSQLTransactionErrorCallback, newSQLTransactionErrorCallbackSync, ...
Haskell
src/JSDOM/Generated/SQLTransactionErrorCallback.hs
ghcjs/jsaddle-dom
mit
2,755
56
codeparrot/github-code
0cc52887953cf9e6f49ff8539a5eb77f39be3937624780ec90430905f92877de
#!/usr/bin/env python # coding: utf-8 from .interactiveapp import InteractiveApplication, ENCODING class InteractiveLoopApplication(InteractiveApplication): def __init__(self, name, desc, version, padding, margin, suffix, encoding=ENCODING): super(InteractiveLoopApplication, self).__in...
Python
coadlib/loopapp.py
alice1017/coadlib
mit
871
37
codeparrot/github-code
baf042b0e5de2edb2fcc439280f7cd3ba580287acae90e7b332e4e5a6094a674
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>higman-s: Not compatible</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" ...
HTML
clean/Linux-x86_64-4.09.0-2.0.5/extra-dev/dev/higman-s/8.5.0.html
coq-bench/coq-bench.github.io
mit
6,962
165
codeparrot/github-code
c7092593333da2704b7847541e4f9ea450fafe64ee1077cb7344652864d231ed
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>unimath-substitution-systems: Not compatible 👼</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../.....
HTML
clean/Linux-x86_64-4.13.1-2.0.10/released/8.13.0/unimath-substitution-systems/0.1.0.html
coq-bench/coq-bench.github.io
mit
7,012
168
codeparrot/github-code
fec57582d40ffd282e4f3661f95ff3639c4cc9c8aa0f7173cabae90e68d6dc12
package me.lachlanap.dropunit.world /** * An action to perform on the world, an area, a block, or an entity. */ trait Transform { def applyTo(world: World): World = world } case class SpawnEntity(entity: (Id) => Entity) extends Transform { override def applyTo(world: World): World = { new World(world.confi...
Scala
src/main/scala/me/lachlanap/dropunit/world/Transform.scala
thorinii/dropunit
mit
1,040
33
codeparrot/github-code
fda25563f979922cf5b0feed3655ec75e785a48b135267fa0a762d8f834f962e
<html> <head> <title>基础搜索学习</title> <link rel="stylesheet" type="text/css" href="./prism.css"> <link rel="stylesheet" type="text/css" href="./button.css"> <meta charset="utf-8" /> <style> body { font-size: 20px; } .wall, .blink, .visited, ...
HTML
session/show.html
XiaoRr/XiaoRr.github.io
mit
10,410
377
codeparrot/github-code
3a7f79691025889137e2fd92b1dd91b125921a55bf56b25a4e60de966350b176
<?php defined('BASEPATH') OR exit('No direct script access allowed'); /* | ------------------------------------------------------------------------- | URI ROUTING | ------------------------------------------------------------------------- | This file lets you re-map URI requests to specific controller functions. | | T...
PHP
application/config/routes.php
AntonGud/CI
mit
2,425
70
codeparrot/github-code
89c453ad6cc98ea9e6e6cb22cc3b14881b5629e1537dd60e50aa734e304e13f5
<!DOCTYPE html style="height:100%"> <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> <!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> <head>...
HTML
index.html
alfonsofonso/anti
mit
2,792
79
codeparrot/github-code
79c0ed1dc0a0e42ae2eed93be40c06975874884da8bb2026523b77e9a2b54fb6
'use strict'; const async = require('async'); const getApp = require('../utils/utils.js').getApp; module.exports = function(Worker) { //Worker.validatesPresenceOf('title'); Worker.upsertItem = (data, cb) => { let res = {}; getApp(Worker) .then((app) => { if (!!!data.person) cb({errCode: 'ERR...
JavaScript
app/common/models/worker.js
skeiter9/traru
mit
2,093
87
codeparrot/github-code
5e1ebf8d2de735a80176ae4f4f60706638463941a658a0dca14a53854c468254
# coding: utf-8 # # bmp.rb -- a toolkit for bitmap(BMP) image # # Copyright (c) 2014 Yoichi Yokogawa # # This software is released under the MIT License. # http://opensource.org/licenses/mit-license.php # # ※ BMPファイルのファイルフォーマットについては、 # http://www.kk.iij4u.or.jp/~kondo/bmp/ を参考にしました class BitMap def initialize(w...
Ruby
bmp.rb
yoyoichi/bmp-ruby
mit
4,607
195
codeparrot/github-code
be9e4913d48fc92a715b9361599cf70671713ef76b3847cf3fc03a8c3793b622
/** * Copyright (c) 2014, 2017, Oracle and/or its affiliates. * The Universal Permissive License (UPL), Version 1.0 */ "use strict"; /* Copyright 2013 jQuery Foundation and other contributors Released under the MIT license. http://jquery.org/license */ define(["ojs/ojcore","jquery","ojdnd","ojs/ojlistview"],funct...
JavaScript
js/libs/oj/v3.0.0/min/ojlistviewdnd.js
crmouli/crmouli.github.io
mit
12,304
34
codeparrot/github-code
dbdae46678e2ca14fdec40beb7d8be546490885dbdda3a1d2290ed1579a41f1e
// // UIControl+YYAdd.h // YYCategories <https://github.com/ibireme/YYCategories> // // Created by ibireme on 13/4/5. // Copyright (c) 2015 ibireme. // // This source code is licensed under the MIT-style license found in the // LICENSE file in the root directory of this source tree. // #import <UIKit/UIKit.h> N...
C
YYCategoriesStudy/Pods/YYCategories/YYCategories/UIKit/UIControl+YYAdd.h
wangdxnum1/MyOpenSourceCodeStudyAndResearch
mit
2,679
81
codeparrot/github-code
7c256c9226a067c95ea17ab30d02dbdcf24ef366a23e2df08bf8ee41d020ed79
/* eslint-env mocha */ 'use strict' const chai = require('chai') chai.use(require('dirty-chai')) const expect = chai.expect const parallel = require('async/parallel') const createNode = require('./utils/create-node.js') const echo = require('./utils/echo') describe('ping', () => { let nodeA let nodeB before((...
JavaScript
test/ping.node.js
diasdavid/js-libp2p
mit
1,347
62
codeparrot/github-code