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 |
|---|---|---|---|---|---|---|---|---|
1ee9b9e39da61180bcb635fd03a39ab0fe4066d187e125ed05975df7b1531340 | ////////////////////////////////////////////////////////////////////////////////
/// ///
/// AliFemtoShareQualityCorrFctn - A correlation function that saves the ///
/// amount of sharing and splitting hits per pair as a function of qinv ... | C | PWGCF/FEMTOSCOPY/AliFemtoUser/AliFemtoShareQualityCorrFctn.h | jgronefe/AliPhysics | bsd-3-clause | 1,785 | 51 | codeparrot/github-code |
20a45468ad0fb46fbe41287600de6bf5c3003199584cb5506571f3019e441bc8 | import datetime
import time
from django.core.exceptions import ObjectDoesNotExist
from django.db import models
from django.db.models import Q
from django.db.models.signals import pre_save
from django.contrib.contenttypes.fields import GenericRelation
from django.contrib.auth.models import User
from tidings.models imp... | Python | kitsune/forums/models.py | anushbmx/kitsune | bsd-3-clause | 13,732 | 390 | codeparrot/github-code |
256f657b040bb50ecbb61542b25d9e2da8c6be8d49d103c861b8edac9781867e | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_POPUP_CONTENTS_VIEW_H_
#define CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_POPUP_CONTENTS_VIEW_H_
#includ... | C | chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.h | junmin-zhu/chromium-rivertrail | bsd-3-clause | 7,509 | 189 | codeparrot/github-code |
24986fc7a5d58d4577da93f71db6bc566fc1449f3420221d7be813633705abe1 | /***********************************************************************************************************************
* DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products. No
* other uses are authorized. This software is owned by Renesas El... | C | net/r_t4_rx/T4_src/ether.c | hirakuni45/RX | bsd-3-clause | 25,762 | 728 | codeparrot/github-code |
43e13d454b3ab5feee93d735cd5654b15376ad1d8d340631fda64905d5d735e2 | {-# LANGUAGE MultiParamTypeClasses, FlexibleInstances,
PatternGuards #-}
module Idris.Core.Evaluate(normalise, normaliseTrace, normaliseC, normaliseAll,
rt_simplify, simplify, specialise, hnf, convEq, convEq',
Def(..), CaseInfo(..), CaseDefs(..),
Accessibili... | Haskell | src/Idris/Core/Evaluate.hs | ctford/Idris-Elba-dev | bsd-3-clause | 40,466 | 930 | codeparrot/github-code |
74a3b42e5ef60bc786927e9924c6d4ef1cda66729bf82789acc8da3adf72b16e | package org.gearman;
import org.gearman.JobServerPoolAbstract.ConnectionController;
import org.gearman.core.GearmanConnection;
import org.gearman.core.GearmanPacket;
import org.gearman.core.GearmanPacket.Magic;
import org.gearman.util.ByteArray;
/**
* The {@link GearmanJob} implementation for the {@link GearmanFunct... | Java | src/org/gearman/WorkerJob.java | fwix/java-gearman | bsd-3-clause | 3,036 | 93 | codeparrot/github-code |
cb96116f0cab68ea0bf4fd455f85e5fbce15e3d7f503925eb0b65ac4c5f82ca4 | #ifndef DB_CLUSTER_H
#define DB_CLUSTER_H
#include <stdint.h>
#include <assert.h>
#include <util/atomic.h>
#include <raft/raft.pb.h>
namespace db {
class Cluster {
public:
explicit Cluster(const raft::Config &config)
: config_(config) {
util::atomic_set(&refs_, 0);
}
/*
* Reference... | C | maya/db/cluster.h | jgli/maya | bsd-3-clause | 991 | 53 | codeparrot/github-code |
0ae8cdb68e9674776cbe80377da78799839cd5bf55ef0bfdd3da3f9d80cb8c70 | /* IEEE754 floating point arithmetic
* single precision
*/
/*
* MIPS floating point support
* Copyright (C) 1994-2000 Algorithmics Ltd.
*
* ########################################################################
*
* This program is free software; you can distribute it and/or modify it
* under the terms of t... | C | virt/arch/mips/math-emu/sp_mul.c | talnoah/android_kernel_htc_dlx | gpl-2.0 | 4,799 | 171 | codeparrot/github-code |
dcbb5f92f523a00668e74786b42aa6842cf3f87b5a01dda624af0e97a7bdbf44 | // Copyright (c) 2015-2021 The btcsuite developers
// Copyright (c) 2015-2021 The Decred developers
package btcec
import (
secp "github.com/decred/dcrd/dcrec/secp256k1/v4"
)
// JacobianPoint is an element of the group formed by the secp256k1 curve in
// Jacobian projective coordinates and thus represents a point on... | GO | btcec/curve.go | btcsuite/btcd | isc | 2,476 | 64 | codeparrot/github-code |
0ba14245212b5a9228240d42071529840b1bccea98207836d5918c5b54ba5cf4 | /* Gobby - GTK-based collaborative text editor
* Copyright (C) 2008-2014 Armin Burgmeier <armin@arbur.net>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in al... | C++ | code/core/applicationactions.hpp | dagopoot/gobby | isc | 1,288 | 40 | codeparrot/github-code |
dccac5d459e5a1cefbfc87657f1ffa8a6eedd7ea44f65b6783d5d8f4d275bb70 | /* $OpenBSD: monitor.c,v 1.157 2016/02/15 23:32:37 djm Exp $ */
/*
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
* Copyright 2002 Markus Friedl <markus@openbsd.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the... | C | FreeBSD/crypto/openssh/monitor.c | TigerBSD/TigerBSD | isc | 51,434 | 2,059 | codeparrot/github-code |
a2e7da0c734cf7929bb80b7d475764e2426a0e25c66d958ac3ec4c1974c29d6a | /*-
* Copyright (c) 2014 The FreeBSD Foundation
* All rights reserved.
*
* This software was developed by Semihalf under
* the sponsorship of the FreeBSD Foundation.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are... | C | FreeBSD/sys/arm/include/debug_monitor.h | eriknstr/ThinkPad-FreeBSD-setup | isc | 2,642 | 91 | codeparrot/github-code |
051ffd49b0a109b6304d490681951a2ac8276970a1f3d2eb31b07c8967b6c552 | /*
* mtcc.c -- Multi Command Context implementation. This allows
* performing many operations without a working copy.
*
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See... | C | FreeBSD/contrib/subversion/subversion/libsvn_client/mtcc.c | TigerBSD/TigerBSD | isc | 46,594 | 1,430 | codeparrot/github-code |
06fefe1c22bd285325e15516d7b10f2d0cf6496244f2fe539e1f850e00ba6f78 | import os, logging
from PIL import Image
from sqlalchemy.orm.session import object_session
from sqlalchemy.orm.util import identity_key
from iktomi.unstable.utils.image_resizers import ResizeFit
from iktomi.utils import cached_property
from ..files import TransientFile, PersistentFile
from .files import FileEventHandle... | Python | iktomi/unstable/db/sqla/images.py | Lehych/iktomi | mit | 5,666 | 147 | codeparrot/github-code |
7e3954f432ff675a76533bbc6ee127e3727eb61338f98ea5d8d00eff0319469b | module VegaServer::IncomingMessages
module Relayable
include VegaServer::Storageable
attr_reader :payload
def initialize(websocket, payload)
@websocket = websocket
@payload = payload
@peer_id = @payload[:peer_id]
end
def handle
VegaServer::OutgoingMessages.send_messa... | Ruby | lib/vega_server/incoming_messages/relayable.rb | zuzmo/vega_server_ruby | mit | 721 | 40 | codeparrot/github-code |
b9958126dfd8eb28751129f42bae0a3e3c106dc9a4d30feb6a764f48a40f9f19 | t = int(raw_input())
MOD = 10**9 + 7
def modexp(a,b):
res = 1
while b:
if b&1:
res *= a
res %= MOD
a = (a*a)%MOD
b /= 2
return res
fn = [1 for _ in xrange(100001)]
ifn = [1 for _ in xrange(100001)]
for i in range(1,100000):
fn[i] = fn[i-1] * i
fn[i] %... | Python | Qualification_Round_2/Editorials/array_simp_2.py | ManrajGrover/CodeSprint_India_2014 | mit | 683 | 31 | codeparrot/github-code |
63fca2c57cfab21ac5b23a5af3a107aea09639422e1cd224008f6f5c58266e02 | package picard.fingerprint;
import htsjdk.samtools.metrics.MetricsFile;
import org.testng.Assert;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import picard.cmdline.CommandLineProgramTest;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.... | Java | src/test/java/picard/fingerprint/CalculateFingerprintMetricsTest.java | broadinstitute/picard | mit | 3,721 | 84 | codeparrot/github-code |
cb6d78eac5999b3004265a887b00a1adcd945467493206f47ad8f13fe78fa834 | import 'core-js';
import 'core-js/es7/reflect';
import 'zone.js/dist/zone';
import 'zone.js/dist/long-stack-trace-zone';
import 'zone.js/dist/async-test';
import 'zone.js/dist/fake-async-test';
import 'zone.js/dist/sync-test';
import 'zone.js/dist/proxy';
import 'zone.js/dist/jasmine-patch';
// Unfortunately there's n... | TypeScript | tests.bundle.ts | ngrx/db | mit | 1,153 | 35 | codeparrot/github-code |
ed7f7da99b6d9c3b1b0100e796d611495c9b5a0ba0d441e915b0b7cb150c010b | require 'cucumber/formatter/console'
require 'cucumber/formatter/io'
require 'fileutils'
begin
require 'rubygems'
require 'prawn/core'
require "prawn/layout"
rescue LoadError => e
e.message << "\nYou need the prawn gem. Please do 'gem install prawn'"
raise e
end
module Cucumber
module Formatter
BLACK... | Ruby | lib/cucumber/formatter/pdf.rb | jarib/cucumber | mit | 6,890 | 245 | codeparrot/github-code |
0c8d3a48b359b200af44919491aa2ac5c9767f6b9fa65ed9360a0639fdf2abf2 | import { Serializer } from "./jsonobject";
import { Question } from "./question";
import { Base, SurveyError, ISurveyImpl } from "./base";
import { ItemValue } from "./itemvalue";
import { Helpers, HashTable } from "./helpers";
import { surveyLocalization } from "./surveyStrings";
import { OtherEmptyError } from "./err... | TypeScript | src/question_baseselect.ts | surveyjs/surveyjs | mit | 33,102 | 1,019 | codeparrot/github-code |
f307e9e2382e3fc7dc2bcad8ee7e6af6f640e5342e55a2bf90ffc30420b82026 | import {
ChangeDetectorRef,
SimpleChanges,
NgZone,
} from '@angular/core';
import {highlightTime} from '../../utils/configuration';
const initialTimespan = highlightTime;
export abstract class Highlightable {
isUpdated = false;
private timespan = initialTimespan; // scales down
private resetUpdateState... | TypeScript | src/frontend/utils/highlightable.ts | rangle/batarangle | mit | 1,438 | 71 | codeparrot/github-code |
2727d3345b7f06913a459cf34486b0659d02f93734bbff6abdd4cdc57741a50a | namespace Microsoft.Protocols.TestSuites.SharedAdapter
{
using System;
using Microsoft.Protocols.TestSuites.Common;
using Microsoft.Protocols.TestTools;
/// <summary>
/// A class contains methods which capture requirements related with Cell Sub-request.
/// </summary>
public sealed partial ... | C# | FileSyncandWOPI/Source/SharedTestSuite/SharedAdapter/CaptureCode/FSSHTTP/MsfsshttpCellSubRequestCapture.cs | XinwLi/Interop-TestSuites-1 | mit | 11,228 | 199 | codeparrot/github-code |
bbe40e66744393f372ef581a3c4abe3d62d30e1014b52fb501f2acb85d9f6d87 | import webpack from "webpack"
import { spawn } from "child_process"
import appRootDir from "app-root-dir"
import path from "path"
import { createNotification } from "./util"
import HotServerManager from "./HotServerManager"
import HotClientManager from "./HotClientManager"
import ConfigFactory from "../webpack/Confi... | JavaScript | src/hotdev/HotController.js | sebastian-software/edgestack | mit | 4,927 | 196 | codeparrot/github-code |
af30423c713031f47dea9015642638fa624072cccea4957a8a91eb8056f9747a | /**
* @file
* IGMP - Internet Group Management Protocol
*
*/
/*
* Copyright (c) 2002 CITEL Technologies Ltd.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of s... | C | app/lwip/core/ipv4/igmp.c | nodemcu/nodemcu-firmware | mit | 28,067 | 846 | codeparrot/github-code |
c83f14765ecc619a47cf5dcfdb8b5cf1bbec3dbcda738346dfda9530b0a30f7a | /*------------------------------------------------------------------------*/
/* */
/* LISTIMP.H */
/* */
/* Copy... | C++ | tools/BORLANDC/CLASSLIB/INCLUDE/LISTIMP.H | gandrewstone/GameMaker | mit | 17,753 | 592 | codeparrot/github-code |
1b259ccb86098a705258597ba8cff065e0686a7f4bcb764b2e640182b5c167ab | # encoding: utf-8
module FFaker
module PhoneNumberKR
extend ModuleUtils
extend self
HOME_PHONE_PREFIXES =
%w(02 031 032 033 041 042 043 044 049 051 052 053 054 055 061 062 063 064).freeze
MOBILE_PHONE_PREFIXES = %w(010 011 016 019).freeze
def phone_number
case rand(2)
when 0 t... | Ruby | lib/ffaker/phone_number_kr.rb | 44uk/ffaker | mit | 1,119 | 51 | codeparrot/github-code |
cff133984f8e247db5be43af5cf5b617bb034dd79fddc425190faee7c55d1593 |
package ar.com.javacuriosities.ws.gen.service.jaxws;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
@XmlRootElement(name = "getIpA... | Java | JavaEE/JavaWebServices/JAX-WS/WSGenBasics/src/main/java/ar/com/javacuriosities/ws/gen/service/jaxws/GetIpAddressResponse.java | ldebello/javacuriosities | mit | 962 | 37 | codeparrot/github-code |
f18854cd3904f78757685ddce6fe65704a92c719f48e98f6268c1bdaf6d0f096 | package delta.java
import delta.{
Tick, Revision, Channel,
Transaction, EventStore,
MessageTransport, MessageTransportPublishing
}
import scuff.StreamConsumer
import scala.concurrent.Future
trait PublishingEventStore[ID, EVT]
extends EventStore[ID, EVT]
with MessageTransportPublishing[ID, EVT]
object Publish... | Scala | delta-java/src/main/scala/delta/java/PublishingEventStore.scala | nilskp/ulysses | mit | 2,829 | 68 | codeparrot/github-code |
6fea764e743d5e2af6ce3183a952902be4bef02ddf8743d503f717d86e3cc8db | module AASM::Core
class State
attr_reader :name, :state_machine, :options
def initialize(name, klass, state_machine, options={})
@name = name
@klass = klass
@state_machine = state_machine
update(options)
end
def ==(state)
if state.is_a? Symbol
name == state
... | Ruby | lib/aasm/core/state.rb | HoyaBoya/aasm | mit | 1,776 | 83 | codeparrot/github-code |
8dfe67517c2781a6b1acbf9dc7b35aaf97bd7fff9c88f57732d4bf87874f42e2 | <?php
/**
* TOP API: taobao.fenxiao.dealer.requisitionorder.refuse request
*
* @author auto create
* @since 1.0, 2013-09-13 16:51:03
*/
class Taobao_Request_FenxiaoDealerRequisitionorderRefuseRequest {
/**
* 采购申请/经销采购单编号
**/
private $dealerOrderId;
/**
* 驳回原因(1:价格不合理;2:采购数量不合理;3:其他原因)
**/
private $r... | PHP | php/code/yaf/application/library/Taobao/Request/FenxiaoDealerRequisitionorderRefuseRequest.php | musicsnap/LearnCode | mit | 1,558 | 74 | codeparrot/github-code |
7003aeda160bd916e0c075e49d3a34f97bebe4c6a97591f11a30a28c4131c8c4 | // Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MOJO_SHELL_NATIVE_RUNNER_H_
#define MOJO_SHELL_NATIVE_RUNNER_H_
#include "base/callback_forward.h"
#include "base/memory/scoped_ptr.h"
#include "... | C | src/mojo/shell/native_runner.h | junhuac/MQUIC | mit | 1,403 | 50 | codeparrot/github-code |
60e6167599f5a4a8ca4b06b4bf04fe3d894e5881e250c11a9c5d8a4b0fcd7c50 | //Copyright (C) 2014 Tom Deseyn
//This library is free software; you can redistribute it and/or
//modify it under the terms of the GNU Lesser General Public
//License as published by the Free Software Foundation; either
//version 2.1 of the License, or (at your option) any later version.
//This library is distribut... | C# | src/Tmds.Sdp/Tmds/Sdp/NetworkInterface.cs | bbc/sdp-test | mit | 2,544 | 73 | codeparrot/github-code |
e84d0efaf4e020e6271543ef3d6697b7f84be27eb480f850f98498d17eb662bd | // pmex__ChunkMinMax.c
//
// Find min and max element of sub-vectors
// [Mins, Maxs] = ChunkMinMax(X, Start, Stop)
// INPUT:
// X: Real double array.
// Start, Stop: Vectors of type double.
// Valid: If this is the string 'valid', X cannot contain NaNs and the
// function runs 10% faster. Optional, de... | C | +sl/+plot/+big_data/@LinePlotReducer/private/mex_chunkMinMax/pmex__chunkMinMax.c | GregGoldman/matlab_standard_library | mit | 7,547 | 234 | codeparrot/github-code |
733faff97c3ae0f16b146d823c106a770e91303e73fde144abe41d31e3ca4a9d | class UsersController < ApplicationController
# before_action :set_user, only: [:guchi, :jiman, :inori, :index, :show, :edit, :update, :destroy]
before_action :logged_in_user, only: [:guchi, :jiman, :inori, :index, :show, :edit, :update, :destroy]
def list
@msg = 'Users cont. list アクション'
@user = User.fin... | Ruby | app/controllers/users_controller.rb | chubachi-pt-2017/StressShredder | mit | 2,107 | 95 | codeparrot/github-code |
cce2768a2a9985dc3ccc1b5d45758bf395b2812b2ae12f00ab9b29c56aa192e1 | // @flow
var React = require('react')
var {assign} = require('lodash')
import {Source, emptySource} from './model/source'
import {displayIf, Colors} from './style'
// but get the images at 2x resolution so they can be retina yo
// or just get the photos at that ratio
// 200x320 x2
// 150x240
// 100x160
// Blank Imag... | JavaScript | web/app/cover.js | seanhess/serials | mit | 2,205 | 112 | codeparrot/github-code |
545cbfd265fc30861e0a317f3ba822a76ae21e415ffa5974288dcf5d20f03bf5 | define([
'jquery',
'underscore',
'backbone',
'views/AdminView',
'authentication',
'models/Beach'
], function ( $, _, Backbone, AdminView, Authentication, BeachModel) {
var AdminRouter = Backbone.Router.extend({
routes: {
'admin' : 'index... | JavaScript | clients/web/js/routers/AdminRouter.js | alex-driedger/Nurdles | mit | 1,209 | 36 | codeparrot/github-code |
91cc63b2952f017192a68bb23b1fc61098bb6d031803bb1ad6a74afa935c94a6 | from datetime import datetime, timedelta
from time import sleep
from random import uniform
class SleepSchedule(object):
"""Pauses the execution of the bot every day for some time
Simulates the user going to sleep every day for some time, the sleep time
and the duration is changed every day by a random of... | Python | pokemongo_bot/sleep_schedule.py | bbiiggppiigg/PokemonGo-Bot | mit | 7,614 | 185 | codeparrot/github-code |
7e9f83406f3958b9c0d991af58415411cb366d0004657d31ccfa75e3b39338c4 | <style type="text/css">
</style>
<div id="footer-large">
<div id="footer" role="contentinfo clearfix" class="non-burger-footer" style="position: relative;">
<div class="content-asset">
<footer id="siteFooter" class="y-shop footerOverlay">
<?php include('contact-bottom.php'); ?>
... | PHP | application/views/includes/footer_2016_09_29.php | sygcom/diesel_2016 | mit | 28,077 | 501 | codeparrot/github-code |
43355a4b058054cc56ea14cc1530f4a371d91bbe66be9c54681f859e974deec2 | /******************************************************************************
* $Id: gdaldrivermanager.cpp 27121 2014-04-03 22:08:55Z rouault $
*
* Project: GDAL Core
* Purpose: Implementation of GDALDriverManager class.
* Author: Frank Warmerdam, warmerdam@pobox.com
*
*************************************... | C++ | gdal-1.11.0/gcore/gdaldrivermanager.cpp | tilemapjp/OSGeo.GDAL.Xamarin | mit | 30,311 | 839 | codeparrot/github-code |
b6e732f881a6502f3367b2285de8abbb4f4e38ca34b4ff51e870767dbcce5e4c | #ifndef __V3S_REG_DE_H__
#define __V3S_REG_DE_H__
#include <types.h>
#define V3S_DE_BASE (0x01000000)
#define V3S_DE_MUX_GLB (0x00100000 + 0x00000)
#define V3S_DE_MUX_BLD (0x00100000 + 0x01000)
#define V3S_DE_MUX_CHAN (0x00100000 + 0x02000)
#define V3S_DE_MUX_VSU (0x00100000 + 0x20000)
#define V3S_DE_MUX_GSU1 ... | C | src/arch/arm32/mach-z11s/include/v3s/reg-de.h | xboot/xboot | mit | 1,837 | 97 | codeparrot/github-code |
cc9acbc7d250da4b2101e54131408bf11dda1536135a2d1fe7764fd11a6fa324 | (function ($) {
var smileys = [
":(",
":)",
":O",
":D",
":p",
":*",
":-)",
":-(",
":-O",
":-D"
],
extras = {
"<3": true,
"<3": true
},
smileParts = {
"O": "middle-mouth",
"D": "middle-mouth",
"d": "middle-mouth",
"p": "low-mouth",
"*": "high-mouth",
"-":... | JavaScript | smileys/js/smileys.js | daltonrowe/daltonrowe.github.io | mit | 2,469 | 113 | codeparrot/github-code |
59d6bdcc3c79e36adc467e00911c152b48e042095976b12e04d1fde92785ccd6 | /*
* jQuery UI 1.7.2
*
* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
* http://docs.jquery.com/UI
*/
(function($) {
var _remove = $.fn.remove,
isFF2 = $.browser.mozilla && (parseFloat($.browser.version) < 1.9... | JavaScript | public/javascripts/jquery/ui/tabs.js | nazar/wasters | mit | 32,986 | 1,205 | codeparrot/github-code |
d237044ff7575a34eabadc5755acfc00e5c29dc86ef4f0b477193101ea285976 | /*
A proxy for observing object state changes.
var obj={person:'Eddie',age:22};
_o.onUpdate(obj,{
age:function(value){
if(value>this.oldValue)
console.log('Happy birthday, Peter!')
},
person:function(value){
console.log(this.oldValue+' is now '+value);
}
});
_o(obj).person='Peter';
//> Eddie is... | JavaScript | observing-proxy.js | ytiurin/observingproxy | mit | 9,561 | 366 | codeparrot/github-code |
1822e4f85a4a1452a238ace00ef59d56d290912c9b178b74ff1dd9007d463b6f | import { Context } from '../../../src/context/Context';
describe('Context', () => {
describe('Response', () => {
it('should return the response object', () => {
const res: any = 1;
const context = new Context(undefined, res, undefined, undefined);
expect(context.Respons... | TypeScript | test/unit/context/context.spec.ts | w3tecch/express-graphql-typescript-boilerplate | mit | 1,786 | 49 | codeparrot/github-code |
133df5cae97c7ac9b26c82ed64f8039f227bffba17e6cdb5d864fd485467e2b3 | from .base import DerivedType
from categorical import CategoricalComparator
from .categorical_type import CategoricalType
class ExistsType(CategoricalType) :
type = "Exists"
_predicate_functions = []
def __init__(self, definition) :
super(CategoricalType, self ).__init__(definition)
... | Python | dedupe/variables/exists.py | tfmorris/dedupe | mit | 1,117 | 36 | codeparrot/github-code |
414f379c685e1f7ea5b9d7860fe72ccb8cd7f4df325a9ce6821681874d71d37f | using System;
namespace Cooking.CookingProducts
{
public abstract class Vegetable
{
public Vegetable()
{
this.IsRotten = false;
this.IsPeeled = false;
this.IsCut = false;
this.IsCooked = false;
}
public bool IsRotten { get; set; ... | C# | MyTelerikAcademyHomeWorks/HighQualityCode/HW6.ControlFlow-ConditionalStatements-And-Loops/HW6.CtrlFlowConditionalStatementsAndLoops/Cooking/CookingProducts/Vegetable.cs | studware/Ange-Git | mit | 1,014 | 47 | codeparrot/github-code |
76c67a968b3a768abffaf286c95db58093774918abad3697d8cc68ff8aa8b5a3 | // This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) Microsoft Corporation
// All rights reserved.
//
// This source code is only intended as a supplement to the
// Microsoft Foundation Classes Reference and related
// electronic documentation provided with the library.
// See these sourc... | C | module/include/atlmfc/afxtoolbardropsource.h | pvpgn/pvpgn-magic-builder | mit | 1,387 | 63 | codeparrot/github-code |
e82c53fe084531d51b7dd60830deca3021d079d421ffcdb94acc467757dd8422 | import sys, os
import pickle
import nltk
import paths
from utils import *
def words_to_dict(words):
return dict(zip(words, range(0, len(words))))
nltk.data.path.append(paths.nltk_data_path)
use_wordnet = True
if use_wordnet:
stemmer = nltk.stem.wordnet.WordNetLemmatizer()
stem = stemmer.lemmatize
else... | Python | www/backend/infer.py | mgree/tmpl | mit | 3,314 | 134 | codeparrot/github-code |
533ec7138af9f0ad47e9cc3a2f7ff4435d5b396a8a136565fdd9e4ed05e1add2 | #include <QApplication>
#include "guiutil.h"
#include "bitcoinaddressvalidator.h"
#include "walletmodel.h"
#include "bitcoinunits.h"
#include "util.h"
#include "init.h"
#include <QDateTime>
#include <QDoubleValidator>
#include <QFont>
#include <QLineEdit>
#if QT_VERSION >= 0x050000
#include <QUrlQuery>
#else
#inclu... | C++ | src/qt/guiutil.cpp | whatevercode/logicoin | mit | 16,271 | 536 | codeparrot/github-code |
e9a000c2f7ff7fe2b88dca880a3601bf1440081b1b54138a0f5269063db4a8f5 | """calibrated_image.py was written by Ryan Petersburg for use with fiber
characterization on the EXtreme PREcision Spectrograph
"""
import numpy as np
from .base_image import BaseImage
from .numpy_array_handler import filter_image, subframe_image
class CalibratedImage(BaseImage):
"""Fiber face image analys... | Python | fiber_properties/calibrated_image.py | rpetersburg/fiber_properties | mit | 11,258 | 295 | codeparrot/github-code |
05f2fd812cb28931b9ec82c48fd9528014b3849d91abf354741cda9bd2bc07a7 | using Exrin.Abstraction;
using Exrin.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TeslaDefinition.Interfaces.Model;
using TeslaDefinition.Model;
using Xamarin.Forms;
namespace Tesla.ViewModel.MainTabs
{
public class ServiceVisual... | C# | Tesla/Tesla/Tesla/ViewModel/MainTabs/ServiceVisualState.cs | adamped/Tesla-Mobile-App | mit | 1,505 | 66 | codeparrot/github-code |
b339bd639d2dd0d5668a80b23cd18db294e67770b3820b5d32282fd71d4e314f | ---
layout: documentation
doc-tab: elements
doc-subtab: table
---
{% include subnav-elements.html %}
<section class="section">
<div class="container">
<h1 class="title">Tables</h1>
<h2 class="subtitle">The inevitable HTML <strong>table</strong>, with special case cells</h2>
<hr>
<div class="conten... | HTML | student/bulma-0.4.1/docs/documentation/elements/table.html | Minatohokage4/JUDGE | mit | 14,422 | 516 | codeparrot/github-code |
ed7ca84ffce76c95df308302086e772a45acae8d7ebc1be8d61fb7bb47f6829c | // Director.h
//
// Director object
// MenuItem
//
// a menu item
struct MenuItem
{
TCHAR Text[MAX_PATH]; // text for menu
TCHAR Verb[MAX_PATH]; // verb for command - open, explore, menu, uninstall, back
TCHAR Document[MAX_PATH]; // document/executable for command
TCHAR Directory[MAX_PATH]; // direc... | C | fallen/AutoRun/Director.h | kstuedem/MuckyFoot-UrbanChaos | mit | 2,013 | 73 | codeparrot/github-code |
b1c61493ed9b28ea039d76532972677ac4dc5cb6e09f8634bbcb946194a71ded | package example;
//-*- mode:java; encoding:utf-8 -*-
// vim:set fileencoding=utf-8:
//@homepage@
import java.awt.*;
import java.awt.datatransfer.*;
import java.awt.dnd.*;
import java.awt.event.*;
import java.io.IOException;
import java.util.*;
import java.util.List;
import javax.activation.*;
import javax.swing.*;
impo... | Java | DnDReorderTable/src/java/example/MainPanel.java | mhcrnl/java-swing-tips | mit | 7,343 | 185 | codeparrot/github-code |
86aacc0cd6df8d1958880e93eec5ce2adc0e5631b21757b548ee0c3fcc74a46e | module Vagrant
class VM
include Vagrant::Util
attr_reader :env
attr_reader :name
attr_reader :vm
class << self
# Finds a virtual machine by a given UUID and either returns
# a Vagrant::VM object or returns nil.
def find(uuid, env=nil, name=nil)
vm = VirtualBox::VM.find(... | Ruby | lib/vagrant/vm.rb | simonsd/vagrant | mit | 4,595 | 181 | codeparrot/github-code |
78595b5834eff68170325e6d99d84038acb45ad494bd6f25133d2267debb9810 | package de.justsoftware.toolbox.testng;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import com.google.common.collect.FluentIterable;
import com.google.common.collect.Iterat... | Java | just-java-test-toolbox/src/main/java/de/justsoftware/toolbox/testng/DataProviders.java | bjrke/just-java-toolbox | mit | 3,248 | 116 | codeparrot/github-code |
92ee64e0727784d2d907b304eccba98a7da1edeb4c65a6ece39b0b51a55476e6 | using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Reactive;
using Microsoft.Xna.F... | C# | WP7AccelerometerSample/WP7AccelerometerSample/AccelerometerObservable.cs | jwooley/RxSamples | mit | 1,389 | 38 | codeparrot/github-code |
bb8abd190ee5d0a44b282f748657a813ddc288c8542b2f9255e636c98b2d553a | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#nullable enable
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Mic... | C# | src/Features/Core/Portable/SolutionCrawler/WorkCoordinator.AsyncProjectWorkItemQueue.cs | genlu/roslyn | mit | 4,019 | 106 | codeparrot/github-code |
b39d985c185f34eed6ba92f94d943bca4d42049485637455c34f3f4806b2486e | /* GTK - The GIMP Toolkit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the Lice... | C | src/gtk/include/linux/gtk-3.0/gtk/gtkalignment.h | neohung/smallgame | mit | 3,541 | 108 | codeparrot/github-code |
dfcf84ee374ccfce9f9a369914f8b5531f14d7250073434e76f416387a87ef57 |
/* A Bison parser, made by GNU Bison 2.4.1. */
/* Skeleton implementation for Bison's Yacc-like parsers in C
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the... | C++ | Engine/addons/materialmaker/parser/GenesisShaderBison.cpp | EngineDreamer/DreamEngine | mit | 72,460 | 2,471 | codeparrot/github-code |
2877d215d0e2b215cfec5b5c07a40c5d0bc46c9d48be6d67c5ff9eb7c60de33a | import org.apache.commons.csv.CSVFormat;
import org.apache.commons.csv.CSVRecord;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;
/**
* Created by Linty on 2/12/2017.
* 用 apache的 commons-csv 的公共类,编写一个适用于用例中读取Csv的方法
*/
public class CsvUtility {
... | Java | SealSelenium/src/main/java/CsvUtility.java | lintyleo/seleniumpro | mit | 935 | 38 | codeparrot/github-code |
c554454ef51f5f761639a0918ea5411fef85d1ce9fbf78b593023340ef04037c | /*
---------------------------------------------------------------------------
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
Copyright (c) 2006-2020, assimp team
All rights reserved.
Redistribution and use of this software in source and binary forms,... | C++ | Engine/lib/assimp/code/PostProcessing/MakeVerboseFormat.cpp | Bloodknight/Torque3D | mit | 8,769 | 256 | codeparrot/github-code |
db1fecf2ee9534afa3c0baf61a240804db4d44ab24558a5ecd826de6ca716fb8 | from collections.abc import Iterable
from django import template
from django.db.models import Model
register = template.Library()
@register.filter
def get_type(value):
# inspired by: https://stackoverflow.com/a/12028864
return type(value)
@register.filter
def is_model(value):
return isinstance(value, ... | Python | amy/autoemails/templatetags/type_extras.py | pbanaszkiewicz/amy | mit | 555 | 33 | codeparrot/github-code |
817f077651b221c5b67f508fb729a7669aa10716409de5e8399fdae0256fc2bd | using System.Diagnostics.Contracts;
using JetBrains.DocumentModel;
using JetBrains.ReSharper.Daemon;
using JetBrains.ReSharper.Feature.Services.Daemon;
using JetBrains.ReSharper.Psi.CSharp;
using JetBrains.ReSharper.Psi.CSharp.Tree;
using ReSharper.ContractExtensions.ProblemAnalyzers.PreconditionAnalyzers.MalformContr... | C# | ContractExtensions/ProblemAnalyzers/PreconditionAnalyzers/MalformContractAnalyzers/CodeContractErrorHighlighting.cs | Diagonactic/ReSharperContractExtensions | mit | 2,489 | 75 | codeparrot/github-code |
e1825d1b03989b91a72dcbc8abeb2736b3b2e6884da92a2241545fa7e2491d5c | /***************************************************************************//**
\file Fit.h
\brief Contains all the routines that do the Torus fitting.
*/
/*
* *
* Fit.h ... | C | src/Fit.h | PaulMcMillan-Astro/TorusLight | mit | 15,952 | 317 | codeparrot/github-code |
3dd677a6b7fe887ce371b3b5564a69f52b7f7a9ce025e3e1ce1e43bfb5c4ac97 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>CREATE FUNCTION</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REV="MADE"
HREF="mailto:pgsql-docs@postgresql.org"><LINK
REL="HOME"
TITLE="PostgreSQL 9... | HTML | ogamebotserver/src/main/resources/databases/postgres/share/doc/postgresql/html/sql-createfunction.html | unsupo/ogame | mit | 35,009 | 1,640 | codeparrot/github-code |
682b2382a093070e26a181703434e579af75eedd735f8d9db3983abb121e5d44 | import { Component, OnInit, Optional, ViewEncapsulation, Input, NgZone, OnChanges } from '@angular/core';
import { FormioAppConfig } from '../../formio.config';
import { Formio, Form } from 'formiojs';
import { FormioBaseComponent } from '../../FormioBaseComponent';
import { CustomTagsService } from '../../custom-compo... | TypeScript | projects/angular-formio/src/components/formio/formio.component.ts | formio/angular-formio | mit | 1,144 | 34 | codeparrot/github-code |
fb286042e4fb6d98675d3fe32b10dd7a554bfdecd243bbcc428d9253e81cedca | @ECHO OFF
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set BUILDDIR=_build
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
set I18NSPHINXOPTS=%SPHINXOPTS% .
if NOT "%PAPER%" == "" (
set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS... | Batchfile | docs/make.bat | ckuethe/micropython-mlx90614 | mit | 6,741 | 243 | codeparrot/github-code |
c94f96dc5cfaafb5043d9044bfb1b1fa23a98831b9804f9115bece7c905b4874 | // Copyright (c) 2011-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef RPCCONSOLE_H
#define RPCCONSOLE_H
#include "guiutil.h"
#include "net.h"
#include "peertablemodel.h"
#include <QWidg... | C | src/qt/rpcconsole.h | mergecoin-project/Mergecoin-master | mit | 3,760 | 131 | codeparrot/github-code |
1a658323360a6726c94b83bddbd3c2d39cb4a5c20fcd2112f499a164ad22d1e7 |
// .\Release\x64\benchmarks.exe --benchmark_repetitions=10 --benchmark_min_time=2 --benchmark_filter=FastSinCos // NOLINT(whitespace/line_length)
#include "numerics/fast_sin_cos_2π.hpp"
#include <pmmintrin.h>
#include <random>
#include <vector>
#include "benchmark/benchmark.h"
#include "quantities/numbers.hpp"
n... | C++ | benchmarks/fast_sin_cos_2π_benchmark.cpp | mockingbirdnest/Principia | mit | 2,980 | 92 | codeparrot/github-code |
795f143c6b671083d6a3347177e7ba2bb1b6e05c8246409df6118e0774847e0b | /*
* TrackingAllocator.h
*
* Created on: May 18, 2013
* Author: tsharpe
*/
#ifndef TRACKINGALLOCATOR_H_
#define TRACKINGALLOCATOR_H_
#include <scoped_allocator>
#include <memory>
class MemUse
{
public:
MemUse( char const* type ) : mType(type) {}
~MemUse()
{ if ( mTotalAllocated > gMinReportSiz... | C | src/feudal/TrackingAllocator.h | bayolau/discovar | mit | 2,781 | 109 | codeparrot/github-code |
187a3143093309dfe92afe60e1b2f41a8c11fafd39fabe4ff503e4c5f910fa67 | <?php
namespace Platformsh\Cli\Command\Variable;
use Platformsh\Cli\Command\PlatformCommand;
use Platformsh\Client\Model\Variable;
use Symfony\Component\Console\Helper\Table;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\Input... | PHP | src/Command/Variable/VariableGetCommand.php | Fredplais/platformsh-cli | mit | 3,918 | 123 | codeparrot/github-code |
bae5eaf038ecd27aaae4bced46077ad0afbee2098af4040457817e8cfccb1452 | -------------------------------------------------
-- Spotify Shell for Awesome Window Manager
-- Simplifies interaction with Spotify for Linux
-- More details could be found here:
-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/spotify-shell
-- @author Pavel Makhov
-- @copyright 2018 Pavel Makhov
---... | Lua | spotify-shell/spotify-shell.lua | streetturtle/AwesomeWM | mit | 1,922 | 76 | codeparrot/github-code |
f5c1677fcbf677ddcd6623976647778197d1c5219767121fa3a41ae93ac6b43a | // Copyright (c) 2011-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "bitcoingui.h"
#include "bitcoinunits.h"
#include "clientmodel.h"
#include "guiconstants.h"
#include "guiutil.h"
#in... | C++ | src/qt/bitcoingui.cpp | NeosStore/riecoin-master | mit | 34,089 | 984 | codeparrot/github-code |
312b5e8fa23e07f9b83ab2fabfd86bfa1b653f837d75505dbe3fd06b03801ca8 | 'use strict';
var Foundationify = (function () {
// Initalize product image gallery function on product pages
function initProductImages() {
// Define the scope
var $productImages = $('#product-images', 'body.product');
// Select the thumbnails
var $thumbs = $('ul img', $productImages);
if ($thumbs.len... | JavaScript | src/scripts/main.js | Leland/foundationify | mit | 1,229 | 57 | codeparrot/github-code |
a61af189d7b97f984a233732b091b9475663bcfe3f8c5360caf09b80d54222cd | <?php namespace CodeIgniter\HTTP;
/**
* CodeIgniter
*
* An open source application development framework for PHP
*
* This content is released under the MIT License (MIT)
*
* Copyright (c) 2014 - 2017, British Columbia Institute of Technology
*
* Permission is hereby granted, free of charge, to any person obta... | PHP | system/HTTP/Request.php | wuzheng40/CodeIgniter4 | mit | 10,113 | 406 | codeparrot/github-code |
461c6ec43efa2fadfdce7f608c1c5615745959481ad4af8f1608d4476a16d354 | // MIT License. Copyright (c) 2016 Maxim Kuzmin. Contacts: https://github.com/maxim-kuzmin
// Author: Maxim Kuzmin
using Makc2017.Core.Caching;
using Makc2017.Core.Caching.Clients;
using Makc2017.Core.Caching.Resources.Errors;
using Makc2017.Core.Execution.Operations.Async;
using Makc2017.Core.Resources.Errors;
usin... | C# | src/Makc2017.Modules.Dummy.Caching/Operations/Item/ModuleDummyCachingOperationItemGet.cs | maxim-kuzmin/Makc2017 | mit | 3,620 | 102 | codeparrot/github-code |
31a1c6f0b8daee0908d73ce989ffec5dfdce81e75d5f8003290686df0ccbb8f6 | "use strict";
var SourceLine_1 = require("../source/SourceLine");
var Prop_1 = require("../entities/Prop");
var Method_1 = require("../entities/Method");
var MethodKind_1 = require("../kind/MethodKind");
var ProgramError_1 = require("../errors/ProgramError");
var ClassDefn_1 = require("../define/ClassDefn");
var Struct... | JavaScript | src/modules/turbo.js/compiler/services/DefinitionService.js | 01alchemist/parallel-js | mit | 7,225 | 156 | codeparrot/github-code |
fb256a22547a8c64fac7a1e8f35ec97155f98d02a648fd70194340be32d58265 | #
# Copyright (c) 2018 ITO SOFT DESIGN 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, publi... | Ruby | plugins/ifttt_plugin.rb | ito-soft-design/escalator | mit | 3,421 | 145 | codeparrot/github-code |
68e12cf659d26a08153f523270a43346f01b86cd46ea56df616afd589d5d044c | from keras.models import Sequential
from keras.layers import convolutional
from keras.layers.core import Dense, Flatten
from SGD_exponential_decay import SGD_exponential_decay as SGD
### Parameters obtained from paper ###
K = 152 # depth of convolutional layers
LEARNING_RATE = .003 # ini... | Python | AlphaGo/models/value.py | wrongu/AlphaGo | mit | 1,711 | 40 | codeparrot/github-code |
937b6fdc57e13b10841592fc032e8ea51978a4756cbd25cdc01e7019517cf23b | require 'pathname'
require 'generator/git_command'
module Generator
module Files
def self.read(filename)
File.read(filename) if File.exist?(filename)
end
class Readable
attr_reader :filename, :repository_root
def initialize(filename:, repository_root: nil)
@filename = filename
... | Ruby | lib/generator/files.rb | Insti/xruby | mit | 1,046 | 52 | codeparrot/github-code |
ab68c76a18b338486bef421cf77983bca0d61183ab39de0bfcae1b8277148ec8 | package it.gemmed.database;
import it.gemmed.resource.Iscrizione;
import java.sql.Array;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
/**
* Crea una nuova iscrizione all'interno del database. Sono richiesti solo i campi
* not NULL, per settare gli altri ca... | Java | trunk/src/java/it/gemmed/database/CreateIscrizioneDatabase.java | manuel-zulian/Match-Point | mit | 1,902 | 80 | codeparrot/github-code |
c548014a233616d9008ce3f496277491a806150de68ec93733c4d699383383ac | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
namespace Citysim
{
class Setting
{
public class Tiles
{
public static int tileSize;
}
public class World
{
public static int width;
... | C# | Citysim/Settings/Setting.cs | mitchfizz05/Citysim | mit | 1,540 | 59 | codeparrot/github-code |
3ed72c1b4a8660819ea8a051ff24f6327dfe741f33cdcca2a00c286cf7962d9a | // LzmaDecoder.cs
using System;
namespace SevenZip.Compression.LZMA
{
using RangeCoder;
internal class Decoder : ICoder, ISetDecoderProperties // ,System.IO.Stream
{
class LenDecoder
{
BitDecoder m_Choice = new BitDecoder();
BitDecoder m_Choice2 = new BitDecoder();... | C# | src/CoCSharp/Csv/Compression/Compress/LZMA/LzmaDecoder.cs | FICTURE7/CoCSharp | mit | 16,283 | 399 | codeparrot/github-code |
934c8422e9f749485871d334b7459e1430f21af8a866e3df5b9fb0222ab3f647 | #!/usr/bin/env python
#
# Created by Samvel Khalatyan on Mar 23, 2014
# Copyright (c) 2014 Samvel Khalatyan. All rights reserved
#
# Use of this source code is governed by a license that can be found in
# the LICENSE file.
import random
import unittest
from lib import unigraph
class UnigraphExtra(unigraph.Unigraph)... | Python | ch4/python/ch4_ex4.1.4.py | ksamdev/algorithms_old | mit | 1,523 | 49 | codeparrot/github-code |
d8b707049418a811d19c71169ebe492a81f03aaa67f7081bbc08bbdfd2e55125 |
<h3 class="page-header"><a onclick="page<?=$this->e($page['key'])?>();"><?=$this->e($page['name'])?></a></h3>
<?php if (isset($flash)): ?>
<?php if ($flash['success']): ?>
<div class="alert alert-success" role="alert">
Incident successfully updated!
</div>
<?php else: ?>
<div class="alert alert-danger" ro... | PHP | app/views/partials/dashboard/_single.php | Xfers/status-cat | mit | 8,897 | 204 | codeparrot/github-code |
2a2b2ed203d1701d4b8592dcffa79e8a5823eed57e229c4823273d428b79e616 | using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
namespace LinqToDB.ServiceModel
{
using Common;
using Extensions;
using Mapping;
using SqlQuery;
... | C# | Source/ServiceModel/LinqServiceSerializer.cs | lvaleriu/linq2db | mit | 45,278 | 1,833 | codeparrot/github-code |
b6bc055d2f439b72ba1838b4821269570a4d41cedb47dfa7178a39f033dac8c6 | /**
* Validates the inputted Firebase reference.
*
* @param {Firebase} firebaseRef The Firebase reference to validate.
*/
var _validateFirebaseRef = function(firebaseRef) {
var error;
if (typeof firebaseRef === "undefined") {
error = "no \"firebaseRef\" specified";
}
else if (firebaseRef instanceof Fire... | JavaScript | src/firegrapherUtils.js | lauradhamilton/firegrapher | mit | 6,936 | 234 | codeparrot/github-code |
bfbc9b5a4742cf72724abbdd004130b988bea8cc21d6829a7266766daad0b4a4 | /**
* @module kat-cr/lib/fetch
* @description
* Wraps request in a Promise
*/
/**
* The HTTP response class provided by request
* @external HTTPResponse
* @see {@link http://github.com/request/request}
*/
"use strict";
const request = (function loadPrivate(module) {
let modulePath = require.resolve(module)... | JavaScript | lib/fetch.js | raypulver/kat-cr | mit | 1,846 | 61 | codeparrot/github-code |
c875e4bb18f14a3990386339fb24d115dac74613342ff739a5b853798499d77e | /*
-----------------------------------------------------------------------------
This source file is part of OGRE
(Object-oriented Graphics Rendering Engine)
For the latest info, see http://www.ogre3d.org/
Copyright (c) 2000-2016 Torus Knot Software Ltd
Permission is hereby granted, free of charge, to any person obta... | C | plugins/render/ogreRender/3rdParty/ogre/Components/Paging/include/OgrePagedWorldSection.h | MTASZTAKI/ApertusVR | mit | 13,800 | 317 | codeparrot/github-code |
ff248a3784226e89a0cc8fd12ebd13ea40320383556d67dace1221be691f371c | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.azure.storage.blob.changefeed.models;
import com.azure.core.util.ExpandableStringEnum;
import java.util.Collection;
/**
* This class represents the different BlobChangefeedEventTypes.
*/
public final class ... | Java | sdk/storage/azure-storage-blob-changefeed/src/main/java/com/azure/storage/blob/changefeed/models/BlobChangefeedEventType.java | selvasingh/azure-sdk-for-java | mit | 1,274 | 42 | codeparrot/github-code |
f361096fe388ea098795868eb7c0afd763d4f400b5c751d3770a8a58f0a8e97f | package App::KADR::Path::Entity;
# ABSTRACT: Path::Class::Entity for KADR, faster
use common::sense;
use Encode;
use Params::Util qw(_INSTANCE);
use Scalar::Util qw(refaddr);
use overload '<=>' => 'abs_cmp', fallback => 1;
sub abs_cmp {
return 1 unless defined $_[1];
# Same object.
# Use refaddr since this metho... | Perl | lib/App/KADR/Path/Entity.pm | Kulag/KADR | mit | 1,506 | 67 | codeparrot/github-code |
cd5c283b188a24c542ce734cecf23f62f5189ceda2cd8d489b5ed114f74651c5 | /**
* Method to set dom events
*
* @example
* wysihtml.dom.observe(iframe.contentWindow.document.body, ["focus", "blur"], function() { ... });
*/
wysihtml.dom.observe = function(element, eventNames, handler) {
eventNames = typeof(eventNames) === "string" ? [eventNames] : eventNames;
var handlerWrapper,
... | JavaScript | src/dom/observe.js | Voog/wysihtml | mit | 1,440 | 52 | codeparrot/github-code |
0c9d5c6d37ec124fddf09aa640a43656ffe45e624e65ae7c75d58287a291e3bd | namespace SportSystem.Data
{
using System;
using System.Collections.Generic;
using SportSystem.Data.Repositories;
using SportSystem.Models;
public class SportSystemData : ISportSystemData
{
private ISportSystemDbContext context;
private IDictionary<Type, object> repositories;
... | C# | ASP.NET MVC/toSend/SportSystem/SportSystem.Data/SportSystemData.cs | kaizer04/SoftUni | mit | 1,915 | 75 | codeparrot/github-code |
dead6958202870fd723073899ec6c7ec9527306f1ff69378b2adc4d91be04f15 | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>GMaps.js — Map Types</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
<script ty... | HTML | src/Insset/Barme/AdminBundle/Resources/public/assets/gmaps/examples/map_types.html | GuillaumeCo/barme | mit | 2,217 | 63 | codeparrot/github-code |
03735263c1aed79c0b41f27ae5d7212829aba3a980479496722ba53d9015d1cc | from django import template
from django.utils.safestring import mark_safe
from django.utils.html import escape
from django.utils.translation import ugettext as _
from django.contrib.admin.views.main import PAGE_VAR, ALL_VAR
from django.conf import settings
from django.contrib.sites.models import Site
from BeautifulSou... | Python | admintools_bootstrap/templatetags/admintools_bootstrap.py | quinode/django-admintools-bootstrap | mit | 6,117 | 178 | codeparrot/github-code |
c59d834fd4ce8dd3485b2e84b3f5eb31aee3c2d6c90c3b675f2ab16a49889259 | /*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distribu... | Java | library/src/main/java/com/klinker/android/link_builder/TouchableSpan.java | klinker41/Android-TextView-LinkBuilder | mit | 3,202 | 108 | codeparrot/github-code |
c515ebe6ed46082b529608217824d2972b08b3e47bec70d2a9575cde6b9860c3 | # -*- coding: utf-8 -*-
"""
Written by Daniel M. Aukes and CONTRIBUTORS
Email: danaukes<at>asu.edu.
Please see LICENSE for full license.
"""
import sys
import popupcad
import qt.QtCore as qc
import qt.QtGui as qg
if __name__=='__main__':
app = qg.QApplication(sys.argv[0])
filename_from = 'C:/Users/d... | Python | api_examples/switch_subdesign.py | danaukes/popupcad | mit | 1,814 | 57 | codeparrot/github-code |
26fed5d8d880d5e5f44c35720d8093bd48fce24a3e75efc4f427e48f4d6adad2 | /**
* Parse an array of chromsizes, for example that result
* from reading rows of a chromsizes CSV file.
* @param {array} data Array of [chrName, chrLen] "tuples".
* @returns {object} Object containing properties
* { cumPositions, chrPositions, totalLength, chromLengths }.
*/
function parseChromsizesRows(data) {... | JavaScript | app/scripts/utils/parse-chromsizes-rows.js | hms-dbmi/4DN_matrix-viewer | mit | 887 | 39 | codeparrot/github-code |
5d301c73f311dcd26927d3011efd764b32ebd2126f63678415d53edb8df50396 | #include "buzzasm.h"
#include "buzzdebug.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <ctype.h>
#include <inttypes.h>
/****************************************/
/****************************************/
/*
* Resizes the bytecode buffer if necessary
*/
#define bcode_resize(INC) ... | C | src/buzz/buzzasm.c | NESTLab/Buzz | mit | 16,511 | 457 | codeparrot/github-code |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.