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 |
|---|---|---|---|---|---|---|---|---|
8e6a8bbaf203cdeddd5a71ef3dc1779d7ba1ac1562db9dcc675782a394a613bf | /*
* monitor.c - Routines for monitors within the runtime.
*
* Copyright (C) 2003 Southern Storm Software, Pty Ltd.
*
* Authors: Thong Nguyen (tum@veridicus.com)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* t... | C | qca_designer/lib/pnet-0.8.0/engine/monitor.c | jjenki11/blaze-chem-rendering | mit | 6,101 | 301 | codeparrot/github-code |
a266c749d4fe0388405002daba0ce3c05de30aa3028cd0810a4717065a1b8f30 | <HTML><HEAD>
<TITLE>Review for Trouble in Mind (1985)</TITLE>
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/ramr.css">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1 ALIGN="CENTER" CLASS="title"><A HREF="/Title?0090209">Trouble in Mind (1985)</A></H1><H3 ALIGN=CENTER>reviewed by<BR><A HREF="/ReviewsBy?Lon+Pon... | HTML | data science/machine_learning_for_the_web/chapter_4/movie/4380.html | xianjunzhengbackup/code | mit | 4,029 | 68 | codeparrot/github-code |
0561d84174a569b43872fb3e506b796e50b222271e8df4317281e8100c0435c7 | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* vim: set ts=8 sts=4 et sw=4 tw=99:
* 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/. */
... | C | EmbeddedJXcoreEngineIOS/jxcore/include/node/js/Id.h | agenthunt/EmbeddedJXcoreEngineIOS | mit | 5,133 | 196 | codeparrot/github-code |
f8b67c1b9883f44f828a9edc3cb7067c9a5c09349063d3b9c989e70638fd081f | andross = require "andross"
andross.backend = require "andross.love"
dragonBones = require "andross.dragonbones"
function love.load(args)
--mgr = andross.backend.AttachmentManager("media/dude/dude/sprites/")
local attachmentMgr = andross.backend.AtlasAttachmentManager("media/dude/texture/sprites/dude_atlas.png... | Lua | examples/highlevelapi.lua | pfirsich/andross | mit | 3,539 | 116 | codeparrot/github-code |
5923d631e71b0a015a0d49cb71eb211bbda37528f5aa955f73ee1c9ba00ed74b | /* author: dongchangzhang */
/* time: Thu Apr 20 14:48:28 2017 */
#include "symboltablemanager.h"
#include <iostream>
SymbolTableManager::SymbolTableManager()
{
main_table = do_create_new_table(START_INDEX);
cursor = main_table;
}
addr_type SymbolTableManager::install_id(const std::string& id)
{
return sy... | C++ | src/symboltable/symboltablemanager.cpp | dongchangzhang/zcc | mit | 2,245 | 75 | codeparrot/github-code |
4ca3dc07ef8bc30458c9c8392b2f37d8c320da22dea656848897a88e611fc240 | /*
* Decompiled with CFR 0_110.
*/
package edu.stanford.crypto.proof.assets;
import edu.stanford.crypto.ECConstants;
import edu.stanford.crypto.proof.MemoryProof;
import org.bouncycastle.math.ec.ECPoint;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.List;
public class AddressProof
... | Java | src/main/java/edu/stanford/crypto/proof/assets/AddressProof.java | bbuenz/provisions | mit | 5,567 | 141 | codeparrot/github-code |
94c4fbb0a7214b21c638dba391dc67227e6fb459822716a4f31c1f099e3cd727 | function solve(args) {
const module = 1024;
let numbers = args.slice(1).map(Number),
current,
result = 0,
i = 0;
while (true) {
if (i === 0) {
current = numbers[i];
if (numbers.length === 1) {
result = current;
break;
... | JavaScript | JS-Fundamentals/00.ExamPrep/2017-01-19-Variant-2/1.Coki Skoki/cuki.js | zachdimitrov/Learning_2017 | mit | 1,241 | 67 | codeparrot/github-code |
30f17fa4d43131368b77ec75a5ceccae4675f492ab9d4d1ccdc26555fbb4c286 | /**
* Created by chenqx on 8/5/15.
* @hack 添加三角形绘制提交方式
*/
/**
* 以四边形填充
* @constant
* @type {number}
*/
qc.BATCH_QUAD = 0;
/**
* 以三角形填充
* @constant
* @type {number}
*/
qc.BATCH_TRIANGLES = 1;
var oldWebGLSpriteBatchSetContext = PIXI.WebGLSpriteBatch.prototype.setContext;
PIXI.WebGLSpriteBatch.prototype.set... | JavaScript | src/hack/pixi/WebGLSpriteBatch.js | qiciengine/qiciengine-core | mit | 2,908 | 99 | codeparrot/github-code |
fabd31ba266d80ea59226dc33ea9abb6c7eacc253c65daebc55e6275db286ce2 | package com.rogoapp;
import com.rogoapp.auth.RegisterActivity;
import android.app.Activity;
import android.accounts.AccountAuthenticatorActivity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.... | Java | Android/src/com/rogoapp/LoginActivity.java | Nirespire/Rogo | mit | 2,167 | 85 | codeparrot/github-code |
2c409018a255d4b22843e6cea6a314bc01360b1954b312e2f795b52011542e71 | package definiti.native
sealed trait Verification[A] {
final def verify[B <: A](value: B): Validation[B] = validate("", value)
private[native] def validate[B <: A](path: String, value: B): Validation[B]
def andThen(definedVerification: DefinedVerification[A]): Verification[A] = {
new VerificationGroup[A](S... | Scala | src/main/resources/native/Verification.scala | definiti/definiti-scala-model | mit | 3,926 | 117 | codeparrot/github-code |
54a0b97ab7705c4de20aa03221c77682541a94e59f51deb71195e2a80e62b6a1 | package node
import (
"bytes"
"golang.org/x/net/html"
)
// Attr returns attribute of node by given key if any.
func Attr(n *html.Node, key string) (string, bool) {
for _, a := range n.Attr {
if a.Key == key {
return a.Val, true
}
}
return "", false
}
// Children returns slice of nodes where each node is... | GO | node/utils.go | krasoffski/gomill | mit | 920 | 46 | codeparrot/github-code |
c000f60a1a2a40bcf9dd1b30aa91e0e1c8a103a5942db6945882ec845a17ee00 | //
// heligun: 3D flight sim shooter
// Copyright (c) 2016 Joseph Kuziel
//
// This software is MIT licensed.
//
#include "sdlext.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <SDL2/SDL_rwops.h>
#include <SDL2/SDL_error.h>
void sdlextPrintError() {
printf("[SDL] %s\n", SDL_GetError());... | C | sdlext.c | jkuziel/heligun | mit | 1,321 | 77 | codeparrot/github-code |
79fe2a886442b1efbf20a106fd60b63a22401249fb615c1211e1dc7edeb9ac28 | # Copyright (c) 2015 Uber Technologies, Inc.
#
# 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, publ... | Python | tchannel/messages/cancel.py | Willyham/tchannel-python | mit | 1,854 | 49 | codeparrot/github-code |
e3832c8b9c6e61f5d7caf1ff8f6d1d8e586ffcab9fb524f0cf1049fb156d9671 | package com.adben.testdatabuilder.core.analyzers.generators.generator;
import static com.adben.testdatabuilder.core.helper.ReflectionHelper.getClz;
import static java.lang.invoke.MethodHandles.lookup;
import static org.slf4j.LoggerFactory.getLogger;
import com.google.common.base.MoreObjects;
import java.lang.reflect.... | Java | core/src/main/java/com/adben/testdatabuilder/core/analyzers/generators/generator/BooleanGenerator.java | adben002/test-data-builder | mit | 1,657 | 72 | codeparrot/github-code |
c38d00c218ed6c715851c3e5713d3f74a59a438cc292a5e206df1647b7bf59f8 | /**************************************************************************************
Exclusion of Liability for this demo software:
The following software is intended for and must only be used for reference and in an
evaluation laboratory environment. It is provided without charge and is subject to
alterat... | C | examples/sources/SystemPackets.c | Hilscher/netPI-netx-programming-examples | mit | 18,554 | 447 | codeparrot/github-code |
719159be419907f548f422b692908e36151504a343098417d0af8704842b6ffd | <?php
/**
* Created by PhpStorm.
* User: Niels
* Date: 18/10/2014
* Time: 18:00
*/
namespace Repositories;
use Utilities\Utilities;
/**
* The repository contains all methods for interacting with the database for the TalkTag model
*
* Class TalkTagRepository
* @package Repositories
*/
class TalkTagReposito... | PHP | backend/Repositories/TalkTagRepository.php | SNiels/Multi-Mania-app | mit | 1,214 | 48 | codeparrot/github-code |
cbee5f9443e876aed41a0dab37b5c4f011e616af91c400b7f7b27f6875670294 | <?php
/*
* Created on Aug 30, 2007
*
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates
*/
// Page requirements
define('LOGIN_REQUIRED', true);
define('PAGE_ACCESS_LEVEL', 2);
define('PAGE_TYPE', 'ADMIN');
// Set for every page
require ('engine/common.p... | PHP | assignplayerteam.php | klangrud/tcshl | mit | 10,735 | 245 | codeparrot/github-code |
b485a41d19f2bc42d43b88fb322187832da71f11100159fce8d445c59d394fde | # coding: utf-8
import pygame
import os
from color import *
from pygame.locals import *
class Score(pygame.sprite.Sprite):
def __init__(self, score, player, width, height):
super(pygame.sprite.Sprite).__init__(Score)
self.score = int(score)
self.color = None
self.player = player
... | Python | Score.py | Ilphrin/TuxleTriad | mit | 1,523 | 54 | codeparrot/github-code |
4deb6dfdb5ae16f0142d9aeb556c710ae5f62cf5d614c7949a812e37099800b0 | 'use strict';
var matrix = require( 'dstructs-matrix' ),
ekurtosis = require( './../lib' );
var k,
mat,
out,
tmp,
i;
// ----
// Plain arrays...
k = new Array( 10 );
for ( i = 0; i < k.length; i++ ) {
k[ i ] = i;
}
out = ekurtosis( k );
console.log( 'Arrays: %s\n', out );
// ----
// Object arrays (accessors).... | JavaScript | examples/index.js | distributions-io/chisquare-ekurtosis | mit | 1,317 | 84 | codeparrot/github-code |
d3164144f31dfac2a5eb93193417dd501305b9ba57592311b082394e1867b2e9 | from __future__ import unicode_literals
from django.db import models
from django.utils.timezone import now, timedelta
Q = models.Q
class LogisticJob(models.Model):
LOCK_FOR = (
(60*15, '15 minutes'),
(60*30, '30 minutes'),
(60*45, '45 minutes'),
(60*60, '1 hour'),
(60*60*... | Python | gge_proxy_manager/models/jobs.py | mrcrgl/gge-storage | mit | 3,505 | 90 | codeparrot/github-code |
f24f6fc2ec95f3e84068809af22d4eabf180819f367b4d14ce434a639cf306b2 | <?php
/* :informacion:index.html.twig */
class __TwigTemplate_3fe207d07cb2a7021f8181185385f866207e1e1b6e8e118c7b08937099592d8c extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
// line 1
$this->parent = $this->loadTemplate("base.htm... | PHP | app/dev/cache/twig/dc/dcb7e8d84a1e074cd38632b157f2734551f32d9ae88b80d5d5cd4220dc152bad.php | mwveliz/sitio | mit | 13,780 | 266 | codeparrot/github-code |
9a4dd4f0ce440828201436de1f3078d990cb51ce004a0c8036132e5ecf0ae6b9 |
#ifndef tresholdFunctions_h
#define tresholdFunctions_h
namespace Treshold{
// ==== polynom order 0
inline double p0i( double x ){
if ( x < 0 ){ return 0; }
else { return x; }
};
inline double p0( double x ){
if ( x < 0 ){ return 0; }
else { return 1; }
};
// ==== polynom order 1... | C | cpp/common/math/tresholdFunctions.h | ProkopHapala/SimpleSimulationEngine | mit | 5,400 | 194 | codeparrot/github-code |
ad8c6f7afdd37ec7f2b209b89cd4f4a936c378858c86b165fc1a4eff0296ae55 | using System;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Events;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Models.Entities;
using Umbraco.Cms.Core.Notifications;
using Umbraco.Cms.Core.Trees... | C# | src/Umbraco.Web.BackOffice/Trees/TreeControllerBase.cs | JimBobSquarePants/Umbraco-CMS | mit | 15,982 | 382 | codeparrot/github-code |
119902a82ce1f9538676287ac8a54fb3ee1138540ba2417e6021cec0b7a37b7b | 'use strict';
angular.module('com.module.sandbox')
.controller('DatepickerDemoCtrl', function ($scope) {
$scope.today = function () {
$scope.dt = new Date();
};
$scope.today();
$scope.clear = function () {
$scope.dt = null;
};
$scope.disabled = function (date, mode) {
... | JavaScript | client/app/modules/sandbox/controllers/sandbox.datepickerdemo.ctrl.js | drmikecrowe/loopback-angular-admin | mit | 917 | 36 | codeparrot/github-code |
30c72fd14bcb53616050ccd5fb3cb8fbf9c36ef62f9ee15e2d44d77d01054e2c | #define ConcurrentHandles
#define WARN_VOB
//#define INFO_VOB
#define TRACE_VOB
using System;
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LionFire.Collections;
using LionFire.DependencyInjection;
using LionFi... | C# | src/LionFire.Vos/Vob/Vob.cs | lionfire/Core | mit | 23,104 | 664 | codeparrot/github-code |
0c3eeb25a30a7ec60b8285091aa207278dd69d06e71bfdbd9ba2073f5564ba0d | import Ember from 'ember';
const { computed } = Ember;
let IronSelector = Ember.Component.extend({
attributeBindings: [
'selected',
'role',
'attrForSelected',
'multi'
],
selectedItem: computed({
get() {},
set(key, value) {
let items = this.get('items');
let idx = -1;
... | JavaScript | addon/components/iron-selector.js | dunnkers/ember-polymer-paper | mit | 1,701 | 80 | codeparrot/github-code |
28f2427e5831457dbd9e9fa5ecdefec47ad520dfbe766fe80589c2fe5ea97cf2 | """Parse ISI journal abbreviations website."""
# Copyright (c) 2012 Andrew Dawson
#
# 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 righ... | Python | lib/parser.py | ajdawson/jabr | mit | 2,590 | 70 | codeparrot/github-code |
967d8f827e1fe6b7fe6f52485e9cd9b03a6a188d123d3be2e0a46cadaed75c2b | package kata.calc
import scala.annotation.tailrec
trait AlgebraicList[T] {
def ::(value: T): AlgebraicList[T] = new NonEmptyList[T](Some(value), Some(this), size + 1)
def apply(index: Int): Option[T] = {
@tailrec
def find(index: Int, list: Option[AlgebraicList[T]]): Option[T] = {
... | Scala | old-katas/list-kata/day-5/src/main/scala/kata/calc/AlgebraicList.scala | Alex-Diez/Scala-TDD-Katas | mit | 1,694 | 69 | codeparrot/github-code |
a2dd6239998468631aeb5f29b4c85207504f6b61492f7fa872eb975ac4f4ad77 | /*
Spot arbitrage oportunities in Forex market.
--
Cássio Jandir Pagnoncelli
kimble9t@gmail.com
*/
#include <stdio.h>
#include <stdlib.h>
/*------------------------------------------------------------------------------
--- Estruturas. ---------------------------------------------------------------
---------... | C | arbitrage/sequencial/arbitragem.c | cassiopagnoncelli/hedge-project | mit | 11,246 | 516 | codeparrot/github-code |
b8b23a460ff598c104bc1788224552fb4e06a8a6b817f71423e285a57ea3b50a | <?php
namespace Mascame\Artificer\Fields;
use Mascame\Artificer\Artificer;
class Field extends AbstractField implements FieldInterface
{
use Filterable,
HasHooks,
HasWidgets;
/**
* Field constructor.
* @param $type
* @param $name
* @param array $options
*/
public... | PHP | src/Fields/Field.php | marcmascarell/artificer | mit | 3,046 | 143 | codeparrot/github-code |
8b8b2e9e05bc56b06d02ca976545f530cad48fc64f2fc5e8542b838a50efa209 | var Component = new Brick.Component();
Component.requires = {
mod: [
{name: '{C#MODNAME}', files: ['mail.js']}
]
};
Component.entryPoint = function(NS){
var Y = Brick.YUI,
COMPONENT = this,
SYS = Brick.mod.sys;
NS.MailTestWidget = Y.Base.create('MailTestWidget', SYS.AppWidget, ... | JavaScript | src/js/mailTest.js | abricos/abricos-mod-notify | mit | 1,659 | 63 | codeparrot/github-code |
0ae41c7f57186e0d508f98125b93c5bd4b64c51c72b2670b065b03dc745da2dd | import React, { Component, ComponentType } from 'react'
import { getBoundsForNode, TComputedBounds, TGetBoundsForNodeArgs } from './utils'
import { TSelectableItemState, TSelectableItemProps } from './Selectable.types'
import { SelectableGroupContext } from './SelectableGroup.context'
type TAddedProps = Partial<Pick<... | TypeScript | src/CreateSelectable.tsx | valerybugakov/react-selectable-fast | mit | 1,421 | 51 | codeparrot/github-code |
759a362a77c4cb76915632e7f5c9dc9b7ac25d1ef3aa318414be5e79900e7320 | /*
var jsonfile = require('jsonfile');
var file = '../data1.json';
var tasksController = require('../public/js/tasks.js');
jsonfile.writeFile(file,data1);
*/
// var User = require('../public/js/mongoUser.js');
var Task = require('../public/js/mongoTasks.js');
var MongoClient = require('mongodb').MongoClient, format = ... | JavaScript | routes/tasks.js | odangitsdjang/CleaningApp | mit | 4,170 | 139 | codeparrot/github-code |
968d43e9835a374ef542ff84abea2c3a5ef85ee4fda34ae0b078945ea9733b0d | import glob
import os
import pandas as pd
class CTD(object):
"""docstring for CTD"""
def __init__(self):
self.format_l = []
self.td_l = []
self.iternum = 0
self.formatname = ""
def feature(self,index):
format_l = self.format_l
feature = ((float(format_l[inde... | Python | hw4_predictData/creatPredictdata.py | wy36101299/NCKU_Machine-Learning-and-Bioinformatics | mit | 2,986 | 87 | codeparrot/github-code |
f600b47da1e5a5295ff8389331dae0e9831748f32b6b3defde3637623a107e1a | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="https://ajax.googleapis.com/ajax/lib... | HTML | agendadulibre/static/fonts/Raleway/raleway_light_macroman/Raleway-Light-demo.html | toulibre/agendadulibreshow | mit | 24,061 | 365 | codeparrot/github-code |
60510edd06e9738ffd79de156240f9ecaa8e3f135c49f6d8fa6706d617b0d56e | using System;
using System.IO;
namespace Day2
{
class Program
{
static string puzzleInput = File.ReadAllText("puzzleInput.txt");
static int[,] KeyPad = new int[3, 3] { {1,2,3} ,
{4,5,6} ,
{7,8,9} }... | C# | AdventOfCode/Day2/Program.cs | fredrikljung93/AdventOfCode2016 | mit | 3,233 | 102 | codeparrot/github-code |
489fc90934a839254d5e95b6b8e44b985ad6d2bfff5b329088fbd9424bc44575 | <?php
namespace Maidmaid\WebotBundle\Event;
use GuzzleHttp\Message\Response;
use NumberPlate\AbstractSearcherSubscriber;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\EventDispatcher\Event;
use Symfony\Component\EventDispatcher\GenericE... | PHP | src/Maidmaid/WebotBundle/Event/SearcherSubscriber.php | maidmaid/webot | mit | 1,795 | 63 | codeparrot/github-code |
9bc065bb48f8d11812983abbc5dce8f60837b4ccabb260f33f03eb8ae758df96 | /* ========================================
ID: mathema6
TASK:
LANG: C++14
* File Name : A.cpp
* Creation Date : 10-04-2021
* Last Modified : Tue 13 Apr 2021 11:12:59 PM CEST
* Created By : Karel Ha <mathemage@gmail.com>
* URL : https://codingcompetitions.withgoogle.com/codejam/round/00000000... | C++ | gcodejam/2021/round-1A/A/A.cpp | mathemage/CompetitiveProgramming | mit | 5,478 | 228 | codeparrot/github-code |
bd43a99903f9d65aa8a3ad5125e832f4e8c87fca8ffd2b2afa8363eeac8466fa | #ifndef _EZ_DRAW_PROTOTYPES_
#define _EZ_DRAW_PROTOTYPES_
#include "EzDraw.h"
#ifdef __cplusplus
extern "C"
{
#endif
typedef struct tag_ezdFunctions
{
HINSTANCE hInst;
EZDBOOL (EZDCDECL* ezdInitialize)(void);
void (EZDCDECL* ezdCleanUp)(void);
EZDHANDLE (EZDCDECL* ezdDrawLine)(EZDFLOAT fX1,... | C | ftsoftds_vc6/include/ezdproto.h | guarana-x/fwg | mit | 1,086 | 34 | codeparrot/github-code |
6d15dfd7c2d5d361613c310bf620200f67a0049b666c7fd56f8aa90a42b6f00a | import React, { useState } from 'react';
import { registerComponent, Components } from '../../../lib/vulcan-lib';
import MoreVertIcon from '@material-ui/icons/MoreVert';
import Menu from '@material-ui/core/Menu';
import { useCurrentUser } from '../../common/withUser';
import { useTracking } from "../../../lib/analytics... | TypeScript | packages/lesswrong/components/comments/CommentsItem/CommentsMenu.tsx | Discordius/Telescope | mit | 2,151 | 77 | codeparrot/github-code |
58ecf71c9c053726bc6e2f307b50f1a645b0b21ecc246f510a5c9b10b8a52e0c | 'use strict';
const Joi = require('joi');
const uuid = require('uuid');
const reqUtils = require('../utils/requestUtils');
const R = require('ramda');
//fixme: allow unknown fields and just require absolutely mandatory ones
const cucumberSchema = Joi.array().items(Joi.object().keys({
id: Joi.string().required(),
... | JavaScript | app/routes/cucumber-upload.js | dclucas/metrics-tracker | mit | 2,541 | 75 | codeparrot/github-code |
f534ed073951586102c0ff0732905d19d1174cc0bccda3bfe637fb6ece874c9a | import { Registration } from "./Models";
export class Container {
private registrations: Array<Registration> = [];
private createInstance<T extends object>(classType: {new (): T} | Function): T {
return Reflect.construct(classType, []);
}
private isItemRegistered(item: any) : boolean {
... | TypeScript | src/Container.ts | dunnweb/tinjector | mit | 2,388 | 45 | codeparrot/github-code |
5e7f540d23c97582dc6ff23dea6d16822914933dcc157fd00231de481334a308 | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Bundler.Infrastructure;
using Bundler.Infrastructure.Server;
namespace Bundler.Sources {
public class StreamSource : ISource {
public const string Tag = nameof(StreamSource);
private readonly string[] _virtu... | C# | Bundler/Sources/StreamSource.cs | irii/Bundler | mit | 2,413 | 67 | codeparrot/github-code |
2d8a23da8a855d7309d08ae05c8f5a05bf3d0fb79e03476e4d136f2f4ac57b9b | /*
* The MIT License
*
* Copyright 2015 Sanket K.
*
* 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... | Java | sortingExamples/src/sortingexamples/SortingExamples.java | hckrtst/TIJ | mit | 6,022 | 197 | codeparrot/github-code |
44744f38387ec7df0b24050be4b6cfa2a946ae8b56dd67ddea3850c2aeed8be5 | #!/usr/bin/env python
# A Raspberry Pi GPIO based relay device
import RPi.GPIO as GPIO
from common.adafruit.Adafruit_MCP230xx.Adafruit_MCP230xx import Adafruit_MCP230XX
class Relay(object):
_mcp23017_chip = {} # Conceivably, we could have up to 8 of these as there are a possibility of 8 MCP chips on a bus.
... | Python | common/relay.py | mecworks/garden_pi | mit | 2,522 | 94 | codeparrot/github-code |
16218ddf3613ea11e3e02a47fe07f2a157944f3eab3ac755bc2a62c0b859ea71 | var accessToken="i7LM4k7JcSKs4ucCpxpgNPcs3i1kRbNKyUE8aPGKZzZWASagz9uZiuLgmgDgBJzY";
$(window).load(function() {
$('#pseudo_submit').click(function() {
NProgress.start();
$.ajax({
type: "POST",
url: "../db-app/signdown.php",
dataType: 'text',
data: ... | JavaScript | dashboard/whenhub_api/delete.js | mehamasum/ElegantResume | mit | 1,625 | 62 | codeparrot/github-code |
c37e1368e2231e5150f23bf2a2875255fd42fb13542c819e9c584f740d995f71 | package net.glowstone.io.entity;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.UUID;
import java.util.stream.Collectors;
import net.glowstone.entity.AttributeManager... | Java | src/main/java/net/glowstone/io/entity/LivingEntityStore.java | GlowstoneMC/GlowstonePlusPlus | mit | 13,397 | 308 | codeparrot/github-code |
9ed7a33d908236963590d2ed527ca690e1b1a54e26109a448b2cba9532ea54f5 | /***********************************************************************
Copyright (c) 2008, 2009, Memo Akten, www.memo.tv, Douglas Edric Stanley, www.abstractmachine.net
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the ... | C | addons/ofxiPhone/src/ofxiPhoneMapKit.h | HellicarAndLewis/ProjectDonk | mit | 5,676 | 152 | codeparrot/github-code |
2ecf311c71742b8c72806635f803477d05a6e49ded9f1e4811ba53862dcf942f | // -----------------------------------------------------------------------
// <copyright file="BasePartnerComponent{TContext}.java" company="Microsoft">
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
// -----------------------------------------------------------------------
package ... | Java | PartnerSdk/src/main/java/com/microsoft/store/partnercenter/BasePartnerComponent.java | iogav/Partner-Center-Java-SDK | mit | 1,795 | 66 | codeparrot/github-code |
378310e03536ee5661cb91e32eaf1cb2883270707b249a1d059192b9bafea524 | /****************************************************************************
* ¹¦ ÄÜ£ºÒôƵÎļþ²Ù×÷Àà *
* Ìí ¼Ó ÈË£ºÐ¡¿É *
* Ìí¼Óʱ¼ä£º2015.01.17 12£º27 *
* °... | C++ | MusicPlayer/MusicOperat.cpp | wugh7125/ui | mit | 3,575 | 157 | codeparrot/github-code |
00aae962c74407a22b5512cc6b2388fcdbf28bbe4b6431738a1959d23097897d | // Copyright (c) 2017-2018 The DigiByte Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef DIGIBYTE_INDEX_TXINDEX_H
#define DIGIBYTE_INDEX_TXINDEX_H
#include <chain.h>
#include <index/base.h>
#include <txdb... | C | src/index/txindex.h | digibyte/digibyte | mit | 1,792 | 55 | codeparrot/github-code |
cf84b5f5759abb35ecf9f7fbd465e5b6a674dbae9a6b86587e312040d248ba1b | /****************************************************************************
** Meta object code from reading C++ file 'cookiejar.h'
**
** Created: Fri May 7 07:20:45 2010
** by: The Qt Meta Object Compiler version 62 (Qt 4.6.2)
**
** WARNING! All changes made in this file will be lost!
*******************... | C++ | Qt/browser/debug/moc_cookiejar.cpp | misizeji/StudyNote_201308 | mit | 12,240 | 383 | codeparrot/github-code |
3b5d5a8aad7e18e6ed3b061604ddaed10aa63434434ea0392448b89761e13f45 | <?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright © 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: user_sig_include.php
| Author: Digitanium
+----------------------------------... | PHP | includes/user_fields/user_sig_include.php | simplyianm/clububer | mit | 1,717 | 35 | codeparrot/github-code |
c7e1aa4866b6811b03e948c1fb3183467e05c9aff2aac008ac616a62e27225ec | <?php
/**
* The MIT License (MIT)
*
* Copyright 2015 Anatoliy Bereznyak
*
* 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
... | PHP | src/Workers/Worker.php | Bezk/Workers | mit | 44,963 | 1,615 | codeparrot/github-code |
ef67513fc602c5d2ec53c884bf67ce573a50d68424176547ed4e5ab225c31e06 | #ifndef _EASYEDITOR_SHAPES_CONTAINER_H_
#define _EASYEDITOR_SHAPES_CONTAINER_H_
#include "DataContainer.h"
#include "ObjectVector.h"
#include "Shape.h"
namespace ee
{
class ShapesContainer : public DataContainer<ee::Shape>
{
public:
virtual ~ShapesContainer();
//
// DataContainer interface
//
virtual void Trav... | C | easyeditor/include/ee/ShapesContainer.h | xzrunner/easyeditor | mit | 994 | 35 | codeparrot/github-code |
9b4f9036d5bf2c9100e9d6f00077ac81fda12f0e62cf93a8c59386fda1671459 | // Copyright Sigurdur Gunnarsson. All Rights Reserved.
// Licensed under the MIT License. See LICENSE file in the project root for full license information.
// Example cylinder mesh
#pragma once
#include "CoreMinimal.h"
#include "RuntimeMeshActor.h"
#include "SimpleCylinderActor.generated.h"
UCLASS()
class PROCEDU... | C | Plugins/ProceduralMeshes/Source/ProceduralMeshes/Public/SimpleCylinderActor.h | SiggiG/ProceduralMeshDemos | mit | 2,119 | 65 | codeparrot/github-code |
1ec350a39bbf887602f386253753cb1e13a0fb3acc3d3433cfde0263db67ce3e | var UI = require('ui');
var ajax = require('ajax');
var Vector2 = require('vector2');
var webserver = decodeURIComponent(localStorage.getItem('webserver') ? localStorage.getItem('webserver') : 'webserver');
var qvserver = localStorage.getItem('qvserver') ? localStorage.getItem('qvserver') : 'qvserver';
var files = l... | JavaScript | QMSAPIStarter/pebbleapp/src/app.js | countnazgul/QlikviewToPebble | mit | 3,891 | 148 | codeparrot/github-code |
362bb8ad57b0cb75d142895f17f707e72676e7d2669d7f7bd6ad2cae593d40a3 | package net.nextpulse.jadmin.dao;
import com.google.common.base.Joiner;
import net.nextpulse.jadmin.ColumnDefinition;
import net.nextpulse.jadmin.FormPostEntry;
import org.apache.commons.dbutils.BasicRowProcessor;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apach... | Java | src/main/java/net/nextpulse/jadmin/dao/GenericSQLDAO.java | yholkamp/jadmin | mit | 12,211 | 288 | codeparrot/github-code |
3b4da14dcde97e26d7445713b76f87feb58778c742079bf15eb07e903740cb62 | goog.provide('ol.DeviceOrientation');
goog.provide('ol.DeviceOrientationProperty');
goog.require('goog.events');
goog.require('goog.math');
goog.require('ol.Object');
goog.require('ol.has');
/**
* @enum {string}
*/
ol.DeviceOrientationProperty = {
ALPHA: 'alpha',
BETA: 'beta',
GAMMA: 'gamma',
... | JavaScript | js/v3.0.0/ol/ol/deviceorientation.js | Koriyama-City/papamama | mit | 8,345 | 251 | codeparrot/github-code |
62476c0a6d2ab4c414d0c967b0ed9228a7ae8cd03328e3cc95c41beeb25c8aeb | package moltin.example_moltin.activities;
import android.content.Context;
import android.content.Intent;
import android.graphics.Point;
import android.graphics.Typeface;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.support.v7.app.ActionBar;
import android.view.Display;... | Java | app/src/main/java/moltin/example_moltin/activities/CollectionActivity.java | moltin/android-example | mit | 14,543 | 399 | codeparrot/github-code |
c2337dcb51068af794decaa28c16ef641ba78fa44e78ac0bdc8cdfbf6819ed87 | //---------------------------------------------------------------------------
//
// <copyright file="CanExecuteChangedEventManager.cs" company="Microsoft">
// Copyright (C) Microsoft Corporation. All rights reserved.
// </copyright>
//
// Description: Manager for the CanExecuteChanged event in the "weak event liste... | C# | Cache/Libs/net46/wpf/src/Core/CSharp/System/Windows/Input/Command/CanExecuteChangedEventManager.cs | mind0n/hive | mit | 18,139 | 481 | codeparrot/github-code |
6dc3ebd216f5cb0950916f7d50302e47f71bdd496cc63b24984cdf0456fb154a | /*
Revise Listing 3.8, Lottery.java, to generate a lottery of a three-digit
number. The program prompts the user to enter a three-digit number and
determines whether the user wins according to the following rules:
1. If the user input matches the lottery number in the exact order, the
award is $10,000.
2. ... | Java | 03/E3_15/E3_15.java | maxalthoff/intro-to-java-exercises | mit | 2,006 | 59 | codeparrot/github-code |
a0326f0e213a8e334052033a7e1a1382f8c8aeb3868d207cd477ee12a4a83371 | module Keisan
module Functions
class ExpressionFunction < Function
attr_reader :arguments, :expression
def initialize(name, arguments, expression, transient_definitions)
super(name, arguments.count)
if expression.is_a?(::String)
@expression = AST::parse(expression)
e... | Ruby | lib/keisan/functions/expression_function.rb | project-eutopia/keisan | mit | 3,851 | 121 | codeparrot/github-code |
fee268bba7d4b791694c73e1b3cb811b2a41533a6d75e77372d6ceb5c3b92839 | <?php
/**
* Get Partial
* Get and render a partial template file.
*
* @since 1.0.0
*
* $part: (string) name of the partial, relative to
* the _templates/partials directory.
*/
function get_partial( $part ) {
# Get theme object
global $_theme;
return $_theme->get_partial($part);
}
/**
* Get Head... | PHP | _includes/core/functions/theme.php | chrismademe/ga | mit | 2,362 | 143 | codeparrot/github-code |
e5b8c397fb785e0d851cb9a19ddf3cb958d1787d3024f0bc21ee2258e8714f14 | var app = require('app'); // Module to control application life.
var BrowserWindow = require('browser-window'); // Module to create native browser window.
// Report crashes to our server.
require('crash-reporter').start();
// Keep a global reference of the window object, if you don't, the window will
// be closed a... | JavaScript | main.js | KillerCodeMonkey/angularjs-electron-app | mit | 1,497 | 44 | codeparrot/github-code |
1255c9df3edcb7c67303838cb2b46a3e96e25b3806f01b271e1b99ae26882bc2 | using System.Collections.Generic;
using System.Linq;
using ThoughtWorks.ConferenceTrackManager.Models;
namespace ThoughtWorks.ConferenceTrackManager.App
{
public interface ITalkDistributor
{
bool DistributeTalksAcrossSessions(IList<IConferenceSession> sessions, IList<ITalk> allTalks);
}
publi... | C# | src/ThoughtWorks.ConferenceTrackManager/App/TalkDistributor.cs | EvanPalmer/TWConferenceTrackManager | mit | 1,408 | 42 | codeparrot/github-code |
4fbc7187f0612d6d6a2beb191b19f8aeca3d6c739c6de6e562d9f3e2dc877218 | #ifndef DW_RAYTRACER_RAY_H
#define DW_RAYTRACER_RAY_H
#include "Vector3.h"
namespace raytracer {
class Ray
{
public:
inline Ray() { }
inline Ray(const Vector3& rOrigin, const Vector3& rDirection)
{
setOrigin(rOrigin);
setDirection(rDirection);
}
inline Vector3 pointAtParameter(... | C | include/Ray.h | DonaldWhyte/raytracer-experiments | mit | 1,637 | 73 | codeparrot/github-code |
a8f3d4872c30c921d258ca6b96143c21b7ac5d8e6f20f90a5ff92926d8f53ea2 | import React from 'react';
import styled from 'styled-components';
import Item from './Item';
import parchment from '../assets/parchment.png';
import chest from '../assets/chest.png';
const Container = styled.div`
background: url(${parchment});
position: relative;
height: 286px;
width: 303px;
align-self: center;... | JavaScript | src/components/Clue.js | FakeYou/treasure-trails | mit | 946 | 50 | codeparrot/github-code |
9766bcacb93cf1dd082558133f747b1e49f1591ffed680139d08441c8b6d81da | /*=========================================================================
Program: Visualization Toolkit
Module: vtkCellTypes.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This softw... | C | IMU/VTK-6.2.0/Common/DataModel/vtkCellTypes.h | timkrentz/SunTracker | mit | 5,974 | 170 | codeparrot/github-code |
d66b646a1f0be09be665f1afc69325cbcac5c0a16ec874a6626c6fd347deb95c | /*
cryptr is a simple aes-256-gcm encrypt and decrypt module for node.js
Copyright (c) 2014 Maurice Butler
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 l... | JavaScript | src/shared/lib/cryptr.js | xtremespb/zoia | mit | 2,906 | 71 | codeparrot/github-code |
5c2fb8611d4f8384fc3053c82cc106e95e1e083c8bc88d3b3dd62d52b3bfe13e | 'use strict';
/* global Parse */
angular.module('main').factory('ParseFile', function ($q) {
return {
upload: function (base64) {
var defer = $q.defer();
var parseFile = new Parse.File('image.jpg', { base64: base64 });
parseFile.save({
success: function (savedFile) {
defer.... | JavaScript | app/main/services/ParseFileService.js | CONDACORE/fahndo-app | mit | 836 | 42 | codeparrot/github-code |
0d47dba8e346cb222cc66892648a85adf1d2edb060d5e52d4c54216f1b3002f5 | package com.sparta.is.entity.driveables.types;
import java.util.ArrayList;
import java.util.HashMap;
public class TypeFile
{
public EnumType type;
public String name, contentPack;
public ArrayList<String> lines;
public static HashMap<EnumType, ArrayList<TypeFile>> files;
private int readerPosition... | Java | src/main/java/com/sparta/is/entity/driveables/types/TypeFile.java | Alex-BusNet/InfiniteStratos | mit | 1,134 | 51 | codeparrot/github-code |
b4416d60202cba5bd96e0c8133c4e0ad1145b91deb087c5210ad70f4be54cda4 | import {
Component, Input,
ContentChild, ViewChildren, QueryList
} from 'angular2/core';
import template from './card-list.html!text';
import { CardHeader } from './header/card-header';
import { CardBody } from './body/card-body';
import { Card } from './card/card';
export { CardHeader, CardBody };
@Component({
... | TypeScript | components/card-list/card-list.ts | SonofNun15/conf-template-components | mit | 651 | 36 | codeparrot/github-code |
30f8b8cfff1c8ed5bff053f0ede3ea7d012cab65f984e0f52c9c8778c90e203a | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Dictionnaire: Pages... | HTML | doc/html/pages.html | Giraudux/cpp-collections | mit | 4,859 | 97 | codeparrot/github-code |
9222054c48e0c384df8b74ee95da60e72ab578f338a43dd32a765d7cd3ba72e6 | // Type definitions for react-particles-js v3.0.0
// Project: https://github.com/wufe/react-particles-js
// Definitions by: Simone Bembi <https://github.com/wufe>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="react" />
import { ComponentClass } from "react";
import { Containe... | TypeScript | index.d.ts | Wufe/react-particles-js | mit | 989 | 32 | codeparrot/github-code |
09e97492c7ccf897a6d902211af7b1d8c138cf6ff52f0ae0ffd144929ffb97c2 | <?php
class Email extends CI_Controller
{
public function __construct()
{
parent:: __construct();
$this->load->database();
$this->load->model('Emailinfo');
$this->load->library(array('session','form_validation'));
$this->load->helper(array('form','url','date'));
}
public function index()
{
$data['email... | PHP | application/controllers/Email.php | lyuyue/DBproject | mit | 2,612 | 98 | codeparrot/github-code |
d772656924da793f65f0431d97897bf259eb39b5bd37e83c802b4157bd0fd1d1 | //
// System.Configuration.NameValueConfigurationCollection.cs
//
// Authors:
// Chris Toshok (toshok@ximian.com)
//
// 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, in... | C# | src/System.Configuration/System.Configuration/NameValueConfigurationCollection.cs | gboucher90/system-configuration-netcore | mit | 3,087 | 92 | codeparrot/github-code |
452d0abbd63d4a5f83ebf9700f2e31ff8eb9505bd2dd08cf151dd74b949b87a6 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>cfml: Error 🔥</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel="style... | HTML | clean/Linux-x86_64-4.04.2-2.0.5/released/8.6/cfml/20180525.html | coq-bench/coq-bench.github.io | mit | 27,746 | 409 | codeparrot/github-code |
cc4e77fca66109034805a42951469cd8c33d2beb47707124ec6d219771dc0ead | /**
* Created by XD on 2016/7/24.
*/
export enum DeleteEnum{
//未删除
NotDel=0,
//已删除
IsDel=1
}
export function getDeleteEnumDisplayName(deleteEnum:DeleteEnum){
return {
[DeleteEnum.IsDel]:'已删',
[DeleteEnum.NotDel]:'未删'
}[deleteEnum]
}
export enum CheckEnum
{
/// <summary>
... | TypeScript | client/src/utils/EnumTool.ts | duanguang/react-node-cms | mit | 996 | 74 | codeparrot/github-code |
70fe00f26be4c9b5901ae38ec55483c786e58055baaa3cc8c4ce1305f1c92753 | //数据的视觉映射
// 数据可视化是 数据 到 视觉元素 的映射过程(这个过程也可称为视觉编码,视觉元素也可称为视觉通道)。
// data ----> graph
//使用visualmap提供通用的视觉映射 visualmap 属性有 1.图形类别symbol 2.图像大小symbolSize 3.颜色color 4.透明度opacity 5.颜色透明度 colorAlpha
// 6.颜色明暗度colorLightness 7.颜色饱和度colorSturaction 8.色调colorHue
//数据和维度
// 引入 ECharts 主模块
var echarts = require('echarts/lib/e... | JavaScript | examples/echarts/dragdemo.js | wx11055/learn-js-webpack | mit | 3,623 | 121 | codeparrot/github-code |
a2ddc845e7d7f6cc71421290598242d9a854cf8220019bfdfeb8e94c0c62988e | /**
* Created by tkachenko on 14.04.15.
*/
ATF.invoke(['$directiveProvider', 'utils', 'jQuery'], function ($directiveProvider, utils, $) {
$directiveProvider.register('$On', {
link: function (name, $el, scope, args, vars) {
var __vars = vars||{};
if (!args[0] || !args[1]) {
... | JavaScript | src/annotations/on.js | andreytkachenko/atframework | mit | 1,070 | 39 | codeparrot/github-code |
2791bcb28900116703f80767de852c2d5d7ae62ee5b810dd6f9fcd5ffb653d92 | //! Writes audio samples to files. (Reads too, this module needs a rename)
//!
//! ### Audacity PCM import settings
//!
//! * File > Import > Raw Data...
//! * Signed 16-bit PCM
//! * Little-endian
//! * 1 Channel (Mono)
//! * Sample rate: 44_100Hz (or whatever your samples generated have)
use std::fs::OpenOptions;
us... | Rust | src/writer.rs | gyng/synthrs | mit | 11,805 | 349 | codeparrot/github-code |
d5c84c4191a731e640e0aacc0ab7557134ed2ae6291a7118559b677fc44a0027 | import Constants from '../constants';
import LinkDrawable from './link';
import SphericalPortalLinkMesh from '../mesh/spherical-portal-link';
/**
* Represents a portal link that follows the surface of a sphere.
*
* Hooray for custom shaders, etc!
*/
class SphericalPortalLinkDrawable extends LinkDrawable {
/**
... | JavaScript | src/drawable/spherical-portal-link.js | evshiron/ingress-model-viewer | mit | 1,728 | 57 | codeparrot/github-code |
63eb91e3c59368f0ffbc11765ad4700c39288fa73913108f27b0f0cf03d880ab | <link rel="import" href="../bower_components/polymer/polymer.html">
<link rel="import" href="../bower_components/core-pages/core-pages.html">
<link rel="import" href="../bower_components/paper-button/paper-button.html">
<link rel="import" href="../bower_components/facebook-login/facebook-login.html">
<!--<link rel="im... | HTML | src/claimed-app.html | call-a3/claimed | mit | 2,882 | 80 | codeparrot/github-code |
decd60f41edbd6588521ab1ef727ee906d9db914414f9d355b18d2e95c94e58d | using System;
using System.Collections.Generic;
using Unit = System.ValueTuple;
namespace LaYumba.Functional
{
using System.Threading.Tasks;
using static F;
public static partial class F
{
public static Option<T> Some<T>(T value) => new Option.Some<T>(value); // wrap the given value into a Some
... | C# | LaYumba.Functional/Option.cs | la-yumba/functional-csharp-code | mit | 7,597 | 226 | codeparrot/github-code |
1a9ce818e9b45fd896665b63f179509794338e912872148a8906aac2dde22a55 | import pandas as pd
import numpy as np
from sklearn.model_selection import train_test_split
from sklearn import tree
from subprocess import call
# https://archive.ics.uci.edu/ml/machine-learning-databases/mushroom/agaricus-lepiota.names
#
# TODO: Load up the mushroom dataset into dataframe 'X'
# Verify you did it ... | Python | Module6/assignment5.py | Wittlich/DAT210x-Python | mit | 2,871 | 70 | codeparrot/github-code |
7f5062d1b013a213f836b8888d9a5099588e7fdf469710d493fcee0002ed3f15 | /**
* @fileOverview js-itm: a Javascript library for converting between Israel Transverse Mercator (ITM) and GPS (WGS84) coordinates.<p>
* <a href="http://code.google.com/p/js-itm/">http://code.google.com/p/js-itm/</a>
* @author Udi Oron (udioron at g mail dot com)
* @author forked from <a href="http://www.nearby.o... | JavaScript | app/js-itm.js | YanivNoema/Final-Project2 | mit | 17,913 | 558 | codeparrot/github-code |
6713472e6e5d956121018a04819b48a21bf8b6dd9be37c4e8a611f5361b9619c | var models = require('../models');
var Message = models.Message;
var User = require('../proxy').User;
var messageProxy = require('../proxy/message');
var mail = require('./mail');
exports.sendReplyMessage = function (master_id, author_id, topic_id, reply_id) {
var message = new Message();
message.type = 'reply';
... | JavaScript | services/message.js | tianyisheng/icardyou | mit | 2,869 | 99 | codeparrot/github-code |
3f0bd2836170df12d4ac9487c7a12668b42fc84ebf330623dc4951f211ead82c | using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using CppSharp.AST;
using CppSharp.AST.Extensions;
using CppSharp.Types;
using ParserTargetInfo = CppSharp.Parser.ParserTargetInfo;
using Type = CppSharp.AST.Type;
namespace CppSharp.Generators.CSharp
{
... | C# | src/Generator/Generators/CSharp/CSharpTypePrinter.cs | zillemarco/CppSharp | mit | 30,404 | 804 | codeparrot/github-code |
7389377c8e857db9354cb72e161e2d0e2927223e983c12f5155c9d4b7d7e280d | import Services from '../src/lib/services';
const _ = require('lodash');
require('db-migrate-mysql');
const expect = require('unexpected');
const request = require('./request.func');
let rds;
class Email {
// eslint-disable-next-line
sendHtml() {
return Promise.resolve();
}
}
class Slack {
// eslint-dis... | JavaScript | test/services.func.js | keboola/developer-portal | mit | 2,387 | 89 | codeparrot/github-code |
911c9f607471641048f0579df7139ba0bfe533358619f84fb699d221ba6a3e4f | using Pliant.Captures;
using Pliant.Diagnostics;
using Pliant.Utilities;
namespace Pliant.Languages.Pdl
{
public class PdlQualifiedIdentifier : PdlNode
{
private readonly int _hashCode;
public ICapture<char> Identifier { get; private set; }
public PdlQualifiedIdentifier(string identi... | C# | libraries/Pliant/Languages/Pdl/PdlQualifiedIdentifier.cs | patrickhuber/Pliant | mit | 3,009 | 94 | codeparrot/github-code |
201d79435f19cc0be435e67597e4f4d1dde33a8c10c1a6f1e00fc5500861f110 | import { Injectable } from '@angular/core';
import { Router} from '@angular/router';
import { Store, ActionReducer, Action} from '@ngrx/store';
import { Observable } from 'rxjs/Rx';
const initSearchContext: any = {
q: null,
i: 1,
n: 100,
sortId: 0
};
export const searchContext: ActionReducer<any> = (state: an... | TypeScript | src/client/app/shared/services/search-context.service.ts | jimmybillings/wazee | mit | 2,120 | 78 | codeparrot/github-code |
92da2e1e031646b796664c9e37f59e4d7b4c50d49942977422ac91253fd37095 | 'use strict';
/**
* Module dependencies.
*/
var express = require('express'),
consolidate = require('consolidate'),
mongoStore = require('connect-mongo')(express),
flash = require('connect-flash'),
helpers = require('view-helpers'),
assetmanager = require('assetmanager'),
config = require('..... | JavaScript | odin-front/express.js | odin-platform/odin | mit | 3,901 | 128 | codeparrot/github-code |
634929eee8226b6fbeed0a1aa78388f5a05312de742c8cbc7bbffe5bc89f4c10 | // @flow
import { transformFileSync, type babel } from 'babel-core';
import pluginReactIntl from 'babel-plugin-react-intl';
import pluginReactIntlAuto from 'babel-plugin-react-intl-auto';
import pathOr from 'ramda/src/pathOr';
import compose from 'ramda/src/compose';
import type { AbsolutePath } from '../../../../typ... | JavaScript | src/lib/riw/app/translate/armdFromSourceFabs.js | avaragado/riw | mit | 1,031 | 38 | codeparrot/github-code |
5191d4bf9774fdf3f252c4ef9ee332d641c029a4bf1eade20e4f73d83c3e2e0e | /**
* Copyright (c) 2013, FeedHenry Ltd. All Rights Reserved.
*
* Class which exposes collection of utility / helper functions for managing user sessions.
* - Creates new session for valid user.
* - Validates session for incoming requests.
* - Returns the session object associated to the specified sessionId.
* -... | JavaScript | lib/session/sessionManager.js | feedhenry-templates/team-todo-cloud | mit | 8,687 | 269 | codeparrot/github-code |
a6047e53544d0bbd6a1028f8b3657d092250244d031d582453a41e420100e426 | <style type="text/css">
#sidebar{ width:200px;}
#tab-content{padding:10px; margin-top:-40px;}
</style>
<style type="text/css">
#sidebar{ width:200px;}
#tab-content{padding:10px; margin-top:-20px;}
</style>
<?php $this->load->view('common/header'); ?>
<script>
$(document).ready(function () {
//alert('hi... | PHP | application/views/user/composemail.php | cubicwebsolutions/pstar | mit | 9,901 | 209 | codeparrot/github-code |
2a2529389eb9295a36055c4acea1b9692a4d47e25c9ddffca1755e9f73a015cd | package edu.berkeley.nlp.assignments;
import edu.berkeley.nlp.util.*;
import edu.berkeley.nlp.io.IOUtils;
import java.util.*;
import java.io.*;
/**
* Harness for testing word-level alignments. The code is hard-wired for the
* aligment source to be english and the alignment target to be french (recall
* that's th... | Java | Assignment2/src/edu/berkeley/nlp/assignments/WordAlignmentTester.java | elendil326/UWNLP | mit | 16,171 | 404 | codeparrot/github-code |
00d69427c08af54c68163f35357074cb5fe25598270346a197af507a9e634af9 | (function () {
'use strict';
angular
.module('openSenseMapApp')
.controller('EditBoxLocationController', EditBoxLocationController);
EditBoxLocationController.$inject = ['$scope', 'boxData', 'notifications', 'AccountService', 'Box'];
function EditBoxLocationController ($scope, boxData, notifications,... | JavaScript | app/scripts/controllers/account.box.edit.location.js | sensebox/OpenSenseMap | mit | 3,209 | 116 | codeparrot/github-code |
6ae64072bfc86058a7e3178a524c6abf7f1596b63ed40ccee57e5b4deebd46d8 | <?php
namespace app\controllers;
use Yii;
use yii\web\Response;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\AccessControl;
use yii\filters\VerbFilter;
use yii\data\ActiveDataProvider;
use yii\base\Exception;
use app\components\StringUtils;
use app\models\Category;
/**
* CategoryControl... | PHP | basic/controllers/CategoryController.php | pauloteixeira/Warehouse | mit | 4,516 | 179 | codeparrot/github-code |
4aab45a19ecde5402e2973e2ff3b1417afbf3edcaf6252abc1c8d4ae4d5ac25f | /**
*/
package IFML.Core.presentation;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.EventObject;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Lis... | Java | plugins/IFMLEditor.editor/src/IFML/Core/presentation/CoreEditor.java | ifml/ifml-editor | mit | 54,335 | 1,786 | codeparrot/github-code |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.