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 |
|---|---|---|---|---|---|---|---|---|
63bd0fc4a282c7e9d63c717a130e46f6eeda993e976200a05e39b86aa473c2a5 | import ast
import docker
import etcd
import logging
from requests.exceptions import ConnectionError
from docrane.exceptions import ImageNotFoundError
LOG = logging.getLogger("docrane")
def _get_docker_client():
# Assume docker is local
return docker.Client()
def _get_etcd_client():
# Assume docker is... | Python | docrane/util.py | CloudBrewery/docrane | mit | 7,395 | 293 | codeparrot/github-code |
120444f5fe74af08ecbbef9461397abd40e05cb1f1ac84824294886e58080e42 | import * as assert from "power-assert";
import { merge } from "../../../src/utils/merge";
import { State, createState, createSubState, createSubSubState } from "./state";
interface StatePack {
states?: State[];
currentState?: State;
}
describe("utils/merge ref", () => {
it("state2", () => {
cons... | TypeScript | test/utils/merge/ref.ts | inabe49/tarai | mit | 2,158 | 85 | codeparrot/github-code |
e7915fa3bdecd4e9b26f2b371e52c5020a978e7237e3c7d63214aa2fbd14466f | <?php
namespace App\Async\Handler;
use App\Model\Entity\AsyncJob;
use App\Model\Entity\User;
use App\Async\IAsyncJobHandler;
use App\Async\Dispatcher;
/**
* Ping performs no action. It is used by frontend to determine whether the async worker is running.
*/
class PingAsyncJobHandler implements IAsyncJobHandler
{
... | PHP | app/async/handlers/PingAsyncJobHandler.php | ReCodEx/api | mit | 1,186 | 50 | codeparrot/github-code |
f98b385ab6f72f2e5b630e7d338a2a240db2358e82138cbc6317f1a48bcf1579 | import { settings } from './settings';
import { UPDATE_PRIORITY } from './const';
import { TickerListener } from './TickerListener';
export type TickerCallback<T> = (this: T, dt: number) => any;
/**
* A Ticker class that runs an update loop that other objects listen to.
*
* This class is composed around listeners ... | TypeScript | packages/ticker/src/Ticker.ts | GoodBoyDigital/pixi.js | mit | 20,899 | 677 | codeparrot/github-code |
2ae9c4e5172b7c8fce5de4bef544ae4d2e00377f1705bffd112e5d705440d1e2 | # encoding: utf-8
class ImageUploader < CarrierWave::Uploader::Base
# Include RMagick or MiniMagick support:
# include CarrierWave::RMagick
include CarrierWave::MiniMagick
# Choose what kind of storage to use for this uploader:
# storage :file
storage :fog
# Override the directory where uploaded files... | Ruby | app/uploaders/image_uploader.rb | erstrong/daily-awesome | mit | 1,880 | 64 | codeparrot/github-code |
cfc61ab60ad1cf0a40aaea7caadc1f283bfce983ed7e72f787e8e48a2922a4b0 | package monocle.std
import monocle.function._
import monocle.{Iso, Prism}
import scalaz.\/
import scalaz.std.list._
import scalaz.std.option._
import scalaz.syntax.traverse._
object string extends StringOptics
trait StringOptics {
val stringToList: Iso[String, List[Char]] =
Iso((_: String).toList)(_.mkString... | Scala | core/src/main/scala/monocle/std/String.scala | malcolmgreaves/Monocle | mit | 2,637 | 89 | codeparrot/github-code |
49c9d333e3cc8674713a4861a2d3fbc681e59fb527eff3cf92e8ce14473d01b0 | using System;
using System.Collections.Generic;
using System.Text;
namespace online_judge.leetcode.medium
{
class Problem_17
{
public IList<string> LetterCombinations(string digits)
{
if (digits == "") return new List<string>();
char[] input = digits.ToCharArray();
Dictionary<char, char... | C# | leetcode/C_sharp/online_judge/leetcode/medium/Problem_17.cs | wallyjue/online_judge | mit | 1,561 | 56 | codeparrot/github-code |
cd24faf6829f318d907b34076958942170dbf10f84b78753d9555ba3093b665b | module Lolita
module Translation
class Migrator
attr_reader :klass,:config
def initialize(base_class)
@klass = base_class
@config = @klass.translations_configuration
end
def migrate
raise StandardError, "#{self.class} must implement this method"
end
... | Ruby | lib/lolita-translation/migrator.rb | ithouse/lolita-translation | mit | 1,174 | 56 | codeparrot/github-code |
e8673dda39e1c61802a9edf2c647522a5e78762a2d0fb63067137855c7b2f267 | # -*- coding: utf-8 -*-
module CollectiveIdea #:nodoc:
module Acts #:nodoc:
module NestedSet #:nodoc:
# This module provides some helpers for the model classes using acts_as_nested_set.
# It is included by default in all views.
#
module Helper
# Returns options for select.
... | Ruby | lib/awesome_nested_set/helper.rb | collectiveidea/awesome_nested_set | mit | 1,605 | 45 | codeparrot/github-code |
252ba2b827b0858bf9e853be0d6654e419add5283120871aabe1094b3047ac6e | 'use strict';
angular.module('core').controller('HeaderController', ['$scope', '$location', 'Authentication', 'Menus', '$timeout', '$mdSidenav', '$mdUtil', '$log',
function($scope, $location, Authentication, Menus, $timeout, $mdSidenav, $mdUtil, $log) {
$scope.authentication = Authentication;
$scope.isCollapsed =... | JavaScript | public/modules/core/controllers/header.client.controller.js | SamDC/MEANMaterial | mit | 1,756 | 55 | codeparrot/github-code |
f3c101abf9c73366e129a4906656f0664bb75d580a8e6d86424ffd3cd37a35e7 | SUBROUTINE AB04MD( TYPE, N, M, P, ALPHA, BETA, A, LDA, B, LDB, C,
$ LDC, D, LDD, IWORK, DWORK, LDWORK, INFO )
C
C SLICOT RELEASE 5.5.
C
C Copyright (c) 2002-2012 NICONET e.V.
C
C PURPOSE
C
C To perform a transformation on the parameters (A,B,C,D) of a
C system,... | FORTRAN | External/SLICOT/AB04MD.f | bgin/MissileSimulation | mit | 11,055 | 332 | codeparrot/github-code |
4a069fe196db7fbc50a6a335b358be694b9248b1eedf06a640c1bf03e97fd841 | Function Test-WebSites
{
[CmdletBinding()]
param (
[hashtable]$PoShMonConfiguration
)
$allTestsOutput = @()
foreach ($websiteDetailKey in $PoShMonConfiguration.WebSite.WebsiteDetails.Keys)
{
$siteUrl = $websiteDetailKey
$textToLocate = $PoShMonConfiguration.... | PowerShell | src/Functions/PoShMon.Monitoring.Web/Test-WebSites.ps1 | HiltonGiesenow/PoShMon | mit | 2,579 | 77 | codeparrot/github-code |
66f8184dd7b20e3a1c03985ce5bfa46707d8721830105b1838f95a39ff7bff7c | <?php
/*
* 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.
*/
class Admin extends CI_Controller {
public function dashboard() {
$this->load->model('articlemodel'); //to load... | PHP | application/controllers/Admin.php | ShahzaibMunawar/PHP-Project-with-codeigniter-Framework | mit | 4,521 | 114 | codeparrot/github-code |
74588e0bda1e2e2bafd171e11c816336a5098392ec55f94500cf0d0e4660489e | # -*- coding: utf-8 -*-
import logging
from twitter_watcher.actions import Callback
log = logging.getLogger(__name__)
class ObserverTwitter(Callback):
def __init__(self, **kwargs):
self.url = kwargs['url_callback']
self.usernames = kwargs['usernames']
self.hashtags = kwargs['hashtags']... | Python | twitter_watcher/observers.py | aoqfonseca/twitter_watcher | mit | 1,472 | 57 | codeparrot/github-code |
008b4de50123bca37e31c32d4423bd5cb3e981dd2739c955cc537b23d95f6274 | jssor_sliderb_starter = function (containerId) {
//Reference http://www.jssor.com/development/slider-with-slideshow-no-jquery.html
//Reference http://www.jssor.com/development/tool-slideshow-transition-viewer.html
var _SlideshowTransitions = [
//Fade in R
... | JavaScript | js/slide_region_state.js | giverooms/giverooms | mit | 7,453 | 82 | codeparrot/github-code |
0742d4c7906503aa2720d9eb24d954a05f07abf5fdc593bfb3ca4867b6ecb4e9 | using System;
using System.Collections.Generic;
using System.Windows.Forms;
using Communicate.Bonjour;
using Communicate;
using System.Net;
using System.IO;
using System.Linq;
namespace Demo.Bonjour
{
public partial class DemoClient : Form
{
private readonly List<SerializationTest> _serializationTestA... | C# | windows/src/Demos/Main/DemoClient.cs | hughbe/communicate | mit | 9,725 | 261 | codeparrot/github-code |
6f5f803c9596485f5dc1ce60f4343d502b7a821f19b2e51a78d4c2b961609285 | <!doctype html>
<html class="theme-next pisces use-motion" lang="zh-Hans">
<head>
<meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta http-equiv="Cache-Control" content="no-transform" />... | HTML | 2015/07/16/closures/index.html | zhizouxiao/zhizouxiao.github.io | mit | 22,813 | 898 | codeparrot/github-code |
f258f8dceb1cd031c0dcde8a9478bdf8496139e09731acac2c4db71be3e13cd4 |
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Index — py_ice_cascade 0.0.1 document... | HTML | docs/genindex.html | keithfma/py_ice_cascade | mit | 25,781 | 753 | codeparrot/github-code |
83b3725bbc40627f94fd7ae508dead4041ece8e2ec036802292188017459c280 | myApp.onPageInit("categoria", function (page) {
var myCategoriaController = new categoriaController();
// agrego el evento on click del boton de agregar
$$('#agregarCategoria').on('click', guardar);
// funciones auxiliares!
function guardar() {
// obtengo el json del form
var data... | JavaScript | app/js/view/categoriaView.js | pato12/scratch-2016 | mit | 1,058 | 40 | codeparrot/github-code |
fa61b976e343ac2eeb4ccd1fb6ad672e67c6d863dae2cf9fda5aa700ca5e4a6c | /* The MIT License (MIT)
*
* Copyright (c) 2014 Giacomo Marciani
*
* 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 us... | Java | test/com/gmarciani/gmparser/AllTests.java | gmarciani/gmparser | mit | 1,681 | 45 | codeparrot/github-code |
9dab2652d28d0d09cedef143f4043a5c4c7e6b1309c9a12e20c9c44e646d2fa5 | namespace SwiftSnapper {
export namespace Views {
export module Account {
export function OnView () {
Application.getLanguageStrings(SwiftSnapper.language, function (lang) {
let template = Handlebars.compile($('#template').html());
$('#Page... | TypeScript | scripts/views/accountView.ts | filfat/swiftsnapper | mit | 3,307 | 74 | codeparrot/github-code |
3785f526e7bfd31405223f1c54e6855dbb4c17755afe69ac123f40809d088427 | package com.xeiam.xchange.quoine.dto.trade;
import static org.fest.assertions.api.Assertions.assertThat;
import java.io.IOException;
import java.io.InputStream;
import java.math.BigDecimal;
import org.junit.Test;
import com.fasterxml.jackson.databind.ObjectMapper;
/**
* Test QuoineOrderDetailsResponse JSON parsin... | Java | xchange-quoine/src/test/java/com/xeiam/xchange/quoine/dto/trade/QuoineOrderDetailsJSONTest.java | SovietBear/xchange-clean | mit | 1,208 | 35 | codeparrot/github-code |
16baefadd181f5ecbf9d0ee5361abe560f20c561ae1a68a20422505ce0edc585 | from MBase.MFinalValueReachedException import MFinalValueReachedException
class MValueAnimator:
"""
A class to animate single integer or float values. It would also
help in applying various mathematical functions to the progress
of the animation.
"""
def __init__(self, initial_value, final_val... | Python | MBase/MValueAnimator.py | GelaniNijraj/PyMaterial | mit | 2,211 | 63 | codeparrot/github-code |
b8b65153c4ba408cf4c86f13dfb6ff842034f7df042fd6c26c0019856b17c83d | import bodyParser from 'body-parser';
import chalk from 'chalk';
import compress from 'compression';
import connectMongo from 'connect-mongo';
import express from 'express';
import expressValidator from 'express-validator';
import favicon from 'serve-favicon';
import flash from 'express-flash';
import logger from 'morg... | JavaScript | server/server.js | CreaturePhil/Hack-Start | mit | 3,266 | 150 | codeparrot/github-code |
727745cad87865a329fd8759b3bffba3cbb72c0ed57ff105e12fda3f436f0b71 | describe("m.deferred()", function () {
"use strict"
// Let unchecked exceptions bubble up in order to allow meaningful error
// messages in common cases like null reference exceptions due to typos.
// An unchecked exception is defined as an object that is a subclass of
// Error (but not a direct instance of Error... | JavaScript | test/mithril.deferred.js | farzher/mithril.js | mit | 8,616 | 290 | codeparrot/github-code |
af55c7133feda5b80309f5c51037ae65542065292ed09a91fd3e3bbde1f42c34 |
<!DOCTYPE html>
<html xmlns:msxsl="urn:schemas-microsoft-com:xslt">
<head>
<meta content="en-us" http-equiv="Content-Language" />
<meta content="text/html; charset=utf-16" http-equiv="Content-Type" />
<title _locid="PortabilityAnalysis0">.NET Portability Report</title>
<style>
... | HTML | Reports/ja/jaywingumbracobase.1.0.3.14/JaywingUmbracoBase-net451.html | kuhlenh/port-to-core | mit | 38,338 | 891 | codeparrot/github-code |
8794ea246daa7be68abba620ae57a660e08aa2bb7313904456d8271c3fd760d6 | using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using PanLineAlgorithm;
using System;
namespace Lockstep
{
public static class Raycaster
{
internal static uint _Version { get; set; }
public static readonly FastList<Vector2d> bufferIntersectionPoints = new FastL... | C# | Core/Simulation/Physics/Raycast/Raycaster.cs | erebuswolf/LockstepFramework | mit | 4,799 | 127 | codeparrot/github-code |
94366154ecb0c284e3fed4323144a96f91013c026c7106e9eb33b1525a5ff170 | #ifndef CParameterSet_H_INCLUDED
#define CParameterSet_H_INCLUDED
#ifdef PARAMETER_SPACE
/* Use ParameterSpace version */
#include "CParameterSpace.h"
class CParameterSet : public CParameterSpace
#else
/* Use older version */
#include <string.h>
#include "CSection.h"
#include "ParameterStatus.h"
class ... | C | src/SupportClasses/CParameterSet.h | AuditoryBiophysicsLab/EarLab | mit | 2,241 | 60 | codeparrot/github-code |
03c8a3763d8806c329fdcb6e9943e705da5ae5f849e58e12a04ced1cfef97966 | package gui.transaction;
import gui.PasswordPane;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Image;
import java.awt.Insets;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.UnsupportedEncodingException;
import java... | Java | Qora/src/gui/transaction/MessageTransactionDetailsFrame.java | Bitcoinsulting/Qora | mit | 8,093 | 257 | codeparrot/github-code |
eb54ea5925ba54601ab810c70d70e2853afa561aefd6f0fb9672febf01c95748 | require 'contracts'
Dir[File.expand_path('../', __FILE__) << '/**/*.rb'].each do |file|
# require file except myself
if(file != __FILE__)
require file
end
end
module MusicalScore
module Score
module Identification
class Identification < MusicalScore::ElementBase
... | Ruby | lib/musical_score/score/identification/identification.rb | yumaito/musical_score | mit | 2,542 | 59 | codeparrot/github-code |
d04a9ff3dc67fc94fc1f07d3e4ec2f174795fa5b05e90e38afd3797b00c56506 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using VR = UnityEngine.VR;
[RequireComponent(typeof(AudioSource))]
public class PlayerDeath : MonoBehaviour {
[SerializeField]
private Transform mesh = null;
[SerializeField]
private Game... | C# | Scripts/Player/PlayerDeath.cs | Andrew-Starling/Space-Trash-Man | mit | 1,692 | 62 | codeparrot/github-code |
b2ccb3a83aaa5f6d1782a6e438eaa33d5f395b93e32381e070faea18415c1d97 | /*
Copyright (C) 2000-2001 Adrian Welbourn
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the ... | C | Volume_08/Number_3/Xue2003/pbuffer.h | erich666/jgt-code | mit | 1,647 | 78 | codeparrot/github-code |
bb1eaf78f924a2de7091e9f94079d5fa9b4ad8584abce103a502f73a9b561bf0 | package com.moviepilot.sheldon.compactor.event;
import com.lmax.disruptor.EventTranslator;
import com.moviepilot.sheldon.compactor.config.Config;
import com.moviepilot.sheldon.compactor.util.Progressor;
import gnu.trove.map.TMap;
import org.neo4j.graphdb.PropertyContainer;
import java.util.Map;
/**
* PropertyContai... | Java | src/main/java/com/moviepilot/sheldon/compactor/event/PropertyContainerEventTranslator.java | moviepilot/sheldon_compactor | mit | 2,370 | 79 | codeparrot/github-code |
492b26aea192e28a8f4c7a8ef3457ca3982885c04cc891e9e2685e9dec3ba244 | package io.cucumber.core.runtime;
import io.cucumber.core.eventbus.EventBus;
import io.cucumber.plugin.event.EventHandler;
import java.time.Instant;
import java.util.UUID;
public final class SynchronizedEventBus implements EventBus {
private final EventBus delegate;
private SynchronizedEventBus(final Event... | Java | core/src/main/java/io/cucumber/core/runtime/SynchronizedEventBus.java | cucumber/cucumber-jvm | mit | 1,391 | 56 | codeparrot/github-code |
eda02002afb5239eef4d758bcaf06dab27f6f9718ee76b2ab8f3eba3a5acffa2 | /**
* @class JsonApiDataStoreModel
*/
class JsonApiDataStoreModel {
/**
* @method constructor
* @param {string} type The type of the model.
* @param {string} id The id of the model.
*/
constructor(type, id) {
this.id = id;
this._type = type;
this._attributes = [];
this._relationships ... | JavaScript | src/jsonapi-datastore.js | jprincipe/jsonapi-datastore | mit | 5,962 | 218 | codeparrot/github-code |
3bcb86587cb42b8243d887c9cf6d5ff0108cfb4b6c7bd40b7750f1ae784930db | # coding=utf-8
"""
-
"""
from __future__ import division, unicode_literals, absolute_import
from __future__ import print_function
from future import standard_library
standard_library.install_aliases()
import argparse
from puf import cli_lib
def main(params=None):
"""
:param params:
:return:
"""
p... | Python | puf/cli.py | erikdejonge/puffin | mit | 3,395 | 94 | codeparrot/github-code |
1725b8c2fc0f813f7c80eb6f669052edf0d41e26ba91ca03486a6f110bc6a921 | /*
Copyright (c) 2014-15 Ableton AG, Berlin
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, publish, distr... | C++ | src/test/LogUtils.cpp | ruisebastiao/aqt-stylesheets | mit | 5,965 | 239 | codeparrot/github-code |
7d20f5b2340fda5a8821efacf520c39b7ffa59dad804b06a2e0c54d5aad55911 | <!doctype html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Supermarkets in Los Angeles, Page 31</title>
<link rel="canonical" href="https://foodoasis.la/supermarket/" />
<link rel="stylesheet" href="https... | HTML | supermarket/page31/index.html | foodoasisla/foodoasis.la | mit | 26,040 | 881 | codeparrot/github-code |
58a892987fbf53c310eef82aca640ec844c8e4bf4552116ddc81c244d8368047 | module Cryptoexchange::Exchanges
module Satoexchange
module Services
class OrderBook < Cryptoexchange::Services::Market
class << self
def supports_individual_ticker_query?
true
end
end
def fetch(market_pair)
output = super(ticker_url(market_... | Ruby | lib/cryptoexchange/exchanges/satoexchange/services/order_book.rb | coingecko/cryptoexchange | mit | 1,367 | 43 | codeparrot/github-code |
c2b898f84f8c6b89a49022cb6091e6fd41b35e9218d99f62157e6ce25a8c8a53 | // Semantic UI - Search
interface SemanticUISearchSettings {
name: string;
namespace: string;
debug: boolean;
verbose: boolean;
performance: boolean;
type: string;
minCharacters: number;
apiSettings: boolean;
source: boolean;
searchFields: string[];
displayField: string;
searchFullText: boolean... | TypeScript | src/typings/semantic-ui/semantic-ui-search.d.ts | fuyuno/Sagittarius | mit | 2,285 | 101 | codeparrot/github-code |
79f25dc05ae6e37fed97abf395ac5e4636393bdb3201242d080c454051f8ce9d | #! /usr/bin/env python
# Written by Vasaant S/O Krishnan. Friday, 18 March 2016.
import re
from pylab import *
import sys
from mpldatacursor import datacursor
usrFile = sys.argv[1:]
if len(usrFile) == 0:
print ""
print "# pts-test.py takes input from a single .PTS file to study the"
print "# component a... | Python | python/pts-test.py | ekadhanda/bin | mit | 11,854 | 355 | codeparrot/github-code |
31d9f8956820bae7136529bcf5cde8b3733b330ef3b8c6c874be0776f55aadec | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Drawing;
using System.Data;
using System.Diagnostics;
using System.Globalization;
namespace classes
{
public class ... | C# | toplist_aspx/kzstats/tcGridViewFactory.cs | Aoki2/kzmod_web_stats | mit | 32,392 | 759 | codeparrot/github-code |
790b531bcd79e6eccaee0f3a947f7853a14f0746cd2f7dacd63367ddd41170a8 | # iterables.py
print("""
An iterable is any object that returns an iterator when iter() function is invoked on it.
""")
print("""Writing an iterable that repeatedly returns an integer without stopping
{code}
class InfiniteIterator:
def __init__(self):
self.__int = 0
def __next__(self):
self._... | Python | Python/Experiments/ITERATORS/Polyglot.Ninja/iterables.py | nitin-cherian/LifeLongLearning | mit | 1,634 | 107 | codeparrot/github-code |
c3af577f42faa87aa01a96a1e4185434226870d50f94341ccadc9d73b816fc16 | <!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>CMsgGCGetCommandList | demofile</title>
<meta name="description" content="Documentation for demofile">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link ... | HTML | docs/interfaces/_protobufs_steammessages_.cmsggcgetcommandlist.html | saul/demofile | mit | 7,693 | 184 | codeparrot/github-code |
14473026f1ee13a6ad2b147d54ec4de793a2907fe955bbefb33057cfb3ad830a | # coding=utf-8
"""Accesses data in Sacred's MongoDB."""
import pymongo
from sacredboard.app.data.datastorage import Cursor, DataStorage
from sacredboard.app.data.pymongo import GenericDAO, MongoMetricsDAO, MongoFilesDAO
from sacredboard.app.data.pymongo.rundao import MongoRunDAO
class MongoDbCursor(Cursor):
"""I... | Python | sacredboard/app/data/pymongo/mongodb.py | chovanecm/sacredboard | mit | 3,502 | 113 | codeparrot/github-code |
1b40171b87262b3a51ac39a7e6a7d0781b96b30c1dcee91288d5f3bcf9d05f6b | <?php
/**
* Haefko - your php5 framework
*
* @author Jan Skrasek
* @copyright Copyright (c) 2007 - 2009, Jan Skrasek
* @link http://haefko.skrasek.com
* @license http://www.opensource.org/licenses/mit-license.html
* @version 0.9 - $Id$
* @package Haefko
*/
require_onc... | PHP | haefko/libs/user.php | hrach/haefko | mit | 6,574 | 311 | codeparrot/github-code |
f3f2393fd927c48921edb0ad1449c4b71f4f72e5db7890a129c621b069f87c76 | /*
* WordRepositoryInitializer.java
*
* Copyright (C) 2018 [ A Legge Up ]
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
package com.aleggeup.confagrid.content;
import javax.annotation.PostConstruct;
import org.slf4j.Logger;
import... | Java | application/confagrid-webapp/src/main/java/com/aleggeup/confagrid/content/WordRepositoryInitializer.java | ALeggeUp/confagrid | mit | 1,136 | 44 | codeparrot/github-code |
368c3677db9fdefa29be2185c37e7fce1bca482e01a81cf0d8fd0c4b2fbb0ed5 | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
$CI=& get_instance();
$action_buttons=array();
$action_buttons[]=array(
'label'=>$CI->lang->line("ACTION_BACK"),
'href'=>site_url($CI->controller_url)
);
if(isset($CI->permissions['action1']) && ($CI->permissions['action1']==1))
{
... | PHP | application/views/purchase_lc/add_edit.php | islambuet/bms_2017_08 | mit | 29,060 | 597 | codeparrot/github-code |
c4ceac10ba5af5346881cfbc165bf9a16f38c70b8844d72663713a67f2658122 | #ifndef ANDERSEN_NODE_FACTORY_H
#define ANDERSEN_NODE_FACTORY_H
#include "llvm/ADT/DenseMap.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Value.h"
#include <vector>
// AndersNode class - This class is used to represent a node in the constraint
// gr... | C | include/NodeFactory.h | grievejia/andersen | mit | 5,008 | 136 | codeparrot/github-code |
ad5cff123fe73aecf73e06f3a7627fd21054f610c1726edbd8d64b130b1eba4d | using BlueSheep.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BlueSheep.Core.Fight
{
public class FightCondition
{
#region Fields
FightConditionEnum m_Cond;
object m_delta;
char m_operateur;
AccountUC account;... | C# | BlueSheep/Core/Fight/FightCondition.cs | Sadikk/BlueSheep | mit | 13,581 | 299 | codeparrot/github-code |
11df47a1e6ccaf415f657026d13bab194d9e903673c742bdb1f32f56cdc48130 | <?php
/*
* This file is part of Gush package.
*
* (c) Luis Cordova <cordoval@gmail.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Gush\ThirdParty\Bitbucket;
/**
* @author Raul Rodriguez <raulrodriguez782@gmail.com>
* @author ... | PHP | src/ThirdParty/Bitbucket/BitbucketAdapter.php | sstok/gush | mit | 2,104 | 98 | codeparrot/github-code |
128d10b590f3fb87d230ee4382d7e7c9369b92f236513ca06e3c637f8ee8d5d6 | /*Modify your last program and try to make it work for any number type, not just integer (e.g. decimal, float, byte, etc.)
Use generic method (read in Internet about generic methods in C#).*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ... | C# | Telerik - C# 2/HOMEWORK - METHODS/MethodsHomework/Problem 15. Number calculations/NumberCalculations.cs | fr0wsTyl/TelerikAcademy-2015 | mit | 2,561 | 83 | codeparrot/github-code |
293d8bbdc3ed301227c17a99759c91063ba4c958be5769a3c6c26e7c1dde36e4 | const shouldTrim = {
clean: true,
reduced: true,
root: true,
}
/** return the document as text */
exports.text = function (options) {
options = options || {}
//are we showing every phrase?
let showFull = false
if (this.parents().length === 0) {
showFull = true
}
// cache roots, if necessary
if ... | JavaScript | src/Doc/methods/output/01-text.js | nlp-compromise/nlp_compromise | mit | 967 | 38 | codeparrot/github-code |
58835261a486c24d6226632e732d20f129debee4113c9ba8b6a19bc6318a8de1 | import numpy as np
def donut(shape, radius, width, distribution='gaussian'):
'''Generate a 2D Gaussian window of the given shape. width specifies the
size of the Gaussian. radius specifies the distance to origo such that
the window becomes a ring.'''
if not distribution in ['gaussian', 'lognormal']:
... | Python | ipcv/misc/donuts.py | andersbll/ipcv | mit | 1,393 | 36 | codeparrot/github-code |
929d0fec45e92a8e7bd6966fa5049e40cd7d35a85eecabd89815272e5ac5cd61 | /* eslint-disable quotes */
describe('performanceObserver', () => {
let browserMock;
let performanceMock;
let observeResourcePerformance;
let PerformanceObserverConstructorArgs;
let PerformanceObserverMock;
let resourceMatcher;
let onEnd;
let clock;
beforeEach(() => {
self.DEBUG = false;
jes... | JavaScript | test/unit/performanceObserver.test.js | instana/weasel | mit | 14,004 | 427 | codeparrot/github-code |
7776bdc87f532c187354075a4f64bbffba5523258843ec40ea66dd287c409c44 | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "utilstrencodings.h"
#include "tinyformat.h"
#include <cstdlib>
#inclu... | C++ | src/utilstrencodings.cpp | segwitcoin/SegwitCoin | mit | 23,559 | 723 | codeparrot/github-code |
0d2912c18b4295c64ef1dc9a1a478b5a75890ddf8abd7300b740d3cd3b187c69 | using SnowRentLibrary.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
usi... | C# | WpfApplication1/Views/Pages/ProductsView.xaml.cs | AlexandreDagnelies/SnowRent | mit | 1,261 | 53 | codeparrot/github-code |
5ebc47c47813abd18c361f40e9e89fd9ef60e42a16665839ee39ec4c1e74fda3 | import { Container } from 'pixi.js';
import { TRIANGLE, SQUARE, HEXAGON, CIRCLE } from '../../constants';
import State from './State';
export default class Player extends Container {
constructor() {
super();
this.states = {};
this.types = [CIRCLE, SQUARE, TRIANGLE, HEXAGON];
this.types.forEach(this.... | JavaScript | app/displayobjects/Player/index.js | hendrikniemann/ld35 | mit | 1,050 | 43 | codeparrot/github-code |
6cb42ee57256e0b1fee1a77e932f4badf72683b5d2255577cee27316092b4989 | package dreajay.android.safe.util;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
public class HttpUtil {
public static int CONNECTTIMEOUT = 1000;
public static String executeHttpGet(String url) thro... | Java | source/dreajay.android.safe/src/dreajay/android/safe/util/HttpUtil.java | liufeiit/itmarry | mit | 1,386 | 55 | codeparrot/github-code |
0a0f47be38ead3ea6d5c6a26650f38763fdb82133859cf4fe0709c3757ad689c | """
The MIT License (MIT)
Copyright (c) 2015 Mat Leonard
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,... | Python | src/lib/Vector.py | EinfInPython-SS2017-LaJuTo/AbschlussProjekt | mit | 5,995 | 157 | codeparrot/github-code |
4031422d319be381d2e4db02f443d7271b7899f23c6fc0bc55bc4847a37cf593 | using dbqf.Configuration;
using dbqf.Criterion;
using dbqf.Sql.Configuration;
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;
using System.Text.RegularExpressions;
namespace dbqf.Sql
{
/// <summary>
///
/// </summary>
public class SqlListGenerator : ISqlListGener... | C# | lib/Backends/dbqf.Sql/SqlListGenerator.cs | stuarta0/dbqf | mit | 3,642 | 108 | codeparrot/github-code |
b6bf98ca490925ad28a6773ba8cefdf626daf3fd5f7934bebc973002fa93bf31 | /**
* Represents an Issue.
*/
define(['jidejs/base/ObservableProperty', './User'], function(ObservableProperty, User) {
"use strict";
function Issue(original) {
installer(this);
this._issue = original;
this.title = original.title;
this.body = parseMarkdown(original.body);
this.issueUrl = original.html_url... | JavaScript | demo/apps/issues/lib/Issue.js | jidesoft/jidejs | mit | 1,440 | 43 | codeparrot/github-code |
3aeefbbefb07d724cbc7d235efcc601484d52874d1d55a336a7eb5999ee87a5f | import React, { Component } from 'react'
import PropTypes from 'prop-types'
export class CodeCard extends Component {
static propTypes = {
title: PropTypes.string.isRequired,
source: PropTypes.string.isRequired
}
render() {
const { title, source } = this.props
return (
... | JavaScript | src/components/CodeCard.js | dogescript/deflea | mit | 874 | 33 | codeparrot/github-code |
ae0e247ed377cc92b0077efe714988e27f9fdd918bad33b101eb78201669fd4f | import { IterableX } from '../iterablex';
import { identity } from '../../util/identity';
import { arrayIndexOf } from '../../util/arrayindexof';
import { comparer as defaultComparer } from '../../util/comparer';
import { MonoTypeOperatorFunction } from '../../interfaces';
import { DistinctOptions } from './distinctopt... | TypeScript | src/iterable/operators/distinct.ts | ReactiveX/IxJS | mit | 2,019 | 54 | codeparrot/github-code |
9fa24ac0af70a042275db41a611f09ca0fd04c1b4e668e728b9e7fbfecc92a78 | import { Component, NgModule } from '@angular/core';
import { IonicApp, IonicModule } from '../../ionic-angular';
// Use the toolbar demo but pass in the demo name to change the title
// this will also hide some of the toolbars that don't use `ion-title`
@Component({
templateUrl: 'page.html'
})
export class ApiDemo... | TypeScript | demos/src/title/app.module.ts | joshesp/ionic | mit | 722 | 39 | codeparrot/github-code |
efd6f354b9e76c50f0ff71f66fe891f10294236e5216bf86cfa27864e723e774 | 'use strict'
const BaseNode = require('./base')
const idom = require('incremental-dom')
module.exports = class HTMLNode extends BaseNode {
constructor(template) {
super(template)
this.before = null
this.fragment = null
}
render() {
const value = this.value
if (value !== this.before) {
... | JavaScript | lib/node/html.js | rkusa/ipoxy | mit | 1,073 | 53 | codeparrot/github-code |
525ac5d79608cf3533ea3ecff62528ef8406d884a606e96aed8338ef228d263b | # -*- coding: utf-8 -*-
"""
Created on Thu Dec 17 11:50:47 2015
@author: teichman
"""
import tensorflow as tf
from tensorflow.python.framework import ops
from tensorflow.python.framework import dtypes
from tensorflow.python.training import queue_runner
import os
import numpy as np
# Global constants describing out ... | Python | input/input.py | MarvinTeichmann/tensorflow_examples | mit | 8,318 | 264 | codeparrot/github-code |
6e4d9fe8048702dffdbe8ce740c7692d5d35da70508e485edc7ff0b7bfbd424f | /*
*
* Copyright 2014 by Herb Jellinek. All rights reserved.
*
*/
package com.apprture.universalgestureparser;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
/**
* The gesture classes we're inter... | Java | android/app/src/main/java/com/apprture/universalgestureparser/GestureParser.java | hjellinek/UniversalGestureParser | mit | 12,708 | 377 | codeparrot/github-code |
f3fa15ef4af4e1df683836a17203816f20bd46370ec3a1b5e122b46574e4b6de | #include <iostream>
#include <string>
using namespace std;
int lengthOfLongestSubstring(string s) {
int n = s.length();
int i = 0, j = 0;
int maxLen = 0;
bool exist[256] = { false };
while (j < n) {
if (exist[s[j]]) {
maxLen = max(maxLen, j-i);
while (s[i] != s[j]) {
exist[s[i]] = fals... | C++ | Leetcode/lenOfSubstring.cpp | Meng1024/Code | mit | 964 | 59 | codeparrot/github-code |
03bf9c9d7429ae17587316162c38c8ff402b8df4c1763af50f539645349ba79a | <?php
use Illuminate\Http\Request;
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServicePr... | PHP | src/routes/api.php | nan-apps/nan-apps-page | mit | 1,367 | 50 | codeparrot/github-code |
a475f17b822de1b58afcf98fb9a39184650d302a70afcef13a798b09648992b2 | public class BalancedBinaryTree {
public boolean isBalanced(TreeNode root) {
if(root == null) return true;
int val = getBalanced(root);
if(val == -1) return false;
return true;
}
private int getBalanced(TreeNode node) {
if(node == null) return 0;
int left =... | Java | java/BalancedBinaryTree.java | dantin/leetcode-solutions | mit | 1,073 | 42 | codeparrot/github-code |
452002f039f9a31d47164d15ba6a60324278a6b9c1a39161825d4042e4431236 | package algo.ch04;
import edu.princeton.cs.algs4.In;
import edu.princeton.cs.algs4.MinPQ;
import edu.princeton.cs.algs4.Stack;
import edu.princeton.cs.algs4.StdOut;
/**
* algorithms part i Puzzle
* Created by chiyx on 2016/10/2.
*/
public class Solver {
private class SearchNode implements Comparable<SearchNod... | Java | src/main/java/algo/ch04/Solver.java | chiyx/algoJava | mit | 5,792 | 184 | codeparrot/github-code |
588fb1118e92f1f906a84645764c34e5eb86fc2c6c857781d7186b993dc2a9d6 |
package com.github.zzwwws.rxzhihudaily.model.entities;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
im... | Java | app/src/main/java/com/github/zzwwws/rxzhihudaily/model/entities/Feed.java | zzwwws/RxZhihuDaily | mit | 2,273 | 103 | codeparrot/github-code |
861657d31c72fd4931356044b89bfd1fba4d639122b730e8f4533a9cc9e03756 | <?php
use Sprint\Migration\VersionConfig;
use Sprint\Migration\VersionManager;
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
die();
}
$stepCode = !empty($_POST["step_code"]) ? htmlspecialchars($_POST["step_code"]) : '';
$hasSteps = (
($stepCode == 'migration_create')
|| ($stepCode ==... | PHP | admin/steps/migration_create.php | andreyryabin/sprint.migration | mit | 1,561 | 55 | codeparrot/github-code |
63db301cdcc4941c4a6c4af73fb68c507b49db3bf1053af368f97c50f95a0a2a | require "denouncer/version"
module Denouncer
autoload :Notifiers, File.expand_path('../denouncer/notifiers', __FILE__)
autoload :InfoError, File.expand_path('../denouncer/info_error', __FILE__)
DEFAULT_NOTIFIER = :smtp
@@notifiers = nil
# Configures denouncer using the specified configuration hash.
#
... | Ruby | lib/denouncer.rb | julweber/denouncer | mit | 4,877 | 166 | codeparrot/github-code |
c57e77d4aa2572d5f3ccc2f592bf86e5ba272918fd59f0541642b0621fab52a3 | "use strict";
require([__dirname + "/file.js"], function (file)
{
/* Uploads a single file represented by a HTML5 FileEntry object.
*/
function upload(file, target, cbContext, fileCallback, finishedCallback)
{
function createMonitoringXhr()
{
var xhr = $.ajaxSettings.xhr()... | JavaScript | services/shell/www/upload.js | pycage/pilvini | mit | 8,734 | 288 | codeparrot/github-code |
4ef689dc653e7bd0438592a008568885e103a3960c597abd744a46a8b9ce31c1 | <!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>ConVars | demofile</title>
<meta name="description" content="Documentation for demofile">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="styleshe... | HTML | docs/classes/_convars_.convars.html | saul/demofile | mit | 61,566 | 938 | codeparrot/github-code |
62f85ab28d70e6a28db8d60fbbe1b824c0da5341999c2b95fe922befd71b5a68 | (function() {
'use strict';
angular.module('iTravelApp')
.controller('GoogleMapCtrl', function ($scope, uiGmapGoogleMapApi) {
// Do stuff with your $scope.
// Note: Some of the directives require at least something to be defined originally!
// e.g. $scope.markers = [... | JavaScript | server/public/js/controllers/GoogleMapCtrl.js | radapter/iTravel | mit | 2,004 | 57 | codeparrot/github-code |
a759164e181032b0a5d2af44a39a9ff0ded724d2403ab4da88e34fef5f53cf43 | <?php
namespace Princeton\App\ExchangeAPI;
use DateTime;
use UnexpectedValueException;
use jamesiarmes\PhpEws\Autodiscover;
use jamesiarmes\PhpEws\Client;
use jamesiarmes\PhpEws\ArrayType\ArrayOfStringsType;
use jamesiarmes\PhpEws\ArrayType\ArrayOfTransitionsGroupsType;
use jamesiarmes\PhpEws\ArrayType\ArrayOfTransit... | PHP | src/ExchangeAPI/ExchangeCal.php | princeton/app-bundle | mit | 57,246 | 1,249 | codeparrot/github-code |
b97490c52d0c726c3c72303c004f40183ea5cbce087b08e0fc0f4db971bc9ab7 |
/*!
* Connect - urlencoded
* Copyright(c) 2010 Sencha Inc.
* Copyright(c) 2011 TJ Holowaychuk
* MIT Licensed
*/
/**
* Module dependencies.
*/
var utils = require('../utils')
, qs = require('qs');
/**
* Parse x-ww-form-urlencoded request bodies,
* providing the parsed object as `req.body`.
*
* @param {O... | JavaScript | lib/middleware/urlencoded.js | brianloveswords/connect | mit | 1,106 | 55 | codeparrot/github-code |
5e1dd5ae7efda310ac43864c3d7133cb47244b476650385be62f8d16536c51f1 | <!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="ut... | HTML | app/templates/app/views/main.html | brianswisher/generator-prototype | mit | 1,430 | 42 | codeparrot/github-code |
9f9ddf3a2c387a5ea2b6d005586d2406ad010fd27513c1620644af45d2a576fb | package com.p_v.flexiblecalendar;
import android.content.Context;
import android.util.MonthDisplayHelper;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import com.p_v.flexiblecalendar.entity.DateItem;
import com.p_v.flexiblecalendar.vie... | Java | library/src/main/java/com/p_v/flexiblecalendar/FlexibleCalendarGridAdapter.java | PavelKorolev/FlexibleCalendar | mit | 7,997 | 233 | codeparrot/github-code |
ef38b667ebd3f445e2443dbc63945a7c8b12eb67c7e403cee929a7e6b462cd8e | package com.gluk.z2j.form;
import java.util.ArrayList;
import java.util.List;
import com.gluk.z2j.api.form.IForm;
import com.gluk.z2j.api.form.IMoveParser;
import com.gluk.z2j.api.model.IGame;
import com.gluk.z2j.api.model.IMoveTemplate;
public class AndForm extends SeqForm {
public AndForm(IMoveParser parser) {
... | Java | utils/z2j/src/main/java/com/gluk/z2j/form/AndForm.java | GlukKazan/Dagaz | mit | 1,117 | 38 | codeparrot/github-code |
d5d71eae89722dbb5fcb60b5efa1fc1a849cf6966b9fbdfc48eb27ea641b99b1 | package geco.util.document;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import geco.dao.StoreDao;
import geco.util.store.StoreManager;
import geco.vo.Head;
import geco.vo.HeadTotalCalculation;
import geco.vo.Row;
import geco.vo.RowTotalCalculator;
import geco.v... | Java | src/geco/util/document/DocumentHelper.java | lucaflorido/GECO | mit | 4,707 | 137 | codeparrot/github-code |
10d9dd8dd409165ec20dbd259a51359e5099f2e8cbd0d22a0e8c2258afa399b8 | # Run this rake task periodically to get updates to resources.
def api_call(json_url)
response = open(json_url)
JSON.parse(response.read)
end
def geocode_helper(name, address, phone_number)
place = Place.new(name: name, address: address, phone_number: phone_number)
place.geocode
place.save
sleep 0.25 # av... | Ruby | sinatra/db/update_apis.rb | luciankahn/helpfrog | mit | 6,003 | 133 | codeparrot/github-code |
3b5db7fd75929e7fedab60e436b5911801bddf79d4a2513e57632316e9c7f68c | import events from '../datas/events.json';
import EmitterManager from './EmitterManager';
class VisibilityManager {
constructor() {
this.onVisibilityChange = this.onVisibilityChange.bind(this);
this._hidden = '';
let visibilityChange;
if (typeof document.hidden !== 'undefined') {
this._hidden = 'hid... | JavaScript | app/media/js/managers/VisibilityManager.js | arthurmuchir/moon | mit | 1,018 | 46 | codeparrot/github-code |
3b5727394bd9b6c4a716a9fa7b15a6c678b0aa60e675ee72c8f10175dc2bff49 | import React from 'react'
import PropTypes from 'prop-types'
import classNames from 'classnames'
import { connect } from 'react-redux'
import { pick } from 'lodash'
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'
import getMuiTheme from 'material-ui/styles/getMuiTheme'
import Toggle from 'material-ui... | JavaScript | src/containers/app.js | pd4d10/chrome-ui | mit | 1,868 | 68 | codeparrot/github-code |
cc8ff82e61794d2d258b45704c261cf2daaab337d389d4937cb67b37293cec5e | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
function angka($number){
if ($number == '') $number = 0;
return number_format($number, 0, ',', '.');
}
function my_number_format($number){
if ($number == '') $number = 0;
return number_format($number, 0, ',', '.');
}
function my_number_f... | PHP | admin/application/helpers/gmf_helper.php | abdiansyah/olaps | mit | 10,783 | 373 | codeparrot/github-code |
b0086006f693e1b8ab090fde3d53e7579d2e685cfce010e248292352d886b4bb | define([], function() {
return {
name: "object",
constantInitializer: function(Dicta, callback) {
var model = new Dicta();
model.read("../dicta/coretest/object/constantInitializer.dicta", function() {
var a_p = model.get("a.p");
if (a_p !... | JavaScript | js/test/core/object.js | stelian56/dicta | mit | 8,203 | 253 | codeparrot/github-code |
79d78facd598439ba88767d241ffef8e49785e548eb43f78878d66947a25a6be | <?php
/*
* Copyright 2014 Google Inc.
*
* 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 t... | PHP | application/libraries/php-google-sdk/google/apiclient-services/src/Google/Service/SQLAdmin/SslCertDetail.php | dwivivagoal/KuizMilioner | mit | 1,161 | 41 | codeparrot/github-code |
defd859ee79c4f80f195cd7d54b103a7c4791ac04001092be875b5407a155ef0 | /*
* Copyright(c) Sophist Solutions, Inc. 1990-2022. All rights reserved
*/
#include "../StroikaPreComp.h"
#include "../Configuration/StroikaConfig.h"
#include "Thread.h"
#include "AbortableMutex.h"
using namespace Stroika::Foundation;
using namespace Stroika::Foundation::Execution;
/*
************************... | C++ | Library/Sources/Stroika/Foundation/Execution/AbortableMutex.cpp | SophistSolutions/Stroika | mit | 742 | 31 | codeparrot/github-code |
d7a5abc6fee6ca3275f475a6254c16516bf6db5a7bf769a37a455ced996d064c | package noir.math2d;
import java.awt.Rectangle;
public class Rectangle2D
{
public final double x;
public final double y;
public final double width;
public final double height;
public Rectangle2D(Vector2D origin, Vector2D dimensions)
{
this(
origin.x,
origin.y,
dimensions.x,
dimensions.y
);... | Java | src/noir/math2d/Rectangle2D.java | Phazyck/Noir | mit | 1,032 | 80 | codeparrot/github-code |
ebc8195d2042744640180997521d9e4ad3af0f3237e49c195c5f65ca3ffbc132 | //#define ASTAR_EucledianHeuristic //"Heuristic"[ASTAR_NoHeuristic,ASTAR_ManhattanHeuristic,ASTAR_DiagonalManhattanHeuristic,ASTAR_EucledianHeuristic]Forces the heuristic to be the chosen one or disables it altogether
//#define ASTAR_NoHScaling //Should H score scaling be enabled. H Score is usually multiplied with ... | C# | Assets/AstarPathfindingProject/Core/Node.cs | MemphisGameDevelopers/Magic-N-stuff | mit | 26,270 | 766 | codeparrot/github-code |
595ed948b87d0ef8b798cc34fa128e858418e845a853377c43caf5ba5e890aab | module SynchAble
extend ActiveSupport::Concern
def paranoid_synch_models(table_name, last_synch_time)
cache_key_1 = "#{id}#{send(table_name).maximum(:updated_at).try(:to_i)}-#{table_name}"
association = Rails.cache.fetch(cache_key_1) do
if table_name == 'questions'
send(table_name).includes(:... | Ruby | app/models/concerns/synch_able.rb | DukeMobileTech/rails_survey | mit | 1,647 | 50 | codeparrot/github-code |
78e6cd46878696c2aa0e0b9cbbe1a42a0c3ff588d99dd1413fd09a869dfb0f51 | package com.aware.plugin.automatic_query;
import android.app.Activity;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.View;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.NumberPicker;
import android.widget.SeekBar... | Java | Plugins/AutomaticQuery/src/com/aware/plugin/automatic_query/Settings.java | EEXCESS/android-app | mit | 5,435 | 141 | codeparrot/github-code |
9dc4e5110d4aecd041d9e84feade2e4f94c9b6e7ec504fa4ab15086e22856408 | #ifdef DMALLOC
#include <dmalloc.h>
#endif
#include"misc.h"
#include"stack.h"
/* CONVENTIONS: All data structures for red-black trees have the prefix */
/* "rb_" to prevent name conflicts. */
/* */
/* Function names: E... | C | red_black_tree.h | chaojinn/cbinson | mit | 3,102 | 70 | codeparrot/github-code |
b9bc3c4ce1b9d9692132ed3234baf14eda6be71dcde6e9e0d2600792bf48793e | package com.melnykov.fab.sample;
import android.app.Activity;
import android.util.Pair;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import com.sinch.android.rtc.messaging.WritableMessage;
import java.u... | Java | app/src/main/java/com/melnykov/fab/sample/MessageAdapter.java | michaz13/FloatingActionButton | mit | 2,186 | 84 | codeparrot/github-code |
2b48011dea02e17944fd780cd07f02ec95ceb0c1a92051fb0afe3b13df68ed96 | /*
* Tuenti Challenge #7
* José Ignacio Rojo -josi-
*/
#include "util.h"
#include <unordered_map>
#include <algorithm>
#include <thread>
using namespace std;
class Contact
{
public:
int uid;
Contact* to_source;
Contact* to_target;
Contact() {}
~Contact() {}
Contact(int id) : uid(id), to_source(0), to_tar... | C++ | src/ch7-3.cc | jirojo2/tuenti2014 | mit | 4,108 | 241 | codeparrot/github-code |
b03f63557b15de7466af9b5c88345e226251453cbb16f16b05f884b65779019e | <?php
namespace oteroweb\UrpCrudGenerator;
use Carbon\Carbon;
use Illuminate\Http\Request;
use Auth;
/**
* Class UrpCrudGenerator
*/
class UrpCrudGenerator {
/**
* @var string
*/
protected $public_key;
/**
* @var string
*/
protected $private_key;
public function __constr... | PHP | src/UrpCrudGenerator.php | phpdevenezuela/URPCrudGenerator | mit | 605 | 39 | codeparrot/github-code |
7f7696f75a6d179dd7ec243c198b4373dc5c03708bf1de015413b4e29683038c | #include "engine/carre3D.hpp"
using namespace glm;
using namespace std;
mat4 scale(float sx, float sy, float sz){
return mat4(vec4(sx,0.f,0.f,0.f),vec4(0.f,sy,0.f,0.f),vec4(0.f,0.f,sz,0.f),vec4(0.f,0.f,0.f,1.f));
}
Carre3D::Carre3D(string type){
//Create vbo
glGenBuffers(1,&vbo);
//Binding VBO on GL... | C++ | files/engine/src/carre3D.cpp | JulienRst/OpenGLIMAC | mit | 9,288 | 112 | codeparrot/github-code |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.