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 |
|---|---|---|---|---|---|---|---|---|
afa60c13a8b85e36ed2771f84708b90a9517b93f926ce4aecec198c215101661 | import {
RecursiveTranslationChain
}
from '../../../../src/core/chain/recursive-translation-chain';
import {
CircularTranslationChain
}
from '../../../../src/core/chain/circular-translation-chain';
import {
TranslationChain
}
from '../../../../src/core/chain/translation-chain';
import {
Magnitude,
OrderOfM... | JavaScript | test/unit/core/chain/recursive-translation-chain-spec.js | nareshrohra/vaow | mit | 3,029 | 96 | codeparrot/github-code |
c447e88ac6b61a09d84e6d5babe2085642125c0dc120043f69ee15f0f6120c92 | <script>
function Card(rank, suit) {
this.rank = rank;
this.suit = suit;
this.showRank = function() {
var ranks = ["Ace", 2, 3, 4, 5, 6, 7, 8, 9, 10, "Jack", "Queen", "King"]
return ranks[this.rank - 1]
}
this.show = function() {
var suits = ["Hearts", "Spades", "Diamonds", "Club... | HTML | Class6/Homework/CardGame2_0.html | rorysterley/code-fellows-c-14 | mit | 2,546 | 113 | codeparrot/github-code |
0503fd57c96366360a22f706d5cc9e0397228e927aefed066db4051b087605a0 | (function () {
"use strict";
var app = angular.module("dashboard-app");
app.directive("stopwatch", ["$interval", function ($interval) {
return {
restrict: "E",
replace: "true",
templateUrl: '/app/dashboard/stopwatch/stopwatch.html',
scope: {
... | JavaScript | src/Tomataboard/wwwroot/app/dashboard/stopwatch/stopwatch.js | vasileiossam/Tomataboard | mit | 1,942 | 63 | codeparrot/github-code |
fe43c0f996aca905743c35d846d5da9762ffadc4da2671d341418530bd61b5cb | package com.epi;
import java.util.*;
public class LongestSubarrayWithDistinctEntries {
// @include
public static int longestSubarrayWithDistinctEntries(List<Integer> A) {
// Records the most recent occurrences of each entry.
Map<Integer, Integer> mostRecentOccurrence = new HashMap<>();
... | Java | src/main/java/com/epi/LongestSubarrayWithDistinctEntries.java | harishraj/epicode | mit | 2,646 | 75 | codeparrot/github-code |
969accce1f02e9f1eaca710117812e53283154e54e78c295841e44bc930025ee | namespace PokerTell.DatabaseSetup.ViewModels
{
using System;
using System.Reflection;
using System.Windows.Input;
using log4net;
using Microsoft.Practices.Composite.Events;
using PokerTell.DatabaseSetup.Properties;
using PokerTell.Infrastructure.Events;
using PokerTell.Inf... | C# | Src/PokerTell.DatabaseSetup/ViewModels/ConfigureDataProviderViewModel.cs | thlorenz/pokertell | mit | 6,438 | 213 | codeparrot/github-code |
68fa9bcda3d70b39026d197f2de98f3d236563ff49d4cf96847446427ced087b | Template[getTemplate('nav')].helpers({
headerClass: function () {
var headerClass = "";
var bgBrightness = tinycolor(Settings.get('headerColor')).getBrightness();
if (bgBrightness < 50) {
headerClass += " dark-bg";
} else if (bgBrightness < 130) {
headerClass += " medium-dark-bg";
} el... | JavaScript | client/views/nav/nav.js | nwabdou85/tagsira | mit | 1,823 | 65 | codeparrot/github-code |
1a02b735e31290189f7e80b7422d89a8db11359a0d002bb88dc570189b4c6141 | //
// System.Web.UI.WebControls.AccessDataSource.cs
//
// Authors:
// Sanjay Gupta (gsanjay@novell.com)
//
// (C) 2004 Novell, Inc (http://www.novell.com)
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"),... | C# | qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Web/System.Web.UI.WebControls/AccessDataSource.cs | jjenki11/blaze-chem-rendering | mit | 4,622 | 130 | codeparrot/github-code |
4c2c0e73a98b1e4e68d43dad48f2c376591f4eaa7c7e88610e07744a8c75e781 | <?php
namespace Skies\Bundle\ImagineBundle\Imagine\Filter;
use Imagine\Filter\FilterInterface;
use Imagine\Image\ImageInterface;
use Imagine\Image\Point;
class PasteFilter implements FilterInterface
{
/**
* @var \Imagine\Image\ImageInterface
*/
protected $pasteImage;
/**
* @var string|inte... | PHP | Imagine/Filter/PasteFilter.php | AntoineTesson/ImagineBundle | mit | 3,297 | 119 | codeparrot/github-code |
4092cee4fc1eefd7c5d5b1916b413b4d1bc370ab32c68d0cd0a8a5260dbbabcf | <?php
/**
* Piwik - Open source web analytics
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
* @version $Id: Rss.php 6452 2012-06-03 00:19:51Z matt $
*
* @category Piwik
* @package Piwik
*/
/**
* RSS Feed.
* The RSS renderer can be used only on Piwik_DataTa... | PHP | analytics/piwik/core/DataTable/Renderer/Rss.php | mrmgee/dev-evtouch | mit | 5,096 | 210 | codeparrot/github-code |
220e3b596b425a4ae25e1480d6b3a89d17b46b9b7f3caeb43443a1cda88e2f69 | <!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 chars... | HTML | membot/apps/projects/templates/projects/_base.html | ryanpitts/membot | mit | 2,077 | 47 | codeparrot/github-code |
e2e47ea7094bdcdcfbe18708fc0658eb4893c52213661a7028f9d0b5954a742e |
local PANEL = {}
--[[---------------------------------------------------------
Name: Init
-----------------------------------------------------------]]
function PANEL:Init()
self:SetEnabled( true )
self:SetScroll( 0 )
self:SetBarScale( 4 )
self.Velocity = 0
self.HasChanged = true
end
--[[----------------... | Lua | Red Vs. Blue Files/lua/vgui/slidebar.lua | philsiff/Red-Vs-Blue | mit | 5,496 | 247 | codeparrot/github-code |
71db904b90ad2f3e6da832bac46c8de167c9550ca7315b8ae142920015684e05 | using Newtonsoft.Json;
using System;
using System.Web;
using System.Web.Mvc;
namespace DapperDynamicToJson.Controllers
{
// 実装は ASP.NET MVC 5.xのJsonResultをほぼ踏襲。 http://aspnetwebstack.codeplex.com/
public class JsonNetResult : JsonResult
{
public override void ExecuteResult(ControllerContext context)
{
if (... | C# | src/DapperDynamicToJson/Controllers/JsonNetResult.cs | kiyokura/DapperDynamicToJson | mit | 1,080 | 45 | codeparrot/github-code |
5f681ec9541a6daaf7bf31df57f551dd6347db629e6b0b3393ad2685eaed05eb | 'use strict';
import React, {PropTypes} from 'react';
class {{component}} extends React.Component {
constructor(props) {
super(props);
}
componentWillMount() {
// component has not been rendered to DOM yet
// process any data here if needed
}
componentDidMount() {
// component has been rend... | JavaScript | templates/react/index.js | Jam3/nyg-ui-generator | mit | 1,060 | 53 | codeparrot/github-code |
eaf54af0f2cf94387c12835917fbd9722fbf12f3dc6f25c9294906a4347a6040 | # Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
Development script of the ChemEnv utility to get the explicit permutations for coordination environments identified
with the separation plane algorithms (typically with coordination numbers >= 6)
"""
import itertools
impo... | Python | dev_scripts/chemenv/explicit_permutations_plane_algorithm.py | materialsproject/pymatgen | mit | 5,857 | 152 | codeparrot/github-code |
cdc8e651090b2dc03694f4990b94c740f74c50b5886ff74407a57c56c1394829 | /**
* Set Connections Request event
* @module daemon/events/set-connections-request
*/
const NError = require('nerror');
const Base = require('./base');
/**
* Set Connections Request event class
*/
class SetConnectionsRequest extends Base {
/**
* Create service
* @param {App} app ... | JavaScript | modules/daemon/src/events/set-connections-request.js | breedhub/bhid-node | mit | 2,830 | 92 | codeparrot/github-code |
c845a410e92e0654e295da333bcf8e81c6560f370ce74773c954458ae886047b | <?php
namespace Tools\Shell;
use Tools\Shell\Command\{ Command, ExitCommand, HelpCommand };
class Shell
{
/**
* Commands
*
* @var array
*/
private $commands;
/**
* Is running
*
* @var bool
*/
private $running;
public function __construct(array $commands = [])
{
$this->commands = $commands... | PHP | lib/Shell/Shell.php | kranack/PHP-Tools | mit | 1,029 | 62 | codeparrot/github-code |
2f80895bf6b3ebe545bc21896ade4b0ca5a48f192d7d180aca9adaefaf4e8f3e | require "rspec/matchers"
# rubocop:disable Metrics/BlockLength
RSpec::Matchers.define :send_sms do |options|
supports_block_expectations
match do |block|
options ||= {}
@phone = options.delete(:to)
@text = options.delete(:text)
# we need to know actual phone and text for failure message
call... | Ruby | lib/any_sms/matchers/send_sms.rb | Fedcomp/active_sms | mit | 1,547 | 70 | codeparrot/github-code |
a5bf5356fe66eff61a4e40c44efd963f07ec98a41db3839f70c11f003b633d97 | <?php
namespace Statamic\Assets;
use Statamic\API\URL;
use Statamic\API\Path;
use Statamic\API\Cache;
class DimensionBuilder
{
/**
* @var Asset
*/
private $asset;
/**
* @var string
*/
private $cacheKey;
/**
* @var int
*/
private $cacheLength = 60;
/**
... | PHP | statamic/core/Assets/DimensionBuilder.php | ICJIA/icjia-tvpp | mit | 2,646 | 138 | codeparrot/github-code |
aea70ee7c7a04c33b594a7c3571b6b2e92082f8369cd7b529c1d2d8e3ce5e340 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2018-2019 CERN.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Contributed Marshmallow fields."""
from __future__ import absolute_import, print_... | Python | invenio_records_rest/schemas/fields/marshmallow_contrib.py | inveniosoftware/invenio-records-rest | mit | 4,465 | 141 | codeparrot/github-code |
cb7ec89eba822921995ae6a54b6cfe8dc67f014c070ea9b6cc55b2330c76d013 | require 'benchmark'
module Easymon
class Checklist
extend Forwardable
def_delegators :@items, :size, :include?, :empty?
attr_accessor :items
attr_accessor :results
def initialize(items={})
self.items = items
self.results = {}
end
def check
self.results = items.inject(... | Ruby | lib/easymon/checklist.rb | basecamp/easymon | mit | 1,624 | 70 | codeparrot/github-code |
3f6eec8bf6c8c1a614bd8624af7b6a972c6178f5481ec8554ea1a8d22f4e1265 | package de.diddiz.codegeneration.codetree;
import java.util.List;
import java.util.Set;
import de.diddiz.codegeneration.codetree.evaluation.EvaluationContext;
import de.diddiz.codegeneration.codetree.generator.Context;
import de.diddiz.codegeneration.codetree.generator.Generator;
import de.diddiz.codegeneration.except... | Java | src/de/diddiz/codegeneration/codetree/Function.java | DiddiZ/CodeGeneration | mit | 2,412 | 88 | codeparrot/github-code |
599689abd54f65f538ffb64c82aa40784e0b5161a22d58b8efd375ba849048b8 | #ifndef PIPELINE_VALUE_H__
#define PIPELINE_VALUE_H__
#include <pipeline/all.h>
#include <pipeline/Process.h>
namespace pipeline {
/**
* A class to represent the value of the output of a process node. The value
* will be automatically updated whenever it is used.
*
* Usage example:
*
* Value<Image> image = ... | C | Value.h | funkey/pipeline | mit | 5,017 | 267 | codeparrot/github-code |
95b69156ea8f1783334c2f8e3fd1d562e87f752f619b0b71e0c546da5d2149df | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Localisation;
using osu.Game.Configuration;
using osu.Game.Graphics.UserInterface;
nam... | C# | osu.Game/Overlays/Settings/Sections/UserInterface/GeneralSettings.cs | huoyaoyuan/osu | mit | 1,825 | 52 | codeparrot/github-code |
b1ce14284cd36b149ee6e3b0d649da0ed8714c97eadb4479b8e0c2f7559d8cba | using System;
using System.Collections.Generic;
namespace LexLib
{
public class Minimize
{
/*
* Member Variables
*/
Spec spec;
List<List<DTrans>> group;
int[] ingroup;
/*
* Function: Minimize
* Description: Constructor.
*/
... | C# | LexLib/Minimize.cs | zbrad/CsLex | mit | 15,882 | 557 | codeparrot/github-code |
7d800ea023b88b133762dbe2858a5b62d3d46be02defa23d6f026e40aee4c570 | /*
* Copyright 1999-2001,2004 The Apache Software Foundation.
*
* 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 requir... | Java | tomcat_files/6.0.0/StandardPipeline.java | plumer/codana | mit | 16,613 | 564 | codeparrot/github-code |
8c4360c7795bd6036067b51a3a8803d2f3dd9f730017c7d59694fe8521e5e566 | import { css, StyleSheet } from 'aphrodite';
import { margin } from 'css-verbose';
import * as React from 'react';
import { VitrineComponent } from '../../features/VitrineComponent';
import * as lessVars from 'less-vars-loader?camelCase&resolveVariables!../../../resources/less/theme/globals/site.variables';
interfac... | TypeScript | sources/client/app/ui/molecules/GamesModule.tsx | paul-roman/vitrine | mit | 1,679 | 71 | codeparrot/github-code |
98f17ef615066f731778088fec14507eb52e314e609b7f9c31aa6a27211bd55a | package org.xcolab.view.pages.contestmanagement.utils;
import au.com.bytecode.opencsv.CSVWriter;
import org.springframework.http.HttpHeaders;
import org.springframework.util.CollectionUtils;
import org.xcolab.client.admin.attributes.platform.PlatformAttributeKey;
import org.xcolab.client.contest.StaticContestContext;... | Java | view/src/main/java/org/xcolab/view/pages/contestmanagement/utils/CsvExportHelper.java | CCI-MIT/XCoLab | mit | 6,820 | 157 | codeparrot/github-code |
7bb66dc5769f4b8169d010546c01613d9cd591dffc30bf9a8f2cdee6dc5b0b3e | package org.moe.runtime.nativeobjects
import org.moe.runtime._
import org.moe.runtime.nativeobjects._
import scala.util.{Try, Success, Failure}
class MoeBoolObject(
v: Boolean, t : Option[MoeType] = None
) extends MoeNativeObject[Boolean](v, t) {
// runtime methods
def equal_to (r: MoeRuntime, other: Moe... | Scala | src/main/scala/org/moe/runtime/nativeobjects/MoeBoolObject.scala | MoeOrganization/moe | mit | 1,059 | 39 | codeparrot/github-code |
049673755f3ff45f19eebf23ec85fccba7b6f899a582f90c676b309d1e26243e | UI.buttonGroup = function(title,buttonsInfo){
var me = UI.panel();
me.hide();
var titleBar = UI.scale9Panel(0,0,20,20,UI.Assets.panelDarkGreyScale9);
titleBar.ignoreEvents = true;
me.addChild(titleBar);
var titleLabel = UI.label({
label: title,
font: fontSmall,
width: 60,
top: 1
});
me.addChild(title... | JavaScript | script/src/ui/app/components/buttonGroup.js | steffest/BassoonTracker | mit | 1,472 | 73 | codeparrot/github-code |
206f033121f36dd7261df8921b79b3ae53953651943f68391e9c28a0c2e539cc | # frozen_string_literal: true
class ResumesController < ApplicationController
helper_method :resume
authorize_resource
def create
@resume = current_user.resumes.new(resume_params)
@resume.filename = "CV-#{current_user.display_name}-#{SecureRandom.hex(2)}".gsub(/\s/, '-')
if @resume.save
redire... | Ruby | app/controllers/resumes_controller.rb | moroz/hatarake | mit | 850 | 33 | codeparrot/github-code |
948d5d9bc38a65423d3abedbd8814d4ff9d7b698621a25f211537c2ae619a272 | /*
* Copyright (c) 2014
* Mikol Faro <mikol.faro@gmail.com>
* Simone Mangano <simone.mangano@ieee.org>
* Mattia Tortorelli <mattia.tortorelli@gmail.com>
*
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), t... | Java | src/main/java/org/biokoframework/http/matcher/CapturingAuthTokenMatcher.java | bioko/http-test | mit | 2,608 | 76 | codeparrot/github-code |
71588e4005d6a70e381ddccff8af95c738a618c51c503464b4ec7a6cf5dc8ac0 | var data = require('../data.json');
var userdata = require('../public/js/userdata');
exports.decline = function(req, res){
var id = parseInt(req.query.id);
//Find the user_id currently logged on
var user_id = -1;
for(var i = 0; i < data['users'].length; i++){
if(data['users'][i]['active']){
user_id... | JavaScript | routes/declineFavr.js | darreneng/favr | mit | 819 | 35 | codeparrot/github-code |
3354919831c0a3c72d84f62bbe4c19699b55270119b3f8a9240ceb6bb3dce7db | #pragma once
#include "MapEntity_Base.h"
#include "Animation.h"
class MapEntity_Projectile_Base :
public MapEntity_Base
{
public:
MapEntity_Projectile_Base(const char *FlyingTextureFilename,const char *HittingFileName,TileMap *tileMap,float SpawnX,float SpawnY,float Speed,float AngleX,float AngleY)
{
aniTraveling... | C | SeniorProject_Game/SeniorProject_Game/MapEntity_Projectile_Base.h | Loooplop/SeniorProjectRepo | mit | 1,949 | 92 | codeparrot/github-code |
a2c008b8b0b999ca496461024240206f5965657990b904d3795f692c8f23da4a | // Copyright (c) 2021 Blacknon. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
package list
import (
"fmt"
"strings"
runewidth "github.com/mattn/go-runewidth"
termbox "github.com/nsf/termbox-go"
)
// Draw a string based on the specified co... | GO | list/draw.go | blacknon/lssh | mit | 3,848 | 136 | codeparrot/github-code |
9c4cbfa60e6387d6ab161547bdd40bfdf0b8d14a94f30fdcc4750dcffb93e6a7 |
/**
*
* object_ticker.cpp
*
**/
#include"object_ticker.hpp"
#include"../test/exceptions.hpp"
#include"../test/debug_assertions.hpp"
#include<algorithm>
namespace aab {
namespace time {
//todo - Ticker SetRange is not valid for our purposes
ObjectTicker::ObjectTicker (TimeReporter::Ptr report, co... | C++ | time/object_ticker.cpp | MrTAB/aabGameEngine | mit | 3,159 | 152 | codeparrot/github-code |
144533a87cca4972def9dc751267a38873712638f195040529eb49520aefa43e | using System.Web.Http;
using Hal9000.Json.Net.MediaTypeFormatters;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Serialization;
namespace HalWebApiExample.App_Start {
public static class WebApiConfig {
public static void Register ( HttpConfiguration config ) {
... | C# | src/HalWebApiExample/App_Start/WebApiConfig.cs | sfgadjo/Hal9000.Json.Net | mit | 1,438 | 39 | codeparrot/github-code |
d8fa24d95fc2977073bb93bc2ade59bbd10cefdaa65c0cbf2304ff836439b3de | define([
'views/products/steps/stepsTemplate',
'text!templates/products/steps/variations.html'
],
function (stepTemplate, template) {
var ProductsEditVariationsView = stepTemplate.extend({
events: {
'click #save_and_continue': 'saveAndContinue',
'click #colors.sin... | JavaScript | public/js/views/products/steps/variations.js | noahgreenleaf/widgetdemo | mit | 10,215 | 253 | codeparrot/github-code |
34005c7ae242e65d8b3a0b1c5f47b645ea3cac947ef9e94c1911a2757e5c98bb | /**
UTF8(BOM) LGPL trydofor.com May.2007
===========================================================
void parse(a9dom)
*/
var AreaTableParser = function()
{
A9Dom.type.area_table = {
$border:"area_table$border",
$width:"area_table$width",
$height:"area_table$height",
... | JavaScript | 1x/a9w3-engine/3rdp/a9text/com/trydofor/a9text/parser/area/table.js | trydofor/trydofor.github.com | mit | 4,625 | 163 | codeparrot/github-code |
f5f4007be1db42cf3573706dbe4c46b5bc9374187bfcefe257f0bf8d17f07149 | import {fireEvent} from '@testing-library/dom';
import {h} from '../../utils';
import delegate from '../../../src/addons/delegate';
import {getFormattedMessage} from '../../../src/validation';
import {normalizeToArray} from '../../../src/utils';
let instance;
let delegateElement = h();
afterEach(() => {
if (instan... | JavaScript | test/integration/addons/delegate.test.js | atomiks/tippyjs | mit | 5,396 | 207 | codeparrot/github-code |
1a1056db97b7e826e0faaaba11b56583cd8b9b4486c77cd75a5097f4bb2440be | import datetime
from django.conf import settings
from django import template
from django.core.cache import cache
from online_status.status import CACHE_USERS, CACHE_PREFIX_ANONYM_USER, TIME_OFFLINE, ONLY_LOGGED_USERS, status_for_user
from django.contrib.sessions.models import Session
register = template.Library(... | Python | online_status/templatetags/online_status_tags.py | codefisher/codefisher_apps | mit | 2,065 | 52 | codeparrot/github-code |
e39f7bb3b88b8d84bd797e341a1b7f454a733b13761615be16b410ca2a5f5515 | // Copyright (c) Simple Injector Contributors. All rights reserved.
// Licensed under the MIT License. See LICENSE file in the project root for license information.
namespace SimpleInjector.Decorators
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
... | C# | src/SimpleInjector/Decorators/DecoratorExpressionInterceptor.cs | simpleinjector/SimpleInjector | mit | 14,712 | 327 | codeparrot/github-code |
8a75e4882a689bc4695db66e3ae3461611fb13fa3250cbbd5a09caed60218b12 | #include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <limits.h>
#include <stdbool.h>
#include <assert.h>
#include <string.h>
#include "csv_tokenizer.h"
#include "debug.h"
#include "hints.h"
//#define BUFFER_SIZE 30
//#define BUFFER_SIZE 72
#define CELL_BUFFER_SIZE (BUFFER_SIZE ... | C | src/csvcut.c | DavyLandman/csvtools | mit | 14,127 | 410 | codeparrot/github-code |
03fabc7d8e3799ac4641ca9fc638e47e73564374cba9488caca84bba210b6295 | package dead.of.night.studios.hostnow;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ann... | Java | src/main/java/dead/of/night/studios/hostnow/App.java | DeadOfNightStudios/HostNow | mit | 1,340 | 45 | codeparrot/github-code |
ebe1b53217e221f1711ee250f14e6e3777f8ebe755e576cc965f2503f26e2509 | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Dir_locales_model extends CI_Model {
//public $title;
public function __construct(){
// Call the CI_Model constructor
parent::__construct();
}
public function obtener_locales()... | PHP | application/models/Dir_locales_model.php | SirKawaii/masticapp | mit | 16,541 | 490 | codeparrot/github-code |
0b8211100ec760c3f4202a7e564088ddc2994f35c4d4fd5bf2effe45d86e538e | using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Web.Mvc;
using wreq.BL.Abstract;
using wreq.Controllers.Abstract;
using wreq.DAL.Abstract;
using wreq.Models.Entities;
using wreq.Models.ViewModels;
namespace wreq.Controllers
{
public class WaterLimitsController : C... | C# | wreq/wreq/Controllers/WaterLimitsController.cs | OleksaBalancer/wreq | mit | 4,939 | 153 | codeparrot/github-code |
858eb5de8dfc5389cd29200528b375fb19210651430b06da9a4dc5d58f327084 | import java.io.*;
import java.net.*;
import java.util.*;
import java.nio.*;
public class Message {
public static int decodeMessage(byte[] message,int type) throws Exception {
switch (type) {
case 0: //keep-alive <length=0>
break;
case 1: //choke <length=1><MID=0>
break;
case 2: //un... | Java | Message.java | BrendanParks/Torrent | mit | 1,831 | 78 | codeparrot/github-code |
8b14d7fdd6b9a7d2d30efd2cc0fee7da68d3832071ccaf39cc76e6493589df0c | var app = app || {};
app.modal = (function () {
function createModal(modalId, title, content, btns) {
this.modalId = modalId;
this.title = title;
this.content = content;
this.btns = btns;
var modal = this;
this.Open = function () {
var htmlBody = '<div ... | JavaScript | src/WebBlocks.Web/Themes/Default/Scripts/app/app-modal.js | dyatlov-a/WebBlocks | mit | 2,888 | 86 | codeparrot/github-code |
66ddc0dcfc21dbc3d87c3194364322a61724da605cd688790c05402f7a42ee9c | using Microsoft.Extensions.Logging;
using System.Collections.Generic;
using System.IO;
namespace Server.Commands {
[Command("check_file_exist")]
public class CheckFileExistCommand:ICommand {
public CommandResult Execute(LoggerFactory loggerFactory, Dictionary<string, string> args) {
if (args == null) {
r... | C# | Server/Commands/CheckFileExistCommand.cs | KonH/DotNetCoreBuildServer | mit | 1,215 | 38 | codeparrot/github-code |
de11283ae05038c0e2a64134c87290e5871440340de7888f422ca0c1f82af74e | <?php
/**
* TorrentPier – Bull-powered BitTorrent tracker engine
*
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT L... | PHP | viewforum.php | torrentpier/torrentpier | mit | 20,918 | 531 | codeparrot/github-code |
8b304105740c6ba687a3ee0aae92989ad8b4b73d4fec23599fe52cfa2128a0d2 | package org.bouncycastle.crypto.test;
import java.io.BufferedReader;
import java.io.EOFException;
import java.io.IOException;
import java.io.InputStreamReader;
import org.bouncycastle.crypto.Digest;
import org.bouncycastle.crypto.digests.SHA3Digest;
import org.bouncycastle.util.Arrays;
import org.bouncycastle.util.en... | Java | core/src/test/java/org/bouncycastle/crypto/test/SHA3DigestTest.java | isghe/bc-java | mit | 7,064 | 273 | codeparrot/github-code |
2c6df04be310e36fe2965e1b9e3a703f839396306a1c2091c7874c7eada9ba9b | <?php
namespace Mr\StartBundle\Entity;
/**
* Mr\StartBundle\Entity\MrRoads
*
*/
class MrRoads
{
/**
* @var array $resume
*/
private $resume;
public function __construct(Mr\StartBundle\Entity\MrResume $resume)
{
//TODO : find possibilities
$this->resume = $resume;
}
... | PHP | src/Mr/StartBundle/Entity/MrRoads.php | kohr/HRSymfony2 | mit | 638 | 36 | codeparrot/github-code |
83c400db8a645bf12c79d7803425bdd84ae4fd3b2d6acf6e087d6adf0202aed6 | import json
from collections import OrderedDict
import openpyxl
from openpyxl.styles import Border, Side, Alignment, Font, NamedStyle
from openpyxl.utils.cell import get_column_letter
from directions.models import IstochnikiFinansirovaniya
from doctor_call.models import DoctorCall
from hospitals.tfoms_hospital import... | Python | statistic/structure_sheet.py | moodpulse/l2 | mit | 61,839 | 1,597 | codeparrot/github-code |
0327b3a9a7fe89756771daa5ab91063e9e67c2a28456b938c6b79c4e5764db13 | package org.utils.internetsearch.preferences;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.eclipse.jface.preference.IPreferenceStore;
import org.utils.internetsearch.Activator;
public class ISPrefenceManager {
private static List<String> fAllEngines = new ArrayList<String... | Java | InternetSearch/src/org/utils/internetsearch/preferences/ISPrefenceManager.java | alexadam/InternetSearch | mit | 5,546 | 193 | codeparrot/github-code |
567a555963458288585d42e505af21deb13a03e7b95e412c7e09f1763afe7146 | /**
* command.js
*/
/* api */
import { runSetup } from './setup.js';
import { version as hostVersion } from './version.js';
import { program as commander } from 'commander';
import {
CMD_BROWSER, CMD_BROWSER_DESC, CMD_CONFIG_PATH, CMD_CONFIG_PATH_DESC,
CMD_EDITOR_ARGS, CMD_EDITOR_ARGS_DESC, CMD_EDITOR_PATH, CMD_... | JavaScript | modules/commander.js | asamuzaK/withExEditorHost | mit | 1,432 | 47 | codeparrot/github-code |
f5bc693ab0a393b81b5768903c7dce3ffd23b7726f6da3a9c3ff3cb46bfecfc6 | <?xml version="1.0" ?><!DOCTYPE TS><TS language="ja" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Litecoin</source>
<translation>InstaMineNuggetsについて</translation>
... | TypeScript | src/qt/locale/bitcoin_ja.ts | InstaMineNuggets/InstaMineNuggets | mit | 97,093 | 2,917 | codeparrot/github-code |
a91a1166433fc72a6aec7b1bb54863c90c72b8468fc66888b91db7a5a077cff5 | package com.brandon3055.madhelp.handlers;
import com.brandon3055.madhelp.client.GuiDownloadList;
import com.brandon3055.madhelp.client.GuiInfo;
import net.minecraft.client.gui.*;
import net.minecraft.client.resources.I18n;
import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.client.event.GuiOpenEve... | Java | src/main/java/com/brandon3055/madhelp/handlers/ForgeEventHandler.java | brandon3055/MadHelp | mit | 4,021 | 109 | codeparrot/github-code |
2eeb3fac79c53e5ab469f9279b4fab359766509b6babb40fd419bbfb9be0fce1 | /***************************************************
- TEACOMMERCE CLASS
***************************************************/
if (typeof TC === 'undefined') { var TC = {}; }
(function () {
/***************************************************
- ORDER
***************************************************/
TC.ge... | JavaScript | Source/Lib/Tea Commerce/tea-commerce.js | MindfireTechnology/Tea-Commerce-for-Umbraco | mit | 27,943 | 934 | codeparrot/github-code |
8d7e74033b51637ee0c0923ea96ad22adb6e967ab244d80bd547ef2bd737ca8a | /**
* 1. Type checks
* 2. Field enforcement
*
* var MyStruct = new Struct({
* fieldA: Struct.Types.string,
* fieldB: Struct.Types.object,
* FieldC: function contract(value) {
* if (value >= 99) {
* return 'precondition violated, expected value to be < 99, got: ' + value;
... | JavaScript | index.js | dmitriiabramov/js-structs | mit | 2,648 | 110 | codeparrot/github-code |
7ae74f9fbce0c3c6e0e296e0d934c66e32822286842577fff2a638f482530b2f | var express = require('express');
var router = express.Router();
var knox = require('knox');
var Jimp = require('jimp');
var fs = require('fs');
var defaults = require("./../config/defaults.json");
var presets = require("./../config/presets.json");
var crypto = require('crypto');
var sendOptions = {
root: __dirnam... | JavaScript | routes/index.js | cuatromedios/amazon-s3-image-processor | mit | 7,699 | 183 | codeparrot/github-code |
48c55a22604fa9475665ee1fcd1c1fe07eba585008007d3c8384ff412665debe | import uuid
from google.appengine.api import memcache
class CollectionCache:
def __init__(self, timeout=480, hash=None):
self.contents = [];
if hash:
self.contents = memcache.get(hash)
self.timeout = timeout
def add(self, item):
hash = uuid.uuid1().hex
mem... | Python | collection_cache.py | rmoskal/e-springpad | mit | 845 | 34 | codeparrot/github-code |
f0709013a89a53ba0224d8af7ef0ae2a459a5ff616e8504866525c4b26636ee0 | <?php
return [
/*
|--------------------------------------------------------------------------
| phpCAS Debug
|--------------------------------------------------------------------------
|
| Example : '/var/log/phpCas.log'
| or true for default location (/tmp/phpCAS.log)
|
*/
'ca... | PHP | src/config/cas.php | csi-uksw/laravel-cas | mit | 3,801 | 120 | codeparrot/github-code |
409b05b30824a2bddd467feb16da1bec16d3636fe25e329cccb4c1e44cbc4f1a | <?php
/**
* 使用PHP代码从纯真IP数据库转换了之后的sqlite数据库中获取IP地址所在地理位置信息
* @author york
*/
class IpLocationSeekerSqlite {
private $sqlite_db_path;
private $sqlite_version;
private $db;
/**
* 构造函数,初始化一个查询实例
* @param string $sqlite_db_path 存放了纯真地址库的sqlite数据库的路径
* @param integer $version sqlite数据库的版本,2或者3,默认值为-1,表示自动检测数据库... | PHP | app/qqwry/scripts/IpLocationSeekerSqlite.php | zfdang/zSMTH-Android | mit | 3,333 | 134 | codeparrot/github-code |
163e31ae1c66972d59fdfbb1d6f7bd168d2ae2c427c679334aa01d5fbdb92a89 | import React from 'react';
import {Nav, Navbar, NavDropdown} from 'react-bootstrap';
import {LinkContainer} from 'react-router-bootstrap';
import {AuthConsumer} from './AuthContext'
function Menu() {
return (
<AuthConsumer>
{({isAuth, name, logout}) => (
<Navbar bg="light" expan... | JavaScript | react/src/Menu.js | gschrader/ratpack-react-boilerplate | mit | 1,683 | 44 | codeparrot/github-code |
fbc777a17bd60d8ff312a878293f249805e1cf3fe5dcbdc388033f53486ec6b0 | <?php
/*
* This file is part of the Sylius package.
*
* (c) Paweł Jędrzejewski
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Sylius\Bundle\AttributeBundle\Form\Type;
use Sylius\Bundle\ResourceBundle\Form\Type\Abstrac... | PHP | src/Sylius/Bundle/AttributeBundle/Form/Type/AttributeTranslationType.php | Symfomany/Sylius | mit | 1,426 | 66 | codeparrot/github-code |
39d5a25900b73b820c655befa501b92107279dba3979b22ad86004445c1816b8 | // Copyright (c) 2011-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Fortcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_QT_BITCOINUNITS_H
#define BITCOIN_QT_BITCOINUNITS_H
#inclu... | C | src/qt/bitcoinunits.h | ahmedbodi/test2 | mit | 4,572 | 136 | codeparrot/github-code |
6196bb38e67509952184dfe5e3aa4095a5a770d67009c9a1b20706f0ca6ce9c8 | /**
* Bootstrap Table Spanish (México) translation (Obtenido de traducción de Argentina)
* Author: Felix Vera (felix.vera@gmail.com)
* Copiado: Mauricio Vera (mauricioa.vera@gmail.com)
* Revisión: J Manuel Corona (jmcg92@gmail.com) (13/Feb/2018).
* Revisión: Ricardo González (rickygzz85@gmail.com) (20/Oct/2021)
*... | JavaScript | src/locale/bootstrap-table-es-MX.js | wenzhixin/bootstrap-table | mit | 2,702 | 110 | codeparrot/github-code |
7b4fbed854254443cd04f3c49db93a501b53de1db3a6b020da622a761e00f6b0 | #ifndef ATTITUDE_H_
#define ATTITUDE_H_
#include <inttypes.h>
// =============================================================================
// Accessors:
const float * GravityInBodyVector(void);
// -----------------------------------------------------------------------------
float HeadingAngle(void);
// -----... | C | attitude.h | ctraabe/FlightCtrl | mit | 1,411 | 46 | codeparrot/github-code |
3ac155e25507a94bec9fff4174f4c5bfdf1135f66452439e793fcf8582417e8a | <?php
/**
* BabiPHP : The flexible PHP Framework
*
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) BabiPHP.
* @link https://github.com/lambirou/babiphp BabiPHP Project
* @license... | PHP | system/Http/PumpStream.php | lambirou/babiphp | mit | 4,388 | 179 | codeparrot/github-code |
8e2189895f7ea1e47400e5b9a4cbe7d09474af7f66d1dbb7550bcd47883bc584 | -- cell-centered finite-difference solver
local ffi = require 'ffi'
local class = require 'ext.class'
local table = require 'ext.table'
local file = require 'ext.file'
local GridSolver = require 'hydro.solver.gridsolver'
local FiniteDifferenceSolver = class(GridSolver)
FiniteDifferenceSolver.name = 'FiniteDifference'
... | Lua | hydro/solver/fdsolver.lua | thenumbernine/hydro-cl-lua | mit | 1,838 | 50 | codeparrot/github-code |
ccf4a49bcb0da8a127167d591b69e983b7279d1f2faa5bb0962d853c3af73fac | <?php
namespace ArrasFilmFestival\BackOfficeBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
class PageController extends Controller
{
public function homeAction()
{
$em = $this->getDoctrine()->getManager();
$deleteForm =... | PHP | src/ArrasFilmFestival/BackOfficeBundle/Controller/PageController.php | rdlh/ArrasFilmFestival | mit | 1,855 | 54 | codeparrot/github-code |
eafedc5581155182f5c2893a818abc6d5cebf711e036e99958135ee7bfb95bb1 | module Rails
module Command
class RakeCommand < Base
extend Rails::Command::Actions
namespace "rake"
class << self
def printing_commands
formatted_rake_tasks.map(&:first)
end
def perform(task, *)
require_rake
ARGV.unshift(task) # Prepend ... | Ruby | railties/lib/rails/commands/rake/rake_command.rb | sergey-alekseev/rails | mit | 1,304 | 52 | codeparrot/github-code |
5d3587cd1a3589ce90a78ed9a81c67b914973b95468d7ffa9a2f25a9b27999cd | package com.waring.pswd;
import java.io.UnsupportedEncodingException;
import java.nio.charset.Charset;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import javax.crypto.C... | Java | android/app/src/main/java/com/waring/pswd/PSWD.java | dwaring87/pswd | mit | 14,617 | 453 | codeparrot/github-code |
f3ecff40dc45e659d6e1a15a62b97b9e2c0f33cefe8b3a7d2f7b24e6622e01ab |
//engine_ls.h
//use quantlib and boost for linear algebra
//http://quantlib.10058.n7.nabble.com/Multiple-linear-regression-weighted-regression-td5716.html
//ref. mc simul algo for the pricing of American options
//Peter BQ Lin , MSc dissertation, 2008
//code adapted from matlab code taken from ref.
#ifndef ENGI... | C | library/include/engine_ls.h | calvin456/intro_derivative_pricing | mit | 4,229 | 145 | codeparrot/github-code |
e2e241aca883e00f2e3effcb818849327c7966f8eeaf56fa2cf0226a44fa7388 | package revocations
import (
"github.com/leanovate/microzon-auth-go/common"
"github.com/leanovate/microzon-auth-go/logging"
"github.com/leanovate/microzon-auth-go/store"
"sync"
)
type RevocationsValidator struct {
Observe *ObserverGroup
lock sync.RWMutex
logger logging.L... | GO | revocations/revocations_validator.go | leanovate/microzon-auth-go | mit | 1,091 | 37 | codeparrot/github-code |
dfe1f538e810880cb7da56307cda276511e3a374de1b39c8ebbfd89dc8ca25a5 | #!/bin/bash
# Check for Homebrew, install if we don't have it
if test ! $(which brew); then
echo "Installing homebrew..."
if [ "$(uname)" == 'Darwin' ]; then
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
if [ "$(uname)" == 'Linux' ]; then
sh -c "$(curl -fsSL https... | Shell | homebrew/install.sh | togatoga/dotfiles | mit | 1,502 | 110 | codeparrot/github-code |
23e740a561f9567bd4b61b053d4e72c0fd4dc9fd4033059bd4b11551d97d3da2 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
from csv import DictReader, DictWriter
from datetime import datetime
from os import environ
from sys import argv
from time import sleep
import requests
from requests_oauthlib import OAuth1
from urlparse import parse_qs
# (command, argument, input, output) = argv[1:]
# ... | Python | twitter.py | geraldarthur/PrismJr | mit | 5,815 | 178 | codeparrot/github-code |
53c1376042aad4a146b599cdc68bc1ee154e52625de29e7877e1319a0e0a394d | import React, { Component } from 'react';
import loremIpsum from 'lorem-ipsum';
import moment from 'moment';
import './styles.css';
const msgGengerator = (count, ids=[]) => {
// console.log("msgGengerator:", count, ids);
return [...Array(count).keys()].map(idx => {
const who = Math.floor(Math.random() * ids.l... | JavaScript | src/components/common/Debug/index.js | kcliu/chatroom-frontend | mit | 1,237 | 55 | codeparrot/github-code |
80cfa8e07d9c60638d84fd1d4494170f9ac08d909af6a0c446ab8e88cbcbc103 | import React, { PropTypes } from "react";
import { FormGroup, Input, Label, FormFeedback } from "reactstrap";
import Immutable from "immutable";
import cuid from 'cuid';
class AuthInput extends React.Component {
static propTypes = {
label: PropTypes.string,
value: PropTypes.string,
errors: PropTypes.obje... | JavaScript | client/modules/Auth/components/redux-auth-reactstrap/Input.js | sharvit/my-blog-react | mit | 1,208 | 52 | codeparrot/github-code |
9bbc9323b81f93fd540145a0f80c978c046c32f19b89e4822cec73aee60e81cd | function get(o, path, defaultValue) {
var props = path.split('.'),
i,
// iterative variable
p,
// current property
success = true;
for (i = 0; i < props.length; i += 1) {
p = props[i];
if (has(o, p)) {
o = o[p];
} else {
su... | JavaScript | src/app/metadata/helpers.js | egucciar/angular2-webpack-starter-primeng-working | mit | 6,159 | 186 | codeparrot/github-code |
55c3918bb224e3a4e06bb4b5c230f434d4e198be6589bb1f384216e2c29fb176 | import asyncio
import logging
from aiozk import exc, WatchEvent, Deadline
from .sequential import SequentialRecipe
log = logging.getLogger(__name__)
class DoubleBarrier(SequentialRecipe):
ZNODE_LABEL = 'worker'
def __init__(self, base_path, min_participants):
super().__init__(base_path)
se... | Python | aiozk/recipes/double_barrier.py | tipsi/aiozk | mit | 2,390 | 73 | codeparrot/github-code |
ff7c1aed9da7e001fa6814e0ed6329e16f880c9b88c953980a745b38d0ed1a14 | var express = require('express');
var bodyParser = require('body-parser');
var fs = require('fs');
var app = express();
// simple logger
app.use(function(req, res, next){
console.log('%s %s', req.method, req.url);
next();
});
// parse application/json and application/x-www-form-urlencoded
app.use(bodyParser({limi... | JavaScript | index.js | janantala/node-mock | mit | 1,682 | 75 | codeparrot/github-code |
2bad90f90f21c325dfd955920b1a3240c8a302e379127772f95c7289a82733e0 | /// <reference path="utils.ts" />
/// <reference path="geom.ts" />
/// <reference path="text.ts" />
/// <reference path="scene.ts" />
/** Initial gap of lame-encded MP3 files */
const MP3_GAP = 0.025;
type ImageAsset = {
[index: string]: HTMLImageElement;
}
type AudioAsset = {
[index: string]: HTMLAudioEleme... | TypeScript | base/app.ts | euske/euskit | mit | 15,752 | 504 | codeparrot/github-code |
65f2c92f1fa096761eb339ba9a1fc12c1543707c34b50dd0e71f52ac1a85e496 | var Entity = ring.create({
constructor: function()
{
this.parent = null;
this.state = null;
this.position = new Point(0, 0);
this.dimensions = new Point(0, 0);
this.speed = 0;
this.renderedManually = false;
this.zIndex = 0;
this.clickable = false;
this.draggable = false;... | JavaScript | js/entity.js | adamdburton/CanvasWire | mit | 5,102 | 302 | codeparrot/github-code |
d43501aa9d2e3078ac102125892f21a3169a6452d886145a795a41efd737fba6 | #!/usr/bin/env python
"""
BeginDate:20071001
CurrentRevisionDate:20071001
Development Version : net 001
Release Version: pre-release
Author(s): Mishtu Banerjee
Contact: mishtu@harmeny.com
Copyright: The Authors
License: Distributed under MIT License
[http://opensource.org/licenses/mit-license.html]
... | Python | xaya/xayanet.py | MishtuBanerjee/xaya | mit | 22,529 | 626 | codeparrot/github-code |
cbeac030765e15067cf94c2e20da8db4a208aa9bf2d0863384c067a665a9580c | // This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2010 Benoit Jacob <jacob.benoit.1@gmail.com>
// Copyright (C) 2013-2014 Gael Guennebaud <gael.guennebaud@inria.fr>
//
// This Source Code Form is subject to the terms of the Mozilla
// Public License v. 2.0. If ... | C | CCRiftPlugin/deps/nanogui/ext/eigen/Eigen/src/SVD/UpperBidiagonalization.h | AndreaMelle/omnipreview | mit | 15,865 | 413 | codeparrot/github-code |
45e769188c4cffdd375b5f7833d4275bc583a70ef1c769f737981a4f93588f9d | import { AccessType, Deserializer, JsonConverstionError , JsonPropertyDecoratorMetadata} from './DecoratorMetadata';
import { Constants, getCachedType, getJsonPropertyDecoratorMetadata, getTypeName, getTypeNameFromInstance, isArrayType, isSimpleType, METADATA_JSON_IGNORE_NAME, METADATA_JSON_PROPERTIES_NAME } from './R... | TypeScript | src/main/DeserializationHelper.ts | shakilsiraj/json-object-mapper | mit | 8,751 | 190 | codeparrot/github-code |
9560ab7160655d04e1b522bcdd5899ee8409bdd2fb71bb78b41acdccfa6fc999 | ## ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# The MIT License (MIT)
#
# Copyright (c) 2013, 2014 Microsmart (Pty) Ltd
#
# 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
... | Ruby | ubiquity-model/lib/ubiquity/model/property.rb | MicrosmartSA/ubiquity-commons | mit | 9,721 | 303 | codeparrot/github-code |
0841e9eb8c912a43038490a413c96566e35aace6bf1be742e29dff2bea9cd5aa | package org.cyclops.integrateddynamics.core.network;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.util.Direction;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World... | Java | src/main/java/org/cyclops/integrateddynamics/core/network/Network.java | CyclopsMC/IntegratedDynamics | mit | 22,747 | 585 | codeparrot/github-code |
fbaa4692c888ae3fef898b2dffc95fd36f578920b37ed09b92dcff65d2bedd17 | """
Created on 16 May 2017
@author: Bruno Beloff (bruno.beloff@southcoastscience.com)
Note: time shall always be stored as UTC, then localized on retrieval.
"""
from scs_core.data.rtc_datetime import RTCDatetime
from scs_host.bus.i2c import I2C
from scs_host.lock.lock import Lock
# -------------------------------... | Python | src/scs_dfe/time/ds1338.py | south-coast-science/scs_dfe_eng | mit | 5,825 | 206 | codeparrot/github-code |
835a78aa081317cf701a912feb7873074588a624a8c244ada63f86b89a140302 | require 'base64'
require 'pbkdf2'
require 'rbnacl'
# A SecretBox that (like RandomNonceBox) automatically generates a suitable
# nonce, but also which uses PBKDF2 to derive a password of the right length.
class PasswordBox < RbNaCl::SecretBox
DEFAULT_PBKDF2_ITERS = 5000
# Create a new PasswordBox
#
# @param p... | Ruby | lib/passwordbox.rb | zenazn/hiera-crypt | mit | 1,930 | 70 | codeparrot/github-code |
81a7a97818539446dc6485e20328b25d5dfcc3c81e8ec4f752dc17e22f07d559 | import numpy as np
from ..utils import check_random_state
class ChainWorld(object):
def __init__(self, left_length, left_reward, right_length, right_reward, on_chain_reward, p_return_to_start, random_state=None):
self.left_length = left_length
self.left_reward = left_reward
self.right_lengt... | Python | bayesrl/environments/chainworld.py | dustinvtran/bayesrl | mit | 1,441 | 44 | codeparrot/github-code |
35eaa19f74940e31c41abc801786f6e27f5cc016c4d96301ae882ab883f45e25 | /**
* Created by M4Sh on 2014-05-21.
*/
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
import java.util.regex.Pattern;
public class RegexTranslator {
Pattern regex;
Scanner inFile;
public RegexTranslator(File textToTranslate){
this.regex.pattern();
... | Java | S1/src/RegexTranslator.java | M4Shz/ProgP | mit | 646 | 32 | codeparrot/github-code |
6d5d0d7750cd36415c512adf018b63562e972cd6f527d842fdc769e88e6b6419 | /**
* @fileoverview Skype Emoticons
* @author Thibault Martin-Lagardette
* @version 1.0
*/
/*
* Copyright (c) 2012 Skype Technologies S.A. All rights reserved.
*/
function elementIsInViewport(elm) {
var r = elm.getBoundingClientRect();
return (
(r.top + r.height) >= 0 && (r.bottom - r.height) <= window.inne... | JavaScript | SkypeImageInline.SkypeChatStyle/Contents/Resources/js/emoticons.js | netpro2k/SkypeImageInline | mit | 1,522 | 62 | codeparrot/github-code |
89d309e174c2218a9c2ebc5119e16f64b7858439bc3dcb7af0729c52576c0604 | 'use strict'
import React from 'react'
import cx from 'classname'
import moment from 'moment'
import ApplicantActions from '../../actions/applicant-actions'
class ApplicantCard extends React.Component {
constructor(props) {
super(props)
this.state = {}
}
render() {
let {
className,
item... | JavaScript | public/scripts/components/applicants/applicant-card.js | asarode/flux-grok | mit | 1,324 | 60 | codeparrot/github-code |
f9f53f9560712308e823e99c56d0b271637ddaecd036d76ded4e50f68f4c20b8 | <?php
namespace Aztech\Coyote\Email;
/**
* Email message class.
* @author thibaud
*
*/
class Message
{
/**
*
* @var string
*/
private $body = '';
/**
*
* @var bool
*/
private $isHtml = false;
/**
*
* @var string
*/
private $subject = '';
... | PHP | src/Email/Message.php | aztech-digital/coyote | mit | 3,667 | 211 | codeparrot/github-code |
d5719ba3af3fd396fcc82b271c7268c28c2ff9a8dd3d04dd4b3bfb06fa4f71b4 | 'use strict'
const AuthRequest = require('./auth-request')
const debug = require('./../debug').accounts
class PasswordResetEmailRequest extends AuthRequest {
/**
* @constructor
* @param options {Object}
* @param options.accountManager {AccountManager}
* @param options.response {ServerResponse} express r... | JavaScript | lib/requests/password-reset-email-request.js | evWork/nds-server | mit | 4,930 | 200 | codeparrot/github-code |
6e3270e4319a5e6d010af46ada698a7facceb6dad584e9972a804d890bde7b13 | class Storage
attr_reader :connection, :credentials, :storage_name, :storage_config
def initialize storage_name
@storage_name = storage_name
@storage_config = STORAGE[@storage_name]
load_credentials!
@connection = Fog::Storage.new(@credentials)
end
def read key
@connection.directories.ge... | Ruby | app/services/storage.rb | contentbird/contentbird | mit | 3,402 | 138 | codeparrot/github-code |
a2027b2aebd0a358f6b91d1a9c18fd755ebd29b36e989494dfed10900d0a03cc | #include "intro.h"
#include "ui_intro.h"
#include "util.h"
#include <QFileDialog>
#include <QSettings>
#include <QMessageBox>
#include <boost/filesystem.hpp>
/* Minimum free space (in bytes) needed for data directory */
static const uint64 GB_BYTES = 1000000000LL;
static const uint64 BLOCK_CHAIN_SIZE = 10LL * GB_BYT... | C++ | src/qt/intro.cpp | icoin/glaricoin | mit | 7,924 | 271 | codeparrot/github-code |
35eaa008ddf283b6a7c29b6e4d74345a68c99f068e9a01c45c455789546e3bf8 | package org.pescuma.buildhealth.analyser.utils.buildstatus;
import static java.util.Arrays.*;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Deque;
import java.util.LinkedList;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
public class BuildStatusMessageF... | Java | buildhealth.analysers/src/org/pescuma/buildhealth/analyser/utils/buildstatus/BuildStatusMessageFormaterHelper.java | pescuma/buildhealth | mit | 1,469 | 57 | codeparrot/github-code |
dd5fb0314fab88c65d6d416f42b48113be6847c99f04d388b244f91aaf4c304d | <?php
namespace Railken\Lem\Attributes;
use Railken\Bag;
use Railken\Lem\Contracts\EntityContract;
use Symfony\Component\Yaml\Exception\ParseException;
use Symfony\Component\Yaml\Yaml;
use Railken\Lem\Tokens;
class YamlAttribute extends TextAttribute
{
/**
* Is a value valid ?
*
* @param EntityCon... | PHP | src/Attributes/YamlAttribute.php | railken/laravel-manager | mit | 1,955 | 78 | codeparrot/github-code |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.