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 |
|---|---|---|---|---|---|---|---|---|
686622416d03152432706d6d879cae8499c7f337f2782469abc6a32c4bdddeed | 'use babel';
// eslint-disable-next-line
import { CompositeDisposable, TextEditor, Directory } from 'atom';
import config from './config';
import Creator from './Creator';
import Insertor from './Insertor';
class DavsPackage {
constructor() {
this.reactReduxUtilsView = null;
this.modalPanel = null;
thi... | JavaScript | lib/davs-package.js | el-dav/davs-package | mit | 1,177 | 51 | codeparrot/github-code |
a72c950f4769ffc37ca499ea3ff78f9d2191df99a92f85530b900b901285aa32 | using System;
using System.IO;
using Yalf.LogEntries;
using Yalf.Reporting.Formatters;
namespace Yalf.Reporting.OutputHandlers
{
public class TextWriterOutputHandler : ILogOutputHandler
{
public readonly TextWriter Writer;
private ILogFormatter _formatter;
private int _lineNumber = 0;
... | C# | Yalf/Reporting/OutputHandlers/TextWriterOutputHandler.cs | sharpmonkey/YALF | mit | 3,755 | 102 | codeparrot/github-code |
4f2546ff54361d34b022a9a6ced5c877e84eeaa1b3aaa3ba755f41d10cdd2333 | import React from 'react';
import PropTypes from 'prop-types';
import Text from '../Text/Text';
import { Styled } from './CalloutGroupItem.styles';
const CalloutGroupItem = ({ text, imgSrc, imgAlt, emoji }) => {
return (
<>
{!imgSrc ? (
!emoji ? (
<Text>{text}</Text>
) : (
<Text>
<Styled.... | JavaScript | src/components/DetailPage/CalloutGroupItem.js | matthewgallo/portfolio | mit | 1,081 | 51 | codeparrot/github-code |
fad43ce831797f0092d12483a01200f29bb832091d6538fba13c142a1a5ae550 | // Render home page and json data
exports.view = function(req, res){
// Import json data
var logData = require("../data/log.json");
// Set ateFoodGroup to numerical values
var ateGrains;
if(req.body.ateGrains == null){ateGrains = 0;}
else ateGrains = 1;
var ateFruit;
if(req.body.ateFruit == null){ateFruit ... | JavaScript | routes/feed_save.js | siddarthrg/fido_tracker | mit | 1,341 | 64 | codeparrot/github-code |
869d5165f1f85bf811153ab8587befa0b6a0a596c39ae714d7e00243e3142038 | using System.Collections.Generic;
using BenchmarkDotNet.Attributes;
using Newtonsoft.Json;
namespace Nett.Tests.Performance.Benchmarks
{
[ShortRunJob()]
[MarkdownExporter]
public class ReadTomlStringBenchmark
{
private string InputToml;
private string InputJson;
[GlobalSetup]
... | C# | Test/Nett.Tests.Performance/Benchmarks/ReadTomlStringBenchmark.cs | paiden/Nett | mit | 2,003 | 78 | codeparrot/github-code |
c5fdc5805172283625cc777cf3275080681dd9eb552d2c4ecf82126c541613e1 | """
Run latency & thruput tests on various server configurations.
"""
import glob
import os.path
import shutil
import time
from openmdao.main.mp_util import read_server_config
from openmdao.main.objserverfactory import connect, start_server
from openmdao.util.fileutil import onerror
MESSAGE_DATA = []
def init_mess... | Python | 01-codes/OpenMDAO-Framework-dev/openmdao.main/src/openmdao/main/test/netperf.py | DailyActie/Surrogate-Model | mit | 3,996 | 132 | codeparrot/github-code |
5ecaca391f160e31d6e84b2bfa407dbfc7adf73d3623a0d4190a17576fd20c44 | using System;
using System.Runtime.InteropServices;
using System.Security;
using System.Text;
namespace Python.Runtime
{
[SuppressUnmanagedCodeSecurity]
internal static class NativeMethods
{
#if MONO_LINUX || MONO_OSX
private static int RTLD_NOW = 0x2;
private static int RTLD_SHARED = 0x20... | C# | src/runtime/runtime.cs | Konstantin-Posudevskiy/pythonnet | mit | 64,925 | 1,618 | codeparrot/github-code |
c250e535199274c4e63775e405cce35cc1c44ecd94a1d7169817cfb856d8323e | package uk.gov.dvsa.domain.service;
import com.jayway.restassured.response.Response;
import uk.gov.dvsa.domain.api.request.CreateEventRequest;
import uk.gov.dvsa.domain.model.User;
import uk.gov.dvsa.domain.model.mot.Event;
import uk.gov.dvsa.framework.config.webdriver.WebDriverConfigurator;
import java.io.IOExcepti... | Java | mot-selenium/src/main/java/uk/gov/dvsa/domain/service/EventService.java | dvsa/mot | mit | 1,031 | 33 | codeparrot/github-code |
8a7f8093e69ec817be8810b78cd44ee5f7f512009ae2002562d2ed0f69665a55 | package schego
import (
"bytes"
"encoding/binary"
"errors"
"fmt"
"math"
"strconv"
"strings"
)
type AstNodeType int
const (
ProgramNode AstNodeType = iota
AddNode
SubNode
MulNode
DivNode
GtNode
LtNode
GteNode
LteNode
EqNode
IfNode
DefNode
LambdaNode
IdentNode
IntNode
FloatNode
StringNode
Bool... | GO | parser.go | DangerOnTheRanger/schego | mit | 13,719 | 574 | codeparrot/github-code |
b17c6b8c7fe123d45adbaacf90135670d90fedcdd5e7d46b23fc2601a453af54 | #pragma once
#include <mutex>
#include <map>
#include <set>
#include <vector>
#include "IThreadObjectManager.h"
#include "IThreadObject.h"
#include "ThreadObjectId.h"
#include "ReadyEvent.h"
#include "IThreadQueueItem.h"
#include "ThreadQueueItem.h"
namespace threadily {
template<typename T_Id = ThreadObjectId>
c... | C | src/ThreadObject.h | k2snowman69/Threadily | mit | 6,647 | 175 | codeparrot/github-code |
2709f5162e5bc278408ddcffccd793400cf42a4add2a565f66c16b09b1272a37 | // anonymous closure - BEGIN
(function(jQuery){
// anonymous closure - BEGIN
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
// include microevent.js //
/////////////////////////////////////////... | JavaScript | contrib/jquery.acewidget/jquery.acewidget.js | jeromeetienne/acewidget | mit | 6,321 | 215 | codeparrot/github-code |
bbe70581177ee28220a6bd424ef07fdb3010e8d636b1d205544b5fa950919a84 | package cpup.mc.oldenMagic.content.runes
import cpup.mc.oldenMagic.api.oldenLanguage.runes.SingletonRune
import cpup.mc.oldenMagic.api.oldenLanguage.runeParsing.NonBlockTypeNoun
import cpup.mc.oldenMagic.api.oldenLanguage.casting.CastingContext
import net.minecraft.client.renderer.texture.IIconRegister
import cpw.mods... | Scala | src/main/scala/cpup/mc/oldenMagic/content/runes/GenericEntityTypeRune.scala | CoderPuppy/oldenmagic-mc | mit | 974 | 30 | codeparrot/github-code |
8046c52e31911f712d30d3becd0930b5f1fe24250ea39ae1d033752b9ef4a002 | use core::fmt::{self, Write};
use crate::event::Event;
use crate::KERNEL_EVENTEMITTER;
pub struct DriverWriter {
pub driver_id: Option<usize>,
}
impl DriverWriter {
pub fn new() -> DriverWriter {
DriverWriter { driver_id: None }
}
pub fn set_driver_id(&mut self, driver_id: usize) {
s... | Rust | src/util/driverwriter.rs | 0x52a1/sapphire | mit | 744 | 34 | codeparrot/github-code |
61726b593bbfc6130d8cfed3e22b40a9b0b9817af959773a9183b405d31f4b5c | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import gdb
import pwndbg.abi
import pwndbg.color.chain as C
import pwndbg.color.memory as M
import pwndbg.color.theme as theme
import pwndbg.enhance
import pwndbg.memory
import pwndbg.symbol
import pwndbg.typeinfo
import pwndbg.vmmap
LIMIT = pwndbg.config.Parameter('dere... | Python | pwndbg/chain.py | anthraxx/pwndbg | mit | 4,539 | 127 | codeparrot/github-code |
6490986894adbd6908b372cd2796b08e2faa5a30c767685a02b3b07ee4259991 | #include <vector>
#include <test/test.hpp>
#include <test/check_sequence.hpp>
#include <falcon/iterator/recursive_iterator.hpp>
#include "recursive_iterator.hpp"
void recursive_iterator_test()
{
{
typedef std::vector<int> subcontainer;
typedef std::vector<std::vector<int>> container;
typedef subcontainer::itera... | C++ | test/iterator/recursive_iterator.cpp | jonathanpoelen/falcon | mit | 2,669 | 111 | codeparrot/github-code |
04cf6ead69e144c637783b3201c8770f6f7c74a11f78e737d455a01c98cc7aa8 | require 'caracal/core/models/base_model'
module Caracal
module Core
module Models
# This class handles block options passed to the page_numbers
# method.
#
class PageNumberModel < BaseModel
#-------------------------------------------------------------
# Configuration
... | Ruby | lib/caracal/core/models/page_number_model.rb | trade-informatics/caracal | mit | 2,564 | 96 | codeparrot/github-code |
18018065b1e53236e098926a7d2b75212c764e4c848e2705cd8599b7aec6ed4a | module Heaven
# Top-level module for providers.
module Provider
# The fabric provider.
class Fabric < DefaultProvider
def initialize(guid, payload)
super
@name = "fabric"
end
def task
deployment_data["task"] || "deploy"
end
def deploy_command_format
... | Ruby | lib/heaven/provider/fabric.rb | getsentry/heaven | mit | 1,188 | 44 | codeparrot/github-code |
39b2a4222d8eb376d7471a39aa38a2ba77d3cea1f2472af68ad7c621578b5e82 | <?php
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;
date_default_timezone_set( 'America/Toronto' );
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
... | PHP | app/AppKernel.php | mz314/dues | mit | 2,192 | 52 | codeparrot/github-code |
badfe9abac4aa5651d647b17f1b723acad61267b737c8be73457b76844bd2b9a | package com.solarmosaic.client.mail
import javax.mail.Message.RecipientType
import javax.mail.internet.MimeMultipart
import com.solarmosaic.client.mail.configuration.SmtpConfiguration
import com.solarmosaic.client.mail.content.ContentType.MultipartTypes
import com.solarmosaic.client.mail.content._
import org.jvnet.mo... | Scala | src/test/scala/com/solarmosaic/client/mail/MailerTests.scala | solarmosaic/mail-client | mit | 8,104 | 250 | codeparrot/github-code |
18a7ce401ddedda4d55978cf206fb95984b37deb8e13f8041af8a1f9fb6dfede |
# encoding: utf-8
__author__ = "Nils Tobias Schmidt"
__email__ = "schmidt89 at informatik.uni-marburg.de"
from androlyze.error.WrapperException import WrapperException
############################################################
#---Helper functions
############################################################
def _... | Python | androlyze/storage/exception/__init__.py | nachtmaar/androlyze | mit | 6,046 | 193 | codeparrot/github-code |
986f5876935c54f0ddd9c9f1b2a5de4d513490262717b5dc100c34107681996a | //
// yas_type_traits.h
//
#pragma once
#include <array>
#include <type_traits>
#include <vector>
namespace yas {
template <typename T>
class has_operator_bool {
private:
template <typename U>
static auto confirm(U v) -> decltype(v.operator bool(), std::true_type());
static auto confirm(...) -> declt... | C | cpp_utils/yas_type_traits.h | objective-audio/cpp_utils | mit | 2,901 | 80 | codeparrot/github-code |
0ddee03e558a023eadb198aa71abd74a151e7e1277dde6b9c1db63467bde96c2 | package net.quantium.harvester.entity;
import java.util.Random;
import net.quantium.harvester.Main;
import net.quantium.harvester.entity.hitbox.Hitbox;
import net.quantium.harvester.item.ItemSlot;
import net.quantium.harvester.item.Items;
import net.quantium.harvester.item.instances.ToolItem;
import net.quan... | Java | HarvesterProject/src/net/quantium/harvester/entity/TreeEntity.java | Quant1um/The-Harvester | mit | 3,519 | 100 | codeparrot/github-code |
99e8e23b2c4dad5b87d9f72df2553099717d9d0067b52f4bff4a7419ed0e5a64 | <?php
namespace Boekkooi\Bundle\JqueryValidationBundle\DependencyInjection\Compiler;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;
/**
* @author Warnar Boekkooi <warnar@boekkoo... | PHP | src/DependencyInjection/Compiler/ExtensionPass.php | boekkooi/JqueryValidationBundle | mit | 2,927 | 88 | codeparrot/github-code |
139430cc062d8abfa7fad4d5fdabc5cc53edd01726a66dbcd12316c3ef60c5b5 | # -*- encoding: utf-8 -*-
require 'tempfile'
require 'open3'
module GoogleSpeech
class Utility
SOX_ERROR_RE = /error:/
class <<self
def audio_file_duration(path)
check_local_file(path)
soxi_duration, err = run_command("soxi -V0 -D '#{path}'", :nice=>false, :echo_return=>false)
... | Ruby | lib/google_speech/utility.rb | PRX/google_speech | mit | 2,956 | 90 | codeparrot/github-code |
d518cbe6d59d56c28beb341a8d579f938b1e55f424f2c84e2888951783d5d2ac | import os, sys
import commands
import optparse
import shutil
INSTALL_DIR = ""
BASE_DIR = os.path.dirname(__file__)
SIP_FILE = "poppler-qt4.sip"
BUILD_DIR = "build"
SBF_FILE = "QtPoppler.sbf"
def _cleanup_path(path):
"""
Cleans the path:
- Removes traling / or \
"""
path = path.rstrip('/')
... | Python | third_party/pypoppler-qt4/configure.py | cbeing/remoteSlideShow | mit | 7,528 | 233 | codeparrot/github-code |
8305ae914339f14074ddbe6677575160917c8b7e41e75c8636570819049bf825 | /*
* File: version.cpp
* -----------------
* This file implements functions for checking the version number of the
* Stanford C++ library, its Java back-end, and the project properties
* file (.pro).
*
* @author Marty Stepp
* @version 2014/11/13
* - ifdef'd out macroIntegerToDate function to remove unused fun... | C++ | lib/StanfordCPPLib/version.cpp | WangHanbin/AirportQuery | mit | 4,227 | 130 | codeparrot/github-code |
2137849964c12b6a3e5360741167a726fafbe3cc814beb7a7278d2a605089ece |
<p class="border-emphasis">
Please stay tuned as we continue announcing speakers! Our speakers and moderators so far include:
</p>
<div class="row speaker-bio">
<div class="col-lg-3">
<img src="./assets/images/speaker-jacinda.jpg" alt="Jacinda Woodward">
</div>
<div class="col-lg-9">
<h3>Jacinda Wood... | HTML | _includes/section-speakers.html | womengineersday/womengineersday.github.io | mit | 62,242 | 839 | codeparrot/github-code |
cf6d4479aa1cee0ed6ba7a815f9c9051a5be306d73b2c06383b7c24120229665 | #include "mep.hpp"
//------------------------------------------------------------------------
static bool idaapi can_have_type(const op_t &x) // returns 1 - operand can have
{
switch ( x.type )
{
case o_void:
case o_reg:
case o_near:
return 0;
// case o_phrase: can have type because of AS... | C++ | idp.cpp | yifanlu/toshiba-mep-idp | mit | 5,539 | 205 | codeparrot/github-code |
79e4822b0f829c0f7a0a5123c00b3e649b528b5863041e7ab09d6bc93a3bd0ae | import java.io.*;
import java.util.*;
class DFA {
String startState;
String finalState[] = new String[5];
int numberOfFinalStates = 0;
String inputSymbols[] = new String[6];
int numberOfInputs = 0;
String grammer[][] = new String[15][7];
String finalgrammer[][] = new String[15][7];
int numberInFinalGrammer = 0;
int n... | Java | College Programs/CS252 - Theoretical Programming Parsing-Compilers/CS252p2/DFA.java | HintonBR/scratch | mit | 26,537 | 618 | codeparrot/github-code |
f53ece047764a3be9684d3bf3f7a0c390176fca6158ded8a71cfc3c5a71e27d0 | (function() {
var AS = this, Fn = AS.Fn;
// assign
$.extend(Fn, {
execConvPrint: execConvPrint
});
return;
function execConvPrint() {
var b_FPR = AS.Bo.FPR;
var fn = null;
try {
if(b_FPR.Value('convfn') == "function(i, f, a){\n}")
throw Error('Function is not modified');
... | JavaScript | js/Fn_execConvPrint.js | EastCloud/synqueryERP | mit | 1,301 | 56 | codeparrot/github-code |
0e5dadae5bceabdb4cf87ee4a823788c5405d20c9df3fdf62101e4f7b4a9d765 | #-*- coding: utf8 -*-
'''
Examples of advanced Python features:
- metaclass
- descriptor
- generator/forloop
'''
from __future__ import print_function
import sys
if sys.version_info > (3, ): # Python 3
exec('''
def exec_in(code, glob, loc=None):
if isinstance(code, str):
code = compile(code, '<... | Python | python/advanced.py | dlutxx/memo | mit | 1,657 | 73 | codeparrot/github-code |
2671b80938c15409cdb770f69c777366ab42b03d166719ea29fce9abe76ce5c5 | <?php
namespace Doctrine\CouchDB;
use Doctrine\CouchDB\HTTP\Client;
use Doctrine\CouchDB\HTTP\HTTPException;
/**
* An attachment is a special embedded document that exists inside CouchDB.
* It is created inside the "Attachments" object for each attachment that is found.
*
* TODO: This is a very inefficient first... | PHP | lib/Doctrine/CouchDB/Attachment.php | relaxedws/couchdb-client | mit | 6,527 | 261 | codeparrot/github-code |
55686a978496fac8673b4e9cbb7ea485f0f0dd123f1815e9a3a132c6493f0ec4 | """
Prefill an Array
(6 kyu)
https://www.codewars.com/kata/54129112fb7c188740000162/train/python
Create the function prefill that returns an array of n elements that all have
the same value v. See if you can do this without using a loop.
You have to validate input:
- v can be anything (primitive or otherwise)
- if... | Python | katas/prefill_an_array/prefill_an_array.py | benpetty/Code-Katas | mit | 1,086 | 43 | codeparrot/github-code |
8ced52e723b86b08ea45fd65cc18776e190d628470caa6dc9a02a08d4998d1be | <?php
class RF_Form_Element_CountrySelector extends Zend_Form_Element_Select
{
public function init()
{
$this->addMultiOption('CH', 'Switzerland');
$this->addMultiOption('DE', 'Germany');
$this->addMultiOption('FR', 'France');
$this->addMultiOption('AT', 'Austria');
$this->addMultiOption('IT', 'Italy');
$... | PHP | Form/Element/CountrySelector.php | RACERFISH/ZendRF | mit | 10,871 | 247 | codeparrot/github-code |
d3faf0c204fedb9655eedef7d0f7515c444075edb74711d4518ef3a2b855a1d5 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Development Scripts — DFHack 0.42.06- documen... | HTML | dfhack/hack/docs/docs/_auto/devel.html | ev1l0rd/yalnpv | mit | 22,848 | 367 | codeparrot/github-code |
9f504d6e11ed0eb0fd13159180a573cac630973fc3c0f60fdb121c28cb189ef7 | {% load staticfiles %}
{% load i18n %}
<nav class="navbar navbar-translucent" role="navigation">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-col... | HTML | pyconkr/templates/nav.html | pythonkr/pyconapac-2016 | mit | 4,644 | 111 | codeparrot/github-code |
a64a327bd8ebde8f87da961c0fcf8d51a0a8b4fcecda4e64540c6261ee3ce594 | const path = require("path");
const Nightmare = require("nightmare");
const { EncryptionAlgorithm, createAdapter } = require("../../dist/index.node.js");
const TEXT = "Hi there!\nThis is some test text.\n\të ";
const sandboxURL = `file://${path.resolve(__dirname, "./sandbox.html")}`;
const nightmare = Nightmare({
... | JavaScript | test/cross-env/web-node-compare.spec.js | perry-mitchell/iocane | mit | 7,912 | 176 | codeparrot/github-code |
5b0eccff3a1c7b71563ea59b5a34344e585ea986b270bef0456e80c0448afacb | package org.nextrtc.signalingserver.domain;
import static org.apache.commons.lang3.StringUtils.EMPTY;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import stat... | Java | src/test/java/org/nextrtc/signalingserver/domain/ServerTest.java | fimkrypto/nextrtc-signaling-server | mit | 11,563 | 395 | codeparrot/github-code |
fd7c31dcb5d0eb801890c2af7dd402feb897f4d5853637d48fe3a50bc1936054 | #include <AreaData.hpp>
START_ATF_NAMESPACE
AreaData::AreaData(struct AreaData* __that)
{
using org_ptr = void (WINAPIV*)(struct AreaData*, struct AreaData*);
(org_ptr(0x14018bdb0L))(this, __that);
};
void AreaData::ctor_AreaData(struct AreaData* __that)
{
using org_ptr = v... | C++ | YorozuyaGSLib/source/AreaData.cpp | goodwinxp/Yorozuya | mit | 1,009 | 36 | codeparrot/github-code |
fe83e3a58fa0f8eb0b68c8b45bb0892a889b99c3a28474142a153512dabc51d2 | import {WebSocketConnectionState} from 'interface';
export enum EventTypeKey {
APP_STATE_UPDATED = 'APP_STATE_UPDATED',
LOGIN = 'LOGIN',
UNKNOWN_ERROR = 'UNKNOWN_ERROR',
WEB_SOCKET_CONNECTION_STATE_CHANGED = 'WEB_SOCKET_CONNECTION_STATE_CHANGED',
SOMEONE_SAID_HELLO = 'SOMEONE_SAID_HELLO'
};
export interface... | TypeScript | src/flux/event/event-type.ts | calderhayes/react-boilerplate | mit | 1,980 | 88 | codeparrot/github-code |
0031726af825e2a0eb244ff19216505bdc74b967c6067b1d8c56ba331a9a46c2 | {% extends "account/base.html" %}
{% load i18n %}
{% load bootstrap3 %}
{% block title %}
{% trans "Dirección de correo electrónico" %}
{% endblock title %}
{% block content %}
<div class="container">
<div class="row">
<div class="col-sm-5">
<h3>{% trans "Correo electrónico... | HTML | templates/account/email.html | SoPR/horas | mit | 4,183 | 84 | codeparrot/github-code |
a0a9c0ed51105c67fa1a131dcc4ebeb0c0972c37f7f595b9f7cd5cfda9f3b5e6 | package com.laytonsmith.abstraction.bukkit.entities;
import com.laytonsmith.abstraction.AbstractionObject;
import com.laytonsmith.abstraction.bukkit.BukkitMCLivingEntity;
import com.laytonsmith.abstraction.entities.MCSlime;
import org.bukkit.entity.Slime;
/**
*
* @author Hekta
*/
public class BukkitMCSlime extends... | Java | src/main/java/com/laytonsmith/abstraction/bukkit/entities/BukkitMCSlime.java | KamranMackey/CommandHelper | mit | 669 | 31 | codeparrot/github-code |
c5672fa5726c43e9d17343d592979c543cd1c5b34586e60dc5d7fbbf30c2b5d3 | <?php
namespace OndraKoupil\Nette;
use \Nette\Utils\Callback;
use \Nette\Neon\Neon;
use \OndraKoupil\Nette\Logger;
use \OndraKoupil\Tools\Files;
/**
* Správce činností a procesů, které se musí spouštět pravidelně v nějakých intervalech nebo v dopředu naplánovaných časech.
* <br />
* V Cronu nebo nějakým jiným způ... | PHP | src/TaskScheduler.php | ondrakoupil/nette-stuff | mit | 9,851 | 359 | codeparrot/github-code |
a1c0f084bfb28f349c8d7004ae8f8085e47bb55af8fea5b03e81cd9da0676f7e | #ifndef __VR_CAMERA_H
#define __VR_CAMERA_H
#include <memory>
#include <glm/glm.hpp>
namespace vr
{
class SceneObject;
enum class CameraTrackingMode
{
none,
point,
object
};
class Camera
{
public:
inline auto getPosition() const noexcept { return position; }
inline void setPositio... | C | src/vr/core/camera.h | virtualrut/trucksim | mit | 2,127 | 69 | codeparrot/github-code |
bc15019609a0b52880edc5956e59f394720fa64aeb81a7f3f86b19b75ec36f2c | namespace NEventStore
{
using Microsoft.Extensions.Logging;
using NEventStore.Logging;
using NEventStore.Serialization;
public class SerializationWireup : Wireup
{
private static readonly ILogger Logger = LogFactory.BuildLogger(typeof (SerializationWireup));
public SerializationWir... | C# | src/NEventStore/SerializationWireup.cs | NEventStore/NEventStore | mit | 1,253 | 37 | codeparrot/github-code |
e54e7716d157865e2bd12ccad03b04350cdeca171a2d097a1f221919e2d4e0af | package io.rong.callkit;
import android.Manifest;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.support.v4.app.Fragment;
import android.widget.... | Java | CallKit/src/main/java/io/rong/callkit/VideoPlugin.java | chen-android/guoliao | mit | 6,188 | 134 | codeparrot/github-code |
193b615936b45e3f40838b5f904c4e224b6ae87210cf032632dfdb5faa4f7086 | import React, { Component } from 'react';
import classnames from 'classnames';
import withStyles from 'isomorphic-style-loader/lib/withStyles';
import LinearProgress from 'material-ui/LinearProgress';
import history from '../../core/history';
import Link from '../../components/Link/Link';
import Image from '../../compo... | JavaScript | src/components/SystemsList/SystemsList.js | fechy/retropie-web-gui | mit | 3,572 | 125 | codeparrot/github-code |
5e6c68ac12f91eb478a41cb8603895c1d10dc1f9256dea6fa7ae3d58d95f8804 | <?php //-->
/*
* This file is part of the Eden package.
* (c) 2011-2012 Openovate Labs
*
* Copyright and license information can be found at LICENSE.txt
* distributed with this package.
*/
require_once dirname(__FILE__).'/class.php';
/**
* Allows the ability to listen to events made known by anoth... | PHP | packages/eden/library/eden/event.php | Jamongkad/s36-beta | mit | 6,202 | 241 | codeparrot/github-code |
7bbbbe8345f9d4588ea41576e4839281a6bef60bd93ee9ca0a57d784814f9524 | package com.xml2j.discogs.releases.handlers;
/******************************************************************************
-----------------------------------------------------------------------------
XML2J XSD to Java code generator
----------------------------------------------------------------------------... | Java | samples/discogs/releases/src/main/java/com/xml2j/discogs/releases/handlers/ReleasesMessageHandler.java | lolkedijkstra/xml2j-gen | mit | 1,617 | 62 | codeparrot/github-code |
bbb71bd4ffecd07011b78135c4e5ba953e6aec7c85b3163e78e540809c74ebdf | <?php
namespace Cerad\Bundle\AccountBundle\EventListener;
use Symfony\Component\EventDispatcher\Event;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use FOS\UserBundle\FOSUserEvents;
use FOS\UserBundle\Event\FormEvent;
use FOS\UserBundle\Event\UserEvent;
use FOS\UserBundle\Event\FilterUserResponse... | PHP | src/Cerad/Bundle/AccountBundle/EventListener/RegistrationListener.php | cerad/app_account | mit | 1,354 | 43 | codeparrot/github-code |
d5adb47aa76e08151a5571ecb7dba15497a06847a0c75bc31816f0f0b86081db | #include "freetypelib.h"
#include <cassert>
FreeTypeLib::FreeTypeLib() {
FT_Init_FreeType(&lib);
}
FreeTypeLib::~FreeTypeLib() {
FT_Done_FreeType(lib);
}
FT_Face* FreeTypeLib::loadFace(const string& fontName, int ptSize, int deviceHDPI, int deviceVDPI) {
FT_Face* face = new FT_Face;
FT_Error error =... | C++ | src/freetypelib.cpp | tangrams/harfbuzz-example | mit | 1,659 | 68 | codeparrot/github-code |
a2f5cbaae3806558cd048038c56e8e22188ce620fcd17023222f668dffad8a03 | var Accumulator, errorTypes, isConstructor, isType, isValidator, throwFailedValidator, throwFailure, throwInvalidType;
throwFailure = require("failure").throwFailure;
Accumulator = require("accumulator");
isConstructor = require("./isConstructor");
isValidator = require("./isValidator");
errorTypes = require("../e... | JavaScript | js/src/core/assertType.js | aleclarson/type-utils | mit | 1,659 | 68 | codeparrot/github-code |
99ed2e8eb77f916d84425ee4c486219924bfdf68e0aabdc758debb6d6baf23f6 | /**
* REXUS PIOneERS - Pi_1
* camera.cpp
* Purpose: Implementation of functions in the PiCamera class
*
* @author David Amison
* @version 2.0 10/10/2017
*/
#include <signal.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include "camera.h"
#include <cstring>
#include <sys/wait.h>
#include <string... | C++ | src/camera/camera.cpp | REXUS-PIOneERS/CPP_PIOneERS | mit | 2,006 | 86 | codeparrot/github-code |
6919f8a2f6c0fa19f825e79cdd76c390c726e5b876d1a591ff4d5ded63f8bbbf | /**
* Copyright (c) 2016-2017 in alphabetical order:
* Bosch Software Innovations GmbH, Robert Bosch GmbH, Siemens AG
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-Lic... | Java | more-java-examples/src/main/java/org/eclipse/bigiot/lib/examples/types/MyParkingResultPojo.java | BIG-IoT/example-projects | mit | 916 | 32 | codeparrot/github-code |
31290a66313df5d0f6ba8c5b889676982fcb175044bcd870715f1ac8bb1679b5 | using Reusable.Collections.Generators;
using Reusable.Deception;
using Reusable.Deception.Abstractions;
using Reusable.Deception.Triggers;
using Reusable.Exceptionize;
using Xunit;
namespace Reusable.Tests.XUnit.Deception
{
public class PhantomExceptionTest
{
private static readonly IPhantomException P... | C# | Reusable.Tests.XUnit/src/Deception/PhantomExceptionTest.cs | he-dev/Reusable | mit | 2,100 | 81 | codeparrot/github-code |
a14074461d1078bc90fdf48cdbaf4df00e0093a7de314c9721d92f390737b580 | <?php
/**
*/
namespace Commercetools\Symfony\CartBundle\Model\Repository;
use Commercetools\Core\Builder\Request\RequestBuilder;
use Commercetools\Core\Model\Cart\MyCartDraft;
use Commercetools\Core\Model\Cart\MyLineItemDraftCollection;
use Commercetools\Core\Model\Zone\Location;
use Commercetools\Symfony\CtpBundle\... | PHP | src/CartBundle/Model/Repository/MeCartRepository.php | sphereio/commercetools-php-symfony | mit | 2,416 | 83 | codeparrot/github-code |
cc36c47d713e87bbb77412c786233067ec3becd0f325d34d8cc83bfff2a3deb8 | package homecad.model.facade;
import homecad.model.*;
import homecad.model.exception.*;
//-----------------------------------------------
//Programming 2 -- OUA Term 4, 2010
//-----------------------------------------------
//Interface to the system functionality (model)
//-----------------------------------... | Java | homecad/src/homecad/model/facade/HomeCADmodel.java | tah187/homecad | mit | 1,742 | 58 | codeparrot/github-code |
354699c03a419a18a57dde9560ef010a9257a48315e8fda9a571f69247c65e8a | #include "vi/la/opencl/disk_source_loader.h"
#include <sys/stat.h>
#include <fstream>
#include <stdexcept>
namespace vi {
namespace la {
namespace opencl {
disk_source_loader::disk_source_loader(const std::string& source_root) : _source_root(source_root) {
if (!is_directory(_source_root)) {
throw std::invalid_a... | C++ | src/vi/la/opencl/disk_source_loader.cpp | ville-k/vinn | mit | 1,409 | 56 | codeparrot/github-code |
2b2ac256e4be1ef0c3330d6ddf0e0219c9520c94cfe046b7dacce684de5b4dc4 | const _parseHash = function (hash) {
let name = '';
let urlType = '';
let hashParts = hash.split('_');
if (hashParts && hashParts.length === 2) {
name = hashParts[1];
let type = hashParts[0];
// take off the "#"
let finalType = type.slice(1, type.length);
switch (finalType) {
case 'met... | JavaScript | app/utils/hash-to-url.js | ember-learn/ember-api-docs | mit | 1,240 | 54 | codeparrot/github-code |
930ffee3aadbf7d43d02aa808ba8f332d482a86767dba53d3fd3d4eaa6f2aad6 | #!/usr/bin/python2
# core.py
# aoneill - 04/10/17
import sys
import random
import time
import pauschpharos as PF
import lumiversepython as L
SEQ_LIM = 200
def memoize(ignore = None):
if(ignore is None):
ignore = set()
def inner(func):
cache = dict()
def wrapper(*args):
m... | Python | game/core.py | alexoneill/15-love | mit | 1,573 | 78 | codeparrot/github-code |
850292e9b6d8f40b59801ca721f457bdcef4953e4dd4a807e5239fee42d5feb4 | #ifndef CDA_TRIES_ARRAY_HPP
#define CDA_TRIES_ARRAY_HPP
#include "Basic.hpp"
namespace cda_tries {
template <class T>
class Array {
public:
Array() {}
~Array() {}
void reset(size_t size) {
size_ = size;
array_.reset(new T[size_]);
}
void reset(size_t size, const T &initial) {
reset(size);
... | C++ | lib/Array.hpp | kamp78/cda-tries | mit | 1,507 | 79 | codeparrot/github-code |
be4fe525a72208544b2adb81d1253a106d08115bfc77915cc5ac377bce70d730 | /****************************************************************************
Copyright (c) 2010-2011 cocos2d-x.org
Copyright (c) 2007 Scott Lembcke
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Soft... | C | libs/cocos2dx/support/data_support/ccCArray.h | DmitriyKirakosyan/testNinjaX | mit | 11,872 | 442 | codeparrot/github-code |
ee7fa63b904755a9c7203cb720c82e0be65d5cfa326e778c20e70c012680e9de | #!/usr/bin/env python3
# Copyright (c) 2014-2017 The Doriancoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the wallet keypool and interaction with wallet encryption/locking."""
from test_framework.test... | Python | test/functional/wallet_keypool.py | doriancoins/doriancoin | mit | 3,428 | 85 | codeparrot/github-code |
54ed80d28129ee0f34ddf55b6b56163dde70981bef7d6c9ac87289a476dab1a0 | /**
* picker.directive
*/
import {
Directive, ElementRef, Input, Compiler, ViewContainerRef, ComponentFactory,
ReflectiveInjector, Output, EventEmitter, OnInit, OnChanges, SimpleChanges
} from '@angular/core';
import { DynamicModule } from './dynamic.module';
import { DialogComponent } from './dialog.compone... | TypeScript | src/lib/picker.directive.ts | marty912/date-time-picker | mit | 3,311 | 84 | codeparrot/github-code |
4783975b4e311f2c8b23d483ecb3b9ce4bce1a44e26748134dd8109b701ee691 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>functions-in-zfc: Not compatible</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.m... | HTML | clean/Linux-x86_64-4.05.0-2.0.6/released/8.8.0/functions-in-zfc/8.9.0.html | coq-bench/coq-bench.github.io | mit | 7,347 | 179 | codeparrot/github-code |
60650966f95f0a5b8c7453d741a443725c3fe41f87a8e0f7f0cdd017764e6563 | package com.github.sherter.googlejavaformatgradleplugin.format;
import com.google.common.collect.ImmutableList;
/** Static factory method for creating new {@link Formatter}s. */
public class Gjf {
public static final String GROUP_ID = "com.google.googlejavaformat";
public static final String ARTIFACT_ID = "googl... | Java | subprojects/format/src/main/groovy/com/github/sherter/googlejavaformatgradleplugin/format/Gjf.java | sherter/google-java-format-gradle-plugin | mit | 1,699 | 49 | codeparrot/github-code |
922851791436f0d80896aa12316fa15a902d85e7b03fdb544ae20bdde447f0a1 | #! /usr/bin/env python
"""Unit tests for SCardConnect/SCardStatus/SCardDisconnect
This test case can be executed individually, or with all other test cases
thru testsuite_scard.py.
__author__ = "http://www.gemalto.com"
Copyright 2001-2012 gemalto
Author: Jean-Daniel Aussel, mailto:jean-daniel.aussel@gemalto.com
Thi... | Python | lib/pyscard-1.6.16/smartcard/test/scard/testcase_getatr.py | mixja/eap-sim-lab | mit | 3,083 | 99 | codeparrot/github-code |
e176352aaca6522e281258b3b9e2ecacd28f1a02a8894287b0361467b8b23786 | import { createEntityAdapter, EntityAdapter, EntityState } from '@ngrx/entity';
import { Book } from '../models/book';
import {
BooksApiActionsUnion,
BooksApiActionTypes,
} from '../actions/books-api.actions';
import { BookActionsUnion, BookActionTypes } from '../actions/book.actions';
import {
ViewBookPageAction... | TypeScript | src/app/books/reducers/books.reducer.ts | sonicdelay/mtcms | mit | 3,331 | 105 | codeparrot/github-code |
70c4ce519ed561731346f0f542b4ea795b833bb7444497876d7fd399148b985b | #!/usr/bin/env python
from argparse import ArgumentParser
from collections import defaultdict
import sys
import os
from sonLib.bioio import cigarRead, cigarWrite, getTempFile, system
def getSequenceRanges(fa):
"""Get dict of (untrimmed header) -> [(start, non-inclusive end)] mappings
from a trimmed fasta."""
... | Python | src/cactus/blast/upconvertCoordinates.py | benedictpaten/cactus | mit | 4,797 | 111 | codeparrot/github-code |
8f246c403785c755cd79b9d016df259905c0d4aea51a8a201e363c5012ecf653 | <?php
App::uses('AppModel', 'Model');
/**
* ResourceEntity Model
*
* @property ResourceGroupType $ResourceGroupType
* @property Resource $Resource
* @property ViewResourceGroup $ViewResourceGroup
*/
class ResourceEntity extends ResourceAppModel {
/**
* Display field
*
* @var string
*/
var $name = 'Re... | PHP | Model/ResourceEntity.php | MasPapaya/Resources | mit | 2,245 | 98 | codeparrot/github-code |
495b9353a597100a0cb8a1e460154ccb31ce003c26276739f1a261c7581d6d45 | // Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <boost/assign/list_of.hpp>
#include "wallet.h"
#include "walletdb.h"
#include... | C++ | src/rpcwallet.cpp | elkingtowa/alphacoin | mit | 54,850 | 1,610 | codeparrot/github-code |
a17aed9e82efa6d5a9237b3209bc371d572196e0694789ea610336b61bc3ad2f | import pickle
from pueue.client.socket import connect_socket, receive_data, process_response
def command_factory(command):
"""A factory which returns functions for direct daemon communication.
This factory will create a function which sends a payload to the daemon
and returns the unpickled object which ... | Python | pueue/client/factories.py | Nukesor/Pueuew | mit | 2,761 | 74 | codeparrot/github-code |
6269b089308fbd3b3a9d993b7bf7968c90c3cb36aa330a102b3dcc518da7c564 | #[macro_use] extern crate nickel;
extern crate tera;
extern crate postgres;
use postgres::{Connection, SslMode};
use nickel::{Nickel, HttpRouter, StaticFilesHandler, FormBody};
use tera::{Tera, Context};
use std::collections::HashMap;
//use std::str;
fn main() {
//Initialize nickel instance
let mut server: N... | Rust | src/main.rs | ninetytwo/ninetytwo.ml | mit | 5,663 | 172 | codeparrot/github-code |
02b636e03c58bd4fc2636be639121a51a3d267e87f313064fc898ef3c7204c0b | var chai = require('chai');
chai.use(require('chai-fs'));
var expect = chai.expect
var execute = require('../');
describe('execute', function() {
it('should exist', function() {
expect(execute).to.exist;
});
it('should return a promise', function() {
expect(execute().then).to.exist;
});
it('should... | JavaScript | test/execute.spec.js | lambduh/lambduh-execute | mit | 3,830 | 130 | codeparrot/github-code |
66f11ad6cd93edf5f13f00e0abd1dec21ac53737dc27514b4c4213a2a4798b94 | package com.karasiq.bootstrap.dropdown
import com.karasiq.bootstrap.context.RenderingContext
import com.karasiq.bootstrap.utils.Utils
trait UniversalDropdowns { self: RenderingContext with Dropdowns with Utils ⇒
import scalaTags.all._
import BootstrapAttrs._
type Dropdown = AbstractDropdown
object Dropdown ... | Scala | library/shared/src/main/scala/com/karasiq/bootstrap/dropdown/UniversalDropdowns.scala | Karasiq/scalajs-bootstrap | mit | 1,330 | 46 | codeparrot/github-code |
ed3ccbf360edde2dfb07393cc442bd1cbff096e6f31dfe5002efa1c2f9f3f5c0 | /*===========================================================================
* Licensed Materials - Property of IBM
* "Restricted Materials of IBM"
*
* IBM SDK, Java(tm) Technology Edition, v8
* (C) Copyright IBM Corp. 1997, 2013. All Rights Reserved
*
* US Government Users Restricted Rights - Use, duplication... | Java | ibm.jdk8/src/java/util/jar/Manifest.java | flyzsd/java-code-snippets | mit | 14,997 | 470 | codeparrot/github-code |
c42306d17b7fa989efe487c574128ccb03259566607c91ff5e3e1a9bd8e6a5bf | #include <fstream>
#include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include "model.h"
using namespace std;
int tfinal = 100000; //duration of simulation
int main()
{
ofstream myfile;
for( double mu = 0.23; mu< 0.26 ; mu += 0.05)
{
std::ostringstream strs;
s... | C++ | v4/main.cpp | pm2111/Heart-Defibrillation-Project | mit | 1,786 | 57 | codeparrot/github-code |
c47faf863496f010a62f85db58b4fcb71ac9a3ff938b20baa3e87ffc738601f2 | module MythTV
# Map the protocol versions to the number of properties of
# recording objects
PROTOCOL_MAPPING = [
{ :protocol_version => 31, :recording_elements => 35 },
{ :protocol_version => 40, :recording_elements => 46 },
{ :protocol_version => 50, :recording_elements => 47 },
{ :protocol_v... | Ruby | lib/mythtv/protocol.rb | nickludlam/ruby-mythtv | mit | 3,391 | 62 | codeparrot/github-code |
d3da248f99e9d6a4520a8eacbf620a80de30c53ad81179054f7ab79da1ffaa56 | import util from './util'
import LatLngBounds from './latlngbounds'
const {abs, max, min, PI, sin, cos, acos} = Math
const rad = PI / 180
// distance between two geographical points using spherical law of cosines approximation
function distance (latlng1, latlng2) {
const lat1 = latlng1.lat * rad
const lat2 = latl... | JavaScript | src/latlng.js | ujazdowskip/nano_map | mit | 3,318 | 117 | codeparrot/github-code |
462b2efc147dadfa8b5da9fdfc782c4fde66463123490127c708a8d13626375d | // ****************************************************************************
// <copyright file="DSImageFormatter.cs" company="DSoft Developments">
// Created By David Humphreys
// Copyright © David Humphreys 2015
// </copyright>
// ****************************************************************************
... | C# | src/DSoft.Datatypes/Formatters/DSImageFormatter.cs | newky2k/dscomponents | mit | 1,483 | 75 | codeparrot/github-code |
4d94ebd4d9112436ab6bc96ad9d0e61b5fa50de19836797f8410eb888f8350d9 | #pragma once
#include "Enum.h"
#include "Value.h"
#include "Macro.h"
#include "Struct.h"
#include "../../../../server/2017 server/serverBoostModel/serverBoostModel/protocol.h"
//Àü¿ªº¯¼ö
extern HWND g_hWnd;
extern HINSTANCE g_hInst;
extern DWORD g_dwLightIndex;
extern D3DXVECTOR3 g_vLightDir;
extern bool g_bLog... | C | client/Norumac2/Client/Headers/Include.h | korleinster/gamebusdriver | mit | 671 | 38 | codeparrot/github-code |
300d14d9d45997e356f6f85e505afd2c4900d00d1263eb9ecb5630b8cccf6028 | #!/usr/bin/env python
"""
Title : Java program file
Author : JG
Date : dec 2016
Objet : script to create Propertie File Program
in : get infos from yml
out : print infos in properties file
"""
import sys,os
import yaml
import util as u
from random import randint
# =====================================... | Python | packages/java_properties.py | JeGoi/IPa2 | mit | 6,870 | 188 | codeparrot/github-code |
deca5de7d9086f89d2c44126aa0cf99dc58e7c5be4db7279d0cf2fe5fb04624b | using System;
#pragma warning disable 1591
// ReSharper disable UnusedMember.Global
// ReSharper disable UnusedParameter.Local
// ReSharper disable MemberCanBePrivate.Global
// ReSharper disable UnusedAutoPropertyAccessor.Global
// ReSharper disable IntroduceOptionalParameters.Global
// ReSharper disable MemberCanBeP... | C# | StackLang.Ide/Properties/Annotations.cs | TED-996/StackLang | mit | 23,770 | 614 | codeparrot/github-code |
49e66bd4d3c6ba5cd0b2069c15240f7ea3b3d087e9070ec329369edc13fa875c | import React from 'react'
const EditableText = React.createClass({
propTypes: {
onSubmit: React.PropTypes.func.isRequired,
validator: React.PropTypes.func,
enableEditing: React.PropTypes.bool,
value: React.PropTypes.oneOfType([
React.PropTypes.string,
React.PropTypes.number,
])
},
... | JavaScript | src/index.js | bpugh/react-editable | mit | 1,822 | 77 | codeparrot/github-code |
82a53f4777f6a984aecba43836ea1f6af84e58efad08190bda727620f289edbf | //
// FlyingCubes.c
// GLESCompute
//
// Created by Michael Kwasnicki on 06.12.13.
//
//
#include "playgrounds/playground.h"
#include "Math3D.h"
#include "OpenGLES2Core.h"
#include <assert.h>
#include <math.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#define DEBUG 1
#define free_s( X ) free(... | C | playgrounds/FlyingCubes/FlyingCubes.c | kwasmich/GLES2Playground | mit | 5,984 | 191 | codeparrot/github-code |
bc0cb90aec4532d46326140cc3ac1f003793fcc2ff0c08b090abbbf3af92895b | /*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
package com.facebook.redex.test.instr;
import java.lang.Runnable;
import com.facebook.redex.annotations.UsesNames;
import com.f... | Java | test/instr/UsesNamesTest.java | facebook/redex | mit | 1,626 | 93 | codeparrot/github-code |
31c73ad75f2dbe606b514eef5f21a6df38b2d2bfbc21f95779b71e8dfe152807 | <?php
/*
* こんながめんにしたい
*
* [アンケート権限設定]
*
* [アンケート名] 権限 権限 [編集]
* [アンケート選択|▼] 権限 権限 [登録]
* [新規追加]
*
* [その他権限設定](カテゴリ別など)
* 権限 権限 権限
*
*/
//define('DEBUG', 1);
define('DIR_ROOT', "../");
require_once (DIR_ROOT . 'crm_define.php');
require_once (DIR_LIB . 'CbaseFDB.php');
require_once (DIR_LIB . 'Cbase... | PHP | admin/360_musr_authedit.php | sendaa/current4 | mit | 5,980 | 208 | codeparrot/github-code |
2e3a754346c96627bcb340d3b3f13d33b324a58fc3284350c1ccbbac5fe81a10 | package com.arjanvlek.cyngnotainfo.Support;
import android.app.Activity;
import android.app.DownloadManager;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Environment;
import android.os.Handler;
import com.arjanvlek.cyngnotainfo.... | Java | app/src/main/java/com/arjanvlek/cyngnotainfo/Support/UpdateDownloader.java | arjanvlek/cyanogen-update-tracker-app | mit | 13,204 | 326 | codeparrot/github-code |
9335fe8ded7548fa64f67831741535e526ca19c009adb42e030b6b3b32ec23a2 | <?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license an... | PHP | ZendFramework-1.0/Zend/Translate/Adapter/Csv.php | zonywhoop/presenter | mit | 3,938 | 113 | codeparrot/github-code |
2dc103d92cb2940b5fe4f373c2ac7da5a3829d208bf6b80796133c106b3cc610 | <?php
namespace g11c\GameBundle\Mastermind;
use g11c\GameBundle\Mastermind\GenerateRandomCodeInterface;
class Mastermind
{
protected $randomizer;
protected $code;
protected $codeLength;
protected $resultsBlack = array();
protected $resultsWhite = array();
/**
* Set given radomize... | PHP | Mastermind/Mastermind.php | g11c/GameBundle | mit | 5,605 | 216 | codeparrot/github-code |
a00c994fa5dac7c7df432a96eeeefc273cbc6987e384451ef7156e4d8adc7758 | <?php
namespace Portfolio\LaureBundle\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Portfolio\LaureBundle\Entity\AboutFeeling;
use Portfolio\LaureBundle\Form\AboutFeelingType;
/**
* AboutFeeling controller.
*
*/
class AboutFeelingControlle... | PHP | src/Portfolio/LaureBundle/Controller/AboutFeelingController.php | lowki93/portfolia-laure | mit | 5,740 | 203 | codeparrot/github-code |
647ce0538282093e791d6e2463136ab71e7f81034dd54767c10a54f5f9addae3 | package com.bafomdad.realfilingcabinet.items;
import java.util.List;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import... | Java | com/bafomdad/realfilingcabinet/items/ItemManaFolder.java | bafomdad/realfilingcabinet | mit | 3,184 | 135 | codeparrot/github-code |
0c566e59effd30a6a2c256cc6aa238546b5343b7b005c11e4435cdd83c0c690f | (function () {
"use strict";
//angular.module('app', ['angularUtils.directives.dirPagination']);
var env = {};
if (window) {
Object.assign(env, window.__env);
}
var app = angular.module("deviceManagement",
['angularUtils.directives.dirPagination',
'comm... | JavaScript | SimBit/solution/app/app.js | tazmanrising/IntiotgAngular | mit | 4,538 | 106 | codeparrot/github-code |
ec7bd18acaff87ce9cc93b151c60cd357150bd550e7b71f669a21985467dcd5a | /**
@file
@author Nicholas Gillian <ngillian@media.mit.edu>
@version 1.0
@brief This file contains the Random class, a useful wrapper for generating cross platform random functions.
This includes functions for uniform distributions (both integer and double) and Gaussian distributions.
*/
/*
GRT MIT... | C | libs/Util/Random.h | cmuartfab/ofxLeapGestures | mit | 13,665 | 312 | codeparrot/github-code |
2d633d87b6b89ba5375cee02b20a54d719a2dde467e80ecb981111bfb7d23efa | #!/usr/bin/env perl
use strict;
use warnings;
use Getopt::Long;
use Data::Dumper;
use Bio::KBase::KBaseTrees::Client;
use Bio::KBase::KBaseTrees::Util qw(get_tree_client);
my $DESCRIPTION =
"
NAME
tree-find-tree-ids -- search KBase for the tree IDs that match the input options
SYNOPSIS
tree-find-tree-id... | Perl | scripts/tree-find-tree-ids.pl | kbase/trees | mit | 7,823 | 217 | codeparrot/github-code |
994fa768597a994b8600b241dd385dfa8b9b08c5cbbea5f054af3587f55ee55a | export interface Dictionary<TValue> {
[key : string] : TValue;
}
export function camelCase(s : string) : string {
switch (s.length) {
case 0:
return '';
case 1:
return s.toLowerCase();
default:
return s.charAt(0).toLowerCase() + s.subst... | TypeScript | lib/util.ts | suxindao/sequelize-auto-ts | mit | 724 | 33 | codeparrot/github-code |
732bc0492ce3eee904d60cb96352387a69e2a27b9b1d0b1b0bca78b008589098 | /**
* Created by zad on 17/4/20.
*/
/** to left shift an Array
* @param {Array} arr
* @param {Number} num
* @return {Array}
*/
function leftShift(arr, num) {
const result = arr.concat();
if (num < 0) {
return rightShift(arr, -num);
}
while (num > 0) {
result.push(result.shift());
num--;
}
... | JavaScript | src/utils/arrayShift.js | zadzbw/React-Component-zad | mit | 544 | 31 | codeparrot/github-code |
85c40a4990c42f3d98ff340439e67f8be40c9e3eaed9706d075130f65d2b3b88 | /*
* The MIT License (MIT)
*
* Copyright (c) 2015 Andoni del Olmo
*
* 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 u... | Java | minesync-app/src/main/java/org/ado/minesync/commons/ZipArchiver.java | adelolmo/mine-sync | mit | 6,874 | 179 | codeparrot/github-code |
10868d6101321b22cb83130f3ad4be5e92f403209d51ef8a9b2170ee4cdbacc8 | import os.path, sys
sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), os.pardir))
import json
import falcon
import urllib
import uuid
import settings
import requests
from geopy.geocoders import Nominatim
import geopy.distance
from geopy.distance import vincenty
import datetime
radius = []
radius... | Python | api/endpoints/interest.py | c-goosen/mytransport-hackathon | mit | 7,851 | 206 | codeparrot/github-code |
c7f18c85941d43e70879ffd2f08ec184e1aca1f9102304d593d2ea39525dbb62 | package com.studiowannabe.trafalert.util;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
public class CollectionUtils {
public static <T, K> List<T> map(final Collection<K> from, final Mapper<T, K> mapper) {
final... | Java | Server/src/main/java/com/studiowannabe/trafalert/util/CollectionUtils.java | Tombio/Trafalert | mit | 1,076 | 40 | codeparrot/github-code |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.