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
1445c7fd6f13531fe4ce76c5f91631ed73fda30c104b3b56724f698c7a007500
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>hammer-tactics: Not compatible 👼</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap....
HTML
clean/Linux-x86_64-4.08.1-2.0.5/released/8.10.0/hammer-tactics/1.3.2+8.13.html
coq-bench/coq-bench.github.io
mit
7,107
179
codeparrot/github-code
738dbf5c0a4e0a628b9e7a534fdec3bfac4289ae6154b622f61c23b76d2d5f5d
<!doctype html> <html class="no-js" lang=""> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Spacial - Index features</title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <!-- Place fav...
HTML
dev-assets/spacial-2.3/index-features.html
ark-aces/aces-website
mit
25,188
525
codeparrot/github-code
f0f8e48cde2fca513fc442ee3197712b17f2f234dc0096aff0f126b6c7a9fc01
<?php namespace Craft; /** * ElementsService provides APIs for managing elements. * * An instance of ElementsService is globally accessible in Craft via {@link WebApp::elements `craft()->elements`}. * * @author Pixel & Tonic, Inc. <support@pixelandtonic.com> * @copyright Copyright (c) 2014, Pixel & Tonic, Inc...
PHP
app/craft/app/services/ElementsService.php
Skilgarriff/docker-craft
mit
58,459
2,159
codeparrot/github-code
d1bd24aa2cbbb4964abad56903831706613cd71582a274ae50f017cf15e9b782
<?php class WCML_Multi_Currency_UI extends WPML_Templates_Factory { /** * @var woocommerce_wpml */ private $woocommerce_wpml; /** * @var SitePress */ private $sitepress; /** * @var array */ private $currencies; /** * @var array */ ...
PHP
web/app/plugins/woocommerce-multilingual/inc/template-classes/multi-currency/class-wcml-multi-currency-ui.php
tedc/castadiva-deploy
mit
14,932
285
codeparrot/github-code
759e745a25c75cf799b160019d5d53e4ddfaaf45553b1b0dbdc66dcb0caed313
<?php /** * Created by PhpStorm. * User: sjoder * Date: 31.05.15 * Time: 10:37 */ namespace PM\ScanBundle\Command; use Doctrine\ORM\QueryBuilder; use PM\ScanBundle\Entity\File; use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; use Symfony\Component\Console\Input\InputInterface; use Symfony\Compo...
PHP
src/PM/ScanBundle/Command/CleanupCommand.php
pmdevelopment/movie-agent
mit
2,282
89
codeparrot/github-code
3d952bcbc7421e496f95726b74ac208c62308f9b0fdd70dc06d92b3e72b3828b
using NHibernate; using NHibernate.Cfg; using NHibernate.Context; using NHibernate.Dialect; using NHibernate.Mapping.ByCode; using NHibernate.Tool.hbm2ddl; using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Reflection; using System.Text; using System.Threading.Tasks; na...
C#
BookReviews.Common/DataSource/Nh/NhDataSource.cs
bob2000/BookReviews
mit
8,412
271
codeparrot/github-code
26c6591f96be62be03ec607b0cb9009fb4e59cfd7a07d8781c7e0ef01645ec38
/** * Copyright (c) 2015-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the license found in the LICENSE file in * the root directory of this source tree. * * @flow */ /** * Get a hash for the provider object. Hashes are unique per-hasher, so if you have two different *...
JavaScript
pkg/commons-node/Hasher.js
JackPu/atom-weexpack
mit
1,800
68
codeparrot/github-code
e9c767f6bf2afd93688c44f358e33687ad6caa728a3d8703ee2e87c4e0a7b3fd
#include "os.h" #include "http5.h" static int handleall(void **statep, Http5message *output, Http5message *input) { int state; state = *(int*)statep; switch(state){ case 0: if(input->state == HTTP5_DONE){ if(http5ok(output) == -1) return -1; if(http5putheader(output, "content-type", "text/plain") == ...
C
main.c
aki5/libhttp5
mit
1,963
87
codeparrot/github-code
0bc04e1f3bc3eab2de559e840479c6f969a5c529dcb0400e9e255c6b9d94c32a
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Gallery.Common.Helpers { public class PredicateHelper { public static Predicate<T> CombineAll<T>(params Predicate<T>[] predicates) { return target => ...
C#
Gallery.Common/Helpers/PredicateHelper.cs
eidias/Gallery
mit
1,030
42
codeparrot/github-code
d771d482bd8b5427f596549777b9a635a131b5b4c43c7f54c23f027bd5434791
<?xml version="1.0" encoding="iso-8859-1"?> <!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> <title>Docs for page StreamFilter.php</title> <link rel="stylesheet" href="../...
HTML
protected/extensions/Email/Mail/doc/Swift/_vendors---swiftMailer---classes---Swift---StreamFilter.php.html
kmchugh/YiiPlinth
mit
5,355
166
codeparrot/github-code
b4b5bc4ba0dc771107bd175818340d1ecc818631cb1213f6fc206e1184baa60b
using GenericTagHelperExample.Models; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Threading.Tasks; namespace GenericTagHelperExample.Data { public class GenericDbContext : DbContext ...
C#
GenericTagHelperExample/Data/GenericDbContext.cs
HouseAlwaysWin/GenericTagHelper
mit
1,294
44
codeparrot/github-code
96523ff4a4bc6ea7b9b761a968d2b1bcb051a629396c9df60c1080de74cdfbfe
# http://rosalind.info/problems/long/ def superstring(arr, accumulator=''): # We now have all strings if len(arr) == 0: return accumulator # Initial call elif len(accumulator) == 0: accumulator = arr.pop(0) return superstring(arr, accumulator) # Recursive call else: ...
Python
rosalind/long.py
AntoineAugusti/katas
mit
1,108
42
codeparrot/github-code
2d75dc0b432ebdc1135736751b4ccf6120fcc540e9093992b2b43de2d1974ddf
# !/usr/local/bin/python3.4.2 # ----Copyright (c) 2017 Carnegie Hall | The MIT License (MIT)---- # ----For the full license terms, please visit https://github.com/CarnegieHall/linked-data/blob/master/LICENSE---- ##needs further refinement to eliminate non-instrument link results ## Argument[0] is script to run impor...
Python
scripts/scrape_mbz_instruments.py
CarnegieHall/linked-data
mit
1,346
47
codeparrot/github-code
413e22db3512d16fec2b620c3e26c0f2e83ba547f2dda600a5bd60b3cbaf7324
/* * The MIT License * * Copyright 2015 Reaper. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, ...
Java
src/reaper/model/LinkSet.java
Zaraka/Reaper
mit
2,810
80
codeparrot/github-code
ea44b343a7d0eae9666a5c40745d456efeff67f5140391147881d1cc24bb8340
'use strict'; var Transform = require('readable-stream').Transform; var inherits = require('inherits'); var deepMatch = require('./lib/deepMatch'); var wrap = require('./lib/wrapMessage'); var jschan = require('jschan'); function noop() {} function Graft() { if (!(this instanceof Graft)) { return new...
JavaScript
graft.js
GraftJS/graft
mit
2,535
126
codeparrot/github-code
00f6bab40f98ba786d474d4625620714cb4f0859ece16c4e0d117d22ded39472
'use strict'; // Declare app level module which depends on views, and components var accountModule = angular.module('accountModule', []); var partnerModule = angular.module('partnerModule', []); var dodoModule = angular.module('dodoModule', []); angular.module('myApp', [ 'ngMaterial', 'ngRoute', 'myApp.v...
JavaScript
app/app.js
magnusosbeck/rManager
mit
2,567
78
codeparrot/github-code
0d6cacf761c0be3fef53d80bf52a6a1d9e3fc09e4467bc85c445f8b61e2bfa15
using System; using System.Windows.Controls; using WaveEngine.Adapter; using WaveEngine.Common; using Windows.Foundation; namespace LauncherWP { public class GameRenderer : Application { public int Width { get; set; } public int Height { get; set; } private WaveOculusDemoProject.Game g...
C#
Extensions/WaveOculusDemo/LauncherWP/GameRenderer.cs
robnils/Samples
mit
1,173
52
codeparrot/github-code
5145550406c04373689b57eb65754f1871e1c5d47031a00b65d18c251a46a792
/* * StartATCMsg.cpp * * Created on: Jul 8, 2014 * Author: Ale */ #include"StartATCMsg.h" #include <TestbedTypes.h> #include <Messages/Message.h> #include <cassert> #include <vector> using namespace std; StartATCMsg::StartATCMsg(NetworkNode* const src, NetworkNode* const dst, const LinkType linkType, con...
C++
vsn/src/Messages/StartATCMsg.cpp
greeneyesproject/testbed-demo
mit
4,420
155
codeparrot/github-code
2d4c745c2b8f84ae45322a742c3dd9056ae8fb11627d895940f33942550c3c36
<?php namespace ZF2AWSAdapter\Ses\Message; use ZF2AWSAdapter\Ses\Arrayable; /** * Build the subject to email */ class Subject implements Arrayable{ /** * Subject charset * @var string */ private $charset = 'utf-8'; /** * Subject Data * @var string */ privat...
PHP
src/Ses/Message/Subject.php
AdminWeb/ZF2AWSAdapter
mit
1,339
71
codeparrot/github-code
d0b265254b552d981981181d684b118d694a5697efcc0194bfdeadf8f271498a
package io.reflectoring.coderadar.plugin.api; import java.util.*; public class FileMetrics { private Map<Metric, Integer> counts = new HashMap<>(); private Map<Metric, List<Finding>> findings = new HashMap<>(); public FileMetrics() { } /** * Copy constructor. * * @param copyFrom...
Java
coderadar-plugin-api/src/main/java/io/reflectoring/coderadar/plugin/api/FileMetrics.java
reflectoring/coderadar
mit
5,411
163
codeparrot/github-code
7349a16bd96c5d00295d58962599759d3ff14014bc093cbf57ec160720569764
"use strict"; const root = require('./helpers.js').root const ip = require('ip'); exports.HOST = ip.address(); exports.DEV_PORT = 3000; exports.E2E_PORT = 4201; exports.PROD_PORT = 8088; exports.UNIVERSAL_PORT = process.env.PORT || 8000; exports.SHOW_WEBPACK_BUNDLE_ANALYZER = false; /** * These constants set whethe...
JavaScript
constants.js
sangeet003/ng4-pwa-test
mit
2,901
93
codeparrot/github-code
20edd286dfd60e9e46741c44ef1cb8aaa6ad151ddafd8f51916580eef9c4e004
function report(str) { console.log(str); } function vec3(x,y,z) { return new THREE.Vector3(x,y,z); } SCENE = {}; SCENE.getCard = function(boxW, boxH, rotZ) { boxD = 0.1; if (!rotZ) rotZ = 0; //report("getImageCard "+imageUrl); var material = new THREE.MeshLambertMaterial( { color: 0xdd...
JavaScript
Kinetics/js/simpleScene.js
WorldViews/Spirals
mit
5,468
219
codeparrot/github-code
b6eb2029ee2beeb4a4c455b2b2b7a3649a75e631ea39616d5a843e97ccb5f5db
/* * This file is part of BlottleshipsServer. * BlottleshipsServer is licenced under MIT License. See LICENSE for more details. */ /** @file manager.cpp Definitons of the game manager. */ #include <iostream> #include "manager.h" #include "player.h" /** * Constructor. * @param io_service Socket to listen to new...
C++
src/manager.cpp
LordAro/BlottleshipsServer
mit
1,274
52
codeparrot/github-code
8b4fd0ef519ca41d978784c9b78bbdb0e8c045073f4666f8cca6ba8f4346bcab
<?php namespace BackendBundle\Controller; use BackendBundle\Entity\EducationalLevel; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;use Symfony\Component\HttpFoundation\Request; ...
PHP
src/BackendBundle/Controller/EducationalLevelController.php
haciel/sistema_comtable
mit
6,188
159
codeparrot/github-code
a7d5083a6d755a764397484eeab3f3b7f8a0856daa353a9d58f54cf0afe902e7
using AppHook; using ManagedWinapi.Windows; using System; using System.Collections.Generic; using System.ComponentModel; using System.Text.RegularExpressions; using System.Threading; using System.Windows.Forms; namespace autokey { internal class AutoWork : AbstractWork { private readonly AutoFormData[...
C#
autokey/autokey/AutoWork.cs
windwp/myexp
mit
11,485
314
codeparrot/github-code
e63386eae8d9e476359f505411bd0bb2e5d1a0bb2513fdbc24ce751c54c460a0
/* * Copyright 2009-2016 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/lice...
C
Blik2D/addon/openssl-1.1.0c_for_blik/crypto/ppccap.c
BonexGu/Blik2D-SDK
mit
10,194
318
codeparrot/github-code
b6067e39d00e4936a7cda4ed90a58d796eea7f975f070c715c12da0c6e7c0b67
package book.util; import java.io.*; import java.util.*; public class MiscUtil { public static boolean hasDuplicates(Vector v) { int i = 0; int j = 0; boolean duplicates = false; for (i = 0; i < v.size() - 1; i++) { for (j = (i + 1); j < v.size(); j++) { if (v.elementAt(i).toString(...
Java
database-util/src/book/util/MiscUtil.java
bnguyen82/stuff-projects
mit
2,765
136
codeparrot/github-code
e79af88ddb0d00429ccfbf8ee2920699f082877e546db5c69c54cb132c218cb3
/** vim: et:ts=4:sw=4:sts=4 * @license RequireJS 2.1.11 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved. * Available via the MIT or new BSD license. * see: http://github.com/jrburke/requirejs for details */ //Not using strict: uneven strict support in browsers, #392, and causes //problems with requ...
JavaScript
public/lib/requirejs/require.js
GooDay0923/chatroom
mit
82,275
2,069
codeparrot/github-code
f21961b69be3b9fc54a911678f78333de5e8acbd6b1107a1c888349d46cb9031
<script type="text/javascript"> var type = getParameterByName("type"), manageables = { "section":"Section", "class":"Class", "professor":"Professor", "professortype":"Professor Type", "semester":"Semester", "building":"Building", "room":"...
PHP
manage.php
Wingpad/LIMTS
mit
4,404
141
codeparrot/github-code
3477385c5958838867e2a3fe1efc6eed93565e338aab026eb7abb3ea22244d1d
<?php namespace AppBundle\EventListener; use Symfony\Component\HttpKernel\Event\GetResponseEvent; use Symfony\Component\HttpKernel\KernelEvents; use Symfony\Component\EventDispatcher\EventSubscriberInterface; class LocaleListener implements EventSubscriberInterface { private $defaultLocale; public function ...
PHP
src/AppBundle/EventListener/LocaleListener.php
githabas/aintegrated
mit
1,660
48
codeparrot/github-code
4b0c34539428af8d54991ae2c757d4a0901b933c7b8e72fbc75bdb4e546a5ec5
#Synonyms experiment. Pass a string to see its "synonyms" from pyspark.sql import SparkSession, Row from pyspark.ml.feature import Word2Vec, Tokenizer, StopWordsRemover, Word2VecModel import sys; from string import punctuation def strip_punctuation(arr): return [''.join(c for c in s if c not in punctuation) for s ...
Python
synonyms.py
bcanvural/thesis
mit
1,419
39
codeparrot/github-code
04bfaafb038980a5c203d584d68f5c9f151c20799cbbdbad3fd14ae3c7a10a27
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="generator" content="rustdoc"> <meta name="description" content="API documentation for the Rust `SelectionCache` struct in crate `rustc_typeck`."> <meta na...
HTML
Rust/share/doc/rust/html/rustc_typeck/middle/traits/struct.SelectionCache.html
ArcherSys/ArcherSys
mit
5,681
100
codeparrot/github-code
6dc3a6fb1caa39327d0d6ff27f707f68d6c99e89830d98026502dfb7fd481dc6
--- layout: default --- {% if page.categories %} {% assign category = page.categories[0] %} {% assign posts = site.categories[category] %} {% for post in posts %} {% if post.url == page.url %} {% assign post_index0 = forloop.index0 %} {% assign post_index1 = forloop.index %} {% endif %} {% e...
HTML
_layouts/post.html
noo-se/noo-se.github.com
mit
1,502
53
codeparrot/github-code
fb5691abd4eb8be6a9741e76e96ce902090f4873a37a927865600cf33f565b1a
<?php namespace Newsages\User\app\Http\Middleware; use Closure; use Illuminate\Support\Facades\Auth; class User { /** * Handle an incoming request. * * @param \Illuminate\Http\Request $request * @param \Closure $next * @param string|null $guard * * ...
PHP
packages/newsages/user/src/app/Http/Middleware/User.php
newsages/cline
mit
780
32
codeparrot/github-code
015fe1c964714523895c2aa4c1f93719391cdf4b6e9a0c00a7328fc9eae9d229
<?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed t...
PHP
application/libraries/php-google-sdk/google/apiclient-services/src/Google/Service/AnalyticsReporting/Segment.php
dwivivagoal/KuizMilioner
mit
1,212
41
codeparrot/github-code
572a7768951833c099fe801553cc8020c3ea1daba1ddfe18f0ec688586c454ad
/* * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. * See LICENSE in the project root for license information. */ /** * This sample shows how to: * - Get the current user's metadata * - Get the current user's profile photo * - Attach the photo as a file attachment to an email...
JavaScript
routes/index.js
microsoftgraph/nodejs-connect-rest-sample
mit
5,258
175
codeparrot/github-code
0effe9f3a3287d3cdcb624665fef8539dc3bb4255fd7b9b33d71f37fc7563473
using MediaFoundation; namespace Mntone.TwitterVideoUploader.Core.FormatChecker { internal static class AudioMediaTypeExtension { public static int GetChannel(this IMFMediaType mediaType) { System.Diagnostics.Debug.Assert(mediaType.GetIsAudio()); int channels; var hr = mediaType.GetUINT32(MFAttributes...
C#
Mntone.TwitterVideoUploader/Core/FormatChecker/Extensions/AudioMediaTypeExtension.cs
mntone/TwitterVideoUploader
mit
1,484
45
codeparrot/github-code
e60c1ecc7d1bb73593ef582a431f75ff9b540cb45c21da88a7e248e287cdc110
//2014.03.06 Gustaf - CTG. /* ------Information Sample of a function returning an array: http://www.cplusplus.com/forum/beginner/3823/ char* retArray() { char* letters = new char[ 9 ]; // 8 characters + null terminator char_traits <char> ::copy( letters, "abcdefgh", 9 ); // same as strcpy() ...
C++
cap03/cap03-ex3_6-02-08-test-return_array_example.cpp
ggaaaff/think_like_a_programmer--test_code
mit
1,461
100
codeparrot/github-code
b40e858dcca3c7a8932f818a3f218674ecd526e0528f5cfa0408f9c16934ed66
#include "../cpp-utility/os.hpp" #include "../dependencies/catch.hpp" #include "testlib.hpp" class CoCallback : public ICallback_Automation { public: CoCallback(uint32_t value) { this->value = value; this->rc = 1; } virtual uint32_t Callback() { return this->value; } uin...
C++
test/cpp-raw/nullable_parameters.cpp
Rantanen/com-export-rs
mit
6,568
247
codeparrot/github-code
70bea97f2cf860e4637378e76180700728eaec15ebe6e4e136b4e9faa35e0e10
package me.aikin.refactoring.longer; import java.util.Date; public class ResidentialSite { private Zone zone; private Reading[] readings = new Reading[1000]; private static final double TAX_RATE = 0.05; public ResidentialSite(Zone zone) { this.zone = zone; } public void addReading(Re...
Java
refactoring-techniques/longer/src/main/java/me/aikin/refactoring/longer/ResidentialSite.java
aikin/java-refactor-training
mit
3,630
119
codeparrot/github-code
7eb36f37d4fbf073c00e6178e033f74cf882e9a469b7e88bf7d319549cce187f
using System.IO; using System.IO.Compression; namespace Cumulus.Infrastructure.BrokeredMessageServices.Compression { public class GzipCompressor : ICompressor { public byte[] Compress(byte[] input) { using (var outputStream = new MemoryStream()) { // We ...
C#
src/Cumulus/Infrastructure/BrokeredMessageServices/Compression/GzipCompressor.cs
AtmosphereMessaging/Cumulus
mit
1,167
34
codeparrot/github-code
182bf7cf0e61f2ba120e7aa9690d800724ddd47132e71d511901f4f341cba1e7
require 'json' require 'rexml/document' module BrakemanTranslateCheckstyleFormat module Translate def parse(json) JSON .parse(json) end def trans(json) doc = REXML::Document.new doc << REXML::XMLDecl.new('1.0', 'UTF-8') checkstyle = doc.add_element('checkstyle') wa...
Ruby
lib/brakeman_translate_checkstyle_format/translate.rb
noboru-i/brakeman_translate_checkstyle_format
mit
1,479
53
codeparrot/github-code
b27afa6981c4409af464ba1791d5aa30a1188279a2bcfa3f6a46386335c30241
<?php /* * This file is part of the Sonata Project package. * * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Sonata\Component\Customer; use FOS\UserBundle\Model\U...
PHP
src/Component/Customer/CustomerSelector.php
Soullivaneuh/sonata-ecommerce
mit
3,077
112
codeparrot/github-code
380719c19a3e696ef22d04421a1007caa63222c777a668dc214f02368a482706
package models import ( "errors" "fmt" "log" "sort" "time" "github.com/UniversityRadioYork/2016-site/utils" ) // weekFromVars extracts the year, and week strings from vars. func weekFromVars(vars map[string]string) (string, string, error) { y, ok := vars["year"] if !ok { return "", "", errors.New("no year ...
GO
models/schedule_tabulate.go
Danzibob/2016-site
mit
9,122
318
codeparrot/github-code
32c3bed97e71347811c09e8f1fe03c77db74d3cceacd354cb945f6f8c48ae528
#-*- coding: utf-8 -*- import os from clang.cindex import Config, Index, TypeKind class ClangExtractor(object): def __init__(self, libclang_path, srcdir): if Config.library_file != libclang_path: Config.set_library_file(libclang_path) self.srcdir = srcdir def extract(self): ...
Python
src/shell/data/clangextractor.py
Frky/scat
mit
1,769
46
codeparrot/github-code
261545e12d3459b73dc21f2debae532262462d98922bfb4b588bfe7970385776
<?php namespace FoodCoopBundle\Actions; use FoodCoopBundle\Entity\Order; use Codifico\Component\Actions\Action\Basic\RemoveAction; use FoodCoopBundle\Event\EntityRemoveEvent; use Codifico\Component\Actions\Repository\ActionRepository; use Psr\Log\LoggerInterface; use Symfony\Component\EventDispatcher\EventDispatcherI...
PHP
src/FoodCoopBundle/Actions/OrderRemoveAction.php
FoodCoopSystem/fcs-backend
mit
1,936
79
codeparrot/github-code
42bbb973843bf3d2b89395883fafa1d89cef283cea967a01ca60cb1801173943
/* * Copyright (c) 2016 by Rafael Angel Aznar Aparici (rafaaznar at gmail dot com) * * sisane-server: Helps you to develop easily AJAX web applications * by copying and modifying this Java Server. * * Sources at https://github.com/rafaelaznar/sisane-server * * sisane-server is distributed u...
Java
src/main/java/net/daw/service/implementation/ImagenService.java
nesbarse/sisane-server
mit
13,009
279
codeparrot/github-code
fb92a3c568e27fca770ab02087d803b80b3956ae62c001115f15f261e041c620
// 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 "main.h" #include "db.h" #include "init.h" #include "bitcoinrpc.h" using name...
C++
src/rpcmining.cpp
Baaleos/RhunCoin
mit
13,531
370
codeparrot/github-code
c70c58b1c871332298eff8b77f0fae2984d6ec629290623a4483ab75a26f925c
<?php namespace Tarioch\EveapiFetcherBundle\Entity; use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity * @ORM\Table(name="accountCharacter", indexes={ * @ORM\Index(name="characterID", columns={"characterId"}), * @ORM\Index(name="corporationID", columns={"corporationId"}) * }) */ class AccountCharacter {...
PHP
Entity/AccountCharacter.php
tarioch/eveapi-fetcher-bundle
mit
2,243
102
codeparrot/github-code
b31724119362def7c69e86b981624bfe5283415326e78890fa602333434dd18e
package main import ( "encoding/json" "fmt" "io/ioutil" "os" "sort" "strings" "golang.org/x/crypto/openpgp" ) // // Password keeps login, password and other // this should be called Entry. // type Password struct { Key string Login string Password string Description string } // // Databa...
GO
db.go
nablaone/npass
mit
3,474
194
codeparrot/github-code
de33e3aa22b70f34fbf203c4ab2b3c23aec3bbb5377a0c0854f23d9077634a71
const JSONBox = require("../JSONBox"); const rmdir = require("rmdir"); const appRootDir = require("app-root-dir"); const Q = require("q"); const path = require("path"); const async = require("asyncawait/async"); const await = require("asyncawait/await"); const expect = require("chai")....
JavaScript
lib/__tests__/JSONBoxTest.js
nikonovd/jsonbox
mit
5,677
201
codeparrot/github-code
ee49cc6693983696891e2c9c6d38d70d84fdd049767f1c5c304db5654b419917
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>AdminLTE 2 | Data Tables</title> <!-- Tell the browser to be responsive to screen width --> <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"> ...
PHP
application/views/template.php
Nugrahanto/SistemOnline
mit
24,193
645
codeparrot/github-code
7d11f539fef573e79c0646367fda471ca3d4b5c024b981a15d2c89e0f62a960a
package be.drissamri.rest.resource; import be.drissamri.entity.LinkEntity; import javax.ws.rs.core.UriInfo; import java.net.URI; public class LinkResource extends Resource { public LinkResource(UriInfo uri, LinkEntity link) { super(uri, link.getHash()); put("url", link.getUrl()); put("has...
Java
linkshortener-api/src/main/java/be/drissamri/rest/resource/LinkResource.java
drissamri/linkshortener
mit
965
35
codeparrot/github-code
bd82749c0abab0ce3b39d20f9da1b99064f4458ae613d0dd8d64ef00644aa3c3
"""Contains utility functions for working with the shell""" from contextlib import contextmanager import datetime from decimal import Decimal import json import pprint import sys import time import traceback SHELL_CONTROL_SEQUENCES = { 'BLUE': '\033[34m', 'LTBLUE': '\033[94m', 'GREEN': '\033[32m', 'LT...
Python
python_lib/shell.py
johnnadratowski/git-reviewers
mit
8,544
321
codeparrot/github-code
53595dc8b60ff7a2b160ae7db143b0e0408d4ee5d40af05c17bec1cc6e48eb02
<?php namespace Nathanmac\InstantMessenger\Services; use Nathanmac\InstantMessenger\Message; class GroveService extends HTTPService implements MessengerService { /** * The token for the Grove service. * * @var string */ protected $token; /** * The icon for the message. * ...
PHP
src/Nathanmac/InstantMessenger/Services/GroveService.php
nathanmac/instant-messenger
mit
2,769
139
codeparrot/github-code
d0e7c16d21236479ddb834538caeb176fe8f30eec54380069afe9714713a3a07
package org.ixming.android.view; import android.content.Context; import android.graphics.Canvas; import android.graphics.LinearGradient; import android.graphics.Paint; import android.graphics.Shader; import android.graphics.Shader.TileMode; import android.util.AttributeSet; import android.widget.TextView; public clas...
Java
AndroidFramework_v_2_0/src/org/ixming/android/view/GradientTextView.java
bblue000/AndroidSampleFramework
mit
4,584
152
codeparrot/github-code
7615fd1de78c980e9605a96e152d7e5a8d9b52509e04faf63158bf56c4dd7391
'use strict'; var request = require('request') var uuid = require('node-uuid') var env = require('./env') var World = function World(callback) { var self = this this.collection = null this.lastResponse = null this.doc1 = null this.doc2 = null this.generateCollectionId = function() { this.collectio...
JavaScript
features/support/world.js
basti1302/storra
mit
3,003
121
codeparrot/github-code
33e23b60ca3a5e0a61e4612bb99415a8c1a7582cc1538f996e35bbf326a33382
<?php /* * This file is part of the overtrue/wechat. * * (c) overtrue <i@overtrue.me> * * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ namespace EasyWeChat\MiniProgram\Plugin; use EasyWeChat\Kernel\BaseClient; /** * Class Client. * * @autho...
PHP
src/MiniProgram/Plugin/Client.php
tianyong90/wechat
mit
1,568
65
codeparrot/github-code
1d96c813d143bb16efeea80a324f288b07727abbd46e461e0ba393ca15dff659
""" A simple client to query a TensorFlow Serving instance. Example: $ python client.py \ --images IMG_0932_sm.jpg \ --num_results 10 \ --model_name inception \ --host localhost \ --port 9000 \ --timeout 10 Author: Grant Van Horn """ from __future__ import absolute_import from __future__ import division from __futur...
Python
tfserving/client.py
visipedia/tf_classification
mit
2,561
87
codeparrot/github-code
a27060b9bc598a9634544ac344fb07706d7c9cc28b75e5371c72a321ced82681
<?php namespace Webas\WebasBundle\Form; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolverInterface; class CommentType extends AbstractType { /** * @param FormBuilderInterface $builder * @param array $optio...
PHP
src/Webas/WebasBundle/Form/CommentType.php
raptorius/webas
mit
910
41
codeparrot/github-code
76309048efe1fd1fdd3eb1feb53880719af7f8b4dd226c3671c14454fdac98f3
/*********************************************** gruntfile.js for jquery-bootstrap https://github.com/fcoo/jquery-bootstrap ***********************************************/ module.exports = function(grunt) { "use strict"; //*********************************************** grunt.initConfig({ "fco...
JavaScript
gruntfile.js
FCOO/jquery-bootstrap
mit
1,288
34
codeparrot/github-code
13eddab89f0cf3202652b23385cc3ff150895fec04108c7796316164c1b48ba3
package derpatiel.manafluidics.compat.jei.castingchamber; import derpatiel.manafluidics.ManaFluidics; import derpatiel.manafluidics.compat.jei.ManaFluidicsPlugin; import derpatiel.manafluidics.enums.MaterialType; import derpatiel.manafluidics.item.MFMoldItem; import derpatiel.manafluidics.util.MaterialItemHelper; impo...
Java
src/main/java/derpatiel/manafluidics/compat/jei/castingchamber/CastingRecipeCategory.java
talandar/ManaFluidics
mit
3,520
105
codeparrot/github-code
6529a638c7e7de9ba97d8a541033009fb5fe834636a01de4bff869cd7f8c0542
#include <Parser/Lexer.h> #include <Parser/ParserVal.h> #include <Parser/AST/Nodes.h> #include <Parser/Parser.tab.hpp> #include <Parser/ParsingError.h> #include <boost/assert.hpp> #include <boost/log/core.hpp> #include <boost/log/expressions.hpp> #include <boost/log/trivial.hpp> #include <iostream> #include <fstream> #...
C++
src/cli.cpp
a1exwang/tinydbpp
mit
2,587
110
codeparrot/github-code
69b510f40ce1dccb0b9b1714ec492de5131feec44ff7077bc3e94f7d71ffcf0d
package com.socialthingy.plusf.z80.operations; import com.socialthingy.plusf.z80.Clock; import com.socialthingy.plusf.z80.ContentionModel; import com.socialthingy.plusf.z80.Processor; import com.socialthingy.plusf.z80.Register; public class OpAddAIndexed8Reg extends ArithmeticOperation { private final Register r...
Java
plus-f/src/main/java/com/socialthingy/plusf/z80/operations/OpAddAIndexed8Reg.java
alangibson27/plus-f
mit
1,070
35
codeparrot/github-code
8da14c4b3ba4dc3b0027497915734ca5cae15246c672637d2f27cf0bad2f5556
<?php namespace BackendBundle\Controller; use Symfony\Component\Form\Extension\Core\Type; use CentraleReferencementBundle\Entity\Contact; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; u...
PHP
src/BackendBundle/Controller/ContactController.php
ViraxDev/centrale_referencement
mit
4,385
156
codeparrot/github-code
bd4e41b821f730525ab4960ee55aae31d81acd1f33191786fd3865704f17b0c6
package net.collaud.fablab.api.service.impl; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Optional; import net.collaud.fablab.api.dao.SupplyTypeRepository; import net.collaud.fablab.api.data.SupplyTypeEO; import net.collaud.fablab.api.security.Roles; import net.collaud....
Java
src/main/java/net/collaud/fablab/api/service/impl/SupplyTypeServiceImpl.java
fabienvuilleumier/fb
mit
2,211
71
codeparrot/github-code
e1eb7017e0bbebaf345eafd81bb09c0b4bcb0367c4e8c64b28feb601118550fe
import json import os from processes.postgres import Postgres from processes.gather_exception import GatherException try: DB_SERVER = os.environ['DB_SERVER'] DB_PORT = os.environ['DB_PORT'] DB_DATABASE = os.environ['DB_DATABASE'] DB_USER = os.environ['DB_USER'] DB_PASSWORD = os.environ['DB_PASSW...
Python
processes/insert_movies.py
kinoreel/kino-gather
mit
3,618
100
codeparrot/github-code
e3e0b8346820ffb54334e29ef4de6ab809ba8a52341fb2eb209c0035278b1a0d
package com.erm.controller; import com.erm.ejb.PersonaFacadeLocal; import com.erm.model.Municipio; import com.erm.model.NivelEducativo; import com.erm.model.Ocupacion; import com.erm.model.Parentesco; import com.erm.model.Persona; import com.erm.model.TipoDoc; import java.io.Serializable; import java.text.Pa...
Java
src/main/java/com/erm/controller/PersonaController.java
LUISGA64/ERM_WEB
mit
5,033
183
codeparrot/github-code
5da6cb85157cd12d7fbce878563385093af879080d89b2f17ae56b1e416fde1c
<?php defined('BASEPATH') OR exit('No direct script access allowed'); /** * Created by PhpStorm. * User: ghujk * Date: 2016/4/14 * Time: 14:29 */ class Account_model extends CI_Model { public function __construct() { parent::__construct(); $this->load->database(); } public function...
PHP
application/models/Account_model.php
ghujki/wxvote
mit
2,059
70
codeparrot/github-code
eab1a0e0d73e7b3e7d2131869e09e097fbd57adf642b0379c620b68532f6b8ef
#ifndef BLOCKBUFFER_H #define BLOCKBUFFER_H #include "project_exceptions.h" using namespace fs_excetion; #include "filesystemblock.h" #include "constants.h" #include <memory> #include <list> #include <unordered_set> class BlockFileAccessor; class BlockBufferPool; enum class SyncType {None = 0, ReadOnly = 1, WriteO...
C
FS-Driver-for-file/blockbuffer.h
valsid/FileSystemForFile
mit
3,017
125
codeparrot/github-code
c67898564b2e1a235184237653782a0c7de25ed3f23e0fbd9c04c1666f427486
# Defines the following output variables: # # CORE_INCLUDES: The list of required include directories # CORE_LIBS: The list of required libraries for link_target # CORE_TARGETS: The list of required targets # MODULE_CORE: True if all required dependencies are found. # unset(PACKAGE_INCLUDES) unset(L...
CMake
cmake/Dependencies_core.cmake
darglein/saiga
mit
2,796
102
codeparrot/github-code
58b0575ff6d713df998797db94a7843ebcc5f0e09f8c2a51c4e19934e31847fe
module DataMapper module Sphinx class Query #-- # Yeah I'm just hacking this stuff in. Fingers crossed you'll be able to legitimately add operators in the # future. module Conditions module SizedComparison def valid? value.kind_of?(Array) && value.size == 2 &&...
Ruby
lib/dm-sphinx-adapter/query/conditions.rb
shanna/dm-sphinx-adapter
mit
1,936
65
codeparrot/github-code
7a0c257ee6fdf22e13ba8fcdd1dfaf62750439c61c28d9aae20199039eb5c555
// Copyright 2014 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package cron import ( "time" "github.com/gogits/cron" "github.com/gigforks/gogs/models" "github.com/gigforks/gogs/modules/log" "github.com/gigforks/go...
GO
modules/cron/cron.go
gigforks/gogs
mit
1,608
64
codeparrot/github-code
94cc94ab271f5bb82f718cd68ca124c95c2b72f4dfe069ed52c6ae97bd2eb808
/* * Copyright (C) 2009-2013 Typesafe Inc. <http://www.typesafe.com> */ package scalaguide.upload.fileupload { import play.api.mvc._ import play.api.test._ import org.junit.runner.RunWith import org.specs2.runner.JUnitRunner import java.io.{FileWriter, FileOutputStream, File} import controllers._ impo...
Scala
pf-documentation/manual/working/scalaGuide/main/upload/code/ScalaFileUpload.scala
jyotikamboj/container
mit
3,001
106
codeparrot/github-code
591805bea479c5132b2fa98e15c45bbdbc972fea837e5cdeab2fe7da25e1eb50
require "json" require "sinatra/base" require "github-trello/version" require "github-trello/postgres" require "github-trello/http" require "yaml" module GithubTrello class Server < Sinatra::Base post "/posthook" do #connect to database pg = GithubTrello::Postgres.new pg.connect #loa...
Ruby
lib/github-trello/server.rb
rehia/github-trello
mit
2,967
92
codeparrot/github-code
63fbb7fb13dc7110d59f2d50e827c8569c123b91ce404972cdb9bee0bd2fe17f
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace GSM { public class Display { private uint displayWidth; private uint displayHeght; private long numberOfColors; public uint DisplayWidth { ...
C#
C# OOP/DefiningClasses/01.GSM/Hardware.cs
hackohackob/TelerikAcademy
mit
3,333
142
codeparrot/github-code
e069341c1e3cce9a1d089c7a40b39d6d07bd239c3c41e9333961a18359b43042
<?php namespace App\Http\Controllers; use App\Point; use App\User; use Auth; use App\Visitor; use App\Reply; use App\Topic; use App\Answer; use App\History; use App\Question; use App\Notification; use Illuminate\Http\Request; use App\Http\Requests; class QuestionController extends Controller { /** * Questi...
PHP
app/Http/Controllers/QuestionController.php
xpdavid/Ding
mit
16,427
541
codeparrot/github-code
b2bd99b32196779d37ef8b1eb9446c4fdc63a7cc1e546e576edcf0ba9aaefa5a
''' Created on Dec 13, 2015 @author: Shannon Litwin ''' import Adafruit_BBIO.GPIO as GPIO import Adafruit_BBIO.PWM as PWM import Lib_LCD as LCD import Lib_Main as BBB import sys import signal import time leftForward = "P8_46" leftBackward = "P8_45" rightForward = "P9_14" rightBackward = "P9_16" def Control_C_Exit(si...
Python
PythonLibraries/lcd_demo.py
ValRose/Rose_Bone
mit
1,617
105
codeparrot/github-code
5c0dbb94878aff666436372f7a65741bb98eaa13528f608969ef567b6688213e
angular.module('fdb.directives', ['mcus.directives']); angular.module('fdb.services', ['mcus.services']); angular.module('fdb.filters', []); angular.module('fdb', ['fdb.services', 'fdb.directives', 'fdb.filters']). controller('UserFrontendCtrl', function($scope, $http, $timeout, $filter, $location) { // $scope.dele...
JavaScript
portal/app/webroot/js/users_frontends/index.js
haiht24/rtmn
mit
4,779
124
codeparrot/github-code
a42c8c9ade13ddd96bd4bdb660a04af904d8770fa15fbc93a6979823445185f6
/* * Copyright (c) 2006-2007 Erin Catto http://www.box2d.org * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * Permission is granted to anyone to use this software for any purpose, * i...
C++
examples/DemoBox2D/box2d/Box2D/Dynamics/Joints/b2Joint.cpp
unitpoint/oxygine-objectscript
mit
4,856
199
codeparrot/github-code
e54684e6c73bdfc866963fb29f43a85777aa7b5cbcaef0a741652104fc95473e
package com.appacitive.adaptersample.app; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.ListView; import com.appacitive.android.AppacitiveContext; import com.appacitive.core.model.Environment; import com.appacitive.core.query.Appac...
Java
app/src/main/java/com/appacitive/adaptersample/app/MainActivity.java
sathley/AppacitiveQueryAdapterSample
mit
2,139
63
codeparrot/github-code
1fd1e41b48ff308ef4d893040299d06ffab7adf9e2ba903a717feb4f117893dd
<!DOCTYPE HTML> <html> <head> <title>com.PhoneGap.c2dm</title> </head> <body> <script type="text/javascript" charset="utf-8" src="cordova-2.7.0.js"></script> <script type="text/javascript" charset="utf-8" src="jquery-mobile/jquery_1.5.2.min.js"></script> <script type="text/j...
HTML
assets/www/index.html
jennlo22/remember-me
mit
5,682
135
codeparrot/github-code
cecfec7f9016aefdaf69d292cc9f5f595ceb18386ebafc6e7565e6cc3c8cd31e
""" Custom managers for Django models registered with the tagging application. """ from django.contrib.contenttypes.models import ContentType from django.db import models class ModelTagManager(models.Manager): """ A manager for retrieving tags for a particular model. """ def __init__(self, tag_model):...
Python
newtagging/managers.py
mstepniowski/django-newtagging
mit
2,765
79
codeparrot/github-code
95a1778fa80a647964149151920d31e6ac67a40b497bed5adc4384f757617a3b
import parsers import tokenizer import context html_escape_table = { "&": "&amp;", '"': "&quot;", "'": "&apos;", ">": "&gt;", "<": "&lt;", } def html_escape(text): """Produce entities within text.""" return "".join(html_escape_table.get(c,c) for c in unicode(text)) class Tag(object):...
Python
cekolabs_empanada/tags.py
ceko/cekolabs_empanada
mit
4,928
164
codeparrot/github-code
24c9a400edca3aa3cae8c6be8b3248eddb56161cc2ce402fb85d0f967157f3f4
import React from "react"; import styled from "styled-components"; import Img from "gatsby-image"; import { graphql } from "gatsby"; import Center from "../components/center"; import ResponsiveContainer from "../components/responsive-container"; import Inset from "../components/inset"; import Text from "../components/t...
JavaScript
src/pages/index.js
SoftBricks/homepage
mit
5,621
251
codeparrot/github-code
c9ad702527cbcdea34f3364cd680e89d1e99613473d9c03b5ebaeb35eb39cd68
import os import sys import json from optional_django import staticfiles from optional_django.serializers import JSONEncoder from optional_django.safestring import mark_safe from optional_django import six from js_host.function import Function from js_host.exceptions import FunctionError from react.render import Rende...
Python
react_router/render.py
HorizonXP/python-react-router
mit
5,105
156
codeparrot/github-code
fd7471c4f594fb2dc590cf3c41e4cbeab1a244f984f592982fb3835c1af58621
import * as React from "react"; import * as ReactDOM from "react-dom"; import * as Utils from "./utils"; /** small wrapper for bootstrap form groups */ export class FormGroup extends React.Component<{ label: string, children?: any, id?:string, isStatic?:boolean }, {}> { render() { return ( <div cla...
TypeScript
src/visuals.tsx
SrTobi/lambda
mit
3,312
110
codeparrot/github-code
60d109a12392dcb6e8e28f25a4938bf02abd72cc8791faf9582cb5a12db92639
namespace SIM.Pipelines.InstallModules { using SIM.Pipelines.Processors; using Sitecore.Diagnostics.Base; using Sitecore.Diagnostics.Base.Annotations; #region #endregion public abstract class InstallModulesProcessor : Processor { #region Methods #region Public methods public override sea...
C#
src/SIM.Pipelines/InstallModules/InstallModulesProcessor.cs
dsolovay/Sitecore-Instance-Manager
mit
1,345
62
codeparrot/github-code
cf9a2529ec25b736e7999437ee3a400ae2389de300ba1bc519afecb2ed9c1083
using System; using System.Collections.Generic; namespace Gash.Output { internal class OutputManager : IGameLooped { private Queue<OutputLine> LineQueue = new Queue<OutputLine>(); private OutputLine CurrentLine; private OutputLine PreviousLine; private float CurrentLi...
C#
Output/OutputManager.cs
VHonzik/gash
mit
8,314
255
codeparrot/github-code
03036a5df1d1a11e51d8dd1f429b98f72da4d5216dd39d08c230fe42420e2931
#pragma once #include "CSceneNodeBoxyDecorator.h" #include "3d.h" #include "UnifiedCoord.h" #include "VectorTraits.h" #include <utility> #include <bitset> class CSceneNodeBoxyRepositioner: public CSceneNodeBoxyDecorator {//ÔÚÒ»¸öSceneNodeBoxyÀïÃæ·ÅÒ»¸öSceneNodeBoxyµÄÀà. public: virtual void SetAABB(const...
C
Closet/VisualWardrobe/CSceneNodeBoxyRepositioner.h
ducis/pile-of-cpp
mit
1,098
33
codeparrot/github-code
38e95dfe20e11ecbf7bef322324cfa10f2a52a40f1ee9ea197acca386ac163a9
namespace SH_VBoxVM_Service { partial class VBoxService { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// Clean up any resources being used. /// </summary> ...
C#
SH_VBoxVM_Service/VBoxService.Designer.cs
Drogenix/VBoxTrinket
mit
1,103
42
codeparrot/github-code
dded12887bc6011120a91c98621f023d8099ac57bc33aed7dbf5c87afe002cfd
from django.shortcuts import render # Create your views here. from .models import Course, Student, StudentCourse from .serializers import CourseSerializer, StudentSerialiser from rest_framework import viewsets from rest_framework.decorators import detail_route, list_route from rest_framework.response import Response...
Python
server/app/views.py
Likegram/study_run
mit
1,803
52
codeparrot/github-code
128745d29fc2e6d7f95eff2e9b49b764ada13dcffe1d043b0e6263c00939b19b
var gsc_basicmatch = /[a-z0-9]/i; function gsc_getquery(elt, q) { q = ltrim(q); q = q.replace('\s+', ' '); if (q.length == 0 || !gsc_basicmatch.test(q)) { gsc_emptyresults(elt); return ''; } if (elt.currentQuery && (elt.currentQuery == q || elt.tempQuery == q)) ...
JavaScript
php/js/ajaxac/googlesuggestclone.js
Arasaac/dockerizePHPApp
mit
3,473
150
codeparrot/github-code
f7171dfda1176a944db27bff1cc38ad66bfbcbe21d6efe823f100bea029eeb00
module DBViewCTI module Model module CTI module TypeConversion def specialize class_name, id = type(true) return self if class_name == self.class.name class_name.constantize.find(id) end # Return the 'true' (i.e. most specialized) classname of ...
Ruby
lib/db_view_cti/model/cti/type_conversion.rb
mvdamme/dbview_cti
mit
2,041
55
codeparrot/github-code
055e6ba196ade1b2a8e930de5190992e0ebdbea800fb15106722a60391539e28
var _ = require('underscore'), check = require('validator').check, sanitize = require('validator').sanitize, later = require('later'), util = require('./util'), condition = require('./condition'); var Rules = { types: [ 'trigger', 'schedule' ], alertTypes: { 'email': { // later }, 'sms': { //...
JavaScript
lib/rules.js
jaredtking/heartbeat
mit
2,467
143
codeparrot/github-code
e7d58defb5f76017c1de3cafd71fed82b6a0a6a85451341567ed6dd579717c41
var keystone = require('keystone'), async = require('async'); exports = module.exports = function(req, res) { var view = new keystone.View(req, res), locals = res.locals; // Init locals locals.section = 'ideas'; locals.page.title = 'Ideas - Evilcome'; locals.filters = { category: req.params.category }; ...
JavaScript
routes/views/idea.js
Evilcome/evilcome-site
mit
1,700
81
codeparrot/github-code
d25ca76ef0e6c0a37867275d6eb78ae0b5a6ad00ffacf042b913b5e28fd07a50
package org.example.rest; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; @Entity public class MyEntity { @Id @GeneratedValue(...
Java
ejb-test/src/main/java/org/example/rest/MyEntity.java
aleroddepaz/java-samples
mit
787
45
codeparrot/github-code
2ffec2520187b85e62edb23d771ce40463c5c48534451654219e11bae2d12f97
var should = require('should'); var sinon = require('sinon'); var Chintz = require('../lib/main'); var atomName = 'test-atom'; var moleculeName = 'test-molecule'; var invalidName = 'invalid-element-name'; var called; describe('prepare', function() { describe('with no arguments', function() { it('return...
JavaScript
test/main.js
BBC-News/chintz-node
mit
7,899
264
codeparrot/github-code
953ad0fa2a7c48b31bc63bc21d7a2669b21562eeec438336413a33255be60fea
class Miniviz class Svg # Converts a value from points to pixels. def self.pt2px(value) return nil if value.nil? return value.to_f * PT2PX end # Normalizes a series of path points. def self.d(graph, value) value = value.gsub(/\s*([-0-9.]+)([, ]+)([-0-9.]+)\s*/) do x, sep...
Ruby
lib/miniviz/svg.rb
benbjohnson/miniviz
mit
1,792
50
codeparrot/github-code
8e38d2ff7df9299f7050f5770380f842f48fb2e99473ba2d78e00e7c6b0ee4dc
#!/usr/bin/env python # coding=utf-8 """ A simple example demonstrating the various ways to call cmd2.Cmd.read_input() for input history and tab completion """ from typing import ( List, ) import cmd2 EXAMPLE_COMMANDS = "Example Commands" class ReadInputApp(cmd2.Cmd): def __init__(self, *args, **kwargs) -> ...
Python
examples/read_input.py
python-cmd2/cmd2
mit
4,590
125
codeparrot/github-code