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 |
|---|---|---|---|---|---|---|---|---|
1c3c0ec556ceaf82f0dbe4ed88870e26579aac42c3786a22d62868329e1b0cf4 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _02_smallShop
{
class Program
{
static void Main(string[] args)
{
string product = Console.ReadLine().ToLower();
string city = Console.ReadLine... | C# | 01-Progr Basics with Csharp/07-More Complex Logic Checks/07-Complex Logic Checks/02-smallShop/Program.cs | MrPIvanov/SoftUni | mit | 2,377 | 95 | codeparrot/github-code |
8c35d80a61fc89f6974215809f4218899e9060dd2aab13e2521d8ff36b0a4200 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>exact-real-arithmetic: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../boo... | HTML | clean/Linux-x86_64-4.05.0-2.0.1/released/8.14.0/exact-real-arithmetic/8.8.0.html | coq-bench/coq-bench.github.io | mit | 7,375 | 171 | codeparrot/github-code |
7c1d4cae85c4c8d5a9d490666ae7a68a1b44fcadff2ce8d98bbd5c4b9ced22a1 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>zorns-lemma: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min... | HTML | clean/Linux-x86_64-4.08.1-2.0.5/extra-dev/dev/zorns-lemma/8.10.0.html | coq-bench/coq-bench.github.io | mit | 7,169 | 177 | codeparrot/github-code |
f11623adc2a2ba7af7425d801d8ef31f105af9c857edc05ba685ea9cad7756ae | angular.module('fellowship.modules.api.services')
.service('ApiService', function($http, $q){
var service = {};
var urlBase = 'http://uvkkc35ecaa7.vinifig.koding.io:8080/api'
var isMaster = [];
var isProjectMaster = [];
var isProjectLeader = [];
var isProjectMember = [];
var veri... | JavaScript | www/js/modules/api/services/ApiService.js | marcelocordeiro/hacksummit-project | mit | 1,600 | 58 | codeparrot/github-code |
a34d43053b424e43ec8200d827ff7c95328b1c7446ad49d54f0dfcca77bf06e9 | #include <iostream>
#include <string>
using namespace std;
void reference() {
int a = 1;
int& b = a;
cout << &a << endl;
cout << &b << endl; // same address
}
struct Shape {
int id;
Shape() {
cout << "Constructor of Shape" << endl;
}
~Shape() {
cout << "Destructor of Shape" << endl;
}
};
struct Circle... | C++ | gamewave.cpp | mnhkahn/cProgram | mit | 2,591 | 130 | codeparrot/github-code |
0444d031e5086b47991fee4701ce7e73e03e02b6980cd30ffec1ce8f20ddcfde | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>printf: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css"... | HTML | clean/Linux-x86_64-4.11.2-2.0.7/released/8.14.0/printf/1.0.0.html | coq-bench/coq-bench.github.io | mit | 6,490 | 165 | codeparrot/github-code |
2cb62aeafb6d7954f1840beeea33c301a61c58d2e38e17650305cc27ac84b461 | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Merchant_mpesa_log extends CI_Controller {
// num of records per page
private $limit = 10;
function __construct()
{
parent::__construct();
// load library
$this->load->library(array('table','form_validation'));
// loa... | PHP | application/controllers/Merchant_mpesa_log.php | muokid3/M-Afya | mit | 1,448 | 76 | codeparrot/github-code |
c2aea658632a3a2eef33dd35567eb6d58e53db43d74d2dc3c5bf00d7267439d6 | <!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.cs... | HTML | clean/Linux-x86_64-4.02.3-2.0.6/released/8.9.0/higman-s/8.8.0.html | coq-bench/coq-bench.github.io | mit | 7,215 | 168 | codeparrot/github-code |
a5f8ca01676e78e37bc3b0f7a4fa749985f2fd6b29a102d68c77ff21afe50750 | <?php
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new Symfony\Bundle\SecurityBundle\Sec... | PHP | app/AppKernel.php | htmldreambuilder/hdb210614 | mit | 1,444 | 38 | codeparrot/github-code |
82339933084b60a42fd5e9787b63e84a57eecd1535307099053ba98012b84780 | #!/usr/bin/env php
<?php
declare(strict_types = 1);
/**
* @param $value
*
* @return array
*/
function guessValue($value) : array
{
if (is_string($value)) {
return [
"'$value'",
' : string'
];
} elseif (is_int($value)) {
return [
$value,
... | PHP | bin/generator.php | KrunoKnego/Nucleus | mit | 1,735 | 72 | codeparrot/github-code |
231de67ab863b2e804a95c1f4e7a53d23a49e1c0101bc9707690a1a4f7eb394a | local socket = require "socket"
local ssl = require "ssl"
--local apr = require "apr"
function tablelength(T)
local count = 0
for _ in pairs(T) do count = count + 1 end
return count
end
function main()
if tablelength(arg)==5 then
cert = arg[3]
local params = {
mode = "clie... | Lua | stubs/lua5.1-luasec/run.lua | ouspg/trytls | mit | 971 | 46 | codeparrot/github-code |
63cd42ecb69857274a5f6efb8a8c4e3e985f21d13fe47601f4d24f6160854656 | #include "pch.h"
#include "Quaternion.h"
#include "Core.h"
using namespace Kore;
Quaternion::Quaternion() : x(0), y(0), z(0), w(0) { }
Quaternion::Quaternion(float x, float y, float z, float w) : x(x), y(y), z(z), w(w) { }
Quaternion::Quaternion(const vec3& axis, float radians) {
w = cos(radians / 2);
... | C++ | resources/app/extensions/kha/Kha/Kore/Sources/Kore/Math/Quaternion.cpp | KTXSoftware/KodeStudio-linux32 | mit | 3,755 | 140 | codeparrot/github-code |
9ecb1c03eda6d47f96c7f52f05a23f85d1b5cb2247a09d0d71bca5e75bb52d3f | /*
Endless: A bidirectional, React infinite scroll component.
Based on ReactList (https://github.com/orgsync/react-list)
*/
/* jshint browser: true */
/* global define, module */
/* jshint -W116 */ // Don't warn about single-line if's.
const ReactDOM = require('react-dom');
(function(root, factory) {
if (typeof d... | JavaScript | endless.js | scrollback/endless | mit | 12,623 | 409 | codeparrot/github-code |
6faf71124393e7e877b29497f99a85f6ecfd41ff1a7931bb896ebab026f654d4 | <?php
/*
* This file is part of the Dektrium project
*
* (c) Dektrium project <http://github.com/dektrium>
*
* For the full copyright and license information, please view the LICENSE.md
* file that was distributed with this source code.
*/
namespace dimple\administrator\clients;
use yii\authclient\clients... | PHP | clients/GitHub.php | dimpled/yii2-administrator | mit | 856 | 36 | codeparrot/github-code |
03c0a9f3632b2ef19a749b32ef749ef389e90ef4a4c617eca21c9a369c4a6264 | {% extends "layout.html" %}
{% block content %}
<html>
<head>
</head>
<link rel="stylesheet" type="text/css" href = "//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="//cdn.datatables.net/1.10.7/css/jquery.dataTables.css">
<link rel="stylesheet" type="tex... | HTML | templates/gamelog.html | wseaton/pongr | mit | 2,785 | 104 | codeparrot/github-code |
0db66cd63e0e08bc1aa80808f4102fc36a6069ca55cebe081a44a27d9a6dffb5 | package de.jeha.kame.playground.page.rank.tools;
import de.jeha.kame.playground.page.rank.math.MatrixPrinter;
import java.util.Random;
/**
* @author jns
*/
public class AdjacencyMatrixGenerator {
private final int dim;
private static final Random GENERATOR = new Random();
public AdjacencyMatrixGenera... | Java | playground/page-rank/src/main/java/de/jeha/kame/playground/page/rank/tools/AdjacencyMatrixGenerator.java | jenshadlich/kame | mit | 811 | 39 | codeparrot/github-code |
565dbcf0c8c48eaab811c2aaf8051822315d2b01c5da9d494cb9aecb46148141 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>dictionaries: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.mi... | HTML | clean/Linux-x86_64-4.02.3-2.0.6/released/8.5.2~camlp4/dictionaries/8.9.0.html | coq-bench/coq-bench.github.io | mit | 7,756 | 183 | codeparrot/github-code |
94a311cff4fe26f7801485f0390ccdc9c02c50e4a06606569b4896f826d8af5f | <?php
namespace backend\controllers;
use Yii;
use common\models\Edbouser;
use backend\models\EdbouserSearch;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
/**
* EdboUserController implements the CRUD actions for Edbouser model.
*/
class EdbouserController extends Controller... | PHP | backend/controllers/EdbouserController.php | VitalyKoynash/univer.admin | mit | 3,230 | 123 | codeparrot/github-code |
273e8706e8dc8630519e22c9fe51a77812774ae50854f856225142e66054f462 | -- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Mar 03, 2017 at 08:00 PM
-- Server version: 5.5.53-0ubuntu0.14.04.1
-- PHP Version: 5.5.9-1ubuntu4.20
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_C... | SQL | mokeup&sql/expenses.sql | aya-gamal1/expenses | mit | 4,918 | 166 | codeparrot/github-code |
fbc67379ab15d6de596d4d3d23db3dede158b6f079a51e15f84327261a9feb50 | detect_platform_solving_failures() {
# we can't use an associative array, as those are pure hashes in Bash 4+, so they don't preserve an order, but we need that
local failures=()
local regexes=()
local warnings=()
regexes+=("requires php \S+ -> no matching package found")
failures+=("requirements.php")
warning... | Shell | bin/util/failures.sh | heroku/heroku-buildpack-php | mit | 7,414 | 165 | codeparrot/github-code |
d2dc8876c9d3ee5d488ff00b30828c2acc8e1089a948ffd0317263f370b9f979 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>qarith: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css"... | HTML | clean/Linux-x86_64-4.10.2-2.0.6/extra-dev/dev/qarith/8.10.0.html | coq-bench/coq-bench.github.io | mit | 7,073 | 177 | codeparrot/github-code |
a1cf6d0e1b7d80ede2817fdd7545fb682048c51101d47862d9412c6f43a4b843 | package com.zfgc.dataprovider;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.dozer.DozerBeanMapper;
import org.... | Java | src/main/java/com/zfgc/dataprovider/UsersDataProvider.java | ZFGCCP/ZFGC3 | mit | 10,351 | 336 | codeparrot/github-code |
80669d622553a95da7c807cba92c064f57ef71fa36db80ec2ec4c71cfc267dd4 | var Issue = (function () {
function Issue () {
init.call(this);
};
function init (name, time, u) {
this.name = name || '';
this.time = time || null;
this.uncertainty = u || null;
this.issues = [];
this.form = null;
}
function addIssue (issue, hidden) {
issue.parent = this;
if(hidden){
this.i... | JavaScript | issue.js | RB-Lab/sheduleCalc | mit | 2,649 | 106 | codeparrot/github-code |
9053f8db2f196911bf05bbd7dbda1c478c36c94bdb67924643e1cb9e0d923946 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>compcert: Not compatible</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" ... | HTML | clean/Linux-x86_64-4.12.0-2.0.8/released/8.13.2/compcert/3.0.0.html | coq-bench/coq-bench.github.io | mit | 7,404 | 184 | codeparrot/github-code |
9d3d307ef0d4c3c8a7c500b24628006a6a819ee6c70a7130b9aacdbcbcb90fa8 | /*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.lslboost.org/LICENSE_1_0.txt)
=====================================... | C++ | liblsl/external/lslboost/spirit/home/phoenix/core/as_actor.hpp | gazzlab/LSL-gazzlab-branch | mit | 1,583 | 63 | codeparrot/github-code |
13b08523b7c8035b23f0f8e858a1498197572fcbebda5524d69d3a857767b4f8 | <?php
/*
* This file is part of the Active Collab DatabaseObject project.
*
* (c) A51 doo <info@activecollab.com>. All rights reserved.
*/
declare(strict_types=1);
namespace ActiveCollab\DatabaseObject\Test;
use ActiveCollab\DatabaseObject\Test\Base\WritersTypeTestCase;
use ActiveCollab\DatabaseObject\Validator... | PHP | test/src/OnlyOneValidatorTest.php | activecollab/databaseobject | mit | 3,421 | 124 | codeparrot/github-code |
ddd470ee7e6a792d6a1a53d0145779f8014a1b300a80e8db90cee8cc731a0a3e | package net.collaud.fablab.api.data;
import java.util.Objects;
import javax.persistence.MappedSuperclass;
/**
*
* @author Gaetan Collaud <gaetancollaud@gmail.com>
* @param <ID>
*/
@MappedSuperclass
abstract public class AbstractDataEO<ID> {
abstract public ID getId();
@Override
public boolean equals(Object o... | Java | src/main/java/net/collaud/fablab/api/data/AbstractDataEO.java | HEG-Arc/fablab-manager | mit | 564 | 32 | codeparrot/github-code |
1848833544dbebfdd33fb6d8334bea556f69169b3c591dbd6ea0d708478ebf10 |
/**
* Wrapper for SVGGeometryElement interface
*
* It can wrap SVGElement elements
*
* If svgDOMNode is wrapped by Vector.Geometry's super class then
* it removes that wrapper and returns a new Vector.Geometry wrapper.
* To get a appropriate wrapper please use Vector.wrap() method.
*
* @type {Vector.Geometry}... | JavaScript | src/element/geometry.js | ariyankhan/vector.svg | mit | 14,185 | 427 | codeparrot/github-code |
0b5cd14c362375fb38b56046001447928098b8c44a34588c28f463d5d01d4db7 | #[macro_use]
extern crate criterion;
extern crate pleco;
extern crate pleco_engine;
mod eval_benches;
mod multimove_benches;
mod startpos_benches;
trait DepthLimit {
fn depth() -> u16;
}
struct Depth5 {}
struct Depth6 {}
struct Depth7 {}
struct Depth8 {}
struct Depth9 {}
impl DepthLimit for Depth5 { fn dep... | Rust | pleco_engine/benches/bench_engine_main.rs | sfleischman105/Pleco | mit | 681 | 36 | codeparrot/github-code |
c9335509955775d8b8a0c5f3594c60e3168193637cebc87cb2f6cfb156722de0 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>dep-map: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css... | HTML | clean/Linux-x86_64-4.07.1-2.0.6/released/8.12.0/dep-map/8.8.0.html | coq-bench/coq-bench.github.io | mit | 6,733 | 168 | codeparrot/github-code |
65fdfec2e4b7e1004064eea779bdd6ead6dbe4dcd9b5052d5fa12119e44f4465 | import { addMatchingCardsToResults } from "../lib/add-matching-cards-to-results";
import { CreditCardType } from "../types";
import { createFakeCreditCardType } from "./helper";
describe("addMatchingCardsToResults", () => {
it("adds a clone of matching card configurations to results array", () => {
const a = cre... | TypeScript | src/__tests__/add-matching-cards-to-results.ts | braintree/credit-card-type | mit | 2,814 | 96 | codeparrot/github-code |
356f5b6bf1c2d956915d392f8f49ca86657085bc8665ae4c1c2cdb4d27ae2f41 | $(document).on('click', "#newgame_button", function() {
return validate_create();
});
$(document).on('click', "#restart_button", function() {
start_game();
});
// initializes the game board
function create_game(columns, rows, turn) {
// inspired by http://www.youtube.com/watch?v=qaGd65opzgo
// and (modified from) h... | JavaScript | app/assets/javascripts/connectfour.js | jthurst3/hassler | mit | 6,626 | 199 | codeparrot/github-code |
f4625cd2d8f756aa307e3ef42ee692e830314778d0405891e5af33e750e8b76f | import os
from sqlalchemy import and_
from photomanager.lib.pmconst import TODO_INX_NAME
from photomanager.utils.imageutils import ImageInfo
from photomanager.db.helper import exif_to_model
from photomanager.db.models import ImageMeta
from photomanager.lib.helper import get_file_md5
from photomanager.db.config import C... | Python | photomanager/db/imagehandler.py | wrenchzc/photomanager | mit | 2,547 | 82 | codeparrot/github-code |
c829e56d9b67e728211eb2e86878d9fa90c50fb2d8ac2e195ab0f2e9072b8261 | namespace EnergyTrading.Mdm.Test
{
using System;
using EnergyTrading.Data;
public static class ObjectMother
{
public static T Create<T>()
where T : IIdentifiable
{
var value = Create(typeof(T).Name);
return (T)value;
}
public stati... | C# | Code/UnitTest/ObjectMother.cs | RWE-Nexus/EnergyTrading-MDM | mit | 795 | 35 | codeparrot/github-code |
a091f91ed2779d2e37d8480ff9c1b2cd78d7c57c851dd5ca1a65a9a2ed22d2c7 | # -*- coding: utf-8 -*-
#
# This file is part of Karesansui.
#
# Copyright (C) 2009-2012 HDE, 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 lim... | Python | karesansui/gadget/guesttag.py | karesansui/karesansui | mit | 2,641 | 77 | codeparrot/github-code |
9131bdd7dd9d9d807e2e3dc2d54802b82d9dbbe7f7e2a4ea16189eed9797d1dc | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>compcert: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.cs... | HTML | clean/Linux-x86_64-4.11.2-2.0.7/released/8.13.2/compcert/3.6+8.11.html | coq-bench/coq-bench.github.io | mit | 8,023 | 189 | codeparrot/github-code |
36d84f31b7318dd56910ee84743ba164cdbccb7649ab0e4bbc2776610ff0aa8f | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>nfix: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" r... | HTML | clean/Linux-x86_64-4.05.0-2.0.1/released/8.13.2/nfix/8.5.0.html | coq-bench/coq-bench.github.io | mit | 6,978 | 167 | codeparrot/github-code |
6ccef82078c6b771811a68daf8c6a40c30bb42e31eddd7c7a7087570a4440025 | var stat_refresh_interval = 10000;
var stat_refresh_fails = 0;
/* be nice to graphite */
var graph_refresh_interval = 60000;
var graph_refresh_fails = 0;
var interval_id;
$('a#memgraph-link').click(function() {
$.scrollTo('#memgraph', {
duration: 1,
offset: {
left: 0,
top: ... | JavaScript | src/web/static/js/db.js | hulu/monaco | mit | 6,474 | 217 | codeparrot/github-code |
42f3c473e9f4a65f9f053f870db8c9f2e74ddcbdd2273eb67293aca07596686b | package org.bitcoins.dlc.wallet.models
import org.bitcoins.core.api.dlc.wallet.db.DLCDb
import org.bitcoins.core.currency.CurrencyUnit
import org.bitcoins.core.number.UInt64
import org.bitcoins.core.protocol.BitcoinAddress
import org.bitcoins.crypto._
import org.bitcoins.db.{CRUD, SlickUtil}
import org.bitcoins.dlc.wa... | Scala | dlc-wallet/src/main/scala/org/bitcoins/dlc/wallet/models/DLCOfferDAO.scala | bitcoin-s/bitcoin-s | mit | 2,963 | 95 | codeparrot/github-code |
10f38d987a9b9cdd43be19054c033a856d7746beb283f2e5e6215cc881928c70 | <link rel="stylesheet" href="http://files.cnblogs.com/xguo/prettify.css" />
<link rel="stylesheet" href="http://files.cnblogs.com/xguo/github.css"/>
<script src="http://blogcc.u.qiniudn.com/wp-content/themes/zbench/jquery.js" type="text/javascript"></script>
<script src="http://files.cnblogs.com/xguo/google-code-pr... | HTML | wp-content/cache/supercache/blog.me115.com/2011/04/149/index-mobile.html | me115/me115.github.io | mit | 23,032 | 324 | codeparrot/github-code |
554f3004fa1ddbceb264a71abf535fa23db844b60c1a15eb0442dd418c77a417 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>paco: 4 m 54 s</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel="style... | HTML | clean/Linux-x86_64-4.05.0-2.0.6/released/8.7.1+1/paco/1.2.8.html | coq-bench/coq-bench.github.io | mit | 14,518 | 245 | codeparrot/github-code |
e09e6c2b71722785c2e1fb2f4315c66093b09b60116b193770152aa3ee3dc00c | class TradeRequestDecorator < Draper::Decorator
delegate_all
def intention
"#{object.kind}ing"
end
def sale_price
case object.kind
when 'buy'
format_price(current_price * (1 - profit_margin))
when 'sell'
format_price(current_price * (1 + profit_margin))
end
end
def map_loc... | Ruby | app/decorators/trade_request_decorator.rb | brettclanton001/Dashous | mit | 1,181 | 48 | codeparrot/github-code |
fda45196aea44a29f73844efd8433c296efe183549057c8adca2a81fccb8a530 | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Ymirheim.Patching.PatchBuilder.Commands;
using Ymirheim.Patching.PatchBuilder.Diff;
namespace Ymirheim.Patching.PatchBuilder
{
/// <summary>
/// Basic Ymirheim pat... | C# | src/Ymirheim.Patching.PatchBuilder/PatchBuilder.cs | Ymirheim/Ymirheim.Patching | mit | 4,866 | 184 | codeparrot/github-code |
a2b43c3d51d675e3e0e075f7839689d4e6e04955cfc2f6b02b5e97baf53c33fa | #region
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Microsoft.Practices.Unity.Utility;
#endregion
namespace Cedar.Core
{
/// <summary>
/// This static class is used to get attributes from assemblies, types and type members.
/// </summary>
pub... | C# | Source/Core/Core/AttributeAccessor.cs | timxing1987/git-tutorial | mit | 5,649 | 130 | codeparrot/github-code |
be325ec68986605ba64ba6eb7cb06a7cdc2137a7fccd8bbfbc5d989f2c736178 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>coqprime: 4 m 13 s</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel="s... | HTML | clean/Linux-x86_64-4.09.0-2.0.5/released/8.7.1+2/coqprime/1.0.1.html | coq-bench/coq-bench.github.io | mit | 19,683 | 280 | codeparrot/github-code |
b6067e3c52e6a8f1eed5c5b3c5e78c573a2fc94e5857003dcf39aab7afa7542a | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>quickchick: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.... | HTML | clean/Linux-x86_64-4.09.1-2.0.6/released/8.7.1+2/quickchick/1.0.2.html | coq-bench/coq-bench.github.io | mit | 7,176 | 181 | codeparrot/github-code |
395a29e3db884b5f9d27fe18fcc0c19bf617f141c9c9a778f24015469f849e4c | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>hammer-tactics: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.... | HTML | clean/Linux-x86_64-4.06.1-2.0.5/released/8.11.1/hammer-tactics/1.3.2+8.13.html | coq-bench/coq-bench.github.io | mit | 7,075 | 178 | codeparrot/github-code |
8aba7af7a3171723b1e3c0ca44e71f1791fc776dcebb9b712ac1cbaa8b5b18b6 | #ifndef EMULATOR_CHANNEL_H
#include <stdio.h>
// To distinguish in and out channels
typedef enum {
IN,
OUT
} Direction;
// A unidirectional communication channel endpoint
typedef struct {
char* filename;
FILE* fp;
Direction direction;
} Channel;
// Open a channel (called by the emulation only)
C... | C | emu/src/channel.h | noqu/vbb | mit | 884 | 36 | codeparrot/github-code |
c1661641bda6b018ad9f52af388033f80172867b182a3eeee90b4dae7d08bffd | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>mathcomp-finmap: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap... | HTML | clean/Linux-x86_64-4.08.1-2.0.5/released/8.13.1/mathcomp-finmap/1.4.1.html | coq-bench/coq-bench.github.io | mit | 7,594 | 169 | codeparrot/github-code |
c4c3a68cb33734d54a2dcd2c23d017fbe88722bc5544893d976ddbcb09748cbb | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>ext-lib: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css... | HTML | clean/Linux-x86_64-4.04.2-2.0.5/released/8.7.2/ext-lib/0.11.0.html | coq-bench/coq-bench.github.io | mit | 6,890 | 168 | codeparrot/github-code |
d5eb562cac339da1e4b5483db9b01de5263a756c29f909d586e150fbdba398c1 | "use strict";
let stars = [];
window.addEventListener("load", () => {
stars = populateStars(87)
// console.log(stars)
}, false);
let animate = (con, currentTime) => {
con.save();
stars.map((star) => star.draw(con, currentTime))
con.restore();
}
let populateStars = (numStars) => {
let arr = Array.apply(nu... | JavaScript | js/stars.js | Matt5sean3/moon-defender | mit | 1,978 | 76 | codeparrot/github-code |
f25dd3dd8696cd439c39feb1661f4ac5fecddc2c34d245f400436064227d71fb | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# MIT License
#
# Copyright (c) 2017-2018 Roxanne Gibson
#
# 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 witho... | Python | roxbot/scripts/JSONtoDB.py | RainbowDinoaur/roxbot | mit | 6,104 | 131 | codeparrot/github-code |
fea93ec9ae69e8c2542a1e5fd1eff2cde2c94ca1eb8ed3151c77ad72067a0c5d | /**
* This file contains some default function
*/
//
// decrypt helper function
function decryptCharcode(n,start,end,offset) {
n = n + offset;
if (offset > 0 && n > end) {
n = start + (n - end - 1);
} else if (offset < 0 && n < start) {
n = end - (start - n - 1);
}
return String.fromCharCode(n);
}
//
// decr... | JavaScript | Resources/Public/JavaScript/Defaults.js | typo3-themes/theme_bootstrap4 | mit | 920 | 39 | codeparrot/github-code |
abbfd82fc34fcac34747e5540765ac0b6a9982e8e3d6a775419b190069580ef6 |
namespace Hqub.MusicBrainz.Client
{
using Hqub.MusicBrainz.API;
using System;
using System.Linq;
using System.Threading.Tasks;
/// <summary>
/// Search for an artist using 'Artist.SearchAsync' and lookup artist details
/// like band-members and related urls using 'Artist.GetAsync'.
//... | C# | Hqub.MusicBrainz/Hqub.MusicBrainz.Client/Example1.cs | avatar29A/MusicBrainz | mit | 2,855 | 74 | codeparrot/github-code |
d5960c61a1285c8314098cd130c252abff31c444a9c950e175bdcf6ee0b1d1a2 | const { assert, skip, test, module: describe, only } = require('qunit');
const { GPU } = require('../../../../../../src');
describe('feature: to-string unsigned precision returns Texture');
function testReturn(mode, context, canvas) {
const gpu = new GPU({ mode });
const originalKernel = gpu.createKernel(function... | JavaScript | test/features/to-string/precision/unsigned/returns/texture.js | gpujs/gpu.js | mit | 1,486 | 43 | codeparrot/github-code |
f5cc1499d6813fd95fd2d9778e8811ec0d7a95a04daf50c3e293fb51b66dffb9 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using OnlineWallet.Web.DataLayer;
using OnlineWallet.Web.Modules.TransactionModule.Queries;
namespace OnlineWallet.Web.Modules.GeneralDataModule.Commands
{
p... | C# | Wallet/OnlineWallet.Web.Core/Modules/GeneralDataModule/Commands/ArticleCommands.cs | faddiv/budget-keeper | mit | 4,656 | 138 | codeparrot/github-code |
0af8090123043b83f713e5601f02f8f16da0fb26509c5c4956c2772fa83ab6ca | # -*- coding: utf-8 -*-
"""
Created on Wed Jul 19 14:46:48 2017
@author: User
"""
#%% MODULE IMPORT
def aad_process(file_url):
from IPython.core.display import display, HTML; display(HTML("<style>.container { width:95% !important; }</style>"))
from time import gmtime, strftime
import datetime
import nu... | Python | Kodlar/S-r-m 1/aad_kyh_process_function.py | gtuinsaat/TRKYH_Veritabani_programi-master | mit | 25,824 | 488 | codeparrot/github-code |
a76fcf59ca9a57d6aca4b09294e4a5d45310476ed77fa2db4c68770984fdd511 | 'use strict';
describe('Select directive', function() {
var element, scope;
beforeEach( module('jsLib.widgets') );
// beforeEach( module('jsWidgets.scrollList') );
beforeEach( module('jsLib.restModel') );
// load the templates
beforeEach( module( 'test/js-widgets/simple-scroll-list.html') );
befo... | JavaScript | test/js-widgets/scroll-list.spec.js | jseto/js-lib | mit | 4,768 | 178 | codeparrot/github-code |
f24d940ab8e732c4e2ba2a4ade06d80458d2ebaf3e2a820de76a253800b0334d | //------------------------------------------------------------------------------
// AY38910Window.cc
//------------------------------------------------------------------------------
#include "AY38910Window.h"
#include "IMUI/IMUI.h"
#include "yakc/util/breadboard.h"
using namespace Oryol;
namespace YAKC {
//--------... | C++ | src/yakc_ui/AY38910Window.cc | floooh/yakc | mit | 3,490 | 74 | codeparrot/github-code |
c5b7882dc2a96a3e60444dc91f905c198b1de37e871b2ba4b9afa0cfb3b436a8 | ---
layout: default
title: Home
cover: false
about: 'about.html'
---
<header class="site-head" {% if page.cover %} style="background-image: url({{ page.cover }})"{% endif%}>
<div class="vertical">
<div class="site-head-content" class="inner">
{% if page.logo %}
<a class="blog-lo... | HTML | index.html | rhapsodyn/rhapsodyn.github.com | mit | 2,272 | 70 | codeparrot/github-code |
9c12e5ff003f51f229ba6b1dca95497470ddc4ec43e22cff199d3947304f99ac |
namespace BitShuva.Chavah {
export class AudioPlayerService {
static $inject = [
"songApi",
"homeViewModel"
];
readonly status = new Rx.BehaviorSubject(AudioStatus.Paused);
readonly song = new Rx.BehaviorSubject<Song | null>(null);
readonly songCom... | TypeScript | Chavah.NetCore/wwwroot/js/Services/AudioPlayerService.ts | kdcllc/Chavah | mit | 10,625 | 278 | codeparrot/github-code |
e97895f2368517345e135e418b4a10ceb19d4cf92725a19ab227e0d6ae7eed34 | #include "snarkfront/PowersOf2.hpp"
using namespace std;
namespace snarkfront {
bool zero_internal(const bool& dummy) { return false; }
bool one_internal(const bool& dummy) { return true; }
size_t sizeBits(const bool& dummy) { return 1; }
size_t sizeBits(const uint8_t& dummy) { return 8; }
size_t sizeBits(const uin... | C++ | PowersOf2.cpp | jancarlsson/snarkfront | mit | 2,286 | 80 | codeparrot/github-code |
f9fff624f5fe2e2da739661479cfd44bbb5f2e0723c4df9b3e2126c1e354779f | #include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include "journal.h"
int getJournalEntry(int index, Journal* mJournal, char message[], int *day, int *month, int *year)
{
/* Probably not gonna like the null there */
/**
* R
*/
int exists = 0;
if (index > sizeof(JournalEntry)... | C | p6/question1/journal.c | dbusan/ucp | mit | 2,309 | 124 | codeparrot/github-code |
8ad42dffa890c9c425d5e5f9821aaf7a9d9ca6744997105e6cd0f44a2fbf624d | // Copyright (C) 2002-2012 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h
#ifndef __C_FILE_LIST_H_INCLUDED__
#define __C_FILE_LIST_H_INCLUDED__
#include "IFileList.h"
#include "irrString.h"
#include "irrArray.h"
namespac... | C | source/CFileList.h | u-engine/uEngine | mit | 3,984 | 139 | codeparrot/github-code |
94f5ff28e94fe0a2ad73546e76f93565b1f2ed7c329dc3ec623cc64fce84ee15 | using System.Collections.Generic;
using DataApi.Api;
using DataApi.Network.Messages;
using DataApi.Network.Messages.Response;
using DataApi.Network.Wrapper;
using NetworkCommsDotNet;
namespace ResourceManagment.Network
{
internal class NetworkMessageHandler : INetworkMessageQueue
{
private readonly INe... | C# | ResourceManagment/Network/NetworkMessageHandler.cs | Omnicrola/ResourceManager | mit | 1,642 | 58 | codeparrot/github-code |
6c55c9c03feb0282240a8a39d33fc69185cba2ad60da65ce84326306846186cb | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>abp: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" re... | HTML | clean/Linux-x86_64-4.04.2-2.0.5/released/8.7.1+1/abp/8.5.0.html | coq-bench/coq-bench.github.io | mit | 6,978 | 172 | codeparrot/github-code |
1fcd9daf58b2dd1f887e68a0656b6fefbd849c3d2b93d7553bdcbd86b22a6bc6 | /* tslint:disable */
declare var Object: any;
export interface ApprovalRuleInterface {
"id": string;
"approvalArtefactId": string;
"sequenceNo": number;
"roleId": number;
"lastApprovalSequenceInd": number;
}
export class ApprovalRule implements ApprovalRuleInterface {
"id": string;
"approvalArtefactId":... | TypeScript | src/app/shared/sdk/models/ApprovalRule.ts | ISKCON-Cultural-Centre/eISKCON | mit | 1,780 | 77 | codeparrot/github-code |
e9713a7688ef6a5bdfb68e4be103b568a172ff103fe49e86542be4b43d0fee55 | import React from 'react';
import {Observable, Subject} from 'rxjs';
export class Counter extends React.Component {
constructor() {
super();
this.state = {
count: 0
};
// Obvs to represent increase, decrease event streams
this.decrease$ = new Subject();
this.increase$ = new Subject();... | JavaScript | rx-sandbox/creating-apps-with-observables/Counter.js | claycarpenter/node-sandbox | mit | 900 | 34 | codeparrot/github-code |
16cd1267a5409829a6eb426cdb9a1d2afef70d6bbf9cd18a9bd5d1910aaf0924 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>tlc: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" re... | HTML | clean/Linux-x86_64-4.05.0-2.0.1/released/8.14.0/tlc/20171128.html | coq-bench/coq-bench.github.io | mit | 6,814 | 172 | codeparrot/github-code |
2520eabe66f070a30361e5a8f2785e2539629622cdd1bf52140290d927325e00 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>color: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" ... | HTML | clean/Linux-x86_64-4.02.3-2.0.6/released/8.7.2/color/1.5.0.html | coq-bench/coq-bench.github.io | mit | 9,404 | 241 | codeparrot/github-code |
3426ce5904730edde6d4bcddc6376fda801abf0887067d37871cb4081c6f0372 |
import {FileReader} from "./file";
import {RequestMethod} from "../api/request-method";
import {Group, BasicGroup} from "../api/group";
import {readProperty} from "./property";
import {readEndpoint} from "./endpoint";
import {API} from "../api/api";
export function readGroup(reader: FileReader, api: API, parent: Gro... | TypeScript | src/main/reader/group.ts | APIScript/APIScript | mit | 1,754 | 51 | codeparrot/github-code |
15151ecea6c3b5a60aa51cd967f57fb48064e35ad66bc61358dccd210d8d269a |
/*!--------------------------------*\
3-Jekyll Theme
@author Peiwen Lu (P233)
https://github.com/P233/3-Jekyll
\*---------------------------------*/
// Detect window size, if less than 1280px add class 'mobile' to sidebar therefore it will be auto hide when trigger the pjax request in small screen devices.
i... | JavaScript | assets/js/script.js | tomtangrx/tomtangrx.github.io | mit | 4,790 | 156 | codeparrot/github-code |
9eb05e0da0259ec9088703f0f4fe650e71c3950c17d855d7db6ca256be08a407 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>weak-up-to: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.... | HTML | clean/Linux-x86_64-4.05.0-2.0.1/released/8.7.0/weak-up-to/8.10.0.html | coq-bench/coq-bench.github.io | mit | 7,541 | 183 | codeparrot/github-code |
65de622cf21fb923519258fa85fb7aef94e804b33dd80fbf1916ccb22769178b | app.controller('UsersPasswordCtrl', ['$state', '$scope', 'users', '$timeout', 'SweetAlert', 'toaster', '$http', function ($state, $scope, users, $timeout, SweetAlert, toaster) {
//Init input addForm variable
//create users
$scope.process = false;
if ($scope.dataUser.level == 0 ) {
$state.go("ap... | JavaScript | public/assets/src/users/UsersPassword.js | arifasiwi/rental-mobil | mit | 4,745 | 122 | codeparrot/github-code |
59031f22e2cb27ce1aa89b4ec3ea55a282b515b2c4bc48b7607444cc9e762857 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>float: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" ... | HTML | clean/Linux-x86_64-4.07.1-2.0.6/released/8.13.0/float/8.7.0.html | coq-bench/coq-bench.github.io | mit | 6,882 | 169 | codeparrot/github-code |
20b8ff7d20404a1824ac06b01cd9c59ef44a16fb908484dcb02725cd17967d6f | using CharacterGen.Abilities;
using CharacterGen.Randomizers.Abilities;
using Ninject;
using NUnit.Framework;
using System.Linq;
namespace CharacterGen.Tests.Integration.Stress.Randomizers.Abilities
{
[TestFixture]
public class RawAbilitiesRandomizerTests : StressTests
{
[Inject, Named(AbilitiesRa... | C# | CharacterGen.Tests.Integration.Stress/Randomizers/Abilities/RawAbilitiesRandomizerTests.cs | DnDGen/CharacterGen | mit | 2,067 | 48 | codeparrot/github-code |
37d755dad7cc03937755f3fb8b2ade2d81be9ce135fc8a7bb4436e109f774920 | #include "sphere.hpp"
#include "aabb.hpp"
cgray::rt::Sphere::Sphere()
: center_(0.0f, .0f, .0f), radius_(.5f)
{
}
cgray::rt::Sphere::Sphere(const Vector3f & center, float radius)
: center_(center), radius_(radius)
{
}
bool cgray::rt::Sphere::intersect(const Ray & ray, IntersectInfo & info)
{
Vector3f vec_l = ray.... | C++ | Source/rt/shape/sphere.cpp | wangzs/cgray | mit | 1,693 | 81 | codeparrot/github-code |
a44fe0003885893e30a9db57959fde28b2dc343b87b5e529630e97bb26fa8a6f | using Bridge.Contract;
using ICSharpCode.NRefactory.CSharp;
namespace Bridge.Translator
{
public class BaseReferenceBlock : ConversionBlock
{
public BaseReferenceBlock(IEmitter emitter, BaseReferenceExpression baseReferenceExpression)
{
this.Emitter = emitter;
this.Base... | C# | Translator/Emitter/Blocks/BaseReferenceBlock.cs | Dim0N22/Builder | mit | 881 | 32 | codeparrot/github-code |
ff08589555aa7d640ef286b74d286e07a97b21b7d512b07e54ad783a92be32a2 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import, division
from .. import engine
import os
def shell(database='default'):
"""Runs the command-line client for the specified database.
"""
target = engine[database]
dialect = engine[database].dialect.name
if dialect =... | Python | alchemist/db/operations/shell.py | concordusapps/alchemist | mit | 1,145 | 43 | codeparrot/github-code |
2de262fa002bd1ebaa80b9b7121065c1ff824fc1b2dde696c3a7e7ed9ee5d80c | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package edu.unibi.agbi.gravisfx.entity.root.node;
import edu.unibi.agbi.gravisfx.entity.root.connection.IGravisConnection;
import edu.... | Java | GraVisFX/src/main/java/edu/unibi/agbi/gravisfx/entity/root/node/IGravisNode.java | preipke/petrisim | mit | 1,031 | 34 | codeparrot/github-code |
b410f43ffc4344515edf13f5042e86fa5d991e12adf706e84c26e477b3fc2b1c |
"""
CollectionRetrievers
--------------------
Wrapper of retrievers with a customed api oriented to interact properly with
spatial descriptor models.
This module contains the main class to mamage all retrievers without entering
in low-level programming.
As the FeaturesRetriever there are a requisit to have all the ret... | Python | pySpatialTools/Retrieve/collectionretrievers.py | tgquintela/pySpatialTools | mit | 13,968 | 407 | codeparrot/github-code |
48fe3252f9311a88adfc583216df87acc3125026782078e59dd3259a69b849c7 | var Helpers = require('./Helpers');
exports.build = function (Dialect, where, opts) {
if (where.length === 0) {
return [];
}
var query = [], subquery;
for (var i = 0; i < where.length; i++) {
subquery = buildOrGroup(Dialect, where[i], opts);
if (subquery !== false) {
query.push(subquery);
... | JavaScript | lib/sql/Where.js | ScoutGroup/onionrm | mit | 4,548 | 157 | codeparrot/github-code |
4d277008f0b43ea533d69c6b2821e61e652e46ed0f07c8f6d185a6a8d3c7f32b | import Table from '../components/custom/table';
import Divider from '../components/custom/divider';
import Photo from '../components/custom/photo';
import Rich from '../components/custom/rich';
import Document from '../components/custom/document';
/*
* BlockRenderer is responsible for rendering custom block types.
*... | JavaScript | src/renderer/index.js | crossfield/react-drafts | mit | 1,120 | 35 | codeparrot/github-code |
62aec3f1dac85ad3004a93d2c2473b93e7640ac1611af9316cd601225f61566f | /*
* crappy helpers.
* TODO Refactor - this is a bag of separate functions
*/
var _ = require('underscore');
exports.stringify = function (obj) {
var nobj = _(obj).clone();
nobj = objToStringJS(nobj);
var str = JSON.stringify(nobj);
str = str.replace(/"__js:([^"]*)"/g, '$1');
return str;
};
ex... | JavaScript | helpers/crappy.js | phnz/vpnht-admin | mit | 5,207 | 179 | codeparrot/github-code |
cca87eff9d7f695fa77111afec66cb97ec93a3076839ec25c5fd438e5f8d0e8d | class Product < ActiveRecord::Base
has_and_belongs_to_many :payments, join_table: 'payments_products'
scope :active, -> { where(archived: false) }
def self.find_for_user(user)
user.payments.map(&:products).flatten.uniq
end
def self.format_price(price)
cents = price % 100
cents = cents < 10 ? "0... | Ruby | app/models/product.rb | doodlesacademy/doodles | mit | 691 | 34 | codeparrot/github-code |
6e142a2cca85e36367f668ee91402dd1f837a0690e0a771c0851d2b4444c7f26 | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Windows;
namespace AGS_2014
{
/// <summary>
/// Interaktionslogik für MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
private void Encrypt... | C# | AGS_2014/MainWindow.xaml.cs | jfheins/AGS_2014 | mit | 3,674 | 169 | codeparrot/github-code |
51c04786b16d978e564f54e460545344b082cb512d18830937858f526a3700f0 | import {Transform} from 'stream'
import {decoder} from './utils'
/**
* @description Splitter decodes incoming buffer to utf8 string and splits the
* chunks on a given character.
*/
export default class Splitter extends Transform {
/**
*
* @param {string} char - split character
* @param {Object} opts - N... | JavaScript | src/lib/Splitter.js | Chlor87/node2go-node | mit | 768 | 40 | codeparrot/github-code |
dab27ec4230eec76ba13eb074c26f2baa87236c4480d0e8321f593e8c3763610 | import {MapLayer} from './map-layer';
import {LatLng} from "./types";
import {ImageOverlay as LeafletImageOverlay} from 'leaflet';
import {omit} from "underscore";
interface ImageOverlayProps {
bounds: LatLng[],
url: string,
attribution?: string,
opacity?: number
}
class ImageOverlay extends MapLayer... | TypeScript | src/image-overlay.ts | yavuzmester/react-leaflet | mit | 1,094 | 46 | codeparrot/github-code |
4cac3440dfa8b15f135af043bb7a23a5e17982ae0e5615524405727a2a4e081f | import getpass
import os
import socket
from crits.settings import crits_config
from django.core.management.base import BaseCommand, CommandError
from crits.core.user import CRITsUser
from crits.core.handlers import login_user
from crits.vocabulary.acls import GeneralACL
class Command(BaseCommand):
"""
Scrip... | Python | crits/core/management/commands/runscript.py | Magicked/crits | mit | 5,573 | 138 | codeparrot/github-code |
5e86491ccb9816f35b069eee3fb71dd0a10272446cd38539dada6bfc373cd460 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>giskard: 54 s 🏆</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel="sty... | HTML | clean/Linux-x86_64-4.09.1-2.0.6/released/8.12.1/giskard/1.0.html | coq-bench/coq-bench.github.io | mit | 9,154 | 188 | codeparrot/github-code |
4abfa55524a0e57c3468fa227fe0bdcc6431a2bbd3165017b8c6c9797b99a194 | <?php
/* ::base.html.twig */
class __TwigTemplate_bc589b2ccded8b3ee626676607edcd3a71d5ca7eb46616c233ff37a9d9bd015e extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = array(
'title' ... | PHP | app/cache/dev/twig/bc/58/9b2ccded8b3ee626676607edcd3a71d5ca7eb46616c233ff37a9d9bd015e.php | Chrispnv/login-crud-symfony2 | mit | 2,214 | 88 | codeparrot/github-code |
06512200afdad43a033d102c8eee25419a59b2e43b0da0d77753911ba132dee5 | # Improve the appointment book program of Exercise P10.22. Give the user the
# option to add new appointments. The user must specify the type of the appointment,
# the description, and the date.
# IMPORTS
from P10_22 import Appointment
class AppointmentBook():
def __init__(self):
self._appointments = []... | Python | Python-For-Everyone-Horstmann/Chapter10-Inheritance/P10_23.py | futurepr0n/Books-solutions | mit | 1,032 | 32 | codeparrot/github-code |
2d81fb43ebd574ff686d50a720ddfbe152b6b317af6cf6de42fcfa497f090348 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>exceptions: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.... | HTML | clean/Linux-x86_64-4.05.0-2.0.1/released/8.7.1+1/exceptions/8.6.0.html | coq-bench/coq-bench.github.io | mit | 6,877 | 165 | codeparrot/github-code |
ce2ff041703bcbbb98ec2edde245cb2d10d11e7e311a2ccabc95eecdefafd7ab | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>schroeder: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.c... | HTML | clean/Linux-x86_64-4.07.1-2.0.6/released/8.12.2/schroeder/8.5.0.html | coq-bench/coq-bench.github.io | mit | 6,867 | 166 | codeparrot/github-code |
c19ff606fbae0deef9fee806638fba006afea98f90873237a5dae1b4c6367750 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>weak-up-to: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.... | HTML | clean/Linux-x86_64-4.09.1-2.0.6/released/8.12.1/weak-up-to/8.9.0.html | coq-bench/coq-bench.github.io | mit | 7,417 | 181 | codeparrot/github-code |
0b13d2ec0453e8b3bed53d8334f8ba27df44a6856e790108f15e38f83c5cb00d | using System.Collections.Generic;
using System.Threading.Tasks;
namespace Citrina
{
internal class StorageApi : IStorageApi
{
public Task<ApiRequest<string>> Get(UserAccessToken accessToken, string key = null, IEnumerable<string> keys = null, int? userId = null)
{
var request = new... | C# | src/Citrina/Api/Categories/StorageApi.cs | khrabrovart/Citrina | mit | 1,710 | 47 | codeparrot/github-code |
f94b9c595839421abd1f852d876a7b8906f2ba064b355e43d3e7b031d6066365 | import backups from './backups';
import databases from './databases';
import logs from './logs';
import modalController from 'utility/modal';
import userUtil from 'utility/user';
import errorHandler from 'error/error_handler';
import * as userActionsCreators from 'actions/user';
import * as dataActionsCreators from 'ac... | JavaScript | frontend/src/api/dataLoader.js | XiaocongDong/mongodb-backup-manager | mit | 3,951 | 115 | codeparrot/github-code |
aeee37ab81b773a92b2dda8cdb774bddcf95d34bc25a06cedc89ae67306054a9 | export type Arguments = {[name: string]: any};
export class Validate {
private entry?: Function;
public static get required(): Validate {
return new Validate(true);
}
public static get optional(): Validate {
return new Validate(false);
}
constructor(
private required... | TypeScript | src/utils/validate.ts | lukasgeiter/gettext-extractor | mit | 5,431 | 172 | codeparrot/github-code |
9e7f2bc8bb21f33a596227bd4b478032a4b2eb9d647cb7daf61282fe59101c57 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>buchberger: 1 m 19 s</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel=... | HTML | clean/Linux-x86_64-4.05.0-2.0.6/extra-dev/8.10.dev/buchberger/8.10.0.html | coq-bench/coq-bench.github.io | mit | 17,926 | 267 | codeparrot/github-code |
9b5dd8c4af39d6298f816d4496b23a2339efff742da23475b0d19e129cec7b3e | <?php
namespace CentralApps\Pagination;
trait PdoTrait
{
protected $pagination = null;
/**
* Prepare a statement with pagination
* @param string $statement
* @param $pagination
* @param array $driver_options
* @return \PdoStatement
*/
public function prepareWithPagination($st... | PHP | src/CentralApps/Pagination/PdoTrait.php | CentralApps/Pagination | mit | 4,932 | 159 | codeparrot/github-code |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.